/* ==========================================================================
   Truesum components · v1.1 · 4 December 2026
   Needs tokens.css first. Every class starts with ts- and there are no bare
   element rules outside html.ts, so this file can load next to the hero's own
   inline CSS without changing a pixel of it.

   States are keyed to real state (:hover, :focus-visible, :active, :disabled,
   :checked, [aria-busy], [aria-invalid], [aria-expanded], [aria-current]).
   Each pseudo-class has a force class (.is-hover, .is-focus, .is-active) so the
   styleguide can show every state at rest. Don't use the force classes on pages.

   Contents
    1. Base (opt-in: <html class="ts">)     9. Forms: fields, money, select
    2. Layout and surfaces                 10. Choices: radio cards, checkbox
    3. Type                                11. Upload: drop zone, file rows
    4. Links                               12. Steps and progress
    5. Buttons                             13. Validation: error summary
    6. Example tag, placeholder marker     14. True-cost result table
    7. Figures and the highlight           15. Header, menu  16. Footer
    8. Cards: solid and glass              17. FAQ, section head, comparison,
                                               callouts, alerts, toasts, sticky bar
   ========================================================================== */


/* 1. Base: only for pages that opt in with <html class="ts"> ----------------- */
html.ts {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 24px);      /* WCAG 2.4.11: focus never hides under the fixed header */
  scroll-padding-bottom: 96px;                         /* ...or under the phone sticky bar */
  color-scheme: light;
}
html.ts *, html.ts *::before, html.ts *::after { box-sizing: border-box; }
/* :where() keeps these at zero specificity: a page's own body and focus rules (the hero's) win. */
:where(html.ts body) {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Zero specificity, so any single ts- class overrides these resets. */
:where(html.ts) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
:where(html.ts ul[class], html.ts ol[class]) { padding: 0; list-style: none; }
:where(html.ts) :where(img, svg, video) { display: block; max-width: 100%; }
:where(html.ts) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(html.ts :focus-visible) { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-off); }
:where(html.ts) [hidden] { display: none !important; }

.ts-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ts-nowrap { white-space: nowrap; }         /* use for "APR-equivalent": neither font has the U+2011 hyphen */
.ts-num { font-variant-numeric: var(--num); }

.ts-skip {
  position: absolute; left: 12px; top: -80px; z-index: var(--z-skip);
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 16px; border-radius: var(--r-sm);
  background: var(--lime); color: var(--ledger);
  font: 600 15px/1 var(--font-body); text-decoration: none;
}
.ts-skip:focus, .ts-skip.is-focus { top: 12px; outline: var(--focus-w) solid var(--ledger); outline-offset: 2px; }


/* 2. Layout and surfaces ------------------------------------------------------ */
.ts-wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--m); }
.ts-section { padding-block: var(--section-y); background: var(--bg); color: var(--fg); }
.ts-surface-paper { --bg: var(--paper); background: var(--paper); color: var(--fg); }
.ts-surface-paper-2 { --bg: var(--paper-2); background: var(--paper-2); color: var(--fg); }
.ts-surface-white { --bg: var(--white); background: var(--white); color: var(--fg); }
.ts-surface-ledger { --bg: var(--ledger); background: var(--ledger); color: var(--fg); }
.ts-rule { height: 1px; border: 0; margin: 0; background: var(--line-strong); }


/* Focus inside any ts- ground follows that ground (Ledger on light, lime on dark), even on a page
   whose own global :focus-visible is lime (the hero). Component focus rules come later and win. */
:is(.ts-surface-paper, .ts-surface-paper-2, .ts-surface-white, .ts-surface-ledger, .ts-light, .ts-dark, [data-surface], .ts-card, .ts-glass, .ts-header, .ts-footer, .ts-menu, .ts-flowbar, .ts-sticky, .ts-toast) :focus-visible {
  outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-off);
}

/* 3. Type ----------------------------------------------------------------------
   Display and H1-H3: Figtree 800. H4 and below: Inter 600. Sentence case only:
   no uppercase, no tracked caps, no eyebrow pills. */
.ts-display, .ts-h1, .ts-h2, .ts-h3 { font-family: var(--font-display); font-weight: 800; color: var(--fg-heading); text-wrap: balance; }
.ts-display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
.ts-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
.ts-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
.ts-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.ts-h4 { font: 600 var(--fs-h4)/var(--lh-h4) var(--font-body); color: var(--fg); }
.ts-lead { font: 400 var(--fs-lead)/var(--lh-lead) var(--font-body); color: var(--fg-muted); max-width: 30em; text-wrap: pretty; }
.ts-body { font: 400 var(--fs-body)/var(--lh-body) var(--font-body); color: var(--fg-muted); max-width: var(--measure); text-wrap: pretty; }
.ts-small { font: 400 var(--fs-small)/var(--lh-small) var(--font-body); color: var(--fg-muted); }
.ts-caption { font: 400 var(--fs-caption)/var(--lh-caption) var(--font-body); color: var(--fg-subtle); }
.ts-strong { color: var(--fg); font-weight: 600; }
.ts-muted { color: var(--fg-muted); }
.ts-prose { font: 400 var(--fs-body-lg)/1.6 var(--font-body); color: var(--fg-muted); max-width: var(--measure); }
.ts-prose > * + * { margin-top: 1em; }
.ts-prose strong { color: var(--fg); font-weight: 600; }


/* 4. Links ---------------------------------------------------------------------- */
.ts-link {
  color: var(--link); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  transition: text-decoration-color var(--dur-fast) ease, text-decoration-thickness var(--dur-fast) ease;
  border-radius: 2px;
}
.ts-link:hover, .ts-link.is-hover { color: var(--link-hover); text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.ts-link:focus-visible, .ts-link.is-focus { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; text-decoration: none; }
/* A standalone link (not inside a sentence) gets the full 44px target. Inline-block, not flex,
   so spaces before nested spans (.ts-nowrap) survive. */
.ts-link--solo { display: inline-block; min-height: var(--target); padding: 11px 0; }
.ts-link--solo svg { display: inline-block; width: 16px; height: 16px; margin-left: 8px; vertical-align: -2px; transition: transform var(--dur-press) ease-out; }
.ts-link--solo:hover svg, .ts-link--solo.is-hover svg { transform: translateX(3px); }


/* 5. Buttons -------------------------------------------------------------------
   Primary: the filled button. Its fill follows the surface: Lime with a Ledger label
   on Ledger (9.75:1), as in the hero; Ledger with a Paper label on Paper and white
   (11.25:1). One per view, plus its repeat in the header or sticky bar.
   Secondary: outline. Text: quiet, underlined on hover.
   Path: the hero's two-line button that names who it is for.
   Sizes: default 56 (hero), --md 50 (sticky bar, dense forms), --sm 44 (header). */
.ts-btn {
  --btn-bg: var(--primary-bg);
  --btn-fg: var(--primary-fg);
  --btn-line: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--ctl-h); padding: 0 24px 0 26px;
  border: 0; border-radius: var(--r-btn);
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: inset 0 0 0 1.5px var(--btn-line);
  font: 600 17px/1.2 var(--font-body); letter-spacing: 0;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-press) ease-out, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, color var(--dur-fast) ease;
}
.ts-btn svg { width: 18px; height: 18px; flex: none; }
.ts-btn__arrow { transition: transform var(--dur-press) ease-out; }
.ts-btn:hover, .ts-btn.is-hover { --btn-bg: var(--primary-hover); }
.ts-btn:hover .ts-btn__arrow, .ts-btn.is-hover .ts-btn__arrow,
.ts-btn:focus-visible .ts-btn__arrow, .ts-btn.is-focus .ts-btn__arrow { transform: translateX(3px); }
.ts-btn:focus-visible, .ts-btn.is-focus { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-off); }
.ts-btn:active, .ts-btn.is-active { --btn-bg: var(--primary-press); transform: scale(.98); }

