/* azurehybridbenefit.com — shared styles
   Colour follows the operating system setting via prefers-color-scheme. */

:root {
  color-scheme: light dark;

  --canvas: #F4F6F8;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --ink: #1D232B;
  --ink-2: #454F5C;
  --muted: #6A7482;
  --line: #E3E7EC;
  --line-strong: #C9D0D8;
  --primary: #3B5BDB;
  --primary-ink: #FFFFFF;
  --link: #2F4FC7;
  --focus: #3B5BDB;

  /* Chart series (validated for colour-vision deficiency on this surface) */
  --payg: #C2621A;
  --licence: #3B5BDB;
  --keep: #0E9F9A;
  --keep-wash: rgba(14, 159, 154, 0.12);

  /* Status: always paired with an icon and label */
  --ok: #0B6B47;   --ok-bg: #E3F5EC;
  --warn: #8A5300; --warn-bg: #FFF3D6;
  --err: #B3261E;  --err-bg: #FDECEA;
  --info: #1F4E9A; --info-bg: #E8F0FC;

  --code-bg: #1D232B;
  --code-ink: #E7ECF3;
  --scrim: rgba(29, 35, 43, 0.4);
  --shadow: 0 8px 24px rgba(29, 35, 43, 0.12);
  --bar-bg: #1D232B;
  --bar-ink: #FFFFFF;
  --bar-muted: #AEB8C5;
  --bar-keep: #7BE0D4;
  --bar-keep-wash: rgba(123, 224, 212, 0.12);
  --bar-keep-line: rgba(123, 224, 212, 0.45);
  --bar-rule: rgba(255, 255, 255, 0.14);
  --bar-shadow: 0 -6px 20px rgba(29, 35, 43, 0.18);

  --font: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, Consolas, monospace;
  --r-s: 6px;
  --r-m: 10px;
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0F141B;
    --surface: #161D27;
    --surface-2: #1B2330;
    --ink: #E7ECF3;
    --ink-2: #B9C3D0;
    --muted: #8D98A8;
    --line: #2A3441;
    --line-strong: #3A4656;
    --primary: #6A86F2;
    --primary-ink: #0F141B;
    --link: #93A9F7;
    --focus: #93A9F7;

    --payg: #D07A35;
    --licence: #6A86F2;
    --keep: #1BA7A0;
    --keep-wash: rgba(27, 167, 160, 0.16);

    --ok: #6FD3A6;   --ok-bg: rgba(111, 211, 166, 0.12);
    --warn: #F0C067; --warn-bg: rgba(240, 192, 103, 0.12);
    --err: #FF8A80;  --err-bg: rgba(255, 138, 128, 0.12);
    --info: #9DB8F5; --info-bg: rgba(157, 184, 245, 0.12);

    --code-bg: #0B1016;
    --code-ink: #E7ECF3;
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --bar-bg: #25344A;
    --bar-ink: #E7ECF3;
    --bar-muted: #9AA6B6;
    --bar-keep: #5FD6CC;
    --bar-keep-wash: rgba(95, 214, 204, 0.12);
    --bar-keep-line: rgba(95, 214, 204, 0.5);
    --bar-rule: rgba(255, 255, 255, 0.12);
    --bar-shadow: 0 -8px 28px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--link); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
code, kbd, .mono { font-family: var(--mono); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.005em; white-space: nowrap; }
.site-nav { flex: 1; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 19px 0; display: block; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }
.nav-cta {
  text-decoration: none; color: var(--primary-ink); background: var(--primary);
  padding: 7px 14px; border-radius: var(--r-s); font-size: 14.5px; font-weight: 600; white-space: nowrap;
}
.site-nav .nav-cta-mobile { display: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 10px; cursor: pointer; font-size: 14px; }

@media (max-width: 900px) {
  .site-header .wrap { flex-wrap: wrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand { flex: 1; }
  .nav-toggle { display: inline-block; }
  .nav-cta { display: none; }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 10px 0; border-top: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--primary); padding-left: 12px; }
  .site-nav .nav-cta-mobile { display: block; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; max-width: 80ch; }
