/* ===================================================================
   मूल्यांकन – design tokens
   Calm, neutral surfaces; maroon (from the portal's मूल्यांकन heading) is
   kept for the main action, links and small progress marks only.
   Desktop: the page fits the window (no page scroll bar); a panel scrolls
   on its own only if a result is unusually long.
   =================================================================== */
:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --text: #2a2420;
  --muted: #6d655e;
  --faint: #9a918a;
  --border: #e6e1db;
  --border-strong: #d6cfc7;
  --accent: #7a2620;
  --accent-hover: #64201b;
  --accent-ink: #ffffff;
  --accent-soft: #f5ecea;
  --ring: rgb(122 38 32 / .14);
  --col-a: #f6eee8;
  --col-b: #fbf7f3;
  --col-a-head: #efe2d8;
  --col-b-head: #f5ede5;
  --warn-soft: #fbf6ea;
  --warn-border: #e8d9ad;
  --error: #b42318;
  --error-soft: #fdf0ee;
  --mast-bg: #5c1d18;
  --mast-ink: #fbf5f0;
  --shadow: 0 1px 2px rgb(40 25 15 / .05);
  --radius: 10px;
  --radius-sm: 7px;
  --control-h: 36px;
  font-family: "Mukta", "Nirmala UI", "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161311;
    --surface: #1e1a17;
    --surface-2: #231e1b;
    --text: #ece6e1;
    --muted: #aaa098;
    --faint: #7d746d;
    --border: #322b27;
    --border-strong: #433a34;
    --accent: #e3a493;
    --accent-hover: #ecb7a9;
    --accent-ink: #261310;
    --accent-soft: #2e2220;
    --ring: rgb(227 164 147 / .18);
    --col-a: #2c2420;
    --col-b: #25201c;
    --col-a-head: #382d27;
    --col-b-head: #2f2722;
    --warn-soft: #29241a;
    --warn-border: #5c4f2c;
    --error: #ff8a80;
    --error-soft: #2f1c1b;
    --mast-bg: #2b1513;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a { color: var(--accent); }

/* ===================================================================
   Masthead – one line
   =================================================================== */
.masthead { color: var(--mast-ink); background: var(--mast-bg); }
.masthead__bar { display: flex; align-items: center; gap: 12px 24px; min-height: 50px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.brand__title { margin: 0; font-size: 1.25rem; line-height: 1.2; font-weight: 600; }
.brand__eyebrow { font-size: .78rem; opacity: .65; white-space: nowrap; }

.stepper { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; }
.stepper li { display: flex; align-items: center; gap: 5px; opacity: .6; }
.stepper__dot {
  width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  font-size: .65rem; font-weight: 600; border: 1px solid currentColor;
}
.stepper li[data-state="current"] { opacity: 1; }
.stepper li[data-state="done"] { opacity: .85; }
.stepper li[data-state="done"] .stepper__dot { background: var(--mast-ink); color: var(--mast-bg); border-color: var(--mast-ink); font-size: 0; }
.stepper li[data-state="done"] .stepper__dot::before { content: "✓"; font-size: .65rem; }

.lang { display: flex; padding: 2px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .22); flex-shrink: 0; }
.lang button { border: 0; background: transparent; color: inherit; padding: 2px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .8rem; opacity: .8; }
.lang button[aria-pressed="true"] { background: rgb(255 255 255 / .16); opacity: 1; }

/* ===================================================================
   Layout + panels
   =================================================================== */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px;
  margin-top: 14px; margin-bottom: 10px; align-items: start;
}
.side { display: grid; gap: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.panel__title { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }

/* ===================================================================
   Form – label beside the control
   =================================================================== */
.field {
  display: grid; grid-template-columns: 9.5em minmax(0, 1fr); align-items: center; gap: 2px 12px;
  margin: 0 0 10px; min-width: 0;
}
.field > label { margin: 0; }
.field > .hint, .field > .error { grid-column: 2; }
.field > datalist { display: none; }
.field-group { border-top: 1px solid var(--border); padding-top: 10px; }
label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: .92rem; }
.field__num { font-size: .78rem; font-weight: 500; color: var(--faint); min-width: 1ch; }
.field__num::after { content: "."; }

