/* BidBuilders Major — shared stylesheet.
   One tier up from the main site: deep forest ink, warm oat paper, Fraunces display,
   Plus Jakarta Sans body, a restrained brass accent. Readability rules: nothing under
   16px, no light grey on tinted backgrounds, near-solid text on dark bands, every
   colour pairing checked at 4.5:1 or better. */

:root {
  --ink-deep: #0F1F1A;
  --ink-band: #14291F;
  --paper: #F6F1E8;
  --paper-2: #EFE8DA;      /* tinted panel on paper */
  --card: #FFFFFF;
  --forest: #1B4332;
  --forest-2: #2D6A4F;     /* hover only */
  --brass: #8A6A2F;        /* large numerals and rules on light (3:1+ at display sizes) */
  --brass-text: #7A5C26;   /* brass for running text on paper: 5.5:1 */
  --brass-dark: #D6B36A;   /* brass on dark bands: 8.5:1 */
  --terracotta: #A3462A;   /* warnings and destructive only */
  --text: #1F2937;
  --text-2: #2F3B36;
  --text-dark: rgba(246, 241, 232, .94);
  --line: #D9D0BF;
  --line-strong: #B9AE98;
  --ok-text: #1F6B41;  --ok-bg: #E6F1E9;
  --warn-text: #7A4A12; --warn-bg: #FBEEDC;
  --bad-text: #8E3A20; --bad-bg: #F8E6DF;
  --info-text: #1B4332; --info-bg: #E7EFEA;
  --focus: #1B4332;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
input, select, textarea, button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "opsz" 72;
  color: var(--forest);
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0 0 .6rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 500; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; font-family: var(--body); color: var(--text); }
p { margin: 0 0 1rem; }
p, li, dd, td, th, label, figcaption, small, .small { font-size: inherit; }
small, .small { font-size: 1rem; }
a { color: var(--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-2); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code, .mono { font-family: var(--mono); font-size: 1rem; }
abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
dl { margin: 0; }
dt { font-weight: 600; }
dd { margin: 0 0 .75rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.band :focus-visible, .band-ink :focus-visible { --focus: var(--brass-dark); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--forest); color: #fff; padding: .6rem 1rem; z-index: 50; text-decoration: none; }
.skip:focus { top: 1rem; }
[hidden] { display: none !important; }

/* ----- layout -------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: clamp(1rem, 4vw, 2.5rem); padding-right: clamp(1rem, 4vw, 2.5rem); }
.narrow { max-width: 760px; }
.measure { max-width: var(--measure); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.band { background: var(--ink-band); color: var(--text-dark); }
.band-ink { background: var(--ink-deep); color: var(--text-dark); }
.band h1, .band h2, .band h3, .band-ink h1, .band-ink h2, .band-ink h3 { color: #FFFFFF; }
.band a, .band-ink a { color: var(--text-dark); }
.band .brass, .band-ink .brass { color: var(--brass-dark); }
.band hr, .band-ink hr { border-color: rgba(246,241,232,.25); }
.brass { color: var(--brass-text); }
.muted { color: var(--text-2); }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }

/* numbered editorial sections */
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.5rem; align-items: baseline; margin-bottom: 2rem; }
.sec-num { font-family: var(--display); font-variation-settings: "opsz" 144; font-size: 1.1rem; font-weight: 500; color: var(--brass-text); letter-spacing: .08em; padding-top: .2rem; border-top: 2px solid var(--brass); }
.band .sec-num, .band-ink .sec-num { color: var(--brass-dark); border-color: var(--brass-dark); }
.sec-head h2 { margin: 0; }
.sec-head .lead { grid-column: 2; margin: .5rem 0 0; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--text-2); max-width: var(--measure); }
.band .lead, .band-ink .lead { color: var(--text-dark); }
.kicker { display: inline-block; font-size: 1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brass-text); margin-bottom: .75rem; }
.band .kicker, .band-ink .kicker { color: var(--brass-dark); }

