/* PayoutMath design tokens
   Aesthetic: utilitarian/editorial — Bloomberg terminal meets GOV.UK Design System.
   Trust through restraint. No web fonts. Monospace for numbers. */

:root {
  /* Colours */
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-2: #5A5A5A;
  --ink-3: #8A8A85;
  --accent: #2D5A3D;
  --accent-tint: #E8EFE9;
  --accent-strong: #1F4029;
  --positive: #1B5E2A;
  --negative: #A02020;
  --warn: #B8860B;
  --rule: #E5E5E0;
  --rule-strong: #1A1A1A;

  /* Type stacks — system only, no web fonts */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Sizes */
  --fs-xs: 0.8125rem;   /* 13px */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1rem;      /* 16px */
  --fs-md: 1.125rem;    /* 18px */
  --fs-lg: 1.375rem;    /* 22px */
  --fs-xl: 1.75rem;     /* 28px */
  --fs-xxl: 2.25rem;    /* 36px */

  /* Spacing — 8px base */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;

  /* Layout */
  --content-w: 44rem;   /* 704px — calc-tool comfortable max */
  --wide-w: 60rem;      /* hub home etc */
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body, h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote {
  margin: 0;
  padding: 0;
}
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layout primitives */
.wrap {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: var(--s-4);
}
.wrap-wide {
  max-width: var(--wide-w);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h1 {
  font-size: var(--fs-xxl);
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--fs-xl);
  margin-top: var(--s-7);
  margin-bottom: var(--s-4);
}
h3 {
  font-size: var(--fs-lg);
  margin-top: var(--s-5);
  margin-bottom: var(--s-3);
}
h4 {
  font-size: var(--fs-md);
  margin-top: var(--s-4);
  margin-bottom: var(--s-2);
}
p {
  margin-bottom: var(--s-4);
  max-width: 38rem;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

/* Numbers — the character of the site */
.num, code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "zero" 1;
}
.num {
  font-variant-numeric: tabular-nums;
}
.num--pos { color: var(--positive); }
.num--neg { color: var(--negative); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.site-header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-4);
}
.site-header__brand {
  font-weight: 800;
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-header__brand::before {
  content: "£";
  color: var(--accent);
  margin-right: 0.15em;
  font-family: var(--font-mono);
}
.site-header__nav {
  display: flex;
  gap: var(--s-4);
  font-size: var(--fs-sm);
}
.site-header__nav a {
  color: var(--ink-2);
  text-decoration: none;
}
.site-header__nav a:hover { color: var(--accent); }

/* Hero / page intro */
.hero {
  padding-block: var(--s-7) var(--s-5);
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-2);
}
.hero__lede {
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 38rem;
  margin-top: var(--s-3);
}

/* Trust line — last verified, source URL */
.trust-line {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  font-size: var(--fs-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}
.trust-line__label {
  color: var(--ink-2);
}
.trust-line__value {
  font-family: var(--font-mono);
  color: var(--ink);
}

/* Calc form */
.calc {
  margin-block: var(--s-6);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--rule);
}
.calc__legend {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 var(--s-2);
  margin-left: -var(--s-2);
}
.field {
  margin-block: var(--s-4);
}
.field__label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--s-1);
  font-size: var(--fs-sm);
}
.field__help {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  margin-bottom: var(--s-2);
}
.field__input,
.field__select {
  width: 100%;
  padding: var(--s-3);
  font-size: var(--fs-base);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field__input:focus,
.field__select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.field__select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231A1A1A' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--s-3) center;
  background-size: 12px 8px;
  padding-right: var(--s-7);
}
.field__prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rule-strong);
}
.field__prefix-symbol {
  display: flex;
  align-items: center;
  padding: 0 var(--s-3);
  background: var(--bg);
  border-right: 1px solid var(--rule);
  font-family: var(--font-mono);
  color: var(--ink-2);
}
.field__prefix .field__input {
  border: 0;
  flex: 1;
}
.field__prefix:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}
.field--toggle {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.field--toggle .field__label {
  margin: 0;
  flex: 1;
}

/* Result block */
.result {
  margin-block: var(--s-5);
  padding: var(--s-5);
  background: var(--ink);
  color: #FAFAF7;
  font-family: var(--font-mono);
}
.result__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: var(--s-2);
  border-bottom: 1px solid #2A2A2A;
  gap: var(--s-3);
}
.result__row:last-child {
  border-bottom: 0;
}
.result__row--total {
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 2px solid #FAFAF7;
  border-bottom: 0;
  font-size: var(--fs-md);
  font-weight: 700;
}
.result__label {
  color: #BBBBB5;
  font-size: var(--fs-sm);
}
.result__row--total .result__label {
  color: #FAFAF7;
}
.result__value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.result__value--pos { color: #6FCF87; }
.result__value--neg { color: #FF7A7A; }

/* Section break */
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin-block: var(--s-6);
}

/* FAQs */
.faq {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-4);
}
.faq__q {
  font-weight: 700;
  font-size: var(--fs-md);
  margin-bottom: var(--s-2);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::before {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent);
  margin-right: var(--s-2);
  display: inline-block;
  width: 1ch;
}
details[open] > .faq__q::before {
  content: "−";
}
.faq__a { color: var(--ink-2); }