.site-footer p + p { margin-top: 6px; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-s);
  padding: 7px 13px; font-size: 14.5px; font-weight: 500; cursor: pointer; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn.quiet { border-color: transparent; background: none; color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); border-color: var(--line); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field label, .field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 8px 10px; font-size: 15.5px;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.input.mono { font-family: var(--mono); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 16px; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); font-weight: 600; }

/* ---------- Content pages ---------- */
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; max-width: 24ch; }
.page-head p { font-size: 18px; color: var(--ink-2); margin: 0; max-width: 60ch; }

.content { padding-top: 16px; }
.content > section { margin-top: 40px; }
.content h2 { font-size: 24px; letter-spacing: -0.015em; line-height: 1.25; margin: 0 0 16px; }
.content h3 { font-size: 18px; line-height: 1.3; margin: 0 0 10px; }
.content p { max-width: 72ch; }
.content ul, .content ol { padding-left: 22px; margin: 0; max-width: 72ch; }
.content li + li { margin-top: 8px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.panels.stack { grid-template-columns: 1fr; max-width: 860px; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px 24px; }
.panel > p:first-of-type { margin-top: 0; color: var(--ink-2); }
.panel .note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.panel.narrow { max-width: 860px; }
pre.code {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-s);
  padding: 14px 16px; overflow-x: auto; font: 14px/1.7 var(--mono); margin: 0;
}
pre.code + pre.code { margin-top: 12px; }

.toc { margin-top: 24px; font-size: 15px; }
.toc > span { font-weight: 600; color: var(--muted); font-size: 13.5px; }
.toc ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }

.facts { margin: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 4px 0 16px; color: var(--ink-2); max-width: 72ch; }
.facts dd:last-child { margin-bottom: 0; }
.facts code { overflow-wrap: anywhere; }

.faq { max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.faq details + details { margin-top: 10px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 16.5px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 9px; height: 9px; flex: none; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px);
  transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq .answer { padding: 0 20px 18px; color: var(--ink-2); }
.faq .answer p { margin: 0; }
.faq .answer ul { margin-top: 8px; }

.form { display: grid; gap: 16px; max-width: 560px; }
.form-status { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-s); font-size: 15px; max-width: 560px; }
.form-status.ok { background: var(--ok-bg); color: var(--ok); }
.form-status.err { background: var(--err-bg); color: var(--err); }

/* ---------- Calculator ---------- */
.calc-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 40px 0 36px; align-items: start; }
.calc-hero h1 { font-size: 17px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; letter-spacing: 0; }
.verdict { font-size: clamp(26px, 3vw, 38px); line-height: 1.16; letter-spacing: -0.022em; font-weight: 700; margin: 0 0 14px; max-width: 20ch; }
.verdict-sub { font-size: 17px; color: var(--ink-2); margin: 0 0 26px; max-width: 46ch; }
.is-updating .verdict, .is-updating .verdict-sub, .is-updating .chart-card, .is-updating .totals-bar .figures { opacity: .55; transition: opacity .2s; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; max-width: 460px; }
.settings .full { grid-column: 1 / -1; }
.hours-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.hours-row .input { width: 96px; }
.price-input { position: relative; }
.price-input span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
.price-input .input { padding-left: calc(14px + var(--sym-w, 1ch)); }

