/* ==========================================================================
   Ohms Law Wheel — main.css
   Global design tokens, layout, header, hero, sections, footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Green ramp — vivid accent green + deep action/text greens that hold
     WCAG AA contrast on white and inside pale-green surfaces. */
  --green: #04B962;        /* accent: icons, fills, rules, wheel segments   */
  --green-deep: #067A45;   /* solid surfaces w/ white text  — 5.4:1 on #fff */
  --green-dark: #026B3B;   /* body links & green text       — 6.6:1 on #fff */
  --green-ink: #04452A;    /* strongest green, headings / active states     */
  --green-mid: #03A556;
  --green-pale: #E9F8F0;
  --green-light: #C7EFDB;
  --green-tint: #F4FCF8;

  /* Neutral ink ramp */
  --charcoal: #1C1E20;
  --charcoal-dark: #101214;
  --charcoal-2: #2C2F33;
  --muted: #4C5158;        /* 8.1:1 on white — readable secondary copy      */
  --muted-soft: #6B7178;

  --white: #FFFFFF;
  --bg-light: #F6F9F7;
  --bg-sink: #E9F1EC;
  --red: #B62A04;
  --red-soft: #FDF0EC;

  --line: rgba(16, 18, 20, 0.12);
  --line-strong: rgba(16, 18, 20, 0.20);
  --line-green: rgba(4, 185, 98, 0.30);

  --shadow-sm: 0 1px 2px rgba(16, 18, 20, 0.06);
  --shadow-md: 0 6px 20px rgba(16, 18, 20, 0.08);
  --shadow-lg: 0 16px 44px rgba(16, 18, 20, 0.12);
  --shadow-green: 0 6px 18px rgba(6, 122, 69, 0.28);
  --shadow-green-lg: 0 14px 32px rgba(6, 122, 69, 0.20);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;

  --wrap: 1200px;
  --gut: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms var(--ease);
  --t-base: 260ms var(--ease);
  --t-slow: 350ms var(--ease);

  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 72px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* Author `display` declarations beat the UA sheet's [hidden] rule, so any
   element given a display value must still honour the hidden attribute. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.0625rem);
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--charcoal-dark);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(1.95rem, 1.35rem + 2.4vw, 2.95rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.55rem, 1.18rem + 1.5vw, 2.2rem); letter-spacing: -0.026em; }
h3 { font-size: clamp(1.13rem, 1.04rem + 0.42vw, 1.32rem); }
h4 { font-size: clamp(1.02rem, 0.99rem + 0.24vw, 1.12rem); }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-dark); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--green-ink); } .faq-answer a, .hero-desc a, .info-card p a,
.section-head p a, .note p a, .card p a, .wheel-group-note a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-green);
} .faq-answer a:hover, .hero-desc a:hover,
.info-card p a:hover, .section-head p a:hover, .note p a:hover,
.card p a:hover, .wheel-group-note a:hover {
  text-decoration-color: currentColor;
  background: var(--green-pale);
  border-radius: 3px;
}

ul, ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }
li:last-child { margin-bottom: 0; }

strong { font-weight: 650; color: var(--charcoal-dark); }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--charcoal-dark);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding: clamp(52px, 6vw, 88px) 0; }
.section--sink { background: var(--bg-sink); }
.section--light { background: var(--bg-light); }
.section--tight { padding: clamp(40px, 4.4vw, 62px) 0; }

