/* Harborview Residences — shared styles. System fonts, no external assets. */
:root {
  /* type: 13 / 14 / 16 / 18 / 22 / 28 / 36 */
  --fs-xs: .8125rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem;
  --lh: 1.5; --lh-tight: 1.2;
  --fw-reg: 400; --fw-med: 500; --fw-semi: 600; --fw-bold: 700;
  /* space: 4-pt scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* shape */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --page: 1120px;                       /* content + header + footer width */
  --tap: 44px;                          /* phone touch target */

  /* palette (light): green = allowed, amber = asks you, red = refused, blue = you can act */
  --bg: #f7f8fa; --surface: #ffffff; --surface-2: #f1f3f6;
  --text: #111827; --muted: #5b6472;
  --border: #e3e6eb; --border-strong: #8a94a3;
  --accent: #0b5fa5; --accent-ink: #ffffff; --accent-soft: #e8f0fa;
  --allow: #146c43; --allow-bg: #e7f4ec;
  --ask:   #8a5300; --ask-bg:   #fcf1da;
  --deny:  #b42318; --deny-bg:  #fdecea;
  --focus: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a; --surface: #161c24; --surface-2: #1d2530;
    --text: #e7ecf2; --muted: #9aa6b5;
    --border: #2a3441; --border-strong: #5b6878;
    --accent: #6aa8ee; --accent-ink: #0b1420; --accent-soft: #16263a;
    --allow: #5fd39a; --allow-bg: #10291d;
    --ask:   #f2c063; --ask-bg:   #2f240c;
    --deny:  #ff8a80; --deny-bg:  #34161a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--fs-md)/var(--lh) system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0 0 .5em; }
h1 { font-size: clamp(var(--fs-2xl), 3vw, var(--fs-3xl)); font-weight: var(--fw-bold); letter-spacing: -.015em; }
h2 { font-size: var(--fs-xl); font-weight: var(--fw-semi); }
h3 { font-size: var(--fs-lg); font-weight: var(--fw-semi); }
h4 { font-size: var(--fs-sm); font-weight: var(--fw-semi); }
p { margin: 0 0 1em; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: var(--r-sm); word-break: break-word; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s3); overflow-x: auto; margin: 0 0 1em; white-space: pre-wrap; word-break: break-all; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.amt, .kpi .big, .timer, td.num, .dev-amount, .try-code, .wt-codeval { font-variant-numeric: tabular-nums; }

/* One motion switch for every animation on the site. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.container { width: 100%; max-width: var(--page); margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); }
/* Wide pages set --page so the header, main and footer line up. */
body[data-page="walkthrough"], body[data-page="bank-lab"], body[data-page="demo"] { --page: 1360px; }

/* Header / footer */
.hv-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.hv-header .bar { max-width: var(--page); min-height: 56px; margin: 0 auto; padding: 0 var(--s4); display: flex; align-items: center; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: var(--fw-semi); color: var(--text); text-decoration: none; font-size: var(--fs-md); white-space: nowrap; }
.brand .logo { width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: var(--fs-xs); }
.demo-tag { font-size: var(--fs-xs); color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0 var(--s2); margin-left: calc(var(--s2) - var(--s4)); }
.btn.nav-toggle { margin-left: auto; display: none; }
.hv-nav { display: flex; gap: var(--s1); flex-wrap: wrap; align-items: center; margin-left: auto; align-self: stretch; }
.hv-nav a { position: relative; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; padding: 0 var(--s3); font-size: var(--fs-sm); font-weight: var(--fw-med); }
.hv-nav a:hover { color: var(--text); }
.hv-nav a[aria-current="page"] { color: var(--text); }
.hv-nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: -1px; height: 2px; background: var(--accent); }
.hv-footer { border-top: 1px solid var(--border); background: var(--surface); }
.hv-footer .inner { max-width: var(--page); margin: 0 auto; padding: var(--s5) var(--s4); display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); font-size: var(--fs-sm); }
.hv-footer h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hv-footer ul { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.hv-footer li { margin: var(--s1) 0; }
.hv-footer p { margin: var(--s2) 0 0; }
@media (max-width: 860px) {
  .btn.nav-toggle { display: inline-flex; }
  .hv-header .bar { flex-wrap: wrap; }
  .hv-nav { display: none; width: 100%; margin: 0; flex-direction: column; align-items: stretch; padding-bottom: var(--s2); }
  .hv-nav.open { display: flex; }
  .hv-nav a { min-height: var(--tap); }
  .hv-nav a[aria-current="page"]::after { left: 0; right: auto; top: var(--s2); bottom: var(--s2); width: 2px; height: auto; }
}

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semi); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn.danger { background: transparent; color: var(--deny); border-color: currentColor; }
.btn.ok { background: var(--allow-bg); color: var(--allow); border-color: var(--allow); }
.btn.sm { min-height: 32px; padding: 0 var(--s3); }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: var(--fs-md); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: var(--fw-semi); font-size: var(--fs-sm); margin-bottom: var(--s1); }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-reg); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.pin-input::placeholder, .code-input::placeholder { letter-spacing: normal; }
textarea { min-height: 110px; resize: vertical; }
input:disabled, select:disabled { opacity: .6; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); margin-right: 8px; vertical-align: -3px; }
.check { display: flex; align-items: flex-start; gap: 4px; font-weight: 400; margin-bottom: 8px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: var(--fw-semi); font-size: var(--fs-sm); padding: 0; margin-bottom: var(--s1); }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pin-input { letter-spacing: .4em; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; text-align: center; }

