/* ==========================================================================
   Ezy Leasing — visual system
   Survey-drawing look: ink, concrete greys, one signal-orange accent.
   Type: Roboto Flex (UI, wide cut for headings), IBM Plex Mono (data, labels),
   Newsreader (lease wording only).
   ========================================================================== */

:root {
  /* Ink & ground */
  --ink: #0D1A17;
  --ink-2: #16251F;
  --ink-3: #24352F;
  --ink-line: #2F423B;
  --on-ink: #F2F4F2;
  --on-ink-muted: #A3B1AC;
  --paper: #F3F4F2;
  --surface: #FFFFFF;
  --sunken: #ECEEEB;
  --line: #DDE2DF;
  --line-strong: #BEC7C3;
  --text: #0D1A17;
  --muted: #55625E;

  /* Signal accent */
  --signal: #F25C05;
  --signal-ink: #A83C00;
  --signal-wash: #FDEDE2;

  /* Status tones (text on wash ≥ 4.5:1) */
  --green: #1C6852;  --green-wash: #E0EEE8;
  --amber: #855200;  --amber-wash: #F7EAD0;
  --blue:  #2A48A8;  --blue-wash:  #E4E9F7;
  --red:   #B42318;  --red-wash:   #FBE8E6;

  --font-ui: "Roboto Flex", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-legal: "Newsreader", Georgia, "Times New Roman", serif;

  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --wrap: 1200px;
  --gutter: clamp(16px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.page { padding-top: 32px; padding-bottom: 80px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Wide display headings — the architectural voice */
.display {
  font-stretch: 118%;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.05;
}
.h2 { font-stretch: 112%; font-size: 19px; font-weight: 700; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--signal { color: var(--signal-ink); }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: var(--on-ink); border-bottom: 1px solid var(--ink-line); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--on-ink); }
.brand-mark { width: 14px; height: 14px; background: var(--signal); flex: none; }
.brand-word { font-stretch: 125%; font-weight: 800; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
.brand-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); border: 1px solid var(--ink-line); padding: 3px 7px; border-radius: var(--r-sm); }
.nav { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; color: var(--on-ink-muted);
  text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--on-ink); }