.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px 20px 12px; margin: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.chart-head h2 { font-size: 16.5px; margin: 0; }
.legend { display: flex; gap: 14px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend i.area { height: 10px; background: var(--keep-wash); border: 1px solid var(--keep); }
.chart-sub { font-size: 14px; color: var(--muted); margin: 4px 0 8px; }
/* Fixed height so the card doesn't resize when the chart first draws; renderChart reads it back */
.plot { position: relative; height: 290px; }
.plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.plot svg text { font-family: var(--font); }
.plot .grid-line { stroke: var(--line); }
.plot .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.plot .l-payg { stroke: var(--payg); }
.plot .l-licence { stroke: var(--licence); }
.plot .a-keep { fill: var(--keep-wash); }
.plot .rule { stroke: var(--ink); }
.plot .crosshair { stroke: var(--muted); }
.plot .lbl { fill: var(--ink); font-size: 13px; font-weight: 700; }
.plot .lbl-2 { fill: var(--ink-2); font-size: 12px; }
.plot .dot { fill: var(--surface); stroke: var(--ink); }
.plot .empty { fill: var(--muted); font-size: 14px; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--canvas);
  font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; white-space: nowrap;
  opacity: 0; transform: translate(-50%, calc(-100% - 10px)); font-variant-numeric: tabular-nums; z-index: 2;
}
.years { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.years th, .years td { text-align: right; padding: 7px 8px; border-top: 1px solid var(--line); }
.years th:first-child, .years td:first-child { text-align: left; }
.years thead th { font-weight: 600; color: var(--muted); border-top: 0; }
.years td:last-child { font-weight: 700; }
.years tr.pending td { color: var(--muted); font-weight: 400; }

.fleet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.fleet-head h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0; }
.fleet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.drop-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 20px; margin-bottom: 12px; }
.drop-panel[hidden] { display: none; }
.drop-panel h3 { font-size: 16px; margin: 0 0 10px; }
.drop-panel ol { margin: 0; padding-left: 20px; color: var(--ink-2); }
.drop-panel li + li { margin-top: 4px; }
.manual-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.manual-form .field { width: 150px; }
.manual-form .field.wide { width: 220px; }
.manual-form .error { flex-basis: 100%; color: var(--err); font-size: 14px; margin: 0; }

