/* PastWins design system. Fonts are self-hosted (OFL) so no third party sees visitors. */
@font-face { font-family: "Plex Sans"; src: url(/static/fonts/ibm-plex-sans.woff2) format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/static/fonts/ibm-plex-sans-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/static/fonts/ibm-plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/static/fonts/ibm-plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url(/static/fonts/source-serif-4.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* type scale, ~1.2 ratio; headings in serif, everything else in sans */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.25rem;
  --t-3xl: clamp(2.25rem, 1.4rem + 3.2vw, 3.5rem);

  /* 4px spacing grid */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem;

  --paper: #f8f7f4;
  --surface: #ffffff;
  --sunk: #f1efea;
  --ink: #111a24;
  --ink-2: #374250;
  --muted: #66707c;
  --line: #e3e0d9;
  --line-2: #cdc8be;

  --accent: #1d4fa8;
  --accent-hover: #153d85;
  --accent-wash: #edf2fb;

  --strong: #17714a;   --strong-wash: #e6f3ec;
  --possible: #9a5b00; --possible-wash: #fbf0dc;
  --long: #5b6672;     --long-wash: #eef0f2;
  --check: #b3261e;    --check-wash: #fcebe9;

  --r-sm: 4px;
  --r: 8px;
  --shadow: 0 1px 2px rgba(17, 26, 36, 0.05), 0 1px 0 rgba(17, 26, 36, 0.03);
  --wrap: 1120px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 var(--t-base)/1.55 var(--sans); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-md); font-family: var(--sans); letter-spacing: 0; line-height: 1.35; }
p { margin: 0 0 var(--s4); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
strong { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--s5); }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.kicker { font: 500 var(--t-xs)/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 var(--s3); }
.lede { font-size: var(--t-md); color: var(--ink-2); max-width: 60ch; }
.prose { max-width: var(--measure); }

