/* subsidies.m1au — one small stylesheet for every page.
   Tokens first, then base elements, layout, components, and one block per page. */

:root {
  --blue: #003399;          /* header band, primary buttons, links */
  --blue-line: #2E55B8;     /* rules on blue */
  --on-blue-muted: #C5D0EE;
  --on-blue-soft: #DCE4F7;
  --yellow: #FFCC00;        /* accent, primary action on blue */
  --yellow-soft: #FFE27A;
  --yellow-ink: #5C4500;
  --ink: #0E1A3A;
  --text: #2F3A56;
  --muted: #4F5B76;
  --ground: #F5F7FC;
  --card: #FFFFFF;
  --line: #D5DCEC;
  --input: #7F8AA6;
  --tint: #E3EAFB;
  --neutral: #E8ECF5;
  --danger: #8A1C1C;
  --radius: 10px;
  --radius-sm: 6px;
  --touch: 44px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--font-body); overflow-x: hidden; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; }
p { margin: 0; }
img, svg { flex: 0 0 auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.on-blue :focus-visible, .on-blue:focus-visible { outline-color: var(--yellow); }
input, select, button, textarea { font: inherit; color: inherit; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 10px 16px; background: var(--yellow); color: var(--ink); font-weight: 600; border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; }
main:focus { outline: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--font-mono); }
.danger-text { color: var(--danger); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.between { justify-content: space-between; }

/* ---- Layout ---- */
.container { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.page { padding-top: 48px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.page--tight { padding-top: 32px; gap: 40px; }
.band { background: var(--blue); color: #fff; }
.band--white { background: var(--card); border-top: 1px solid var(--line); }
.section { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.section + .section, .section-rule { border-top: 1px solid var(--line); }

/* ---- Header and footer ---- */
.site-header { background: var(--blue); color: #fff; }
.site-header .container { padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: var(--touch); color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand-name span { color: var(--on-blue-muted); font-weight: 500; }
.header-bar { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a, .header-actions a, .header-actions .linkish {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 14px; color: #fff; text-decoration: none;
}
.nav a:hover, .header-actions a:hover { color: #fff; text-decoration: underline; }
.nav a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 -3px 0 var(--yellow); }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.header-user { color: var(--on-blue-muted); font-size: 15px; overflow-wrap: anywhere; }
.header-actions form { margin: 0; }
.header-actions .linkish { border: 0; background: none; color: var(--on-blue-muted); cursor: pointer; padding: 0 12px; }
.header-actions .linkish:hover { color: #fff; text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { padding-top: 32px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 48px; }
.site-footer p { max-width: 44em; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); }

/* ---- Type ---- */
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.on-blue .eyebrow { color: var(--on-blue-muted); }
.display { font-size: clamp(36px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; }
.display--hero { font-size: clamp(38px, 4.6vw, 62px); }
.marker { background: linear-gradient(transparent 68%, var(--yellow) 68%); }
.lead { max-width: 34em; font-size: 18px; color: var(--text); text-wrap: pretty; }
.h-section { font-size: 34px; letter-spacing: -0.02em; }
.h-block { font-size: 26px; }
.h-card { font-size: 22px; }
.prose { max-width: 42em; font-size: 17px; color: var(--ink); text-wrap: pretty; white-space: pre-line; }

/* ---- Buttons and links ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--blue); color: #fff;
}
.btn:hover { color: #fff; background: #002a80; }
.btn--small { min-height: var(--touch); padding: 0 16px; }
.btn--accent { background: var(--yellow); color: var(--ink); }
.btn--accent:hover { background: #ffd633; color: var(--ink); }
.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); font-weight: 500; }
.btn--outline:hover { background: var(--card); color: var(--ink); }
.btn--outline-blue { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn--outline-blue:hover { background: var(--tint); color: var(--blue); }
.btn--on-blue { background: transparent; border-color: #fff; color: #fff; }
.btn--on-blue:hover { background: var(--blue-line); color: #fff; }
.btn--block { display: flex; width: 100%; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); padding: 0; border: 0; background: none; color: var(--blue); text-decoration: underline; cursor: pointer; }
.btn-link--danger { color: var(--danger); }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: var(--touch); font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: var(--touch); color: var(--ink); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 14px; font-weight: 600; }
.control {
  height: 48px; width: 100%; padding: 0 12px; border: 1px solid var(--input); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink);
}
.control--short { height: var(--touch); width: auto; }
.control--narrow { width: 5em; }
.help { font-size: 14px; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--touch); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--blue); }
.check--top { align-items: flex-start; }
.check--top input { margin-top: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 14px; border: 1px solid var(--input);
  border-radius: var(--radius-sm); background: var(--card); color: var(--ink); font-weight: 500; cursor: pointer;
}
.pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---- Cards, tags, chips ---- */
.card { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card--blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.card--accent-top { border-top: 4px solid var(--yellow); }
.tag { display: inline-block; font-size: 13px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--card); }
.tag--fill { border-color: transparent; background: var(--neutral); font-size: 14px; padding: 4px 10px; }
.tag--focus { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border: 0; background: var(--yellow); color: var(--ink); }
.tag--quiet { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border: 0; background: var(--neutral); color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.status--open { background: var(--tint); color: var(--blue); }
.status--soon { background: var(--yellow-soft); color: var(--yellow-ink); }
.status--neutral { background: var(--neutral); color: var(--text); }
.status--closed { background: var(--neutral); color: var(--muted); }
.link-chip {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; background: var(--card);
}
.link-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 12px; border: 1px solid var(--blue);
  border-radius: var(--radius-sm); background: var(--tint); color: var(--blue); font-weight: 500; text-decoration: none;
}
.filter-chip:hover { color: var(--ink); }
.notice { padding: 14px 20px; background: var(--tint); border-radius: var(--radius); }
.notice--warn { background: #F9E4E4; color: var(--danger); }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; }
.checklist svg { margin-top: 3px; }

/* ---- Home ---- */
.hero { padding-top: 72px; padding-bottom: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 56px; align-items: start; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.board { display: flex; flex-direction: column; padding: 28px; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 18px; }
.board-head h2 { font-size: 24px; }
.board-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: var(--touch);
  padding: 14px 0; border-top: 1px solid var(--blue-line); color: var(--ground); text-decoration: none;
}
.board-row:hover { color: #fff; }
.board-row:hover .board-title { text-decoration: underline; }
.board-date { font-family: var(--font-mono); font-size: 15px; }
.board-title { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.board-funder { display: block; font-size: 13px; color: var(--on-blue-muted); }
.board-left { font-family: var(--font-mono); font-size: 15px; color: var(--yellow); white-space: nowrap; }
.board-more { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--blue-line); color: var(--ground); font-weight: 600; text-decoration: none; }
.board-more:hover { color: #fff; text-decoration: underline; }
.board-empty { padding: 14px 0; border-top: 1px solid var(--blue-line); color: var(--on-blue-soft); }
.stats-wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.stats-wrap h2 { font-size: 24px; }
.stats { flex: 2 1 520px; align-content: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 1px; background: var(--blue-line); border: 1px solid var(--blue-line); border-radius: var(--radius); overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 4px; min-height: var(--touch); padding: 18px 20px; background: var(--blue); color: #fff; text-decoration: none; }
.stat:hover { background: #0a3ca3; color: #fff; }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -0.01em; }
.stat-label { font-size: 14px; color: var(--on-blue-soft); }
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.group { display: flex; flex-direction: column; gap: 16px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.group p { color: var(--text); }
.src-count { flex: 0 0 auto; font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.group-all { margin-top: auto; font-weight: 600; text-decoration: none; }
.group-all:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px; }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 3px solid var(--yellow); }
.step-num { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.step p { color: var(--text); }

/* Hero: the map of Europe behind the copy, the fit read card on the right */
.hero-map { background: #F2F7FC url(/static/hero-map.webp) right center / cover no-repeat; }
.hero-map .hero { align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero-actions { gap: 12px; }
.btn--large { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn--outline-blue.btn--large { border-width: 2px; }
.hero-note { padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.fit-card--raised { padding: 28px; border-top: 4px solid var(--yellow); box-shadow: 0 12px 32px rgba(0, 51, 153, 0.10); }
.fit-card-head { display: flex; flex-direction: column; gap: 2px; }
.fit-card-head .fit-eyebrow { font-size: 12px; letter-spacing: 0.08em; }
.fit-title { font-size: 24px; }
.header-actions .header-cta { padding: 0 16px; color: var(--ink); font-weight: 600; }
.header-actions .header-cta:hover { color: var(--ink); text-decoration: none; }

/* Open right now: one big number, the Polish subset, then the breakdown */
.stats-split { display: flex; flex-wrap: wrap; gap: 24px; }
.stats-lead { flex: 1 1 340px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.stats-big { display: flex; flex-direction: column; gap: 8px; color: #fff; text-decoration: none; }
.stats-big:hover { color: #fff; }
.stats-big:hover .stats-big-label { text-decoration: underline; }
.stats-big-num { font-family: var(--font-head); font-weight: 700; font-size: clamp(72px, 9vw, 128px); line-height: 0.9; letter-spacing: -0.04em; color: var(--yellow); }
.stats-big-label { font-size: 20px; font-weight: 600; }
.stats-pl { display: flex; align-items: center; gap: 16px; min-height: var(--touch); padding: 16px 18px; background: var(--card); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.stats-pl:hover { color: var(--blue); }
.stats-pl-num { font-family: var(--font-head); font-weight: 700; font-size: 36px; line-height: 1; color: var(--blue); }
.stats-pl-label { flex: 1 1 auto; }

/* Free to try, free to keep */
.section-head { display: flex; flex-direction: column; gap: 8px; }
.section-lead { max-width: 40em; color: var(--text); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.offer { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.offer-head { display: flex; flex-direction: column; gap: 2px; }
.offer-head .h-block { font-size: 24px; }
.on-blue .offer-eyebrow { color: var(--yellow); }
.offer-list { margin: 0; padding: 0; list-style: none; }
.offer-list li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.offer-list svg { margin-top: 3px; }
.on-blue .offer-list li { border-top-color: var(--blue-line); }
.offer .arrow-link { margin-top: auto; }
.offer-cta { align-self: flex-start; margin-top: auto; }

/* Where it looks: sources as chips */
.chip-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list .link-chip { gap: 8px; }
.chip-count { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* Fit read result: keep it with an account */
.fit-keep { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 24px 28px; }
.fit-keep-copy { gap: 6px; max-width: 40em; }
.fit-keep-copy p { color: var(--on-blue-soft); }

/* ---- All grants ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div { display: flex; flex-direction: column; gap: 8px; }
.page-title { font-size: clamp(36px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.025em; }
.with-sidebar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.sidebar { flex: 1 1 250px; max-width: 100%; display: flex; flex-direction: column; gap: 28px; }
.results-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.filters-toggle { display: none; }
.filters-body { display: flex; flex-direction: column; gap: 28px; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group .check-list { display: flex; flex-direction: column; }
.sidebar-rule { padding-top: 20px; border-top: 1px solid var(--line); }
.more-filters summary, .alert-box summary { display: flex; align-items: center; gap: 8px; min-height: var(--touch); cursor: pointer; font-weight: 600; }
.more-filters[open] summary, .alert-box[open] summary { margin-bottom: 12px; }
.alert-box form { display: flex; flex-direction: column; gap: 14px; }
.lock-link { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.tabs a:hover { color: var(--ink); }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.result-count { font-family: var(--font-mono); font-size: 15px; }
.sort { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sort label { font-size: 14px; color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.result-when { flex: 0 0 168px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.result-date { font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.result-main { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.result-h { margin: 0; font: inherit; }
.result-title { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.25; color: var(--ink); text-decoration: none; text-wrap: pretty; overflow-wrap: anywhere; }
.result-title:hover { color: var(--blue); text-decoration: underline; }
.result-funder { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.result-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.result-amount { flex: 0 0 auto; font-family: var(--font-mono); font-size: 16px; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 40px 28px; border: 1px dashed var(--input); border-radius: var(--radius); }
.empty-state h2 { font-size: 24px; }
.pager { display: flex; justify-content: space-between; gap: 16px; }

/* ---- Grant overview ---- */
.grant-head { display: flex; flex-direction: column; gap: 14px; }
.grant-head .display { max-width: 18em; overflow-wrap: anywhere; }
.orig-title { color: var(--muted); font-size: 17px; }
.key-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.key-facts > div { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--card); }
.key-facts dt { font-size: 13px; color: var(--muted); }
.key-facts dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 22px; overflow-wrap: anywhere; }
.key-facts dd.sub { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--yellow-ink); }
.detail-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.detail-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.detail-aside { flex: 1 1 320px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.detail-section { display: flex; flex-direction: column; gap: 14px; }
.facts-list { margin: 0; }
.facts-list > div { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts-list > div:last-child { border-bottom: 1px solid var(--line); }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.dates-list > div { grid-template-columns: 132px minmax(0, 1fr); }
.dates-list dt { font-family: var(--font-mono); font-size: 15px; }
.dates-list .is-deadline dt { color: var(--ink); font-weight: 500; }
.dates-list .is-deadline dd { font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); }
.table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.table .mono { font-size: 14px; white-space: nowrap; }
.similar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.similar a { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.similar a:hover { border-color: var(--blue); }
.similar a:hover .similar-title { text-decoration: underline; }
.similar-when { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.similar-when.is-soon { color: var(--yellow-ink); }
.similar-title { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.similar-locked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.similar-locked p { display: flex; gap: 10px; max-width: 40em; color: var(--text); }
.similar-locked p svg { margin-top: 3px; color: var(--blue); }
.deadline-box { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.deadline-head { display: flex; flex-direction: column; gap: 4px; }
.deadline-num { font-family: var(--font-head); font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: -0.02em; color: var(--yellow); }
.deadline-num--text { font-size: 36px; }
.deadline-date { font-family: var(--font-mono); font-size: 15px; color: var(--ground); }
.deadline-box p { font-size: 14px; color: var(--on-blue-soft); }
.deadline-box a:not(.btn) { color: #fff; }
.disclaimer { font-size: 14px; color: var(--muted); max-width: 42em; }

/* ---- Sign in ---- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-panel { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 48px; background: var(--blue); color: #fff; }
.auth-panel .brand-name { font-size: 22px; }
.auth-panel .stack { gap: 24px; }
.auth-panel h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.03em; }
.auth-panel h1 span { color: var(--yellow); }
.auth-panel .checklist { display: flex; flex-direction: column; gap: 12px; font-size: 18px; }
.auth-main { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.auth-box h2 { font-size: 28px; letter-spacing: -0.01em; }

/* ---- Saved searches ---- */
.saved-list { display: flex; flex-direction: column; gap: 20px; }
.saved-card { display: flex; flex-direction: column; gap: 16px; }
.saved-card h2 { font-size: 22px; overflow-wrap: anywhere; }
.saved-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; align-items: end; }
.saved-form fieldset { grid-column: 1 / -1; }
.inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.saved-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* ---- Sources (admin) ---- */
.sources-table td { font-size: 14px; }
.sources-table tr.is-bad td { background: #FBEDED; }
.sources-table tr.is-off td { color: var(--muted); }
.sources-table .err { display: block; max-width: 36em; font-size: 13px; color: var(--danger); overflow-wrap: anywhere; }

/* ---- Plans ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 20px; }
.plan.card--accent-top { padding-top: 21px; }  /* the 4px accent border, so the three headers line up */
.plan-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.plan-price { font-family: var(--font-head); font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.plan-price--tba { font-size: 22px; color: var(--muted); }
.plan-per { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--muted); }
.plan-features { display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.plan-cta { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.plan-cta [aria-disabled="true"] { cursor: default; color: var(--muted); border-color: var(--line); }
.plan-cta [aria-disabled="true"]:hover { background: transparent; color: var(--muted); }

.plans-intro { gap: 8px; }
.compare-table { min-width: 640px; }
.compare-table th[scope="row"] { font-weight: 400; font-size: 15px; color: var(--ink); }
.compare-table td { width: 18%; }
.compare-table thead th { color: var(--ink); font-size: 15px; white-space: nowrap; }
.compare-table thead .status { margin-left: 6px; }
.compare-group th { padding-top: 20px; background: var(--ground); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.compare-no { color: var(--input); }

/* ---- Legal pages ---- */
.legal { max-width: 46em; display: flex; flex-direction: column; gap: 14px; color: var(--text); font-size: 16px; }
.legal h2 { margin-top: 20px; font-size: 22px; color: var(--ink); }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal strong { color: var(--ink); }
.legal .table td { font-size: 15px; }
mark.todo { background: var(--yellow-soft); color: var(--yellow-ink); padding: 0 4px; border-radius: 3px; }

/* ---- Fit read ---- */
.fit-card { display: flex; flex-direction: column; gap: 16px; }
.fit-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.fit-row--site { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.fit-upload { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1px dashed var(--input); border-radius: var(--radius-sm); background: var(--card); font-weight: 600; color: var(--ink); cursor: pointer; overflow: hidden; }
.fit-upload:hover { background: var(--tint); }
.fit-upload:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.fit-upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fit-submit { min-height: 52px; font-size: 17px; }
.fit-notice { color: var(--text); margin-top: -4px; }
.fit-eyebrow { color: var(--blue); font-weight: 500; }
.fit-errors { margin: 0; padding-left: 18px; }
.control--file { padding-top: 10px; padding-bottom: 10px; height: auto; }
.fit-steps, .fit-progress { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.fit-steps li, .fit-progress li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.fit-progress { max-width: 40em; }
.fit-progress li { color: var(--muted); }
.fit-progress li.is-now { color: var(--ink); }
.fit-progress li.is-now::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--yellow); animation: fit-pulse 1s ease-in-out infinite alternate; }
.fit-progress li.is-done { color: var(--text); text-decoration: line-through; text-decoration-color: var(--line); }
@keyframes fit-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fit-progress li.is-now::after { animation: none; } }
.fit-new { max-width: 760px; }
.fit-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 32px 48px; align-items: start; }
.fit-head-main { gap: 10px; }
.match { display: flex; flex-direction: column; gap: 16px; }
.match-title { font-size: 28px; letter-spacing: -0.015em; }
.match-title a { color: var(--ink); text-decoration: none; }
.match-title a:hover { text-decoration: underline; }
.match-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.match-facts dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.match-facts dd { margin: 4px 0 0; font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--ink); }
.match-score { color: #2E7D32 !important; }
.match-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.match-h { font-size: 16px; margin-bottom: 8px; }
.match-list { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.match-list--gaps { margin: 0; padding-left: 20px; }
.match-next { padding: 12px 16px; background: var(--ground); border-radius: var(--radius-sm); color: var(--text); }
.fit-upsell a { font-weight: 600; }
.fit-excerpt { margin: 0; max-height: 320px; overflow: auto; padding: 12px; background: var(--ground); border-radius: var(--radius-sm); font: 13px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.fit-oneline { font-size: 18px; color: var(--ink); max-width: 36em; }
.fit-found { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px; }
.fit-found-list { margin: 0; display: flex; flex-direction: column; }
.fit-found-list > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 52px; border-top: 1px solid var(--line); }
.fit-found-list > div:first-child { border-top: 0; }
.fit-found-list dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fit-found-list dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.fit-found-value { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fit-found-list dd > a { font-size: 14px; font-weight: 600; white-space: nowrap; }
.fit-found-add { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px dashed var(--input); border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.fit-found-add:hover { background: var(--tint); color: var(--ink); }
.fit-edit { border-top: 1px solid var(--line); padding-top: 4px; }
.fit-edit summary { cursor: pointer; font-weight: 600; color: var(--blue); min-height: var(--touch); display: flex; align-items: center; }
.fit-edit-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 8px; }
.fit-trl-note a { font-weight: 600; }
.fit-read { display: flex; flex-direction: column; gap: 14px; }
.fit-read-desc { font-size: 17px; color: var(--ink); max-width: 46em; }
.fit-read-facts { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fit-read-facts > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
.fit-read-facts dt { color: var(--muted); font-size: 14px; }
.fit-read-facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.fit-read-raw summary { cursor: pointer; font-weight: 600; color: var(--blue); min-height: var(--touch); display: flex; align-items: center; }
@media (max-width: 900px) { .fit-head { grid-template-columns: 1fr; } .hero-map { background-image: none; } }
@media (max-width: 480px) {
  .fit-row--site, .fit-read-facts > div { grid-template-columns: 1fr; }
  .fit-found-list > div { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
}

/* ---- Phones ---- */
@media (max-width: 720px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .page { padding-top: 32px; }
  .hero, .hero-map .hero { padding-top: 40px; padding-bottom: 48px; gap: 40px; }
  .section { padding-top: 48px; padding-bottom: 48px; }
  .h-section { font-size: 28px; }
  .board, .deadline-box { padding: 20px; }
  .board-row { grid-template-columns: 56px minmax(0, 1fr); }
  .board-left { grid-column: 2; }
  .auth-panel { padding: 32px 16px; gap: 32px; }
  .facts-list > div, .dates-list > div { grid-template-columns: 1fr; gap: 2px; }
  .result-when { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .js .filters-toggle { display: inline-flex; }
  .js .sidebar.is-collapsed .filters-body { display: none; }
}