select, input[type="text"], input[type="search"], input[type="password"] {
  width: 100%; height: var(--control-h); padding: 4px 10px;
  font: inherit; color: var(--text); background-color: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%239a918a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px;
}
select:hover:not(:disabled), input:hover { border-color: var(--faint); }
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
select:disabled { background-color: var(--surface-2); color: var(--faint); cursor: not-allowed; }
select[aria-invalid="true"], input[aria-invalid="true"] { border-color: var(--error); }

.hint { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.error { margin: 2px 0 0; font-size: .8rem; color: var(--error); }
/* Required fields: a red * after the label; the note at the top of each form explains it */
.req::after { content: " *"; color: var(--error); font-weight: 600; }
.req-note { margin: 0 0 8px; font-size: .78rem; color: var(--muted); text-align: right; }
.req-note::before { content: "* "; color: var(--error); font-weight: 600; }
.extras__grid .error { margin: 0; font-size: .76rem; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-left: calc(9.5em + 12px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--control-h); padding: 0 16px; border-radius: var(--radius-sm);
  font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--quiet { background: transparent; color: var(--muted); }
.btn--quiet:hover { color: var(--text); background: var(--surface-2); }

.alert { background: var(--error-soft); color: var(--error); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 10px; font-size: .88rem; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 10px; font-size: .88rem; }
.notice .choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Survey-number suggestion list */
.combo { position: relative; }
.suggest {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 220px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px -8px rgb(40 25 15 / .25);
}
.suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 8px; border-radius: 5px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--accent-soft); }
.suggest__no { font-weight: 600; font-variant-numeric: tabular-nums; }
.suggest__zone { color: var(--muted); font-size: .8rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================================================================
   Live selection trail (compact two-column list)
   =================================================================== */
.trail { list-style: none; margin: 0 0 8px; padding: 0; }
.trail li { display: grid; grid-template-columns: 18px 8.5em minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.trail li:last-child { border-bottom: 0; }
.trail li > div { display: contents; }
.trail__dot { width: 18px; height: 18px; align-self: center; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; border: 1px solid var(--border-strong); color: var(--faint); }
.trail li[data-done] .trail__dot { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.trail__label { font-size: .82rem; color: var(--muted); }
.trail__value { overflow-wrap: anywhere; }
.trail__value--empty { color: var(--faint); }

/* ===================================================================
   Result
   =================================================================== */
.result__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.result__head .panel__title { margin: 0; }
.badge { font-size: .74rem; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); white-space: nowrap; }
.badge:empty { display: none; }

/* Summary as a 3-column grid of small label/value pairs */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: .76rem; line-height: 1.2; }
.facts dd { margin: 0; overflow-wrap: anywhere; font-size: .92rem; }
.facts .code { color: var(--faint); font-size: .76rem; }

/* Rate step: zone choice + transaction type (label beside control), then the rate table */
.step-field { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); align-items: center; gap: 2px 12px; margin: 0 0 8px; }
.step-field > .hint { grid-column: 2; margin: 0; }
.step-field > label { font-size: .86rem; color: var(--muted); font-weight: 400; }
.txn { border: 0; padding: 0; min-width: 0; }
.txn legend { float: left; width: 8.5em; margin-right: 12px; padding: 0; font-size: .86rem; color: var(--muted); }
.txn__options { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; }
.txn__options label { font-weight: 400; font-size: inherit; gap: 5px; cursor: pointer; }
.txn__options input { accent-color: var(--accent); margin: 0; }

/* Rates: five highlighted value columns (alternating tints) */
.rates__caption { margin: 8px 0 4px; }
.rates { width: 100%; border-collapse: separate; border-spacing: 3px 0; margin: 0 -3px 10px; table-layout: fixed; font-size: .9rem; }
.rates th, .rates td { padding: 5px 8px; text-align: right; }
.rates thead th { font-weight: 500; font-size: .74rem; color: var(--muted); border-radius: 6px 6px 0 0; }
.rates thead th:nth-child(odd) { background: var(--col-a-head); }
.rates thead th:nth-child(even) { background: var(--col-b-head); }
.rates td { font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 0 0 6px 6px; padding-top: 7px; padding-bottom: 7px; }
.rates td:nth-child(odd) { background: var(--col-a); }
.rates td:nth-child(even) { background: var(--col-b); }
.rates .rates__na { color: var(--faint); font-weight: 400; }