/* ---------- buttons and inputs ---------- */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font: 600 var(--t-base)/1 var(--sans); padding: 0 var(--s5); height: 48px; white-space: nowrap;
  color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r);
  cursor: pointer; text-decoration: none; transition: background 0.12s, border-color 0.12s;
}
.btn:hover, button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm, button.btn-sm { height: 36px; padding: 0 var(--s4); font-size: var(--t-sm); }
.btn-ghost, button.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover, button.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
input:not([type=checkbox]):not([type=radio]) {
  font: 400 var(--t-base)/1.2 var(--sans); color: var(--ink); width: 100%;
  height: 48px; padding: 0 var(--s4); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color 0.12s, box-shadow 0.12s;
}
input::placeholder { color: #8b939c; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.field { display: grid; gap: var(--s2); font-weight: 500; font-size: var(--t-sm); }
.field .hint { font-weight: 400; color: var(--muted); }
.inline-form { display: flex; gap: var(--s2); }
.inline-form input { flex: 1 1 auto; min-width: 0; }
.lookup input { font-size: var(--t-md); height: 56px; padding: 0 var(--s4); }
.lookup .btn, .lookup button { height: 56px; padding: 0 var(--s6); }
.mono-input { font-family: var(--mono) !important; letter-spacing: 0.02em; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.callout { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: var(--s3) var(--s4); border-radius: 0 var(--r) var(--r) 0; color: var(--ink-2); }
.callout p:last-child { margin: 0; }
.callout.warn { border-color: var(--possible); background: var(--possible-wash); }
.error { color: var(--check); font-weight: 600; }
.ok { color: var(--strong); font-weight: 600; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--s2); border-radius: 999px; font: 500 var(--t-xs)/1 var(--sans); background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
a.pill { text-decoration: none; }
a.pill:hover { background: var(--line); color: var(--ink); }
.pill.sa { background: var(--accent-wash); color: var(--accent-hover); }

/* ---------- header ---------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: var(--s6); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); font: 700 1.2rem/1 var(--serif); letter-spacing: -0.015em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 22px; height: 22px; flex: none; }
.site-nav { display: flex; gap: var(--s5); margin-right: auto; }
.site-nav a, .head-actions a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 500; }
.site-nav a:hover, .head-actions a:not(.btn):hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--ink); padding-bottom: 2px; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s4); }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #b9c0c8; margin-top: var(--s8); font-size: var(--t-sm); }
.site-foot a { color: #e7eaee; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s6); padding: var(--s8) 0 var(--s7); }
.foot-grid .brand { color: #fff; margin-bottom: var(--s4); }
.foot-grid .brand:hover { text-decoration: none; }
.foot-about { max-width: 36ch; margin: 0; line-height: 1.6; }
.foot-col h2 { font: 500 var(--t-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: #8a939e; margin: var(--s2) 0 var(--s4); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.foot-legal { border-top: 1px solid #27313d; padding: var(--s5) 0 var(--s6); display: flex; justify-content: space-between; gap: var(--s5); font-size: var(--t-xs); color: #8a939e; line-height: 1.6; }
.foot-legal p { margin: 0; }
.foot-legal .disclaimer { max-width: 70ch; }
.foot-legal .copy { white-space: nowrap; }

/* ---------- page scaffolding ---------- */
.page-head { padding: var(--s7) 0 var(--s5); }
.page-head h1 { margin-bottom: var(--s3); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s4); font-size: var(--t-sm); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.section { padding: var(--s8) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s5); }

/* narrow single-purpose pages: sign in, messages, errors */
.panel-page { padding: var(--s8) var(--s5); display: flex; justify-content: center; }
.panel { width: 100%; max-width: 480px; padding: var(--s6); }
.panel h1 { font-size: var(--t-xl); margin-bottom: var(--s3); }
.panel .actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.panel form { margin: 0; }
.panel .stack { display: grid; gap: var(--s3); }

/* ---------- home ---------- */
.hero { padding: var(--s8) 0 var(--s8); border-bottom: 1px solid var(--line); background: var(--surface); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s8); align-items: center; }
.hero h1 { font-size: var(--t-3xl); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: var(--s5); }
.hero .lede { margin-bottom: var(--s6); }
.hero .lookup { margin-bottom: var(--s3); }
.hero .fine { font-size: var(--t-sm); color: var(--muted); margin: 0; }
.hero .newfirm { margin-top: var(--s5); font-size: var(--t-sm); max-width: 56ch; }
.sample { position: relative; }
.sample-label { position: absolute; top: -10px; left: var(--s4); background: var(--surface); padding: 0 var(--s2); font: 500 var(--t-xs)/20px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-sm); }
.sample .match { box-shadow: 0 12px 32px -12px rgba(17, 26, 36, 0.18), var(--shadow); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: var(--paper); }
.stats div { padding: var(--s5) var(--s5) var(--s5) 0; }
.stats div + div { padding-left: var(--s5); border-left: 1px solid var(--line); }
.stats dt { font-size: var(--t-sm); color: var(--muted); order: 2; }
.stats dd { margin: 0 0 var(--s1); font: 600 var(--t-xl)/1.1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.stats div { display: flex; flex-direction: column; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: start; }
.split h2 { margin-bottom: var(--s4); }
.weights { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.weights th { text-align: left; font: 500 var(--t-xs)/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 0 var(--s3); border-bottom: 1px solid var(--line-2); }
.weights th.n, .weights td.n { text-align: right; width: 6.5rem; }
.weights td { padding: var(--s3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.weights td strong { display: block; }
.weights td span { color: var(--muted); }
.weights td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.bar { display: inline-block; height: 6px; background: var(--ink); border-radius: 1px; vertical-align: middle; margin-right: var(--s2); }

.bands { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-top: var(--s5); }
.bands div { padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.bands b { display: block; font-size: var(--t-sm); }
.bands span { font-size: var(--t-xs); color: var(--muted); }
.bands .b-strong b { color: var(--strong); } .bands .b-possible b { color: var(--possible); }
.bands .b-long b { color: var(--long); } .bands .b-check b { color: var(--check); }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); counter-reset: pt; }
.points div { border-top: 2px solid var(--ink); padding-top: var(--s4); }
.points h3 { font-family: var(--serif); font-size: var(--t-lg); margin-bottom: var(--s2); }
.points p { color: var(--ink-2); margin: 0; }

.browse { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--s6); list-style: none; padding: 0; margin: 0; }
.browse li a { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.browse li a:hover span:first-child { text-decoration: underline; }
.browse .count { font-family: var(--mono); font-size: var(--t-sm); color: var(--muted); }

/* ---------- lookup CTA block ---------- */
.cta { margin: var(--s6) 0; padding: var(--s5) var(--s6); background: var(--ink); color: #dfe4ea; border-radius: var(--r); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: center; }
.cta h2 { color: #fff; font-size: var(--t-lg); margin-bottom: var(--s2); }
.cta p { margin: 0; font-size: var(--t-sm); color: #b9c0c8; }
.cta input:not([type=checkbox]) { border-color: transparent; }
.cta .btn, .cta button { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn:hover, .cta button:hover { background: var(--accent-wash); border-color: var(--accent-wash); color: var(--ink); }
.side .cta, .notice-side .cta { display: block; padding: var(--s5); margin: 0; }
.side .cta .inline-form, .notice-side .cta .inline-form { flex-direction: column; margin-top: var(--s4); }

/* ---------- results ---------- */
.company-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--s6) 0 var(--s5); }
.company-head .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s6); flex-wrap: wrap; }
.company-head h1 { font-size: var(--t-2xl); margin-bottom: var(--s2); }
.company-head .ids { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--t-sm); margin: 0; }
.facts { display: flex; gap: 0; margin: 0; }
.facts div { padding: 0 var(--s5); border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: var(--t-xs); color: var(--muted); margin-bottom: var(--s1); }
.facts dd { margin: 0; font: 600 var(--t-lg)/1.1 var(--serif); font-variant-numeric: tabular-nums lining-nums; }

.results-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s6); padding-top: var(--s6); align-items: start; }
.side { display: grid; gap: var(--s4); position: sticky; top: var(--s4); }
.side-block { padding: var(--s4) var(--s5); }
.side-block h2 { font: 600 var(--t-sm)/1.3 var(--sans); margin-bottom: var(--s3); }
.side-block p, .side-block li { font-size: var(--t-sm); color: var(--ink-2); }
.side-block p:last-child { margin: 0; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.legend li { display: flex; gap: var(--s2); align-items: baseline; }
.legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; transform: translateY(-1px); }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s3); }
.list-head h2 { font-size: var(--t-lg); }
.status-note { margin-bottom: var(--s4); font-size: var(--t-sm); }