/* Cards, grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); box-shadow: none; min-width: 0; }
.card.flat { box-shadow: none; }
.card h2, .card h3 { margin-bottom: .4em; }
.card h2 { font-size: var(--fs-lg); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.page-head { margin-bottom: var(--s6); }
.page-head p { color: var(--muted); font-size: var(--fs-lg); max-width: 60ch; }
.eyebrow { font-size: var(--fs-sm); font-weight: var(--fw-med); color: var(--muted); margin-bottom: var(--s1); }

/* Hero */
.hero { padding: 32px 0 24px; display: grid; gap: 28px; grid-template-columns: 1.2fr .8fr; align-items: center; }
.hero p.lead { font-size: var(--fs-lg); color: var(--muted); max-width: 60ch; }
.hero-art { padding: 0 0 0 var(--s5); border-left: 1px solid var(--border-strong); }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }

/* Badges & chips: the tier badge is neutral (its glyph carries the risk); only decisions get colour. */
.tier { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: var(--fw-semi); padding: 0 var(--s2); border-radius: var(--r-pill); border: 1px solid var(--border-strong); color: var(--text); background: transparent; white-space: nowrap; vertical-align: middle; }
.tier .glyph { font-size: .7em; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: var(--fw-semi); padding: 2px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.chip-allow { color: var(--allow); background: var(--allow-bg); }
.chip-deny { color: var(--deny); background: var(--deny-bg); }
.chip-require_approval, .chip-pending, .chip-exposed { color: var(--ask); background: var(--ask-bg); }
.chip-neutral { color: var(--muted); background: var(--surface-2); }
.tag { display: inline-block; font-size: var(--fs-xs); padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); margin: 0 4px 4px 0; }

