/* MapleBooks — warm editorial Canadian */
:root {
  --bg: #fbfaf6;
  --bg-2: #f3f0e8;
  --bg-3: #ebe7dc;
  --ink: #1a1814;
  --ink-2: #4a4640;
  --ink-3: #8a847a;
  --ink-4: #b8b1a4;
  --line: #e4dfd2;
  --line-2: #d8d2c2;
  --accent: #9a2f22;        /* deep maple red */
  --accent-soft: #e9c8c0;
  --accent-tint: #f6e8e3;
  --brand: #9a2f22;
  --danger: #b13a2a;
  --expense: #c1573f;
  --data: #2f4ba8;          /* indigo for data viz */
  --data-soft: #c9d1ec;
  --good: #2f7a52;
  --warn: #b8761c;
  --bad: var(--expense);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  --font-display: "Fraunces", "GT Sectra", Georgia, serif;
  --font-sans: "Inter Tight", "Söhne", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

/* Theme variants — applied via [data-theme] on root */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f6f5f2;
  --bg-3: #ecebe7;
  --line: #e8e6e0;
  --line-2: #d9d6cd;
}
[data-theme="dark"] {
  --bg: #14130f;
  --bg-2: #1d1c17;
  --bg-3: #28261f;
  --ink: #f0ece2;
  --ink-2: #c9c3b4;
  --ink-3: #8a847a;
  --ink-4: #5a554c;
  --line: #2a2820;
  --line-2: #38352c;
  --accent-soft: #4a2820;
  --accent-tint: #2a1c18;
  --data-soft: #20284e;
}

* { box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-ink :focus-visible,
.threshold-card :focus-visible { outline-color: var(--bg); }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 18px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
}
.brand em {
  color: var(--accent);
  font-style: italic;
}
.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: 14px 10px 6px;
  font-weight: 500;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 450;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover { background: var(--bg-3); color: var(--ink); }
.nav-item.active {
  background: var(--ink);
  color: var(--bg);
}
.nav-item.active .nav-icon { color: var(--bg); }
.nav-icon {
  width: 16px; height: 16px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  background: var(--accent);
  color: white;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 500;
}
.nav-item.active .badge { background: var(--bg); color: var(--ink); }

.user-card {
  margin-top: auto;
  padding: 12px 10px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--line);
  margin-left: -16px; margin-right: -16px;
  padding-left: 22px; padding-right: 16px;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent) 50%, #6b2418);
  color: white;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 500;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-meta { font-size: 11px; color: var(--ink-3); }

.legal-links {
  display: flex; align-items: center; gap: 6px;
  justify-content: center;
  padding: 8px 10px 4px;
  font-size: 11px;
  color: var(--ink-4);
}
.legal-links a { color: var(--ink-4); text-decoration: none; }
.legal-links a:hover { color: var(--ink-3); text-decoration: underline; }
.legal-links span { color: var(--ink-4); }

/* ===== MAIN AREA ===== */
.main {
  overflow-y: auto;
  background: var(--bg);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.topbar-left h1,
.topbar-left .page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.015em;
}
.topbar-left .crumb {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }

