/* Pay Cert. Concrete, drawing ink and a highlighter for the money. */

@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/static/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/static/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/static/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url('/static/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap; src: url('/static/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/static/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/static/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --concrete: #EEF0ED;
  --paper: #FFFFFF;
  --wash: #F5F7F4;
  --ink: #16233F;
  --ink-2: #2B3A5C;
  --steel: #5A6472;
  --rule: #D3D8DD;
  --rule-soft: #E6E9EB;
  --hi: #FFD43B;
  --hi-soft: #FFF4C7;
  --good: #1D7A4C;
  --good-soft: #E2F0E7;
  --bad: #C2361F;
  --bad-soft: #F8E3DE;
  --info: #2C5AA0;
  --info-soft: #E6EDF8;
  --warn: #7A5200;
  --focus: #2C5AA0;

  --font: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --font-cond: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;

  --r-input: 4px;
  --r-btn: 6px;
  --r-panel: 8px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
p { margin: 0 0 var(--s3); max-width: 72ch; }
h1, h2, h3 { font-family: var(--font-cond); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; font-weight: 600; }
small, .small { font-size: 14px; }
.muted { color: var(--steel); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: var(--s2) var(--s3); z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.topbar-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-cond); font-weight: 700; font-size: 22px; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.nav { display: flex; gap: var(--s1); flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--steel); font-weight: 500; padding: 18px 10px 16px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.who { display: flex; align-items: center; gap: var(--s3); white-space: nowrap; }
.who a { text-decoration: none; display: flex; align-items: center; gap: var(--s2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--steel); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--ink); }

.banner { background: var(--hi-soft); border-bottom: 1px solid #EBD98A; }
.banner-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--s5); font-size: 15px; display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.banner.bad { background: var(--bad-soft); border-color: #EBC1B7; }

/* ---------- Page ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head .crumb { font-size: 14px; color: var(--steel); margin-bottom: 6px; }
.page-head .crumb a { color: var(--steel); }
.page-head .sub { color: var(--steel); margin-top: 6px; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s5); }
.stack > * + * { margin-top: var(--s5); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.panel-head h2 { font-size: 22px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .panel-head { padding: var(--s4) var(--s5) 0; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }

/* ---------- Money figures ---------- */
.figure { font-family: var(--font-cond); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: 0.01em; white-space: nowrap; }
.figure.xl { font-size: 64px; }
.figure.md { font-size: 28px; }
.mark { background: linear-gradient(transparent 52%, var(--hi) 52%, var(--hi) 90%, transparent 90%); padding: 0 4px; margin: 0 -4px; }
.figure-label { font-size: 15px; color: var(--steel); margin-top: 6px; }

.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ledger > div { padding: var(--s4) var(--s4) var(--s4) 0; }
.ledger > div + div { border-left: 1px solid var(--rule); padding-left: var(--s4); }
.ledger .figure { font-size: 28px; }
.ledger .bad { color: var(--bad); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
th { font-size: 14px; font-weight: 600; color: var(--steel); border-bottom: 1px solid var(--ink); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--wash); }
tr.section td { background: var(--wash); font-weight: 600; font-size: 15px; }
tr.total td { border-top: 1px solid var(--ink); font-weight: 600; }
td.desc { min-width: 220px; max-width: 520px; }
.row-link { text-decoration: none; font-weight: 600; }
.row-link:hover { text-decoration: underline; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.tone-neutral { background: var(--wash); color: var(--steel); border-color: var(--rule); }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-warn { background: var(--hi-soft); color: var(--warn); }
.tone-good { background: var(--good-soft); color: var(--good); }
.tone-bad { background: var(--bad-soft); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; line-height: 1; padding: 11px 16px; border-radius: var(--r-btn); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--wash); color: var(--ink); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); color: #fff; }
.btn-quiet { border-color: var(--rule); }
.btn-danger { border-color: #E3B3A8; color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-sm { padding: 7px 11px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-wa { border-color: #1C8B4B; color: #1C6B3B; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
form.inline { display: inline; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: 15px; }
.hint { font-size: 14px; color: var(--steel); margin: 0; }
.error-text { font-size: 14px; color: var(--bad); font-weight: 500; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="tel"], input[type="search"], input:not([type]), select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1px solid #B9C0C8; border-radius: var(--r-input); padding: 9px 11px; width: 100%; min-width: 0;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(44, 90, 160, 0.35); outline-offset: 0; border-color: var(--focus); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-family: var(--font-cond); font-weight: 700; font-size: 21px; padding: 0; margin-bottom: var(--s3); }
.fieldset + .fieldset { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--rule); }
.form-actions { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s5); flex-wrap: wrap; }
.input-affix { display: flex; align-items: stretch; }
.input-affix span { display: grid; place-items: center; padding: 0 10px; border: 1px solid #B9C0C8; background: var(--wash); color: var(--steel); font-size: 15px; }
.input-affix span:first-child { border-right: 0; border-radius: var(--r-input) 0 0 var(--r-input); }
.input-affix span:last-child { border-left: 0; border-radius: 0 var(--r-input) var(--r-input) 0; }
.input-affix input { border-radius: 0; }
.input-affix input:first-child { border-radius: var(--r-input) 0 0 var(--r-input); }
.input-affix input:last-child { border-radius: 0 var(--r-input) var(--r-input) 0; }

details.drawer { border-top: 1px solid var(--rule); margin-top: var(--s4); padding-top: var(--s3); }
details.drawer > summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
details.drawer > summary::-webkit-details-marker { display: none; }
details.drawer > summary::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--ink); border-radius: 4px; font-weight: 700; line-height: 1; }
details.drawer[open] > summary::before { content: '\2212'; }
details.drawer > div { padding-top: var(--s4); }