/* Alerts: tint only; info is not a decision so it stays neutral. */
.alert { border-radius: var(--r-md); padding: var(--s3) 14px; margin: 0 0 14px; font-size: var(--fs-sm); }
.alert.info { color: var(--text); background: var(--surface-2); }
.alert.ok { color: var(--allow); background: var(--allow-bg); }
.alert.error { color: var(--deny); background: var(--deny-bg); }
.alert.warn { color: var(--ask); background: var(--ask-bg); }
.alert strong:first-child { margin-right: 4px; }
.alert a { color: inherit; font-weight: var(--fw-bold); }
.hv-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; z-index: 80; padding: 16px; }
.hv-modal .card { max-height: 90vh; overflow: auto; }
.toast-host { position: fixed; bottom: 16px; left: 16px; right: 16px; display: grid; gap: 8px; justify-items: center; z-index: 60; pointer-events: none; }
.toast { pointer-events: auto; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--r-md); max-width: 480px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: left; padding: var(--s3); border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: transparent; border-bottom-color: var(--border-strong); }
tbody th { font-size: var(--fs-sm); font-weight: var(--fw-med); color: var(--text); }
tr:last-child td, tr:last-child th { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.yes { color: var(--allow); font-weight: var(--fw-bold); }
.no { color: var(--deny); font-weight: var(--fw-bold); }
.cond { color: var(--ask); font-weight: var(--fw-bold); }

/* Properties */
.prop-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.prop-img { aspect-ratio: 16/9; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); font-size: 2rem; }
.prop-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-size: 1.25rem; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 20px; }
.filters .field { margin: 0; min-width: 150px; flex: 1; }

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot input { position: absolute; opacity: 0; }
.slot label { margin: 0; display: block; text-align: center; padding: 10px 8px; border: 1px solid var(--border-strong); border-radius: var(--r-md); cursor: pointer; background: var(--surface); font-weight: var(--fw-semi); font-size: var(--fs-sm); }
.slot input:checked + label { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.slot input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.slot input:disabled + label { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

/* Accordion */
details.acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); margin-bottom: 8px; }
details.acc summary { cursor: pointer; padding: 12px 16px; font-weight: var(--fw-semi); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); }
details.acc[open] summary::after { content: "−"; }
details.acc .body { padding: 0 16px 14px; color: var(--text); }
mark { background: var(--ask-bg); color: var(--ask); padding: 0 2px; border-radius: 3px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.pill { min-height: 36px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--r-pill); padding: 0 14px; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-med); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Decision object: a tint or a left rule, never both a box and a fill. */
.decision { border-left: 4px solid var(--border-strong); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); }
.decision.d-allow { border-left-color: var(--allow); }
.decision.d-deny { border-left-color: var(--deny); }
.decision.d-require_approval { border-left-color: var(--ask); }
.decision .head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.sets { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 10px; align-items: stretch; }
.set { border-top: 1px solid var(--border); padding: var(--s2) 0; min-width: 0; }
.set h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.set.result { border-top: 2px solid var(--accent); }
.set.result.empty { border-top-color: var(--deny); }
.set .item { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-xs); padding: 1px 7px; margin: 0 4px 4px 0; border-radius: var(--r-sm); background: var(--surface-2); word-break: break-all; }
.set .item.hit { color: var(--accent); font-weight: var(--fw-bold); }
.set .none { color: var(--muted); font-size: var(--fs-xs); font-style: italic; }
.op { font-weight: 700; color: var(--muted); display: none; }

