/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --paper: #FFFFFF;
  --canvas: #F9FAFB;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #667085;
  --rule: #EAECF0;
  --rule-2: #D0D5DD;

  --accent: #101828;
  --accent-ink: #FFFFFF;
  --accent-text: #344054;

  --pos: #067647;
  --neg: #B42318;
  --warn: #B54708;
  --pos-bg: #ECFDF3;
  --neg-bg: #FEF3F2;
  --warn-bg: #FFFAEB;

  --panel: #F9FAFB;
  --panel-2: #FFFFFF;
  --panel-rule: #EAECF0;
  --panel-ink: #101828;
  --panel-ink-2: #475467;
  --panel-ink-3: #667085;
  --panel-pos: #101828;
  --panel-neg: #B42318;
  --seg-fees: #F97066;
  --seg-costs: #D0D5DD;
  --seg-keep: #2E90FA;
  --seg-costs-strong: #98A2B3;

  --brand: #2E90FA;
  --brand-strong: #1570EF;
  --brand-text: #175CD3;
  --brand-soft: #EFF8FF;
  --brand-softer: #F5FAFF;
  --brand-line: #B2DDFF;
  --peach-soft: #FEF6EE;

  --draft-bg: #FFF8DB;
  --draft-ink: #5C4400;
  --draft-rule: #F5C518;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --max: 1160px;
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-lg: 0 12px 16px -4px rgb(16 24 40 / 0.08), 0 4px 6px -2px rgb(16 24 40 / 0.03);
  color-scheme: light;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); font-weight: 650; line-height: 1.08; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 650; line-height: 1.15; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
h4 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }

:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; border-radius: 4px; }

.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: 16px; top: -100px; z-index: 20;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.num { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-sm);
  font: 600 0.95rem/1 var(--sans); letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: #1D2939; }
.btn-accent { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-xs); }
.btn-accent:hover { background: #1D2939; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--rule-2); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn:disabled.is-busy { cursor: progress; }
.btn svg { width: 16px; height: 16px; flex: none; }

.text-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: 500 0.875rem var(--sans); color: var(--ink-3);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2);
}
.text-btn:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ==========================================================================
   Header and footer
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgb(255 255 255 / 0.82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 1px 12px rgb(16 24 40 / 0.05); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.025em; }
.brand-mark { width: 24px; height: 24px; flex: none; border-radius: 6px; }

.nav { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-size: 0.925rem; font-weight: 500; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--canvas); }
.nav a[aria-current="page"] { color: var(--ink); }
.header-cta { margin-left: auto; }
.tag {
  display: inline-block; padding: 2px 6px; border-radius: 4px; margin-left: 4px;
  background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line);
  font: 600 0.7rem/1.4 var(--sans); letter-spacing: 0.01em; vertical-align: 1px;
}

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .header-cta { margin-left: auto; }
  .site-header nav { order: 3; width: 100%; overflow-x: auto; margin: 4px -12px 0; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
}

.site-footer { background: var(--canvas); border-top: 1px solid var(--rule); padding: 48px 0 32px; font-size: 0.9rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-about p { margin-top: 12px; max-width: 46ch; }
.footer-col h2 { font: 600 0.85rem var(--sans); letter-spacing: 0; color: var(--ink); margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: 6px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 0.825rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding: 56px 0 36px; display: grid; gap: 24px 64px; align-items: end; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.25fr 1fr; padding: 72px 0 44px; } }
.hero h1 { max-width: 15ch; margin-top: 16px; }
.hero-side p { color: var(--ink-2); font-size: 1.075rem; max-width: 44ch; }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 0.925rem; color: var(--ink-2); }
.facts li { display: flex; gap: 10px; align-items: baseline; }
.facts svg { width: 14px; height: 14px; flex: none; transform: translateY(2px); color: var(--brand-strong); }

/* ==========================================================================
   Calculator
   ========================================================================== */

.calc {
  display: grid; border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: clip;
  background: var(--paper); box-shadow: var(--shadow-lg);
}
@media (min-width: 960px) { .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); } }
.calc-section { padding-bottom: 80px; }

.calc-form { padding: 28px 20px 24px; }
@media (min-width: 720px) { .calc-form { padding: 36px 36px 28px; } }
@media (min-width: 960px) { .calc-form { position: sticky; top: 64px; align-self: start; } }