/* ---------- Flash / notices ---------- */
.flash { border-radius: var(--r-panel); padding: 12px 16px; margin-bottom: var(--s4); border: 1px solid; font-weight: 500; display: flex; gap: var(--s3); align-items: flex-start; }
.flash-success { background: var(--good-soft); border-color: #B7D9C3; color: #145536; }
.flash-error { background: var(--bad-soft); border-color: #EBC1B7; color: #8E2414; }
.flash-info { background: var(--info-soft); border-color: #C3D2EA; color: #1F4278; }
.notice { border-left: 4px solid var(--hi); background: var(--hi-soft); padding: 12px 16px; border-radius: 0 var(--r-panel) var(--r-panel) 0; }
.notice.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.notice.good { border-left-color: var(--good); background: var(--good-soft); }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice ul { margin: 6px 0; padding-left: 20px; }

.empty { text-align: left; padding: var(--s6) var(--s5); border: 1px dashed var(--rule); border-radius: var(--r-panel); background: var(--paper); }
.empty h2 { margin-bottom: var(--s2); }

/* ---------- The claim tape: the dimension line of a valuation ---------- */
.tape { margin: var(--s2) 0 var(--s4); }
.tape-dim { position: relative; height: 26px; margin-bottom: 4px; }
.tape-dim::before { content: ''; position: absolute; left: 0; right: 0; top: 12px; border-top: 1px solid var(--ink); }
.tape-dim::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 13px; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.tape-dim span { position: relative; z-index: 1; display: table; margin: 0 auto; background: var(--paper); padding: 0 10px; font-weight: 600; font-size: 15px; line-height: 26px; }
.tape-bar { display: flex; height: 44px; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--wash); position: relative; }
.tape-bar::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 9px; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(22, 35, 63, 0.55) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, rgba(22, 35, 63, 0.8) 0 1px, transparent 1px 50px);
  background-size: auto 5px, auto 9px; background-repeat: repeat-x; }
