/* grantfit.eu — 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(--yellow); 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(42px, 5.4vw, 76px); line-height: 1.02; letter-spacing: -0.03em; }
.hero-copy .lead { max-width: 32em; font-size: 19px; color: var(--text); }
.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); }
/* Home "Where the calls come from": regions as tabs on the left, the chosen region's sources on the right.
   Without JavaScript the tabs are hidden and every region's panel shows, one under the other. */
.h-section--big { font-size: clamp(32px, 3.6vw, 44px); text-wrap: balance; }
.section-lead--big { font-size: 18px; }
.coverage { display: flex; flex-wrap: wrap; align-items: stretch; gap: 24px; }
.coverage-tabs { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
html:not(.js) .coverage-tabs { display: none; }
.region-tab {
  display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 20px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.15s ease;
}
.region-tab:hover { border-color: var(--blue); }
.region-tab:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.region-tab-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.region-tab-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 21px; line-height: 1.2; }
.region-tab-name .tag--focus { font-size: 11px; padding: 3px 7px; }
.region-tab-count { font-family: var(--font-head); font-weight: 700; font-size: 28px; line-height: 1; color: var(--blue); }
.region-tab-bar { display: block; height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.region-tab-bar span { display: block; height: 100%; background: var(--blue); }
.region-tab-share { font-size: 14px; color: var(--muted); }
.region-tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.region-tab[aria-selected="true"] .region-tab-count { color: var(--yellow); }
.region-tab[aria-selected="true"] .region-tab-bar { background: var(--blue-line); }
.region-tab[aria-selected="true"] .region-tab-bar span { background: var(--yellow); }
.region-tab[aria-selected="true"] .region-tab-share { color: var(--on-blue-soft); }
.coverage-panel {
  flex: 2 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 28px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius);
}
.js .coverage-panel[data-inactive] { display: none; }
.coverage-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.coverage-title { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }
.coverage-title p { color: var(--text); }
.h-region { font-size: 28px; }
.coverage-count { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; color: var(--muted); }
.coverage-count strong { font-family: var(--font-head); font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: -0.02em; color: var(--blue); }
.coverage-table-head {
  display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--ink);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.coverage-rows { margin: 0; padding: 0; list-style: none; }
.coverage-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; min-height: var(--touch);
  padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.coverage-row-name { font-weight: 600; }
.coverage-row-n { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.coverage-row:hover .coverage-row-name { color: var(--blue); text-decoration: underline; }
.coverage-row-bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.coverage-row-bar span { display: block; height: 100%; background: var(--blue); }
.coverage-row--top .coverage-row-bar span { background: var(--yellow); }
.coverage-empty { padding: 12px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.coverage-cta { align-self: flex-start; }
.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 */

/* 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: var(--blue) !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; }
}

/* All grants: filters apply as they change when JS runs, so the Apply and Sort buttons go. */
.live-filters [data-apply] { display: none; }
.result-amount.is-unknown { color: var(--muted); }

/* Grant page: the fit read invitation and the free-account box (design: Grant overview). */
.fit-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; color: var(--ink); }
.fit-banner a { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: 600; }
.fit-in-grant .fit-card { padding: 24px; border-top: 4px solid var(--yellow); }
.fit-in-grant .fit-title { font-size: 26px; }
.fit-in-grant .fit-eyebrow { display: none; }
.fit-intro { color: var(--text); margin-top: -12px; }
.fit-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 8px 16px; }
.fit-points li { gap: 10px; }
.more-box { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.more-box .h-card { font-size: 20px; }
.lock-list { margin: 0; padding: 0; list-style: none; color: var(--text); }
.lock-list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.lock-list svg { flex: 0 0 auto; margin-top: 3px; }
.more-signin { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--touch); }