/* Worked example */
.example {
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  padding: var(--s-4) var(--s-5);
  margin-block: var(--s-5);
}
.example__title {
  font-weight: 700;
  margin-bottom: var(--s-2);
}
.example__inputs {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin-bottom: var(--s-3);
}

/* Common mistakes / limitations callout */
.callout {
  border: 1px solid var(--rule-strong);
  padding: var(--s-4);
  margin-block: var(--s-5);
}
.callout__title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.callout--mistakes .callout__title { color: var(--negative); }
.callout--limits .callout__title { color: var(--ink-2); }

/* Related calcs */
.related {
  border-top: 2px solid var(--rule-strong);
  padding-top: var(--s-5);
  margin-top: var(--s-7);
}
.related__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 36rem) {
  .related__list { grid-template-columns: 1fr 1fr; }
}
.related__item {
  border: 1px solid var(--rule);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
}
.related__item a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}
.related__item a:hover { color: var(--accent); }
.related__item p {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin: 0;
  margin-top: var(--s-1);
}

/* Footer */
.site-footer {
  margin-top: var(--s-8);
  border-top: 1px solid var(--rule);
  background: var(--surface);
}
.site-footer__inner {
  padding-block: var(--s-6);
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 36rem) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
  color: var(--ink-3);
}
.site-footer ul { list-style: none; }
.site-footer li { padding-block: var(--s-1); font-size: var(--fs-sm); }
.site-footer__legal {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-4);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
}

/* Author byline */
.byline {
  margin-top: var(--s-5);
  padding: var(--s-4);
  background: var(--bg);
  border: 1px dashed var(--rule);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* Print */
@media print {
  .site-header__nav, .site-footer, .related, .calc__submit { display: none; }
  body { background: white; color: black; }
  .result { background: white; color: black; border: 2px solid black; }
  .result__label { color: #333; }
  a { color: black; text-decoration: underline; }
  .trust-line { background: white; border-color: black; }
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ink);
  color: var(--bg);
  padding: var(--s-3);
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Utility classes — replaces inline style="..." attributes
   added during Phase 4 audit cleanup. Lets the build run with
   strict CSP (no 'unsafe-inline' for styles).
   ============================================================ */

/* Typography utilities */
.t-meta      { color: var(--ink-3); font-size: var(--fs-xs); }
.t-secondary { color: var(--ink-2); font-size: var(--fs-sm); max-width: 32rem; }
.t-caption   { font-size: var(--fs-xs); color: var(--ink-3); }
.t-mono-meta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s-3); }
.t-mono-label {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.t-lede      { font-size: var(--fs-lg); max-width: 36rem; }

/* Layout utilities */
.fieldset-reset { border: 0; padding: 0; }
.checkbox-large { width: 1.25rem; height: 1.25rem; }
.list-bulleted  { padding-left: var(--s-5); }
.list-bulleted li { margin-bottom: var(--s-2); }

/* Notice block (used by noscript / inline notes) */
.notice {
  background: var(--accent-tint);
  padding: var(--s-3);
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
  border-radius: 4px;
}

/* Hero (homepage) */
.hero { padding-block: var(--s-8) var(--s-6); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); max-width: 22ch; }
.hero__highlight { color: var(--accent); font-family: var(--font-mono); }