.group + .group { margin-top: 30px; }
.group-title {
  display: flex; align-items: center; gap: 12px;
  font: 600 0.8rem var(--sans); color: var(--ink-3); margin: 0 0 16px; padding: 0; width: 100%;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.fields { display: grid; gap: 18px 16px; }
@media (min-width: 520px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; }
.money {
  display: flex; align-items: center; height: 52px;
  border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: var(--paper); box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.money:hover { border-color: var(--ink-3); }
.money:focus-within { border-color: #98A2B3; box-shadow: 0 0 0 4px #F2F4F7, 0 0 0 1px var(--ink-2) inset; }
.money:has(input[aria-invalid="true"]) { border-color: var(--neg); box-shadow: 0 0 0 1px var(--neg); }
.money .unit { padding-left: 14px; color: var(--ink-3); font-size: 1.05rem; font-weight: 500; }
.money .unit-after { padding: 0 14px 0 0; }
.money input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink);
  font: 500 1.15rem/1 var(--sans); letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
  padding: 0 14px 0 6px;
}
.money input:focus { outline: none; }
.money input::placeholder { color: var(--ink-3); opacity: 0.6; }
.field-hint { color: var(--ink-3); font-size: 0.825rem; margin-top: 6px; }
.field-error { color: var(--neg); font-size: 0.825rem; font-weight: 600; margin-top: 6px; }

/* Yes / No choice */
.choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.choice + .choice { border-top: 1px solid var(--rule); }
.choice-text { min-width: 0; }
.choice-label { display: block; font-weight: 600; font-size: 0.925rem; }
.choice-hint { display: block; color: var(--ink-3); font-size: 0.825rem; margin-top: 2px; }
.seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; flex: none;
  padding: 3px; border-radius: 8px; background: var(--canvas); border: 1px solid var(--rule);
}
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block; min-width: 54px; padding: 7px 14px; border-radius: 6px; text-align: center;
  font-size: 0.875rem; font-weight: 600; color: var(--ink-3); border: 1px solid transparent;
  transition: background-color 0.12s, color 0.12s;
}
.seg input:checked + span { color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }
.seg label:hover input:not(:checked) + span { color: var(--ink); }

.form-foot { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Results panel */
.panel {
  background: var(--panel); color: var(--panel-ink); border-top: 1px solid var(--rule);
  padding: 28px 20px 24px; display: flex; flex-direction: column;
}
@media (min-width: 720px) { .panel { padding: 36px 36px 28px; } }
@media (min-width: 960px) { .panel { border-top: 0; border-left: 1px solid var(--rule); } }

.keep-label { font-size: 0.875rem; font-weight: 600; color: var(--panel-ink-2); }
.keep-value {
  font: 650 clamp(3rem, 7vw, 4.25rem)/1 var(--display); letter-spacing: -0.04em;
  color: var(--panel-pos); margin-top: 8px; font-variant-numeric: tabular-nums;
}
.keep-sub { font-size: 0.85rem; color: var(--panel-ink-3); margin-top: 8px; }
.is-loss .keep-value { color: var(--panel-neg); }


.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 24px 0 0;
  border-top: 1px solid var(--panel-rule); border-bottom: 1px solid var(--panel-rule);
}
.stats div { padding: 14px 0 14px 16px; border-left: 1px solid var(--panel-rule); min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 0.775rem; color: var(--panel-ink-3); font-weight: 500; }
.stats dd { margin: 4px 0 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.basic-note {
  display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--paper); border: 1px solid var(--rule); color: var(--panel-ink-2); font-size: 0.85rem; line-height: 1.5;
}
.basic-note svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); margin-top: 2px; }
.basic-note strong { color: var(--panel-ink); }
.basic-note[hidden] { display: none; }

.ledger { margin-top: 22px; }
.ledger-title { font-size: 0.8rem; font-weight: 600; color: var(--panel-ink-3); margin-bottom: 4px; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.ledger th, .ledger td { padding: 8px 0; border-bottom: 1px solid var(--panel-rule); vertical-align: baseline; }
.ledger th { text-align: left; font-weight: 500; padding-right: 12px; color: var(--panel-ink); }
.ledger td { text-align: right; white-space: nowrap; font-weight: 600; }
.ledger .detail { display: block; font: 400 0.75rem/1.4 var(--mono); color: var(--panel-ink-3); margin-top: 2px; letter-spacing: -0.01em; }
.ledger .indent th { padding-left: 12px; }
.ledger .group-row th::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; background: var(--dot, var(--rule-2)); }
.ledger .g-fees { --dot: var(--seg-fees); }
.ledger .g-costs { --dot: var(--seg-costs); }
.ledger .keep th::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: 1px; background: var(--seg-keep); }
.ledger .group-row th { padding-top: 14px; font-size: 0.775rem; font-weight: 600; color: var(--panel-ink-3); border-bottom: 0; padding-bottom: 2px; }
.ledger .group-row td { border-bottom: 0; }
.ledger .total th, .ledger .total td { font-weight: 650; }
.ledger .keep th, .ledger .keep td { font-weight: 700; font-size: 1rem; border-bottom: 0; padding-top: 12px; }
.ledger .keep td { color: var(--panel-pos); }
.is-loss .ledger .keep td { color: var(--panel-neg); }
.panel-foot { margin-top: auto; padding-top: 18px; font-size: 0.775rem; color: var(--panel-ink-3); }

/* Profit bar pinned to the bottom on phones until the results are in view */
.peek {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); text-decoration: none;
  border: 1px solid var(--rule-2); box-shadow: var(--shadow-lg);
  transition: transform 0.2s, opacity 0.2s;
}
.peek-label { font-size: 0.85rem; color: var(--panel-ink-2); }
.peek-value { font: 700 1.35rem var(--display); letter-spacing: -0.03em; color: var(--panel-pos); margin-left: 6px; font-variant-numeric: tabular-nums; }
.peek.is-loss .peek-value { color: var(--panel-neg); }
.peek-link { font-size: 0.85rem; font-weight: 600; }
.peek.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
@media (min-width: 960px) { .peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .peek { transition: none; } }

/* ==========================================================================
   Bands: alerts and Pro
   ========================================================================== */

