/* Bidharrier. One stylesheet for the public site, the customer app and the owner dashboard.
   Palette from harrier country: marsh green, reed gold, open sky. Spacing on an 8px scale (8/16/24/32/48/64).
   Sections, in order: tokens and base, layout, header, controls, messages, public pages, screenshots, search,
   notice preview, customer app, review deck, tender page, setup and billing, coverage, articles, footer, owner
   dashboard, narrow screens, print. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-wght-normal.ada540c0e24a.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-wght-normal.e4c9b081863a.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ---------- Tokens and base ---------- */
:root {
  --marsh: #14342b;
  --marsh-2: #1f4a3d;
  --marsh-3: #2f6551;
  --ink: #10221c;
  --ground: #f2f5f0;
  --tint: #e7ede7;
  --surface: #ffffff;
  --reed: #d4a72c;
  --reed-hover: #e2b842;
  --reed-text: #7a5600;
  --reed-wash: #f6ecd0;
  --rust: #b5412a;
  --rust-wash: #f8e3dd;
  --ok: #1c6b45;
  --muted: #56665e;
  --line: #d9e0da;
  --line-2: #b9c5be;
  --on-dark: #cfe0d8;
  --on-dark-2: #a9c2b7;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --max: 1160px;
  --gutter: 24px;
  --measure: 68ch;
  --shadow: 0 1px 2px rgba(16, 34, 28, 0.06), 0 8px 24px rgba(16, 34, 28, 0.06);
  --display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s3); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.55 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--marsh-2); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--reed); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0 0 1em; max-width: var(--measure); }
