:root {
  color-scheme: light;
  --ink: #2c2023;
  --subtle: #5d454b;
  --line: #e7d8d9;
  --accent: #70172a;
  --light: #fff1e7;
  --gold: #ffe2a6;
  font: 14px/1.42 system-ui, "Noto Sans Bengali", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  width: 420px;
  min-width: 300px;
  margin: 0;
  color: var(--ink);
  background: #fffaf6;
}
header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 18px;
  color: #fff;
  background: var(--accent);
}
.brand { flex: 1; min-width: 0; }
.brand span {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
h1 { margin: 0; font-size: 1.43rem; line-height: 1.14; }
h2 { margin: 0; font-size: 0.9rem; }
.language { display: flex; align-items: center; gap: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.language button {
  min-width: 35px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: white;
  font-size: 0.82rem;
}
.language button[aria-pressed="true"] { background: #fff; color: var(--accent); font-weight: 700; }
main { padding: 13px 18px 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
label { display: block; color: var(--ink); font-size: 0.85rem; font-weight: 650; }
label span { display: block; margin-bottom: 3px; }
input[type=text], select, textarea {
  width: 100%;
  height: 35px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
}
input[type=text][aria-invalid=true] { border-color: #b12936; }
:focus-visible { outline: 2px solid #a22032; outline-offset: 2px; }
input:disabled { background: #f2f0f4; }
.advance { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 8px 0 10px; }
.advance-toggle { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.advance-toggle span { margin: 0; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.advance-rate { width: calc((100% - 10px) / 2); }
.estimate { background: var(--light); border-left: 3px solid #b74c53; border-radius: 7px; padding: 9px 11px; }
dl { margin: 3px 0; }
dl > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 0.86rem; }
dt { color: var(--subtle); }
dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.total dd { color: var(--accent); font-size: 1.3rem; font-weight: 750; }
.total dt { color: var(--ink); font-weight: 700; }
.terms { color: var(--subtle); font-size: 0.75rem; margin: 5px 0 0; }
.actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-top: 9px; }
.actions button { border: 1px solid var(--accent); border-radius: 7px; padding: 6px; background: var(--accent); color: white; font-weight: 700; }
#preview { background: white; color: var(--accent); }
.actions button:disabled { opacity: 0.47; cursor: default; }
#form-message:not(:empty) { color: #94202b; margin: 4px 0; font-size: 0.82rem; }
#feedback:not(:empty) { color: var(--accent); margin: 6px 0 0; font-size: 0.82rem; }
p[role=status]:empty { display: none; }
textarea.preview { resize: vertical; height: auto; min-height: 92px; margin-top: 8px; font: inherit; font-size: 0.85rem; }
@media (max-width: 420px) { body { width: 100%; } }