.sro { padding-top: 8px; }
.sro--missing { padding: 8px 12px; border: 1px solid var(--warn-border); border-radius: var(--radius-sm); background: var(--warn-soft); }
.sro h3 { font-size: .9rem; font-weight: 600; margin: 0 0 2px; }
.sro p { margin: 0 0 4px; font-size: .86rem; }
.sro details { margin: 0 0 4px; }
.sro summary { cursor: pointer; color: var(--accent); font-size: .86rem; }
.offices { list-style: none; margin: 4px 0; padding: 0; }
.offices li { padding: 5px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; font-size: .84rem; }
.offices li:last-child { border-bottom: 0; }
.offices li strong { display: block; font-weight: 500; }

/* ===================================================================
   Valuation step – property details (left) and the valuation (right)
   =================================================================== */
/* The property form is long: a slightly denser rhythm keeps it within the window */
#propertyForm { --control-h: 32px; }
#propertyForm .field { margin-bottom: 7px; }
.mode-valuation .step-field > .hint { display: none; }
.mode-valuation .facts { margin-bottom: 8px; padding-bottom: 8px; }
.mode-valuation .rates__caption { margin-top: 4px; }
.mode-valuation .rates td { padding-top: 5px; padding-bottom: 5px; }
.mode-valuation .rates { margin-bottom: 8px; }
.next-row { display: flex; justify-content: flex-end; margin: 2px 0 10px; }
.next-row .hint { margin: 0; }
.panel__bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.panel__bar .panel__title { margin: 0; }
.btn--sm { height: 28px; padding: 0 10px; font-size: .84rem; }
.field__label { font-weight: 500; font-size: .92rem; }
.pair { display: flex; gap: 6px; min-width: 0; }
.pair > * { flex: 1 1 0; min-width: 0; }
.choice { display: flex; flex-wrap: wrap; gap: 4px 16px; min-height: var(--control-h); align-items: center; }
.choice label, .check { font-weight: 400; cursor: pointer; }
.choice input, .check input { accent-color: var(--accent); margin: 0; }
/* Long options, one per line (tenanted property cases) */
.choice--stack { flex-direction: column; align-items: flex-start; gap: 8px; padding: 6px 0; }
.field:has(.choice--stack) { align-items: start; }
.field:has(.choice--stack) > .field__label { padding-top: 6px; }
.choice--stack label { display: flex; gap: 8px; align-items: baseline; line-height: 1.35; }
.choice label:has(input:disabled) { color: var(--muted, inherit); opacity: .7; cursor: not-allowed; }
.check { margin: 0 0 8px; padding-left: calc(9.5em + 12px); font-size: .88rem; align-items: flex-start; }
.check input { margin-top: 3px; flex: none; }
#vFloorNumber { margin: 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; padding: 8px 0 0; border-top: 1px solid var(--border); }
.checks .check { padding-left: 0; margin: 0; font-size: .86rem; }
.checks .check[hidden] { display: none; }
.checks__group { display: contents; }
.form-sub { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .98rem; font-weight: 600; }   /* tick boxes filled from a lookup list, laid out with the others */
.check--off { color: var(--faint); cursor: not-allowed; }
.checks__note { margin: 6px 0 0; font-size: .76rem; }
.extras { margin: 0 0 10px; padding-left: calc(9.5em + 12px); }
.extras summary { cursor: pointer; color: var(--accent); font-size: .88rem; }
.extras__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin-top: 8px; }
.extras__grid label { display: grid; gap: 2px; font-size: .8rem; font-weight: 400; color: var(--muted); }
.extras__grid input { height: 30px; }
.btn--outline { margin-left: auto; background: transparent; color: var(--muted); border-color: var(--border-strong); }
.btn--outline:hover { color: var(--accent); border-color: var(--accent); }