/* Fit tiers, as on the design's ranked rows: strong solid blue, possible yellow, long shot grey. */
.tier { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.tier--strong { background: var(--blue); color: #fff; }
.tier--possible { background: var(--yellow); color: var(--ink); }
.tier--long_shot { background: var(--neutral); color: var(--text); }

/* Your fit reads as project cards (design: My projects). */
.project-list { display: flex; flex-direction: column; gap: 20px; max-width: 880px; }
.project { display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.project-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.project-id { display: flex; flex-direction: column; gap: 6px; }
.project-id .eyebrow { font-size: 12px; }
.project-name { font-size: 26px; }
.project-name a { color: inherit; text-decoration: none; }
.project-name a:hover { text-decoration: underline; }
.project-tags { color: var(--text); }
.project-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project-stats div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--card); }
.project-stats dt { font-size: 13px; color: var(--muted); }
.project-stats dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.project-best { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: var(--touch); padding: 14px 16px; background: var(--ground); border-radius: 8px; color: var(--ink); text-decoration: none; }
.project-best:hover .project-best-title { text-decoration: underline; }
.project-best-score { font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--blue); }
.project-best-text { display: flex; flex-direction: column; min-width: 0; }
.project-best-title { font-weight: 600; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Long source names wrap on phones instead of running off the screen. */
.grant-head .status { white-space: normal; max-width: 100%; align-items: flex-start; }
.grant-head .status svg { flex: 0 0 auto; margin-top: 2px; }

/* ---- Header menus by role (design: Menus by role) ---- */
.paid-tag { margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 1px 6px; border-radius: 4px; background: var(--yellow); color: var(--ink); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 12px; border-radius: 6px; color: #fff; cursor: pointer; user-select: none; }
.menu-trigger svg:last-child { transition: transform .15s; }
.menu[open] > .menu-trigger svg:last-child { transform: rotate(180deg); }
.menu-trigger:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.menu-trigger--fit { border: 1px solid var(--yellow); }
.menu-trigger--fit .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.menu[open] > .menu-trigger--fit, .menu[open] > .menu-trigger--account { background: var(--blue-line); }
.menu-trigger--account { padding: 0 10px 0 4px; border: 1px solid #fff; border-radius: 999px; }
.avatar { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.menu-trigger--admin { background: var(--yellow); color: var(--ink); font-weight: 600; }
.menu-panel { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: 300px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; padding: 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(14, 26, 58, 0.2); }
.menu-panel--wide { width: 340px; }
.menu-who { display: flex; flex-direction: column; padding: 10px 12px 12px; }
.menu-name { font-weight: 600; overflow-wrap: anywhere; }
.menu-email { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.menu-label { margin: 0; padding: 10px 12px 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.menu-rule { height: 1px; margin: 6px 0; border: 0; background: var(--line); }
.header-actions .menu-panel a.menu-item, .menu-panel .menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: var(--touch); padding: 4px 12px; box-sizing: border-box;
  border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.header-actions .menu-panel a.menu-item:hover, .menu-panel .menu-item:hover { background: var(--ground); color: var(--ink); text-decoration: none; }
.menu-panel .menu-item:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.menu-item--2 > span:first-child { display: flex; flex-direction: column; padding: 4px 0; }
.menu-item-title { font-weight: 500; }
.menu-item-hint { font-size: 13px; color: var(--muted); }
.menu-clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-meta { flex: 0 0 auto; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.menu-plan { font-size: 13px; font-weight: 600; color: var(--blue); }
.menu-panel .menu-item--quiet { color: var(--text); }
.header-actions .menu-panel .menu-cta { margin: 6px 0; padding: 0 12px; color: var(--ink); justify-content: center; }
.header-actions .menu-panel .menu-cta:hover { color: var(--ink); text-decoration: none; }
.menu-note { margin: 6px 12px 4px; font-size: 13px; color: var(--muted); }
.menu-panel form { margin: 0; }
@media (max-width: 720px) { .menu { position: static; } .header-actions { position: relative; } .menu-panel { left: 0; right: auto; } }

/* ---- Profile and e-mails ---- */
.account-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.account-cols > form { flex: 999 1 520px; min-width: 0; }
.account-side { flex: 1 1 320px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.account-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.account-card .h-card { font-size: 20px; }
.account-emails { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.account-emails legend { padding: 0; font-size: 14px; font-weight: 600; }
.account-plan { display: flex; align-items: center; gap: 8px; }
.account-delete { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #6E1515; color: #fff; }
.control[readonly] { background: var(--ground); color: var(--text); }
.control--area { height: auto; padding-top: 10px; padding-bottom: 10px; resize: vertical; }
.control:disabled { background: var(--ground); color: var(--muted); cursor: not-allowed; }

/* ---- Fund an idea (design: Find funding for an idea) ---- */
.idea-page { display: flex; flex-direction: column; gap: 40px; }
.idea-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.idea-copy { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.idea-copy .display { font-size: clamp(36px, 4.4vw, 56px); }
.idea-copy .lead { max-width: 32em; font-size: 18px; color: var(--text); }
.idea-form { flex: 1 1 520px; display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.idea-form .control:disabled { background: var(--card); color: var(--ink); cursor: default; }
.idea-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 16px; }
.idea-lock { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; background: var(--yellow-soft); border-radius: 8px; color: var(--ink); }
.idea-lock--soon { background: var(--tint); }
.idea-lock-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.idea-lock-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.idea-lock-link { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); font-weight: 600; }
.idea-lock-link:hover { color: var(--ink); }
.idea-result { display: flex; flex-direction: column; gap: 40px; }
.idea-example { margin: 0; padding: 12px 16px; border: 1px dashed var(--input); border-radius: 8px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.idea-understood { display: flex; flex-direction: column; gap: 16px; padding: 28px; border-top: 4px solid var(--yellow); }
.idea-understood-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.idea-understood-head a { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: 600; }
.idea-summary { max-width: 44em; font-size: 18px; text-wrap: pretty; }
.tag--tint { background: var(--tint); color: var(--blue); border-color: transparent; font-weight: 500; font-size: 14px; padding: 4px 10px; }
.idea-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; }
.idea-facts div { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); }
.idea-facts dt { font-size: 13px; color: var(--muted); }
.idea-facts dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.idea-facts dd.sub { font-family: var(--font-body); font-weight: 400; font-size: 14px; color: var(--text); }
.idea-path { display: flex; flex-direction: column; gap: 20px; }
.idea-path-head { display: flex; flex-direction: column; gap: 4px; }
.idea-path-head p { max-width: 44em; color: var(--text); }
.idea-path-title { font-size: 30px; letter-spacing: -0.02em; }
.idea-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.idea-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.idea-step-num { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--input); box-sizing: border-box; color: var(--muted); font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.idea-step--next .idea-step-num { border-color: var(--blue); color: var(--blue); }
.idea-step--now { background: var(--blue); border-color: var(--blue); color: #fff; }
.idea-step--now .idea-step-num { border: 0; background: var(--yellow); color: var(--ink); }
.idea-step-body { display: flex; flex-direction: column; gap: 12px; }
.idea-step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.idea-step-head h3 { font-size: 22px; }
.idea-when { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--neutral); color: var(--text); }
.idea-when--now { background: var(--yellow); color: var(--ink); }
.idea-when--next { background: var(--tint); color: var(--blue); }
.idea-step ul { margin: 0; padding-left: 20px; color: var(--text); }
.idea-step--now ul { color: var(--on-blue-soft); }
.idea-opens { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.idea-opens span { font-size: 14px; color: var(--muted); }
.idea-step--now .idea-opens span { color: var(--on-blue-muted); }
.idea-opens a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.idea-opens a:hover { border-color: var(--blue); color: var(--blue); }
.idea-step--now .idea-opens a { border-color: #fff; color: #fff; }
.idea-step--now .idea-opens a:hover { background: var(--blue-line); color: #fff; }
.idea-own { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 28px; background: var(--yellow-soft); border-radius: var(--radius); }
.idea-own > div { flex: 1 1 380px; display: flex; flex-direction: column; gap: 6px; }
.idea-own .h-card { font-size: 24px; }
@media (max-width: 560px) { .idea-step { grid-template-columns: 1fr; gap: 12px; } }
.idea-mine { display: flex; flex-direction: column; gap: 12px; }
.idea-mine-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.idea-mine-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 12px 18px; background: var(--card); }
.idea-mine-list a { display: inline-flex; align-items: center; min-height: var(--touch); font-weight: 600; overflow-wrap: anywhere; }
.idea-yours summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; font-weight: 600; color: var(--blue); }
.idea-yours-text { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.idea-opens a { overflow-wrap: anywhere; }
.idea-delete { margin-top: -16px; }
.idea-quota { color: var(--ink); font-weight: 600; }
/* Saved items the plan does not open (app/plans.py): greyed out, kept */
.project--locked { background: var(--neutral); border-style: dashed; color: var(--muted); }
.project--locked .project-name { color: var(--muted); }
.idea-mine-list--locked li { background: var(--neutral); }
.idea-mine-locked { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch); color: var(--muted); overflow-wrap: anywhere; }
.locked-card { max-width: 40em; display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.locked-icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: var(--neutral); color: var(--muted); }
.link-button { min-height: var(--touch); padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.link-button:hover { color: var(--ink); }

/* ---- Admin: users and plans ---- */
.plan-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.offer--paid { border: 2px solid var(--blue); }
.offer-eyebrow--paid { color: var(--blue); }