.band { background: linear-gradient(180deg, var(--brand-softer), #FFFFFF); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-inner { padding-top: 56px; padding-bottom: 56px; display: grid; gap: 28px 64px; align-items: start; }
@media (min-width: 900px) { .band-inner .signup { margin-top: 12px; } }
@media (min-width: 900px) { .band-inner { grid-template-columns: 1fr 1fr; padding-top: 64px; padding-bottom: 64px; } }
.band h2 { max-width: 16ch; }
.band-copy p { color: var(--ink-2); margin-top: 14px; max-width: 46ch; }

.signup label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup-row input {
  flex: 1 1 240px; min-width: 0; height: 48px; padding: 0 14px;
  font: 500 1rem var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--r-sm);
}
.signup-row input:hover { border-color: var(--ink-3); }
.signup-row input:focus { outline: none; border-color: #98A2B3; box-shadow: 0 0 0 4px #F2F4F7, 0 0 0 1px var(--ink-2) inset; }
.signup-row input[aria-invalid="true"] { border-color: var(--neg); box-shadow: 0 0 0 1px var(--neg); }
@media (max-width: 440px) { .signup-row .btn { flex: 1 1 100%; } }
.turnstile:not(:empty) { margin-top: 12px; }
.status:not(:empty) { margin-top: 12px; font-weight: 600; font-size: 0.925rem; }
.status[data-kind="error"] { color: var(--neg); }
.status[data-kind="success"] { color: var(--pos); }
.fine-print { margin-top: 12px; color: var(--ink-3); font-size: 0.825rem; }
.signup.is-done label, .signup.is-done .signup-row, .signup.is-done .turnstile { display: none; }
.signup.is-done .status { margin-top: 0; font-size: 1.05rem; }

.pro-band { padding: 88px 0; }
.pro-grid { display: grid; gap: 40px 64px; align-items: center; }
@media (min-width: 960px) { .pro-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px 56px; } }
.pro-copy h2 { max-width: 13ch; }
.pro-copy > p { color: var(--ink-2); margin-top: 14px; max-width: 44ch; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.ticks svg { width: 14px; height: 14px; flex: none; transform: translateY(2px); color: var(--brand-strong); }
.pro-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.pro-cta small { color: var(--ink-3); font-size: 0.85rem; }

.preview {
  border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: 0.8rem; color: var(--ink-3); }
.preview-bar b { color: var(--ink); font-weight: 600; }
.preview-scroll { overflow-x: auto; }
.preview table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; min-width: 460px; }
.preview th, .preview td { padding: 11px 12px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.preview th:first-child, .preview td:first-child { text-align: left; }
.preview thead th { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); background: var(--canvas); }
.preview tbody tr:last-child td { border-bottom: 0; }
.preview td:first-child { font-weight: 600; white-space: normal; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--pos-bg); color: var(--pos); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--neg-bg); color: var(--neg); }
.t-neg { color: var(--neg); }

/* ==========================================================================
   Guide
   ========================================================================== */

.guide { padding: 88px 0 96px; display: grid; gap: 0 72px; }
@media (min-width: 1000px) { .guide { grid-template-columns: 220px minmax(0, 1fr); } }

.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: 92px; align-self: start; grid-row: 1 / span 30; }
  .guide > :not(.toc) { grid-column: 2; }
}
.toc-title { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
/* the active marker slides between items */
.toc a {
  transition: color 0.2s, border-color 0.25s;
  display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--ink-3); text-decoration: none; font-size: 0.875rem;
}
.toc a:hover { color: var(--brand-text); }
.toc a.is-active { color: var(--brand-text); border-left-color: var(--brand-strong); font-weight: 600; }

.guide-head { max-width: 720px; }
.guide-head h2 { margin-bottom: 18px; }
.guide-block { max-width: 720px; padding-top: 48px; }
.guide-block h3 { margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.guide-block p { color: var(--ink-2); }
.guide-block p + p { margin-top: 12px; }
.rate { font: 600 0.8rem var(--mono); color: var(--brand-text); background: var(--brand-soft); padding: 3px 7px; border-radius: 5px; letter-spacing: -0.02em; }

.rates-table { width: 100%; border-collapse: collapse; font-size: 0.925rem; margin-top: 8px; }
.rates-table th, .rates-table td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.rates-table thead th { font-size: 0.775rem; font-weight: 600; color: var(--ink-3); padding-top: 0; }
.rates-table tbody th { font-weight: 600; }
.rates-table td { color: var(--ink-2); }
.rates-table td.rate-cell { font: 600 0.875rem var(--mono); color: var(--ink); white-space: nowrap; letter-spacing: -0.02em; }
.rates-table a { text-decoration: none; }
.rates-table a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .rates-table thead { display: none; }
  .rates-table tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .rates-table th, .rates-table td { border: 0; padding: 0; }
  .rates-table td:last-child { grid-column: 1 / -1; margin-top: 4px; font-size: 0.85rem; }
}

.draft {
  position: relative; padding: 14px 16px 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--draft-bg); color: var(--draft-ink) !important; border-left: 3px solid var(--draft-rule);
  font-size: 0.925rem;
}
.draft::before { content: "Draft"; display: block; font: 700 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; opacity: 0.8; }