dl, dd { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.help { font-size: 0.9rem; color: var(--muted); }
.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; }
.skip { position: absolute; left: 0.75rem; top: -4rem; z-index: 50; background: var(--reed); color: var(--ink); font-weight: 650; padding: 0.6rem 1rem; border-radius: 0 0 8px 8px; text-decoration: none; }
.skip:focus { top: 0; outline: 3px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.page { max-width: var(--max); margin: 0 auto; padding: var(--s4) var(--gutter) var(--s6); }
.narrow { max-width: 640px; }
.narrow-wrap { max-width: 820px; }
.section { padding: var(--s6) 0; }
.section + .section { padding-top: 0; }
.section.tinted, .section + .section.tinted { background: var(--tint); padding: var(--s5) 0; }
.section.tinted + .section { padding-top: var(--s5); }
.section h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); font-weight: 700; letter-spacing: -0.015em; max-width: 26ch; margin-bottom: var(--s2); }
.section .intro { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split.even { grid-template-columns: 1fr 1fr; align-items: start; }
.split h2 + p { margin-top: 0; }
.split h2:not(:first-child) { margin-top: var(--s4); }
.page-intro { padding: var(--s5) 0 var(--s4); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-intro h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); font-weight: 740; letter-spacing: -0.025em; line-height: 1.05; max-width: 22ch; }
.page-intro .lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: var(--s2) 0 0; }
.page-intro .crumbs { margin: 0 0 var(--s2); }
.page-intro .search-form { margin-top: var(--s3); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.page-head p { margin: 0.4rem 0 0; }
.crumbs { color: var(--muted); }
.actions { display: flex; gap: var(--s1) 12px; flex-wrap: wrap; align-items: center; }
.lede { font-size: 1.12rem; }

/* ---------- Header ---------- */
.topbar { background: var(--marsh); color: #fff; position: relative; z-index: 30; }
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: var(--s1) var(--s3); min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; font: 700 1.3rem/1 var(--display); letter-spacing: -0.02em; flex: none; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 20px; flex: none; }
.spacer { flex: 1; }
.nav, .site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav { flex: 1; }
.nav a, .site-nav a { color: #d5e2dc; text-decoration: none; padding: 10px 12px; border-radius: var(--radius); font-weight: 500; line-height: 1.2; }
.nav a:hover, .site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav a[aria-current="page"], .site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--reed); border-radius: var(--radius) var(--radius) 0 0; }
.site-nav .nav-extra, .site-nav .nav-cta { display: none; }
.topbar form { margin: 0; }
.topbar .login { color: #d5e2dc; text-decoration: none; padding: 10px 8px; font-weight: 500; }
.topbar .login:hover { color: #fff; text-decoration: underline; }
.linklike { background: none; border: 0; padding: 10px 8px; color: #d5e2dc; font: inherit; cursor: pointer; }
.linklike:hover { color: #fff; text-decoration: underline; }
.menu-button { display: none; font: 600 0.95rem var(--body); color: #fff; background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: var(--radius); padding: 0 14px; min-height: 44px; cursor: pointer; }
.menu-button[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; color: #d5e2dc; padding: 10px 12px; border-radius: var(--radius); font-weight: 500; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; display: inline-block; width: 0.4em; height: 0.4em; margin-left: 0.5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.2em) rotate(45deg); }
.menu > summary:hover, .menu[open] > summary { color: #fff; background: rgba(255, 255, 255, 0.08); }
.menu > summary[aria-current="page"] { color: #fff; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s1); display: grid; }
.menu-panel a, .menu-panel .linklike { display: block; text-align: left; width: 100%; color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 6px; min-height: 44px; }
.menu-panel a:hover, .menu-panel .linklike:hover { background: var(--tint); color: var(--ink); text-decoration: none; }
.menu-panel a[aria-current="page"] { font-weight: 650; }
.menu-panel form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

.notice { background: #fbf3d9; border-bottom: 1px solid #e9d795; }
.notice.warn { background: var(--rust-wash); border-bottom-color: #e3b5aa; }
.notice-inner { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; gap: 6px var(--s2); align-items: center; flex-wrap: wrap; font-size: 0.93rem; }
.notice form { margin: 0; }
.notice a, .notice .linkbtn { font-weight: 600; color: var(--marsh); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Buttons and form controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 44px; font: 600 0.95rem/1.15 var(--body); padding: 10px 18px; border-radius: var(--radius); border: 1.5px solid var(--marsh); background: var(--marsh); color: #fff; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--marsh-2); border-color: var(--marsh-2); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.quiet { background: transparent; color: var(--marsh); }
.btn.quiet:hover { background: rgba(20, 52, 43, 0.07); color: var(--marsh); }
.btn.gold { background: var(--reed); border-color: var(--reed); color: var(--ink); }
.btn.gold:hover { background: var(--reed-hover); border-color: var(--reed-hover); color: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--marsh); }
.btn.ghost:hover { border-color: var(--marsh); background: transparent; color: var(--marsh); }
.btn.danger { background: transparent; border-color: var(--rust); color: var(--rust); }
.btn.danger:hover { background: var(--rust); color: #fff; }
.btn.sm { min-height: 40px; padding: 8px 12px; font-size: 0.88rem; }
.btn.full { width: 100%; }
.topbar .btn.sm { min-height: 40px; white-space: nowrap; }

input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { line-height: 1.45; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--marsh); }
[aria-invalid="true"] { border-color: var(--rust); }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s3); }
.field { margin-bottom: 20px; }
.field > label, .form-group > label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .help, .form-group .help { font-size: 0.875rem; color: var(--muted); margin: 6px 0 0; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--rust); font-weight: 600; font-size: 0.9rem; }
.form > .errorlist { margin: 0 0 var(--s2); }
.field ul:not(.errorlist), .field div[id] { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px var(--s2); }
.field ul label, .field div[id] label { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; min-height: 32px; }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--marsh); flex: none; }
.optional { font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-left: 0.3rem; }
.form-section { font: 650 1.05rem var(--display); margin: var(--s4) 0 var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: var(--s3); flex-wrap: wrap; }
.busy-note { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s3); min-width: 0; }
fieldset > legend { font: 650 1.1rem var(--display); padding: 0; margin-bottom: 12px; }
fieldset.field > legend { font: 600 1rem var(--body); margin-bottom: 6px; }
label.inline { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }
.regions details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; background: var(--surface); }
.regions summary { cursor: pointer; padding: 10px 12px; font-weight: 600; min-height: 44px; }
.regions .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 4px var(--s2); padding: 4px 12px 12px; list-style: none; margin: 0; }
.regions .checks label { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; min-height: 32px; }
details.fine { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 var(--s2); margin-bottom: 20px; background: var(--surface); }
details.fine > summary { cursor: pointer; padding: 12px 0; font-weight: 600; min-height: 44px; }
details.fine[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: var(--s2); }
fieldset.choice label { display: flex; gap: 0.6rem; align-items: baseline; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; font-weight: 400; cursor: pointer; }
fieldset.choice label:has(input:checked) { border-color: var(--marsh); background: #f3f7f3; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin: 0; }
.filters label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.filters .grow { flex: 1 1 240px; }
.filters select { width: auto; min-width: 12rem; }
.preset-pick { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: var(--s3); }
.preset-pick label { display: block; font-weight: 600; flex: 1 1 100%; }
.preset-pick select { flex: 1 1 260px; width: auto; }

/* ---------- Messages and states ---------- */
.flash { background: var(--surface); border-left: 4px solid var(--reed); padding: 12px var(--s2); margin: 0 0 20px; border-radius: 0 var(--radius) var(--radius) 0; max-width: none; }
.nudge { background: var(--reed-wash); border-radius: var(--radius); padding: 10px 14px; font-size: 0.93rem; max-width: none; margin: 0 0 var(--s2); }
.notice-bar { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--reed); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; font-size: 0.93rem; max-width: none; margin: 0 0 var(--s2); }
.callout { background: var(--surface); border-left: 4px solid var(--reed); padding: var(--s2) 20px; margin: var(--s3) 0; border-radius: 0 var(--radius) var(--radius) 0; max-width: none; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--rust); background: #fbf1ee; }
.callout.benefit { border: 1px solid var(--line); border-left: 4px solid var(--reed); }
.callout.benefit h2 { margin: 0 0 var(--s1); }
.empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: var(--s4) var(--s3); margin-top: var(--s2); }
.empty h2 { margin-bottom: var(--s1); }
.empty .btn { margin: 4px 8px 0 0; }
.pending { margin: 12px 0 0; font-size: 0.93rem; color: var(--muted); max-width: none; }
.pending::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--reed); margin-right: 0.5rem; }
.pending.plain::before { display: none; }
.action-toast { position: fixed; left: 50%; bottom: var(--s3); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.terms { font-size: 0.9rem; color: var(--muted); margin: 12px 0 0; max-width: 62ch; }
.came-for { background: var(--surface); border-left: 4px solid var(--reed); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px var(--s2); margin: var(--s2) 0; font-size: 0.95rem; max-width: none; }
.usage { font-size: 0.95rem; margin: 6px 0 0; }

/* ---------- Public pages: home ---------- */
.home-hero { background: var(--marsh); color: #fff; padding: var(--s5) 0 var(--s6); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); align-items: center; }
.home-hero h1 { font-size: clamp(2.2rem, 1.6rem + 2.3vw, 3.4rem); font-weight: 760; letter-spacing: -0.03em; line-height: 1.02; max-width: 14ch; }
.home-hero .lede { color: var(--on-dark); font-size: 1.15rem; margin: 20px 0 var(--s3); max-width: 42ch; }
.home-hero .terms { color: var(--on-dark-2); }
.home-hero .btn.ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.home-hero .btn.ghost:hover { border-color: #fff; color: #fff; }
.home-hero .shot { margin: 0; }
.home-hero .shot figcaption { color: var(--on-dark-2); }
.home-hero .shot img { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28); }
.evidence { background: var(--surface); border-bottom: 1px solid var(--line); }
.evidence .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.evidence-list { display: flex; gap: var(--s1) var(--s5); flex-wrap: wrap; }
.evidence-list div { display: flex; flex-direction: column-reverse; }
.evidence-list dd { font: 720 1.6rem/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.evidence-list dd.as-of { font: 600 1.05rem/1.5 var(--body); }
.evidence-list dt { font-size: 0.9rem; color: var(--muted); }
.evidence-link { margin: 0; font-weight: 600; }
.steps { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; column-gap: 12px; }
.steps li::before { content: counter(step); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--reed-wash); color: var(--reed-text); font: 700 1rem/2rem var(--display); text-align: center; }
.steps h3 { font-size: 1.12rem; margin: 4px 0 4px; }
.steps p { color: var(--muted); margin: 0; }
.plan-module { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); }
.plan-module h2 { margin-bottom: 12px; }
.plan-module p { margin: 0; }
.plan-action .terms { margin-top: 12px; }
.faq { border-top: 1px solid var(--line-2); margin-top: var(--s3); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { cursor: pointer; padding: 18px var(--s4) 18px 0; font: 620 1.08rem var(--body); list-style: none; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.5rem/1 var(--body); color: var(--marsh-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; color: var(--muted); }
.close-action { margin-top: var(--s5); }
.close-action h2 { margin-bottom: var(--s2); }
.close-action p { margin-top: 12px; }
.split .close-action { margin-top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); }
.aside-note { font-size: 0.95rem; color: var(--muted); border-left: 3px solid var(--line-2); padding-left: 14px; }
.setup-row { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: setup; }
.setup-row li { counter-increment: setup; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px var(--s2); font-weight: 600; }
.setup-row li::before { content: counter(setup) ". "; color: var(--reed-text); }
.principles { display: grid; gap: var(--s2); margin: var(--s2) 0; }
.principles dt { font-weight: 700; }
.principles dd { color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 4px var(--s3); margin-top: var(--s3); }
.jump a { font-weight: 600; padding: 8px 0; }

/* ---------- Screenshots: real captures, flat, with a caption ---------- */
.shot { margin: 0; }
.shot-zoom { display: block; cursor: zoom-in; border-radius: var(--radius-lg); }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.shot figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 10px; }
dialog.zoom { padding: 0; border: 0; border-radius: var(--radius-lg); max-width: min(96vw, 1500px); max-height: 94vh; background: var(--surface); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
dialog.zoom::backdrop { background: rgba(16, 34, 28, 0.72); }
dialog.zoom img { display: block; max-width: 100%; max-height: calc(94vh - 60px); width: auto; margin: 0 auto; }
dialog.zoom .zoom-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: 8px 8px 8px var(--s2); font-size: 0.875rem; color: var(--muted); }

/* ---------- Search ---------- */
.task-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s4) 0 var(--s3); }
.task-head h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.task-head .lede { color: var(--muted); font-size: 1.02rem; margin: 6px 0 var(--s2); }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) 12rem 14rem auto; gap: 12px; align-items: end; max-width: 64rem; }
.sf-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.search-form .btn { min-height: 46px; }
.sf-suggest { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 0.9rem; color: var(--muted); max-width: none; }
.sf-suggest .suggest { font: inherit; color: var(--marsh); background: transparent; border: 0; padding: 6px 4px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; cursor: pointer; min-height: 32px; }
.sf-suggest .suggest:hover { text-decoration-color: var(--marsh); }
#search .help { margin-top: 12px; }
.allowance { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.allowance summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.allowance p { margin: 6px 0 0; }
.results { padding: var(--s3) 0 var(--s6); }
.result-head { font-size: 1.25rem; margin-bottom: 4px; }
.result-note, .result-count { font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; max-width: none; }
.search-intro { max-width: 70ch; }
.counted { font-size: 0.9rem; color: var(--muted); margin: 12px 0 0; max-width: none; }
.after-search { display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; margin-top: var(--s4); padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--reed); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.after-search h2 { font-size: 1.25rem; max-width: none; margin: 0; }
.after-search p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- Rows: search results and matches share one layout ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s3); padding: 18px 20px; border-top: 1px solid var(--line); align-items: start; }
.row:first-child { border-top: 0; }
.row h3 { font: 600 1.06rem/1.35 var(--body); margin: 2px 0 0; }
.row h3 a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); }
.row h3 a:hover { text-decoration-color: var(--ink); }
.meta { font-size: 0.9rem; color: var(--muted); margin: 4px 0 0; max-width: none; display: flex; flex-wrap: wrap; gap: 2px 0; }
.meta > span:not(:first-child)::before { content: "/"; margin: 0 8px; color: var(--line-2); }
.meta .buyer { color: var(--ink); }
.meta .dist { font-weight: 600; color: var(--marsh-2); }
.mrow-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; max-width: none; }
.mrow-when { margin: 8px 0 0; font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; max-width: none; }
.mrow-when strong { font-weight: 650; }
.mrow-when span { color: var(--muted); }
.urgent .mrow-when strong { color: var(--rust); }
.soon .mrow-when strong { color: var(--reed-text); }
.why { font-size: 0.95rem; margin: 10px 0 0; max-width: 72ch; border-left: 3px solid var(--reed); padding-left: 12px; }
.check { font-size: 0.92rem; margin: 6px 0 0; max-width: 72ch; }
.found-by { font-size: 0.85rem; color: var(--muted); }
.excerpt { font-size: 0.92rem; color: var(--muted); margin: 8px 0 0; max-width: 72ch; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }
.prow { grid-template-columns: minmax(0, 1fr); }
.prow-foot { display: flex; align-items: center; gap: 6px var(--s2); flex-wrap: wrap; margin: 10px 0 0; max-width: none; }
.prow-foot .source { font-size: 0.85rem; color: var(--muted); }
.rows.locked .row { grid-template-columns: minmax(0, 1fr); }
.row.done { grid-template-columns: minmax(0, 1fr) auto; background: #f7faf7; align-items: center; }
.row.done p { margin: 0; }
.reasons { grid-column: 1 / -1; }
.reasons p { margin: 0 0 8px; }
.reason-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.pager { display: flex; gap: var(--s2); align-items: center; margin-top: 20px; font-size: 0.95rem; }
.pager a { padding: 10px 4px; }
.kind { display: inline-block; font-size: 0.8rem; font-weight: 650; color: var(--marsh); background: #e3ebe4; border-radius: 4px; padding: 2px 8px; }
.kind.closed { background: var(--rust-wash); color: var(--rust); }
.meta .kind { background: none; padding: 0; font-size: inherit; font-weight: 600; color: var(--marsh-2); border-radius: 0; }
.htmx-request.rows, .htmx-request .rows { opacity: 0.55; }

/* Scope fit: words first, the number beside them. Not a dial, not a probability. */
.fit { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.85rem; padding: 3px 10px; border-radius: 999px; background: #e3efe7; color: var(--ok); white-space: nowrap; }
.fit b { font-weight: 700; }
.fit-n { font-variant-numeric: tabular-nums; color: var(--muted); }
.fit.fair { background: var(--reed-wash); color: var(--reed-text); }
.fit.weak { background: #eceeed; color: var(--muted); }
.fit.kw { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.fit.big { font-size: 0.95rem; padding: 5px 12px; }

/* ---------- Customer app: matches ---------- */
.matches-head { align-items: flex-end; }
.head-tools { display: flex; gap: 12px var(--s2); align-items: end; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1.5px solid var(--marsh); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 0 14px; font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--marsh); min-height: 42px; display: inline-flex; align-items: center; }
.seg a[aria-current="true"] { background: var(--marsh); color: #fff; }
.tabs { display: flex; gap: var(--s3); border-bottom: 1px solid var(--line); margin-bottom: 8px; flex-wrap: wrap; }
.tabs a { padding: 12px 0; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--reed); }
.tabs .count { font-weight: 400; font-variant-numeric: tabular-nums; }
.tabs.sub { border-bottom: 0; margin: 4px 0 12px; }
.kpis.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .kpis.four { grid-template-columns: repeat(2, 1fr); } }
.ops-grid.top { align-items: start; }
.nowrap { white-space: nowrap; }
.tabs.sub a { padding: 6px 0; font-size: 0.92rem; }
.chip { display: inline-block; padding: 2px 8px; margin: 0 4px 4px 0; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.chip-won, .chip-yes { background: #1f6f43; color: #fff; }
.chip-reply, .chip-click { background: #d9ecdf; color: #17442b; }
.chip-read, .chip-view, .chip-start { background: #eef2e6; color: #33402a; }
.chip-bounce, .chip-stop { background: #f6e3df; color: #7a2d1f; }
.scope-line { margin: 0 0 12px; max-width: none; }
.fit-help { font-size: 0.9rem; margin: 0 0 var(--s2); }
.fit-help summary { cursor: pointer; color: var(--marsh-2); font-weight: 600; display: inline-block; padding: 4px 0; }
.fit-help p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Review deck ---------- */
.deck { max-width: 720px; margin: 20px auto 0; }
.deck-meter { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.deck-bar { flex: 1; height: 4px; border-radius: 2px; background: #dfe6e0; overflow: hidden; }
.deck-bar i { display: block; height: 100%; width: 0; background: var(--reed); transition: width 0.25s ease; }
.deck-stage { position: relative; min-height: 20rem; }
.tcard { position: relative; z-index: 1; background: var(--surface); border: 1px solid #cfd8d2; border-radius: 16px; padding: var(--s3); box-shadow: var(--shadow); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tcard.dragging { cursor: grabbing; transition: none; }
.tcard-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.tcard-top .mrow-when { margin: 0; }
.tcard h2 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem); font-weight: 700; letter-spacing: -0.01em; }
.tcard h2 a { color: inherit; text-decoration: none; }
.tcard h2 a:hover { text-decoration: underline; }
.tcard .why { font-size: 1rem; margin-top: var(--s2); }
.tcard .excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stamp { position: absolute; top: 18px; font: 750 1.1rem var(--display); padding: 4px 12px; border: 3px solid; border-radius: var(--radius); opacity: 0; pointer-events: none; background: var(--surface); z-index: 2; }
.stamp.yes { left: 18px; color: var(--ok); }
.stamp.no { right: 18px; color: var(--rust); }
.deck-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: var(--s3); }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 650 1rem var(--body); padding: 12px var(--s2); min-height: 48px; border-radius: var(--radius-lg); border: 2px solid; cursor: pointer; text-decoration: none; white-space: nowrap; }
.act:disabled { opacity: 0.6; cursor: progress; }
.act.no { background: var(--surface); color: var(--rust); border-color: #e3c2ba; }
.act.no:hover { border-color: var(--rust); }
.act.yes { background: var(--marsh); color: #fff; border-color: var(--marsh); }
.act.yes:hover { background: var(--marsh-2); }
.act.open { border-color: transparent; color: var(--marsh-2); text-decoration: underline; padding-inline: 10px; }
.deck-hint { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 12px auto 0; }
.deck-toast { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: var(--s2); background: var(--ink); color: #fff; border-radius: var(--radius); padding: 12px 14px; font-size: 0.92rem; }
.deck-toast p { margin: 0; }
.deck-toast .undo { margin-left: auto; background: none; border: 0; color: var(--reed); font: 650 0.92rem var(--body); cursor: pointer; text-decoration: underline; min-height: 40px; }
.why-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.why-chips button { font: 500 0.85rem var(--body); background: rgba(255, 255, 255, 0.14); color: #fff; border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.why-chips button:hover { background: rgba(255, 255, 255, 0.28); }
.deck-done { position: relative; z-index: 1; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 16px; padding: var(--s5) var(--s3); text-align: center; }
.deck-done p { margin-inline: auto; }

/* ---------- Tender page ---------- */
.tender-head { margin-bottom: var(--s3); }
.tender-head h1 { margin-top: 8px; max-width: 32ch; }
.lead-meta { font-size: 1rem; margin-top: 10px; }
.action-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px var(--s3); margin-bottom: var(--s3); }
.action-bar p { margin: 0; }
.due-rel { font: 700 1.3rem/1.2 var(--display); }
.urgent .due-rel { color: var(--rust); }
.due-full { margin-top: 4px !important; }
.action-bar .actions { justify-content: flex-end; max-width: 480px; }
.action-bar .actions form { margin: 0; }
.action-bar .actions .small { flex-basis: 100%; text-align: right; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s4); align-items: start; }
.detail .main { display: grid; gap: 20px; min-width: 0; }
.side { display: grid; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px var(--s3); }
.panel > h2 { font-size: 1.15rem; margin-bottom: 12px; }
.panel h3 { font: 650 1rem var(--body); margin: var(--s2) 0 4px; }
.panel p:last-child { margin-bottom: 0; }
.panel.why-fit { border-left: 4px solid var(--reed); }
.panel.why-fit .check { font-size: 1rem; margin-top: 0; }
.panel.changed { border-left: 4px solid var(--rust); }
.panel.changed ul { margin: 0 0 12px; padding-left: 20px; }
.fit-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: 12px; }
.fit-head h2 { font-size: 1.15rem; }
.saved-note { font-weight: 600; color: var(--ok); }
.pass-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.pass-inline label { font-weight: 600; font-size: 0.92rem; flex-basis: 100%; }
.pass-inline select { width: auto; flex: 1 1 14rem; }
.kind-note { background: var(--tint); border-radius: var(--radius); padding: 12px var(--s2); margin: 0; max-width: none; font-size: 0.95rem; }
.prose-text { overflow-wrap: anywhere; }
.prose-text p { max-width: 72ch; white-space: pre-line; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--marsh-2); padding: 8px 0; }
.facts { display: grid; gap: 12px; }
.facts dt { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.facts dd { margin-top: 2px; overflow-wrap: anywhere; }
.docs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.docs a { overflow-wrap: anywhere; }
.side-h { font-size: 1rem !important; }

/* ---------- Notice preview (public) ---------- */
.notice-preview .facts { gap: 0; margin: 0 0 var(--s3); border-top: 1px solid var(--line); }
.notice-preview .facts div { display: grid; grid-template-columns: 10rem 1fr; gap: var(--s2); padding: 12px 0; border-bottom: 1px solid var(--line); }
.notice-preview .facts dt { font-size: 0.95rem; font-weight: 500; }
.notice-preview .facts dd { margin: 0; }
.notice-preview .top-facts { margin-top: var(--s3); }
.notice-actions { margin: 0 0 var(--s4); }
.notice-actions p { display: flex; flex-wrap: wrap; gap: 12px; }
.notice-actions p.small { display: block; margin-top: 8px; }
.source-text { margin: 12px 0 8px; padding: var(--s2) 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1rem; }

/* ---------- Setup, watches, settings, billing ---------- */
.auth { max-width: 480px; margin: 0 auto; }
.auth.wide { max-width: 640px; }
.auth h1 { margin-bottom: 8px; }
.auth > p { margin-bottom: var(--s3); }
.steps-wrap { margin-bottom: 0; }
.wizard-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 var(--s3); counter-reset: wstep; flex-wrap: wrap; }
.wizard-steps li { counter-increment: wstep; flex: 1 1 100px; font-size: 0.88rem; font-weight: 600; color: var(--muted); border-top: 4px solid #cfd8d2; padding-top: 8px; }
.wizard-steps li::before { content: counter(wstep) ". "; }
.wizard-steps li.done { border-top-color: var(--marsh-3); color: var(--marsh-2); }
.wizard-steps li[aria-current="step"] { border-top-color: var(--reed); color: var(--ink); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s3); align-items: start; }
.preview { position: sticky; top: var(--s2); background: var(--marsh); color: #fff; border-radius: var(--radius-lg); padding: 20px; }
.preview .muted, .preview .help { color: #b9cdc4; }
.preview a { color: #fff; }
.preview-h { font-size: 1rem; margin-bottom: 8px; }
.preview-count { font-size: 0.95rem; margin: 0 0 12px; }
.preview-count strong { font: 750 2.4rem/1 var(--display); color: var(--reed); display: block; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.preview-list { list-style: none; padding: 0; margin: 6px 0 var(--s2); }
.preview-list li { border-top: 1px solid rgba(255, 255, 255, 0.16); padding: 10px 0; display: grid; gap: 2px; }
.preview-title { font-weight: 600; font-size: 0.93rem; line-height: 1.3; }
.preview-warn { font-size: 0.88rem; background: rgba(212, 167, 44, 0.16); border-left: 3px solid var(--reed); padding: 8px 12px; border-radius: 0 6px 6px 0; margin: 12px 0 0; max-width: none; }
.watch-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); padding: 20px; border-top: 1px solid var(--line); align-items: start; }
.watch:first-child { border-top: 0; }
.watch h3 { font-size: 1.1rem; margin-bottom: 6px; }
.watch p { margin: 0 0 4px; }
.paused { font: 600 0.8rem var(--body); color: var(--rust); margin-left: 6px; }
.danger-zone { position: relative; }
.danger-zone > summary { list-style: none; }
.danger-zone > summary::-webkit-details-marker { display: none; }
.danger-zone[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: var(--s2); box-shadow: var(--shadow); }
.account-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s3); margin-bottom: var(--s3); }
.account-box h2 { margin-bottom: 8px; }
.account-box p:last-child { margin-bottom: 0; }
.account-box form { display: inline; }
.inline-links { display: flex; gap: var(--s2) var(--s3); flex-wrap: wrap; margin-top: var(--s3); }
.billing-foot { margin-top: var(--s4); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--s3); margin-top: var(--s3); max-width: 860px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); display: flex; flex-direction: column; gap: 4px; }
.plan h2, .plan h3 { font-size: 1.4rem; }
.plan .price { font: 750 2.4rem/1 var(--display); margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.plan .price span, .plan .price small { font: 500 1rem var(--body); color: var(--muted); }
.plan .price-note, .plan .yearly { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }
.plan ul, .ticks { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; gap: 10px; }
.plan li, .ticks li { padding-left: 26px; position: relative; }
.plan li::before, .ticks li::before { content: ""; position: absolute; left: 2px; top: 0.4em; width: 0.7rem; height: 0.4rem; border-left: 2.5px solid var(--marsh-3); border-bottom: 2.5px solid var(--marsh-3); transform: rotate(-45deg); }
.plan .btn { align-self: flex-start; }
.plan .btn.full { align-self: stretch; }
.plan .buy { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.plan .buy form { margin: 0; }
.trial-start { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s4); align-items: start; margin-top: 8px; }
.trial-start h1 { max-width: 24ch; margin-bottom: 12px; }
.trial-start .rows { margin-top: 20px; }
.trial-box { position: sticky; top: var(--s2); }
.trial-box .price { font-size: 1.8rem; }
.trial-box form { margin: 4px 0 0; }
.trial-box .risk { margin: 10px 0 0; line-height: 1.45; }
.trial-start.arrived #preview-main { animation: arrive 0.5s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.more-shortlist { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s2) 20px; }
.more-head { font-weight: 650; margin: 0 0 6px; }
.more-shortlist ul { list-style: none; padding: 0; margin: 0 0 10px; }
.more-shortlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto 6.5rem; align-items: center; gap: 6px var(--s2); padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.more-shortlist .locked-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-shortlist .fit { justify-self: start; }
.more-shortlist .when { font-size: 0.88rem; text-align: right; }
@media (max-width: 560px) {
  .more-shortlist li { grid-template-columns: auto minmax(0, 1fr); }
  .more-shortlist .locked-title { grid-column: 1 / -1; white-space: normal; }
}
.more-shortlist p:last-child { margin: 0; }
.trial-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: 12px max(var(--s2), env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)); background: var(--marsh); color: #fff; box-shadow: 0 -6px 20px rgba(16, 34, 28, 0.18); }
.trial-dock[hidden] { display: none; }
.trial-dock p { margin: 0; display: grid; line-height: 1.25; }
.trial-dock p span { color: var(--on-dark-2); font-size: 0.85rem; }
.trial-dock form { margin: 0; }

.form-actions + .help { margin-top: 12px; }
details.fine > .regions > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.footer-slim { max-width: var(--max); margin: var(--s5) auto 0; padding: var(--s3) var(--gutter) var(--s4); display: flex; flex-wrap: wrap; gap: 8px var(--s3); justify-content: space-between; font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); }
.footer-slim p { margin: 0; }
.footer-slim nav { display: flex; gap: var(--s2); }
.footer-slim a { color: var(--muted); }
@media (max-width: 560px) {
  .btn.wide-on-phone { width: 100%; }
  .form-actions:has(.wide-on-phone) { display: block; }
}

/* The first search, shown as it works: a flight line down the steps, the live one pulsing. */
.search-live h1 { margin-bottom: 8px; }
.search-live h1:focus, .trial-start h1:focus { outline: none; }
.search-log { list-style: none; margin: var(--s3) 0 0; padding: 0; position: relative; }
.search-log li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 0 var(--s3); animation: arrive 0.35s ease-out both; }
.search-log li[hidden] { display: none; }
.search-log li::before { content: ""; position: absolute; left: 13px; top: 22px; bottom: 2px; width: 2px; background: var(--line); }
.search-log li:last-child::before, .search-log li.now::before { display: none; }
.search-log li.done::before { background: var(--marsh-3); }
.search-log .dot { width: 16px; height: 16px; margin: 4px 0 0 6px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--ground); position: relative; }
.search-log li.now .dot { border-color: var(--reed); background: var(--reed); }
.search-log li.now .dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--reed); opacity: 0; animation: ping 1.4s ease-out infinite; }
.search-log li.done .dot { border-color: var(--marsh-3); background: var(--marsh-3); }
.search-log li.done .dot::before { content: ""; position: absolute; left: 3.5px; top: 2.5px; width: 6px; height: 3.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
.step-title { font-weight: 650; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.search-log li.done .step-title { color: var(--marsh-2); }
.step-note { font-size: 0.92rem; color: var(--muted); margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; max-width: none; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-size: 0.88rem; animation: pop 0.25s ease-out both; }
[data-terms] .chip { background: var(--reed-wash); border-color: transparent; color: var(--ink); }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.ticker { margin: 0; font-size: 0.95rem; color: var(--muted); min-height: 1.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker.in { animation: arrive 0.4s ease-out both; }
.bar { height: 8px; background: var(--tint); border-radius: 999px; overflow: hidden; max-width: 420px; }
.bar span { display: block; height: 100%; width: 4%; background: var(--reed); border-radius: inherit; transition: width 0.6s ease; }
@media (prefers-reduced-motion: reduce) {
  .search-log li, .chip, .ticker.in, .trial-start.arrived #preview-main { animation: none; }
  .search-log li.now .dot::after { display: none; }
  .bar span { transition: none; }
}

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.trial-steps h2 { margin-bottom: 0; }
.trial-steps .steps li { grid-template-columns: 2.25rem 1fr; }
.trial-steps .steps li::before { grid-row: auto; }
.trial-steps .steps p { color: var(--ink); padding-top: 4px; }
.billing-line { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); color: var(--muted); }

/* ---------- Coverage, regions, map ---------- */
.ledger { width: 100%; border-collapse: collapse; background: var(--surface); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: var(--s2); }
.ledger th { text-align: left; font-size: 0.85rem; color: var(--muted); font-weight: 600; padding: 12px var(--s2); background: #eef2ee; }
.ledger td { padding: 14px var(--s2); border-top: 1px solid var(--line); vertical-align: top; }
.ledger .num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ledger .where { color: var(--muted); font-size: 0.9rem; display: block; }
.ledger td strong { font-weight: 620; }
.ledger.compact { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.ledger.compact td, .ledger.compact th { padding: 8px 14px; }
.sources-ledger a { color: var(--ink); }
.sources-ledger tr.planned td { color: var(--muted); }
.row-more { margin-top: 6px; font-size: 0.88rem; }
.row-more summary { cursor: pointer; color: var(--marsh-2); font-weight: 600; padding: 4px 0; }
.row-more ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.state { font-weight: 650; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; }
.state.healthy, .state.ok { color: var(--ok); }
.state.delayed, .state.wait { color: var(--reed-text); }
.state.unavailable, .state.down { color: #a23b2a; }
.state.planned { color: var(--muted); }
.state.planned::before { background: transparent; border: 2px solid currentColor; }
.ledger-filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px var(--s2); align-items: end; }
.ledger-filter label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.ledger-count { grid-column: 1 / -1; margin: 0; font-size: 0.9rem; color: var(--muted); }
.ledger-more { margin: var(--s2) 0 0; }
.state-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s2) var(--s4); margin: var(--s3) 0 var(--s2); }
.state-key div { border-top: 1px solid var(--line-2); padding-top: 10px; }
.state-key dd { margin-top: 4px; color: var(--muted); font-size: 0.9rem; }
.metrics { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: var(--s3) 0 0; }
.metrics div { display: flex; flex-direction: column-reverse; }
.metrics dd { font: 720 1.8rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.metrics dt { font-size: 0.9rem; color: var(--muted); }
.cov-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4); align-items: start; margin-top: var(--s3); }
.cov-layout .mapfig { position: sticky; top: var(--s3); margin: 0; }
.cov-tables { display: grid; gap: var(--s3); }
.cov-tables > div { min-width: 0; overflow-x: auto; }
.ledger th.num { white-space: normal; }
.cov-tables h3, .region-index h2 { font-size: 1.15rem; margin-bottom: 10px; }
.cov-tables h3 .muted, .region-index h2 .muted { font: 400 0.9rem var(--body); margin-left: 6px; }
.region-index { grid-template-columns: 1fr 1fr; align-items: start; }
.mapfig { margin: 0; }
.namap { width: 100%; height: auto; display: block; }
.namap path { stroke: var(--ground); stroke-width: 1; stroke-linejoin: round; fill: #dde5df; }
.namap path.lvl1 { fill: #b5cfbe; }
.namap path.lvl2 { fill: #5f957c; }
.namap path.lvl3 { fill: var(--marsh); }
.namap path:hover { fill: var(--reed); }
.namap text { font: 650 11px var(--body); text-anchor: middle; dominant-baseline: middle; fill: #54665d; pointer-events: none; }
.namap text.lvl2, .namap text.lvl3 { fill: #fff; }
.mapfig figcaption { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 0.9rem; height: 0.9rem; border-radius: 3px; background: #dde5df; }
.key i.lvl1 { background: #b5cfbe; } .key i.lvl2 { background: #5f957c; } .key i.lvl3 { background: var(--marsh); }
.key-note { flex: 1 1 100%; max-width: 46ch; }
.link-list { list-style: none; margin: 12px 0 0; padding: 0; max-width: 44rem; }
.link-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.link-list.cols { columns: 2; column-gap: var(--s5); max-width: none; }
.link-list.cols li { break-inside: avoid; }
.link-list a { font-weight: 600; }
.link-list small { color: var(--muted); margin-left: 6px; }
.plain-list { margin: var(--s2) 0 0; padding: 0; list-style: none; }
.plain-list li { padding: 8px 0; border-top: 1px solid var(--line); }

/* ---------- Industries ---------- */
.industry { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--line-2); scroll-margin-top: var(--s2); }
.industry:first-of-type { border-top: 0; padding-top: 0; }
.industry h2 { font-size: 1.6rem; max-width: none; margin-bottom: 12px; }
.industry h3 { font: 650 1rem var(--body); margin: 0 0 6px; }
.industry p { color: var(--muted); }
.vocab { margin-top: var(--s2); border-top: 1px solid var(--line); padding-top: 8px; }
.vocab summary { cursor: pointer; font-weight: 600; color: var(--marsh-2); padding: 6px 0; }
.vocab p { margin: 6px 0 0; }
.sub-h { margin-top: var(--s4); }
.words { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.words li { display: inline; }
.words li:not(:last-child)::after { content: ", "; }

/* ---------- Articles, guides, legal ---------- */
.article { max-width: 760px; margin: 0 auto; padding: var(--s5) var(--gutter) var(--s6); font-size: 1.06rem; line-height: 1.65; }
.article h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); letter-spacing: -0.02em; }
.article .crumbs { margin: 0 0 var(--s2); }
.article .byline { color: var(--muted); font-size: 0.92rem; margin: 14px 0 var(--s3); }
.article .summary { font-size: 1.14rem; line-height: 1.55; border-left: 4px solid var(--reed); padding: 2px 0 2px 18px; margin: var(--s2) 0 var(--s3); }
.article h2 { font-size: 1.5rem; margin: var(--s5) 0 12px; }
.article h2[id] { scroll-margin-top: var(--s3); }
.article h3 { font: 650 1.1rem var(--body); margin: var(--s3) 0 6px; }
.article li { margin-bottom: 8px; }
.article .callout { font-size: 1rem; }
.article .callout.next { margin-top: var(--s5); }
.article .callout.draft { border-left-color: var(--rust); background: #fbf1ee; }
.article .callout.draft code { font-size: 0.9em; background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
.article .shot { margin: var(--s3) 0; }
.article .principles dd { font-size: 1rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s2) 20px; margin: 0 0 var(--s4); }
.toc h2 { font: 650 1rem var(--body) !important; margin: 0 0 8px !important; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; font-size: 0.98rem; }
.sheet { overflow-x: auto; margin: 20px 0 var(--s3); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.sheet:focus-visible { outline-offset: 3px; }
.sheet table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.93rem; line-height: 1.45; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.sheet thead th { border-top: 0; font-weight: 650; background: #eef2ee; }
.sheet tbody th { font-weight: 650; white-space: nowrap; background: #eef2ee; width: 1%; }
.sheet td:empty::after { content: "\00a0"; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.95rem; max-width: none; }
.tool-note { color: var(--ok); font-weight: 600; font-size: 0.9rem; }
.guide-group { font-size: 1.5rem; margin: var(--s5) 0 4px; }
.guide-group:first-child { margin-top: 0; }
.guide-list { list-style: none; margin: 0; padding: 0; max-width: 780px; }
.guide-list li { border-top: 1px solid var(--line); padding: var(--s3) 0; }
.guide-list h2, .guide-list h3 { font: 700 1.3rem/1.25 var(--display); letter-spacing: -0.01em; max-width: none; margin: 0; }
.guide-list a { text-decoration: none; color: var(--ink); }
.guide-list a:hover h3 { text-decoration: underline; text-decoration-color: var(--reed); text-underline-offset: 0.2em; }
.guide-list p { margin: 8px 0 0; color: var(--muted); max-width: 64ch; }
.after-list { margin-top: var(--s4); }
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.2rem; margin-top: var(--s4); }
.legal ul { padding-left: 20px; max-width: var(--measure); }
.legal li { margin-bottom: 6px; }
.legal code, .article code, .page code { overflow-wrap: anywhere; }
.legal code, .article code { font-size: 0.9em; background: #e9eeea; padding: 1px 5px; border-radius: 4px; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { margin: var(--s4) 0 8px; }

/* ---------- Footer ---------- */
.footer { background: #0e261f; color: var(--on-dark); padding: var(--s6) 0 var(--s4); }
.footer-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 9fr); gap: var(--s5); }
.footer .brand { font-size: 1.5rem; }
.footer .tagline { margin: var(--s2) 0 0; max-width: 30ch; font-size: 1.02rem; color: var(--on-dark); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s4) var(--s3); }
.footer h2 { font: 650 0.95rem var(--body); color: #fff; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer ul a { display: inline-block; padding: 4px 0; }
.footer a { color: var(--on-dark); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.16); margin-top: var(--s5); padding-top: var(--s3); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 9fr); gap: var(--s5); font-size: 0.85rem; color: var(--on-dark-2); }
.footer-legal p { margin: 0; max-width: 78ch; }
.footer-legal a { text-decoration: underline; }

/* ---------- Owner dashboard ---------- */
.ops-links { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; font-size: 0.93rem; }
.ops-alert { background: #fbf3d9; border: 1px solid #e9d795; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: var(--s3); }
.ops-alert.quiet { border-left: 4px solid var(--reed); background: var(--surface); }
.ops-alert.quiet a { color: var(--ink); }
.ops-alert h2 { font-size: 1.05rem; margin-bottom: 8px; }
.ops-alert ul { margin: 0; padding-left: 18px; }
.ops-alert li { margin-bottom: 4px; overflow-wrap: anywhere; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.kpi { background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; }
.kpi .n { font: 750 1.9rem/1 var(--display); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.ops-h { margin: var(--s5) 0 14px; font-size: 1.35rem; scroll-margin-top: var(--s2); }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); gap: 20px; margin-bottom: 20px; }
.ops-grid > * { min-width: 0; }
.pairs div { display: flex; justify-content: space-between; gap: var(--s2); padding: 6px 0; border-top: 1px solid var(--line); }
.pairs div:first-child { border-top: 0; }
.pairs dt { color: var(--muted); }
.pairs dd { font-weight: 620; font-variant-numeric: tabular-nums; text-align: right; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 11rem 1fr 3rem 2.6rem; gap: 10px; align-items: center; font-size: 0.92rem; }
.bar { background: #e6ebe7; border-radius: 4px; height: 0.8rem; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--marsh-2); border-radius: 4px; }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 620; }
.bar-rate { text-align: right; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.ops-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.ops-table th { text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 6px 10px 6px 0; white-space: nowrap; }
.ops-table td { padding: 8px 10px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.ops-table .num, .ops-table thead th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ops-table .sub { display: block; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.ops-table .sub-cell { color: var(--muted); font-size: 0.85rem; text-align: right; }
.ops-table form { margin: 0; }
.ops-table .btn { white-space: nowrap; }
.pill { font-weight: 650; font-size: 0.85rem; }
.state-live .pill { color: var(--ok); }
.state-failing .pill { color: var(--rust); }
.state-warning .pill, .state-waiting .pill, .state-skipped .pill, .state-not-run-yet .pill { color: var(--reed-text); }
.state-off .pill, .state-backlog .pill { color: var(--muted); font-weight: 500; }
.spark { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 120px; align-items: end; margin-bottom: 12px; }
.spark span { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; align-items: stretch; }
.spark i { background: var(--marsh-2); border-radius: 3px 3px 0 0; min-height: 2px; }
.spark b { font: 400 0.7rem var(--body); color: var(--muted); text-align: center; margin-top: 3px; }

/* ---------- Narrower screens ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .split.even, .price-grid, .plan-module, .cov-layout, .industry, .footer-top, .footer-legal, .trial-start, .editor, .detail, .region-index { grid-template-columns: minmax(0, 1fr); }
  .split.reverse > :first-child { order: 0; }
  .split, .hero-grid { gap: var(--s4); }
  .cov-layout .mapfig, .trial-box, .preview { position: static; }
  .setup-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-form .sf-q, .search-form .btn { grid-column: 1 / -1; }
  .search-form .btn { justify-self: start; }
  /* On a narrower screen the deadline and official link come straight after the fit, not after the description. */
  .detail { display: flex; flex-direction: column; gap: 20px; }
  .detail .main, .detail .side { display: contents; }
  .detail .panel.why-fit { order: -3; }
  .detail .panel.changed { order: -2; }
  .detail .kind-note { order: -1; }
  .home-hero .shot { margin-right: calc(-1 * var(--gutter)); }
  .home-hero .shot img { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
}
@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .section { padding: var(--s5) 0; }
  .page-intro { padding: var(--s4) 0 var(--s3); }
  .page { padding-top: var(--s3); }
  /* The public menu: one button opens the links as a panel. Without scripts the links simply wrap. */
  .has-menu .menu-button { display: inline-flex; align-items: center; }
  .has-menu .site-nav { display: none; }
  .has-menu .site-nav.open { display: grid; position: absolute; left: 0; right: 0; top: 100%; background: var(--marsh); padding: var(--s1) var(--gutter) var(--s2); border-top: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); }
  .has-menu .site-nav.open a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .has-menu .site-nav.open a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--reed); }
  .has-menu .site-nav .nav-extra { display: block; }
  .has-menu .topbar .login { display: none; }
  .site-nav { order: 3; flex: 1 0 100%; }
  .topbar-inner { flex-wrap: wrap; gap: var(--s1) 12px; }
  .has-menu .topbar-inner { flex-wrap: nowrap; }
  .app-nav { order: 3; flex: 1 0 100%; overflow-x: auto; flex-wrap: nowrap; margin: 0 -8px; }
  .app-nav a { white-space: nowrap; }
  .evidence-list { gap: var(--s1) var(--s4); }
  .evidence-list dd { font-size: 1.35rem; }
  .row { grid-template-columns: minmax(0, 1fr); padding: var(--s2); }
  .row-actions { justify-content: flex-start; }
  .tabs { flex-wrap: nowrap; gap: var(--s2); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .matches-head { margin-bottom: 12px; }
  .matches-head h1 { font-size: 1.6rem; }
  .matches-head .muted { display: none; }
  .matches-head > * { min-width: 0; max-width: 100%; }
  .head-tools { width: 100%; gap: 12px; }
  .matches-head .filters { flex: 1 1 100%; flex-wrap: nowrap; gap: 8px; min-width: 0; }
  .matches-head .filters > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .matches-head .filters select { flex: 1 1 auto; min-width: 0; width: auto; }
  .app-nav a { padding: 8px 10px; }
  .action-bar { grid-template-columns: minmax(0, 1fr); padding: var(--s2); }
  .action-bar .actions { justify-content: flex-start; }
  .action-bar .actions .small { text-align: left; }
  .notice-preview .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ledger-filter { grid-template-columns: 1fr 1fr; }
  .ledger-filter .lf-text { grid-column: 1 / -1; }
  .sources-ledger thead { display: none; }
  .sources-ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--s2); padding: 14px var(--s2); border-top: 1px solid var(--line); }
  .sources-ledger tr:first-child { border-top: 0; }
  .sources-ledger td { border: 0; padding: 0; }
  .sources-ledger td:nth-child(1), .sources-ledger td:nth-child(2) { grid-column: 1 / -1; }
  .sources-ledger td:nth-child(3) { grid-column: 1; }
  .sources-ledger td:nth-child(3) .where { display: inline; margin-left: 8px; }
  .sources-ledger td:nth-child(4) { grid-column: 2; text-align: right; }
  .sources-ledger td:nth-child(4)::after { content: " open"; color: var(--muted); font-size: 0.9rem; }
  .link-list.cols { columns: 1; }
  .deck { margin-top: 8px; }
  .tcard { padding: var(--s2) 18px 20px; }
  .deck-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--ground) 30%); padding: 20px 0 12px; margin-top: 20px; z-index: 5; }
  .act { padding: 12px 10px; font-size: 0.95rem; }
  .namap text { font-size: 15px; }
  .bars li { grid-template-columns: 8.5rem 1fr 2.6rem 2.4rem; }
  .danger-zone[open] > form { right: auto; left: 0; }
  .watch { grid-template-columns: minmax(0, 1fr); }
  .watch .row-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .search-form, .ledger-filter { grid-template-columns: minmax(0, 1fr); }
  .search-form .btn { justify-self: stretch; }
  .setup-row { grid-template-columns: minmax(0, 1fr); }
  .home-hero { padding-top: var(--s4); }
  .home-hero .actions .btn { flex: 1 1 auto; }
  .plan, .plan-module, .split .close-action { padding: var(--s3) 20px; }
  .metrics { gap: var(--s2) var(--s4); }
  .after-search { padding: 20px; }
  .meta > span:not(:first-child)::before { margin: 0 6px; }
}
@media (max-width: 420px) {
  .topbar .btn.sm { padding: 8px 10px; font-size: 0.85rem; }
  .topbar-inner { gap: 8px; }
  .menu-button { padding: 0 10px; }
}
@media (max-width: 360px) {
  .topbar-inner > .btn.gold { display: none; }
  .has-menu .site-nav .nav-cta { display: block; }
}
@media (max-width: 380px) {
  .brand { font-size: 1.15rem; }
  .deck-actions { gap: 6px; }
  .act { padding: 12px 8px; font-size: 0.92rem; gap: 6px; }
  .act.open { padding-inline: 4px; }
}
@media (hover: none) { .for-keys { display: none; } }
@media (hover: hover) { .for-touch { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Print: guides and checklists print without the site around them ---------- */
@media print {
  header, footer, .skip, .toc, .callout.next, .callout.draft, .crumbs, .tools, .notice, .action-toast { display: none !important; }
  body { background: #fff; }
  .article { max-width: none; padding: 0; font-size: 11pt; }
  .sheet { overflow: visible; border: 0; }
  .sheet table { min-width: 0; }
  .sheet th, .sheet td { border: 1px solid #999; }
  a { color: inherit; }
}
.not-current { margin-bottom: 0; }
.not-current h2 { font-size: 1.1rem; margin-bottom: 8px; max-width: none; }
.not-current .plain-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }

/* ---------- Outreach owner pages ---------- */
.spark.month { grid-template-columns: repeat(30, 1fr); gap: 2px; }
.spark.month b { font-size: 0.62rem; }
.switch { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.switch .btn[aria-pressed="true"] { pointer-events: none; }
.ops-table tr.early td { color: var(--muted); }
.ops-table tr.muted td { color: var(--muted); }
.ops-table td.early-note { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps-list li { display: grid; grid-template-columns: 12rem 1fr; gap: 12px; align-items: baseline; }
.mail-body { white-space: pre-wrap; font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2, #f6f7f5); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; overflow-wrap: anywhere; margin: 8px 0 0; }
.mail-body.signature-preview, .mail-html { white-space: normal; font: 14px/1.5 Arial, Helvetica, sans-serif; background: #fff; color: #222; }
.mail-html img { max-width: 100%; height: auto; }
.outreach-notices li:target { outline: 2px solid var(--gold, #c9a227); outline-offset: 6px; border-radius: 4px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: var(--s3); }
.filters .field { margin: 0; }
.filters input, .filters select { min-width: 9rem; }
.pager { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.proof { border-left: 3px solid var(--reed); padding-left: 12px; margin: 8px 0; }
@media (max-width: 640px) {
  .steps-list li { grid-template-columns: 1fr; gap: 2px; }
  .spark.month b { display: none; }
  .ops-table { display: block; overflow-x: auto; }
}
.breakdown { table-layout: fixed; }
.breakdown col.n { width: 8.5%; }
.breakdown tr.group th { padding-top: var(--s3); color: var(--ink); font-size: 0.85rem; }
.breakdown tr.group th:first-child { font: 650 1rem var(--display); }
.breakdown tbody:first-child tr.group th { padding-top: 0; }
.breakdown td:first-child { overflow-wrap: anywhere; }
#id_mode, #id_addresses { grid-template-columns: minmax(0, 1fr); }
.outreach-owner .panel + .panel, .outreach-owner details.panel { margin-top: 20px; }
.how-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: 10px; }
.how-steps li { padding-left: 4px; }
.ops-table tr.failed td { background: #fdf3f0; }
.outreach-owner details.field > summary { font-weight: 600; cursor: pointer; margin-bottom: 8px; }
#id_contact, #id_public_work, #id_subject, #id_opening { grid-template-columns: minmax(0, 1fr); }

/* ---------- Signing in with a code ---------- */
.auth-foot { margin-top: var(--s3); font-size: 0.95rem; color: var(--muted); }
.code-input { font: 650 1.6rem/1.2 var(--body) !important; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; max-width: 14rem; text-align: left; }
.resend { margin-top: var(--s2); }
.resend p { margin: 0; }

/* ---------- Reading a website at signup ---------- */
.site-read { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: var(--s2) 20px; margin: 0 0 var(--s2); }
.site-read label { display: block; font-weight: 600; margin-bottom: 8px; }
.site-read-row, .hero-start-row { display: flex; gap: 8px; }
.site-read-row input, .hero-start-row input { flex: 1 1 auto; min-width: 0; }
.site-read-row .btn, .hero-start-row .btn { flex: none; }
.site-reading { display: none; margin: 8px 0 0; }
.site-read.htmx-request .site-reading { display: block; }
.site-read.htmx-request .btn { opacity: 0.6; pointer-events: none; }
.drafted { background: #eef5ef; border-left: 4px solid var(--marsh-3); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; margin: 0 0 20px; max-width: none; }
.reading-note { display: flex; align-items: center; gap: 10px; background: var(--reed-wash); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 20px; max-width: none; }
.js .business-fields.reading > :not(.reading-note) { display: none; }
.spinner { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--reed); border-right-color: transparent; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Home: start with a website ---------- */
.hero-start { margin: 0 0 12px; max-width: 34rem; }
.hero-start label { display: block; font-weight: 600; font-size: 0.95rem; color: var(--on-dark); margin-bottom: 6px; }
.hero-start .optional { color: var(--on-dark-2); }
.hero-start input { border-color: transparent; }
.hero-alt { margin: 0 0 4px; }
.hero-alt a { color: #fff; font-weight: 600; }
.setup-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Search page before a search ---------- */
.search-page { min-height: calc(100vh - 60px); }
.search-browse { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s4); align-items: start; margin-top: var(--s4); }
.search-side { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--reed); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; padding: var(--s3); position: sticky; top: var(--s2); }
.search-side h2 { font-size: 1.2rem; margin-bottom: 8px; }
.search-side p { color: var(--muted); }
.side-start { display: grid; gap: 8px; margin-top: var(--s2); }
.side-start label { font-weight: 600; font-size: 0.9rem; }
@media (max-width: 980px) {
  .search-browse { grid-template-columns: minmax(0, 1fr); }
  .search-side { position: static; }
}
@media (max-width: 560px) {
  .site-read-row, .hero-start-row { flex-direction: column; }
  .setup-row.three { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
/* A narrow panel captured on its own is shown near its real size, not stretched to the column. */
.shot[data-shot="S09"], .shot[data-shot="S08"] { max-width: 400px; }
.article .shot[data-shot="S09"] { margin-inline: auto; }
.ops-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 0 0 8px; }
.ops-filter label { display: grid; gap: 2px; font-size: 0.85rem; font-weight: 600; }
.ops-filter input, .ops-filter select { min-height: 36px; padding: 4px 8px; font: inherit; font-weight: 400; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); }
/* Outreach page: how the notices were found, then the notices. */
.found-how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 20px 0; margin: 0 0 var(--s3); }
.found-how .search-log { margin: 0; }
.found-how .search-log li { padding-bottom: 18px; }
.found-how .chips.terms .chip { background: var(--reed-wash); border-color: transparent; }
.start-form { margin: 0 0 var(--s3); }
.start-form .small { flex: 1 1 260px; }
.replay-wait { visibility: hidden; }
.replay-in { animation: arrive 0.45s ease-out both; }
@media (prefers-reduced-motion: reduce) { .replay-in { animation: none; } }
/* A business's page from its email: what was found on the left, one way to start on the right. */
.outreach-page { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas: "head start" "body start" "stop start"; column-gap: var(--s5); align-items: start; }
.op-head { grid-area: head; }
.op-head h1 { margin-bottom: 10px; }
.op-head .lede { color: var(--muted); font-size: 1.08rem; margin-bottom: var(--s3); }
.op-body { grid-area: body; min-width: 0; }
.op-start { grid-area: start; position: sticky; top: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s3); box-shadow: var(--shadow); }
.op-start h2 { font-size: 1.25rem; margin-bottom: 8px; }
.op-start > p { font-size: 0.95rem; }
.op-start .ticks { margin: 8px 0 var(--s2); gap: 6px; }
.op-form label { display: block; font-weight: 650; margin-bottom: 6px; }
.op-form input { width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.op-form .help { margin: 6px 0 14px; font-size: 0.85rem; }
.op-terms { margin: 12px 0 0; line-height: 1.45; }
.op-stop { grid-area: stop; margin-top: var(--s3); }
.found-how h2 { font-size: 1rem; margin: 0 0 12px; }
.op-notices { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.op-notices li { padding: 16px 20px; border-top: 1px solid var(--line); }
.op-notices li:first-child { border-top: 0; }
.op-notices h3 { font-size: 1.05rem; margin: 0 0 4px; }
.op-notices .meta { margin: 0 0 6px; font-size: 0.92rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 10px; }
.op-notices .meta span + span::before { content: "/"; margin-right: 10px; color: var(--line-2); }
.op-when { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 0.92rem; }
.op-dock a.btn { flex: none; }
@media (max-width: 980px) {
  .outreach-page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "start" "stop"; }
  .op-start { position: static; margin-top: var(--s3); }
}
@media (max-width: 560px) {
  .op-notices .meta { display: grid; }
  .op-notices .meta span + span::before { content: none; }
  .op-notices li { padding: 14px 16px; }
}