/* ----- header and footer --------------------------------------------------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: baseline; gap: .45rem; text-decoration: none; color: var(--forest); font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.wordmark .tier { font-weight: 400; font-style: italic; color: var(--brass-text); font-variation-settings: "opsz" 144; }
.wordmark .sub { font-family: var(--body); font-size: 1rem; font-weight: 500; color: var(--text-2); margin-left: .25rem; }
.band-ink .wordmark, .band .wordmark { color: #fff; }
.band-ink .wordmark .tier, .band .wordmark .tier { color: var(--brass-dark); }
.band-ink .wordmark .sub, .band .wordmark .sub { color: var(--text-dark); }
.site-nav { display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; align-items: center; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--text-2); padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--brass); }
.head-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.site-foot { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; color: var(--text-2); }
.site-foot .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.site-foot h2 { font-family: var(--body); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: .6rem; }
.site-foot a { color: var(--text-2); display: block; margin: .3rem 0; }
.site-foot p { margin: .3rem 0; }
.site-foot p a { display: inline; margin: 0; }

/* ----- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--radius); border: 2px solid var(--forest);
  background: var(--forest); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  line-height: 1.2; min-height: 48px;
}
.btn:hover { background: var(--forest-2); border-color: var(--forest-2); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--forest); }
.btn-quiet:hover { background: var(--paper-2); color: var(--forest); }
.band .btn-quiet, .band-ink .btn-quiet { color: #fff; border-color: rgba(246,241,232,.6); }
.band .btn-quiet:hover, .band-ink .btn-quiet:hover { background: rgba(246,241,232,.1); }
.band .btn-primary, .band-ink .btn-primary { background: var(--brass-dark); border-color: var(--brass-dark); color: var(--ink-deep); }
.band .btn-primary:hover, .band-ink .btn-primary:hover { background: #E2C684; border-color: #E2C684; color: var(--ink-deep); }
.btn-danger { background: transparent; color: var(--terracotta); border-color: var(--terracotta); }
.btn-danger:hover { background: var(--bad-bg); color: var(--terracotta); border-color: var(--terracotta); }
.btn-sm { padding: .45rem .9rem; min-height: 40px; font-size: 1rem; }
.link-btn { background: none; border: 0; padding: .2rem 0; color: var(--forest); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.link-btn:hover { color: var(--forest-2); }
.btn .spin { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .btn .spin { animation: spin .9s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- cards, notes, tables ------------------------------------------------ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-tint { background: var(--paper-2); }
.band .card, .band-ink .card { background: rgba(246,241,232,.06); border-color: rgba(246,241,232,.22); color: var(--text-dark); }
.note { border-left: 3px solid var(--forest); background: var(--info-bg); color: var(--info-text); padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1rem 0; }
.note > :last-child { margin-bottom: 0; }
.note-ok { border-color: var(--ok-text); background: var(--ok-bg); color: var(--ok-text); }
.note-warn { border-color: var(--terracotta); background: var(--warn-bg); color: var(--warn-text); }
.note-bad { border-color: var(--terracotta); background: var(--bad-bg); color: var(--bad-text); }
.note a { color: inherit; }
.err { color: var(--bad-text); margin: .5rem 0 0; }
.ok { color: var(--ok-text); }

.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
table.tbl th, table.tbl td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { font-weight: 600; color: var(--text); background: var(--paper-2); font-size: 1rem; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl.compact { min-width: 0; }
.band .table-wrap, .band-ink .table-wrap { background: transparent; border-color: rgba(246,241,232,.25); }
.band table.tbl th, .band-ink table.tbl th { background: rgba(246,241,232,.08); color: #fff; }
.band table.tbl td, .band table.tbl th, .band-ink table.tbl td, .band-ink table.tbl th { border-color: rgba(246,241,232,.2); }

/* big numerals */
.numeral { font-family: var(--display); font-variation-settings: "opsz" 144; font-size: clamp(3rem, 7vw, 4.5rem); font-weight: 400; line-height: 1; color: var(--brass-text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.numeral small { font-family: var(--body); font-size: 1.05rem; color: var(--text-2); margin-left: .5rem; font-weight: 500; }
.band .numeral, .band-ink .numeral { color: var(--brass-dark); }
.band .numeral small, .band-ink .numeral small { color: var(--text-dark); }
.stat { display: grid; gap: .3rem; }
.stat .label { font-size: 1rem; color: var(--text-2); font-weight: 500; }

/* ----- evidence chips ------------------------------------------------------ */
.chip {
  display: inline-block; font-family: var(--mono); font-size: 1rem; line-height: 1.2;
  padding: .1rem .4rem; margin: 0 .1rem; border: 1px solid var(--line-strong); border-radius: 3px;
  background: var(--card); color: var(--forest); cursor: pointer; vertical-align: baseline; text-decoration: none;
}
.chip:hover { border-color: var(--forest); background: var(--paper-2); }
.chip-brief { color: var(--brass-text); }
.chip-doc { color: var(--text-2); }
.band .chip, .band-ink .chip { background: transparent; color: var(--brass-dark); border-color: rgba(246,241,232,.45); }
.mark-confirm { background: var(--warn-bg); color: var(--warn-text); padding: .05rem .3rem; border-bottom: 2px solid var(--terracotta); border-radius: 2px; }
.band .mark-confirm, .band-ink .mark-confirm { background: rgba(214,179,106,.18); color: var(--text-dark); border-bottom-color: var(--brass-dark); }
.source-tag { display: inline-block; font-size: 1rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }

/* ----- status badges ------------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 3px; font-size: 1rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.status-brief, .status-shortlisted { background: var(--paper-2); color: var(--text-2); border-color: var(--line); }
.status-queued, .status-running { background: var(--info-bg); color: var(--info-text); }
.status-review { background: var(--warn-bg); color: var(--warn-text); }
.status-attention { background: var(--bad-bg); color: var(--bad-text); }
.status-released, .status-won, .status-submitted { background: var(--ok-bg); color: var(--ok-text); }
.status-lost, .status-withdrawn { background: var(--paper-2); color: var(--text-2); }

/* ----- stage timeline ------------------------------------------------------ */
.stages { list-style: none; margin: 0; padding: 0; counter-reset: stage; }
.stages li { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 0 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.stages li:first-child { border-top: 0; }
.stages .n { font-family: var(--display); font-variation-settings: "opsz" 144; font-size: 1.35rem; color: var(--brass-text); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stages .t { font-weight: 600; color: var(--forest); }
.stages .d { color: var(--text-2); margin: .15rem 0 0; font-size: 1rem; }
.stages .meta { font-size: 1rem; color: var(--text-2); margin-top: .2rem; }
.stages li.is-done .t::after { content: " · done"; font-weight: 500; color: var(--ok-text); }
.stages li.is-current { background: var(--paper-2); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-radius: var(--radius); border-top-color: transparent; }
.stages li.is-current + li { border-top-color: transparent; }
.stages li.is-current .t::after { content: " · now"; font-weight: 500; color: var(--brass-text); }
.stages li.is-next { color: var(--text-2); }
.band .stages li, .band-ink .stages li { border-color: rgba(246,241,232,.2); }
.band .stages .n, .band-ink .stages .n { color: var(--brass-dark); }
.band .stages .t, .band-ink .stages .t { color: #fff; }
.band .stages .d, .band-ink .stages .d { color: var(--text-dark); }
.pulse { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--brass-text); margin-right: .4rem; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ----- forms --------------------------------------------------------------- */
.field { margin: 0 0 1.4rem; }
.field > label, .field > .lbl { display: block; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.field .req { color: var(--brass-text); font-weight: 500; }
.field .why { display: block; color: var(--text-2); font-size: 1rem; font-weight: 400; margin: .1rem 0 .45rem; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field input[type=url], .field select, .field textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); color: var(--text); min-height: 48px;
}
.field textarea { min-height: 7.5rem; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--forest); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--terracotta); }
.field .money-wrap { position: relative; }
.field .money-wrap::before { content: "£"; position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.field .money-wrap input { padding-left: 1.7rem; }
.field .short { max-width: 14rem; }
.field .medium { max-width: 24rem; }
::placeholder { color: #59625D; opacity: 1; }
.unknown-toggle { display: inline-flex; align-items: center; gap: .5rem; margin-top: .45rem; color: var(--text-2); font-size: 1rem; cursor: pointer; }
.unknown-toggle input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--forest); }
textarea.is-unknown { background: var(--paper-2); color: var(--text-2); }
.unknown-hint { font-size: 1rem; color: var(--warn-text); background: var(--warn-bg); border-radius: 3px; padding: .3rem .6rem; margin-top: .4rem; display: inline-block; }

fieldset.group { border: 0; padding: 0; margin: 0 0 2.5rem; min-width: 0; }
fieldset.group legend { font-family: var(--display); font-size: 1.4rem; font-weight: 600; color: var(--forest); margin-bottom: 1rem; padding: 0; }
details.strengthen { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 0 0 2rem; }
details.strengthen summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; color: var(--forest); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
details.strengthen summary::-webkit-details-marker { display: none; }
details.strengthen summary::after { content: "+"; font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--brass-text); }
details.strengthen[open] summary::after { content: "–"; }
details.strengthen summary .muted { font-weight: 400; font-size: 1rem; }
details.strengthen .inner { padding: .25rem 1.25rem 1rem; border-top: 1px solid var(--line); }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .35rem .9rem; }
.checks label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; padding: .3rem 0; cursor: pointer; }
.checks input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--forest); }