.example { margin: 20px 0 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
.example figcaption { padding: 18px 20px; border-bottom: 1px solid var(--rule); background: var(--canvas); }
.example figcaption .draft { margin-top: 10px; }
.example table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.example th, .example td { padding: 10px 20px; border-bottom: 1px solid var(--rule); }
.example th { text-align: left; font-weight: 500; color: var(--ink-2); }
.example td { text-align: right; font-weight: 600; white-space: nowrap; }
.example .total th, .example .total td { font-weight: 650; color: var(--ink); background: var(--canvas); }
.example .keep th, .example .keep td { font-weight: 700; color: var(--ink); font-size: 1rem; }
.example .keep td { color: var(--pos); }
.example > .draft { margin: 0; border-radius: 0; border-left: 0; border-top: 1px solid var(--draft-rule); }

.faq { max-width: 720px; padding-top: 56px; }
.faq h3 { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 1.025rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 1.5px; background: var(--ink);
  transition: transform 0.2s;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details > :not(summary) { margin-bottom: 20px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ==========================================================================
   Simple text pages
   ========================================================================== */

.page { max-width: 720px; padding-top: 64px; padding-bottom: 96px; }
.page h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 14px; }
.page h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 40px 0 10px; }
.page p, .page ul { color: var(--ink-2); }
.page p + p, .page p + ul, .page ul + p { margin-top: 12px; }
.page ul { padding-left: 20px; margin: 0; }
.page li + li { margin-top: 6px; }
.page .updated { color: var(--ink-3); font-size: 0.9rem; }
.page .lede { font-size: 1.1rem; color: var(--ink-2); margin-top: 18px; }
.page .btn { margin-top: 24px; }

/* ==========================================================================
   Pro: price your whole shop
   ========================================================================== */

.pro-head { display: grid; gap: 32px 64px; padding: 56px 0 40px; align-items: start; }
@media (min-width: 960px) { .pro-head { grid-template-columns: 1fr 380px; padding: 72px 0 48px; } }
.pro-head h1 { max-width: 11ch; }
.pro-lede { margin-top: 20px; color: var(--ink-2); font-size: 1.075rem; max-width: 46ch; }

.plan { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 24px; background: var(--paper); box-shadow: var(--shadow-lg); }
.plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.plan-name-on svg { width: 16px; height: 16px; color: var(--paper); background: var(--pos); border-radius: 50%; padding: 3px; }
.plan-price { color: var(--ink-3); font-size: 0.9rem; }
.plan-price span { font: 700 2rem/1 var(--display); letter-spacing: -0.04em; color: var(--ink); margin-right: 4px; }
.plan .ticks { margin-top: 16px; gap: 8px; font-size: 0.925rem; }
.plan-buy { width: 100%; margin-top: 20px; }
.plan-note { margin-top: 12px; font-size: 0.825rem; color: var(--ink-3); }
.plan-note .text-btn { font-size: 0.825rem; }
.plan-thanks { margin-top: 10px; color: var(--ink-2); font-size: 0.925rem; }

.sheet { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-xs); }

.sheet-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px;
  padding: 18px 20px; border-bottom: 1px solid var(--rule);
}
.sheet-settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.mini-choice legend, .mini-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.mini-choice .seg span { padding: 5px 12px; min-width: 46px; }
.money-sm { height: 38px; width: 84px; }
.money-sm input { font-size: 1rem; padding: 0 4px 0 12px; }
.mini-field .field-error { position: absolute; }
.mini-field { position: relative; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions .lock { display: none; }
.sheet-actions .is-locked .lock { display: block; }
.sheet-actions .is-locked svg:not(.lock) { display: none; }
.sheet-actions .is-locked { color: var(--ink-3); }

.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--rule); }
.summary div { padding: 14px 20px; border-left: 1px solid var(--rule); min-width: 0; }
.summary div:first-child { border-left: 0; }
.summary dt { font-size: 0.775rem; color: var(--ink-3); font-weight: 500; }
.summary dd { margin: 2px 0 0; font: 650 1.4rem/1.2 var(--display); letter-spacing: -0.03em; }
.summary .is-bad dd { color: var(--neg); }
.summary .is-warn dd { color: var(--warn); }
@media (max-width: 640px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary div:nth-child(3) { border-left: 0; }
  .summary div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

.sheet-scroll { overflow-x: auto; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.sheet-table th, .sheet-table td { padding: 6px 8px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; vertical-align: middle; }
.sheet-table th:first-child, .sheet-table td:first-child { padding-left: 20px; text-align: left; }
.sheet-table th:last-child, .sheet-table td:last-child { padding-right: 14px; }
.sheet-table thead th { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); padding-top: 12px; padding-bottom: 10px; background: var(--canvas); white-space: normal; line-height: 1.25; }
.sheet-table .col-name { min-width: 200px; text-align: left; }
.sheet-table .col-out { color: var(--ink-2); }
.sheet-table .col-strong { color: var(--ink); font-weight: 650; }
.sheet-table .col-status { text-align: left; }
.sheet-table tbody tr:hover { background: color-mix(in srgb, var(--canvas) 55%, transparent); }
.sheet-table tbody tr[data-status="bad"] td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
.sheet-table tbody tr[data-status="warn"] td:first-child { box-shadow: inset 3px 0 0 #E2A21A; }

.cell-input {
  width: 100%; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; color: var(--ink); font: 500 0.925rem var(--sans); font-variant-numeric: tabular-nums;
}
.cell-input:hover { border-color: var(--rule-2); background: var(--paper); }
.cell-input:focus { outline: none; border-color: #98A2B3; box-shadow: 0 0 0 3px #F2F4F7, 0 0 0 1px var(--ink-2) inset; background: var(--paper); }
.cell-input[aria-invalid="true"] { border-color: var(--neg); }
.col-name .cell-input { font-weight: 600; margin-left: -9px; width: calc(100% + 9px); }
.cell-input::placeholder { color: var(--ink-3); opacity: 0.6; font-weight: 400; }
.cell-money { display: flex; align-items: center; justify-content: flex-end; }
.cell-money span { color: var(--ink-3); margin-right: -2px; font-size: 0.875rem; }
.cell-money .cell-input { width: 74px; text-align: right; }

.use-btn {
  margin-left: 8px; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--rule-2); background: var(--paper);
  font: 600 0.75rem var(--sans); color: var(--ink); cursor: pointer;
}
.use-btn:hover { border-color: var(--ink); }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 6px;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { background: var(--neg-bg); color: var(--neg); }
.muted { color: var(--ink-3); }
.pill-none { background: var(--canvas); color: var(--ink-3); }

.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 20px; }
.limit { font-size: 0.875rem; color: var(--ink-2); }
.limit .text-btn { font-size: 0.875rem; color: var(--ink); font-weight: 600; }
.sheet-note { margin: 16px 0 96px; font-size: 0.85rem; color: var(--ink-3); }

/* Rows become cards on small screens */
@media (max-width: 899px) {
  .sheet-table thead { display: none; }
  .sheet-table, .sheet-table tbody { display: block; }
  .sheet-table tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px;
    padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--rule); position: relative;
  }
  .sheet-table td { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; padding: 2px 0 !important; text-align: left; }
  .sheet-table td::before { content: attr(data-label); font-size: 0.775rem; color: var(--ink-3); font-weight: 500; white-space: normal; }
  .sheet-table td.col-name { grid-column: 1 / -1; padding-right: 40px !important; }
  .sheet-table td.col-name::before { display: none; }
  .sheet-table td.col-status { grid-column: 1 / -1; margin-top: 6px; }
  .sheet-table td.col-status::before { display: none; }
  .sheet-table td.col-remove { position: absolute; top: 14px; right: 10px; }
  .sheet-table tbody tr[data-status] td:first-child { box-shadow: none; }
  .sheet-table tbody tr[data-status="bad"] { box-shadow: inset 3px 0 0 var(--neg); }
  .sheet-table tbody tr[data-status="warn"] { box-shadow: inset 3px 0 0 #E2A21A; }
  .col-name .cell-input { font-size: 1rem; }
  .cell-money .cell-input { width: 80px; border-color: var(--rule); }
}
@media (max-width: 420px) {
  .sheet-table tr { grid-template-columns: 1fr; }
}