.section-head { max-width: 700px; margin-bottom: clamp(28px, 3.4vw, 44px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { color: var(--charcoal-dark); }
.section-head p { color: var(--muted); font-size: 1.01rem; margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-pale);
  color: var(--green-ink);
  border: 1px solid var(--line-green);
  border-radius: var(--r-pill);
  padding: 6px 15px;
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  font-family: var(--font-display);
}
.eyebrow svg { color: var(--green-deep); }
.eyebrow svg { flex: none; }

.lede { font-size: clamp(1.03rem, 1rem + 0.3vw, 1.16rem); color: var(--muted); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.97rem;
  font-weight: 650;
  line-height: 1;
  padding: 14px 22px;
  min-height: 48px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn svg { flex: none; }
.btn--primary { background: var(--green-deep); color: var(--white); box-shadow: var(--shadow-green); }
.btn--primary:hover { background: var(--green-ink); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-green-lg); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: var(--white); color: var(--charcoal); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { background: var(--green-pale); color: var(--green-ink); border-color: var(--green); }
.btn--dark { background: var(--charcoal); color: var(--white); }
.btn--dark:hover { background: var(--charcoal-dark); color: var(--white); }
.btn--sm { padding: 10px 16px; min-height: 42px; font-size: 0.9rem; }
/* Copy confirmation: the button turns green and shows a tick for a moment. */
.btn.is-copied,
.btn--ghost.is-copied {
  background: var(--green-pale);
  color: var(--green-ink);
  border-color: var(--green);
  box-shadow: none;
}
.btn.is-copied svg { color: var(--green-deep); animation: copy-tick 260ms var(--ease); }
@keyframes copy-tick {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.btn--danger { background: var(--white); color: var(--red); border-color: rgba(193, 46, 4, 0.28); }
.btn--danger:hover { background: var(--red-soft); color: var(--red); }

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-base), background var(--t-base);
}
.site-header.is-scrolled {
  box-shadow: 0 6px 22px rgba(27, 28, 29, 0.07);
  background: rgba(255, 255, 255, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 20px);
  min-height: var(--header-h);
  position: relative;   /* anchor for the full-width mega panel */
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand:hover .brand-mark { transform: rotate(-8deg); }
.brand-mark { width: 38px; height: 38px; flex: none; transition: transform var(--t-base); }
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.98rem, 0.9rem + 0.3vw, 1.075rem);
  letter-spacing: -0.03em;
  color: var(--charcoal-dark);
  white-space: nowrap;
}
.brand-text span { color: var(--green-deep); }

.main-nav { margin-left: auto; min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;      /* never let a menu item wrap onto two lines */
}
.nav-list > li { margin: 0; position: static; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px clamp(8px, 0.85vw, 13px);
  border-radius: var(--r-sm);
  font-size: clamp(0.86rem, 0.79rem + 0.2vw, 0.94rem);
  font-weight: 600;
  color: var(--charcoal-2);
  position: relative;
  background: none;
  border: 0;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;    /* keeps "Ohms Law Wheel" / "How It Works" on one line */
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-link > span { white-space: nowrap; }
.nav-link svg { flex: none; opacity: 0.7; transition: opacity var(--t-fast); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 3px;
  height: 2px;
  background: var(--green-deep);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--green-pale); color: var(--green-ink); }
.nav-link:hover svg, .nav-link[aria-expanded="true"] svg { opacity: 1; }
.nav-link:hover::after, .nav-link.is-current::after { transform: scaleX(1); }
.nav-link.is-current { color: var(--green-ink); font-weight: 700; }

/* Between 980px and 1200px the icons are the first thing to go, so the
   labels always keep their own line. */
@media (min-width: 980px) and (max-width: 1199px) {
  .nav-link > svg:first-child { display: none; }
  .header-cta { padding-inline: 12px; }
}

.nav-caret { transition: transform var(--t-fast); }
.nav-link[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

/* Mega menu ---------------------------------------------------------------
   Anchored to .header-inner (not the <li>) so the panel is always centred
   inside the content column and can never overflow the viewport edge. */
.mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: min(840px, calc(100vw - 32px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  /* The category blocks carry their own bottom margin, so the panel needs
     less padding underneath them. */
  padding: 22px 22px 8px;
  /* Multi-column flow rather than a grid: the five category blocks are
     different heights, and columns pack them without leaving dead space. */
  display: block;
  columns: 2;
  column-gap: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
}
.mega::before {   /* thin green rule across the top of the panel */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: linear-gradient(90deg, var(--green-deep), var(--green) 55%, var(--green-light));
}
.mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-group {
  min-width: 0;
  background: var(--green-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 10px;
  margin: 0 0 14px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;   /* keeps the block intact inside a column */
  width: 100%;
  vertical-align: top;
}
.mega-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--green-ink);
  padding: 2px 8px 9px;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.05em;
}
.mega-title svg { color: var(--green-deep); flex: none; }
.mega-title span { min-width: 0; }
.mega-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-links li { margin: 0; }
.mega-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 550;
  white-space: nowrap;   /* the panel is sized so no item ever wraps */
  color: var(--charcoal-2);
  background: var(--white);
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast);
}
.mega-links a::before {
  content: "";
  flex: none;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.45;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.mega-links a:hover {
  background: var(--green-pale);
  color: var(--green-ink);
  border-color: var(--line-green);
  transform: translateX(2px);
}
.mega-links a:hover::before { opacity: 1; transform: scale(1.4); }

.header-cta { flex: none; margin-left: 2px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--charcoal);
}
.nav-toggle span {
  display: block;
  position: relative;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base), background var(--t-fast);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base), top var(--t-base);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* Tablet / small-laptop: keep the panel inside the content column. */