.profile { margin-bottom: var(--s4); }
.profile summary { cursor: pointer; list-style: none; padding: var(--s3) var(--s4); font-weight: 600; font-size: var(--t-sm); display: flex; justify-content: space-between; align-items: center; }
.profile summary::-webkit-details-marker { display: none; }
.profile summary::after { content: "Edit"; font-weight: 500; color: var(--accent); }
.profile[open] summary::after { content: "Close"; }
.profile[open] summary { border-bottom: 1px solid var(--line); }
.profile form { display: grid; gap: var(--s5); padding: var(--s5) var(--s4); }
.profile fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2) var(--s4); }
.profile legend { font-weight: 500; font-size: var(--t-sm); margin-bottom: var(--s3); padding: 0; }
.profile .check { display: flex; gap: var(--s2); align-items: center; font-size: var(--t-sm); cursor: pointer; }
.profile .form-actions { display: flex; align-items: center; gap: var(--s3); }
.spin { display: none; }
.htmx-request .spin, .htmx-request.spin { display: inline; }

.matches { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.match { display: grid; grid-template-columns: 76px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.match .score { --c: var(--long); --w: var(--long-wash); background: var(--w); padding: var(--s4) var(--s2); text-align: center; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.match .score b { font: 600 2rem/1 var(--serif); color: var(--c); font-variant-numeric: tabular-nums lining-nums; }
.match .score span { font: 600 0.6875rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--c); }
.match .meter { width: 40px; height: 4px; background: rgba(17, 26, 36, 0.08); border-radius: 2px; overflow: hidden; }
.match .meter i { display: block; height: 100%; background: var(--c); }
.match .body { padding: var(--s4) var(--s5); }
.match h3 { font-size: var(--t-base); margin-bottom: var(--s1); }
.match h3 a { color: var(--ink); text-decoration: none; }
.match h3 a:hover { color: var(--accent); text-decoration: underline; }
.match .where { margin: 0 0 var(--s3); font-size: var(--t-sm); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 0 0 var(--s3); font-size: var(--t-sm); }
.due { font-size: var(--t-sm); color: var(--ink-2); }
.due strong { color: var(--ink); }
.due.soon strong { color: var(--possible); }
.reasons { list-style: none; margin: 0; padding: var(--s3) 0 0; border-top: 1px dashed var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s1) var(--s5); font-size: var(--t-sm); color: var(--ink-2); }
.reasons li { position: relative; padding-left: 20px; }
.reasons li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 9px; height: 5px; border-left: 2px solid var(--strong); border-bottom: 2px solid var(--strong); transform: rotate(-45deg); }
.reasons li.warn { color: var(--possible); }
.reasons li.warn::before { border: 0; transform: none; width: 0; height: 0; top: 0.35em; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--possible); left: 0; }
.reasons li.warn.hard { color: var(--check); font-weight: 600; }
.reasons li.warn.hard::before { border-bottom-color: var(--check); }
.band-strong .score { --c: var(--strong); --w: var(--strong-wash); }
.band-possible .score { --c: var(--possible); --w: var(--possible-wash); }
.band-check-eligibility .score { --c: var(--check); --w: var(--check-wash); }
.filtered { margin-top: var(--s4); font-size: var(--t-sm); color: var(--muted); }