/* Secondary: outline (hero .btn-alt) */
.ts-btn--secondary { --btn-bg: transparent; --btn-fg: var(--outline-fg); --btn-line: var(--outline-line); }
.ts-btn--secondary:hover, .ts-btn--secondary.is-hover { --btn-bg: var(--outline-hover-bg); --btn-line: var(--outline-hover-line); }
.ts-btn--secondary:active, .ts-btn--secondary.is-active { --btn-bg: var(--outline-hover-bg); --btn-line: var(--outline-hover-line); }

/* Text: low emphasis (Back, Skip, Remove). Underline on hover. */
.ts-btn--text { --btn-bg: transparent; --btn-fg: var(--link); min-height: var(--target); min-width: var(--target); padding: 0 6px; gap: 8px; font-size: 16px; border-radius: 8px; }
.ts-btn--text:hover, .ts-btn--text.is-hover { --btn-bg: transparent; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .22em; }
.ts-btn--text:active, .ts-btn--text.is-active { --btn-bg: var(--tint); }
.ts-btn--text svg { width: 16px; height: 16px; }

/* Path: two lines, the first says who it is for (hero .btn.path) */
.ts-btn--path { max-width: 100%; min-height: 62px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 10px 22px 11px 20px; text-align: left; white-space: normal; }
.ts-btn__who { font: 500 12.5px/1.2 var(--font-body); opacity: .78; }
.ts-btn--secondary .ts-btn__who { opacity: .85; }
.ts-btn__do { display: inline-flex; align-items: center; gap: 10px; font: 600 17px/1.2 var(--font-body); }

/* Sizes and width */
.ts-btn--md { min-height: var(--ctl-h-md); padding: 0 20px 0 22px; font-size: 16px; border-radius: var(--r-input); gap: 10px; }
.ts-btn--sm { min-height: var(--ctl-h-sm); padding: 0 18px; font-size: 15px; border-radius: var(--r-input); gap: 8px; }
.ts-btn--sm svg { width: 16px; height: 16px; }
.ts-btn--block { display: flex; width: 100%; }

/* Disabled: never a faded lime (it reads as broken). A neutral fill instead. */
.ts-btn:disabled, .ts-btn[aria-disabled="true"] {
  --btn-bg: var(--muted-btn-bg); --btn-fg: var(--fg-disabled); --btn-line: transparent;
  cursor: not-allowed; transform: none;
}
.ts-btn:disabled .ts-btn__arrow, .ts-btn[aria-disabled="true"] .ts-btn__arrow { transform: none; }
.ts-btn--text:disabled, .ts-btn--text[aria-disabled="true"] { --btn-bg: transparent; text-decoration: none; }

/* Loading: keeps its size and label; a spinner takes the arrow's place.
   Announce the wait in a live region on the page, not inside the button. */
.ts-btn__spin { display: none; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ts-spin .8s linear infinite; }
.ts-btn[aria-busy="true"] { cursor: progress; pointer-events: none; }
.ts-btn[aria-busy="true"] .ts-btn__arrow { display: none; }
.ts-btn[aria-busy="true"] .ts-btn__spin { display: inline-block; }
@keyframes ts-spin { to { transform: rotate(360deg); } }

/* Icon-only button (menu, close): 44x44 */
.ts-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--target); height: var(--target); padding: 0; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--fg); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) ease;
}
.ts-icon-btn svg { width: 24px; height: 24px; }
.ts-icon-btn:hover, .ts-icon-btn.is-hover { background: var(--tint); }
.ts-icon-btn:focus-visible, .ts-icon-btn.is-focus { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }

/* Button groups */
.ts-btns { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
@media (max-width: 639px) {
  .ts-btns--stack-sm { flex-direction: column; }
  .ts-btns--stack-sm > .ts-btn { width: 100%; }
}


/* 6. Example tag and placeholder marker -------------------------------------------
   "Example" is a bold word, never a pill (the founder rejected chip pills). Every
   example figure sits under one. The --tag form is a small squared tag (the hero's
   ticket uses it) for places with no sentence to sit in. */
.ts-eg { font: 500 var(--fs-micro)/1.3 var(--font-body); color: var(--fg-muted); }
.ts-eg b, .ts-eg strong { font-weight: 700; color: var(--fg-heading); }
.ts-eg--tag { display: inline-block; padding: 4px 7px; border-radius: var(--r-xs); background: var(--tag-bg); color: var(--fg-heading); font-weight: 600; }

/* Placeholder marker: any fact we don't have yet (company number, regulatory status,
   file limits). Write the strategy deck's marker inside it, [[TBC: what — who]], so
   the copy lint finds it too. Hatched and dashed, so nobody mistakes it for copy.
   Before launch: document.querySelectorAll('.ts-ph').length must be 0. */
.ts-ph {
  font-style: normal; color: inherit;
  background: var(--ph-bg);
  border-bottom: 1.5px dashed currentColor; border-radius: var(--r-xs);
  padding: 0 3px;
}


/* 7. Figures and the highlight ------------------------------------------------------
   Figures: Figtree 800, tabular lining, Ink on light (Paper on dark).
   The highlight (.ts-mark): the one lime bar per view, slanted at the wordmark's lean,
   behind the one figure that matters (the true sum). Ink stays on top: 13.94:1. */
.ts-fig { font-family: var(--font-display); font-weight: 800; letter-spacing: var(--ls-fig); line-height: 1.05; color: var(--fg); font-variant-numeric: var(--num); }
.ts-fig--xl { font-size: var(--fs-fig-xl); line-height: 1; letter-spacing: -.03em; }
.ts-fig--l { font-size: var(--fs-fig-l); }
.ts-fig--m { font-size: var(--fs-fig-m); }
.ts-fig--s { font-size: var(--fs-fig-s); letter-spacing: -.01em; line-height: 1; }
/* "about": write the space inside the prefix, <span class="ts-fig__pre">about </span>, so the text reads
   "about 100.0%" for copy-paste and screen readers (the hero does the same). */
.ts-fig__pre { font: 500 max(14px, .34em)/1 var(--font-body); letter-spacing: 0; color: var(--fg-muted); }
.ts-fig__unit { font-size: .62em; letter-spacing: -.01em; margin-left: .04em; }                                                    /* % */
/* The bar's slant overhangs its left edge by about .09em: keep clear of a preceding "about". */
:is(.ts-fig__pre, .ts-result__pre) + .ts-mark { margin-left: .14em; }

.ts-mark {
  --mark: 1;
  position: relative; isolation: isolate; display: inline-block;
  padding: 0 .14em 0 .08em; margin-left: -.08em;
  color: var(--ink); white-space: nowrap;
}
.ts-mark::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: .06em; bottom: .02em;
  background: var(--lime); border-radius: var(--r-hl);
  transform: skewX(var(--lean)) scaleX(var(--mark)); transform-origin: 0 50%;
}
/* Sweep in once when it enters the view (components.js adds .is-swept). Hidden only once the
   script has started (html.ts-js), so the highlight is always drawn if the script never runs. */