.seg { min-width: 0; flex-basis: 0; }
.seg + .seg { border-left: 1px solid var(--ink); }
.seg-prev { background: #C9D1DB; }
.seg-ret { background: repeating-linear-gradient(135deg, #fff 0 5px, #9AA6B5 5px 6px); }
.seg-contra { background: #E4A79A; }
.seg-due { background: var(--hi); }
.tape-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3) var(--s4); margin-top: var(--s3); }
.tape-legend div { display: grid; grid-template-columns: 14px 1fr; gap: 2px 8px; align-items: center; }
.tape-legend i { width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: 2px; grid-row: span 2; align-self: start; margin-top: 3px; }
.tape-legend b { font-weight: 600; font-size: 15px; }
.tape-legend span { color: var(--steel); font-size: 14px; }

/* ---------- Valuation summary ---------- */
.summary { width: 100%; }
.summary td { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.summary td:last-child { text-align: right; white-space: nowrap; padding-left: var(--s3); }
.summary tr.sub td { font-weight: 600; border-bottom-color: var(--rule); }
.summary tr.less td:first-child { padding-left: 14px; color: var(--steel); }
.summary tr.grand td { border-bottom: 0; padding-top: var(--s3); }
.summary tr.grand td:first-child { font-family: var(--font-cond); font-weight: 700; font-size: 20px; }

/* ---------- Claim editor ---------- */
.claim-table input { width: 92px; text-align: right; padding: 7px 8px; font-size: 15px; }
.claim-table td { vertical-align: middle; }
.claim-table td.desc { font-size: 15px; }
.claim-table .item-no { font-size: 14px; color: var(--steel); white-space: nowrap; }
.claim-table tr.changed td { background: var(--hi-soft); }
.claim-table .warn { color: var(--bad); font-size: 13px; font-weight: 600; display: block; }
.pct-bar { height: 4px; background: var(--rule-soft); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.pct-bar span { display: block; height: 100%; background: var(--ink); }
.sticky-bar { position: sticky; bottom: 0; z-index: 4; background: var(--paper); border-top: 1px solid var(--ink); box-shadow: 0 -6px 16px rgba(22, 35, 63, 0.08); }
.sticky-bar-inner { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.sticky-bar .figure { font-size: 30px; }
.toolbar { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-bottom: var(--s3); }
.toolbar input[type="search"] { max-width: 280px; }
.unsaved { color: var(--warn); font-weight: 600; font-size: 14px; }

/* ---------- Timeline (audit trail) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--s3) 20px; font-size: 15px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; border-left: 1px solid var(--rule); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--steel); font-size: 13px; display: block; }

/* ---------- Steps (workflow) ---------- */
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 var(--s5); border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--paper); overflow-x: auto; }
.steps li { flex: 1; padding: 12px 16px; font-size: 14px; color: var(--steel); white-space: nowrap; border-right: 1px solid var(--rule-soft); }
.steps li:last-child { border-right: 0; }
.steps li b { display: block; font-size: 15px; color: var(--steel); }
.steps li.done b { color: var(--ink); }
.steps li.done b::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good); margin-right: 7px; vertical-align: 1px; }
.steps li.now { background: var(--hi-soft); }
.steps li.now b { color: var(--ink); }

/* ---------- Chart ---------- */
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s3); align-items: end; height: 190px; border-bottom: 1px solid var(--ink); padding: 0 var(--s2); }
.bars .month { display: flex; gap: 3px; align-items: flex-end; height: 100%; justify-content: center; }
.bars .bar { width: 14px; border-radius: 2px 2px 0 0; min-height: 1px; }
.bar.claimed { background: var(--paper); border: 1px solid var(--ink); border-bottom: 0; }
.bar.certified { background: var(--ink); }
.bar.paid { background: var(--good); }
.bar-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s3); padding: 6px var(--s2) 0; font-size: 13px; color: var(--steel); text-align: center; }
.key { display: flex; gap: var(--s4); font-size: 14px; color: var(--steel); flex-wrap: wrap; }
.key i { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; border-radius: 2px; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--rule-soft); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ink); }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: var(--s3); padding: 11px 0; border-bottom: 1px solid var(--rule-soft); align-items: center; }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; }
.kv dt { color: var(--steel); }
.kv dd { margin: 0; font-weight: 500; }