/* Dialog */
.dialog {
  width: min(440px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--rule-2); border-radius: var(--r-lg);
  background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgb(0 0 0 / 0.25);
}
.dialog::backdrop { background: rgb(17 19 17 / 0.45); }
.dialog h2 { font-size: 1.4rem; letter-spacing: -0.025em; }
.dialog p { color: var(--ink-2); margin-top: 8px; font-size: 0.925rem; }
.dialog label { display: block; font-weight: 600; font-size: 0.9rem; margin: 20px 0 7px; }
.input {
  width: 100%; height: 48px; padding: 0 14px; font: 500 1rem var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--r-sm);
}
.input:focus { outline: none; border-color: #98A2B3; box-shadow: 0 0 0 4px #F2F4F7, 0 0 0 1px var(--ink-2) inset; }
.input[aria-invalid="true"] { border-color: var(--neg); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 32px);
  padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: #FFFFFF;
  box-shadow: var(--shadow-lg); font-size: 0.9rem;
}
.toast[hidden] { display: none; }
.toast-action {
  border: 0; background: none; color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; font: 600 0.9rem var(--sans); cursor: pointer; padding: 4px 0; white-space: nowrap;
}
.toast-action:hover { text-decoration: underline; }
@media (min-width: 900px) { .cell-money span { display: none; } }

.guide-intro { font-size: 1.075rem; color: var(--ink-2); }
.example figcaption p { color: var(--ink-2); margin-top: 6px; font-size: 0.925rem; }
.example-note { padding: 14px 20px; background: var(--canvas); color: var(--ink); font-size: 0.925rem; font-weight: 500; }
.faq details > p { color: var(--ink-2); max-width: 64ch; }


/* ==========================================================================
   Motion
   ========================================================================== */

:root { interpolate-size: allow-keywords; }

/* Sections fade up as they scroll into view (only when scripts run) */
.js [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms), transform 0.7s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Safety net: if the script never runs, show everything after 3 seconds anyway */
.js:not(.motion-ready) [data-reveal]:not(.is-in) { animation: show-anyway 0.4s 3s forwards; }
@keyframes show-anyway { to { opacity: 1; transform: none; } }

