/* Funding generator — calculator controls + the "pay from 30%" readout.
   Rides on the .flw dossier shell (defined in story.css). Comic-noir: cream
   body, ink readout panel, red accents, gold ornament, sharp corners, hard offset. */

.fg .flw-title { font-size: clamp(2.1rem, 4vw, 3.1rem); }
.fg .flw-intro { max-width: 680px; }
.fg .flw-intro strong { color: var(--red-600); font-weight: 800; }

/* ---- track picker ---- */
.fg-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; max-width: 900px; }
.fg-card { text-align: left; background: #fff; border: 1.5px solid var(--ink-1000); border-radius: 6px; padding: 20px 22px 18px; cursor: pointer; box-shadow: 4px 4px 0 0 rgba(20,17,12,.9); transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out); display: flex; flex-direction: column; gap: 7px; }
.fg-card:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 0 var(--red-500); }
.fg-card-eyebrow { font-family: var(--font-sans); font-weight: 700; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--red-600); }
.fg-card-title { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; color: var(--ink-900); }
.fg-card-blurb { font-size: 13.5px; line-height: 1.5; color: var(--ink-700); }
.fg-card-go { margin-top: 4px; font-family: var(--font-sans); font-weight: 700; font-size: 12px; letter-spacing: .04em; color: var(--red-600); }
.fg-foot-note, .fg-ro-note { font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--ink-500); }
.fg-foot-note { margin-top: 22px; max-width: 720px; }