.tri { display: grid; gap: 0; }
.tri-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tri-row:first-child { border-top: 0; }
.tri-row .lbl { flex: 1 1 240px; font-weight: 400; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-block; padding: .45rem .9rem; min-width: 4.5rem; text-align: center; font-size: 1rem; color: var(--text-2); border-left: 1px solid var(--line-strong); cursor: pointer; }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--forest); color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }

.meter { display: grid; gap: .4rem; margin: 0 0 1.5rem; }
.meter .bar { height: 8px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.meter .bar span { display: block; height: 100%; background: var(--forest); }
@media (prefers-reduced-motion: no-preference) { .meter .bar span { transition: width .3s ease; } }
.meter .pct { font-family: var(--display); font-size: 1.6rem; color: var(--forest); font-variant-numeric: tabular-nums; }
.saved { font-size: 1rem; color: var(--text-2); min-height: 1.5rem; }
.saved.is-saved { color: var(--ok-text); }
.saved.is-err { color: var(--bad-text); }

/* editable row tables (budget, grants, match) */
.rows-table .table-wrap { margin-bottom: .6rem; }
.rows-table input, .rows-table select { width: 100%; min-width: 7rem; padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--card); min-height: 44px; }
.rows-table input.amt { text-align: right; font-variant-numeric: tabular-nums; min-width: 8rem; }
.rows-table td { padding: .5rem .6rem; }
.rows-table .del { background: none; border: 1px solid var(--line-strong); color: var(--terracotta); border-radius: 4px; width: 44px; height: 44px; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.rows-table .del:hover { background: var(--bad-bg); }
.rows-table tfoot td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.budget-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; margin-top: 1rem; }