/* The top of the page animates in with CSS alone, so it never waits for scripts */
[data-enter] { animation: enter 0.7s cubic-bezier(.2, .7, .2, 1) var(--enter-delay, 0ms) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* Highlighter swipe in the intro */
mark.swipe {
  color: inherit; padding: 0 2px; margin: 0 -2px;
  background: linear-gradient(transparent 60%, #D1E9FF 60%, #D1E9FF 94%, transparent 94%) no-repeat 0 0 / 0% 100%;
  animation: swipe 0.9s 0.7s cubic-bezier(.6, 0, .2, 1) forwards;
}
@keyframes swipe { to { background-size: 100% 100%; } }

/* Logo: the "what you keep" bar stretches on hover */
.brand-mark .bar-keep { transform-box: fill-box; transform-origin: left center; transition: transform 0.4s cubic-bezier(.3, 1.5, .5, 1); }
.brand:hover .bar-keep { transform: scaleX(1.65); }

/* Buttons press in, arrows nudge */
.btn { transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.12s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn-arrow .arrow { transition: transform 0.2s ease; }
.btn-arrow:hover .arrow { transform: translateX(3px); }

/* Yes / No: a thumb that slides between the options */
.seg { position: relative; }
.seg::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: 6px; box-shadow: var(--shadow-xs);
  transition: transform 0.28s cubic-bezier(.3, .8, .2, 1);
}
.seg:has(label:nth-child(2) input:checked)::before { transform: translateX(100%); }
.seg label { z-index: 1; }

/* Results */
.keep-value { transition: color 0.3s; }

/* FAQ answers slide open (in browsers that support it) */
.faq details::details-content {
  height: 0; overflow: clip;
  transition: height 0.3s ease, content-visibility 0.3s allow-discrete;
}
.faq details[open]::details-content { height: auto; }

/* Pro preview demo */
.preview tbody td { transition: background-color 0.5s; }
.preview tr.is-fixing td { background: #FFFAEB; }
.pill.pop { animation: pop 0.45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(0.6); opacity: 0.2; } }

/* Pro table */
.sheet-table tr.is-new { animation: row-in 0.35s ease-out; }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }
.sheet-table tr.is-leaving { animation: row-out 0.2s ease-in forwards; }
@keyframes row-out { to { opacity: 0; transform: translateX(12px); } }

/* Tick that draws itself */
.tick-draw { width: 20px; height: 20px; vertical-align: -5px; margin-right: 8px; fill: none; stroke: var(--pos); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tick-draw circle { stroke-dasharray: 57; stroke-dashoffset: 57; animation: draw 0.5s ease-out forwards; }
.tick-draw path { stroke-dasharray: 14; stroke-dashoffset: 14; animation: draw 0.3s 0.4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Toast and dialog */
.toast:not([hidden]) { animation: toast-in 0.25s cubic-bezier(.2, .8, .2, 1); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.dialog[open] { animation: dialog-in 0.22s cubic-bezier(.2, .8, .2, 1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0ms !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  mark.swipe { background-size: 100% 100%; }
}


/* ==========================================================================
   Colour and extra motion
   ========================================================================== */

/* A soft drifting glow behind the top of the page */
main { position: relative; isolation: isolate; }
.glow { position: absolute; inset: 0 0 auto 0; height: 760px; overflow: hidden; pointer-events: none; z-index: -1; }
.glow::before, .glow::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
}
.glow::before {
  width: 620px; height: 420px; right: -80px; top: -120px;
  background: radial-gradient(closest-side, #D1E9FF, transparent);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.glow::after {
  width: 520px; height: 380px; left: -140px; top: 160px;
  background: radial-gradient(closest-side, #FDE7D7, transparent);
  animation: drift-b 26s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(-90px, 60px) scale(1.08); } }
@keyframes drift-b { to { transform: translate(110px, -40px) scale(0.95); } }
.calc { position: relative; }

/* Reading progress along the top of the screen */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #53B1FD); transform-origin: left; transform: scaleX(0); }

/* "+42p" chips beside the result */
.keep-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.delta {
  font: 650 0.85rem/1 var(--sans); padding: 5px 8px; border-radius: 99px; margin-bottom: 8px;
  font-variant-numeric: tabular-nums; opacity: 0; pointer-events: none;
}
.delta.up { color: var(--pos); background: var(--pos-bg); }
.delta.down { color: var(--neg); background: var(--neg-bg); }
.delta.show { animation: delta 1.6s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes delta {
  0% { opacity: 0; transform: translateY(8px); }
  15%, 70% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* New lines in the breakdown flash in */
.ledger tr.is-new th, .ledger tr.is-new td { animation: line-in 1.2s ease-out; }
@keyframes line-in { 0% { background: var(--brand-soft); opacity: 0; } 20% { opacity: 1; } 100% { background: transparent; } }

/* Lists and tables appear row by row */
.js [data-stagger] > * { opacity: 0; transform: translateY(6px); }
.is-in [data-stagger] > *, [data-stagger].is-in > * { animation: stagger-in 0.5s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 70ms + 150ms) forwards; }
@keyframes stagger-in { to { opacity: 1; transform: none; } }
.js:not(.motion-ready) [data-stagger] > * { animation: show-anyway 0.4s 3s forwards; }

/* Ticks at the top draw themselves in */
.facts li { opacity: 0; animation: fact-in 0.5s cubic-bezier(.2, .7, .2, 1) forwards; }
.facts li:nth-child(1) { animation-delay: 350ms; }
.facts li:nth-child(2) { animation-delay: 450ms; }
.facts li:nth-child(3) { animation-delay: 550ms; }
.facts li:nth-child(4) { animation-delay: 650ms; }
@keyframes fact-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.facts path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: draw 0.4s ease-out forwards; }
.facts li:nth-child(1) path { animation-delay: 550ms; }
.facts li:nth-child(2) path { animation-delay: 650ms; }
.facts li:nth-child(3) path { animation-delay: 750ms; }
.facts li:nth-child(4) path { animation-delay: 850ms; }

/* Cards lift a little on hover */
.preview, .example, .plan { transition: transform 0.25s cubic-bezier(.2, .7, .2, 1), box-shadow 0.25s; }
@media (hover: hover) {
  .preview:hover, .plan:hover { transform: translateY(-3px); box-shadow: 0 20px 24px -6px rgb(16 24 40 / 0.1), 0 6px 8px -4px rgb(16 24 40 / 0.04); }
  .example:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
}

/* Primary call to action gets a gentle sheen on hover */
.btn-accent { position: relative; overflow: hidden; }
.btn-accent::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.22) 50%, transparent 70%);
}
.btn-accent:hover::after { transition: transform 0.7s ease; transform: translateX(120%); }

@media (prefers-reduced-motion: reduce) {
  .glow::before, .glow::after { animation: none; }
  .js [data-stagger] > *, .facts li { opacity: 1; transform: none; }
  .facts path { stroke-dashoffset: 0; }
  .delta { display: none; }
}


/* "What if you charged..." slider */
.whatif { margin-top: 20px; padding: 16px 16px 12px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--paper); }
.whatif-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.whatif label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.whatif output { font: 650 1.05rem var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.whatif-track { position: relative; margin-top: 12px; }
.whatif input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 8px 0; border-radius: 99px; cursor: pointer;
  --stop: calc(11px + (100% - 22px) * var(--bef, 0.3));
  background: linear-gradient(90deg, #FECDCA 0 var(--stop), #D1E9FF var(--stop) 100%);
}
.whatif input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid var(--rule-2); box-shadow: 0 1px 3px rgb(16 24 40 / 0.2);
  transition: transform 0.15s;
}
.whatif input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--rule-2); box-shadow: 0 1px 3px rgb(16 24 40 / 0.2); }
.whatif input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.whatif input[type="range"]:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 6px; }
.whatif-be {
  position: absolute; top: 0; left: calc(11px + (100% - 22px) * var(--bef, 0.3)); transform: translateX(-50%); width: 2px; height: 22px; margin-top: 0;
  background: var(--ink-3); border-radius: 2px; pointer-events: none;
}
.whatif-scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.whatif-scale b { font-weight: 600; color: var(--ink-2); }