html.ts-js .ts-mark[data-sweep]:not(.is-swept) { --mark: 0; }
.ts-mark[data-sweep]::before { transition: transform var(--dur-pen) var(--ease-pen); }
@media (prefers-reduced-motion: reduce) { html.ts-js .ts-mark[data-sweep]:not(.is-swept) { --mark: 1; } .ts-mark[data-sweep]::before { transition: none; } }
@media (forced-colors: active) { .ts-mark::before { display: none; } .ts-mark { text-decoration: underline 3px; color: CanvasText; } }
@media print { .ts-mark::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }


/* 8. Cards: solid and glass ---------------------------------------------------------
   .ts-card: solid white, for Paper and white sections (nothing behind it to blur).
   .ts-glass: the hero's white frosted glass, only over photographs or Ledger imagery.
   Both are always light inside, and share one anatomy (the hero's). */
.ts-card, .ts-glass { --bg: var(--white); position: relative; border-radius: var(--r-card); color: var(--fg); }   /* light tokens: tokens.css */
.ts-glass { --fg-muted: rgba(14, 26, 20, .8); --fg-subtle: rgba(14, 26, 20, .74); --line: rgba(14, 26, 20, .14); --line-strong: rgba(14, 26, 20, .2); }   /* over photos: stronger, as the hero */
.ts-card { background: var(--white); padding: 22px 24px 24px; box-shadow: var(--sh-card); outline: 1px solid rgba(14, 26, 20, .06); outline-offset: -1px; }
.ts-card--flat { box-shadow: none; outline-color: var(--line-strong); }
.ts-card--raised { box-shadow: var(--sh-raised); }
.ts-card--lg { border-radius: var(--r-panel); padding: clamp(24px, 3vw, 40px); }