/* KPI, console */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; min-width: 0; }
.kpi h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.kpi .big { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bars .bar-row { display: grid; grid-template-columns: 90px 1fr 36px; gap: 8px; align-items: center; font-size: .82rem; margin: 4px 0; }
.bars .track { background: var(--surface-2); border-radius: 6px; height: 10px; overflow: hidden; }
.bars .fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.bars .fill.allow { background: var(--allow); } .bars .fill.deny { background: var(--deny); } .bars .fill.require_approval { background: var(--ask); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.feed li { padding: 8px 4px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: .88rem; }
.feed li:last-child { border-bottom: 0; }
.feed .t { color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; }
.integrity { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.integrity.ok { color: var(--allow); background: var(--allow-bg); }
.integrity.bad { color: var(--deny); background: var(--deny-bg); }
.integrity.unk { color: var(--muted); background: var(--surface-2); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--allow); margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Approvals */
.split { display: grid; gap: 20px; grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.oplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.oplist a { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; }
.oplist a:hover { background: var(--surface-2); }
.oplist a[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.kv { display: grid; grid-template-columns: minmax(110px, 170px) 1fr; gap: 6px 14px; margin: 0 0 14px; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; min-width: 0; }
.execbox { border: 2px solid var(--text); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface); }
.execbox h3 { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); }
.execbox .what { font-size: 1.25rem; font-weight: 700; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.timer.low { color: var(--deny); }

/* Phone frame: a bezel on a laptop, no frame on a real phone. */
.phone-stage { display: grid; place-items: center; padding: 8px 0 24px; }
.phone { width: min(100%, 340px); background: #0b0f14; border-radius: 40px; padding: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); border: 2px solid #2a3442; }
.phone .notch { width: 110px; height: 22px; background: #0b0f14; border-radius: 0 0 14px 14px; margin: -2px auto 0; position: relative; z-index: 2; }
.phone .screen { background: var(--bg); color: var(--text); border-radius: 28px; margin-top: -18px; padding: 34px 16px 18px; min-height: 0; }
.phone .screen h2 { font-size: var(--fs-md); text-align: center; margin: 0 0 4px; }
.phone .screen .sub { text-align: center; color: var(--muted); font-size: var(--fs-xs); margin-bottom: 14px; }
.dev-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; margin-bottom: 12px; color: var(--text); }
.dev-code { font: 700 2rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; text-align: center; padding: 10px 0 6px; color: var(--accent); }
.dev-card .summary { font-size: var(--fs-sm); }
.dev-bar { height: 5px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.dev-bar > i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
@media (max-width: 480px) {
  .phone { background: none; border: 0; padding: 0; box-shadow: none; border-radius: 0; width: 100%; }
  .phone .notch { display: none; }
  .phone .screen { padding: 0; border-radius: 0; margin: 0; }
  body[data-page="device"] .page-head { display: none; }
}

/* Timeline (demo) */
.scn { display: flex; flex-direction: column; gap: 8px; }
.scn .meta { font-size: .85rem; color: var(--muted); }
.scn .exp { font-size: .88rem; }
.scn-id { font: 700 .8rem ui-monospace, Menlo, Consolas, monospace; color: var(--muted); }
.timeline { position: relative; display: grid; gap: 10px; margin: 16px 0; }
.step { display: grid; grid-template-columns: 90px 1fr; gap: 12px; animation: slidein .35s ease both; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lane { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: center; padding: 6px 4px; border-radius: 8px; align-self: start; }
.lane-agent { background: var(--accent-soft); color: var(--accent); }
.lane-human { background: var(--allow-bg); color: var(--allow); }
.lane-system { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.step .bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.step .bubble .act { font-weight: 700; word-break: break-word; }
.verdict { padding: 12px 16px; border-radius: var(--r-md); border-left: 4px solid currentColor; font-weight: var(--fw-bold); }
.verdict.pass { color: var(--allow); background: var(--allow-bg); }
.verdict.fail { color: var(--deny); background: var(--deny-bg); }
.pf { font-weight: 700; font-size: .85rem; }
.pf.pass { color: var(--allow); } .pf.fail { color: var(--deny); }
@media (max-width: 480px) { .step { grid-template-columns: 1fr; gap: 4px; } .lane { text-align: left; padding: 3px 8px; } .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; } }

/* Board markdown */
.md { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; min-width: 0; overflow-wrap: anywhere; }
.md h1 { font-size: 1.8rem; } .md h2 { margin-top: 1.4em; } .md img { height: auto; }
.md table { display: block; overflow-x: auto; }
.md blockquote { margin: 0 0 1em; padding: 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.token-box { display: flex; gap: 8px; align-items: stretch; }
.token-box pre { flex: 1; margin: 0; min-width: 0; }

/* Guided demo: presenter layout. Scenario list on the left, a sticky live timeline on the right. */
.demo-bar { margin-bottom: var(--s5); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); scroll-margin-top: 72px; }
.demo-links { gap: var(--s4); }
.demo-bar select { width: auto; }
.demo-split { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; align-items: start; }
.scn-list { display: grid; gap: 12px; }
.scn-list .scn { padding: 14px 16px; transition: box-shadow .2s, border-color .2s; }
.scn.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.stage-panel { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.stage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.stage-head h2 { margin: 0; font-size: 1.15rem; }
#stage { overflow-y: auto; padding: 16px 18px; flex: 1; min-height: 240px; scroll-behavior: smooth; }
#stage > .card { box-shadow: none; }
.step.now .bubble { border-color: var(--accent); }
@media (max-width: 980px) {
  .demo-split { grid-template-columns: 1fr; }
  .stage-panel { position: static; max-height: none; }
  #stage { overflow: visible; }
}

/* Policy panel (AAD-ADR-003): compact so the list and the timeline still fit side by side at 1366x768. */
.demo-left { display: grid; gap: 12px; min-width: 0; }
.policy { padding: 10px 14px; }
.policy summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.policy summary::-webkit-details-marker { display: none; }
.policy summary h2 { margin: 0; font-size: 1.05rem; }
.policy summary::after { content: "−"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.policy:not([open]) summary::after { content: "+"; }
.policy summary > span { flex: 1; text-align: right; }
.warn-text { color: var(--ask); font-weight: 700; }
.seg { display: flex; margin: 8px 0 6px; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; }
.seg-btn { flex: 1; min-height: 36px; padding: 4px 6px; border: 0; border-right: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semi); cursor: pointer; white-space: nowrap; }
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: var(--surface-2); }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg-btn[disabled] { opacity: .55; cursor: not-allowed; }
.policy-note { margin: 0 0 6px; color: var(--muted); }
.policy-note.warn { color: var(--ask); font-weight: var(--fw-semi); }
.pending-banner { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; justify-content: space-between; margin: 0 0 var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--ask); border-radius: var(--r-md); background: var(--ask-bg); color: var(--text); font-size: var(--fs-sm); }
.pending-banner[hidden] { display: none; }
/* A held payment (AAD-105): the chip with its countdown and Cancel, and the lists that carry it. */
.hold-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin-top: var(--s1); padding: var(--s1) var(--s3); border: 1px solid var(--ask); border-radius: var(--r-md); background: var(--ask-bg); color: var(--text); font-size: var(--fs-sm); }
.hold-chip[data-status="executed"] { border-color: var(--allow); background: var(--allow-bg); }
.hold-chip[data-status="cancelled"], .hold-chip[data-status="expired"] { border-color: var(--border); background: var(--surface-2); }
.hold-count { font-variant-numeric: tabular-nums; }
.hold-list { list-style: none; margin: 0; padding: 0; }
.hold-row { margin: 0 0 var(--s3); }
.dev-card.hold-row { border-left: 4px solid var(--ask); }
.pending-chip { display: inline-block; margin-left: var(--s2); padding: 1px 8px; border-radius: var(--r-pill); background: var(--ask-bg); color: var(--ask); font-size: var(--fs-xs); font-weight: var(--fw-semi); }
.knob.pending { border-left-color: var(--accent); }
.pending-row { margin: 0 0 var(--s3); padding: var(--s3); border-left: 4px solid var(--ask); }
.pending-lines { margin: var(--s1) 0; padding-left: var(--s5); }
.knobs { display: grid; gap: 4px; }
.knob { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; min-height: 40px; padding: 3px 8px; border-left: 3px solid transparent; }
.knob label { margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-semi); }
.knob .tier { display: none; }
.knob select, .knob input[type=number] { width: 160px; min-height: 36px; padding: 2px 8px; font-size: .85rem; }
.knob .unit { display: none; }
.knob.weak { background: transparent; border-left-color: var(--ask); }
.knob.weak label { color: var(--text); }
.weak-mark { margin-left: 4px; font-size: .7rem; font-weight: 700; color: var(--ask); white-space: nowrap; }
.weak-mark[hidden] { display: none; }
.knob input[aria-invalid="true"] { border-color: var(--deny); }
.exp-base s { opacity: .8; }
.exp-warn { color: var(--ask); font-weight: 600; }
.verdict.exposed { color: var(--ask); background: var(--ask-bg); }
.pf.exposed { color: var(--ask); }
.cmp { border-top: 1px solid var(--border); padding: var(--s4) 0; margin-bottom: var(--s4); }
.cmp h3 { font-size: 1rem; margin-bottom: .3em; }
.cmp table { font-size: .82rem; }
.cmp th, .cmp td { padding: 4px 8px; }
.cmp tr.chg td { background: var(--ask-bg); }
/* The hidden attribute must win over component display rules such as .btn's inline-flex. */
[hidden] { display: none !important; }
.step .bubble .mono { overflow-wrap: anywhere; }

/* Connecting an assistant (/link) and the phone's request cards (/device). */
.link-card { max-width: 520px; margin: 0 auto; padding: var(--s6); }
.link-card ul { margin: 4px 0 12px 1.2em; padding: 0; }
.link-card .code-input { min-height: 56px; font: 700 var(--fs-2xl)/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .25em; text-transform: uppercase; text-align: center; max-width: 12ch; margin-inline: auto; }
.dev-card.req { border-top: 4px solid var(--ask); }
.dev-card.req input.pin-input { width: 100%; min-height: 52px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 8px; }
.dev-card.req .dev-title { font-size: var(--fs-lg); font-weight: var(--fw-semi); line-height: 1.3; }
.dev-card.req .dev-match { font-size: var(--fs-md); margin: 10px 0 4px; }
.dev-card.req .dev-user-code { display: block; font: 700 var(--fs-3xl)/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; color: var(--text); padding: 6px 0; }
.dev-card.req .dev-amount { font-size: var(--fs-2xl); font-weight: var(--fw-bold); margin: 6px 0; }
.dev-card.req .dev-pin-label { display: block; font-weight: var(--fw-semi); margin: 12px 0 4px; }
.dev-card.req input.dev-pin { min-height: 52px; font-size: 1.3rem; letter-spacing: .3em; text-align: center; }
.dev-card.req .dev-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dev-card.req .dev-actions .btn { min-height: 52px; width: 100%; }
.dev-card.req .dev-lens { border: 1px solid var(--border); border-radius: var(--r-lg); margin: 10px 0 0; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dev-card.req .dev-len { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: var(--fs-md); }
.dev-card.req .dev-len input { width: 22px; height: 22px; }
.dev-card.req .dev-err { color: var(--deny); font-weight: var(--fw-semi); margin: 8px 0 0; }
.dev-card.req .dev-approved { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--allow); text-align: center; margin: 10px 0; }
.dev-card.req .dev-fallback { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; font-size: var(--fs-sm); color: var(--muted); }
.dev-card.req .dev-code.secondary { display: inline; font-size: var(--fs-md); padding: 0; letter-spacing: .12em; color: var(--muted); }
#dev-state .alert.ok { background: none; padding: 0; color: var(--allow); font-size: var(--fs-sm); }
#unpair { color: var(--deny); min-height: var(--tap); }
.link-linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.grant-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; margin: 10px 0; }
.grant-card.gone { opacity: .65; }

/* Demo assistant panel on /demo */
.try-it { margin-bottom: 16px; display: grid; gap: 10px; }
.try-code-box { display: grid; gap: 6px; }
.try-code { font-size: 2.2rem; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.try-log { margin: 8px 0 0; padding-left: 20px; }

/* Agent walkthrough (/walkthrough): the agent's chat on the left, what Harborview sees on the right. */
.wt-head-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3) var(--s4); flex-wrap: wrap; }
.wt-head-row h1 { margin: 0; }
.wt-head-row .row { gap: var(--s2) var(--s4); }
.wt-head-row + p { margin: var(--s2) 0 0; }
body[data-page="walkthrough"]:not(.wt-lab) #wt-eyebrow { display: none; }
.wt-steps { display: flex; list-style: none; margin: 0 0 var(--s5); padding: 0; }
.wt-steps li { flex: 0 0 auto; display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-med); }
.wt-steps li + li { flex: 1 1 auto; }
.wt-steps li + li::before { content: ""; flex: 1 1 var(--s4); min-width: var(--s4); height: 1px; background: var(--border); margin: 0 var(--s3); }
.wt-steps .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font-size: var(--fs-xs); font-weight: var(--fw-semi); flex: none; }
.wt-steps li.done { color: var(--allow); }
.wt-steps li.done .n { background: var(--allow-bg); color: var(--allow); }
.wt-steps li.done::after { content: " ✓"; }
.wt-steps li[aria-current="step"] { color: var(--text); font-weight: var(--fw-semi); }
.wt-steps li[aria-current="step"] .n { background: var(--accent); color: var(--accent-ink); }
.wt-steps[hidden] { display: none; }
@media (max-width: 600px) {
  .wt-steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s4); }
  .wt-steps li + li::before { display: none; }
}
/* The assistant (left) stays in view; Harborview (right) flows with the page, so the whole policy panel is readable. */
.wt-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); align-items: start; }
.wt-split .stage-panel { top: 76px; }
.wt-split > .stage-panel:last-child { position: static; max-height: none; overflow: visible; }
@media (max-width: 980px) { .wt-split { grid-template-columns: minmax(0, 1fr); } .wt-split .stage-panel { position: static; max-height: none; } }
.wt-log { overflow-y: auto; padding: var(--s4) 18px; flex: 1; min-height: 320px; max-height: 52vh; display: flex; flex-direction: column; gap: var(--s2); scroll-behavior: smooth; }
@media (max-width: 980px) { .wt-log { min-height: 160px; max-height: none; } }
.wt-msg { max-width: 88%; padding: var(--s2) var(--s3); border-radius: var(--r-lg); background: var(--surface-2); overflow-wrap: anywhere; }
.wt-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.wt-msg p { margin: 0 0 .4em; }
.wt-msg p:last-child { margin: 0; }
.wt-dots span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: wt-blink 1s infinite; }
.wt-dots span:nth-child(2) { animation-delay: .2s; }
.wt-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes wt-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.wt-tool { align-self: flex-start; max-width: 96%; font-size: var(--fs-xs); border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: var(--s1) var(--s3); background: transparent; }
.wt-tool summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wt-tool pre { margin: 6px 0 0; max-height: 200px; overflow: auto; font-size: var(--fs-xs); white-space: pre-wrap; overflow-wrap: anywhere; }
.wt-wait { display: flex; gap: 10px; align-items: center; padding: var(--s2) 18px; border-top: 1px solid var(--border); background: var(--ask-bg); color: var(--ask); font-weight: var(--fw-bold); }
.wt-chips { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) 18px 0; }
.wt-chips:empty { display: none; }
.wt-chips button { font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-med); min-height: 36px; padding: 4px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.wt-chips button[aria-disabled="true"], .wt-chips button:disabled { color: var(--muted); border-style: dashed; opacity: 1; cursor: not-allowed; }
.wt-chips button.next:not([aria-disabled="true"]) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: var(--fw-semi); }
.wt-chips button.again { color: var(--accent); border-color: var(--accent); font-weight: var(--fw-semi); }
.wt-form { display: flex; gap: var(--s2); padding: var(--s3) 18px var(--s4); }
.wt-form input { flex: 1; min-width: 0; min-height: 44px; }
.wt-sys { padding: var(--s4) 18px var(--s5); display: grid; gap: var(--s4); flex: 1; }
/* Cards on the system side: one outlined "now" card, everything else is a quiet hairline group. */
.wt-card { min-width: 0; }
.wt-card h3 { font-size: var(--fs-md); margin: 0 0 .3em; }
.wt-now { border: 2px solid var(--accent); border-radius: var(--r-lg); background: var(--surface); padding: var(--s5); }
.wt-now h3 { font-size: var(--fs-lg); }
.wt-rest { display: grid; gap: 0; }
.wt-rest .wt-card { border-top: 1px solid var(--border); padding: var(--s4) 0; font-size: var(--fs-sm); }
.wt-rest .wt-card h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wt-status { margin: 0; }
.wt-status.weak { color: var(--deny); border-left: 3px solid var(--deny); padding-left: var(--s3); }
.wt-status-line { margin: 0 0 var(--s1); font-size: var(--fs-lg); font-weight: var(--fw-semi); }
.wt-qr { background: #fff; padding: 10px; display: inline-block; border-radius: var(--r-md); max-width: 100%; }
.wt-code-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.wt-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 280px; overflow-y: auto; }
.wt-feed li { display: grid; gap: 2px; padding: var(--s2) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.wt-feed li:last-child { border-bottom: 0; }
.wt-feed .top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wt-feed .top code { font-size: var(--fs-xs); }
.wt-feed .top > span:last-child { margin-left: auto; }
.wt-feed .reason { color: var(--muted); overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wt-big { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.wt-check { color: var(--allow); font-weight: var(--fw-bold); margin: 0 0 6px; }
.wt-nexttext { margin: 0; font-weight: var(--fw-semi); }
.wt-codeval { font-size: 1.5rem; display: inline-block; }
.wt-facts { display: grid; gap: 4px; }
.wt-facts h4 { margin: 8px 0 2px; }
.wt-facts ul { margin: 0; padding-left: 1.2em; }
.wt-num { width: 100%; min-height: 52px; font-size: 1.5rem; }
.wt-length { border: 0; padding: 0; margin: 0 0 12px; }
.wt-length legend { font-weight: var(--fw-bold); padding: 0; margin-bottom: 6px; }
.wt-radio { display: inline-flex; gap: 8px; align-items: center; margin-right: 18px; font-size: 1.2rem; font-weight: var(--fw-bold); min-height: 44px; }
.wt-radio input { width: 22px; height: 22px; }
.wt-approve-form .row { align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 980px) { body[data-page="walkthrough"] main.container { padding-left: 16px; padding-right: 16px; } body[data-page="walkthrough"] { overflow-x: hidden; } }
/* Walkthrough pane headers: a robot for the assistant's side, the Harborview mark for the system's side. */
.wt-h { display: flex; align-items: center; gap: 8px; }
.wt-ico { width: 24px; height: 24px; color: var(--accent); flex: none; }
.wt-logo { width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); flex: none; }

/* Walkthrough: "Approve on your phone", with the laptop PIN + code form folded away (AAD-042). */
.wt-phone-wait { display: flex; align-items: center; gap: 4px; font-weight: var(--fw-semi); margin: 8px 0; }
.wt-fallback { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.wt-fallback > summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); min-height: var(--tap); display: flex; align-items: center; }
.wt-fallback[open] > summary { margin-bottom: 10px; }

/* Policy lab: a mode of /walkthrough (?mode=lab). Free-order chips, a system line when a knob moves, the 13-knob panel in the System view. */
.wt-msg.sys { align-self: center; max-width: 96%; font-size: var(--fs-xs); background: none; color: var(--muted); text-align: center; }
.wt-rule { align-self: flex-start; max-width: 96%; margin: -4px 0 0 10px; font-size: var(--fs-xs); color: var(--muted); }
.wt-lab-head { margin: 0 0 var(--s4); padding: 0 0 var(--s3); border-bottom: 1px solid var(--border); display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.wt-lab-head h2 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-semi); }
.wt-lab-head[hidden] { display: none; }