@media (min-width: 980px) and (max-width: 1199px) {
  .mega { width: min(780px, calc(100vw - 32px)); padding: 18px 18px 6px; }
  .mega-links a { font-size: 0.845rem; padding: 8px 9px; }
}

@media (max-width: 979px) {
  /* A backdrop-filter makes the header a containing block for fixed-position
     descendants, which would collapse the full-screen mobile menu below.
     The blur is decorative, so it is dropped at these widths. */
  .site-header,
  .site-header.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--white);
  }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding: 18px var(--gut) 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
    margin-left: 0;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; flex-wrap: wrap; }
  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 14px;
    font-size: 1rem;
    border: 1px solid var(--line);
    background: var(--white);
  }
  .nav-link > svg:first-child { display: inline-block; }
  .nav-link::after { display: none; }
  .nav-link[data-mega] { justify-content: flex-start; }
  .nav-link[data-mega] .nav-caret { margin-left: auto; }
  .mega {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 8px 0 4px;
    margin: 0;
    columns: 1;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mega::before { display: none; }
  .mega.is-open { display: block; transform: none; }
  .mega-group { margin-bottom: 10px; padding: 12px; }
  /* Narrow screens have no room to guarantee a single line, so allow wrapping
     rather than letting a long tool name overflow its card. */
  .mega-links a { font-size: 0.94rem; padding: 11px 10px; min-height: 44px; white-space: normal; }
  .nav-cta-mobile { margin-top: 18px; display: flex; width: 100%; }
}
@media (min-width: 980px) { .nav-cta-mobile { display: none; } }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg-light) 62%, var(--bg-sink) 100%);
  padding: clamp(44px, 5.5vw, 82px) 0 clamp(54px, 6vw, 90px);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% 8% auto;
  width: min(820px, 92vw);
  height: min(820px, 92vw);
  right: -14%;
  top: -22%;
  background: radial-gradient(circle at center, rgba(4, 185, 98, 0.16) 0%, rgba(4, 185, 98, 0.06) 42%, rgba(4, 185, 98, 0) 70%);
  z-index: -2;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-size: clamp(1.85rem, 1.25rem + 2.05vw, 2.75rem);
  line-height: 1.14;
  margin-bottom: 16px;
  text-wrap: balance;
  color: var(--charcoal-dark);
}
.hero h1 .hl {
  color: var(--green-deep);
  background: linear-gradient(180deg, transparent 66%, var(--green-light) 66%);
  padding-inline: 2px;
  border-radius: 2px;
}
.hero-desc {
  font-size: clamp(1rem, 0.97rem + 0.28vw, 1.12rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 58ch;
  margin-bottom: 26px;
}
.hero-desc strong { color: var(--charcoal-dark); font-weight: 700; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal-2);
  font-family: var(--font-display);
}
.hero-trust svg { color: var(--green); flex: none; }

.hero-visual { min-width: 0; display: flex; justify-content: center; }
.wheel-stage { position: relative; width: 100%; max-width: 520px; }
.wheel-stage svg { width: 100%; height: auto; display: block; }

.wheel-tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -140%);
  background: var(--charcoal-dark);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.wheel-tip.is-on { opacity: 1; }

/* Hero orbital animation */
.spin-cw { animation: spin-cw 42s linear infinite; transform-origin: 260px 260px; }
.spin-ccw { animation: spin-ccw 34s linear infinite; transform-origin: 260px 260px; }
.spin-node, .spin-node-inner { transform-box: fill-box; transform-origin: center; }
.spin-node { animation: spin-ccw 42s linear infinite; }
.spin-node-inner { animation: spin-cw 34s linear infinite; }
.pulse-core { animation: core-breathe 6s ease-in-out infinite; transform-origin: 260px 260px; }
.packet { animation: packet-flow 7s linear infinite; }
.flicker { animation: soft-flicker 5s ease-in-out infinite; }

