/* Accessible, zero-dependency Financial Ledger / Technical Spec stylesheet for WhatItCosts.fyi */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-subtle: #efeae2;
  --border: #ded8ce;
  --border-strong: #bfb7aa;
  --ink-header: #18181b;
  --ink-header-text: #ffffff;
  --ink-header-muted: #d4d4d8;
  --ink-header-focus: #fb923c;
  --text: #18181b;
  --muted: #52525b;
  --accent: #9a3412;
  --accent-hover: #7c2d12;
  --accent-vivid: #c2410c;
  --accent-soft: #fdf2e9;
  --accent-border: #e6b89c;
  --ok-bg: #eef5ec;
  --ok-text: #1f4d28;
  --ok-border: #a7cba3;
  --warn-bg: #fdf6e7;
  --warn-text: #854d0e;
  --warn-border: #e5c67a;
  --shadow-sm: 0 1px 0 rgba(24, 24, 27, 0.06);
  --shadow-md: 0 2px 0 rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 4px 0 rgba(24, 24, 27, 0.08);
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a,
button,
input {
  touch-action: manipulation;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(154, 52, 18, 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.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: -9999px;
  top: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  color: #ffffff;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-right)) 0 max(1.25rem, env(safe-area-inset-left));
}

/* Dark Ink Masthead Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink-header);
  border-bottom: 3px solid var(--accent-vivid);
  padding: 0.85rem 0;
}

.site-header a:focus-visible {
  outline: 2px solid var(--ink-header-focus);
  outline-offset: 2px;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--ink-header-text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-main {
  color: var(--ink-header-text);
}

.brand-tld {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #ffffff;
  background: var(--accent-vivid);
  padding: 0.12rem 0.42rem;
  border-radius: 2px;
  line-height: 1.2;
}

.site-brand:hover .brand-main {
  color: #f4f4f5;
}

.site-brand:hover .brand-tld {
  background: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-header-muted);
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink-header-text);
  background: rgba(255, 255, 255, 0.08);
}

.site-nav a[aria-current="page"] {
  color: var(--ink-header-text);
  background: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--ink-header-focus);
  font-weight: 600;
}

.tool-subnav {
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  padding: 0.55rem 0;
  font-size: 0.86rem;
}

.tool-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.tool-subnav-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text);
  margin-right: 0.35rem;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border-strong);
}

.tool-subnav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tool-subnav a:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.tool-subnav a[aria-current="page"] {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 700;
}

/* Main Content */
main {
  flex: 1 0 auto;
  padding: 2.25rem 0 3.75rem;
}

.breadcrumbs {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.breadcrumbs li {
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: var(--sans);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 2.35rem;
  margin-bottom: 0.85rem;
}

h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  font-weight: 800;
  margin-top: 0;
}

h2 {
  font-size: clamp(1.22rem, 2.1vw, 1.48rem);
  font-weight: 750;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--text);
}

h3 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1.05rem;
  max-width: 72ch;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.6;
}

ul, ol {
  padding-left: 1.35rem;
  margin: 0 0 1.25rem;
  max-width: 72ch;
}

li {
  margin-bottom: 0.45rem;
}

code, pre {
  font-family: var(--mono);
  font-size: 0.88rem;
}

code {
  background: var(--surface-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--text);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--text);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.85rem 0 1.1rem;
  line-height: 1.55;
}

/* Meta / Verification Stamp */
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.15rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.16rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: var(--warn-border);
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
  border-color: var(--ok-border);
}

/* Editorial Ledger Hero (Hub & Overview pages) */
.hero-box {
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--text);
  border-radius: 0;
  padding: 0.35rem 0 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: none;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.hero-box h1 {
  margin-bottom: 0.7rem;
}

.hero-box p {
  font-size: 1.08rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.hero-box .meta-bar {
  margin-bottom: 0;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-strong);
}

/* Callout / Summary Box */
.spec-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.4rem;
  margin: 1.35rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.spec-box p:last-child,
.spec-box ul:last-child {
  margin-bottom: 0;
}

/* UK ASA/CMA Upfront Disclosure Banner */
.ad-disclosure {
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--text);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  margin: 1.15rem 0;
  border-radius: var(--radius-sm);
}

/* Cards & Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.15rem;
  margin: 1.35rem 0 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  border-top-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
}

.card h3 a {
  text-decoration: none;
  color: var(--text);
}

.card h3 a:hover {
  color: var(--accent);
}

.card p {
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex: 1 0 auto;
}

.card > a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

.card > a:hover {
  text-decoration: underline;
}

.tool-card-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  padding: 0.16rem 0.5rem;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.tool-card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-size: 0.86rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.tool-card-links a {
  text-decoration: none;
  font-weight: 600;
}

.tool-card-links a:hover {
  text-decoration: underline;
}

/* Calculator Widget */
.calc-widget {
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--text);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.75rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-lg);
}

.calc-widget h2 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.45rem;
}

.calc-intro {
  color: var(--muted);
  margin-bottom: 1rem;
}

.calc-guide {
  list-style: none;
  padding: 0.8rem 1rem;
  margin: 0 0 1.1rem;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--muted);
}

.calc-guide li {
  margin: 0;
}

.calc-guide strong {
  color: var(--text);
}

.calc-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.presets-label {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 0.2rem;
}

