/* moderntax.nz — "The Load Calculation"
   A modern engineer's drawing set: light concrete, steel-blue ink, structural type.
   Tokens: concrete #F4F5F3 · ink #141E26 · steel #2A6FC4 · whenua #177B4B · violet #6D51C9 · signal #C7492A
   Type: Archivo Expanded (display) · Public Sans (body) · IBM Plex Mono (data/annotation) */

@import url('/assets/fonts.css');

:root {
  --concrete: #F4F5F3;
  --card: #FFFFFF;
  --recessed: #ECEFEC;
  --ink: #141E26;
  --ink-2: #45525D;
  --ink-3: #77828B;
  --hairline: #DDE1DE;
  --rule: #B9C1BC;
  /* series — validated palette; color follows the entity, never the rank */
  --s-land: #177B4B;      /* pillar 1 · land value */
  --s-gst: #2A6FC4;       /* pillar 2 · consumption */
  --s-corp: #6D51C9;      /* pillar 3 · statutory privilege */
  --s-income: #C7492A;    /* the load being removed — income tax */
  --s-other: #76838D;     /* de-emphasis / other */
  --s-land-wash: rgba(23,123,75,0.09);
  --s-gst-wash: rgba(42,111,196,0.09);
  --s-corp-wash: rgba(109,81,201,0.09);
  --s-income-wash: rgba(199,73,42,0.09);
  --accent: #2A6FC4;
  --accent-deep: #1C5498;
  --good: #0E7A3C;
  --display: 'Archivo Expanded', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 76rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--concrete);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--s-income); outline-offset: 2px; border-radius: 2px;
}