/* Hub search bar wrapper */
.hub-search { margin-block: var(--s-6); position: relative; }
.hub-search__input {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  padding: var(--s-4);
}

/* Affiliate disclosure aside */
.affiliate {
  margin-top: var(--s-6);
  padding: var(--s-4);
  border: 1px solid var(--rule);
  background: var(--surface);
}
.affiliate__disclosure {
  color: var(--ink-3);
  display: block;
  margin-bottom: var(--s-2);
}

/* Section headings inside cards */
.card-h2 { margin-top: 0; }

/* Hub page section classes */
.hub-search input {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  padding: var(--s-4);
}
.hub-section { margin-block: var(--s-7); }
.hub-section__h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: 0;
}
.hub-section__count {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-3);
  font-weight: 400;
}
.hub-section__description {
  color: var(--ink-2);
  max-width: 40rem;
  margin-bottom: var(--s-4);
}
.list-unstyled { list-style: none; padding-left: 0; }

/* Trust line — homepage manifesto block */
.trust-line {
  margin-block: var(--s-8);
  padding: var(--s-6);
  border: 2px solid var(--rule-strong);
  background: var(--surface);
}
.trust-line__h2 { margin-top: var(--s-2); }
.trust-line__grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  margin-top: var(--s-4);
}
@media (min-width: 700px) {
  .trust-line__grid { grid-template-columns: repeat(3, 1fr); }
}
.trust-line__h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-2);
}
.trust-line__p { margin: 0; color: var(--ink-2); }

/* Contact page email display */
.contact-email {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  margin-block: var(--s-5);
}

/* ─────────────────────────────────────────────
   Glossary page
   ───────────────────────────────────────────── */
.glossary-list { margin-top: var(--s-6); }

.glossary-letter {
  border-top: 1px solid var(--border);
  padding-top: var(--s-5);
  margin-top: var(--s-6);
}
.glossary-letter:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.glossary-letter__heading {
  font-family: var(--font-mono);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-4) 0;
}

.glossary-term {
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}
.glossary-term:last-child { border-bottom: none; }

.glossary-term h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--s-2) 0;
}

.glossary-term__short {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--s-2) 0;
}

.glossary-term p {
  color: var(--ink-2);
  margin: 0 0 var(--s-2) 0;
  line-height: 1.6;
}

.glossary-term .t-caption a {
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   Glossary auto-link styling
   ───────────────────────────────────────────── */
.glossary-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  cursor: help;
}
.glossary-link:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* ─────────────────────────────────────────────
   Amazon Associates affiliate panel
   ───────────────────────────────────────────── */