.btn {
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { background: var(--bg-2); border-color: var(--ink-3); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover { filter: brightness(0.95); }
.btn-ghost { border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.content {
  padding: 32px 36px 64px;
  max-width: 1240px;
}

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-weight: 500;
}
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; }
.num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ===== CARDS ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card-tinted {
  background: var(--bg-2);
  border-color: var(--line);
}
.card-ink {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.card-accent {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}
.card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}

/* ===== DASHBOARD ===== */
.greeting {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 6px;
  text-wrap: pretty;
}
.greeting em { font-style: italic; color: var(--accent); }
.greeting.greeting--sm { font-size: 32px; }
.greeting-sub {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 620px;
  margin-bottom: 28px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  font-weight: 500;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card .stat-value .currency {
  font-size: 18px;
  color: var(--ink-3);
  margin-right: 4px;
}
.stat-card .stat-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}
.delta-up { color: var(--good); }
.delta-down { color: var(--bad); }

/* Threshold ring card (special) */
.threshold-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  padding: 28px 32px;
}
.threshold-card .stat-label { color: var(--ink-4); }
.threshold-card .threshold-headline {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.threshold-card .threshold-headline em {
  color: var(--accent-soft);
  font-style: italic;
}
.threshold-card .threshold-sub {
  color: var(--ink-4);
  font-size: 13px;
  max-width: 360px;
}
.threshold-card .ring {
  flex-shrink: 0;
}

/* ring */
.ring-wrap { position: relative; width: 130px; height: 130px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-track { stroke: rgba(255,255,255,0.08); }
.ring-progress {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(.2,.8,.2,1);
}
.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.ring-label .pct {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ring-label .of {
  font-size: 10px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* row of two-up */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* simple bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  margin-top: 14px;
}
.bar-chart .bar {
  flex: 1;
  background: var(--bg-3);
  border-radius: 4px 4px 2px 2px;
  position: relative;
  min-height: 4px;
}
.bar-chart .bar.income { background: var(--data); opacity: 0.85; }
.bar-chart .bar.expense { background: var(--expense); opacity: 0.55; }
.bar-chart .bar-pair {
  flex: 1;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 100%;
}
.bar-chart .bar-pair .bar { flex: 1; }
.bar-labels {
  display: flex;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-3);
}
.bar-labels span { flex: 1; text-align: center; }

/* legend */
.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-2);
}
.legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ===== TRANSACTIONS ===== */
.tx-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.tx-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  min-width: 220px;
}
.search input {
  border: none; background: transparent; outline: none;
  flex: 1;
  font-family: inherit; font-size: 14px;
  color: var(--ink);
}
.search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: inherit;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
}
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-accent { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-soft); }
.chip-good { background: rgba(47,122,82,0.1); color: var(--good); border: 1px solid rgba(47,122,82,0.25); }
.chip-warn { background: rgba(184,118,28,0.12); color: var(--warn); border: 1px solid rgba(184,118,28,0.28); }
.chip-data { background: rgba(47,75,168,0.1); color: var(--data); border: 1px solid rgba(47,75,168,0.25); }