.nav a.is-active { color: var(--on-ink); border-bottom-color: var(--signal); }
.account { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.account-who { display: grid; text-align: right; line-height: 1.25; }
.account-who b { font-size: 13px; font-weight: 600; }
.account-who span { font-family: var(--font-mono); font-size: 11px; color: var(--on-ink-muted); }
.account form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 13px; color: var(--on-ink-muted); cursor: pointer; }
.linkbtn:hover { color: var(--on-ink); text-decoration: underline; }
.sample-strip {
  background: var(--ink-2); color: var(--on-ink-muted); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; padding: 6px 16px;
}
.sample-strip b { color: var(--signal); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent;
  font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn svg { flex: none; }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: #FF6A14; color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: var(--ink-3); color: var(--on-ink); }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Cards & sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-pad { padding: clamp(18px, 2.4vw, 26px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head .stack-sm { gap: 6px; }

/* Main column + side column */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split--wide-side { grid-template-columns: minmax(0, 1fr) 380px; }
.sticky { position: sticky; top: 20px; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap; background: var(--sunken); color: var(--muted);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-green  { background: var(--green-wash); color: var(--green); }
.tone-amber  { background: var(--amber-wash); color: var(--amber); }
.tone-signal { background: var(--signal-wash); color: var(--signal-ink); }
.tone-blue   { background: var(--blue-wash);  color: var(--blue); }
.tone-red    { background: var(--red-wash);   color: var(--red); }
.tone-neutral{ background: var(--sunken);     color: var(--muted); }
.pill.tone-submitted, .pill.tone-drafting { background: var(--amber-wash); color: var(--amber); }
.pill.tone-approved { background: var(--green-wash); color: var(--green); }
.pill.tone-declined { background: var(--red-wash); color: var(--red); }

/* ---------- Dashboard hero ---------- */
.hero {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--on-ink);
  padding: 36px 0 30px;
}
.hero .eyebrow { color: var(--on-ink-muted); }
.hero-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-sub { color: var(--on-ink-muted); margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 28px; background: var(--ink-line); border: 1px solid var(--ink-line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--ink-2); padding: 16px 18px; display: grid; gap: 6px; }
.stat-num { font-family: var(--font-mono); font-size: 30px; font-weight: 500; line-height: 1; color: var(--on-ink); }
.stat-num.is-hot { color: var(--signal); }
.stat-label { font-size: 13px; color: var(--on-ink-muted); }

/* ---------- Segmented tabs ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunken); border-radius: var(--r); flex-wrap: wrap; }
.tabs a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.tabs .count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------- Lease rows (dashboard) ---------- */
.leases { list-style: none; margin: 0; padding: 0; }
.lease-row {
  display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1.4fr) auto;
  gap: 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line);
}
.lease-row:first-child { border-top: 0; }
.lease-row:hover { background: #FAFBFA; }
.lease-title { font-weight: 650; font-size: 15px; text-decoration: none; display: block; }
.lease-title:hover { color: var(--signal-ink); }
.cell-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.cell-value { font-size: 14px; }
.date-chip { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; }
.lease-end { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.table .right { text-align: right; }
.table a { font-weight: 600; text-decoration: none; }

/* ---------- Empty states ---------- */
.empty { padding: 56px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.empty-mark { width: 44px; height: 44px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); margin-bottom: 6px; display: grid; place-items: center; color: var(--muted); }
.empty .btn { margin-top: 8px; }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; }
.notice svg { flex: none; margin-top: 2px; }
.notice-success { background: var(--green-wash); color: var(--green); }
.notice-info { background: var(--amber-wash); color: var(--amber); }
.notice-error, .alert { background: var(--red-wash); color: var(--red); }
.alert { padding: 13px 16px; border-radius: var(--r); margin-bottom: 16px; font-weight: 600; font-size: 14px; }

/* ---------- Stepper ---------- */
.steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; counter-reset: step; }
.steps button {
  width: 100%; text-align: left; background: none; border: 0; padding: 10px 0 0; border-top: 3px solid var(--line);
  font: inherit; cursor: pointer; color: var(--muted); display: grid; gap: 2px;
}
.steps .step-no { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; }
.steps .step-name { font-size: 13.5px; font-weight: 600; }
.steps .is-done button { border-top-color: var(--ink); color: var(--ink); }
.steps .is-current button { border-top-color: var(--signal); color: var(--ink); }
.steps .has-error button { border-top-color: var(--red); color: var(--red); }