/* Example fee alert email */
.mail {
  margin-top: 28px; max-width: 440px; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg); transition: transform 0.3s cubic-bezier(.2, .7, .2, 1);
}
@media (hover: hover) { .mail:hover { transform: rotate(0deg) translateY(-2px); } }
.mail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.8rem; color: var(--ink-3); }
.mail-from { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.mail-from svg { width: 18px; height: 18px; border-radius: 4px; }
.mail-new { display: inline-flex; align-items: center; gap: 6px; }
.mail-new::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(46 144 250 / 0.5); } 80%, 100% { box-shadow: 0 0 0 7px rgb(46 144 250 / 0); } }
.mail-subject { margin-top: 10px; font-weight: 650; font-size: 0.95rem; color: var(--ink); }
.mail-body { margin-top: 4px; font-size: 0.875rem; color: var(--ink-2); }
.mail-tag { display: inline-block; margin-top: 10px; font-size: 0.75rem; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); padding: 3px 8px; border-radius: 99px; }
@media (prefers-reduced-motion: reduce) { .mail { transform: none; } .mail-new::before { animation: none; } }


/* ==========================================================================
   Charts
   ========================================================================== */

.chart-title { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }

/* Donut: where the buyer's money goes */
.share { margin: 24px 0 0; }
.share-body { display: flex; align-items: center; gap: 24px; margin-top: 12px; }
.donut-wrap { position: relative; width: 132px; height: 132px; flex: none; }
.donut { width: 100%; height: 100%; display: block; }
.donut-track { stroke: var(--rule); }
.donut [data-seg] { transition: stroke-dasharray 0.7s cubic-bezier(.2, .7, .2, 1), stroke-dashoffset 0.7s cubic-bezier(.2, .7, .2, 1); }
.donut-centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.donut-centre b { font: 650 1.45rem var(--display); letter-spacing: -0.03em; color: var(--ink); }
.donut-centre span { font-size: 0.72rem; color: var(--ink-3); margin-top: 2px; }
.donut-wrap.is-loss .donut-centre b { color: var(--neg); font-size: 1.1rem; }
.share-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: grid; gap: 2px; }
.share-legend li {
  display: grid; grid-template-columns: 10px 1fr auto 3.2em; align-items: center; gap: 10px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 6px; font-size: 0.875rem; color: var(--ink-2);
  transition: background-color 0.15s;
}
.share-legend li:hover { background: var(--paper); }
.share-legend i { width: 10px; height: 10px; border-radius: 3px; }
.share-legend b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.share-legend em { font-style: normal; color: var(--ink-3); font-size: 0.8rem; text-align: right; font-variant-numeric: tabular-nums; }
.share:has(li[data-key="fees"]:hover) [data-seg]:not([data-seg="fees"]),
.share:has(li[data-key="costs"]:hover) [data-seg]:not([data-seg="costs"]),
.share:has(li[data-key="keep"]:hover) [data-seg]:not([data-seg="keep"]) { opacity: 0.25; }
.donut [data-seg] { transition-property: stroke-dasharray, stroke-dashoffset, opacity; }
@media (max-width: 400px) { .share-body { flex-direction: column; align-items: stretch; } .donut-wrap { margin: 0 auto; } }