/* Harborview Bank (fictional) - AAD-059 */
.bank-fiction { color: var(--muted); font-weight: var(--fw-reg); }
.bank-switch { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: var(--s2) 0 var(--s3); border-bottom: 1px solid var(--border); }
.bank-switch label { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.bank-perm .seg, .bank-switch .seg { margin: 0; width: 210px; }
.bank-perm { align-items: center; min-height: 56px; border-bottom: 1px solid var(--border); }
.bank-perm.dim .seg { opacity: .6; }
.bank-perm .weak-mark { color: var(--ask); }
.bank-limits-h { margin: var(--s5) 0 var(--s1); }
.bank-limits .knob input[type=number] { width: 120px; }
#bank-claude-code { display: block; padding: var(--s3); border-radius: var(--r-md); background: var(--surface-2); overflow-x: auto; white-space: nowrap; }
.bank-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); background: var(--surface); border-radius: var(--r-lg); }
.bank-stat.card { border: 0; border-radius: 0; background: none; padding: var(--s4) var(--s5); }
.bank-stat.card + .bank-stat.card { border-left: 1px solid var(--border); }
.bank-stat .amt { font-size: var(--fs-2xl); font-weight: var(--fw-bold); margin: 2px 0; }
.bank-forms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.bank-forms form .field { margin-bottom: 8px; }
.bank-amt-in { color: var(--allow); }
.bank-amt-out { color: var(--text); }
@media (max-width: 600px) { .bank-stat.card + .bank-stat.card { border-left: 0; border-top: 1px solid var(--border); } }