@keyframes spin-cw { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@keyframes core-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}
@keyframes packet-flow { to { stroke-dashoffset: -320; } }
@keyframes soft-flicker { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }

.wheel-stage.is-paused .spin-cw,
.wheel-stage.is-paused .spin-ccw,
.wheel-stage.is-paused .spin-node,
.wheel-stage.is-paused .spin-node-inner,
.wheel-stage.is-paused .packet { animation-play-state: paused; }

.node-hit { cursor: pointer; outline: none; }
.node-chip { transition: transform var(--t-fast); transform-origin: center; }
.node-chip circle, .node-chip text { transition: fill var(--t-fast); }
.node-hit:hover .node-chip circle, .node-hit:focus-visible .node-chip circle { fill: var(--green-deep); }
.node-hit:hover .node-chip text, .node-hit:focus-visible .node-chip text { fill: #fff; }
/* Keyboard focus gets a visible ring; a pointer click does not. */
.node-hit:focus-visible .node-chip { outline: 3px solid var(--green-ink); outline-offset: 3px; border-radius: 50%; }

@media (max-width: 899px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  /* Headline and description lead on small screens; the wheel follows. */
  .hero-copy { order: 1; }
  .hero-visual { order: 2; margin-top: 8px; }
  .wheel-stage { max-width: 360px; }
  .hero-decor-extra { display: none; }
}
@media (max-width: 519px) {
  .wheel-stage { max-width: 300px; }
}

/* --------------------------------------------------------------------------
   6. Page hero (inner pages)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white), var(--bg-light));
  border-bottom: 1px solid var(--line);
  padding: clamp(26px, 3vw, 40px) 0 clamp(34px, 4vw, 52px);
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -40%; right: -6%;
  width: 560px; height: 560px;
  background: radial-gradient(circle at center, rgba(4, 185, 98, 0.15), rgba(4, 185, 98, 0) 68%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.5vw, 2.85rem); max-width: 18ch; text-wrap: balance; }
.page-hero .lede { max-width: 62ch; margin-bottom: 0; }

.hero-symbols { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-symbols svg { position: absolute; color: var(--green); opacity: 0.16; }
.hero-symbols svg:nth-child(1) { top: 18%; right: 12%; animation: float-a 9s ease-in-out infinite; }
.hero-symbols svg:nth-child(2) { top: 58%; right: 26%; animation: float-b 11s ease-in-out infinite; }
.hero-symbols svg:nth-child(3) { top: 30%; right: 40%; animation: float-a 13s ease-in-out infinite; }
@keyframes float-a { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-b { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@media (max-width: 767px) { .hero-symbols { display: none; } }

/* Breadcrumb */
.crumbs { margin-bottom: 16px; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: rgba(36,37,38,0.3); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green-dark); }
.crumbs [aria-current="page"] { color: var(--charcoal); font-weight: 600; }

/* --------------------------------------------------------------------------
   7. Cards & grids
   -------------------------------------------------------------------------- */
/* Card grids follow one rule everywhere on the site:
   3 per row on desktop, 2 on tablet, 1 on mobile. */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > * { min-width: 0; }

@media (max-width: 1023px) {
  .grid--3{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .grid { gap: 16px; }
  .grid--2, .grid--3{ grid-template-columns: minmax(0, 1fr); }
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.card::before {   /* green rule that sweeps in on hover */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.card:hover {
  border-color: var(--line-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.card:hover::before { transform: scaleX(1); }
.card h3 { font-size: 1.08rem; margin-bottom: 8px; color: var(--charcoal-dark); }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--green-pale);
  color: var(--green-deep);
  border: 1px solid var(--line-green);
  margin-bottom: 14px;
  flex: none;
  transition: background var(--t-base), color var(--t-base),
              border-color var(--t-base), transform var(--t-base);
}
.card:hover .icon-badge {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
  transform: translateY(-2px);
}

/* Steps */
.steps { counter-reset: step; }
.step-card { position: relative; padding-right: 62px; }
.step-num {
  position: absolute;
  top: 20px; right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green-pale);
  border: 1px solid var(--line-green);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--green-deep);
  line-height: 1;
  transition: background var(--t-base), color var(--t-base),
              border-color var(--t-base), transform var(--t-base),
              box-shadow var(--t-base);
}
/* Hover: the number fills with solid brand green, smoothly. */
.step-card:hover .step-num {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
  transform: scale(1.1);
  box-shadow: var(--shadow-green);
}

/* Formula presentation ---------------------------------------------------- */
.formula-block {
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.formula-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.formula-eq {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.2rem);
  font-weight: 600;
  color: var(--charcoal-dark);
  white-space: nowrap;
}

.eq-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.eq-list li {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green-light);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--charcoal-dark);
  transition: border-left-color var(--t-base), background var(--t-base);
}