/* Profit at every price */
.whatif-hint { font-size: 0.775rem; color: var(--ink-3); margin-top: 2px; }
.pc-wrap { position: relative; margin-top: 10px; }
.pc-box { height: 132px; cursor: crosshair; touch-action: pan-y; }
.profit-chart { display: block; overflow: visible; }
.pc-zero { stroke: var(--rule-2); stroke-width: 1; }
.pc-grid { stroke: var(--rule); stroke-width: 1; }
.pc-axis { font: 500 10px var(--sans); fill: var(--ink-3); }
.pc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pc-be { stroke: var(--ink-3); stroke-width: 1; opacity: 0.5; }
.pc-hover { stroke: var(--ink-2); stroke-width: 1; }
.pc-hover-dot { fill: var(--ink); stroke: #fff; stroke-width: 2; }
.pc-dot { fill: var(--brand); stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 1px 2px rgb(16 24 40 / 0.25)); transition: cx 0.25s ease, cy 0.25s ease; }
.pc-dot.is-loss { fill: #F04438; }
.pc-tip {
  position: absolute; top: 0; transform: translate(-50%, -100%); z-index: 2; white-space: nowrap; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 0.78rem; box-shadow: var(--shadow-lg);
}
.pc-tip b { font-weight: 650; }

/* Pro: margin by product */
.mb { padding: 20px; border-bottom: 1px solid var(--rule); }
.mb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mb-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.775rem; color: var(--ink-3); list-style: none; margin: 0; padding: 0; }
.mb-legend li { display: flex; align-items: center; gap: 6px; }
.mb-legend i { width: 8px; height: 8px; border-radius: 2px; }
.mb-plot { --name: 150px; --val: 56px; --gap: 12px; position: relative; padding-top: 20px; }
@media (max-width: 560px) { .mb-plot { --name: 96px; } }
.mb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mb-row { display: grid; grid-template-columns: var(--name) 1fr var(--val); gap: var(--gap); align-items: center; min-height: 28px; font-size: 0.85rem; }
.mb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.mb-track { position: relative; height: 14px; }
.mb-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; transition: width 0.7s cubic-bezier(.2, .7, .2, 1), left 0.7s cubic-bezier(.2, .7, .2, 1); }
.mb-row.is-ok .mb-bar { background: #17B26A; }
.mb-row.is-warn .mb-bar { background: #F79009; }
.mb-row.is-bad .mb-bar { background: #F04438; }
.mb-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.mb-row.is-bad .mb-value { color: var(--neg); }
.mb-target, .mb-zero {
  position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;
  left: calc(var(--name) + var(--gap) + (100% - var(--name) - var(--val) - var(--gap) * 2) * var(--atf));
}
.mb-zero { border-left: 1px solid var(--rule-2); top: 20px; }
.mb-target { border-left: 1.5px solid var(--ink); transition: left 0.5s cubic-bezier(.2, .7, .2, 1); }
.mb-target span {
  position: absolute; top: 0; left: 0; transform: translateX(-50%); white-space: nowrap;
  font-size: 0.72rem; font-weight: 600; color: var(--ink); background: var(--paper); padding: 0 4px;
}
.mb-empty { font-size: 0.875rem; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .donut [data-seg], .mb-bar, .mb-target, .pc-dot { transition: none; }
}

.mb-mini { padding: 14px 16px 12px; background: var(--paper); }
.mb-mini .mb-plot { --name: 128px; --val: 48px; }
.mb-mini .mb-row { min-height: 22px; font-size: 0.78rem; }
.mb-mini .mb-track { height: 10px; }


/* ==========================================================================
   UK first
   ========================================================================== */

.uk-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px;
  background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow-xs);
  font-size: 0.8rem; font-weight: 600; color: var(--ink-2);
}
.uk-badge img { width: 20px; height: 10px; border-radius: 2px; box-shadow: 0 0 0 1px rgb(16 24 40 / 0.08); }
.brand-flag { width: 18px; height: 9px; border-radius: 2px; box-shadow: 0 0 0 1px rgb(16 24 40 / 0.08); margin-left: 2px; }

.uk-section { padding: 0 0 88px; }
.uk-grid { display: grid; gap: 32px 64px; align-items: center; }
@media (min-width: 960px) { .uk-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.uk-copy h2 { margin-top: 16px; max-width: 14ch; }
.uk-copy > p:not(.uk-badge) { color: var(--ink-2); margin-top: 14px; max-width: 46ch; }

.compare { border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: clip; background: var(--paper); box-shadow: var(--shadow-lg); }
.compare table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare th, .compare td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--rule); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); background: var(--canvas); }
.compare thead th.ours { color: var(--brand-text); background: var(--brand-soft); }
.compare tbody th { font-weight: 600; color: var(--ink); width: 34%; }
.compare td { color: var(--ink-3); }
.compare td.ours { color: var(--ink); font-weight: 600; background: var(--brand-softer); }
.compare td span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; margin-right: 8px; vertical-align: -4px; }
.compare td span svg { width: 11px; height: 11px; }
.compare .no { background: var(--canvas); color: var(--ink-3); }
.compare .yes { background: var(--brand); color: #fff; }
@media (max-width: 560px) {
  .compare th, .compare td { padding: 11px 10px; font-size: 0.82rem; }
  .compare td span { display: none; }
}