.tx-list {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tx-day-header {
  padding: 10px 18px;
  background: var(--bg-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 500;
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tx-day-header:first-child { border-top: none; }
.tx-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s ease;
}
.tx-row:last-child { border-bottom: none; }
.tx-row:hover { background: var(--bg-2); }
.tx-row.selected {
  background: var(--accent-tint);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tx-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  display: grid; place-items: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-2);
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.tx-main { min-width: 0; }
.tx-merchant {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-meta {
  font-size: 12px;
  color: var(--ink-3);
  display: flex; gap: 8px; align-items: center;
}
.tx-amount {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.tx-amount.income { color: var(--good); }
.tx-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
}
.tx-status.uncategorized { background: var(--warn); }
.tx-status.business { background: var(--data); }
.tx-status.personal { background: var(--ink-4); }
.tx-status.income { background: var(--good); }

/* tx detail panel */
.tx-detail {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 88px;
}
.tx-detail-amount {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 6px 0 4px;
}
.tx-detail-merchant {
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--ink-2);
}
.field {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.field:last-child { border-bottom: none; }
.field-label { color: var(--ink-3); }
.field-value { color: var(--ink); font-weight: 500; }
.field-value.editable {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.field-value.editable:hover { color: var(--accent); }

.classify-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0;
}
.classify-btn {
  padding: 9px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
}
.classify-btn:hover { border-color: var(--ink-3); }
.classify-btn.active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.classify-btn.active.business { background: var(--data); border-color: var(--data); }
.classify-btn.active.personal { background: var(--ink-2); border-color: var(--ink-2); }
.classify-btn.active.income { background: var(--good); border-color: var(--good); }

.hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }

/* split slider */
.split-section {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 12px 0;
}
.split-bar {
  position: relative;
  height: 12px;
  background: var(--bg-3);
  border-radius: 999px;
  margin: 12px 0 10px;
  overflow: hidden;
}
.split-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--data);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.split-bar-handle {
  position: absolute;
  top: 50%; transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  background: var(--ink); color: var(--bg);
  border-radius: 50%;
  border: 2px solid var(--bg);
  cursor: ew-resize;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.split-labels {
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.split-labels .biz { color: var(--data); font-weight: 500; }
.split-labels .pers { color: var(--ink-3); font-weight: 500; }

/* ===== GST/HST monitor ===== */
.gst-hero {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.gst-hero.alert {
  background: var(--accent-tint);
  border-color: var(--danger);
}
.gst-hero h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 10px;
  text-wrap: pretty;
}
.gst-hero h2 em { color: var(--accent); font-style: italic; }
.gst-hero p {
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 460px;
  font-size: 15px;
}
.big-ring-wrap { width: 220px; height: 220px; position: relative; }
.big-ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.big-ring-label .amount {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.big-ring-label .of {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.big-ring-label .pct-pill {
  font-size: 11px;
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 10px;
  font-weight: 500;
}

.quarter-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.quarter-bar {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  position: relative;
}
.quarter-bar .qlabel {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.quarter-bar .qamount {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 4px 0 8px;
  letter-spacing: -0.015em;
}
.quarter-bar .qprogress {
  height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
}
.quarter-bar .qprogress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.timeline {
  position: relative;
  margin: 10px 0;
}
.timeline-track {
  height: 8px;
  background: var(--bg-3);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.timeline-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--data), var(--accent));
  border-radius: 999px;
}
.timeline-marks {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-3);
}

/* ===== EXPORT ===== */
.export-wizard {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}
.export-steps {
  display: flex; flex-direction: column;
  gap: 4px;
}
.export-step {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  font-size: 14px;
  border: 1px solid transparent;
}
.export-step:hover { background: var(--bg-2); }
.export-step.active { background: var(--bg-2); border-color: var(--line); }
.export-step.done .step-num {
  background: var(--good); color: white; border-color: var(--good);
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 500;
  background: var(--bg);
  color: var(--ink-2);
  flex-shrink: 0;
}
.export-step.active .step-num {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.step-title { font-weight: 500; }
.step-sub { font-size: 12px; color: var(--ink-3); }

.export-preview {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  min-height: 540px;
}
.export-preview-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 22px;
}
.export-doc-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.t2125-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.t2125-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-2);
}
.t2125-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.t2125-table .num-col {
  text-align: right;
  font-family: var(--font-display);
  font-size: 15px;
}
.t2125-table .line-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.t2125-table tr.total td {
  font-weight: 600;
  border-top: 1px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-top: 14px;
}

/* ===== RECEIPTS ===== */
.receipt-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.receipt-image {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 560px;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.receipt-mock {
  width: 240px;
  background: white;
  padding: 18px;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #444;
  position: relative;
}
.receipt-mock .scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--data);
  box-shadow: 0 0 12px var(--data);
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  50% { top: 100%; opacity: 1; }
  90% { opacity: 1; }
}
.receipt-mock h4 {
  text-align: center;
  font-family: var(--font-mono);
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.receipt-mock .small { font-size: 10px; color: #777; text-align: center; }
.receipt-mock .line-item {
  display: flex; justify-content: space-between;
  margin: 3px 0;
}
.receipt-mock hr {
  border: none;
  border-top: 1px dashed #aaa;
  margin: 8px 0;
}
.ocr-highlight {
  background: rgba(47,75,168,0.18);
  border-radius: 2px;
  padding: 0 2px;
}

.ocr-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.ocr-confidence {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(47,75,168,0.1);
  color: var(--data);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.ocr-confidence::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--data);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ocr-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ocr-field:last-of-type { border-bottom: none; }
.ocr-field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 500;
}
.ocr-field input, .ocr-field select,
.field-value select, .field-value input {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  outline: none;
}
.field-value select, .field-value input {
  width: auto;
  min-width: 180px;
  max-width: 240px;
}
.ocr-field input:focus, .ocr-field select:focus,
.field-value select:focus, .field-value input:focus { border-color: var(--ink); }
.ocr-field input:focus-visible, .ocr-field select:focus-visible,
.field-value select:focus-visible, .field-value input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: inherit;
}
.ocr-field-value {
  font-family: var(--font-display);
  font-size: 16px;
  text-align: right;
}
.ocr-conf-tag {
  font-size: 10px;
  color: var(--good);
  margin-top: 2px;
}
.ocr-conf-tag.low { color: var(--warn); }

/* utility */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.between { justify-content: space-between; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.m-0 { margin: 0; }
.body-prose { color: var(--ink-2); line-height: 1.6; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-ink2 { color: var(--ink-2); }
.text-ink3 { color: var(--ink-3); }
.text-accent { color: var(--accent); }
.text-data { color: var(--data); }
.text-good { color: var(--good); }
.font-medium { font-weight: 500; }
.text-right { text-align: right; }

/* alert banner */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--accent-tint);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.alert-banner--danger {
  background: var(--accent-tint);
  border-color: var(--danger);
}
.alert-banner--success {
  background: color-mix(in srgb, var(--good) 12%, transparent);
  border-color: var(--good);
}
.alert-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}
.alert-banner--success .alert-icon {
  background: var(--good);
}