/* Formula reference cards — smooth green hover, matching the tool cards. */
.wheel-group-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base),
              transform var(--t-base), background var(--t-base);
}
.wheel-group-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.wheel-group-card:hover {
  border-color: var(--line-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.wheel-group-card:hover::before { transform: scaleX(1); }
/* Set from the wheel: the card for the selected quadrant stays lit. */
.wheel-group-card.is-focus {
  border-color: var(--green);
  background: var(--green-tint);
  box-shadow: var(--shadow-md);
}
.wheel-group-card.is-focus::before { transform: scaleX(1); }
.wheel-group-card.is-focus .eq-list li { border-left-color: var(--green); }
.wheel-group-card.is-focus .wheel-group-icon {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
}
.wheel-group-card:hover .eq-list li { border-left-color: var(--green); background: var(--green-tint); }
.wheel-group-card:hover .wheel-group-icon {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
}
.wheel-group-card h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
/* inherit, so the icon flips to white together with its badge on hover */
.wheel-group-card h3 svg { color: inherit; flex: none; }
.wheel-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--green-pale);
  border: 1px solid var(--line-green);
  color: var(--green-deep);
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}
.wheel-group-note {
  margin-top: 14px;
  font-size: 0.91rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* Long-form explanation cards (two per row) ------------------------------- */
.info-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.2vw, 28px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.info-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--green-deep), var(--green));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-base);
}
.info-card:hover {
  border-color: var(--line-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.info-card:hover::before { transform: scaleY(1); }
.info-card:hover .icon-badge {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
}
.info-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.info-card-head .icon-badge { margin-bottom: 0; width: 42px; height: 42px; border-radius: 12px; }
.info-card h3 { margin: 0; font-size: 1.08rem; color: var(--charcoal-dark); }
.info-card p { color: var(--muted); font-size: 0.955rem; margin-bottom: 0.9rem; }
.info-card p:last-child { margin-bottom: 0; }
.info-card .eq-inline {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green-ink);
  background: var(--green-pale);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Notes / callouts -------------------------------------------------------- */
.note {
  display: flex;
  gap: 12px;
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  background: var(--bg-light);
  margin: 0 0 18px;
}
.note svg { flex: none; margin-top: 2px; }
.note p { margin-bottom: 0; }
.note--caution { background: var(--red-soft); border-color: rgba(193, 46, 4, 0.22); color: #6d2205; }
.note--caution svg { color: var(--red); }
.note--info { background: var(--green-pale); border-color: rgba(4, 185, 98, 0.22); }
.note--info svg { color: var(--green-dark); }

/* Data tables ------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 18px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 0.93rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg-sink); font-family: var(--font-display); font-weight: 650; font-size: 0.85rem; color: var(--charcoal-dark); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: rgba(247, 249, 248, 0.7); }

/* --------------------------------------------------------------------------
   8. Calculator directory (vertical tabs)
   -------------------------------------------------------------------------- */
.dir-layout { display: block; }

/* Horizontal category filter bar */
.dir-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  margin-bottom: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.dir-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  justify-content: center;
  text-align: left;
  padding: 11px 16px;
  min-height: 46px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--charcoal-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.dir-tab svg { flex: none; color: var(--green-deep); transition: color var(--t-fast); }
.dir-tab .dir-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  height: 21px;
  border-radius: var(--r-pill);
  background: var(--green-pale);
  border: 1px solid var(--line-green);
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--green-ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.dir-tab:hover {
  border-color: var(--line-green);
  background: var(--green-pale);
  color: var(--green-ink);
  transform: translateY(-1px);
}
.dir-tab[aria-selected="true"] {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
  box-shadow: var(--shadow-green);
}
.dir-tab[aria-selected="true"] svg { color: var(--white); }
.dir-tab[aria-selected="true"] .dir-tab-count {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--white);
}

.dir-panels { min-width: 0; }
.dir-panel { display: none; }
.dir-panel.is-active { display: block; animation: panel-in 300ms var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dir-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
}
.dir-foot p { margin: 0; font-size: 0.94rem; color: var(--muted); }
.dir-foot strong { color: var(--charcoal-dark); }

/* Tool cards — vertical tiles inside the directory, three to a row. */
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  color: inherit;
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base),
              transform var(--t-base), background var(--t-base);
}
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.tool-card:hover {
  border-color: var(--line-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  color: inherit;
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card:hover .tool-icon {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--white);
}
.tool-card:hover .tool-body h3 { color: var(--green-ink); }
.tool-card:hover .tool-arrow { transform: translateX(3px); color: var(--green-deep); }
.tool-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  background: var(--green-pale);
  border: 1px solid var(--line-green);
  color: var(--green-deep);
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}
.tool-body { min-width: 0; flex: 1; }
.tool-body h3 { font-size: 1rem; margin: 0 0 5px; transition: color var(--t-base); }
.tool-body p { font-size: 0.89rem; color: var(--muted); margin: 0; }
.tool-arrow { flex: none; color: var(--muted); margin-top: 11px; transition: transform var(--t-base), color var(--t-base); }