/* ---- configurator ---- */
.fg-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 40px; align-items: start; margin-top: 6px; }
.fg-controls { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.fg-step.is-locked { opacity: .4; pointer-events: none; }
.fg-step-q { display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-weight: 700; font-size: 15px; color: var(--ink-900); margin-bottom: 4px; }
.fg-step-n { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; background: var(--ink-1000); color: var(--gold-300); border-radius: 999px; font-family: var(--font-mono); font-size: 12px; }
.fg-step-opt { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.fg-step-hint { font-size: 12.5px; color: var(--ink-500); margin: 0 0 9px 32px; font-style: italic; }
.fg-opts { display: flex; flex-wrap: wrap; gap: 9px; }
.fg-opt { font-family: var(--font-sans); font-weight: 600; font-size: 13.5px; color: var(--ink-800); background: #fff; border: 1.5px solid var(--ink-300, rgba(20,17,12,.32)); border-radius: 4px; padding: 10px 15px; cursor: pointer; transition: all .14s var(--ease-out); }
.fg-opt:hover { border-color: var(--ink-1000); }
.fg-opt.is-on { background: var(--red-500); border-color: var(--red-600); color: var(--bone); box-shadow: 3px 3px 0 0 rgba(20,17,12,.85); }

.fg-addons { display: flex; flex-direction: column; gap: 8px; }
.fg-addon { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--ink-300, rgba(20,17,12,.3)); border-radius: 4px; padding: 11px 14px; cursor: pointer; text-align: left; transition: all .14s var(--ease-out); }
.fg-addon:hover { border-color: var(--ink-1000); }
.fg-addon.is-on { border-color: var(--gold-500, #b8862f); background: var(--paper-50, #faf5e8); }
.fg-addon-box { flex: 0 0 auto; width: 19px; height: 19px; border: 1.5px solid var(--ink-700); border-radius: 3px; display: grid; place-items: center; font-size: 12px; color: var(--ink-1000); background: #fff; }
.fg-addon.is-on .fg-addon-box { background: var(--gold-400, #d6b566); border-color: var(--gold-700, #8a6420); }
.fg-addon-name { flex: 1; font-family: var(--font-sans); font-weight: 600; font-size: 13.5px; color: var(--ink-900); }
.fg-addon-price { font-family: var(--font-mono); font-size: 13px; color: var(--ink-700); }
/* DPE = a cash top-up (not grant-funded) — differentiate from the gold grant pillars */
.fg-addon--cash.is-on { border-color: var(--ink-700); background: var(--paper-100, #f3ecdd); }
.fg-addon--cash.is-on .fg-addon-box { background: var(--ink-1000); border-color: var(--ink-1000); color: var(--bone); }
.fg-addon-tag { display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-weight: 500; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); vertical-align: middle; }

/* ---- the readout (ink panel, sticky) ---- */
/* readout flows in the grid and scrolls with the page body (the footer is a flex
   sibling below the scroll area, so nothing hides behind it — and no dvh dependency) */
.fg-readout { align-self: start; background: var(--ink-1000); color: var(--bone); border: 1.5px solid #000; border-radius: 8px; padding: 24px 24px 20px; box-shadow: 5px 5px 0 0 rgba(20,17,12,.5); }
.fg-readout-empty { text-align: center; color: rgba(251,246,234,.6); padding: 26px 8px; }
.fg-readout-empty-ic { font-size: 30px; color: var(--gold-400, #d6b566); margin-bottom: 12px; }
.fg-readout-empty p { font-size: 14px; line-height: 1.5; margin: 0; }
.fg-ro-k { font-family: var(--font-sans); font-weight: 700; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-300, #e3c987); }
.fg-ro-pay { font-family: var(--font-display); font-weight: 600; font-size: 52px; line-height: 1; color: var(--bone); margin: 4px 0 6px; letter-spacing: -.01em; }
.fg-ro-sub { font-size: 12px; line-height: 1.45; color: rgba(251,246,234,.66); margin-bottom: 16px; }
.fg-ro-bar { height: 7px; border-radius: 999px; background: rgba(251,246,234,.14); overflow: hidden; margin-bottom: 18px; }
.fg-ro-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500,#b8862f), var(--gold-300,#e3c987)); }
.fg-ro-rows { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid rgba(251,246,234,.16); }
.fg-ro-row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-sans); font-size: 13.5px; color: rgba(251,246,234,.8); }
.fg-ro-row span:last-child { font-family: var(--font-mono); }
.fg-ro-row--fund span:last-child { color: var(--gold-300, #e3c987); }
.fg-ro-row--pay { font-weight: 700; color: var(--bone); }
.fg-ro-row--pay span:last-child { color: var(--bone); }
.fg-ro-items { display: flex; flex-direction: column; gap: 5px; padding: 13px 0; border-bottom: 1px solid rgba(251,246,234,.16); margin-bottom: 12px; }
.fg-ro-item { display: flex; justify-content: space-between; font-size: 12px; color: rgba(251,246,234,.62); font-family: var(--font-mono); }
.fg-ro-item--add span:first-child { color: var(--gold-300, #e3c987); }
.fg-ro-note { color: rgba(251,246,234,.5) !important; }

/* ---- contact form ---- */
.fg-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; max-width: 720px; margin-top: 6px; }
.fg-field { display: flex; flex-direction: column; gap: 6px; }
.fg-field--wide { grid-column: 1 / -1; }
.fg-field span { font-family: var(--font-sans); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-600, var(--ink-700)); }
.fg-field input, .fg-field select { font-family: var(--font-sans); font-size: 15px; color: var(--ink-900); background: #fff; border: 1.5px solid var(--ink-300, rgba(20,17,12,.32)); border-radius: 2px; padding: 11px 13px; }
.fg-field input:focus, .fg-field select:focus { outline: none; border-color: var(--red-500); box-shadow: 0 0 0 3px rgba(197,48,34,.18); }
.fg-sent { margin-top: 18px; font-family: var(--font-sans); font-size: 14px; color: var(--ink-800); background: var(--paper-50, #faf5e8); border-left: 3px solid var(--gold-500, #b8862f); padding: 12px 16px; max-width: 720px; }

/* ghost button + disabled state for the dossier footer */
.flw-btn--ghost { background: transparent; color: rgba(251,246,234,.82); border-color: rgba(251,246,234,.32); }
.flw-btn--ghost:hover { border-color: rgba(251,246,234,.7); color: var(--bone); }
.flw-btn.is-off { opacity: .4; pointer-events: none; }

@media (max-width: 920px) {
  .fg-grid { grid-template-columns: 1fr; gap: 24px; }
  .fg-readout { position: static; max-height: none; overflow: visible; }
  .fg-cards { grid-template-columns: 1fr; }
  .fg-form { grid-template-columns: 1fr; }
}

/* --- Pricing calculator: offering catalogue + scope (light/paper theme) --- */
.pc-offers { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.pc-offer { display: flex; align-items: flex-start; gap: 12px; text-align: left; background: #fff; border: 1.5px solid var(--ink-300, rgba(20,17,12,.28)); border-radius: 5px; padding: 11px 14px; cursor: pointer; transition: all .14s var(--ease-out); }
.pc-offer:hover { border-color: var(--ink-1000); }
.pc-offer.is-on { border-color: var(--red-600); box-shadow: 3px 3px 0 0 rgba(20,17,12,.85); background: var(--red-50, #fbf1ef); }
.pc-offer-tx { display: flex; flex-direction: column; gap: 2px; }
.pc-offer-n { font-family: var(--font-sans); font-weight: 700; font-size: 14px; color: var(--ink-900); }
.pc-offer-d { font-size: 12px; line-height: 1.4; color: var(--ink-600, rgba(20,17,12,.62)); }
.pc-offer-tag { margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-600); background: var(--red-50, #fbf1ef); border: 1px solid var(--red-200, rgba(154,43,35,.28)); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.pc-offer-tag--eng { color: var(--ink-600, rgba(20,17,12,.6)); background: rgba(20,17,12,.05); border-color: rgba(20,17,12,.16); }
.pc-scope { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pc-scope-f { display: flex; flex-direction: column; gap: 5px; }
.pc-scope-f span { font-family: var(--font-sans); font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-700); }
.pc-scope-f input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 9px 11px; border: 1.5px solid var(--ink-300, rgba(20,17,12,.3)); border-radius: 4px; background: #fff; color: var(--ink-900); }
.pc-scope-f input:focus { outline: none; border-color: var(--red-600); }
.pc-ro-per { font-size: 15px; font-weight: 600; opacity: .7; }

/* --- Pricing calculator: what's-included + retainer blocks (readout is DARK/ink) --- */
.pc-incl { margin-top: 18px; border-top: 1px dashed rgba(251,246,234,.2); padding-top: 14px; }
.pc-incl-h { font-family: var(--font-sans); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-300, #e3c987); margin-bottom: 9px; }
.pc-incl ul, .pc-retainer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pc-incl li, .pc-retainer li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.5; color: rgba(251,246,234,.88); }
.pc-incl li::before, .pc-retainer li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--gold-300, #e3c987); font-weight: 700; font-size: 12px; }
.pc-retainer { margin-top: 16px; padding: 14px 16px; border-radius: 6px; background: rgba(251,246,234,.06); border: 1px solid rgba(251,246,234,.16); }
.pc-retainer-h { font-family: var(--font-sans); font-size: 14px; line-height: 1.45; color: rgba(251,246,234,.92); margin-bottom: 9px; }
.pc-retainer-h b { font-family: var(--font-display); font-size: 22px; color: var(--gold-300, #e3c987); }

/* --- Pricing calculator: bundled "plan" list (accrual) — on the DARK readout --- */
.pc-plan { margin-top: 14px; display: flex; flex-direction: column; }
.pc-plan-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(251,246,234,.16); }
.pc-plan-row:first-child { border-top: 0; }
.pc-plan-n { font-family: var(--font-sans); font-weight: 600; font-size: 14px; color: rgba(251,246,234,.92); }
.pc-plan-v { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--bone); white-space: nowrap; }
.pc-plan-apply { margin-left: 10px; font-family: var(--font-sans); font-weight: 700; font-size: 11px; letter-spacing: .03em; color: var(--gold-300, #e3c987); text-decoration: none; }
.pc-plan-apply:hover { text-decoration: underline; color: var(--bone); }

/* add-on pillars = separate grant applications, listed under the price */
.pc-addon-apply { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(251,246,234,.16); }
.pc-addon-apply-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; }
.pc-addon-apply-n { font-family: var(--font-sans); font-weight: 600; font-size: 13px; color: rgba(251,246,234,.9); }
.pc-addon-apply-v { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--bone); white-space: nowrap; }
.pc-addon-apply .fg-ro-note { margin-top: 8px; }

/* --- Calculator polish: bigger boxes, larger type, red accents (overrides) --- */
.fg .flw-intro { font-size: 16px; line-height: 1.55; }
.fg-step-q { font-size: 17px; }
.fg-step-n { background: var(--red-500); color: var(--bone); width: 24px; height: 24px; font-size: 12.5px; } /* red accent */
/* bigger offering cards */
.pc-offer { padding: 17px 20px; gap: 14px; }
.pc-offer-n { font-size: 17px; }
.pc-offer-d { font-size: 13.5px; }
.pc-offer.is-on { box-shadow: 4px 4px 0 0 var(--red-500); } /* red accent on selected */
/* bigger size / which-are-you buttons */
.fg-opt { font-size: 15px; padding: 13px 19px; }
/* readout: larger type + red edge accent */
.fg-readout { border-left: 4px solid var(--red-500); }
.fg-ro-sub { font-size: 13px; }
.fg-ro-row { font-size: 14.5px; }
.fg-ro-item { font-size: 12.5px; }
.pc-incl li, .pc-retainer li { font-size: 14px; }
.pc-incl-h { font-size: 12px; }

/* raise the readout to the hero line: heading + controls stack in the left column,
   so the tall ink panel starts level with the title (more room above the footer) */
.fg-config .fg-grid { margin-top: 0; }
.fg-main { display: flex; flex-direction: column; min-width: 0; }
.fg-main .fg-controls { margin-top: 20px; }
@media (max-width: 920px) { .fg-main .fg-controls { margin-top: 16px; } }

/* --- "Need more info?" contact view: centred, vertical form + radio pills --- */
.fg-contact { text-align: center; }
.fg-contact .flw-intro { margin-left: auto; margin-right: auto; }
.fg-contact .fg-form { grid-template-columns: 1fr; max-width: 500px; margin: 12px auto 0; gap: 16px; }
.fg-contact .fg-field { align-items: center; }
.fg-contact .fg-field span, .fg-radio-label { text-align: center; }
.fg-contact .fg-field input { width: 100%; text-align: center; }
.fg-contact .fg-sent { margin-left: auto; margin-right: auto; max-width: 500px; }
.fg-radio-field { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.fg-radio-group { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fg-radio { font-family: var(--font-sans); font-weight: 600; font-size: 13px; color: var(--ink-800); background: #fff; border: 1.5px solid var(--ink-300, rgba(20,17,12,.3)); border-radius: 999px; padding: 8px 15px; cursor: pointer; transition: all .14s var(--ease-out); }
.fg-radio:hover { border-color: var(--ink-1000); }
.fg-radio.is-on { background: var(--red-500); border-color: var(--red-600); color: var(--bone); box-shadow: 2px 2px 0 0 rgba(20,17,12,.85); }

/* --- Calculator: compact sizing pass (dial the earlier size bumps down a notch) --- */
.fg .flw-title { font-size: clamp(1.9rem, 3.3vw, 2.6rem); }
.fg .flw-intro { font-size: 14.5px; }
.fg-controls { gap: 18px; }
.fg-step-q { font-size: 15px; }
.fg-step-n { width: 22px; height: 22px; font-size: 12px; }
.pc-offer { padding: 13px 16px; }
.pc-offer-n { font-size: 15px; }
.pc-offer-d { font-size: 12.5px; }
.fg-opt { font-size: 13.5px; padding: 10px 15px; }
.fg-readout { padding: 20px 20px 18px; }
.fg-ro-k { font-size: 10.5px; }
.fg-ro-pay { font-size: 42px; }
.fg-ro-sub { font-size: 12px; }
.fg-ro-row { font-size: 13px; }
.pc-incl-h { font-size: 11px; }
.pc-incl li, .pc-retainer li { font-size: 13px; }
.pc-retainer-h { font-size: 13px; }
.pc-retainer-h b { font-size: 18px; }
/* narrower readout column only on desktop (don't touch the mobile single-column) */
@media (min-width: 921px) { .fg-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; } }

/* --- Calculator responsive: collapse the scope inputs + tame the payoff figure --- */
@media (max-width: 768px) {
  .pc-scope { grid-template-columns: 1fr 1fr; }
  .pc-offers { max-height: none; overflow-y: visible; padding-right: 0; } /* let the page body do the scrolling on phones */
  .fg-ro-pay { font-size: clamp(34px, 11vw, 42px); }
  .fg .flw-title { font-size: clamp(1.7rem, 6.5vw, 2.4rem); }
}
@media (max-width: 420px) {
  .pc-scope { grid-template-columns: 1fr; }
}