/* toast notifications */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  min-width: 280px;
  max-width: 420px;
  animation: toast-in 180ms ease-out;
}
.toast.is-leaving {
  animation: toast-out 180ms ease-in forwards;
}
.toast--success { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.toast--danger  { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.toast-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.toast--success .toast-icon { background: var(--good); }
.toast--danger  .toast-icon { background: var(--danger); }
.toast-body { flex: 1; font-size: 14px; color: var(--ink); }
.toast-close {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
}
.toast-close:hover { color: var(--ink); background: var(--bg-2); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}
@media (max-width: 640px) {
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: none; }
}
.alert-banner h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 500;
}
.alert-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* tooltip-ish thresholds list */
.threshold-list {
  display: flex; flex-direction: column;
  gap: 0;
}
.threshold-list .item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: center;
}
.threshold-list .item:last-child { border-bottom: none; }
.threshold-list .item .at {
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: 12px;
}
.threshold-list .item.hit .at { color: var(--accent); }
.threshold-list .item.hit { font-weight: 500; }
.threshold-list .item.item--total {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 500;
}

/* toggle pill row */
.toggle-pill {
  display: inline-flex;
  background: var(--bg-2);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--line);
}
.toggle-pill button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}
.toggle-pill button.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  background: var(--bg-2);
  color: var(--ink-3);
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop-zone:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}

/* divider */
.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

/* mini sparkline */
.spark {
  display: flex; align-items: flex-end;
  gap: 2px;
  height: 28px;
  margin-top: 8px;
}
.spark span {
  flex: 1;
  background: var(--data);
  opacity: 0.6;
  border-radius: 1px;
  min-height: 2px;
}
.spark span:last-child { opacity: 1; background: var(--expense); }

/* category hint warning */
.form-hint--warn {
  font-size: 12px;
  color: var(--warn);
  background: rgba(184,118,28,0.1);
  border: 1px solid rgba(184,118,28,0.25);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

/* ===== MOBILE NAV HAMBURGER ===== */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-right: 4px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease;
}
.nav-hamburger:hover { background: var(--bg-2); }

/* Scrim (backdrop) — hidden by default */
.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sidebar-scrim.is-open {
  opacity: 1;
}

/* ===== NARROW VIEWPORT (<1024px) — off-canvas drawer ===== */
@media (max-width: 1023px) {
  /* Switch layout to single column; sidebar comes out of flow */
  .app {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  /* Sidebar becomes a fixed off-canvas drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 85vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    /* keep visual styles intact */
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }

  /* Show scrim at narrow widths */
  .sidebar-scrim {
    display: block;
  }

  /* Main takes full width */
  .main {
    grid-column: 1;
    overflow-y: visible;
    min-height: 100vh;
  }

  /* Topbar: show hamburger, reduce padding */
  .nav-hamburger {
    display: inline-flex;
  }
  .topbar {
    padding: 12px 16px;
  }
  .topbar-left h1,
  .topbar-left .page-title {
    font-size: 20px;
  }

  /* Content area: tighter horizontal padding */
  .content {
    padding: 20px 16px 48px;
  }

  /* Greeting headline: scale down on mobile */
  .greeting {
    font-size: 26px;
  }

  /* Transaction layout: single column (no side detail panel) */
  .tx-layout {
    grid-template-columns: 1fr;
  }

  /* Toolbar: wrap nicely, shrink buttons */
  .tx-toolbar {
    gap: 6px;
  }

  /* Transaction rows: tighten padding */
  .tx-row {
    padding: 12px 14px;
    gap: 10px;
  }

  /* Hide the account name in tx-meta on narrow */
  .tx-meta-account {
    display: none;
  }

  /* Stat grid: single column */
  .stat-grid {
    grid-template-columns: 1fr;
  }

  /* Two-up grids: single column */
  .row-2 {
    grid-template-columns: 1fr;
  }
  .row-3 {
    grid-template-columns: 1fr;
  }

  /* GST hero: single column */
  .gst-hero {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }
  .big-ring-wrap {
    margin: 0 auto;
  }

  /* Quarter bars: two columns on mobile */
  .quarter-bars {
    grid-template-columns: 1fr 1fr;
  }

  /* Receipt layout: single column */
  .receipt-layout {
    grid-template-columns: 1fr;
  }
  .receipt-image {
    height: 280px;
  }

  /* Export wizard: single column */
  .export-wizard {
    grid-template-columns: 1fr;
  }

  /* Threshold card: single column */
  .threshold-card {
    grid-template-columns: 1fr;
  }
  .threshold-card .ring {
    display: none;
  }

  /* Topbar right: hide chip label on very small screens */
  .topbar-right .chip {
    display: none;
  }
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
  overflow: hidden;
}