/* In a three-up grid the cards stack their icon on top so the titles have the
   full card width, with the arrow pinned top-right. */
.dir-panel .tool-card,
.related-grid .tool-card { flex-direction: column; gap: 12px; padding-right: 52px; }
.dir-panel .tool-card .tool-arrow,
.related-grid .tool-card .tool-arrow { position: absolute; top: 22px; right: 20px; margin: 0; }

@media (max-width: 899px) {
  .dir-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-radius: var(--r-lg);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .dir-tab { flex: 0 0 auto; justify-content: flex-start; font-size: 0.86rem; padding: 10px 14px; }
}
@media (max-width: 599px) {
  .dir-panel .tool-card,
  .related-grid .tool-card { flex-direction: row; padding-right: 20px; }
  .dir-panel .tool-card .tool-arrow,
  .related-grid .tool-card .tool-arrow { position: static; margin-top: 11px; }
}

/* --------------------------------------------------------------------------
   9. Reviews carousel
   -------------------------------------------------------------------------- */
.reviews { overflow: hidden; }
.reviews-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.reviews-head .section-head { margin-bottom: 0; }
.review-controls { display: flex; gap: 8px; }
.rv-btn {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.rv-btn:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.reviews-viewport { overflow: hidden; }
.reviews-track {
  display: flex;
  gap: 18px;
  will-change: transform;
}
.review-card {
  flex: 0 0 auto;
  width: calc((var(--wrap) - 2 * var(--gut) - 36px) / 3);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 268px;
}
.rv-quote { color: var(--green-light); flex: none; }
.rv-text { font-size: 0.95rem; color: var(--charcoal-2); margin: 0; flex: 1; }
.rv-stars { display: flex; gap: 2px; color: var(--green); }
.rv-foot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.rv-avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  border: 1px solid rgba(4,185,98,0.25);
}
.rv-meta { min-width: 0; }
.rv-name { font-family: var(--font-display); font-weight: 650; font-size: 0.95rem; color: var(--charcoal-dark); }
.rv-country { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.rv-country img { border-radius: 2px; border: 1px solid var(--line); flex: none; }

.review-disclaimer { margin-top: 18px; font-size: 0.86rem; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }
.review-disclaimer svg { flex: none; margin-top: 3px; color: var(--muted); }

@media (max-width: 1259px) { .review-card { width: 320px; } }
@media (max-width: 767px) { .review-card { width: 300px; min-height: 250px; } }
@media (max-width: 400px) { .review-card { width: 268px; } }

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */
.faq-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.faq-col { min-width: 0; }
.faq-col-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.faq-col-head svg { color: var(--green-dark); flex: none; }
.faq-col-head h3 { margin: 0; font-size: 1.1rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.faq-item:hover { border-color: var(--line-green); }
.faq-item[open] { border-color: var(--green); box-shadow: var(--shadow-sm); }
.faq-item[open] summary { color: var(--green-ink); background: var(--green-tint); }
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.98rem;
  color: var(--charcoal-dark);
  list-style: none;
  min-height: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 11px; height: 11px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t-base);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-item summary:hover { background: var(--green-pale); }
.faq-answer { padding: 0 18px 17px; font-size: 0.95rem; color: var(--muted); }
.faq-answer p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   11. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal-2) 100%);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(30px, 4vw, 52px);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-band::after {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(4, 185, 98, 0.28), rgba(4, 185, 98, 0) 68%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--white); max-width: 22ch; margin-inline: auto; }
.cta-band p { color: rgba(255, 255, 255, 0.76); max-width: 60ch; margin-inline: auto; margin-bottom: 24px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta-band .btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.28); box-shadow: none; }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); border-color: rgba(255,255,255,0.5); }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.72);
  padding: clamp(46px, 5vw, 68px) 0 28px;
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  /* Link columns size to their own content so no calculator name wraps;
     the brand column absorbs whatever width is left over. */
  grid-template-columns: minmax(200px, 1fr) repeat(3, auto);
  gap: 34px clamp(20px, 2.6vw, 46px);
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand .brand-text { color: var(--white); }
.footer-brand p { margin: 16px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 0.92rem; max-width: 34ch; }
.footer-col h3 {
  display: flex; align-items: center; gap: 8px;
  color: var(--white);
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.footer-col h3 svg { color: var(--green); flex: none; }
.footer-col { min-width: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  white-space: nowrap;   /* columns are auto-sized, so links stay on one line */
}
.footer-col a svg { opacity: 0.45; flex: none; transition: opacity var(--t-fast), transform var(--t-fast); }
.footer-col a:hover { color: var(--green); }
.footer-col a:hover svg { opacity: 1; transform: translateX(2px); }

.footer-bottom { padding-top: 22px; text-align: center; }
.footer-note {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.45);
  max-width: 72ch;
  margin: 0 auto 12px;
}
.footer-copy { font-size: 0.88rem; color: rgba(255, 255, 255, 0.62); margin: 0; }
/* Focus keyword in the copyright line: green, never underlined. */
.footer-keyword {
  color: var(--green);
  font-weight: 650;
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-keyword:hover,
.footer-keyword:focus-visible { color: var(--green-mid); text-decoration: none; }

@media (max-width: 1199px) {
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(180px, auto)); justify-content: space-between; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 979px) { .footer-grid { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: clamp(24px, 6vw, 70px); } }
@media (max-width: 519px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-col a { white-space: normal; }
}