/* dropzone and uploads */
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 1.5rem; text-align: center; background: var(--card); color: var(--text-2); }
.drop.is-over { border-color: var(--forest); background: var(--info-bg); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress { height: 8px; background: var(--paper-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); margin-top: .5rem; }
.progress span { display: block; height: 100%; background: var(--brass); }
.doclist { list-style: none; margin: 1rem 0 0; padding: 0; }
.doclist li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.doclist li:first-child { border-top: 0; }
.doclist .name { flex: 1 1 240px; font-weight: 600; word-break: break-word; }
.doclist .meta { color: var(--text-2); font-size: 1rem; }

/* ----- dialog and toast ---------------------------------------------------- */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; max-width: min(92vw, 560px); width: 100%; background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(15,31,26,.25); }
dialog.dlg::backdrop { background: rgba(15,31,26,.55); }
dialog.dlg .dlg-body { padding: 1.5rem; }
dialog.dlg h2, dialog.dlg h3 { margin-top: 0; font-size: 1.4rem; }
dialog.dlg .actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1.25rem; }
dialog.dlg dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
dialog.dlg dd { margin: 0; word-break: break-word; }
#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--ink-deep); color: var(--text-dark); padding: .8rem 1.2rem; border-radius: var(--radius); max-width: min(92vw, 520px); z-index: 60; border: 1px solid rgba(214,179,106,.5); }

/* ----- app shell ----------------------------------------------------------- */
.app-head { background: var(--ink-deep); color: var(--text-dark); border-bottom: 1px solid rgba(214,179,106,.35); }
.app-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .8rem; }
.app-nav { display: flex; gap: .25rem 1.4rem; flex-wrap: wrap; }
.app-nav a { color: var(--text-dark); text-decoration: none; font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.app-nav a:hover { color: #fff; }
.app-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass-dark); }
.app-head .who { font-size: 1rem; color: var(--text-dark); }
.app-main { padding-block: clamp(1.5rem, 4vw, 3rem) 4rem; min-height: 60vh; }
.app-main:focus, .app-main:focus-visible { outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-head h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin: 0; }
.page-head .crumbs { font-size: 1rem; color: var(--text-2); margin-bottom: .4rem; }
.page-head .crumbs a { color: var(--text-2); }
.two-col { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .two-col { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; } .two-col > aside { position: sticky; top: 1rem; } }

.applist { list-style: none; margin: 0; padding: 0; }
.applist li { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: center; }
.applist li:first-child { border-top: 0; }
.applist .title { font-weight: 600; font-size: 1.15rem; }
.applist .title a { text-decoration: none; }
.applist .title a:hover { text-decoration: underline; }
.applist .next { grid-column: 1 / -1; color: var(--text-2); font-size: 1rem; }

.tabs { display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.tabs button { background: none; border: 0; padding: .7rem 0; font-weight: 600; color: var(--text-2); border-bottom: 3px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--forest); border-bottom-color: var(--brass); }
.tabs button:hover { color: var(--forest); }