.ts-glass {
  padding: 15px 18px 16px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--sh-glass);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ts-glass { background: var(--glass-fallback); }
}
@media (prefers-reduced-transparency: reduce) { .ts-glass { background: var(--glass-fallback); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (max-width: 639px) { .ts-card, .ts-glass { border-radius: var(--r-card-sm); } .ts-glass { padding: 12px 14px 13px; } }

/* Card anatomy (hero: .c-top .c-get .c-label .c-fig .c-foot) */
.ts-card__top { font: 500 var(--fs-micro)/1.3 var(--font-body); color: var(--fg-muted); }
.ts-card__top b { font-weight: 700; color: var(--ledger); }
.ts-card__get { margin-top: 8px; font: 500 15px/1.3 var(--font-body); color: rgba(14, 26, 20, .82); }
.ts-card__get strong { margin-left: 3px; font: 800 var(--fs-fig-s)/1 var(--font-display); letter-spacing: -.01em; color: var(--ink); font-variant-numeric: var(--num); }
.ts-card__label { margin-top: 8px; font: 500 14px/1.3 var(--font-body); color: rgba(14, 26, 20, .82); }
.ts-card__fig { margin-top: 4px; }
.ts-card__foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font: 400 var(--fs-caption)/var(--lh-caption) var(--font-body); color: rgba(14, 26, 20, .8); }
.ts-card__title { font: 800 var(--fs-h3)/var(--lh-h3) var(--font-display); letter-spacing: var(--ls-h3); color: var(--ledger); }
.ts-card__text { margin-top: 8px; font: 400 var(--fs-body)/var(--lh-body) var(--font-body); color: var(--fg-muted); }

/* Rising in (once): add data-ts-rise; components.js adds .is-in when it scrolls into view. */
[data-ts-rise] { opacity: 0; translate: 0 var(--rise-by); transition: opacity var(--dur-rise) var(--ease-out), translate var(--dur-rise) var(--ease-out); }
[data-ts-rise].is-in { opacity: 1; translate: 0 0; }
html:not(.ts-js) [data-ts-rise] { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) { [data-ts-rise] { opacity: 1; translate: none; transition: none; } }


/* 9. Forms: fields, money input, select, textarea ---------------------------------------
   Label above, hint under the label, the control, then the error. Mark the optional
   fields "(optional)"; required is the default and gets no asterisk.
   Controls are 56px tall, with 17px text (no zoom on iPhone). Edges are 3:1. */
.ts-field { display: grid; gap: 8px; max-width: var(--form-w); }
.ts-field + .ts-field { margin-top: 24px; }
.ts-label { font: 600 15px/1.35 var(--font-body); color: var(--fg); }
.ts-label__opt { font-weight: 400; color: var(--fg-subtle); }
.ts-hint { margin-top: -2px; font: 400 var(--fs-small)/var(--lh-small) var(--font-body); color: var(--fg-subtle); }
/* Text after the icon goes in one <span> (flex would drop spaces around nested spans). */
.ts-field__error { display: flex; align-items: flex-start; gap: 8px; font: 500 var(--fs-small)/var(--lh-small) var(--font-body); color: var(--error); }
.ts-field__error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.ts-input, .ts-select select, .ts-textarea {
  display: block; width: 100%; min-height: var(--ctl-h); margin: 0; padding: 0 16px;
  border: 1.5px solid var(--line-control); border-radius: var(--r-input);
  background: var(--field-bg); color: var(--field-fg);
  font: 400 var(--fs-body-lg)/1.3 var(--font-body);
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.ts-textarea { min-height: 128px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.ts-input::placeholder, .ts-textarea::placeholder { color: var(--field-placeholder); opacity: 1; }
.ts-input:hover, .ts-input.is-hover, .ts-select select:hover, .ts-select.is-hover select, .ts-textarea:hover, .ts-textarea.is-hover { border-color: var(--line-control-hover); }
.ts-input:focus, .ts-input.is-focus, .ts-select select:focus, .ts-select.is-focus select, .ts-textarea:focus, .ts-textarea.is-focus {
  outline: none; border-color: var(--focus);
  box-shadow: inset 0 0 0 1px var(--focus), 0 0 0 4px var(--focus-soft);
}
.ts-input[aria-invalid="true"], .ts-select select[aria-invalid="true"], .ts-textarea[aria-invalid="true"] {
  border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error);
}
.ts-input[aria-invalid="true"]:focus, .ts-input[aria-invalid="true"].is-focus,
.ts-select select[aria-invalid="true"]:focus, .ts-textarea[aria-invalid="true"]:focus {
  box-shadow: inset 0 0 0 1px var(--error), 0 0 0 4px color-mix(in srgb, var(--error) 18%, transparent);
}
.ts-input:disabled, .ts-select select:disabled, .ts-textarea:disabled {
  background: var(--field-disabled-bg); border-color: var(--line-strong); color: var(--fg-disabled); cursor: not-allowed;
}
.ts-input:disabled::placeholder { color: var(--fg-disabled); }
.ts-input[readonly] { background: var(--tint); border-style: dashed; border-color: var(--line-strong); }
.ts-input:-webkit-autofill { -webkit-text-fill-color: var(--field-fg); box-shadow: inset 0 0 0 100px var(--field-bg); transition: background-color 9999s; }

/* Money: £ inside the field, tabular figures. type="text" inputmode="decimal";
   components.js adds thousands separators as you type. */
.ts-money { position: relative; display: block; }
.ts-money__cur, .ts-money__suffix { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; font: 500 var(--fs-body-lg)/1 var(--font-body); color: var(--fg-muted); }
.ts-money__cur { left: 17px; }
.ts-money__suffix { right: 16px; font-weight: 400; color: var(--fg-subtle); }
.ts-money .ts-input { padding-left: 35px; font-weight: 500; font-variant-numeric: var(--num); letter-spacing: .005em; }
.ts-money--suffix .ts-input { padding-right: 96px; }
/* Large: a single "How much…?" question on its own screen */
.ts-money--lg .ts-input { min-height: 76px; padding-left: 46px; font: 800 32px/1 var(--font-display); letter-spacing: -.02em; }
.ts-money--lg .ts-money__cur { left: 20px; font: 800 32px/1 var(--font-display); color: var(--fg-subtle); }

/* Select: the native element (keyboard, screen readers, phone pickers), restyled */
.ts-select { position: relative; display: block; }
.ts-select select { padding-right: 48px; cursor: pointer; }
.ts-select select:invalid { color: var(--field-placeholder); }        /* the "Choose…" option, with required + value="" */
.ts-select select option { color: var(--ink); }
.ts-select__chev { position: absolute; right: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; pointer-events: none; color: var(--fg-muted); }


/* 10. Choices: option rows (radio) and checkboxes ------------------------------------
   Real inputs, never divs. The whole row is the target (60px+). The mark sits on the
   right, as the eligibility flow built it. Selected: a 2px Ledger edge and a filled
   mark. No icon tiles. Wrap the group in <fieldset class="ts-choices"> with a
   <legend class="ts-label">. */
.ts-choices { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; max-width: var(--form-w); }
.ts-choices > legend { padding: 0; margin-bottom: 12px; }
.ts-choices > .ts-hint { margin: -4px 0 4px; }
.ts-choices--grid { max-width: none; }
@media (min-width: 640px) { .ts-choices--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ts-choices--grid > legend, .ts-choices--grid > .ts-hint, .ts-choices--grid > .ts-field__error { grid-column: 1 / -1; } }

.ts-choice {
  position: relative; display: flex; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 16px 14px 18px;
  border: 1px solid var(--line-choice); border-radius: var(--r-btn);
  background: var(--choice-bg); color: var(--fg);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.ts-choice__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ts-choice__title { font: 600 var(--fs-body-lg)/1.35 var(--font-body); color: var(--fg); }
.ts-choice__text { font: 400 var(--fs-small)/var(--lh-small) var(--font-body); color: var(--fg-subtle); }
.ts-choice:hover, .ts-choice.is-hover { border-color: var(--line-control-hover); }
.ts-choice:has(:focus-visible), .ts-choice.is-focus { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }
.ts-choice:has(:checked), .ts-choice.is-checked { border-color: var(--selected); box-shadow: inset 0 0 0 1px var(--selected); background: var(--choice-bg-on); }
.ts-choice:has(:disabled) { cursor: not-allowed; color: var(--fg-disabled); background: var(--field-disabled-bg); border-color: var(--line); }
.ts-choice:has(:disabled) .ts-choice__title, .ts-choice:has(:disabled) .ts-choice__text { color: var(--fg-disabled); }
.ts-choices.is-invalid .ts-choice { border-color: var(--error); }

/* The mark: the native input, restyled (22px; its edge is 3:1) */
.ts-choice__mark {
  flex: none; width: 22px; height: 22px; margin: 0;
  -webkit-appearance: none; appearance: none;
  border-radius: 50%; border: 1.5px solid var(--line-control); background: var(--field-bg);
  display: grid; place-content: center; cursor: inherit;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.ts-choice__mark:focus-visible { outline: none; }               /* the row shows the ring */
.ts-choice__mark:checked { border-color: var(--selected); background: radial-gradient(circle, var(--selected) 0 5.5px, var(--field-bg) 6px); }
.ts-choice__mark[type="checkbox"] { border-radius: 6px; }
.ts-choice__mark[type="checkbox"]:checked { background: var(--selected) var(--check-img) center / 18px no-repeat; }
.ts-choice__mark:disabled { border-color: var(--line-strong); }

/* A plain checkbox line (consent, "remember me"): mark on the left, no box around it */
.ts-check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--target); padding: 10px 0; cursor: pointer; font: 400 var(--fs-body)/1.5 var(--font-body); color: var(--fg); max-width: var(--form-w); }
.ts-check .ts-choice__mark { margin-top: 0; }
.ts-check:has(:focus-visible) .ts-choice__mark, .ts-check.is-focus .ts-choice__mark { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }


/* 11. Upload: drop zone and file rows ----------------------------------------------
   The zone is never the only way in: it always holds a real "Choose a file" control
   (WCAG 2.5.7: no dragging needed). The file input is visually hidden and the label
   is styled as the button, so it works without JavaScript. */
.ts-drop {
  position: relative; display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 32px 24px 28px; border-radius: var(--r-card);
  border: 1.5px dashed var(--line-control); background: var(--field-bg); color: var(--fg);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.ts-drop__icon { width: 36px; height: 36px; color: var(--fg-subtle); }
.ts-drop__title { font: 600 var(--fs-body-lg)/1.35 var(--font-body); color: var(--fg); }
.ts-drop__hint { max-width: 34em; font: 400 var(--fs-small)/var(--lh-small) var(--font-body); color: var(--fg-subtle); }
.ts-drop__file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ts-drop:hover, .ts-drop.is-hover { border-color: var(--line-control-hover); }
.ts-drop:has(.ts-drop__file:focus-visible) .ts-drop__btn, .ts-drop.is-focus .ts-drop__btn { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-off); }
.ts-drop.is-dragover { border-style: solid; border-color: var(--selected); box-shadow: inset 0 0 0 1px var(--selected); background: var(--selected-bg); }
.ts-drop.is-dragover .ts-drop__icon { color: var(--selected); }
.ts-drop.is-invalid { border-color: var(--error); }
.ts-drop:has(.ts-drop__file:disabled) { background: var(--field-disabled-bg); border-color: var(--line-strong); }
.ts-drop:has(.ts-drop__file:disabled) :is(.ts-drop__title, .ts-drop__hint, .ts-drop__icon) { color: var(--fg-disabled); }

.ts-files { display: grid; gap: 10px; margin-top: 12px; }
.ts-file {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 8px 12px 14px; border-radius: var(--r-btn);
  border: 1px solid rgba(14, 26, 20, .16); background: var(--white); color: var(--ink);
}
.ts-file__icon { width: 28px; height: 28px; color: var(--ledger); }
.ts-file__name { font: 600 15px/1.35 var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-file__meta { margin-top: 2px; font: 400 13.5px/1.4 var(--font-body); color: rgba(14, 26, 20, .64); }
.ts-file__bar { grid-column: 2 / 3; height: 4px; margin-top: 8px; border-radius: 2px; background: rgba(14, 26, 20, .1); overflow: hidden; }
.ts-file__bar > span { display: block; height: 100%; width: calc(var(--progress, 0) * 100%); background: var(--ledger); border-radius: inherit; transition: width .3s var(--ease-out); }
.ts-file__actions { display: flex; align-items: center; gap: 2px; }
.ts-file[data-state="done"] .ts-file__meta { color: var(--fern); }
.ts-file[data-state="error"] { border-color: var(--red); background: #FFFCFB; }
.ts-file[data-state="error"] .ts-file__icon, .ts-file[data-state="error"] .ts-file__meta { color: var(--red); }
.ts-file .ts-icon-btn { color: rgba(14, 26, 20, .72); }
.ts-file .ts-icon-btn svg { width: 20px; height: 20px; }


/* 12. Steps and progress ---------------------------------------------------------------
   Progress: "2 of 4" in words plus one thin bar (the eligibility flow).
   Steps: labelled segments for a flow with named stages (the offer check).
   No numbered badges and no ticks; done steps are filled segments. */
.ts-progress { display: grid; gap: 10px; }
.ts-progress__text { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font: 500 var(--fs-small)/1.3 var(--font-body); color: var(--fg-muted); font-variant-numeric: var(--num); }
.ts-progress__text b { font-weight: 600; color: var(--fg); }
.ts-progress__bar { height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.ts-progress__bar > span { display: block; height: 100%; width: calc(var(--value, 0) * 100%); border-radius: inherit; background: var(--selected); transition: width var(--dur-panel) var(--ease-out); }

.ts-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: ts-step; }
.ts-steps__item { counter-increment: ts-step; display: grid; gap: 10px; align-content: start; font: 500 var(--fs-small)/1.3 var(--font-body); color: var(--fg-subtle); }
.ts-steps__item::before { content: ""; height: 4px; border-radius: 2px; background: var(--line-strong); }
.ts-steps__label::before { content: counter(ts-step) "  "; white-space: pre; font-variant-numeric: var(--num); color: inherit; }
.ts-steps__item.is-done { color: var(--fg-muted); }
.ts-steps__item.is-done::before, .ts-steps__item[aria-current="step"]::before { background: var(--selected); }
.ts-steps__item[aria-current="step"] { color: var(--fg); font-weight: 600; }
@media (max-width: 639px) {
  .ts-steps__item:not([aria-current="step"]) .ts-steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ts-steps__item[aria-current="step"] { grid-column: span 1; }
  .ts-steps { row-gap: 10px; }
}


/* 13. Validation: the error summary ------------------------------------------------------
   On submit with errors: show this at the top of the form, move focus to it
   (tabindex="-1"), and link each line to its field. Errors never go in a toast. */
.ts-errors {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; max-width: var(--form-w);
  padding: 18px 20px 18px 18px; border-radius: var(--r-btn);
  border: 1.5px solid var(--error); background: var(--white); color: var(--ink);
}
.ts-errors:focus { outline: var(--focus-w) solid var(--focus); outline-offset: 3px; }
.ts-errors__icon { width: 22px; height: 22px; color: var(--red); margin-top: 1px; }
.ts-errors__title { font: 600 var(--fs-body-lg)/1.4 var(--font-body); color: var(--ink); }
.ts-errors__list { grid-column: 2; display: grid; gap: 0; margin: 2px 0 -6px; padding: 0; list-style: none; }
.ts-errors__list a { display: inline-block; min-height: var(--target); padding: 10px 0; font: 500 var(--fs-body)/1.45 var(--font-body); color: var(--red); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.ts-errors__list a:hover { text-decoration-thickness: 2px; }
.ts-errors__list a:focus-visible { outline: var(--focus-w) solid var(--ledger); outline-offset: 2px; border-radius: 2px; }


/* 14. The true-cost result ---------------------------------------------------------------
   Label left, figure right, one rule between rows, tabular figures. Order tells the
   story: what you receive, then the true sum (the one highlight), then what it costs.
   A <dl>: each row is a <div> with <dt>, the figure's <dd>, and an optional note as a
   second <dd class="ts-result__note"> that runs under the whole row. The rows work with or
   without the .ts-result wrapper.
   Put it in a .ts-card (Paper) or a .ts-glass (over a photo). */
.ts-result { display: grid; gap: 0; }
.ts-result__head { display: grid; gap: 8px; padding-bottom: 18px; }
.ts-result__title { font: 800 var(--fs-h3)/var(--lh-h3) var(--font-display); letter-spacing: var(--ls-h3); color: var(--fg-heading); }
.ts-result__rows { margin: 0; border-top: 1px solid var(--line-strong); }
.ts-result__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ts-result__row > dt { flex: 1 1 auto; }   /* a figure that doesn't fit beside its label drops to its own line, right-aligned */
.ts-result__row dt { font: 500 var(--fs-body)/1.4 var(--font-body); color: var(--fg); }
.ts-result__row > dd { margin: 0; }
.ts-result__row > dd:not(.ts-result__note) { flex: 0 0 auto; margin-left: auto; text-align: right; font: 800 22px/1.1 var(--font-display); letter-spacing: -.01em; color: var(--fg); font-variant-numeric: var(--num); white-space: nowrap; }
.ts-result__row > dd.ts-result__note { flex: 1 0 100%; margin-top: -1px; max-width: 40em; text-align: left; white-space: normal; font: 400 var(--fs-small)/var(--lh-small) var(--font-body); letter-spacing: 0; color: var(--fg-subtle); }
.ts-result__pre { font: 500 15px/1 var(--font-body); letter-spacing: 0; color: var(--fg-muted); }   /* "about ", the space inside */
.ts-result__row--key { padding: 22px 0 20px; align-items: center; }
.ts-result__row--key dt { font-weight: 600; font-size: var(--fs-body-lg); }
.ts-result__row--key > dd:not(.ts-result__note) { font-size: clamp(36px, 4.4vw, 56px); line-height: 1; letter-spacing: -.03em; }
.ts-result__row--muted > dd:not(.ts-result__note) { font: 600 var(--fs-body-lg)/1.2 var(--font-body); color: var(--fg-muted); }
.ts-result__foot { margin-top: 16px; font: 400 var(--fs-caption)/1.5 var(--font-body); color: var(--fg-subtle); max-width: 52em; }
.ts-result__foot b { color: var(--fg-muted); font-weight: 600; }
.ts-result--compact .ts-result__row { padding: 11px 0; }
.ts-result--compact .ts-result__row > dd:not(.ts-result__note) { font-size: 18px; }
.ts-result--compact .ts-result__row--key > dd:not(.ts-result__note) { font-size: 34px; }
@media (max-width: 479px) {
  .ts-result__row { gap: 2px 16px; }
  .ts-result__row--key > dd:not(.ts-result__note) { flex-basis: 100%; margin-left: 0; text-align: left; margin-top: 6px; }
}


/* 15. Header and menu ---------------------------------------------------------------------
   Always on Ledger. Default: sticky and solid. --overlay: fixed and transparent over the
   hero photo, solid Ledger after 8px of scroll or when the menu opens (components.js).
   Links are 44px targets; the current page is underlined. Below 1200px: menu button. */
.ts-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--ledger); color: var(--paper); transition: background-color var(--dur-base) ease, box-shadow var(--dur-base) ease; }
.ts-header__bar { display: flex; align-items: center; gap: 40px; height: var(--nav-h); max-width: var(--page-max); margin-inline: auto; padding-inline: var(--m); }
.ts-header__logo { flex: none; display: flex; align-items: center; min-height: var(--target); border-radius: 6px; }
.ts-header__logo img { height: 30px; width: auto; }
.ts-header__nav { margin-left: auto; }
.ts-header__nav ul { display: flex; gap: 34px; margin: 0; padding: 0; list-style: none; }
.ts-header__nav a { display: inline-block; min-height: var(--target); padding: 12px 0; color: var(--paper-85); font: 500 15px/20px var(--font-body); text-decoration: none; text-underline-offset: 8px; text-decoration-thickness: 1.5px; border-radius: 4px; }
.ts-header__nav a:hover, .ts-header__nav a.is-hover { color: var(--paper); text-decoration-line: underline; }
.ts-header__nav a[aria-current="page"] { color: var(--paper); text-decoration-line: underline; text-decoration-color: var(--paper-72); }
.ts-header__nav a:focus-visible, .ts-header__nav a.is-focus { outline: var(--focus-w) solid var(--focus); outline-offset: 4px; }
.ts-header__menu-btn { display: none; color: var(--paper); }
.ts-header__menu-btn .ts-i-close { display: none; }
.ts-header__menu-btn[aria-expanded="true"] .ts-i-menu { display: none; }
.ts-header__menu-btn[aria-expanded="true"] .ts-i-close { display: block; }
.ts-header--overlay { position: fixed; left: 0; right: 0; background: rgba(13, 59, 46, 0); }
/* The overlay header needs the page to darken the top of its photo (the hero's top scrim):
   put .ts-scrim-top inside the photo's container, above the photo. */
.ts-scrim-top { position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 170px; pointer-events: none; background: linear-gradient(180deg, rgba(13, 59, 46, .7) 0, rgba(13, 59, 46, .38) 80px, rgba(13, 59, 46, 0) 170px); }
.ts-header--overlay.is-solid, .ts-header.is-open { background: var(--ledger); }
.ts-header.is-scrolled, .ts-header.is-open { box-shadow: var(--sh-nav); }

.ts-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-menu); min-height: calc(100vh - var(--nav-h)); min-height: calc(100dvh - var(--nav-h)); max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--ledger); border-top: 1px solid var(--line); padding: 8px var(--m) 28px; box-shadow: 0 24px 40px rgba(4, 22, 15, .3); }
.ts-menu[hidden] { display: none; }
.ts-menu__cta { margin: 16px 0 8px; }
.ts-menu__paths { display: grid; gap: 10px; margin: 16px 0 14px; }
.ts-menu__paths .ts-btn--path { width: 100%; }
.ts-menu__list { margin: 0; padding: 0; list-style: none; }
.ts-menu__list a { display: block; min-height: 56px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--paper); font: 500 17px/22px var(--font-body); text-decoration: none; }
.ts-menu__list a:hover { text-decoration: underline; text-underline-offset: 6px; }
.ts-menu__list a:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: -3px; border-radius: 6px; }
.ts-menu__group { margin-top: 22px; font: 500 var(--fs-small)/1.3 var(--font-body); color: var(--paper-72); }
.ts-menu__list--minor a { min-height: 48px; padding: 13px 0; font-size: 16px; color: var(--paper-85); }
@media (prefers-reduced-motion: no-preference) {
  .ts-menu:not([hidden]) { animation: ts-menu-in var(--dur-panel) var(--ease-out); }
  @keyframes ts-menu-in { from { opacity: 0; transform: translateY(-8px); } }
}
html.ts-menu-open { overflow: hidden; }
@media (max-width: 1199px) {
  .ts-header__nav { display: none; }
  .ts-header__bar { gap: 12px; }
  .ts-header__cta { margin-left: auto; }
  .ts-header__menu-btn { display: inline-flex; margin-right: -8px; }
}
@media (min-width: 1200px) { .ts-menu:not(.is-static) { display: none !important; } }
.ts-menu.is-static { position: relative; top: auto; z-index: auto; min-height: 0; max-height: none; box-shadow: none; }   /* styleguide only */
@media (max-width: 639px) {
  .ts-header__logo img { height: 20px; }
  .ts-header__cta { display: none; }
  .ts-header__menu-btn { margin-left: auto; }
}