/* Scroll to top */
.to-top {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 80;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base), background var(--t-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green); }

/* --------------------------------------------------------------------------
   13. Misc content blocks
   -------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(24px, 3vw, 44px); align-items: start; }
.split > * { min-width: 0; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px; font-size: 0.96rem; }
.check-list svg { color: var(--green); flex: none; margin-top: 4px; }

.error-page { text-align: center; padding: clamp(60px, 9vw, 120px) 0; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 2rem + 12vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--green);
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   14. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .spin-cw, .spin-ccw, .spin-node, .spin-node-inner,
  .packet, .pulse-core, .flicker, .hero-symbols svg { animation: none !important; }
}

/* --------------------------------------------------------------
   Content page utilities
   -------------------------------------------------------------- */
.wrap--narrow { max-width: 820px; }

.section-lede {
  max-width: 62ch;
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 26px;
}

.meta-line {
  font-size: 0.88rem;
  color: var(--muted);
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.faq-list { display: grid; gap: 12px; }

.content-section h2 {
  font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.75rem);
  margin-top: 38px;
  margin-bottom: 14px;
}
.content-section > .wrap > h2:first-child,
.content-section > .wrap--narrow > h2:first-child { margin-top: 0; }
.content-section h3 { font-size: 1.05rem; margin-bottom: 8px; }
.content-section p { max-width: 70ch; }
.content-section .grid p,
.content-section .card p { max-width: none; }
.content-section ul.check-list { margin-bottom: 18px; }