/* shortlist cards */
.shortlist { display: grid; gap: 1rem; }
.funder-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--card); display: grid; gap: .6rem; }
.funder-card.is-selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.funder-card h3 { margin: 0; font-size: 1.3rem; }
.funder-card .prog { color: var(--text-2); }
.funder-card ul { margin: .25rem 0; padding-left: 1.2rem; }
.funder-card .cols { display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.funder-card .cols h4 { margin: 0 0 .2rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }

/* draft reader */
.reader h2 { font-size: 1.75rem; margin-top: 2.5rem; }
.reader h3 { margin-top: 2rem; }
.reader .sec { max-width: var(--measure); }
.reader .sec p { margin-bottom: 1.1rem; }
.reader .wc { font-size: 1rem; color: var(--text-2); margin: -.3rem 0 1rem; }
.reader .wc.over { color: var(--bad-text); }
.cover { border: 1px solid var(--brass); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); background: var(--card); }
.cover .source-tag { color: var(--brass-text); }
.toc { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.toc a { text-decoration: none; }
@media (max-width: 640px) { .toc { columns: 1; } }
.score { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
.score-overall { text-align: left; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.ticks li:first-child { border-top: 0; }
.ticks .tick { color: var(--ok-text); font-weight: 700; }
.ticks .cross { color: var(--terracotta); font-weight: 700; }
.questions { counter-reset: q; list-style: none; padding: 0; margin: 0; }
.questions li { position: relative; padding: .7rem 0 .7rem 2.6rem; border-top: 1px solid var(--line); }
.questions li:first-child { border-top: 0; }
.questions li::before { counter-increment: q; content: "Q" counter(q); position: absolute; left: 0; top: .75rem; font-family: var(--mono); font-size: 1rem; color: var(--brass-text); }

/* landing specifics */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem); }
.hero h1 { max-width: 20ch; margin-bottom: 1.25rem; }
.hero .lead { font-size: 1.3rem; }
.hero .ctas { display: flex; gap: .75rem 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero .fine { margin-top: 1.25rem; font-size: 1rem; color: var(--text-dark); }
.process { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.process li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.process li:first-child { border-top: 0; }
.process .n { font-family: var(--display); font-variation-settings: "opsz" 144; font-size: 2rem; color: var(--brass-text); line-height: 1; padding-top: .2rem; }
.process h3 { margin: 0 0 .3rem; }
.process p { margin: 0; color: var(--text-2); max-width: var(--measure); }
.process .who { display: inline-block; margin-top: .5rem; font-size: 1rem; color: var(--brass-text); font-weight: 600; }
.excerpt { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.excerpt .cited { font-family: var(--display); font-size: 1.35rem; line-height: 1.5; color: var(--text); max-width: var(--measure); margin: 0 0 1.5rem; }
.excerpt figcaption { font-size: 1rem; color: var(--text-2); margin-top: 1rem; }
.pricing { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.price { font-family: var(--display); font-variation-settings: "opsz" 144; font-size: 3rem; color: var(--forest); line-height: 1; }
.price small { font-family: var(--body); font-size: 1.05rem; color: var(--text-2); font-weight: 500; }
.pricing ul { padding-left: 1.2rem; margin: 1rem 0; }
.pricing li { margin: .4rem 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; font-weight: 600; font-size: 1.15rem; color: var(--forest); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .9rem; font-family: var(--display); font-size: 1.6rem; color: var(--brass-text); }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 1.25rem; max-width: var(--measure); }
.faq .a p:last-child { margin-bottom: 0; }
.founder { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .founder { grid-template-columns: 120px minmax(0, 1fr); } }
.founder .mark { width: 120px; height: 120px; border: 1px solid var(--brass); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 2.4rem; color: var(--brass-text); background: var(--card); }
.deliverables { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: d; }
.deliverables .card { display: grid; gap: .4rem; }
.deliverables h3 { margin: 0; font-size: 1.2rem; }
.deliverables .card p { margin: 0; color: var(--text-2); }
.funders-list .table-wrap { margin-top: 1rem; }

@media (max-width: 640px) {
  .sec-head { grid-template-columns: 1fr; gap: .5rem; }
  .sec-head .lead { grid-column: 1; }
  .process li { grid-template-columns: 2.6rem 1fr; }
  .stages li { grid-template-columns: 2.4rem 1fr; }
  .applist li { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.75rem; }
  .btn { width: 100%; }
  .btn-sm, .seg + .btn, .inline .btn { width: auto; }
  .row .btn { width: auto; }
}
@media print {
  .app-head, .site-head, .site-foot, .btn, #toast { display: none !important; }
  body { background: #fff; }
}