/* "Get started" (the founder's decision, as on the hero): the header's one button serves both paths,
   so it opens a small chooser with the two path buttons. Without JS it is a link to the hero's path buttons, /#paths. */
.ts-start { position: relative; flex: none; }
.ts-start__btn svg { width: 14px; height: 14px; transition: transform var(--dur-fast) ease; }
.ts-start__btn:hover svg, .ts-start__btn:focus-visible svg { transform: none; }
.ts-start__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.ts-start__panel { position: absolute; right: 0; top: calc(100% + 12px); z-index: var(--z-menu); width: 368px; max-width: calc(100vw - 2 * var(--m)); padding: 16px 18px; border-radius: var(--r-card);
  background: var(--ledger); color: var(--paper); border: 1px solid rgba(246, 243, 234, .14); box-shadow: 0 28px 60px -12px rgba(2, 16, 11, .6), 0 4px 12px rgba(2, 16, 11, .25);
  display: grid; gap: 14px; opacity: 0; translate: 0 -6px; visibility: hidden; transition: opacity var(--dur-fast) ease, translate var(--dur-fast) ease, visibility 0s linear var(--dur-fast); }
.ts-start__panel[data-open="true"], .ts-start__panel.is-static { opacity: 1; translate: 0 0; visibility: visible; transition: opacity var(--dur-fast) ease, translate var(--dur-fast) ease; }
.ts-start__panel.is-static { position: relative; top: auto; right: auto; z-index: auto; }   /* styleguide only */
.ts-start__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ts-start__q { font: 600 14px/1.3 var(--font-body); color: var(--paper); }
.ts-start__close { -webkit-appearance: none; appearance: none; min-height: var(--target); min-width: var(--target); margin: -12px -10px -12px 0; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--paper-85); font: 500 13px/1 var(--font-body); cursor: pointer; }
.ts-start__close:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.ts-start__close:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: -2px; }
.ts-start__desc { margin-top: 7px; font: 400 13px/1.45 var(--font-body); color: var(--paper-72); }
.ts-start__foot { padding-top: 12px; border-top: 1px solid rgba(246, 243, 234, .14); font: 400 12.5px/1.45 var(--font-body); color: var(--paper-72); }
.ts-start__panel .ts-btn--path { width: 100%; }
@media (prefers-reduced-motion: reduce) { .ts-start__panel, .ts-start__panel[data-open="true"], .ts-start__btn svg { transition: none; } }