img, svg { max-width: 100%; height: auto; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.6rem;
  padding: 0.75rem var(--gutter);
  background: color-mix(in srgb, var(--concrete) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.masthead .brand {
  font-family: var(--display); font-weight: 700; font-stretch: 125%;
  font-size: 0.98rem; letter-spacing: 0.01em; text-transform: lowercase;
  color: var(--ink); text-decoration: none;
}
.masthead .brand .tld { color: var(--accent); }
.masthead nav { margin-left: auto; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.masthead nav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-2); text-decoration: none; padding: 0.2rem 0;
}
.masthead nav a:hover { color: var(--accent-deep); }
.masthead nav a[aria-current="page"] { color: var(--accent-deep); border-bottom: 2px solid var(--accent); }
@media (max-width: 46rem) {
  .masthead { flex-wrap: wrap; gap: 0.3rem 1rem; padding: 0.6rem 1.1rem; }
  .masthead .brand { flex-basis: 100%; }
  .masthead nav { margin-left: 0; gap: 0.9rem; }
  .masthead nav a { font-size: 0.7rem; }
}

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--hairline); overflow: hidden; }
.hero-grid {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 6.5vw, 5.5rem) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
}
@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } }
.hero .drawing-ref {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.6rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.hero .drawing-ref::before { content: ""; width: 2.2rem; height: 1px; background: var(--s-income); }
.hero h1 {
  font-family: var(--display); font-weight: 700; font-stretch: 125%;
  font-size: clamp(2.1rem, 4.9vw, 3.55rem);
  line-height: 1.02; letter-spacing: -0.01em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 .off { color: var(--s-income); position: relative; white-space: nowrap; }
.hero h1 .off::after {
  content: ""; position: absolute; left: -1%; right: -1%; top: 52%; height: 0.075em;
  background: var(--ink); transform: scaleX(0); transform-origin: left center;
  animation: strike 0.7s 1s ease forwards;
}
@keyframes strike { to { transform: scaleX(1); } }
.hero .lede {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem); line-height: 1.55;
  color: var(--ink-2); max-width: 46ch; text-wrap: pretty;
}
.hero .hero-actions { margin-top: 2.2rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-fig { align-self: end; }
.hero-fig svg { display: block; width: 100%; height: auto; }
.hero-fig .fig-cap {
  font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3);
  letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.6rem; text-align: center;
}

.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.88rem;
  letter-spacing: 0.03em; text-decoration: none; cursor: pointer;
  padding: 0.78rem 1.45rem; border-radius: 3px; border: 1px solid var(--accent-deep);
  transition: background 0.15s, color 0.15s;
}
.btn-solid { background: var(--accent-deep); color: #fff; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent-deep); }
.btn-ghost:hover { background: var(--s-gst-wash); }

/* load table strip under hero */
.load-strip {
  border-top: 1px solid var(--hairline);
  background: var(--card);
}
.load-strip .ls-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
}
.load-strip .cell { padding: 1.05rem var(--gutter) 1.1rem 1.4rem; border-left: 1px solid var(--hairline); position: relative; }
.load-strip .cell::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--pillar, var(--ink-3));
}
.load-strip .k {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 0.3rem;
}
.load-strip .v { font-family: var(--mono); font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.load-strip .v .unit { font-size: 0.82rem; font-weight: 400; color: var(--ink-2); }
.load-strip .src { font-family: var(--mono); font-size: 0.63rem; color: var(--ink-3); display: block; margin-top: 0.28rem; }
.load-strip .src a { color: inherit; }

/* ---------- sheets (sections of the drawing set) ---------- */
main { display: block; }
.sheet { padding: clamp(3.2rem, 7vw, 6rem) var(--gutter); border-bottom: 1px solid var(--hairline); }
.sheet.on-card { background: var(--card); }
.sheet-inner { max-width: var(--maxw); margin: 0 auto; }
.sheet-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-top: 2px solid var(--ink); padding-top: 0.55rem; margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}
.sheet-head .no { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.sheet-head .case { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
.sheet-head .case b { color: var(--case-c, var(--ink-2)); font-weight: 600; }
.sheet h2 {
  font-family: var(--display); font-weight: 650; font-stretch: 125%;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.08;
  letter-spacing: -0.005em; text-transform: uppercase;
  margin-bottom: 1.4rem; text-wrap: balance; max-width: 30ch;
}
.sheet h3 { font-family: var(--display); font-weight: 600; font-stretch: 125%; font-size: 1.12rem; letter-spacing: 0.01em; text-transform: uppercase; margin: 2.2rem 0 0.8rem; }
.sheet .prose { max-width: var(--measure); }
.sheet p { margin-bottom: 1.15rem; text-wrap: pretty; }
.sheet p:last-child { margin-bottom: 0; }
.sheet ul, .sheet ol { margin: 0 0 1.15rem 1.4rem; }
.sheet li { margin-bottom: 0.5rem; }
.pull {
  font-size: 1.28rem; line-height: 1.5; font-weight: 500; color: var(--accent-deep);
  border-left: 3px solid var(--accent); padding: 0.4rem 0 0.4rem 1.4rem; margin: 2rem 0;
  max-width: 56ch; text-wrap: pretty;
}
.pull cite { display: block; font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.7rem; }
.footnote { font-size: 0.92rem; color: var(--ink-2); }
.src-note { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); line-height: 1.55; margin-top: 1rem; max-width: none; }
.src-note a { color: inherit; }

/* two-column split inside a sheet */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(1.6rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 56rem) { .split { grid-template-columns: 1fr; } }

/* ---------- pillar cards ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.1rem; margin: 2rem 0 0.6rem; }
.pillar-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 4px;
  padding: 1.5rem 1.5rem 1.4rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.pillar-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--pillar); }
.pillar-card .p-no { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.75rem; }
.pillar-card .p-name { font-family: var(--display); font-weight: 650; font-stretch: 125%; font-size: 1.3rem; text-transform: uppercase; line-height: 1.15; margin-bottom: 0.6rem; }
.pillar-card .p-base { font-family: var(--mono); font-size: 0.78rem; color: var(--pillar); font-weight: 600; margin-bottom: 0.8rem; }
.pillar-card .p-desc { font-size: 0.95rem; color: var(--ink-2); line-height: 1.55; flex-grow: 1; }
.pillar-card .p-foot { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); margin-top: 1.1rem; padding-top: 0.8rem; border-top: 1px solid var(--hairline); }
.pillar-card.removed::before { background: repeating-linear-gradient(90deg, var(--s-income) 0 8px, transparent 8px 14px); }
.pillar-card.removed .p-name { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--s-income); }

/* ---------- exhibits (data cards) ---------- */
.exhibit {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 4px;
  padding: clamp(1.3rem, 3vw, 2.1rem); margin: 2rem 0;
}
.sheet.on-card .exhibit { background: var(--concrete); }
.exhibit .ex-head { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.exhibit .ex-tag {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff; background: var(--ink); padding: 0.28rem 0.55rem; border-radius: 2px;
}
.exhibit .ex-title { font-weight: 700; font-size: 1.1rem; }
.exhibit .ex-sub { font-size: 0.92rem; color: var(--ink-2); flex-basis: 100%; margin-top: -0.5rem; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 1rem; }
.tile { background: var(--recessed); border: 1px solid var(--hairline); border-radius: 4px; padding: 1.05rem 1.15rem; }
.tile .label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.45rem; }
.tile .value { font-family: var(--body); font-weight: 650; font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.1; color: var(--ink); }
.tile .value .unit { font-size: 62%; font-weight: 450; color: var(--ink-2); }
.tile .note { font-size: 0.85rem; color: var(--ink-2); margin-top: 0.4rem; line-height: 1.45; }
.tile.keyed { border-top: 3px solid var(--pillar, var(--ink-3)); }

/* hbar rows */
.hbars { display: flex; flex-direction: column; gap: 0.85rem; }
.hbar-row { display: grid; grid-template-columns: minmax(8rem, 15rem) 1fr; gap: 1rem; align-items: center; }
@media (max-width: 40rem) { .hbar-row { grid-template-columns: 1fr; gap: 0.25rem; } }
.hbar-name { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); text-align: right; }
@media (max-width: 40rem) { .hbar-name { text-align: left; } }
.hbar-track { display: flex; align-items: center; gap: 0.6rem; min-height: 22px; }
.hbar { height: 18px; border-radius: 0 4px 4px 0; min-width: 2px; transition: width 0.7s cubic-bezier(0.2,0.7,0.2,1); position: relative; overflow: hidden; }
.hbar-churn {
  position: absolute; right: 0; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.55) 0 4px, transparent 4px 9px);
  border-left: 2px solid var(--card);
}
.hbar-val { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chart-axis-note { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); margin-top: 0.9rem; }