/* ============================================================
 * MARKETING / LANDING PAGES
 * Used by /landing/1 through /landing/5 — public, unauthenticated.
 * Lean on existing tokens (--bg, --ink, --accent, fonts) so a single
 * variant change ripples through every page.
 * ============================================================ */

.landing {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 28px 96px;
}
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.landing-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.landing-brand em { color: var(--accent); font-style: italic; }
.landing-nav-links { display: flex; gap: 18px; align-items: center; }
.landing-nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: 14px;
}
.landing-nav-links a:hover { color: var(--accent); }
.landing-nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.landing-nav-cta:hover { background: var(--accent); color: var(--bg); }

.landing-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.landing-h1 {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 22px;
  color: var(--ink);
}
.landing-h1 em { font-style: italic; color: var(--accent); }
.landing-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 680px;
  margin: 0 0 32px;
}
.landing-cta-row {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin: 28px 0 12px;
}
.landing-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
}
.landing-btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.landing-btn-primary:hover { background: var(--ink); }
.landing-btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.landing-btn-ghost:hover { border-color: var(--ink); }
.landing-cta-meta {
  font-size: 13px; color: var(--ink-3);
  margin-top: 6px;
}

.landing-section { margin: 80px 0; }
.landing-section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.landing-section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}
.landing-section-title em { font-style: italic; color: var(--accent); }
.landing-section-lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 36px;
}

.landing-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.landing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.landing-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.landing-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.landing-card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}

.landing-feat-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 500;
  margin-bottom: 14px;
}

.landing-pricing {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.landing-pricing-tier {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.landing-pricing-amount {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}
.landing-pricing-amount em { font-style: italic; color: var(--accent); }
.landing-pricing-meta {
  color: var(--ink-3); font-size: 14px; margin-bottom: 18px;
}
.landing-pricing-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 24px 0 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.landing-pricing-list li {
  padding: 8px 0;
  color: var(--ink-2);
  display: flex; gap: 10px; align-items: flex-start;
}
.landing-pricing-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 600;
}

.landing-footer {
  margin-top: 96px;
  padding: 32px 0 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--ink-3);
  font-size: 13px;
}
.landing-footer-links { display: flex; gap: 18px; }
.landing-footer-links a {
  color: var(--ink-3); text-decoration: none;
}
.landing-footer-links a:hover { color: var(--accent); }

.landing-quote {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  max-width: 720px;
}

.landing-disclaimer {
  font-size: 12px;
  color: var(--ink-3);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  line-height: 1.5;
  margin: 24px 0;
}

@media (max-width: 800px) {
  .landing { padding: 22px 18px 60px; }
  .landing-h1 { font-size: 42px; }
  .landing-lede { font-size: 17px; }
  .landing-section-title { font-size: 28px; }
  .landing-grid-2, .landing-grid-3 { grid-template-columns: 1fr; }
  .landing-section { margin: 56px 0; }
  .landing-pricing-amount { font-size: 44px; }
  .landing-nav-links { display: none; }
}

/* ============================================================
 * WAITLIST FORM
 * Replaces marketing CTAs while billing is pre-launch.
 * ============================================================ */