/* Flow bar: the minimal header inside /check and /eligibility (back, wordmark, progress, exit) */
.ts-flowbar { position: sticky; top: 0; z-index: var(--z-header); background: var(--ledger); color: var(--paper); }
.ts-flowbar__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; padding-inline: max(8px, calc(var(--m) - 12px)); }
.ts-flowbar__logo { justify-self: center; display: flex; align-items: center; min-height: var(--target); border-radius: 6px; }
.ts-flowbar__logo img { height: 20px; width: auto; }
.ts-flowbar__end { justify-self: end; display: flex; align-items: center; gap: 4px; font: 500 var(--fs-small)/1 var(--font-body); color: var(--paper-85); font-variant-numeric: var(--num); }
.ts-flowbar .ts-btn--text { --btn-fg: var(--paper); font-size: 15px; }
.ts-flowbar__progress { height: 3px; background: rgba(246, 243, 234, .16); }
.ts-flowbar__progress > span { display: block; height: 100%; width: calc(var(--value, 0) * 100%); background: var(--paper); transition: width var(--dur-panel) var(--ease-out); }


/* 16. Footer --------------------------------------------------------------------------------
   Ledger. The wordmark and the disclosure first, then four link columns, then the
   legal block in strategy's order, with [[TBC]] placeholders until the facts exist. */