/* Phone-width touch targets. */
@media (max-width: 480px) {
  .btn, .seg-btn, .wt-chips button, .pill, .hv-nav a, .link-linkbtn, summary, .dev-len, input:not([type=checkbox]):not([type=radio]), select { min-height: var(--tap); }
}

/* Bank lab: 16 chips stay (they are the vocabulary), packed tight; one scrolling row at phone width. */
body[data-page="bank-lab"] .wt-chips { gap: var(--s2); }
@media (min-width: 481px) { body[data-page="bank-lab"] .wt-chips button { min-height: 32px; } }
@media (max-width: 480px) {
  body[data-page="bank-lab"] .wt-chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--s2); }
  body[data-page="bank-lab"] .wt-chips button { flex: none; scroll-snap-align: start; }
}

/* Home: the risk tiers as a five-row list (badge | what | who decides). */
.tier-list { display: grid; grid-template-columns: auto 1fr 1fr; }
.tier-list > .card { display: contents; }
.tier-list p { margin: 0; padding: var(--s3); border-bottom: 1px solid var(--border); }
@media (max-width: 600px) {
  .tier-list { grid-template-columns: 1fr; }
  .tier-list > .card { display: block; padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
  .tier-list p { padding: var(--s1) 0; border: 0; }
}

/* Controls register (/settings) */
#reg-settings, #reg-floors, #reg-limits, #reg-you { margin-top: var(--s7); }
#reg-settings { margin-top: 0; }
#reg-settings h2 + p, #reg-floors h2 + p { margin-bottom: var(--s3); }
.reg-group { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin: var(--s5) 0 var(--s2); }
.reg-group h3 { margin: 0; }
tr[data-weakened="true"] th { box-shadow: inset 3px 0 var(--ask); }
tr[data-weakened="true"] .reg-value { color: var(--ask); font-weight: var(--fw-semi); }
.reg-value .chip { margin-left: var(--s2); }
.reg-proofs { font-size: var(--fs-sm); }
.reg-cols { display: grid; gap: 0 var(--s6); }
@media (min-width: 1024px) { .reg-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1023px) { .reg-cols > :last-child thead { display: none; } }
@media (max-width: 600px) {
  #reg-settings table, #reg-floors table, #reg-settings tbody, #reg-floors tbody { display: block; }
  #reg-settings thead, #reg-floors thead { display: none; }
  #reg-settings tr, #reg-floors tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--border); }
  #reg-settings tr > *, #reg-floors tr > * { border-bottom: 0; }
  #reg-settings th[scope=row], #reg-floors th[scope=row], #reg-floors td { grid-column: 1 / -1; }
}
