
/* Layout: a wire-service front page. A mono ticker on top, a lead dispatch beside a timestamped "On the wire" feed, then explainers and tools. Views swap on the URL hash. */
:root {
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --ink: #14161B;
  --muted: #5A5F6C;
  --line: #DCDFE5;
  --accent: #F7931A;
  --accent-ink: #A85A00;
  --accent-soft: #FDEBD3;
  --art: #E8EAEE;
  --down: #B8402B;
  --up: #1E7F55;
  --ticker-bg: #14161B;
  --ticker-ink: #E9EBEF;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.25rem, 5.2vw, 3.6rem);
  --radius: 10px;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1115; --surface: #171A20; --ink: #ECEEF2; --muted: #9CA2AF; --line: #2A2F38;
    --accent: #F7931A; --accent-ink: #FFAE4D; --accent-soft: #33240F; --art: #2E333C; --down: #F0735C; --up: #4CC38A;
    --ticker-bg: #07080A; --ticker-ink: #DADDE3; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1115; --surface: #171A20; --ink: #ECEEF2; --muted: #9CA2AF; --line: #2A2F38;
  --accent: #F7931A; --accent-ink: #FFAE4D; --accent-soft: #33240F; --art: #2E333C; --down: #F0735C; --up: #4CC38A;
  --ticker-bg: #07080A; --ticker-ink: #DADDE3; color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: var(--step-0); line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ticker-bg); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--mono); }
.kicker { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.meta { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); letter-spacing: 0.02em; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

/* Ticker */
.ticker { background: var(--ticker-bg); color: var(--ticker-ink); font-family: var(--mono); font-size: 0.75rem; }
.ticker .wrap { display: flex; gap: 22px; align-items: center; overflow-x: auto; white-space: nowrap; padding-block: 8px; scrollbar-width: none; }
.ticker .wrap::-webkit-scrollbar { display: none; }
.ticker b { color: var(--accent); font-weight: 600; }
.tick-down { color: #F0735C; }
.ticker .asof { color: #8D93A0; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { display: block; height: 34px; width: auto; }
.brand .word { height: 22px; }
nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
nav a { display: block; padding: 7px 12px; border-radius: 999px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--muted); }
nav a:hover { color: var(--ink); background: var(--bg); }
nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.cta-sub { background: var(--accent); color: #1A1206 !important; }
.cta-sub:hover { background: #FFA63D !important; }

main { padding-block: 32px 64px; }
.view { display: grid; gap: 48px; }
.view > * { min-width: 0; }

/* Front page */
.front { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.lead { display: grid; gap: 16px; }
.lead .graphic { aspect-ratio: 16 / 8; max-width: 100%; border-radius: var(--radius); background: var(--ticker-bg); overflow: hidden; }
.lead .graphic svg { width: 100%; height: 100%; display: block; }
.lead .dek { font-size: var(--step-1); color: var(--muted); max-width: 62ch; }
.read-link { font-family: var(--display); font-weight: 700; text-decoration: none; color: var(--accent-ink); }
.read-link:hover { text-decoration: underline; }
.wire { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 8px; }
.wire-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wire-head h2 { font-size: var(--step-1); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 6px; }
.wire ol { list-style: none; margin: 0; padding: 0; }
.wire li { display: grid; gap: 4px; padding-block: 14px; border-top: 1px solid var(--line); }
.wire li:first-child { border-top: 0; }
.wire li p { font-size: 0.98rem; line-height: 1.45; }
.wire li a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.wire li a:hover { text-decoration-color: var(--accent); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: var(--step-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { display: grid; gap: 10px; align-content: start; text-decoration: none; color: inherit; }
.card h3 { font-size: 1.3rem; }
.card:hover h3 { color: var(--accent-ink); }
.card p { color: var(--muted); font-size: 0.98rem; }
.explainer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.explainer .num { font-family: var(--mono); font-size: 1.6rem; color: var(--accent-ink); font-weight: 600; line-height: 1; }

.band { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.band.dark { background: var(--ticker-bg); color: var(--ticker-ink); border-color: transparent; }
.band.dark p { color: #B4BAC6; }
.band.dark .kicker { color: var(--accent); }

/* Forms and tools */
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.band.dark .field label { color: #9CA2AF; }
input[type="number"], input[type="email"], input[type="text"] { font: 600 1.05rem var(--mono); padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; min-width: 0; }
.band.dark input { background: #1D2128; border-color: #333944; color: #ECEEF2; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; min-width: 0; }
button { font: 700 1rem var(--display); padding: 11px 18px; border-radius: 8px; border: 0; background: var(--accent); color: #1A1206; cursor: pointer; }
button:hover { background: #FFA63D; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.out { font-family: var(--mono); font-size: 1.7rem; font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.band.dark .out { color: var(--accent); }
.note { font-size: 0.9rem; color: var(--muted); }
.form-msg { font-family: var(--mono); font-size: 0.9rem; color: var(--accent); min-height: 1.4em; }

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 16px; align-content: start; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.progress { height: 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }

/* Article */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.article header { display: grid; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article .dek { font-size: var(--step-1); color: var(--muted); }
.prose { display: grid; gap: 18px; max-width: 66ch; font-size: 1.12rem; line-height: 1.7; }
.prose h3 { font-size: 1.35rem; margin-top: 10px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.matters { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; }
.matters .kicker { color: var(--accent-ink); }
.sources { display: grid; gap: 6px; font-size: 0.95rem; }
.sources ul { margin: 0; padding-left: 1.2em; }
.aside { position: sticky; top: 96px; display: grid; gap: 20px; }
.aside .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.aside .box a { font-family: var(--display); font-weight: 700; text-decoration: none; line-height: 1.3; }
.aside .box a:hover { color: var(--accent-ink); }
.figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; }
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption { font-size: 0.85rem; color: var(--muted); }
.chart-scroll { overflow-x: auto; }
.back { font-family: var(--mono); font-size: var(--step--1); text-decoration: none; color: var(--muted); }
.back:hover { color: var(--accent-ink); }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--surface); }
footer .wrap { padding-block: 32px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
footer h4 { font-family: var(--mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent-ink); }
.fine { font-size: 0.85rem; color: var(--muted); }

/* Shop */
.shop-intro { display: grid; gap: 12px; max-width: 70ch; }
.promises { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--mono); font-size: var(--step--1); color: var(--muted); }
.promises span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--accent); vertical-align: 1px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.product .art { aspect-ratio: 1 / 1; max-width: 100%; background: var(--art); border-bottom: 1px solid var(--line); }
.product .art svg { width: 100%; height: 100%; display: block; }
.product .info { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: start; }
.product .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product h3 { font-size: 1.2rem; }
.product .price { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product p { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.buy { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.buy .field { flex: 1 1 90px; min-width: 0; }
select { font: 600 0.95rem var(--mono); padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.buy button { flex: 1 1 140px; }
.added { font-family: var(--mono); font-size: 0.85rem; color: var(--accent-ink); min-height: 1.3em; }
.gear-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gear { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.gear .tag { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; justify-self: start; }
.gear a.go { font-family: var(--display); font-weight: 700; color: var(--accent-ink); text-decoration: none; }
.gear a.go:hover { text-decoration: underline; }
.cart-btn { font: 700 0.95rem var(--display); padding: 7px 12px; border-radius: 999px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.cart-btn:hover { background: var(--bg); }
.cart-btn .count { display: inline-block; min-width: 1.5em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #1A1206; font-family: var(--mono); font-size: 0.8rem; text-align: center; }
.scrim { position: fixed; inset: 0; background: rgba(5, 6, 8, 0.45); z-index: 19; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 20; background: var(--surface); border-left: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.drawer header, .drawer .foot { padding: 18px 20px; display: grid; gap: 12px; }
.drawer header { grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line); }
.drawer .items { overflow-y: auto; padding: 8px 20px; display: grid; align-content: start; }
.drawer .foot { border-top: 1px solid var(--line); }
.line-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.line-item .name { font-family: var(--display); font-weight: 700; }
.line-item .opt { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { padding: 2px 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-family: var(--mono); }
.link-btn { background: none; color: var(--muted); padding: 0; font: 400 0.85rem var(--mono); text-decoration: underline; }
.link-btn:hover { background: none; color: var(--ink); }
.subtotal { display: flex; justify-content: space-between; font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding-block: 24px; }

@media (max-width: 900px) {
  .front, .article, .band, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gear-grid { grid-template-columns: minmax(0, 1fr); }
  footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .brand .word { height: 18px; }
  .brand svg { height: 30px; }
  nav a { padding: 6px 10px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
}

/* Base reset */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.tick-up { color: #4CC38A; }

/* Multi-page additions */
.lead-bar { display: flex; align-items: center; gap: 14px; background: var(--ticker-bg); color: var(--ticker-ink); border-radius: var(--radius); padding: 14px 18px; font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; }
.lead-bar svg { width: 92px; height: 20px; flex: none; }
.lead h1 a { text-decoration: none; }
.lead h1 a:hover { color: var(--accent-ink); }
.news-list { display: grid; gap: 0; }
.news-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding-block: 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.news-row:first-child { border-top: 0; }
.news-row h3 { font-size: 1.25rem; }
.news-row:hover h3 { color: var(--accent-ink); }
.news-row p { color: var(--muted); font-size: 0.98rem; }
.news-row .when { display: grid; gap: 4px; align-content: start; }
.page-head { display: grid; gap: 12px; max-width: 70ch; }
.page-head .dek { font-size: var(--step-1); color: var(--muted); }
.crumbs { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.nl-embed { width: 100%; min-height: 160px; border: 0; border-radius: 8px; background: transparent; }
@media (max-width: 520px) { .news-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
/* Live on Bitcoin (/spend/) */
.lob { --r-d: #1E8558; --r-l: #D98300; --r-g: #2D6AD1; --r-c: #7649C6; --good: #1E8558; --bad: #B8402B; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; }
.lob > *, .lob-sec > *, .steps-grid > *, .tax-grid > * { min-width: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lob { --r-d: #3EBF86; --r-l: #F7931A; --r-g: #6F9EF0; --r-c: #A98AE8; --good: #4CC38A; --bad: #F0735C; } }
:root[data-theme="dark"] .lob { --r-d: #3EBF86; --r-l: #F7931A; --r-g: #6F9EF0; --r-c: #A98AE8; --good: #4CC38A; --bad: #F0735C; }
.lob h2 { font-size: var(--step-3); }
.lob h3 { font-size: var(--step-1); }
.lob p { margin: 0; }
.lob-lede { color: var(--muted); max-width: 62ch; }
.lob-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; padding-bottom: 56px; }
.lob-hero-copy { display: grid; gap: 18px; min-width: 0; }
.lob-hero h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; line-height: 0.98; }
.lob-hero h1 em { font-style: normal; color: var(--accent); }
.lob-hero .lob-lede { font-size: var(--step-1); }
.lob-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.lob-jump a { font-family: var(--mono); font-size: var(--step--1); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
.lob-jump a:hover { border-color: var(--accent); }
.lob-tag { box-shadow: 8px 8px 0 var(--accent); border-color: var(--ink); }
.lob-big { font-size: clamp(2rem, 5vw, 2.9rem); }
.lob-sec { padding-block: 56px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.lob-head { display: grid; gap: 12px; margin-bottom: 28px; min-width: 0; }
.routes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.route { padding: 22px 20px; display: grid; gap: 10px; align-content: start; border-right: 1px solid var(--line); min-width: 0; }
.route:last-child { border-right: 0; }
.route p { font-size: 0.95rem; color: var(--muted); }
.route .catch { font-size: 0.9rem; color: var(--ink); border-top: 1px dashed var(--line); padding-top: 10px; }
.rline { height: 6px; border-radius: 3px; margin-bottom: 4px; }
.rline.D { background: var(--r-d); } .rline.L { background: var(--r-l); } .rline.G { background: var(--r-g); } .rline.C { background: var(--r-c); }
.route-title { display: flex; align-items: center; gap: 10px; }
.rb { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 800 0.85rem var(--display); flex: none; }
.b-D { background: var(--r-d); } .b-L { background: var(--r-l); color: #1A1206; } .b-G { background: var(--r-g); } .b-C { background: var(--r-c); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { font: 600 0.9rem var(--display); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.chip:hover { background: var(--surface); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-width: 0; }
.entry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rbs { display: flex; gap: 4px; }
.rbs .rb { width: 24px; height: 24px; font-size: 0.72rem; }
.entry-body { display: grid; gap: 10px; align-content: start; }
.entry-body p { font-size: 0.95rem; color: var(--muted); }
.entry-body .enote { font-size: 0.86rem; background: var(--accent-soft); color: var(--ink); border-radius: 8px; padding: 8px 10px; }
.steps-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding-bottom: 24px; position: relative; }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--r-g); color: var(--r-g); display: grid; place-items: center; font: 800 1rem var(--display); background: var(--bg); position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 44px; bottom: 0; width: 4px; background: var(--r-g); opacity: 0.35; }
.steps li div { padding-top: 8px; display: grid; gap: 4px; }
.steps li p { color: var(--muted); font-size: 0.97rem; }
.tax-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.tax-copy { display: grid; gap: 16px; }
.tax-copy p { max-width: 60ch; }
.formula { font-family: var(--mono); font-size: 0.9rem; background: var(--surface); border-left: 4px solid var(--accent); padding: 14px 16px; border-radius: 0 8px 8px 0; overflow-x: auto; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.lob .result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.lob .result div { display: grid; gap: 2px; min-width: 0; }
.lob .result .k { font: 400 var(--step--1) var(--mono); color: var(--muted); }
.lob .result .v { font: 600 1.15rem var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lob .gain { color: var(--good); } .lob .loss { color: var(--bad); }
.term { display: inline-block; justify-self: start; font: 400 0.72rem var(--mono); padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor; margin-top: 4px; }
.log-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.log-btns { display: flex; gap: 8px; flex-wrap: wrap; }
button.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 8px 14px; font-size: 0.9rem; }
button.ghost:hover { background: var(--surface); border-color: var(--accent); }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.lob table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.92rem; }
.lob th, .lob td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.lob th { font: 400 0.72rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lob td.n, .lob th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lob tfoot td { font-weight: 600; border-bottom: 0; }
.lob .empty-row { color: var(--muted); text-align: center; padding: 28px; }
.pill { font: 400 0.68rem var(--mono); padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); margin-left: 6px; }
button.x { background: none; color: var(--muted); padding: 2px 6px; font-size: 1.1rem; }
button.x:hover { background: none; color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#csvOut { width: 100%; margin-top: 10px; font: 400 0.8rem var(--mono); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; list-style: none; padding: 0; margin: 0; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }
.checks li::before { content: ""; width: 18px; height: 18px; border: 2px solid var(--accent); border-radius: 4px; margin-top: 4px; }
.checks strong { display: block; font-family: var(--display); }
.checks span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 900px) {
  .lob-hero, .steps-grid, .tax-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route:nth-child(2) { border-right: 0; }
  .route:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .routes { grid-template-columns: minmax(0, 1fr); }
  .route { border-right: 0; border-bottom: 1px solid var(--line); }
  .route:last-child { border-bottom: 0; }
  .checks, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .lob .result { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lob-sec { padding-block: 44px; }
  .lob-tag { box-shadow: 5px 5px 0 var(--accent); }
}