/* ---------- Photos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.photos figure { margin: 0; border: 1px solid var(--rule); border-radius: var(--r-input); overflow: hidden; background: var(--wash); }
.photos img { display: block; width: 100%; height: 120px; object-fit: cover; }
.photos figcaption { font-size: 13px; padding: 6px 8px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }

/* ---------- Messages ---------- */
.msg { border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 12px 14px; margin-bottom: var(--s3); background: var(--paper); }
.msg.client { border-left: 4px solid var(--hi); }
.msg .meta { font-size: 13px; color: var(--steel); margin-bottom: 4px; }

/* ---------- Auth & public ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-side { background: var(--ink); color: #fff; padding: var(--s7); display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { color: #fff; }
.auth-side p { color: #C9D1DB; font-size: 18px; max-width: 34ch; }
.auth-form { display: grid; place-items: center; padding: var(--s6) var(--s5); }
.auth-form .card { width: 100%; max-width: 420px; }
.auth-form h1 { margin-bottom: var(--s2); }
.auth-form .field + .field { margin-top: var(--s4); }
.auth-quote { border-left: 3px solid var(--hi); padding-left: var(--s4); }
.auth-quote .figure { color: #fff; }
.under { display: inline-block; border-bottom: 6px solid var(--hi); padding-bottom: 6px; }

.pub-head { max-width: var(--wrap); margin: 0 auto; padding: var(--s4) var(--s5); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); }
.pub-head nav { display: flex; gap: var(--s4); align-items: center; }
.pub-head nav a:not(.btn) { text-decoration: none; color: var(--steel); font-weight: 500; }
.hero { max-width: var(--wrap); margin: 0 auto; padding: var(--s7) var(--s5) var(--s8); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s7); align-items: center; }
.hero h1 { font-size: 64px; line-height: 0.98; letter-spacing: -0.005em; margin-bottom: var(--s4); }
.hero .lede { font-size: 20px; color: var(--steel); max-width: 40ch; }
.hero-sheet { background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r-panel); padding: var(--s5); box-shadow: 10px 10px 0 var(--ink); }
.hero-sheet .sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--ink); padding-bottom: var(--s3); margin-bottom: var(--s3); gap: var(--s3); }
.hero-sheet .sheet-head h2 { font-size: 26px; }
.section { max-width: var(--wrap); margin: 0 auto; padding: var(--s7) var(--s5); }
.section h2 { font-size: 40px; margin-bottom: var(--s4); max-width: 22ch; }
.rows { border-top: 1px solid var(--ink); }
.rows > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: var(--s5); padding: var(--s5) 0; border-bottom: 1px solid var(--rule); }
.rows h3 { font-size: 24px; }
.rows p { color: var(--steel); margin: 0; font-size: 17px; }
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); max-width: 860px; }
.price { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s5); }
.price.featured { border-color: var(--ink); }
.price ul { padding-left: 18px; color: var(--steel); }
.price li { margin-bottom: 6px; }
.footer { border-top: 1px solid var(--rule); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: var(--s5); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; font-size: 14px; color: var(--steel); }
.footer a { color: var(--steel); }
.prose { max-width: 72ch; }
.prose h2 { margin: var(--s6) 0 var(--s3); }
.prose li { margin-bottom: 6px; }

/* ---------- Portal ---------- */
.portal-head { background: var(--paper); border-bottom: 1px solid var(--rule); }
.portal-head .inner { max-width: 980px; margin: 0 auto; padding: var(--s4) var(--s5); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.portal-main { max-width: 980px; }
.logo-img { max-height: 48px; max-width: 180px; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-main, .grid-2 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: var(--s5); }
  .hero h1 { font-size: 46px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: var(--s5); min-height: auto; }
  .auth-side .auth-quote { display: none; }
  .rows > div { grid-template-columns: 1fr; gap: var(--s2); }
}
@media (max-width: 720px) {
  main { padding: var(--s5) var(--s4) var(--s8); }
  .topbar-inner { padding: 0 var(--s4); gap: var(--s3); flex-wrap: wrap; }
  .nav { order: 3; flex-basis: 100%; margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s2); border-top: 1px solid var(--rule-soft); }
  .nav a { padding: 12px 10px; }
  .who .who-name { display: none; }
  h1 { font-size: 28px; }
  .figure.xl { font-size: 46px; }
  .form-grid, .form-grid-3, .grid-3, .prices { grid-template-columns: 1fr; }
  .panel { padding: var(--s4); }
  .ledger > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .ledger > div { padding-right: 0; }
  .section h2 { font-size: 32px; }
  .sticky-bar .figure { font-size: 24px; }
  .claim-table input { width: 76px; }
  .sticky-bar-inner { padding: 8px var(--s4); gap: var(--s2); flex-wrap: nowrap; }
  .sticky-bar .figure-label { display: none; }
  .sticky-bar .btn { padding: 10px 12px; }
  .sticky-bar .check span { font-size: 13px; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
  .topbar, .sticky-bar, .actions, .banner, form button, details.drawer { display: none !important; }
  body { background: #fff; }
  .panel { border: 0; padding: 0; }
}

/* ---------- Support chat ---------- */
.chat-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; padding: 11px 18px 11px 14px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 6px 18px rgba(22, 35, 63, 0.22); }
.chat-launcher:hover { background: var(--ink-2); }
.chat-launcher-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.3); }
.chat-launcher[aria-expanded="true"] { display: none; }
body:has(.sticky-bar) .chat-launcher { bottom: 104px; }
.chat-panel { position: fixed; right: 20px; bottom: 20px; z-index: 21; width: min(380px, calc(100vw - 24px)); height: min(580px, calc(100vh - 96px)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r-panel); box-shadow: 0 14px 40px rgba(22, 35, 63, 0.25); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); padding: 12px var(--s4); background: var(--ink); color: #fff; }
.chat-head strong { display: block; font-family: var(--font-cond); font-size: 20px; font-weight: 700; line-height: 1.1; }
.chat-sub { display: block; font-size: 12px; color: #C9D1DE; margin-top: 2px; }
.chat-close { font: inherit; font-size: 26px; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; padding: 0 4px; }
.chat-log { flex: 1; overflow-y: auto; padding: var(--s4); display: flex; flex-direction: column; gap: 10px; background: var(--wash); }
.chat-bubble { max-width: 88%; padding: 9px 12px; border-radius: 10px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--rule); }
.chat-mine { align-self: flex-end; background: var(--ink); color: #fff; white-space: pre-wrap; }
.chat-handover { align-self: flex-start; display: flex; gap: 8px; flex-wrap: wrap; }
.chat-dots { display: inline-flex; gap: 4px; }
.chat-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--steel); animation: chat-dot 1s infinite ease-in-out; }
.chat-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-dots i { animation: none; } }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px var(--s4) 0; background: var(--wash); }
.chat-suggestions:empty { display: none; }
.chat-chip { font: inherit; font-size: 13.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; }
.chat-chip:hover { border-color: var(--ink); }
.chat-escalate { display: flex; justify-content: space-between; gap: var(--s3); padding: 8px var(--s4); font-size: 13px; background: var(--wash); border-bottom: 1px solid var(--rule); }
.chat-escalate-link { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-input { display: flex; gap: var(--s2); padding: var(--s3) var(--s4); }
.chat-input input { flex: 1; min-width: 0; }
@media (max-width: 600px) {
  .chat-launcher { right: 12px; bottom: 12px; }
  body:has(.sticky-bar) .chat-launcher { bottom: 84px; }
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}
@media print { .chat { display: none; } }

/* ---------- Support page ---------- */
.support-page { max-width: 900px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s8); }
main .support-page { padding: 0; }
.support-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.support-routes h2 { font-size: 20px; margin-bottom: 6px; }
.support-routes p:last-child { margin-bottom: 0; }
.support-tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--steel); margin-bottom: 4px; }
@media (max-width: 760px) { .support-routes { grid-template-columns: 1fr; } }

/* ---------- Client portal: paying a claim ---------- */
.pay-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s5); margin-top: var(--s4); }
.pay-option h3 { margin-bottom: 8px; }
ul.plain { list-style: none; padding: 0; margin: 6px 0 0; }
ul.plain li { padding: 2px 0; }