.subscribe { padding: var(--s4) var(--s5); }
.subscribe h2 { font: 600 var(--t-sm)/1.3 var(--sans); margin-bottom: var(--s1); }
.subscribe p { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: var(--s3); }
.subscribe .inline-form { flex-direction: column; }
.subscribe .inline-form input, .subscribe .inline-form button { height: 40px; font-size: var(--t-sm); }
.subscribe .ok, .subscribe .error { margin: 0; font-size: var(--t-sm); }

/* ---------- notice lists (agency, NAICS) ---------- */
.facet-head .meta-line { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--t-sm); color: var(--muted); margin: 0; }
.related { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s4) 0 0; padding: 0; list-style: none; }
.related a { display: inline-flex; align-items: center; gap: var(--s2); height: 30px; padding: 0 var(--s3); border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--t-sm); color: var(--ink-2); text-decoration: none; background: var(--surface); }
.related a:hover { border-color: var(--ink); color: var(--ink); }
.related a span { color: var(--muted); font-family: var(--mono); font-size: var(--t-xs); }
.related-label { font-size: var(--t-sm); font-weight: 500; margin: var(--s5) 0 0; }

.opps { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-2); }
.opps li { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: var(--s5); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.opps .t { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.35; }
.opps .t:hover { color: var(--accent); text-decoration: underline; }
.opps .sub { margin: var(--s1) 0 var(--s2); font-size: var(--t-sm); color: var(--muted); }
.opps .tags { margin: 0; }
.opps .when { text-align: right; font-size: var(--t-sm); color: var(--muted); }
.opps .when strong { display: block; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s5); font-size: var(--t-sm); color: var(--muted); }
.empty { padding: var(--s7) var(--s5); text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }

/* index of agencies / NAICS */
.filter { max-width: 420px; margin: var(--s5) 0 var(--s4); }
.facets { list-style: none; padding: 0; margin: 0; columns: 2 320px; column-gap: var(--s7); }
.facets li { break-inside: avoid; }
.facets li a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: var(--t-sm); }
.facets li a:hover .nm { text-decoration: underline; color: var(--accent); }
.facets .count { font-family: var(--mono); font-size: var(--t-xs); color: var(--muted); }
.facets .code { font-family: var(--mono); margin-right: var(--s2); color: var(--ink-2); }