.valuation { border-top: 1px solid var(--border); padding-top: 8px; }
.valuation h3 { font-size: .95rem; font-weight: 600; margin: 0 0 4px; }
.valuation__empty { padding: 8px 0; }
.valuation__steps { margin: 0 0 6px; padding-left: 1.3em; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.valuation__steps li { padding: 0; line-height: 1.45; }
.valuation__rate { color: var(--text); font-weight: 600; list-style: none; margin-left: -1.3em; padding-top: 3px !important; }
.valuation__lines { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.valuation__lines th, .valuation__lines td { padding: 3px 6px; text-align: right; border-bottom: 1px solid var(--border); }
.valuation__lines th:first-child, .valuation__lines td:first-child { text-align: left; }
.valuation__lines thead th { font-weight: 500; font-size: .74rem; color: var(--muted); background: var(--col-a-head); }
.valuation__lines .code { color: var(--faint); font-size: .74rem; }
.valuation__lines tfoot th { text-align: right; font-weight: 600; border-bottom: 0; }
.valuation__total { font-size: 1.05rem; font-weight: 700; color: var(--accent); background: var(--col-a); border-bottom: 0 !important; white-space: nowrap; }
.valuation .hint { margin: 4px 0 0; }

/* Development agreement: the two shares of instruction 32 and the portal's figure */
.devgroup__head { margin: 0; font-size: .86rem; font-weight: 600; color: var(--text); }
.valuation__lines .share th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--text); background: transparent; padding-top: 8px; }
.valuation__lines .subtotal td, .valuation__lines .subtotal th { font-weight: 600; text-align: right; }
.valuation__lines .subtotal.is-chosen td { color: var(--accent); }
.valuation__portal { margin: 8px 0 0; padding: 6px 8px; border: 1px dashed var(--border-strong); border-radius: 6px; font-size: .84rem; }
.valuation__portal strong { font-variant-numeric: tabular-nums; }
.valuation__portal-line { margin: 0; }