.affiliate-picks {
  margin: 3rem auto 1rem;
  padding: 1.5rem 1.25rem;
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  max-width: 100%;
}
.affiliate-picks__heading {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--accent-strong);
}
.affiliate-picks__intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--accent-strong);
}
.affiliate-picks__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.75rem;
}
.affiliate-picks__item {
  background: var(--surface);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(45,90,61,0.15);
}
.affiliate-picks__item a {
  display: block;
  color: var(--accent-strong);
  text-decoration: none;
}
.affiliate-picks__item a:hover {
  color: var(--accent);
}
.affiliate-picks__item-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}
.affiliate-picks__item-title::after {
  content: " ↗";
  font-size: 0.8em;
  opacity: 0.7;
}
.affiliate-picks__item-desc {
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #555;
}
.affiliate-picks__disclosure {
  font-size: 0.8rem;
  color: #666;
  margin: 0;
  font-style: italic;
}
.affiliate-picks__disclosure a {
  color: inherit;
  text-decoration: underline;
}
@media (min-width: 720px) {
  .affiliate-picks__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   PAYOUTMATH.COM — SLATE / TEAL RESKIN
   Appended to tokens.eadd3f8f.css — overrides original green theme.
   Palette: deep slate header/hero + teal accent. Clean data-tool feel
   suited to the mixed marketing/seller audience on the .com site.
   Distinct from payoutmath.co.uk (navy/orange) so the two sites
   have clear visual identities.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. COLOUR TOKENS ─────────────────────────────────────────────── */
:root {
  --accent:        #0D9488;   /* teal-600 — links, CTAs, focus rings */
  --accent-tint:   #F0FDFA;   /* teal-50 — panel backgrounds */
  --accent-strong: #0F766E;   /* teal-700 — hover states */

  --slate:         #0F172A;   /* slate-900 — header, hero, footer */
  --slate-mid:     #1E293B;   /* slate-800 — card headers, hover */
  --slate-card:    #1E293B;
  --slate-border:  #334155;   /* slate-700 — borders on dark surfaces */

  --bg:            #F8FAFC;   /* slate-50 — page background */
  --surface:       #FFFFFF;
  --ink:           #0F172A;   /* slate-900 — primary text */
  --ink-2:         #475569;   /* slate-600 */
  --ink-3:         #94A3B8;   /* slate-400 */
  --rule:          #E2E8F0;   /* slate-200 */
  --rule-strong:   #0F172A;
  --positive:      #065F46;
  --negative:      #991B1B;
}

/* ── 2. BODY ──────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--ink);
}

/* ── 3. HEADER ────────────────────────────────────────────────────── */
.site-header {
  background: var(--slate);
  border-bottom: none;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 16px rgba(0,0,0,0.3);
}

.site-header__brand {
  color: #F1F5F9;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-header__brand:hover { color: #FFFFFF; }

/* Teal dot before brand */
.site-header__brand::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.site-header__nav a {
  color: #94A3B8;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.12s;
}
.site-header__nav a:hover { color: #F1F5F9; }

/* ── 4. HERO ──────────────────────────────────────────────────────── */
.hero {
  background: var(--slate);
  color: #F1F5F9;
  padding-block: 3rem 2.5rem;
}

#main { overflow-x: hidden; }

.wrap > .hero,
.wrap-wide > .hero {
  margin-left: calc(-1 * var(--s-4));
  margin-right: calc(-1 * var(--s-4));
  padding-left: var(--s-4);
  padding-right: var(--s-4);
  margin-top: calc(-1 * var(--s-7));
}

@media (min-width: 44rem) {
  .wrap > .hero {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50% + var(--s-4));
    padding-right: calc(50vw - 50% + var(--s-4));
  }
}

.hero__eyebrow {
  color: var(--accent);
  opacity: 1;
}

.hero h1 { color: #F1F5F9; }
.hero__highlight { color: var(--accent); }
.hero__lede { color: #94A3B8; }

/* Trust line on dark hero */
.hero .trust-line {
  background: rgba(255,255,255,0.05);
  border-left-color: var(--accent);
  color: #94A3B8;
}
.hero .trust-line__label { color: #64748B; }
.hero .trust-line__value { color: #CBD5E1; }
.hero .trust-line a { color: #94A3B8; }
.hero .trust-line a:hover { color: var(--accent); }

/* ── 5. CALC FORM ─────────────────────────────────────────────────── */
.calc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.04);
}

.calc__legend { color: var(--accent); }

.field__input,
.field__select {
  background: #FAFBFC;
  border-color: var(--rule);
}
.field__input:focus,
.field__select:focus {
  outline-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

.field__prefix-symbol {
  background: var(--bg);
  color: var(--ink-3);
}

.checkbox-large { accent-color: var(--accent); }

/* ── 6. RESULT PANEL ──────────────────────────────────────────────── */
.result {
  background: var(--slate);
  border-top: 3px solid var(--accent);
}
.result__row { border-bottom-color: var(--slate-border); }
.result__row--total { border-top-color: var(--accent); }
.result__label { color: #64748B; }

/* ── 7. TRUST LINE ────────────────────────────────────────────────── */
.trust-line {
  background: var(--accent-tint);
  border-left-color: var(--accent);
}
.trust-line__label { color: var(--ink-2); }

/* ── 8. HUB ───────────────────────────────────────────────────────── */
.hub-section__h2 {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hub-section__count {
  background: var(--accent);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 0.1em 0.6em;
  font-size: 0.75rem;
}
.hub-search__input:focus,
.hub-search input:focus {
  outline-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

/* ── 9. CARDS ─────────────────────────────────────────────────────── */
.related__item {
  border: 1px solid var(--rule);
  border-top: 3px solid transparent;
  background: var(--surface);
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.1s;
}
.related__item:hover {
  border-top-color: var(--accent);
  box-shadow: 0 4px 16px rgba(15,23,42,0.08);
  transform: translateY(-1px);
}
.related__item a { color: var(--accent-strong); font-weight: 600; }
.related__item a:hover { color: var(--accent); }

/* ── 10. LINKS ────────────────────────────────────────────────────── */
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
.wrap p a, .wrap li a, section.wrap a { color: var(--accent); }

/* ── 11. FAQ ──────────────────────────────────────────────────────── */
.faq__q::before { color: var(--accent); }
details[open] > .faq__q { color: var(--accent-strong); }

/* ── 12. EXAMPLE / CALLOUT ────────────────────────────────────────── */
.example { background: var(--accent-tint); border-left-color: var(--accent); }
.callout { border-left: 3px solid var(--accent); }

/* ── 13. AFFILIATE PANELS ─────────────────────────────────────────── */
.affiliate-picks {
  background: var(--accent-tint);
  border-left-color: var(--accent);
}
.affiliate-picks__heading { color: var(--ink); }
.affiliate-picks__item { border-color: rgba(13,148,136,0.15); }
.affiliate-picks__item a { color: var(--ink); }
.affiliate-picks__item a:hover { color: var(--accent); }
.affiliate-picks__item-title { color: var(--accent-strong); }

/* ── 14. FOOTER ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--slate);
  border-top: none;
  margin-top: var(--s-8);
}
.site-footer h3 { color: #F1F5F9; }
.site-footer p { color: #64748B; }
.site-footer a { color: #94A3B8; }
.site-footer a:hover { color: var(--accent); }

/* ── 15. BUTTONS ──────────────────────────────────────────────────── */
button, .btn {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--accent-strong); }
.copy-btn { background: var(--accent); color: #fff; border: none; }
.copy-btn:hover { background: var(--accent-strong); }

/* ── 16. FOCUS RINGS ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── 17. GLOSSARY ─────────────────────────────────────────────────── */
.glossary-link {
  border-bottom-color: var(--accent);
  color: inherit;
}
.glossary-link:hover { color: var(--accent); }

/* ── 18. TABLES ───────────────────────────────────────────────────── */
table th { background: var(--slate); color: #F1F5F9; }
table tr:nth-child(even) { background: #F8FAFC; }

/* ── 19. PROSE H2 ─────────────────────────────────────────────────── */
.wrap h2 {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
  margin-top: 2rem;
}

/* ── 20. SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--slate-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════
   AFFILIATE v3 CARD STYLES
   New card skin from AFFILIATE-OVERHAUL-INSTRUCTIONS v3
   Replaces/supplements .affiliate-picks for new blocks
   ═══════════════════════════════════════════════════════════════════ */

.amz-section {
  margin: 2.5rem 0 1.5rem;
}
.amz-section__heading {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.amz-section__disclosure {
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin: 0 0 1rem;
  font-style: italic;
}
.amz-section__disclosure a {
  color: inherit;
  text-decoration: underline;
}
.amz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}
@media (min-width: 560px) {
  .amz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 860px) {
  .amz-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.amz-card {
  background: linear-gradient(160deg, #fff, #fdf9f2);
  border: 1px solid #f0d9b0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  text-decoration: none;
}
.amz-card:hover {
  transform: translateY(-3px);
  border-color: #ff9900;
  box-shadow: 0 8px 20px rgba(255,153,0,.22);
}
.amz-badge {
  align-self: flex-start;
  background: #232f3e;
  color: #ff9900;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.amz-title {
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  font-size: var(--fs-sm);
}
.amz-desc {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  line-height: 1.45;
  flex: 1;
}
.amz-cta {
  margin-top: auto;
  display: block;
  text-align: center;
  font-weight: 700;
  color: #111;
  background: linear-gradient(180deg, #ffd814, #ff9900);
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: opacity .15s;
}
.amz-cta:hover {
  opacity: .9;
}
.amz-inline {
  color: #b45309;
  text-decoration: underline;
  text-decoration-color: #f59e0b;
  text-underline-offset: 2px;
  font-weight: 600;
}
.amz-inline:hover {
  color: #92400e;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #fff;
  padding: 16px 20px;
  z-index: 9999;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
#cookie-banner p {
  margin: 0;
  max-width: 700px;
}
#cookie-banner a {
  color: #ff9900;
}
.cookie-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-accept {
  background: #ff9900;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
}
.cookie-decline {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* CJ Affiliate inline links — distinguish from Amazon amber underline */
.cj-inline {
  color: #1d5fa8;
  text-decoration: underline;
  text-decoration-color: #4a90d9;
  text-underline-offset: 2px;
  font-weight: 600;
}
.cj-inline:hover {
  color: #123f73;
}

/* Visible breadcrumb navigation */
.breadcrumb-nav {
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin: 0.75rem 0 0.5rem;
  padding: 0 0 0.5rem;
}
.breadcrumb-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.breadcrumb-nav li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.breadcrumb-nav li:not(:last-child)::after {
  content: "/";
  color: var(--ink-3);
  opacity: 0.5;
}
.breadcrumb-nav a {
  color: var(--ink-3);
  text-decoration: none;
}
.breadcrumb-nav a:hover {
  text-decoration: underline;
}
.breadcrumb-nav li[aria-current="page"] {
  color: var(--ink-2);
  font-weight: 600;
}

/* Reviewed-by trust strip (anonymity-compliant — no real name/photo) */
.reviewed-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin: 0.5rem 0 1rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2, #f7f7f5);
  border-radius: 8px;
  border: 1px solid var(--border, #e5e5e0);
}
.reviewed-strip strong {
  color: var(--ink-2);
}

/* CJ merchant cards — blue-tinted badge, distinct from Amazon gold and AWIN
   green. Hard release-gate requirement (Section C §10, added V5.31) even
   though this site currently uses .cj-inline text links for CJ context
   placements rather than cards — kept ready for if/when a CJ merchant
   moves to card format here. */
.cj-card {
  background: linear-gradient(135deg, #ffffff 0%, #fdf9f2 100%);
  border: 1px solid #f0d9b0;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cj-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.cj-card .merchant-badge {
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #1d5fae;
}
.cj-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}
.cj-card .card-benefit {
  font-size: 0.90rem;
  color: #4a4a4a;
  margin: 0;
  line-height: 1.5;
}
.cj-card .cta-btn {
  display: inline-block;
  background: #1d5fae;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  align-self: flex-start;
  transition: background 0.2s ease;
}
.cj-card .cta-btn:hover {
  background: #164a8a;
}

/* Helpfulness vote widget — real backend (Cloudflare KV via /api/vote),
   starts at 0, no fabricated counts. */
.helpful-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface-2, #f7f7f5);
  border-radius: 8px;
  border: 1px solid var(--border, #e5e5e0);
  font-size: var(--fs-sm);
}
.helpful-widget__prompt {
  color: var(--ink-2);
  font-weight: 600;
}
.helpful-widget__btns {
  display: flex;
  gap: 0.5rem;
}
.helpful-widget__btn {
  border: 1px solid var(--border, #d5d5d0);
  background: #fff;
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.helpful-widget__btn:hover:not(:disabled) {
  background: var(--surface-2, #f0f0ec);
  border-color: var(--ink-3, #999);
}
.helpful-widget__btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.helpful-widget__count {
  color: var(--ink-3);
  font-size: var(--fs-xs);
}
.helpful-widget__thanks {
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-style: italic;
}