/* ---------- single notice ---------- */
.notice-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s7); align-items: start; }
.notice-grid h1 { font: 600 var(--t-lg)/1.3 var(--sans); letter-spacing: -0.005em; margin: var(--s3) 0; overflow-wrap: anywhere; }
.notice-grid .agency-line { color: var(--ink-2); margin: 0 0 var(--s5); }
.facts-card { padding: var(--s2) var(--s5); }
.facts-card dl { margin: 0; }
.facts-card div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.facts-card div:last-child { border-bottom: 0; }
.facts-card dt { color: var(--muted); }
.facts-card dd { margin: 0; overflow-wrap: anywhere; }
.desc h2 { font-size: var(--t-lg); margin: var(--s6) 0 var(--s3); }
.desc-text { white-space: pre-line; font-size: var(--t-base); color: var(--ink-2); line-height: 1.65; overflow-wrap: anywhere; max-width: var(--measure); }
.notice-side { display: grid; gap: var(--s4); position: sticky; top: var(--s4); }

/* ---------- legal ---------- */
.legal { max-width: var(--measure); padding: var(--s7) 0 0; }
.legal h1 { margin-bottom: var(--s2); }
.legal h2 { font-size: var(--t-lg); margin: var(--s6) 0 var(--s3); }
.legal p, .legal li { color: var(--ink-2); line-height: 1.7; }
.legal ul { padding-left: var(--s5); }
.legal li { margin-bottom: var(--s2); }

/* ---------- account ---------- */

.account .row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s4) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.account .row:last-child { border-bottom: 0; }
.account .k { color: var(--muted); }

.account form { margin: 0; }
.picks { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.picks a { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.picks a:hover { border-color: var(--ink); }
.picks .who { display: grid; gap: 2px; }
.picks .who span { font-size: var(--t-xs); color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .split, .results-grid, .notice-grid { grid-template-columns: 1fr; }
  .hero .wrap { gap: var(--s7); }
  .side, .notice-side { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .cta { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 720px) {
  .site-nav { display: none; }
  .wrap { padding-inline: var(--s4); }
  .hero { padding: var(--s7) 0; }
  .stats { grid-template-columns: 1fr; }
  .stats div, .stats div + div { padding: var(--s4) 0; border-left: 0; }
  .stats div + div { border-top: 1px solid var(--line); }
  .points, .bands, .browse { grid-template-columns: 1fr 1fr; }
  .points { grid-template-columns: 1fr; gap: var(--s5); }
  .section { padding: var(--s7) 0; }
  .lookup.inline-form { flex-direction: column; }
  .lookup .btn, .lookup button { width: 100%; }
  .opps li { grid-template-columns: 1fr; gap: var(--s2); }
  .opps .when { text-align: left; }
  .opps .when strong { display: inline; margin-right: var(--s2); }
  .facts { display: grid; grid-template-columns: repeat(3, auto); width: 100%; }
  .facts div { padding: 0 var(--s3); }
  .facts dd { font-size: var(--t-md); }
  .company-head h1 { font-size: var(--t-xl); }
  .match { grid-template-columns: 1fr; }
  .match .score { flex-direction: row; justify-content: flex-start; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s2) var(--s4); gap: var(--s3); }
  .match .score b { font-size: var(--t-lg); }
  .match .body { padding: var(--s4); }
  .foot-legal { flex-direction: column; }
  .account .row { grid-template-columns: 1fr; gap: var(--s2); }
  .panel { padding: var(--s5); }
  .panel-page { padding: var(--s6) var(--s4); }
  .cta { padding: var(--s5); }
}
@media (max-width: 480px) {
  .browse, .bands { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .head-actions .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* account: billing and tracked companies */
.upgrade { padding: var(--s5); margin: var(--s2) 0; background: var(--sunk); border-radius: var(--r); }
.upgrade h2 { font-size: var(--t-lg); margin-bottom: var(--s2); }
.plans { display: flex; gap: var(--s3); flex-wrap: wrap; }
.plans form { margin: 0; }
.tracked { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.tracked li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.add-co { margin-top: var(--s3); }
.add-co input { height: 36px; font-size: var(--t-sm); }