/* ---------- Questionnaire ---------- */
.q-section { padding: clamp(20px, 3vw, 32px); }
.q-section-head { display: grid; gap: 6px; margin-bottom: 8px; }
.question { padding: 22px 0; border-top: 1px solid var(--line); }
.q-section-head + .question { border-top: 0; padding-top: 12px; }
.question[hidden] { display: none; }
.q-label { display: block; font-weight: 650; font-size: 15.5px; margin-bottom: 4px; }
.q-help { color: var(--muted); font-size: 14px; margin-bottom: 12px; max-width: 62ch; }
.input, .question input[type=text], .question input[type=number], .question input[type=date], .question input[type=email], .question input[type=password], .question textarea {
  width: 100%; max-width: 520px; font: inherit; font-size: 15px; padding: 11px 13px; min-height: 46px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text);
}
.question input[type=number], .question input[type=date] { max-width: 240px; font-family: var(--font-mono); }
.question textarea { max-width: none; resize: vertical; line-height: 1.55; }
.question input:focus, .question textarea:focus, .input:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: var(--ink); }
.affix { display: flex; align-items: center; max-width: 240px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.affix:focus-within { outline: 2px solid var(--signal); border-color: var(--ink); }
.affix-text { padding: 0 12px; color: var(--muted); font-family: var(--font-mono); font-size: 14px; align-self: stretch; display: flex; align-items: center; background: var(--sunken); }
.question .affix input[type=number] { border: 0; outline: 0; border-radius: 0; max-width: none; }
.choices { display: grid; gap: 8px; max-width: 620px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choices--yn { grid-template-columns: repeat(2, minmax(0, 140px)); }
.choice {
  position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; min-height: 48px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); cursor: pointer;
}
.choice:hover { border-color: var(--ink); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-dot { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:checked) .choice-dot { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--surface); }
.choice:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.choice-body { display: grid; gap: 2px; }
.choice-label { font-weight: 650; }
.choice-help { color: var(--muted); font-size: 13px; }
.explain {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; max-width: 620px;
  padding: 12px 14px; border-radius: var(--r); background: var(--sunken); font-size: 14px;
}
.explain[hidden] { display: none; }
.explain-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--signal-ink); white-space: nowrap; padding-top: 2px; }
.has-error .input, .has-error input[type=text], .has-error input[type=number], .has-error input[type=date], .has-error textarea, .has-error .affix, .has-error .choice { border-color: var(--red); }
.q-error { color: var(--red); font-size: 13.5px; font-weight: 600; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); margin-top: 6px; }
.step-nav .spacer { flex: 1; }
.js .q-step:not(.is-current) { display: none; }
.custom-box { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 18px; background: var(--paper); }
.fee { font-family: var(--font-mono); font-weight: 500; color: var(--ink); background: var(--signal-wash); border-radius: var(--r-sm); padding: 2px 8px; }

/* Live "your lease so far" panel */
.sofar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sofar-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: var(--r); background: var(--paper); font-size: 13.5px; font-weight: 600; }
.sofar-list li[hidden] { display: none; }
.tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 6px; border-radius: var(--r-sm); white-space: nowrap; font-weight: 500; }
.tag-standard { background: var(--sunken); color: var(--muted); }
.tag-selected { background: var(--green-wash); color: var(--green); }
.tag-lawyer { background: var(--amber-wash); color: var(--amber); }

