/* CalcIt design system: "Signal, light" (chosen 30 Oct 2026, docs/design/2026-10-30-signal/).
   Loaded by every page AFTER its inline <style>, so these rules win over the page's own at equal
   specificity. Tokens live here; pages only carry page-specific layout.

   Palette: paper #F4F2ED, ink #121315, white panels with #DCD9D2 hairlines, brand green #157249 on
   light and #5BD39A on dark. Chart colours stay inside charts: fuel/margin green #1B8B5A, duty blue #3360FF,
   VAT neutral (ink #121315 on light, paper #EDEBE6 on dark). Alerts use --alert (deep blue, light
   blue on dark). No yellow (WotsItCalled's) and no orange or coral (Eric). Dark is used for weight only: result blocks,
   explainer panels, the footer. Type: Geist for text, Geist Mono for every figure. */

:root {
    --paper: #F4F2ED; --ink: #121315; --hairline: #DCD9D2; --rule: #ECEAE4;
    --accent: #157249; --accent-deep: #0F5A39; --accent-pale: #E7F6EE; --on-accent: #FFFFFF;
    --accent-dark: #5BD39A;

    /* legacy token names used by the page styles, mapped onto the palette */
    --bg: #F4F2ED; --bg-warm: #ECEAE4; --bg-cool: #ECEAE4; --white: #FFFFFF; --dark: #121315; --dark-soft: #1C1D20;
    --text: #121315; --text-mid: #45433F; --text-muted: #6B6963; --text-light: #6B6963;
    --blue: #3360FF; --blue-pale: #EDF1FF; --green: #1B8B5A; --green-pale: #E7F6EE;
    --alert: #2346D1; --alert-pale: #EDF1FF;
    --teal: #157249; --teal-deep: #0F5A39; --teal-pale: #E7F6EE; --amber-pale: #EDF1FF;
    --border: #DCD9D2; --border-light: #DCD9D2;
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
    --radius-sm: 2px; --radius: 2px; --radius-lg: 2px; --radius-xl: 2px;
    --max-w: 1200px; --transition: 0.18s ease;

    --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: var(--font-sans);
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* Inside dark panels the accent switches to the light green, so every var(--accent) reads */
.vat-result, .fuel-result, .calc-result, .cgt-result, .iht-result, .sdlt-result, .tax-result, .result-panel,
.cashflow, .cta-box, .calc-btn, .chart-tooltip, .site-footer, .dark-panel, .result-block {
    --accent: #5BD39A; --accent-deep: #7FE0B0; --accent-pale: rgba(91, 211, 154, 0.14); --on-accent: #121315;
    --text-muted: #9A9892; --text-light: #9A9892;
    --alert: #9DB1FF; --alert-pale: rgba(157, 177, 255, 0.16);
}

/* ------------------------------------------------------------------ base */
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); background: var(--paper); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-display); }
a { color: inherit; }
::selection { background: #CDEEDC; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono, .fig { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 200; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ------------------------------------------------------------------ masthead */
.masthead { background: var(--paper); position: relative; z-index: 100; }
.masthead-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.masthead-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 1.5rem; padding: 1.75rem 0 1.5rem; border-bottom: 2px solid var(--ink); }
.logo { display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink); font-family: var(--font-sans); }
.logo:hover { color: var(--ink); }
.logo-mark { display: block; flex-shrink: 0; width: 52px; height: 52px; }
.logo-mark .lm-line { stroke-dasharray: 44; stroke-dashoffset: 0; }
.logo:hover .lm-dot { fill: #8BE6B9; }
.logo-text { display: flex; flex-direction: column; gap: 0.3rem; }
.logo-word { font-weight: 700; font-size: 2.125rem; line-height: 1; letter-spacing: -0.045em; }
.logo-word b { color: var(--accent); font-weight: 700; }
.logo-tag { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.nav-right { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; align-items: center; }
.nav-link { color: #2C2B28; text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 0.35rem 0; border-radius: 0; background: none; position: relative; transition: color var(--transition); }
.nav-link:hover { color: var(--accent); background: none; }
.nav-link.active, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link.active::after, .nav-link[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); }

/* ------------------------------------------------------------------ breadcrumb and page head */
.breadcrumb-bar { background: transparent; border: 0; }
.breadcrumb-inner { max-width: var(--max-w); margin: 0 auto; padding: 2.25rem 2rem 0; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); line-height: 1.7; }
.breadcrumb-inner a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-inner a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb-inner strong { color: var(--accent); font-weight: 400; }
.bc-sep { color: #A9A7A0; margin: 0 0.35em; }

.page-head { max-width: var(--max-w); margin: 0 auto; padding: 0.9rem 2rem 0.5rem; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(2.25rem, 4.6vw, 3.25rem); line-height: 1.04; letter-spacing: -0.045em; font-weight: 600; max-width: 18em; margin: 0; color: var(--ink); }
.page-head .subtitle { margin: 1rem 0 0; font-size: 1.125rem; line-height: 1.6; color: var(--text-mid); max-width: 38em; }

/* ------------------------------------------------------------------ calculator page layout */
.page { max-width: var(--max-w); margin: 0 auto; padding: 1.75rem 2rem 3rem; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; }
.main { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

/* panels: white, hairline, square */
.vat-calc, .fuel-calc, .calc-card, .cgt-calc, .iht-calc, .sdlt-calc, .guide-section, .quick-ref, .sidebar-card,
.content-card, .chart-card, .comparison-card, .chart-section, .status-card, .compare-box {
    background: var(--white); border: 1px solid var(--hairline); border-radius: 0; box-shadow: none;
}
.vat-calc, .fuel-calc, .calc-card, .cgt-calc, .iht-calc, .sdlt-calc { padding: 1.75rem; }
.vat-calc h1, .fuel-calc h1, .calc-card h1, .cgt-calc h1, .iht-calc h1, .sdlt-calc h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.04em; }
.vat-calc .subtitle, .fuel-calc .subtitle, .calc-card .subtitle, .cgt-calc .subtitle, .iht-calc .subtitle, .sdlt-calc .subtitle { color: var(--text-mid); }

.guide-section { padding: 1.75rem; }
.guide-section h2, .quick-ref h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 0.85rem; }
.guide-section h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.guide-section p, .guide-section ul { font-size: 1rem; color: var(--text-mid); line-height: 1.65; }
.guide-section a, .source-note a, .answer-box a, .content-card a, .article-wrap a:not(.cta-btn):not(.related-card), .calc-note a, .form-hint a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.guide-section a:hover, .content-card a:hover, .article-wrap a:not(.cta-btn):not(.related-card):hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
.worked-example { border-left: 2px solid var(--accent); background: var(--paper); padding: 0.9rem 1.1rem; margin: 1rem 0; }
.guide-section[data-deep] .worked-example h3 { margin: 0 0 0.4rem; }
.guide-section[data-deep] .worked-example p:last-child, .guide-section[data-deep] .worked-example table:last-child { margin-bottom: 0; }
.guide-section[data-deep] h3 { margin-top: 1.1rem; margin-bottom: 0.35rem; }
.guide-section[data-deep] p { margin-bottom: 0.75rem; }

.sidebar-card { padding: 1.25rem 1.25rem 1rem; }
.sidebar-card h3 { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
.sidebar-list { gap: 0; }
.sidebar-list li + li { border-top: 1px solid var(--rule); }
.sidebar-list a { color: var(--ink); font-size: 0.9375rem; padding: 0.55rem 0; text-decoration: none; }
.sidebar-list a::after { content: '\2192'; color: var(--text-muted); font-size: 0.85rem; transition: transform var(--transition), color var(--transition); }
.sidebar-list a:hover { color: var(--accent); }
.sidebar-list a:hover::after { color: var(--accent); transform: translateX(3px); }
.sidebar-row { color: var(--text-mid); font-size: 0.9rem; padding: 0.5rem 0; }
.sidebar-card > p { color: var(--text-mid); }

.sister-cta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; background: var(--ink); color: #EDEBE6; padding: 0.85rem 1rem; text-decoration: none; font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.sister-cta:hover { background: #24262A; color: #FFFFFF; }

/* ------------------------------------------------------------------ forms */
.form-group { margin-bottom: 1.25rem; }
.form-label, .toggle-label, .checkbox-label { color: var(--ink); }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; text-transform: none; letter-spacing: 0; margin-bottom: 0.5rem; }
.form-hint { font-size: 0.8125rem; color: var(--text-muted); }
.form-input, .form-select, .frs-select {
    border: 1px solid var(--ink); border-radius: 0; background-color: var(--white); color: var(--ink);
    padding: 0.8rem 0.85rem; box-shadow: none;
}
.form-input { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.form-select, .frs-select { font-family: var(--font-sans); font-size: 1rem; font-weight: 500; }
.form-input:hover, .form-select:hover, .frs-select:hover { border-color: var(--accent); }
.form-input:focus, .form-select:focus, .frs-select:focus { outline: none; border-color: var(--accent); background-color: var(--white); box-shadow: 0 0 0 3px rgba(21, 114, 73, 0.22); }
.form-prefix::before { font-family: var(--font-mono); font-weight: 400; color: var(--text-muted); font-size: 1.25rem; }
.form-prefix .form-input { padding-left: 2rem; }
.suffix-label { font-family: var(--font-mono); font-weight: 400 !important; color: var(--text-muted) !important; }
.eff-mode { font-size: 0.75rem !important; padding: 0.15rem 1.6rem 0.15rem 0.5rem !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* segmented controls and pills */
.mode-toggle { background: var(--white); border: 1px solid var(--ink); border-radius: 0; padding: 0; gap: 0; }
.mode-btn { border-radius: 0; color: var(--ink); font-weight: 500; transform: none !important; box-shadow: none !important; }
.mode-btn + .mode-btn { border-left: 1px solid var(--ink); }
.mode-btn:hover:not(.active) { background: var(--accent-pale); color: var(--ink); }
.mode-btn.active { background: var(--ink); color: var(--paper); }
.rate-pill, .fuel-pill, .vehicle-pill, .plan-pill {
    border: 1px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink); font-weight: 500; transform: none !important;
    font-family: var(--font-sans);
}
.rate-pill:hover:not(.active), .fuel-pill:hover:not(.active), .vehicle-pill:hover:not(.active), .plan-pill:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
.rate-pill.active, .fuel-pill.active, .vehicle-pill.active, .plan-pill.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rate-pills, .fuel-pills, .vehicle-pills, .plan-pills { flex-wrap: wrap; }
.toggle-v2, .toggle-row { border-radius: 0; }
.toggle-v2 { background: var(--paper); border: 1px solid var(--hairline); }
.toggle-v2.active .toggle-switch, .toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch, .toggle-slider { border-radius: 999px; }
.vehicle-section { border: 1px solid var(--hairline); border-radius: 0; }
.vehicle-tag { border-radius: 0; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.1em; }

/* primary buttons */
.calc-btn { background: var(--ink); color: var(--accent); border-radius: 0; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
.calc-btn:hover { background: #24262A; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.95rem 1.4rem; font-size: 0.9375rem; font-weight: 500; text-decoration: none; border: 1px solid var(--ink); transition: background var(--transition), color var(--transition), border-color var(--transition); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------------ results (dark blocks) */
.vat-result, .fuel-result, .calc-result, .cgt-result, .iht-result, .sdlt-result, .tax-result, .result-panel, .cashflow {
    background: var(--ink); color: #EDEBE6; border-radius: 0; box-shadow: none;
}
.result-row:not(:last-child) { border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.result-label { color: #B9B7B1; font-size: 0.9375rem; }
.result-value, .bar-value, .comp-value, .comp-total-value, .cashflow-value, .breakdown-amount, .timeline-amount, .status-card-value, .hero-value, .progress-pct {
    font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; font-weight: 400;
}
.result-value { color: #EDEBE6; font-size: 1.125rem; }
.result-section-label { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.12em; color: #9A9892; }
.result-row--total .result-label, .result-row--highlight .result-label, .cashflow-row--total .cashflow-label { color: var(--accent); font-weight: 500; }
.result-row--total .result-value, .result-row--highlight .result-value { font-family: var(--font-mono); font-weight: 400; color: var(--accent); font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.04em; line-height: 1.05; }
.result-hero .hero-label { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.12em; color: var(--accent); }
.result-hero .hero-value { font-family: var(--font-mono); font-weight: 400; color: #EDEBE6; font-size: clamp(2.5rem, 6vw, 4.25rem); letter-spacing: -0.05em; line-height: 1; }
.result-hero .hero-side .hero-value { color: #EDEBE6; font-size: clamp(1.5rem, 3vw, 2rem); }
.result-hero .hero-side .hero-label { color: #B9B7B1; }
.result-note, .comp-note { color: #B9B7B1; }
.result-divider { border-top-color: rgba(255, 255, 255, 0.12); }
.bar-track { background: rgba(255, 255, 255, 0.08); border-radius: 0; }
.bar-fill { border-radius: 0; }
.bar-fill.fill-1 { background: var(--blue); }
.bar-fill.fill-2 { background: #1B8B5A; }
.bar-label { color: #B9B7B1; }
.savings-badge { border-radius: 0; background: rgba(91, 211, 154, 0.12); border-color: rgba(91, 211, 154, 0.35); color: #5BD39A; font-family: var(--font-mono); font-weight: 400; }
.rate-badge { background: rgba(91, 211, 154, 0.14); color: #0F5A39; border-radius: 0; font-family: var(--font-mono); font-weight: 500; }
.result-panel .rate-badge, .calc-result .rate-badge { color: #5BD39A; }
.direction-badge { border-radius: 0; font-family: var(--font-mono); }

/* figure tiles (stat cards on light) */
.status-card { padding: 1.25rem; }
.status-card-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

/* ------------------------------------------------------------------ callouts */
.answer-box, .quick-answer, .warning-box, .response-note, .eligibility-notice, .not-eligible, .privacy-note, .muted-note, .timeline-note {
    border-radius: 0; box-shadow: none;
}
.answer-box, .quick-answer { background: var(--accent-pale); border: 0; border-left: 3px solid var(--accent); padding: 1.1rem 1.25rem; color: var(--ink); }
.answer-box h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.answer-box p { color: var(--ink); }
.answer-box .formula { color: var(--text-mid); font-family: var(--font-mono); font-size: 0.8125rem; }
.warning-box { background: var(--alert-pale); border: 0; border-left: 3px solid var(--alert); }
.response-note { background: var(--accent-pale); border: 0; border-left: 3px solid var(--accent); }
.formula-box { background: var(--paper); border-radius: 0; border-left: 2px solid var(--accent); font-family: var(--font-mono); font-size: 0.9375rem; color: var(--ink); }
.source-note, .calc-note, .table-source { color: var(--text-muted); }
.updated-date { font-family: var(--font-mono); font-size: 0.75rem !important; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.highlight { background: var(--accent-pale); }
.privacy-badge { border-radius: 0; }

/* ------------------------------------------------------------------ tables */
.ref-table, .info-table, .data-table, .week-table, .proj-table, .growth-table, .projection-table, .band-table, .privacy-table {
    border-radius: 0; box-shadow: none;
}
.ref-table th, .info-table th, .data-table th, .week-table th, .proj-table th, .growth-table th, .projection-table th, .band-table th, .privacy-table th {
    font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
    background: transparent; border-bottom: 1px solid var(--ink);
}
.ref-table td, .info-table td, .data-table td, .week-table td, .proj-table td, .growth-table td, .projection-table td, .band-table td, .privacy-table td {
    border-bottom: 1px solid var(--rule); color: var(--ink);
}
.info-table { border: 1px solid var(--hairline); background: var(--white); }
.info-table th { background: var(--white); }
.ref-table .amount, .ref-table td.amount, .proj-table td, .growth-table td, .week-table td, .projection-table td { font-family: var(--font-mono); font-weight: 400; font-variant-numeric: tabular-nums; }
.ref-table tbody tr:hover, .info-table tr:hover td, .info-table tr:hover, .proj-table tbody tr:hover, .growth-table tbody tr:hover { background: #F7FBF8; }
.table-wrap, .table-scroll, .week-table-wrap, .growth-table-wrap, .growth-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* page-specific tables and banners that assumed the old dark styling */
.week-table th { background: var(--white); }
.week-table td, .week-table tr.higher-rate td { color: var(--text-mid); }
.week-table td:last-child { color: var(--ink); font-weight: 500; }
.week-table tr.higher-rate td:last-child { color: var(--accent); }
.hero-result { border-radius: 0; }
.hero-result--register { background: var(--ink); border-top: 4px solid #3360FF; }
.hero-result--register .hero-status { color: #FFFFFF; }
.hero-result--register .hero-detail { color: #D6D4CE; }

/* ------------------------------------------------------------------ FAQ */
.faq-list { gap: 0; border-top: 1px solid var(--ink); }
.faq-item { background: transparent; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; }
.guide-section .faq-item, .faq-section .faq-item { background: transparent; }
.faq-q { padding: 1rem 0.25rem; font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; color: var(--ink); gap: 1rem; }
.faq-q:hover { color: var(--accent); }
.faq-q::after { content: '+'; font-family: var(--font-mono); font-weight: 400; font-size: 1.25rem; color: var(--accent); flex-shrink: 0; }
.faq-a { padding: 0 0.25rem; }
.faq-item.open .faq-a { padding: 0 0.25rem 1rem; }
.faq-a-inner { font-size: 0.9375rem; color: var(--text-mid); line-height: 1.65; }

/* ------------------------------------------------------------------ guides */
.hero { position: relative; max-width: var(--max-w); width: auto; height: auto; margin: 0 auto; padding: 1rem 2rem 0.5rem; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.5rem; align-items: end; overflow: visible; background: transparent; }
.hero img { grid-column: 2; grid-row: 1; width: 100%; height: 300px; object-fit: cover; border: 1px solid var(--hairline); display: block; filter: saturate(0.9); }
.hero-overlay { position: static; inset: auto; grid-column: 1; grid-row: 1; background: none; padding: 0 0 0.25rem; display: block; }
.hero-overlay::before { content: 'Guide'; display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.hero-title { font-family: var(--font-display); color: var(--ink); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; max-width: none; margin: 0; }
.article-wrap { max-width: 760px; padding: 2.5rem 2rem 3.5rem; }
.article-wrap p { font-size: 1.0625rem; color: var(--text-mid); line-height: 1.7; }
.article-wrap h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 1.875rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; color: var(--ink); margin: 2.75rem 0 0.85rem; }
.article-wrap h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.article-wrap li { color: var(--text-mid); }
.article-wrap strong { color: var(--ink); font-weight: 600; }
.cta-box { background: var(--ink); border-radius: 0; text-align: left; padding: 2rem; color: #EDEBE6; }
.cta-box p { color: #B9B7B1; }
.cta-btn { background: var(--accent); color: var(--on-accent); border-radius: 0; font-weight: 600; padding: 0.9rem 1.5rem; text-decoration: none; transform: none !important; }
.cta-btn:hover { background: var(--accent-deep); color: var(--on-accent); }
.faq-section h2, .related-guides h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; }
.related-guides { border-top: 1px solid var(--ink); }
.related-card { background: var(--white); border: 1px solid var(--hairline); border-radius: 0; transform: none !important; box-shadow: none !important; text-decoration: none; transition: border-color var(--transition); }
.related-card:hover { border-color: var(--ink); }
.related-card h3 { font-size: 1rem; font-weight: 600; color: var(--ink); }
.related-card p { color: var(--text-muted); }
.infographic img, figure.diagram img { border: 1px solid var(--hairline); border-radius: 0; background: var(--white); }
.infographic figcaption, figure.diagram figcaption { font-size: 0.8125rem; color: var(--text-muted); }

/* guides hub */
.page-header { max-width: var(--max-w); margin: 0 auto; padding: 0.9rem 2rem 1rem; text-align: left; background: transparent; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(2.25rem, 4.6vw, 3.25rem); letter-spacing: -0.045em; line-height: 1.04; font-weight: 600; color: var(--ink); }
.page-header p { font-size: 1.125rem; color: var(--text-mid); max-width: 38em; margin-left: 0; }
.guides-grid { gap: 1.25rem; }
.guide-card { background: var(--white); border: 1px solid var(--hairline); border-radius: 0; box-shadow: none !important; transform: none !important; text-decoration: none; color: var(--ink); transition: border-color var(--transition); }
.guide-card:hover { border-color: var(--ink); }
.guide-card h2, .guide-card h3 { font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.guide-card p { color: var(--text-mid); }
.guide-card-icon { width: 44px; height: 44px; border-radius: 0; background: var(--white) !important; border: 1.5px solid var(--accent); color: var(--accent) !important; font-family: var(--font-mono); display: flex; align-items: center; justify-content: center; }
.guide-card-arrow { color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; }
.guide-tag { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.12em; color: var(--accent); }

/* trust pages and 404 */
.content-page { max-width: 840px; margin: 0 auto; padding: 2.5rem 2rem 3.5rem; }
.content-card { padding: 2.75rem; }
.content-card h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; margin-bottom: 0.85rem; color: var(--ink); }
.content-card h2 { font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); }
.content-card p, .content-card ul, .content-card li { color: var(--text-mid); }
.lead { font-size: 1.1875rem; color: var(--ink); line-height: 1.6; letter-spacing: -0.01em; }
.email-display { font-family: var(--font-mono); border-radius: 0; }

/* charts drawn in HTML/CSS */
.chart-legend-dot, .band-dot, .leave-legend-swatch { border-radius: 0; }
.chart-bar, .band-bar, .band-seg, .band-bar-seg, .progress-track, .progress-fill, .timeline-dot, .leave-day { border-radius: 0; }
.chart-tooltip { background: var(--ink); border-radius: 0; font-family: var(--font-mono); }
.progress-fill--safe { background: #1B8B5A; }
.progress-fill--warning { background: var(--blue); }
.progress-fill--danger { background: var(--ink); }

/* ------------------------------------------------------------------ weekly pump price card (homepage hero, fuel cost page) */
.price-card { flex: 1 1 520px; min-width: 0; margin: 0; background: var(--white); border: 1px solid var(--hairline); padding: 1.75rem 1.75rem 1.25rem; }
.price-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.75rem; }
.price-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; }
.price-now { margin-top: 0.4rem; font-family: var(--font-mono); font-size: clamp(2.75rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.05em; }
.price-delta { padding: 0.4rem 0.65rem; background: var(--accent-pale); color: var(--accent-deep); font-family: var(--font-mono); font-size: 0.875rem; }
.spark { width: 100%; height: auto; margin-top: 1.1rem; display: block; }
.price-card figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 0.75rem; margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.spark polyline { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #B9B7B1; margin-top: 3rem; font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.55; text-align: left; }
.site-footer a { color: #D6D4CE; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: #5BD39A; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a[aria-current="page"] { color: #5BD39A; }
.sf-inner { max-width: var(--max-w); margin: 0 auto; padding: 3.25rem 2rem 2.25rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 2rem; }
.sf-brand p { margin: 0.9rem 0 0; max-width: 300px; color: #B9B7B1; }
.sf-logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-sans); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.045em; color: #EDEBE6 !important; text-decoration: none !important; }
.sf-logo::before { content: ''; width: 28px; height: 28px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52'%3E%3Crect x='1' y='1' width='50' height='50' rx='12' fill='none' stroke='%2345474C' stroke-width='2'/%3E%3Cpath d='M13 35 L21 25 L29 29 L39 15' stroke='%235BD39A' stroke-width='3.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='39' cy='15' r='3.6' fill='%235BD39A'/%3E%3C/svg%3E") center / contain no-repeat; }
.sf-logo b { color: #5BD39A; }
.sf-h { color: #EDEBE6; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.9rem; }
.sf-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.sf-bottom { max-width: var(--max-w); margin: 0 auto; padding: 1.25rem 2rem 2.5rem; border-top: 1px solid #2E3034; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.8125rem; color: #9A9892; }

/* ------------------------------------------------------------------ cookie banner (cookie-consent.js injects its own styles; these win by specificity) */
body .cc-banner { background: var(--ink); border-top: 2px solid #5BD39A; font-family: var(--font-sans); font-size: 0.9rem; color: #D6D4CE; box-shadow: none; padding: 1rem 2rem; }
body .cc-banner a { color: #5BD39A; text-underline-offset: 3px; }
body .cc-btn { border-radius: 0; font-family: var(--font-sans); font-weight: 600; font-size: 0.875rem; padding: 0.65rem 1.4rem; opacity: 1; border: 1px solid transparent; }
body .cc-accept { background: #5BD39A; color: var(--ink); }
body .cc-reject { background: #FFFFFF; color: var(--ink); }
body .cc-btn:hover { opacity: 1; filter: brightness(0.95); }
body .cc-btn:focus-visible { outline: 2px solid #5BD39A; outline-offset: 2px; }

/* ------------------------------------------------------------------ generated diagrams */
figure.diagram { margin: 1.5rem 0; }
figure.diagram img { display: block; width: 100%; max-width: 640px; height: auto; }
figure.diagram figcaption { margin-top: 0.6rem; max-width: 640px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
    .sf-inner { grid-template-columns: 1fr 1fr; }
    .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .page { grid-template-columns: minmax(0, 1fr); }
    .hero { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .hero img { grid-column: 1; grid-row: 2; height: 240px; }
    .hero-overlay { grid-row: 1; }
}
@media (max-width: 640px) {
    .masthead-inner, .breadcrumb-inner, .page-head, .page, .page-header, .hero { padding-left: 1rem; padding-right: 1rem; }
    .masthead-bar { padding: 1.1rem 0 0.9rem; gap: 0.85rem; }
    .logo { gap: 0.75rem; }
    .logo-mark { width: 42px; height: 42px; }
    .logo-word { font-size: 1.75rem; }
    .logo-tag { font-size: 0.5625rem; letter-spacing: 0.1em; }
    .nav-right { width: 100%; gap: 0.25rem 1.25rem; }
    .nav-link { display: inline-block; font-size: 0.875rem; }
    .breadcrumb-inner { padding-top: 1.5rem; }
    .page-head .subtitle { font-size: 1rem; }
    .page { padding-top: 1.25rem; gap: 1.25rem; }
    .vat-calc, .fuel-calc, .calc-card, .cgt-calc, .iht-calc, .sdlt-calc, .guide-section { padding: 1.25rem; }
    .content-page { padding: 1.5rem 1rem 2.5rem; }
    .content-card { padding: 1.5rem 1.25rem; }
    .article-wrap { padding: 2rem 1rem 2.5rem; }
    .cta-box { padding: 1.5rem 1.25rem; }
    .sf-inner { grid-template-columns: 1fr; padding: 2.25rem 1rem 1.5rem; gap: 1.75rem; }
    .sf-bottom { padding: 1rem 1rem 2rem; }
    body .cc-banner { padding: 1rem; }
    .price-card { padding: 1.25rem 1.1rem 1rem; }
    .spark text { font-size: 21px; } /* the chart scales to about half size: keep its labels readable */
    .result-row { flex-wrap: wrap; gap: 0.15rem 1rem; }
    .result-value { font-size: 1rem; }
    .result-row--total .result-value, .result-row--highlight .result-value { font-size: 1.75rem; }
    .result-hero .hero-side { text-align: left; }
    .projection-table { overflow-x: auto; padding: 1.25rem 1rem; border-radius: 0; }
    .info-table th, .info-table td { padding: 0.6rem 0.55rem; font-size: 0.875rem; overflow-wrap: anywhere; }
}

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}