.ts-footer { background: var(--ledger); color: var(--paper); padding: clamp(56px, 7vw, 96px) 0 calc(40px + env(safe-area-inset-bottom)); }
.ts-footer--rule { border-top: 1px solid var(--line); }   /* when a Ledger band sits directly above */
.ts-footer__top { display: grid; gap: 28px; padding-bottom: 40px; border-bottom: 1px solid var(--line-strong); }
.ts-footer__logo { display: inline-flex; align-items: center; min-height: var(--target); justify-self: start; border-radius: 6px; }
.ts-footer__logo img { height: 30px; width: auto; }
.ts-footer__cols { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 40px 0; border-bottom: 1px solid var(--line-strong); }
.ts-footer__col h2 { margin: 0 0 10px; font: 600 var(--fs-small)/1.3 var(--font-body); color: var(--paper-72); }
.ts-footer__col ul { margin: 0; padding: 0; list-style: none; }
.ts-footer__col a { display: inline-block; min-height: var(--target); min-width: var(--target); padding: 12px 0; color: var(--paper); font: 400 15px/1.3 var(--font-body); text-decoration: none; text-underline-offset: 5px; border-radius: 4px; }
.ts-footer__col a:hover { text-decoration: underline; }
.ts-footer__col a:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }
.ts-footer__legal { display: grid; gap: 12px; padding-top: 32px; max-width: 60em; font: 400 13px/1.6 var(--font-body); color: var(--paper-72); }
.ts-footer__legal b { color: var(--paper-85); font-weight: 600; }
.ts-footer__legal a { color: var(--paper-85); text-underline-offset: 3px; }
@media (min-width: 834px) {
  .ts-footer__top { grid-template-columns: auto 1fr; align-items: center; column-gap: 64px; }
  .ts-footer__top .ts-callout--sign { justify-self: end; max-width: 34em; }
  .ts-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* 17a. Callouts: the disclosure "sign" and notes ---------------------------------------------
   --sign is the hero's line under the buttons: the t symbol, then the disclosure.
   Use the lime symbol on Ledger and the Ledger symbol on light (as files, unaltered). */
.ts-callout--sign { display: flex; align-items: flex-start; gap: 12px; }
.ts-callout--sign img { flex: none; width: auto; height: 22px; margin-top: 1px; }
.ts-callout--sign p { font: 500 15px/1.45 var(--font-body); color: var(--fg-muted); }
.ts-callout--rule { padding-top: 20px; border-top: 1px solid var(--line-strong); width: fit-content; max-width: 100%; }
.ts-callout--note { display: grid; gap: 6px; max-width: 46em; padding: 18px 20px; border-radius: var(--r-btn); background: var(--info-tint); color: var(--fg); }
.ts-callout--note .ts-callout__title { font: 600 var(--fs-body)/1.4 var(--font-body); color: var(--fg); }
.ts-callout--note p:not(.ts-callout__title) { font: 400 var(--fs-body)/1.55 var(--font-body); color: var(--fg-muted); }


/* 17b. Inline alerts and toasts ----------------------------------------------------------------
   Alert: in the page, next to what it's about. role="status" for news, role="alert" for
   errors. Toast: small confirmations only ("Copied", "Sent"). Toasts stay 6 seconds,
   pause on hover or focus, never carry an error, and never hold the only copy of a message. */
.ts-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; max-width: 46em; padding: 16px 16px 16px 18px; border-radius: var(--r-btn); background: var(--alert-bg, var(--info-tint)); color: var(--fg); }
.ts-alert__icon { width: 22px; height: 22px; color: var(--alert-fg, var(--info)); margin-top: 1px; }
.ts-alert__body { display: grid; gap: 3px; }
.ts-alert__title { font: 600 var(--fs-body)/1.4 var(--font-body); color: var(--fg); }
.ts-alert__text { font: 400 var(--fs-small)/1.5 var(--font-body); color: var(--fg-muted); }
.ts-alert__text a { color: inherit; font-weight: 500; text-underline-offset: .2em; }
.ts-alert .ts-icon-btn { margin: -10px -8px -10px 0; color: var(--fg-muted); }
.ts-alert .ts-icon-btn svg { width: 20px; height: 20px; }
.ts-alert--success { --alert-bg: var(--success-tint); --alert-fg: var(--success); }
.ts-alert--warning { --alert-bg: var(--warning-tint); --alert-fg: var(--warning); }
.ts-alert--error { --alert-bg: var(--error-tint); --alert-fg: var(--error); }

.ts-toasts { position: fixed; z-index: var(--z-toast); left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; padding-inline: 16px; pointer-events: none; }
html.ts-has-sticky .ts-toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 834px) { .ts-toasts { left: auto; right: var(--m); bottom: 24px; justify-items: end; padding: 0; } }
.ts-toast { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(420px, 100%); padding: 12px 8px 12px 16px; border-radius: var(--r-btn); background: var(--ledger-2); color: var(--paper); box-shadow: var(--sh-toast), inset 0 0 0 1px rgba(246, 243, 234, .08); }
.ts-toast__icon { width: 20px; height: 20px; color: var(--green-on-dark); }
.ts-toast__text { font: 500 15px/1.4 var(--font-body); }
.ts-toast__text span { display: block; font-weight: 400; font-size: 14px; color: var(--paper-85); }
.ts-toast .ts-btn--text { --btn-fg: var(--paper); font-size: 15px; }
.ts-toast .ts-icon-btn { color: var(--paper-85); }
.ts-toast .ts-icon-btn svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .ts-toast { animation: ts-toast-in var(--dur-panel) var(--ease-out); }
  .ts-toast.is-leaving { animation: ts-toast-out .2s var(--ease-in) forwards; }
  @keyframes ts-toast-in { from { opacity: 0; transform: translateY(var(--rise-by)); } }
  @keyframes ts-toast-out { to { opacity: 0; transform: translateY(6px); } }
}