/* legend */
.legend { display: flex; gap: 1.15rem; flex-wrap: wrap; margin: 0.3rem 0 1rem; }
.legend .key { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.73rem; color: var(--ink-2); }
.legend .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .linekey { width: 16px; height: 2px; border-radius: 1px; display: inline-block; }

/* stacked comparison bars */
.stack-row { margin-bottom: 1.4rem; }
.stack-row .stack-name { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); margin-bottom: 0.4rem; }
.stack { display: flex; height: 28px; border-radius: 4px; overflow: hidden; background: var(--recessed); }
.stack .seg { height: 100%; border-right: 2px solid var(--card); position: relative; transition: width 0.6s cubic-bezier(0.2,0.7,0.2,1); }
.stack .seg:last-child { border-right: none; }
.seg-label { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; color: #fff; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; white-space: nowrap; }

/* ---------- svg line charts (charts.js) ---------- */
.chart { position: relative; margin-top: 0.4rem; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid line { stroke: var(--hairline); stroke-width: 1; }
.chart .axisline { stroke: var(--rule); stroke-width: 1; }
.chart .tick { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .endlab { font-family: var(--mono); font-size: 11px; font-weight: 600; fill: var(--ink); }
.chart .anno { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-3); }
.chart .annoline { stroke: var(--rule); stroke-width: 1; }
.chart .xhair { stroke: var(--ink-3); stroke-width: 1; opacity: 0; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; opacity: 0;
  background: var(--ink); color: #fff; border-radius: 4px;
  padding: 0.55rem 0.75rem; font-family: var(--mono); font-size: 0.72rem; line-height: 1.5;
  min-width: 11rem; transition: opacity 0.12s;
}
.chart-tip .tip-x { color: #A9B6C0; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.65rem; margin-bottom: 0.25rem; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 0.5rem; }
.chart-tip .tip-key { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.chart-tip .tip-v { font-weight: 600; margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-tip .tip-name { color: #A9B6C0; }

/* data table twin */
details.data-table { margin-top: 1.2rem; }
details.data-table summary { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
details.data-table .dt-scroll { overflow-x: auto; }
details.data-table table { width: 100%; border-collapse: collapse; margin-top: 0.8rem; font-size: 0.9rem; }
details.data-table th, details.data-table td { text-align: left; padding: 0.42rem 0.8rem 0.42rem 0; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
details.data-table th { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
details.data-table td.num, details.data-table th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- the model (load test) ---------- */
.model { background: var(--ink); color: #E8EDF1; border-radius: 6px; padding: clamp(1.5rem, 3.5vw, 2.6rem); margin: 2.2rem 0; }
.model .ex-tag { background: var(--accent); color: #fff; }
.model h3 { font-family: var(--display); font-stretch: 125%; font-weight: 650; font-size: clamp(1.4rem, 3vw, 2rem); text-transform: uppercase; margin: 0.8rem 0 0.5rem; color: #fff; }
.model .model-intro { color: #ADBBC6; max-width: 60ch; margin-bottom: 1.8rem; }
.model-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: clamp(1.6rem, 3.5vw, 2.6rem); }
@media (max-width: 56rem) { .model-grid { grid-template-columns: 1fr; } }
.model .ctl { margin-bottom: 1.5rem; }
.model .ctl:last-child { margin-bottom: 0; }
.model .ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.4rem; }
.model .ctl-name { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #ADBBC6; }
.model .ctl-name b { color: #fff; font-weight: 600; }
.model .ctl-val { font-family: var(--mono); font-weight: 600; font-size: 1rem; color: #fff; }
.model .ctl-sub { font-family: var(--mono); font-size: 0.66rem; color: #7E8FA0; margin-top: 0.3rem; }
.model input[type="range"] { width: 100%; accent-color: var(--ctl-c, var(--accent)); height: 1.4rem; cursor: pointer; }
.model input[type="range"]:disabled { opacity: 0.55; cursor: default; }
.calc .hint#c-priv-note { margin-top: 0.9rem; color: var(--s-income); }
.model .ctl-toggle { display: flex; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.75rem; color: #ADBBC6; cursor: pointer; }
.model .ctl-toggle input { accent-color: var(--accent); width: 1rem; height: 1rem; cursor: pointer; }
.model-out .beam-wrap svg { display: block; width: 100%; height: auto; }
.model-readout { margin-top: 1.2rem; }
.model-readout .row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid #2A3947; }
.model-readout .row .k { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: #ADBBC6; display: inline-flex; align-items: center; gap: 0.5rem; }
.model-readout .row .k .dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.model-readout .row .v { font-family: var(--mono); font-weight: 600; font-size: 1rem; color: #fff; white-space: nowrap; }
.model-readout .row.total .k, .model-readout .row.total .v { color: #fff; font-size: 1.15rem; }
.model-verdict { margin-top: 1.2rem; font-size: 1rem; line-height: 1.55; color: #DCE4EA; }
.model-verdict strong { color: #7FD4A6; }
.model-verdict.short strong { color: #F2A08B; }
.model .model-fine { font-size: 0.78rem; color: #7E8FA0; margin-top: 1.7rem; line-height: 1.55; }
.model .share-row { margin-top: 1.3rem; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.model .share-btn {
  font-family: var(--mono); font-size: 0.8rem; cursor: pointer;
  padding: 0.55rem 1rem; border-radius: 3px;
  background: transparent; color: #ADBBC6; border: 1px solid #44586C;
  transition: color 0.15s, border-color 0.15s;
}
.model .share-btn:hover { color: #fff; border-color: #7FA8D6; }
.model .share-done { font-family: var(--mono); font-size: 0.7rem; color: #7FD4A6; word-break: break-all; }
.model .model-fine a { color: #9CC3EC; }

/* ---------- calculator personas ---------- */
.personas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1.6rem; }
.personas .p-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-right: 0.3rem; }
.persona {
  font-family: var(--mono); font-size: 0.8rem; cursor: pointer;
  padding: 0.5rem 0.9rem; border-radius: 3px;
  border: 1px solid var(--rule); background: var(--concrete); color: var(--ink-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.persona:hover { border-color: var(--accent); color: var(--accent-deep); }
.persona[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.personas .p-city { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 0.45rem; }
.personas select {
  font-family: var(--mono); font-size: 0.85rem; padding: 0.45rem 0.6rem;
  background: var(--concrete); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; cursor: pointer;
}

/* ---------- calculator (household) ---------- */
.calc { background: var(--card); border: 1px solid var(--hairline); border-left: 4px solid var(--accent); border-radius: 4px; padding: clamp(1.5rem, 3.5vw, 2.4rem); margin: 2.2rem 0; }
.calc h3 { margin-top: 0.6rem; }
.calc .calc-intro { color: var(--ink-2); max-width: 58ch; margin-bottom: 1.4rem; }
.calc-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 2.2rem; }
@media (max-width: 52rem) { .calc-grid { grid-template-columns: 1fr; } }
.calc label { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin: 1.1rem 0 0.35rem; }
.calc label:first-child { margin-top: 0; }
.calc input, .calc .calc-grid select {
  width: 100%; padding: 0.62rem 0.8rem; font-family: var(--mono); font-size: 1rem;
  background: var(--concrete); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px;
}
.calc .calc-grid select { cursor: pointer; }
.hh-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.9rem; }
.hh-grid label { margin-top: 0; }
@media (max-width: 30rem) { .hh-grid { grid-template-columns: 1fr; } }
.calc input::placeholder { color: var(--ink-3); }
.calc .hint { font-size: 0.84rem; color: var(--ink-3); margin-top: 0.3rem; line-height: 1.45; }
.calc-out { border-left: 1px solid var(--hairline); padding-left: 2.2rem; }
@media (max-width: 52rem) { .calc-out { border-left: none; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 1.5rem; } }
.calc-out .row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--hairline); }
.calc-out .row .k { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-2); }
.calc-out .row .v { font-family: var(--mono); font-weight: 600; font-size: 1.1rem; color: var(--ink); white-space: nowrap; }
.calc-out .row.total .v { font-size: 1.4rem; }
.calc-out .verdict { margin-top: 1.2rem; font-size: 1.02rem; line-height: 1.5; color: var(--ink); }
.calc-out .verdict strong { color: var(--good); }
.calc-out .verdict.worse strong { color: var(--s-income); }
.calc .calc-fine { font-size: 0.78rem; color: var(--ink-3); margin-top: 1.5rem; line-height: 1.55; }

/* ---------- incentive cards ---------- */
.incentives { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.inc-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 4px; padding: 1.4rem 1.5rem; }
.inc-card .i-if { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.5rem; }
.inc-card .i-then { font-weight: 700; font-size: 1.05rem; line-height: 1.4; margin-bottom: 0.55rem; }
.inc-card .i-then b { color: var(--pillar, var(--accent-deep)); }
.inc-card .i-note { font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- objections ---------- */
.objection { border: 1px solid var(--hairline); border-radius: 4px; margin-bottom: 0.9rem; background: var(--card); }
.objection summary {
  cursor: pointer; padding: 1rem 1.3rem; font-weight: 700; font-size: 1.02rem;
  list-style: none; position: relative; padding-right: 3rem;
}
.objection summary::-webkit-details-marker { display: none; }
.objection summary::after {
  content: "+"; font-family: var(--mono); position: absolute; right: 1.2rem; top: 50%;
  transform: translateY(-50%); color: var(--accent); font-size: 1.25rem; font-weight: 400;
}
.objection[open] summary::after { content: "–"; }
.objection .a { padding: 0 1.3rem 1.2rem; max-width: 64ch; }
.objection .a p { margin-bottom: 0.9rem; }
.objection .a p:last-child { margin-bottom: 0; }

/* ---------- doc cards ---------- */
.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.2rem; margin-top: 1.8rem; }
.doc-card {
  display: block; border: 1px solid var(--hairline); border-radius: 4px;
  background: var(--card); padding: 1.5rem; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.doc-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.doc-card .doc-kind { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 0.7rem; }
.doc-card .doc-title { font-weight: 700; font-size: 1.15rem; line-height: 1.3; margin-bottom: 0.55rem; }
.doc-card .doc-desc { font-size: 0.93rem; color: var(--ink-2); line-height: 1.5; }
.doc-card .doc-meta { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); margin-top: 0.9rem; }

/* ---------- page headers for subpages ---------- */
.page-head { padding: clamp(3.2rem, 7vw, 5.5rem) var(--gutter) clamp(2rem, 5vw, 3.2rem); border-bottom: 1px solid var(--hairline); }
.page-head .ph-inner { max-width: var(--maxw); margin: 0 auto; }
.page-head .drawing-ref { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.3rem; display: flex; align-items: center; gap: 0.8rem; }
.page-head .drawing-ref::before { content: ""; width: 2.2rem; height: 1px; background: var(--s-income); }
.page-head h1 {
  font-family: var(--display); font-weight: 700; font-stretch: 125%;
  font-size: clamp(1.9rem, 4.8vw, 3.4rem); line-height: 1.05; text-transform: uppercase;
  letter-spacing: -0.005em; max-width: 26ch; text-wrap: balance;
}
.page-head .lede { margin-top: 1.2rem; font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; text-wrap: pretty; }

/* ---------- footer: the title block ---------- */
.title-block { margin: 4rem var(--gutter) 2.5rem; border: 2px solid var(--ink); border-radius: 2px; max-width: var(--maxw); background: var(--card); }
@media (min-width: 80rem) { .title-block { margin-left: auto; margin-right: auto; } }
.title-block .tb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: 0.9rem 1.3rem; border-bottom: 1px solid var(--ink); }
.title-block .tb-title { font-family: var(--display); font-stretch: 125%; font-weight: 650; font-size: 1.05rem; text-transform: uppercase; }
.title-block .tb-no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent-deep); }
.title-block .tb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.title-block .tb-cell { padding: 0.8rem 1.3rem; border-right: 1px solid var(--hairline); border-top: 1px solid var(--hairline); }
.title-block .tb-k { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 0.2rem; }
.title-block .tb-v { font-family: var(--mono); font-size: 0.82rem; color: var(--ink); }
.title-block .tb-foot {
  padding: 0.8rem 1.3rem; border-top: 1px solid var(--ink);
  font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); line-height: 1.6;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; flex-wrap: wrap;
}
.title-block .telemetry {
  display: inline-flex; align-items: center; gap: 0.55rem; flex: none;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none;
}
.title-block .telemetry img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--recessed); border: 1px solid var(--rule);
}
.title-block .telemetry:hover { color: var(--accent-deep); }
.title-block .telemetry:hover span { text-decoration: underline; text-underline-offset: 2px; }
.title-block .telemetry:hover img { border-color: var(--accent); }

/* reveal on scroll */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; } }