.preset-btn {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.preset-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  margin: 1.1rem 0 1.25rem;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.field-hint {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.calc-range {
  width: 100%;
  margin-top: 0.55rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.stat-sub {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.22rem;
}

/* Visual Cost Bar Chart */
.cost-chart-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin: 1.15rem 0 1.35rem;
}

.cost-chart-title {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.cost-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cost-bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 200px) 1fr auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.86rem;
}

.cost-bar-label {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-bar-track {
  height: 10px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.cost-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.cost-bar-winner .cost-bar-label,
.cost-bar-winner .cost-bar-val {
  color: var(--ok-text);
  font-weight: 700;
}

.cost-bar-winner .cost-bar-fill {
  background: var(--ok-text);
}

.cost-bar-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 78px;
  text-align: right;
}

/* Overview CTA Bar */
.overview-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

/* Company About Blurb Card */
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0 2rem;
  box-shadow: var(--shadow-sm);
}

.about-card h2 {
  margin-top: 0;
  font-size: 1.16rem;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.55rem;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--border);
}

.about-facts dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.about-facts dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.about-reviews {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.about-reviews-label {
  font-weight: 600;
  color: var(--muted);
}

/* Footer Meta Row */
.footer-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-strong);
}

.footer-meta-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-meta-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.calc-field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.calc-field input[type="number"] {
  width: 100%;
  padding: 0.68rem 0.85rem;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.calc-field input[type="number"]:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154, 52, 18, 0.18);
}

/* Calculator Toggles & Dynamic Winner Card */
.calc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin-bottom: 1.35rem;
  font-size: 0.9rem;
}

.billing-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.billing-btn {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.billing-btn:hover {
  color: var(--text);
}

.billing-btn[aria-pressed="true"] {
  background: var(--text);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.toggle-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
}

.toggle-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
}

.toggle-switch input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.toggle-switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.35rem - 6px);
  height: calc(1.35rem - 6px);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease;
}

.toggle-switch input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input[type="checkbox"]:checked::after {
  transform: translateX(1rem);
}

.toggle-switch input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.opt-blend-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.15rem;
  flex-basis: 100%;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border-strong);
}

.opt-share-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.84rem;
  color: var(--muted);
}

.opt-share-wrap[hidden] {
  display: none;
}

.opt-share-wrap label {
  font-weight: 600;
  color: var(--text);
}

.opt-share-range {
  width: 120px;
  accent-color: var(--accent);
  cursor: pointer;
}

.opt-share-val {
  font-family: var(--mono);
  min-width: 3ch;
  text-align: right;
  font-weight: 700;
  color: var(--accent);
}

/* Joined Financial Ledger Stat Strip */
.calc-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.stat-box {
  background: var(--bg);
  border: 0;
  border-radius: 0;
  padding: 0.95rem 1.05rem;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 0.28rem;
}

/* Lowest Cost Callout Card */
.winner-card {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  border-left: 4px solid var(--ok-text);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.35rem;
}

.winner-info {
  flex: 1 1 280px;
}

.winner-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ok-text);
  background: var(--surface);
  border: 1px solid var(--ok-border);
  padding: 0.14rem 0.5rem;
  border-radius: 2px;
  font-weight: 700;
}

.winner-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text);
  margin: 0.45rem 0 0.25rem;
  letter-spacing: -0.02em;
}

.winner-detail {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.winner-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.offer-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  background: var(--surface);
  color: var(--ok-text);
  border: 1px solid var(--ok-border);
}

.calc-verdict {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.25rem;
  font-size: 0.94rem;
  color: var(--text);
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.35rem 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.8rem 1rem 0.5rem;
  background: var(--surface);
}

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-subtle);
  border-bottom: 2px solid var(--text);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr:nth-child(even) {
  background: #faf8f4;
}

tbody tr:hover {
  background: var(--surface-subtle);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.row-highlight,
.row-highlight:nth-child(even),
.row-highlight:hover {
  background: var(--ok-bg);
}

.row-highlight td:first-child {
  font-weight: 700;
  color: var(--ok-text);
}

.table-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.table-link:hover {
  text-decoration: underline;
}

.tax-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
  color: var(--text);
  border-color: var(--text);
}

.copy-status {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ok-text);
}

/* Two-Column Decision Lists */
.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.15rem;
  margin: 1.5rem 0;
}

.panel {
  border: 1px solid var(--border);
  border-top: 3px solid var(--text);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.panel ul:last-child {
  margin-bottom: 0;
}

/* Prompt Cards on Blueprint */
.prompt-block {
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin: 1.35rem 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
}

.prompt-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.prompt-header h3 {
  margin: 0;
}

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin-bottom: 0.9rem;
}

.faq-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 3px solid var(--text);
  background: var(--surface-subtle);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.disclosure {
  margin: 0 0 0.5rem;
  line-height: 1.55;
  max-width: 85ch;
}

.disclosure:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (pointer: coarse) {
  .site-nav a,
  .tool-subnav a,
  .billing-btn,
  .preset-btn,
  .btn,
  .table-link,
  .footer-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .calc-widget {
    padding: 1.25rem;
  }

  .cost-bar-row {
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.65rem;
  }

  .cost-bar-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .winner-cta-wrap {
    align-items: flex-start;
  }

  .tool-subnav-label {
    border-right: 0;
    padding-right: 0;
    width: 100%;
  }
}

/* Print Stylesheet for Local PDF Export (especially blueprint.html) */
@media print {
  .site-header,
  .tool-subnav,
  .no-print,
  .copy-prompt-btn,
  .calc-actions {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000000;
    background: #ffffff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  main {
    padding: 0;
  }

  .card,
  .calc-widget,
  .spec-box,
  .panel,
  .prompt-block,
  .faq-item,
  .table-wrap {
    box-shadow: none;
    border-color: #999999;
  }

  pre {
    background: #ffffff;
    border: 1px solid #999999;
    font-size: 9.5pt;
    page-break-inside: avoid;
  }

  .prompt-block,
  .spec-box,
  table {
    page-break-inside: avoid;
  }

  .site-footer {
    background: #ffffff;
    border-top: 1px solid #999999;
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    font-size: 9pt;
  }
}