.waitlist-form {
  margin: 28px 0 12px;
  max-width: 480px;
}
.waitlist-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.waitlist-input {
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
}
.waitlist-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.waitlist-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: inherit;
}
.waitlist-submit {
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.waitlist-helper {
  font-size: 13px;
  color: var(--ink-3);
  margin: 8px 0 0;
}
.waitlist-error {
  font-size: 13px;
  color: var(--accent);
  margin: 8px 0 0;
  font-weight: 500;
}

.waitlist-form-compact {
  margin: 16px auto 0;
  max-width: 360px;
}
.waitlist-form-compact .waitlist-row {
  flex-direction: column;
  gap: 10px;
}
.waitlist-form-compact .waitlist-input,
.waitlist-form-compact .waitlist-submit {
  width: 100%;
}
.waitlist-form-compact .waitlist-helper,
.waitlist-form-compact .waitlist-error {
  text-align: center;
}

.waitlist-thanks {
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0 12px;
  max-width: 480px;
}
.waitlist-thanks-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.waitlist-thanks-body {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.55;
}
.waitlist-thanks-body a {
  color: var(--accent);
  text-decoration: underline;
}

.landing-pricing-soon {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .waitlist-row { flex-direction: column; }
  .waitlist-submit { width: 100%; }
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  padding: 8px 14px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

.ocr-advanced { padding: 10px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.ocr-advanced > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 0; }
.ocr-advanced[open] > summary { margin-bottom: 6px; }

/* ============================================================
 * PUBLIC CALCULATORS (SEO landing pages)
 * Builds on .landing-* tokens. Two-column layout: inputs | results.
 * ============================================================ */

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 32px 0 56px;
  align-items: start;
}
.calc-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.calc-card-results {
  background: var(--bg);
  border: 1px solid var(--line);
  position: sticky;
  top: 16px;
}
.calc-fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.calc-fieldset legend {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.calc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.calc-row label {
  font-size: 14px;
  color: var(--ink);
  font-weight: 450;
}
.calc-row .calc-help {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
}
.calc-input,
.calc-select {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  width: 100%;
}
.calc-input:focus,
.calc-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.calc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.calc-radio-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.calc-radio-row label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  background: var(--bg);
}
.calc-radio-row input { accent-color: var(--accent); }

.calc-result-headline {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 4px;
  color: var(--ink);
}
.calc-result-headline em { font-style: italic; color: var(--accent); }
.calc-result-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 18px;
}
.calc-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.calc-result-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
  color: var(--ink-2);
}
.calc-result-list li strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.calc-bar {
  height: 10px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}
.calc-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width .25s ease;
}
.calc-bar-fill[data-level="ok"]       { background: #4a8a55; }
.calc-bar-fill[data-level="warn"]     { background: #c89a2a; }
.calc-bar-fill[data-level="critical"] { background: var(--accent); }
.calc-bar-fill[data-level="over"]     { background: var(--accent); }

.calc-alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-2);
}
.calc-alert[data-level="ok"] {
  border-color: #c8dccb; background: #ecf3ed; color: #2c4a32;
}
.calc-alert[data-level="warn"] {
  border-color: #ead7a7; background: #faf2da; color: #6a4c0a;
}
.calc-alert[data-level="critical"],
.calc-alert[data-level="over"] {
  border-color: var(--accent-soft); background: var(--accent-tint); color: var(--accent);
}

.calc-section {
  margin: 64px 0;
}
.calc-section h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.calc-section h2 em { font-style: italic; color: var(--accent); }
.calc-section p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 680px;
}

.calc-faq {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.calc-faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.calc-faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
}
.calc-faq summary::marker, .calc-faq summary::-webkit-details-marker { display: none; }
.calc-faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 400; }
.calc-faq details[open] summary::after { content: "−"; }
.calc-faq details p {
  margin: 10px 0 0;
  color: var(--ink-2);
  line-height: 1.6;
}

.calc-cta {
  margin: 48px 0 0;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-align: center;
}
.calc-cta h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.calc-cta p {
  margin: 0 auto 16px;
  color: var(--ink-2);
  max-width: 520px;
}

.calc-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 0;
}
.calc-related a {
  display: block;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease;
}
.calc-related a:hover { border-color: var(--accent); }
.calc-related a strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 4px;
}
.calc-related a span {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
}

/* ── Comparison table ─────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.compare-table th {
  background: var(--bg-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.compare-table td:first-child {
  font-weight: 500;
  color: var(--ink);
}
.compare-table .yes  { color: #4a8a55; font-weight: 500; }
.compare-table .no   { color: var(--ink-3); }
.compare-table .partial { color: #b07a14; font-weight: 500; }
.compare-table .col-us { background: var(--accent-tint); }

@media (max-width: 820px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-card-results { position: static; }
  .calc-related { grid-template-columns: 1fr; }
  .calc-result-headline { font-size: 32px; }
  .compare-table { font-size: 13px; }
  .compare-table th, .compare-table td { padding: 10px 8px; }
}