/* 17c. Sticky mobile bar (phones) --------------------------------------------------------------
   Both paths, once the page's own buttons have scrolled away (components.js). Hidden from
   assistive tech while off. Under 640px only. */
.ts-sticky { display: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px; padding: 10px var(--m) calc(10px + env(safe-area-inset-bottom)); background: rgba(13, 59, 46, .97); box-shadow: var(--sh-sticky); }
.ts-sticky .ts-btn { width: 100%; min-height: var(--ctl-h-md); padding: 0 12px; gap: 8px; font-size: 15px; border-radius: var(--r-input); }
.ts-sticky.is-static { display: grid; }                    /* styleguide only: shown in place */
@media (max-width: 359px) {                               /* 320px phones: both labels fit without the arrows */
  .ts-sticky .ts-btn { padding: 0 8px; gap: 6px; font-size: 14px; }
  .ts-sticky .ts-btn svg { display: none; }
}
@media (max-width: 639px) {
  .ts-sticky:not(.is-static) { display: grid; position: fixed; z-index: var(--z-sticky); left: 0; right: 0; bottom: 0;
    transform: translateY(110%); visibility: hidden; transition: transform var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel); }
  .ts-sticky.is-on { transform: none; visibility: visible; transition: transform var(--dur-panel) var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) { .ts-sticky, .ts-sticky.is-on { transition: none; } }
html.ts-menu-open .ts-sticky:not(.is-static) { visibility: hidden; }   /* the open menu covers the page */


/* 17d. FAQ accordion -----------------------------------------------------------------------------
   Native <details>/<summary>: works without JavaScript, and every answer is in the HTML for
   crawlers and answer engines. Questions in Inter 600; one chevron; strong hairlines. */
.ts-faq { border-top: 1px solid var(--line-strong); max-width: 880px; }
.ts-faq__item { border-bottom: 1px solid var(--line-strong); }
/* Wrap the question in one <span class="ts-faq__label">: flex would split text from a nested
   .ts-nowrap span and drop the space between them. */
.ts-faq__q { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; padding: 16px 4px 16px 0; cursor: pointer; list-style: none; font: 600 clamp(17px, 1.3vw, 19px)/1.4 var(--font-body); color: var(--fg); border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.ts-faq__q::-webkit-details-marker { display: none; }
.ts-faq__q::marker { content: ""; }
.ts-faq__q svg { flex: none; width: 22px; height: 22px; color: var(--fg-muted); transition: transform var(--dur-panel) var(--ease-out); }
.ts-faq__q:hover, .ts-faq__q.is-hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.ts-faq__q:focus-visible, .ts-faq__q.is-focus { outline: var(--focus-w) solid var(--focus); outline-offset: 4px; }
.ts-faq__item[open] > .ts-faq__q svg { transform: rotate(180deg); }
.ts-faq__a { padding: 0 48px 24px 0; font: 400 var(--fs-body-lg)/1.6 var(--font-body); color: var(--fg-muted); max-width: 46em; }
.ts-faq__a > * + * { margin-top: .8em; }
.ts-faq__a strong { color: var(--fg); font-weight: 600; }
@supports (interpolate-size: allow-keywords) {
  .ts-faq { interpolate-size: allow-keywords; }
  .ts-faq__item::details-content { height: 0; overflow: clip; transition: height var(--dur-panel) var(--ease-out), content-visibility var(--dur-panel) allow-discrete; }
  .ts-faq__item[open]::details-content { height: auto; }
}
@media (prefers-reduced-motion: reduce) { .ts-faq__item::details-content { transition: none; } .ts-faq__q svg { transition: none; } }


/* 17e. Section head ------------------------------------------------------------------------------
   Title, an optional lead, an optional action. Left-aligned; no eyebrow, no capitals.
   --split puts the lead beside the title from 1024px. */
.ts-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
.ts-head__title { max-width: 16em; }
.ts-head__lead { max-width: 34em; }
.ts-head__action { margin-top: 4px; }
@media (min-width: 1024px) {
  .ts-head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); align-items: end; }
  .ts-head--split .ts-head__lead { justify-self: start; }
}


/* 17f. Comparison ---------------------------------------------------------------------------------
   .ts-pair: two figures side by side (stacked on phones), each with its label. The one
   highlight may sit on either, whichever matters in that view.
   .ts-table: a real table for comparing things in words (strategy §9). --stack turns
   each row into a block on phones, with the column name above each cell. */
.ts-pair { display: grid; gap: 28px; }
.ts-pair__item { display: grid; gap: 10px; align-content: start; }
.ts-pair__fig { white-space: nowrap; font: 800 clamp(44px, 7.4vw, 112px)/.95 var(--font-display); letter-spacing: -.04em; color: var(--fg); font-variant-numeric: var(--num); }
.ts-pair__fig .ts-fig__pre { font-size: max(16px, .2em); }
.ts-pair__label { font: 500 var(--fs-body-lg)/1.4 var(--font-body); color: var(--fg-muted); }
.ts-pair__note { margin-top: 24px; max-width: 46em; font: 400 var(--fs-small)/1.55 var(--font-body); color: var(--fg-subtle); }
@media (min-width: 834px) { .ts-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); } }

.ts-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ts-table { width: 100%; border-collapse: collapse; font: 400 15px/1.5 var(--font-body); color: var(--fg-muted); }
.ts-table caption { caption-side: bottom; text-align: left; padding-top: 14px; font: 400 var(--fs-small)/1.5 var(--font-body); color: var(--fg-subtle); }
.ts-table th, .ts-table td { padding: 16px 20px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.ts-table thead th { font: 600 var(--fs-body)/1.35 var(--font-body); color: var(--fg); border-bottom: 1.5px solid var(--line-strong); vertical-align: bottom; }
.ts-table tbody th { font: 600 15px/1.45 var(--font-body); color: var(--fg); width: 22%; }
.ts-table td:last-child, .ts-table th:last-child { padding-right: 0; }
.ts-table .ts-num, .ts-table .is-num { text-align: right; }
.ts-table td.is-num { white-space: nowrap; font-variant-numeric: var(--num); }   /* tabular on the figures only: Inter's tnum also widens hyphens in words */
@media (max-width: 833px) {
  .ts-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ts-table--stack, .ts-table--stack tbody, .ts-table--stack tr, .ts-table--stack th, .ts-table--stack td { display: block; width: auto; }
  .ts-table--stack tr { padding: 18px 0 8px; border-bottom: 1.5px solid var(--line-strong); }
  .ts-table--stack tbody th { padding: 0 0 8px; border: 0; font-size: var(--fs-body-lg); }
  .ts-table--stack td { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .ts-table--stack td:last-child { border-bottom: 0; }
  .ts-table--stack td::before { content: attr(data-label); font-weight: 600; color: var(--fg); }
  .ts-table--stack tbody th { width: auto; }
  .ts-table--stack td.is-num { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; }
  .ts-table--stack td.is-num::before { text-align: left; font-variant-numeric: normal; }
  .ts-table--stack caption { display: block; }
}
@media (max-width: 479px) { .ts-table--stack td { grid-template-columns: 1fr; gap: 2px; } }