/* Farmland (rural village): one area box per kind of land, its rate per hectare beside it */
.agri-rows { margin: 4px 0 6px; }
.agri-rows td:nth-child(2) { width: 9.5em; }
.agri-rows td input { width: 100%; height: 28px; text-align: right; }
.agri-rows td:nth-child(3) { width: 8.5em; white-space: nowrap; }
.agri-rows tr.is-filled td:first-child { font-weight: 600; }
.agri-sum { margin: 0 0 4px; font-size: .86rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.agri-sum:empty { display: none; }
.agri-sum.is-over { color: var(--error); }

/* Modal message (farmland: more land entered than the 7/12 holds) */
.modal { width: min(460px, calc(100% - 32px)); padding: 20px 22px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .35); }
.modal--error { border-top: 5px solid var(--error); }
.modal::backdrop { background: rgb(0 0 0 / .5); }
.modal__title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.08rem; font-weight: 700; color: var(--error); }
.modal__icon { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--error); color: var(--surface); font-weight: 800; }
.modal__text { margin: 0 0 18px; line-height: 1.5; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.rural-rates td:first-child, .rural-rates th:first-child { text-align: left; }

/* Print: the result card only (location, rates, valuation) */
/* The printed valuation sheet (buildPrintSheet): hidden on screen; when printing a valuation it is the only thing printed. */
.print-sheet { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body.print-sheet-on > *:not(#printSheet) { display: none !important; }
  body.print-sheet-on #printSheet { display: block !important; }
  .print-sheet { color: #000; font-size: 10.5pt; line-height: 1.45; }
  .ps { border: 2px solid #000; padding: 3px 8px 10px; }
  .ps__title { border: 1px solid #000; text-align: center; padding: 2px 6px; margin: 0 -5px 4px; font-weight: 500; }
  .ps__head { display: flex; justify-content: space-between; align-items: flex-start; }
  .ps__when { text-align: right; font-size: 10pt; white-space: pre-line; }
  .ps__id { padding-top: 10px; }
  .ps hr { border: 0; border-top: 1px solid #000; margin: 8px 0; }
  .ps__facts { display: grid; grid-template-columns: 28% 1fr; gap: 6px 0; margin: 10px 0; }
  .ps__facts dt, .ps__facts dd { margin: 0; }
  .ps p { margin: 4px 0; }
  .ps__rates { border-collapse: collapse; margin: 6px 0; }
  .ps__rates th, .ps__rates td { border: 1px solid #000; padding: 1px 12px; text-align: center; font-variant-numeric: tabular-nums; }
  .ps__rates th { font-weight: 600; }
  .ps__row { display: grid; grid-template-columns: 28% 1fr; gap: 0 8px; }
  .ps__calc p { margin: 6px 0; }
  .ps__sub { font-weight: 600; margin-top: 10px !important; }
  .ps__indent { padding-left: 18%; }
  .ps__strong { font-weight: 700; }
  .ps__total p { margin: 4px 0; }
  /* The company-use farmland sheet (agriCompanySheet), in the portal's layout */
  .ps__pairs { display: grid; gap: 4px 12px; margin: 8px 0; }
  .ps__pairs--1 { grid-template-columns: 1fr; }
  .ps__pairs--2 { grid-template-columns: 55% 1fr; }
  .ps__pairs--3 { grid-template-columns: 30% 25% 1fr; }
  .ps__workings { border-collapse: collapse; width: 100%; margin: 2px 0 4px; }
  .ps__workings td { padding: 1px 4px 1px 0; vertical-align: top; }
  .ps__workings td:first-child { width: 30%; }
  .ps__workings td:nth-child(3) { width: 3%; }
  .ps__workings td:last-child { width: 20%; font-variant-numeric: tabular-nums; }
  .ps__ruled { border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 2px 0; }
  .ps__lines { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
  .ps__lines th { font-weight: 700; text-align: left; vertical-align: bottom; padding: 2px 4px 8px 0; }
  .ps__lines td { padding: 2px 4px 2px 0; }
  .ps__lines th:nth-child(4), .ps__lines th:nth-child(6), .ps__lines td:nth-child(4), .ps__lines td:nth-child(6) { width: 3%; text-align: center; }
  .ps__lines tr.ps__sep td { border-top: 1px solid #000; border-bottom: 1px solid #000; }
  .ps__final { display: grid; grid-template-columns: 1fr 22% 4% 28%; gap: 4px 0; margin: 8px 0 2px; }
  .ps__final > :nth-child(3n + 1) { grid-column: 2; }
  .ps__notes { font-size: 8.5pt; margin-top: 8px; color: #333; }
  .ps__notes p { margin: 2px 0; }
}
@media print {
  .masthead, .footer, .panel--form, .next-row, .txn, .lang, #alert { display: none !important; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; color: #000 !important; }
  body { display: block !important; }
  .layout { display: block !important; margin: 0; }
  .side { max-height: none !important; overflow: visible !important; }
  .panel { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .valuation__total { color: #000 !important; }
  .step-field > .hint { display: none; }
  #rateZone { border: 0; padding: 0; height: auto; background-image: none; }
}

/* ===================================================================
   Footer – one line
   =================================================================== */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 6px 16px; flex-wrap: wrap; color: var(--faint); font-size: .76rem; padding-top: 6px; padding-bottom: 8px; }
.footer__maps { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { padding: 0 8px; border-radius: 999px; border: 1px solid var(--border-strong); text-decoration: none; color: var(--muted); }
.chip:hover { color: var(--accent); border-color: var(--accent); }

/* ===================================================================
   Desktop: fit the window – the page never scrolls; a long panel does
   =================================================================== */
@media (min-width: 901px) and (min-height: 500px) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; overflow: hidden; }
  .masthead, .footer { flex: none; }
  .layout { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: start; }
  /* Only the result column may scroll; the form stays visible so the suggestion list can overlap it */
  .side { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .side { align-content: start; }
  .mode-valuation .panel--form { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  /* A rural village's farmland fields make the form taller than the window: it scrolls instead of running under the
     footer (a rural village has no survey-number suggestions to overlap) */
  .panel--form:has(#ruralFields:not([hidden])) { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
}

/* ===================================================================
   Narrow screens: normal page scrolling, label above control
   =================================================================== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .stepper { margin-left: 0; order: 3; width: 100%; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .brand__eyebrow { display: none; }
  .field { grid-template-columns: 1fr; }
  .field > .hint, .field > .error { grid-column: 1; }
  .actions { padding-left: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-field { grid-template-columns: 1fr; }
  .step-field > .hint { grid-column: 1; }
  .txn legend { float: none; width: auto; margin-bottom: 4px; }
  .trail li { grid-template-columns: 18px 7em minmax(0, 1fr); }
  .check, .extras { padding-left: 0; }
  .checks { grid-template-columns: 1fr; }
  .extras__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