/* ---------- Lease document preview ---------- */
.doc { padding: clamp(22px, 4vw, 48px); }
.doc-head { text-align: center; padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.doc-title { font-family: var(--font-legal); font-size: clamp(24px, 3vw, 30px); font-weight: 600; letter-spacing: -0.01em; }
.doc-sub { font-family: var(--font-legal); font-size: 17px; color: var(--muted); }
.clause { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px 26px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.clause:last-child { border-bottom: 0; }
.clause-legal { font-family: var(--font-legal); font-size: 16px; line-height: 1.6; }
.clause-legal h3 { font-family: var(--font-legal); font-size: 17px; font-weight: 600; margin-bottom: 4px; letter-spacing: 0; }
.clause-legal p + p { margin-top: 8px; }
.clause-legal .placeholder { color: var(--muted); font-style: italic; }
.plain { padding: 12px 14px; border-radius: var(--r); background: var(--green-wash); color: #12392D; font-size: 14px; line-height: 1.5; }
.plain--lawyer { background: var(--amber-wash); color: #4A2F05; }
.plain b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; display: block; margin-bottom: 3px; opacity: .85; }

/* Side panels on the lease page */
.ready-card { padding: 22px; display: grid; gap: 14px; border-top: 3px solid var(--green); }
.ready-card.is-waiting { border-top-color: var(--amber); }
.ready-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green-wash); color: var(--green); flex: none; }
.is-waiting .ready-icon { background: var(--amber-wash); color: var(--amber); }
.doclist { display: grid; }
.doclist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.doclist-row:first-child { border-top: 0; padding-top: 0; }
.doclist-row b { display: block; font-size: 14.5px; }
.doclist-row span { font-size: 13px; color: var(--muted); }
.doclist-actions { display: flex; gap: 6px; flex: none; }
.dates { list-style: none; margin: 0; padding: 0; display: grid; }
.dates li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.dates li:first-child { border-top: 0; padding-top: 0; }
.dates .date-chip { font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
.fact { background: var(--surface); padding: 14px 16px; display: grid; gap: 4px; }
.fact-value { font-weight: 650; font-size: 15px; }
details.answers-box summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
details.answers-box summary::-webkit-details-marker { display: none; }
details.answers-box summary::after { content: "+"; font-family: var(--font-mono); font-size: 18px; color: var(--muted); }
details.answers-box[open] summary::after { content: "–"; }
.answers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 20px; margin: 0; }
.answers dt { color: var(--muted); font-size: 13.5px; }
.answers dd { margin: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.answers-group + .answers-group { margin-top: 16px; }
.answers-group .eyebrow { margin: 14px 0 8px; display: block; }

/* Custom clause requests list */
.requests { list-style: none; margin: 0; padding: 0; display: grid; }
.requests li { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.requests li:first-child { border-top: 0; padding-top: 0; }
.request-desc summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.request-desc p { margin-top: 6px; padding: 10px 12px; background: var(--paper); border-radius: var(--r); font-size: 13.5px; }

/* ---------- Lawyer portal ---------- */
.portal { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.queue { padding: 10px; display: grid; gap: 4px; }
.queue-head { padding: 8px 10px 6px; display: flex; justify-content: space-between; }
.queue a { display: grid; gap: 3px; padding: 12px; border-radius: var(--r); text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.queue a:hover { background: var(--paper); color: var(--ink); }
.queue a.is-active { background: var(--signal-wash); border-color: #F7C9AA; }
.queue-title { font-weight: 650; font-size: 14px; }
.queue-meta { font-size: 12.5px; color: var(--muted); }
.quote { margin: 0; padding: 16px 18px; background: var(--paper); border-left: 3px solid var(--signal); border-radius: 0 var(--r) var(--r) 0; font-size: 15px; line-height: 1.6; }
.legal-input { font-family: var(--font-legal) !important; font-size: 16px !important; line-height: 1.6 !important; }
.wording { font-family: var(--font-legal); font-size: 16px; line-height: 1.6; padding: 16px 18px; background: var(--paper); border-radius: var(--r); }
.wording p + p { margin-top: 8px; }

/* ---------- Auth ---------- */
.auth-page { min-height: calc(100vh - 60px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  background-color: var(--ink);
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px; color: var(--on-ink); padding: clamp(32px, 6vw, 72px); display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
}
.auth-side .display { font-size: clamp(30px, 4vw, 48px); max-width: 14ch; }
.auth-side p { color: var(--on-ink-muted); max-width: 42ch; }
.auth-main { display: grid; place-items: center; padding: 40px var(--gutter); }
.auth { width: 100%; max-width: 380px; display: grid; gap: 22px; }
.auth .question { padding: 0; border: 0; }
.auth .question input { max-width: none; }

/* ---------- Phones & tablets ---------- */
@media (max-width: 1000px) {
  .split, .split--wide-side { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .portal { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar-inner { gap: 14px; }
  .nav a { padding: 0 8px; font-size: 13px; }
  .account-who { display: none; }
  .brand-word { font-size: 13px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lease-row { grid-template-columns: 1fr; gap: 10px; }
  .lease-end { justify-content: space-between; }
  .clause { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
  .steps .step-name { display: none; }
  .answers { grid-template-columns: 1fr; gap: 2px; }
  .answers dd { margin-bottom: 8px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { padding: 32px var(--gutter); min-height: 0; }
  .doclist-row { flex-wrap: wrap; }
  .page-head .btn { width: 100%; }
}
@media (max-width: 560px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 12px; row-gap: 0; }
  .nav { order: 3; width: 100%; height: 44px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - 8px); width: calc(100% + 2 * var(--gutter)); }
  .brand-tag { display: none; }
}

/* Without JavaScript the questionnaire is one long page: hide step controls. */
html:not(.js) [data-next], html:not(.js) [data-back], html:not(.js) .steps { display: none; }