.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-s); padding: 10px 14px; font-size: 14.5px; margin-bottom: 12px; }
.notice[hidden] { display: none; }
.notice svg { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.notice.info { background: var(--info-bg); color: var(--info); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.err { background: var(--err-bg); color: var(--err); }
.notice .btn { margin-left: auto; padding: 3px 10px; font-size: 13.5px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.chip .n { font-variant-numeric: tabular-nums; margin-left: 5px; opacity: .75; }

.grid-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow-x: auto; }
.vm-grid { border-collapse: collapse; width: 100%; min-width: 1000px; font-size: 14.5px; }
.vm-grid th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vm-grid td { padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.vm-grid tbody tr:last-child td { border-bottom: 0; }
.vm-grid tbody tr { cursor: pointer; }
.vm-grid tbody tr:hover td { background: var(--surface-2); }
.vm-grid tr.is-off td.dim { color: var(--muted); }
.vm-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.vm-grid th.num { white-space: normal; min-width: 64px; }
.vm-grid .sku { font-family: var(--mono); font-size: 13.5px; }
.vm-grid .sub { display: block; font-size: 12.5px; color: var(--muted); }
.vm-grid .hours-cell {
  width: 72px; text-align: right; font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 4px 6px;
}
.vm-grid .hours-cell.part { border-color: var(--info); background: var(--info-bg); }
.drawer .hours-field { margin-bottom: 18px; }
.drawer .hours-field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.drawer .hours-field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.vm-grid input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.vm-grid .remove { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 4px; font-size: 13.5px; text-decoration: underline; }
.vm-grid .remove:hover { color: var(--ink); }
.vm-grid .empty-row td { text-align: center; padding: 40px 12px; color: var(--muted); cursor: default; white-space: normal; }
.vm-grid .empty-row:hover td { background: none; }
.save-cell { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.mini { width: 60px; height: 8px; background: var(--canvas); border-radius: 3px; overflow: hidden; flex: none; }
.mini div { height: 100%; background: var(--keep); border-radius: 0 3px 3px 0; }
.neg { color: var(--err); }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.status svg { width: 12px; height: 12px; flex: none; }
.s-ok { color: var(--ok); background: var(--ok-bg); }
.s-warn { color: var(--warn); background: var(--warn-bg); }
.s-err { color: var(--err); background: var(--err-bg); }
.s-info { color: var(--info); background: var(--info-bg); }
.s-pending { color: var(--muted); background: var(--surface-2); }

.rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.rules h2 { font-size: 22px; margin: 0 0 10px; }
.rules > div > p { color: var(--ink-2); margin: 0; max-width: 46ch; }
.rules dl { margin: 0; }
.rules dt { font-weight: 700; }
.rules dd { margin: 4px 0 16px; color: var(--ink-2); max-width: 62ch; }

.totals-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: var(--bar-bg); color: var(--bar-ink);
  border-top: 3px solid var(--keep); box-shadow: var(--bar-shadow);
}
.totals-bar[hidden] { display: none; }
.totals-bar .wrap { display: flex; gap: 12px 28px; align-items: center; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.totals-bar .figures { display: flex; align-items: center; gap: 12px 0; flex-wrap: wrap; }
.totals-bar .t { display: flex; flex-direction: column; padding: 0 22px; border-left: 1px solid var(--bar-rule); }
.totals-bar .t span { font-size: 12.5px; color: var(--bar-muted); }
.totals-bar .t b { font-size: 18px; font-variant-numeric: tabular-nums; }
.totals-bar .t.big {
  border: 1px solid var(--bar-keep-line); border-radius: var(--r-m); background: var(--bar-keep-wash);
  padding: 6px 18px; margin-right: 6px;
}
.totals-bar .t.big + .t { border-left: 0; }
.totals-bar .t.big span { color: var(--bar-ink); font-weight: 600; }
.totals-bar .t.big b { font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; color: var(--bar-keep); }
.totals-bar .t.big.neg { border-color: rgba(255, 156, 148, 0.5); background: rgba(255, 156, 148, 0.12); }
.totals-bar .t.big.neg b { color: #FF9C94; }
.totals-bar .note { margin-left: auto; font-size: 13px; color: var(--bar-muted); max-width: 34ch; }
body.has-totals { padding-bottom: 104px; }

.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); z-index: 31;
  box-shadow: var(--shadow); display: none; flex-direction: column; border-left: 1px solid var(--line);
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { display: flex; animation: drawer-in .22s ease; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer h2 { margin: 0; font-size: 18px; word-break: break-all; }
.drawer header p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.drawer .close { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 6px; }
.drawer .body { padding: 18px 22px 28px; overflow-y: auto; }
.steps { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--canvas); font-size: 12px; font-weight: 700; display: grid; place-items: center; color: var(--ink-2); }
.steps .what { font-weight: 600; }
.steps .how { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); }
.callout { padding: 12px 14px; border-radius: var(--r-s); font-size: 14.5px; margin-top: 12px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); }
.callout.info { background: var(--info-bg); color: var(--info); }
.callout.err { background: var(--err-bg); color: var(--err); }
.source { color: var(--muted); font-size: 13.5px; margin-top: 16px; }

@media (max-width: 960px) {
  .calc-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .rules { grid-template-columns: 1fr; gap: 20px; }
  .totals-bar .note { display: none; }
  .totals-bar .t { padding: 0 16px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .settings { grid-template-columns: 1fr; }
  .chart-card { padding: 16px 12px 10px; }
  .plot { height: 250px; }
  .years { font-size: 13px; }
  .years th, .years td { padding: 6px 4px; }
  .totals-bar .wrap { padding-top: 10px; padding-bottom: 10px; }
  .totals-bar .figures { flex-wrap: nowrap; }
  .totals-bar .t { padding: 0 14px; }
  .totals-bar .t.big { padding: 4px 12px; margin-right: 0; }
  .totals-bar .t.big b { font-size: 22px; }
  .totals-bar .t b { font-size: 17px; }
  .totals-bar .t.hide-sm { display: none; }
  .panel { padding: 18px; }
  .manual-form .field, .manual-form .field.wide { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
