/* Charging Tools Hub — design system (v3)
   Mobile-first, zero external dependencies: no CDN, no remote fonts, no remote images.
   Depth is built from three tiers (surface / raised / inset) instead of heavy shadows,
   typography is a fixed scale with tighter heading tracking, and every animation is
   switched off under prefers-reduced-motion: reduce. */

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light;

  /* palette — semantics unchanged from v1: brand, accent, ok, warn, danger */
  --ink: #0d1a2b;
  --ink-soft: #26374d;
  --muted: #55637a;
  --muted-strong: #42526b;
  --bg: #f5f8fc;
  --bg-tint: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --line: #dbe4f0;
  --line-strong: #c3d0e2;

  --brand: #1652f0;
  --brand-dark: #0e3cb4;
  --brand-tint: #e8efff;
  --accent: #047f74;
  --accent-tint: #e2f4f1;

  --ok: #0f6e46;
  --ok-tint: #e4f4ec;
  --warn: #8a4b00;
  --warn-tint: #fdf1de;
  --danger: #b3261e;
  --danger-tint: #fdecea;

  /* type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --t-xs: .76rem;
  --t-sm: .85rem;
  --t-base: 1rem;
  --t-md: 1.06rem;
  --t-lg: 1.2rem;
  --measure: 66ch;

  /* shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* depth — three tiers: inset (recessed), surface (default), raised (lifted) */
  --inset-bg: linear-gradient(180deg, #eef3fa, #f6f9fd);
  --raised-bg: linear-gradient(180deg, #ffffff, #fbfdff);
  --shadow-1: inset 0 1px 2px rgba(13, 26, 43, .05);
  --shadow-2: 0 1px 2px rgba(13, 26, 43, .05), 0 6px 16px -6px rgba(13, 26, 43, .14);
  --shadow-3: 0 2px 4px rgba(13, 26, 43, .05), 0 18px 40px -18px rgba(13, 26, 43, .28);

  /* legacy aliases kept for older markup */
  --shadow-sm: var(--shadow-2);
  --shadow-md: var(--shadow-2);
  --shadow-lg: var(--shadow-3);

  --wrap: 1120px;
  --gap: 1rem;
  --focus: 3px solid #1652f0;

  /* motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --dur-1: .16s;
  --dur-2: .32s;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #eaf0f8;
    --ink-soft: #d3ddec;
    --muted: #a2b1c6;
    --muted-strong: #bccadb;
    --bg: #0b1220;
    --bg-tint: #111b2c;
    --surface: #131e30;
    --surface-2: #18243a;
    --line: #26344b;
    --line-strong: #35455f;

    --brand: #7ea2ff;
    --brand-dark: #5c86f5;
    --brand-tint: #1b2c50;
    --accent: #57d6c6;
    --accent-tint: #12332f;

    --ok: #6bd6a3;
    --ok-tint: #10322a;
    --warn: #f2c078;
    --warn-tint: #33260f;
    --danger: #ff9c94;
    --danger-tint: #3a1614;

    --inset-bg: linear-gradient(180deg, #0e1728, #101b2c);
    --raised-bg: linear-gradient(180deg, #17243a, #131e30);
    --shadow-1: inset 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 20px -8px rgba(0, 0, 0, .7);
    --shadow-3: 0 2px 4px rgba(0, 0, 0, .5), 0 22px 48px -20px rgba(0, 0, 0, .85);
    --focus: 3px solid #7ea2ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

/* ---------------------------------------------------------- typography scale */

h1, h2, h3, h4 {
  line-height: 1.16;
  margin: 0 0 .5em;
  letter-spacing: -.026em;
  color: var(--ink);
  text-wrap: balance;
  font-weight: 740;
}

h1 { font-size: clamp(2.05rem, 5.2vw, 3.3rem); line-height: 1.06; letter-spacing: -.034em; }
h2 { font-size: clamp(1.42rem, 3vw, 2rem); margin-top: 2.2rem; letter-spacing: -.03em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.32rem); margin-top: 1.6rem; letter-spacing: -.02em; }
h4 { font-size: 1.02rem; margin-top: 1.3rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }

strong { font-weight: 660; }

small { font-size: .82rem; }

code, kbd, samp { font-family: var(--mono); font-size: .9em; }

::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: .7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.15rem;
}

/* ---------------------------------------------------------------- header */

.site-header {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px) saturate(140%);
  transition: box-shadow var(--dur-2) ease, border-color var(--dur-2) ease;
}
.site-header.is-scrolled {
  box-shadow: 0 10px 24px -18px rgba(13, 26, 43, .5);
  border-bottom-color: color-mix(in srgb, var(--line) 70%, var(--muted));
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .7rem 1.15rem;
  max-width: var(--wrap);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 760;
  font-size: 1.02rem;
  letter-spacing: -.025em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  flex: none;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand) 70%, transparent);
}
.brand-sub { display: block; font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .01em; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .12rem .3rem;
}
.site-nav a {
  display: inline-block;
  padding: .45rem .62rem;
  border-radius: var(--r-sm);
  color: var(--muted-strong);
  text-decoration: none;
  font-size: var(--t-sm);
  font-weight: 560;
  white-space: nowrap;
  transition: background var(--dur-1) ease, color var(--dur-1) ease;
}
.site-nav a:hover { background: var(--bg-tint); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-dark); }

@media (max-width: 760px) {
  .header-inner { padding: .6rem .85rem; }
  .site-nav { margin-left: 0; width: 100%; min-width: 0; max-width: 100%; }
  .site-nav ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .35rem;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }
  .site-nav ul::-webkit-scrollbar { height: 6px; }
  .site-nav ul::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
  .site-nav ul::-webkit-scrollbar-track { background: transparent; }
  .site-nav a { font-size: .82rem; padding: .35rem .5rem; }
}

/* ------------------------------------------------------------ breadcrumbs */

.crumbs {
  font-size: .82rem;
  color: var(--muted);
  padding: .9rem 0 0;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 0;
  padding: 0;
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: .3rem; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--muted-strong); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink-soft); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 2.4rem 0 2rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-tint) 70%, var(--bg)), var(--bg));
  border-bottom: 1px solid var(--line);
}

/* faint grid + two low-opacity light pools, drawn in CSS only */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--brand) 12%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--brand) 12%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(115% 85% at 12% -12%, #000 0%, rgba(0, 0, 0, .35) 52%, transparent 76%);
  mask-image: radial-gradient(115% 85% at 12% -12%, #000 0%, rgba(0, 0, 0, .35) 52%, transparent 76%);
  opacity: .8;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -25% -8% auto -8%;
  height: 130%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 300px at 10% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    radial-gradient(560px 280px at 88% 8%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 72%);
}

.hero > .wrap { position: relative; z-index: 1; }

.hero--home { padding: 3.1rem 0 2.8rem; }

.hero h1 { max-width: 21ch; }
.lede {
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.62;
  color: var(--muted-strong);
  max-width: 60ch;
  margin-bottom: 1.3rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--accent);
  margin-bottom: .75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: .4rem; }

/* hero illustration: stacked under the text on narrow screens, beside it above 900px */
.hero-art { margin: 1.6rem auto 0; max-width: 460px; }
.hero-art img { display: block; width: 100%; height: auto; }

@media (min-width: 900px) {
  .hero--art > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    column-gap: 2.6rem;
    align-items: center;
  }
  .hero--art > .wrap > *:not(.hero-art) { grid-column: 1; }
  .hero--art .hero-art {
    grid-column: 2;
    grid-row: 1 / span 6;
    margin: 0;
    max-width: none;
  }
  .hero--home .hero-art { max-width: none; }
}

/* inline illustration figure used inside article bodies */
.page-art {
  margin: 1.4rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--inset-bg);
  box-shadow: var(--shadow-1);
  max-width: 560px;
}
.page-art img { display: block; width: 100%; height: auto; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .72rem 1.2rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand));
  color: #fff;
  font: inherit;
  font-weight: 640;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 46px;
  box-shadow: 0 1px 2px rgba(13, 26, 43, .12), 0 8px 18px -10px color-mix(in srgb, var(--brand) 90%, transparent);
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) ease,
              background var(--dur-1) ease, border-color var(--dur-1) ease, color var(--dur-1) ease;
}
.btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(13, 26, 43, .14), 0 14px 26px -12px color-mix(in srgb, var(--brand) 95%, transparent);
}
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
  box-shadow: var(--shadow-1);
}
.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--muted);
  box-shadow: var(--shadow-2);
}
.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
  padding-inline: .5rem;
  text-decoration: underline;
  text-underline-offset: .2em;
  min-height: 42px;
  box-shadow: none;
}
.btn--quiet:hover { background: transparent; color: var(--brand-dark); box-shadow: none; transform: none; }
.btn--block { width: 100%; }

.btn:focus-visible { outline-offset: 3px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin-top: 1.15rem;
}

/* ------------------------------------------------------- cards & layout */

.card {
  background: var(--raised-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-2);
}
.card + .card { margin-top: 1rem; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* explicit depth tiers */
.card--raised {
  background: var(--raised-bg);
  box-shadow: var(--shadow-3);
  transform: none;
}
.card--inset {
  background: var(--inset-bg);
  box-shadow: var(--shadow-1);
  border-color: color-mix(in srgb, var(--line) 80%, var(--surface));
}

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.section { padding: 2.6rem 0; }
.section--tight { padding: 1.6rem 0; }
.section-head { max-width: 68ch; margin-bottom: 1.3rem; }
.section-head p { color: var(--muted-strong); margin-bottom: 0; }

/* ----------------------------------------------------------- tool cards */

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: var(--raised-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.2rem 1.2rem 1.05rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-2);
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 46%);
  opacity: 0;
  transition: opacity var(--dur-2) ease;
}
.tool-card:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: var(--shadow-3);
  transform: translateY(-3px);
  color: inherit;
}
.tool-card:hover::after { opacity: 1; }
.tool-card:hover .tool-go { gap: .55rem; }
.tool-card:hover .tool-icon {
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
  color: var(--brand-dark);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}
.tool-card .tool-title { font-weight: 700; font-size: 1.04rem; letter-spacing: -.015em; }
.tool-card .tool-desc { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.55; }
.tool-kicker {
  font-size: .71rem;
  font-weight: 720;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.tool-card .tool-go {
  margin-top: auto;
  padding-top: .5rem;
  font-size: .87rem;
  font-weight: 640;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: gap var(--dur-1) var(--ease-out);
}

.tool-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--brand);
  margin-bottom: .35rem;
  transition: background var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease;
}

/* ----------------------------------------------------------------- icons */

.icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 26px; height: 26px; }

.icon-inline {
  display: inline-block;
  vertical-align: -.18em;
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ----------------------------------------------------------------- forms */

.tool {
  background: var(--raised-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.tool-head {
  padding: 1.25rem 1.35rem .3rem;
}
.tool-head h2, .tool-head h3 { margin-bottom: .3rem; }
.tool-head p { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.tool-body { padding: 0 1.35rem 1.35rem; }

@media (max-width: 560px) {
  .tool-head { padding: 1.1rem 1rem .2rem; }
  .tool-body { padding: 0 1rem 1.1rem; }
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
}
legend {
  font-weight: 650;
  font-size: .95rem;
  padding: 0;
  margin-bottom: .55rem;
  color: var(--ink);
}

.field { margin-bottom: .95rem; }
.field:last-child { margin-bottom: 0; }

.field > label,
.field-label {
  display: block;
  font-weight: 590;
  font-size: .89rem;
  margin-bottom: .32rem;
  color: var(--ink-soft);
}
.hint {
  display: block;
  font-weight: 400;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: .25rem;
}

.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease;
}
.input-group:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-strong)); }
.input-group:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.input-group input,
.input-group select {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: .66rem .72rem;
  font: inherit;
  color: var(--ink);
}
.input-group input:focus,
.input-group select:focus { outline: none; }
.input-group .unit {
  display: inline-flex;
  align-items: center;
  padding: 0 .72rem;
  background: var(--surface-2);
  border-left: 1px solid var(--line);
  font-size: var(--t-sm);
  color: var(--muted-strong);
  font-weight: 620;
  white-space: nowrap;
}
.input-group select.unit-select {
  border-left: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--t-sm);
  font-weight: 620;
  color: var(--muted-strong);
  padding: .66rem 1.6rem .66rem .6rem;
  flex: 0 0 auto;
  width: auto;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, currentColor 50%), linear-gradient(-45deg, transparent 49%, currentColor 50%);
  background-position: right 1rem center, right .65rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input[type="text"], input[type="number"], input[type="email"], select, textarea {
  font: inherit;
  color: var(--ink);
}

/* standalone controls */
.control, .field > :where(select) {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: .66rem .72rem;
  font-size: 1rem;
  min-height: 46px;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease;
}
.control:hover, .field > :where(select):hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-strong)); }
.control:focus, .field > :where(select):focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
select.control, .field > :where(select) { text-overflow: ellipsis;
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 49%, var(--muted-strong) 50%),
                    linear-gradient(-45deg, transparent 49%, var(--muted-strong) 50%);
  background-position: right 1.05rem center, right .7rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-error {
  display: none;
  align-items: flex-start;
  gap: .4rem;
  margin-top: .35rem;
  font-size: .84rem;
  font-weight: 560;
  color: var(--danger);
}
.field-error::before { content: "⚠"; font-size: .95rem; line-height: 1.4; }
.field.has-error .field-error { display: flex; }
.field.has-error .input-group,
.field.has-error .control, .field.has-error > :where(select) {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.help-inline {
  font-size: .82rem;
  line-height: 1.55;
  color: var(--muted);
  margin: .45rem 0 0;
}

details.disclosure {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: .5rem .72rem;
  margin-top: .6rem;
  background: var(--surface-2);
}
details.disclosure summary {
  cursor: pointer;
  font-size: .84rem;
  font-weight: 620;
  color: var(--brand);
}
details.disclosure summary:hover { color: var(--brand-dark); }
details.disclosure[open] summary { margin-bottom: .5rem; }
details.disclosure p, details.disclosure ul { font-size: .84rem; color: var(--muted-strong); }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem .78rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: .86rem;
  cursor: pointer;
  background: var(--surface);
  min-height: 42px;
  transition: border-color var(--dur-1) ease, background var(--dur-1) ease, color var(--dur-1) ease;
}
.radio-row label:hover { border-color: var(--brand); }
.radio-row input { accent-color: var(--brand); margin: 0; }
.radio-row input:checked + span { font-weight: 660; }
.radio-row label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.radio-row label:has(input:focus-visible) {
  outline: var(--focus);
  outline-offset: 2px;
}

/* --------------------------------------------- numbered group cards (forms) */

.group-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow-2);
  margin-bottom: .9rem;
}
.group-card:last-of-type { margin-bottom: 0; }

.group-head {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: .95rem;
}
.group-head > div { min-width: 0; }

.group-num {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  background: var(--brand-tint);
  color: var(--brand-dark);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
}
.group-title {
  font-size: .99rem;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 .15rem;
  line-height: 1.3;
}
.group-help {
  font-size: .82rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* "More options" — native details/summary, usable with JavaScript switched off */
details.adv {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--inset-bg);
  box-shadow: var(--shadow-1);
  margin: 0 0 .9rem;
}
details.adv > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.05rem;
  font-size: .88rem;
  font-weight: 660;
  color: var(--ink-soft);
  border-radius: var(--r-lg);
  transition: background var(--dur-1) ease, color var(--dur-1) ease;
}
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before {
  content: "+";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: .9rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--brand);
  line-height: 1;
}
details.adv[open] > summary::before { content: "–"; }
details.adv > summary:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); color: var(--brand-dark); }
details.adv > summary:focus-visible { outline: var(--focus); outline-offset: 2px; }
details.adv[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details.adv .adv-body { padding: .2rem 1.05rem 1.05rem; }
details.adv .adv-body > :first-child { margin-top: 0; }

/* ------------------------------------------------- brand → model quick pick */

.quickpick {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface));
  padding: .95rem 1.05rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-2);
}
.quickpick[hidden] { display: none; }

.quickpick__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .6rem;
  margin-bottom: .75rem;
}
.quickpick__title {
  font-size: .95rem;
  font-weight: 720;
  letter-spacing: -.015em;
  margin: 0;
}
.quickpick__tag {
  font-size: .7rem;
  font-weight: 720;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.quickpick__row {
  display: grid;
  gap: .7rem;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .quickpick__row { grid-template-columns: 1fr 1fr; }
}
.quickpick__field { min-width: 0; }
.quickpick__field label {
  display: block;
  font-size: .8rem;
  font-weight: 620;
  color: var(--muted-strong);
  margin-bottom: .25rem;
}
.quickpick__note {
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
  margin: .6rem 0 0;
}
.quickpick__specs {
  margin: .6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .45rem;
  font-size: .78rem;
}
.quickpick__specs span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .16rem .5rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-weight: 580;
}
.quickpick select:disabled { color: var(--muted); background: var(--surface-2); cursor: not-allowed; }

/* highlight on fields the picker wrote into */
.is-prefilled {
  animation: prefilled-flash 1.15s var(--ease-out) 1;
}
@keyframes prefilled-flash {
  0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--brand); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
.is-prefilled .input-group,
.is-prefilled.input-group { border-color: var(--brand); }

/* --------------------------------------------------------------- results */

.result {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--raised-bg);
  padding: 1.15rem 1.2rem 1.2rem 1.4rem;
  margin-top: 1.15rem;
  box-shadow: var(--shadow-2);
}
.result[hidden] { display: none; }

/* status colour bar: same semantics as the badges (ok / warn / danger / info) */
.result::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--line-strong);
}
.result--ok { border-color: color-mix(in srgb, var(--ok) 34%, var(--line)); }
.result--ok::before { background: var(--ok); }
.result--warn { border-color: color-mix(in srgb, var(--warn) 34%, var(--line)); }
.result--warn::before { background: var(--warn); }
.result--danger { border-color: color-mix(in srgb, var(--danger) 34%, var(--line)); }
.result--danger::before { background: var(--danger); }
.result--info { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.result--info::before { background: var(--brand); }
.result--neutral::before { background: var(--line-strong); }

.result-label {
  font-size: .73rem;
  font-weight: 720;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .35rem;
}

.stat-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .55rem;
  margin: 0 0 .4rem;
}

.result-figure {
  font-size: clamp(2.1rem, 6.4vw, 3.1rem);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 0 0 .35rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-value .result-figure { margin: 0; }

.stat-unit {
  font-size: .95rem;
  font-weight: 680;
  color: var(--muted-strong);
  letter-spacing: .01em;
}

/* static status chip that sits next to a big figure */
.result-state {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 720;
  letter-spacing: .01em;
  border: 1px solid transparent;
  margin-bottom: .6rem;
}
.result-state--ok { background: var(--ok-tint); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.result-state--warn { background: var(--warn-tint); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.result-state--info { background: var(--brand-tint); color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 32%, transparent); }
.result-state--muted { background: var(--bg-tint); color: var(--muted-strong); border-color: var(--line); }

.result-verdict { font-size: 1.04rem; font-weight: 660; margin: 0 0 .6rem; line-height: 1.45; }
.result-note { font-size: .88rem; color: var(--muted-strong); margin: 0 0 .8rem; }

.result-block { margin-top: 1rem; }
.result-block h3, .result-block h4 {
  font-size: .79rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin: 0 0 .4rem;
  font-weight: 700;
}
.result-block ul { margin-bottom: 0; font-size: .9rem; }
.result-block ol { margin-bottom: 0; font-size: .9rem; }
.result-block p { font-size: .9rem; margin-bottom: .4rem; }

.math {
  font-family: var(--mono);
  font-size: .86rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .55rem .7rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--ok { background: var(--ok-tint); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge--warn { background: var(--warn-tint); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge--danger { background: var(--danger-tint); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.badge--info { background: var(--brand-tint); color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.badge--muted { background: var(--bg-tint); color: var(--muted-strong); border-color: var(--line); }

.callout {
  border-left: 4px solid var(--brand);
  background: var(--brand-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: .9rem 1.05rem;
  margin: 1.2rem 0;
  font-size: .92rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout--danger { border-left-color: var(--danger); background: var(--danger-tint); }
.callout--warn { border-left-color: var(--warn); background: var(--warn-tint); }
.callout--accent { border-left-color: var(--accent); background: var(--accent-tint); }
.callout strong { color: inherit; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--surface);
  min-width: 480px;
}
caption {
  caption-side: top;
  text-align: left;
  padding: .7rem .85rem;
  font-size: .84rem;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
th, td {
  text-align: left;
  padding: .62rem .85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  background: var(--surface-2);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-strong);
  white-space: nowrap;
}
tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------- lists, spec blocks */

.ticks { list-style: none; padding-left: 0; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}
.ticks--warn li::before { content: "!"; color: var(--warn); }
.ticks--danger li::before { content: "!"; color: var(--danger); }

.specs-first {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 1.15rem;
  box-shadow: var(--shadow-1);
}
.spec-line {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .6rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: .9rem;
}
.spec-line:last-child { border-bottom: 0; }
.spec-line dt { font-weight: 650; min-width: 11rem; margin: 0; color: var(--ink-soft); }
.spec-line dd { margin: 0; color: var(--muted-strong); flex: 1 1 16rem; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: 3.4rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 1.5rem;
  font-size: .88rem;
}
.footer-grid {
  display: grid;
  gap: 1.7rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.7rem;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer h2 {
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin: 0 0 .65rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: var(--muted-strong); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-about p { color: var(--muted); max-width: 40ch; margin-bottom: .6rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: space-between;
  font-size: .8rem;
}

/* ------------------------------------------------------------------ misc */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.stack > * + * { margin-top: .9rem; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  align-items: center;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .8rem;
}

.verified-note {
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: .8rem;
  margin-top: 1.2rem;
}

.anchor-list { columns: 1; }
@media (min-width: 720px) { .anchor-list { columns: 2; column-gap: 2rem; } }
.anchor-list li { break-inside: avoid; }

.plug-figure {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .9rem;
  margin: 1rem 0;
}
.plug-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: .85rem;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.plug-item svg { width: 78px; height: 78px; display: block; margin: 0 auto .4rem; }
.plug-item figcaption { font-size: .84rem; color: var(--muted-strong); }
.plug-item .plug-type { font-weight: 700; font-size: .95rem; display: block; }
.plug-item svg { color: var(--ink-soft); }

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.7rem; }
.prose li { margin-bottom: .45rem; }
.prose p, .prose li { max-width: var(--measure); }

/* ---------------------------------------------------- check rows (results) */

.check-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.check-row {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: .75rem .85rem;
  margin-bottom: .55rem;
  box-shadow: var(--shadow-1);
}
.check-row:last-child { margin-bottom: 0; }
.check-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .6rem;
  margin-bottom: .25rem;
}
.check-head strong { font-size: .92rem; }
.check-detail { margin: 0; font-size: .88rem; color: var(--muted-strong); }

.result-badge-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .55rem; }

.mini-out {
  margin-top: 1.1rem;
  border-top: 1px dashed var(--line-strong);
  padding-top: 1rem;
}
.mini-out .result-figure { font-size: clamp(1.5rem, 4vw, 1.9rem); margin-bottom: .25rem; }

.scenario-list { display: grid; gap: .7rem; margin: 1rem 0; }
@media (min-width: 720px) { .scenario-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scenario {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: .9rem 1rem;
  box-shadow: var(--shadow-1);
}
.scenario h3 { margin: 0 0 .25rem; font-size: .95rem; }
.scenario p { margin: 0; font-size: .87rem; color: var(--muted-strong); }

.source-list { font-size: .87rem; color: var(--muted-strong); }
.source-list li { margin-bottom: .45rem; word-break: break-word; }

.policy-page h2 { margin-top: 2rem; }
.policy-page h2:first-of-type { margin-top: 1.2rem; }

.note-inline {
  font-size: .86rem;
  color: var(--muted);
  border-left: 3px solid var(--line-strong);
  padding-left: .75rem;
  margin: 1rem 0;
}

/* --------------------------------------------------- scroll-in / micro motion
   The hiding rules only exist under .has-motion, a class added by
   assets/js/ui-motion.js when IntersectionObserver and motion are both available.
   With JavaScript disabled nothing is hidden, and the page is fully readable. */

@media (prefers-reduced-motion: no-preference) {
  .has-motion .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
    will-change: opacity, transform;
  }
  .has-motion .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .result:not([hidden]) {
    animation: result-in .44s var(--ease-out) both;
  }
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .has-motion .reveal { opacity: 1 !important; transform: none !important; }
}

/* print */
@media print {
  .site-header, .site-nav, .hero-actions, .btn-row, .skip-link, .quickpick, .hero-art, .page-art { display: none !important; }
  body { background: #fff; }
  .card, .tool, .result, .tool-card, .group-card { box-shadow: none; }
}


/* ======================================================================
   v3 — round two. Weight on the first screen, a dashboard instead of a
   paragraph for results, a two-layer form, and icons on section headings.
   Still zero external dependencies: every shape below is CSS or an inline
   SVG mask, so nothing is fetched from a CDN, a font server or a host.
   Nothing here hides content: the layer rules only restyle markup that is
   already readable with JavaScript switched off.
   ====================================================================== */

:root {
  /* the only drawing shipped for headings: a 24x24 bolt, inlined as a mask */
  --glyph-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4.5 13.2H11l-1 8.8 8.5-11.2H12l1-8.8Z'/%3E%3C/svg%3E");
  --ring-brand: linear-gradient(142deg,
      color-mix(in srgb, var(--brand) 78%, transparent) 0%,
      color-mix(in srgb, var(--accent) 62%, transparent) 46%,
      transparent 74%);
}

/* ------------------------------------------------- section rhythm ------ */

.section { padding: clamp(2.1rem, 3.4vw, 3.1rem) 0; }
.section--tight { padding: clamp(1.3rem, 2.4vw, 1.9rem) 0; }
.section + .section { border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.section > .wrap > h2 { margin-top: 0; }
.prose > h2:first-child { margin-top: 0; }
.prose > h2 { margin-top: clamp(2rem, 3vw, 2.6rem); }

/* ------------------------------------------------- heading icons ------ */

.section > .wrap > h2,
.prose > h2 {
  position: relative;
  padding-left: 2.05rem;
  min-height: 1.5rem;
}
.section > .wrap > h2::before,
.prose > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .16em;
  width: 1.32rem;
  height: 1.32rem;
  border-radius: 8px;
  background-color: color-mix(in srgb, var(--brand) 82%, var(--muted));
  -webkit-mask: var(--glyph-bolt) center / 84% no-repeat;
  mask: var(--glyph-bolt) center / 84% no-repeat;
}
.section-head h2 { padding-left: 0; }
.section-head h2::before { display: none; }

@media (max-width: 560px) {
  .section > .wrap > h2,
  .prose > h2 { padding-left: 1.8rem; }
  .section > .wrap > h2::before,
  .prose > h2::before { width: 1.16rem; height: 1.16rem; top: .2em; }
}

/* ----------------------------------------------------------- hero v3 --- */

.hero { padding: clamp(1.9rem, 3.4vw, 2.7rem) 0 clamp(1.7rem, 3vw, 2.3rem); }
.hero--home { padding: clamp(2.3rem, 4.6vw, 3.6rem) 0 clamp(2rem, 3.6vw, 2.9rem); }
.hero h1 { font-size: clamp(2.15rem, 5.4vw, 3.45rem); max-width: 24ch; }
.hero--home h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); max-width: 22ch; }
.hero .lede { max-width: 56ch; margin-bottom: 1.15rem; }
.hero .eyebrow { font-size: var(--t-xs); }
.hero .eyebrow::before {
  content: "";
  width: .92rem;
  height: .92rem;
  background-color: currentColor;
  -webkit-mask: var(--glyph-bolt) center / contain no-repeat;
  mask: var(--glyph-bolt) center / contain no-repeat;
}
.hero-actions .btn { min-height: 48px; padding-inline: 1.35rem; }

/* the illustration sits on a soft pool of colour instead of floating */
.hero-art { position: relative; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 3% 1% 1%;
  z-index: -1;
  border-radius: 48% 52% 46% 54% / 54% 46% 54% 46%;
  background: radial-gradient(closest-side,
      color-mix(in srgb, var(--brand) 20%, transparent),
      color-mix(in srgb, var(--accent) 12%, transparent) 62%,
      transparent 78%);
}
.hero-art img { border-radius: var(--r-lg); }

@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: art-drift 7.5s var(--ease-out) infinite alternate; }
}
@keyframes art-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-7px); }
}

/* fact strip under the hero buttons */
.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  padding: 0;
  margin: 1.05rem 0 0;
  max-width: 56ch;
}
.hero-stats li {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .3rem .66rem;
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  font-size: .77rem;
  font-weight: 620;
  color: var(--muted-strong);
  margin: 0;
  line-height: 1.4;
}
.hero-stats .icon { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* On a phone the picture moves up, directly under the headline, so the
   first screen carries it instead of pushing it below the buttons. */
@media (max-width: 899px) {
  .hero--art > .wrap { display: flex; flex-direction: column; }
  .hero--art > .wrap > .eyebrow { order: 1; }
  .hero--art > .wrap > h1 { order: 2; }
  .hero--art > .wrap > .hero-art { order: 3; margin: .95rem auto .1rem; }
  .hero--art > .wrap > .lede { order: 4; }
  .hero--art > .wrap > .hero-actions { order: 5; }
  .hero--art > .wrap > .hero-stats { order: 6; }
  .hero--art .hero-art { max-width: 420px; width: 100%; }
  .hero--art .hero-art img {
    width: 100%;
    height: auto;
    max-height: 34vh;
    object-fit: contain;
  }
}

/* ---------------------------------------------------- cards, hover ----- */

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  background: var(--ring-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) ease;
}
.tool-card:hover::before,
.tool-card:focus-visible::before { opacity: 1; }
.tool-card .tool-icon { transition: background var(--dur-1) ease, color var(--dur-1) ease,
                        border-color var(--dur-1) ease, transform var(--dur-2) var(--ease-out); }
.tool-card:hover .tool-icon,
.tool-card:focus-visible .tool-icon { transform: translateY(-2px) scale(1.06); }
.tool-card:focus-visible { outline-offset: 3px; }

.scenario { transition: border-color var(--dur-1) ease, box-shadow var(--dur-2) var(--ease-out),
                        transform var(--dur-2) var(--ease-out); }
.scenario:hover { border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* -------------------------------------------------- result dashboard --- */

.result {
  border-radius: var(--r-xl);
  padding: 1.25rem 1.3rem 1.35rem 1.55rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)) 0%,
                            var(--surface) 52%);
  box-shadow: var(--shadow-3);
}
.result::after {
  content: "";
  position: absolute;
  right: -14%;
  top: -52%;
  width: 62%;
  height: 150%;
  pointer-events: none;
  background: radial-gradient(closest-side,
      color-mix(in srgb, var(--brand) 14%, transparent), transparent 74%);
}
.result > * { position: relative; }
.result .result-figure { font-size: clamp(2.45rem, 7.4vw, 3.55rem); }
.result .stat-value { column-gap: .6rem; margin-bottom: .5rem; }
.result-label { margin-bottom: .45rem; }

.result-metrics {
  display: grid;
  gap: .5rem;
  grid-template-columns: 1fr;
  margin: .85rem 0 .3rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .result-metrics { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
}
.result-metrics > li,
.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  padding: .55rem .7rem;
  margin: 0;
}
.metric-label {
  display: block;
  font-size: .67rem;
  font-weight: 740;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .16rem;
}
.metric-value {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.012em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.result-block { margin-top: 1.15rem; padding-top: .9rem; border-top: 1px dashed color-mix(in srgb, var(--line-strong) 60%, transparent); }
.result-block:first-of-type { border-top: 0; padding-top: 0; }
.result-block h3 { display: flex; align-items: center; gap: .42rem; }
.result-block h3::before {
  content: "";
  flex: none;
  width: .52rem;
  height: .52rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--brand) 55%, transparent);
}

/* ------------------------------------------- form: two visible layers -- */

.form-layers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  margin: 0 0 .9rem;
  font-size: .79rem;
  color: var(--muted);
  line-height: 1.5;
}
.form-layers strong { color: var(--ink-soft); font-weight: 660; }

.group-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: .13rem .44rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: .63rem;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.5;
}
.group-tag--req {
  background: var(--brand-tint);
  color: var(--brand-dark);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
}
.group-tag--opt {
  background: var(--surface-2);
  color: var(--muted-strong);
  border-color: var(--line-strong);
}
.group-card { padding: 1rem 1.05rem .95rem; }
.group-head { margin-bottom: .8rem; }
.group-help { max-width: 52ch; }

.field > label, .field-label { font-size: .88rem; margin-bottom: .28rem; }
.field-note {
  font-size: .76rem;
  line-height: 1.5;
  color: var(--muted);
  margin: .3rem 0 0;
}

/* the collapsed layer keeps saying what is inside it */
details.adv { border-radius: var(--r-lg); }
details.adv > summary { padding-right: 5.6rem; }
details.adv > summary::after {
  content: "Optional";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  padding: .1rem .4rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted-strong);
  font-size: .61rem;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}
details.adv > summary { position: relative; }
details.adv .adv-sub { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------- quick pick v3 ---- */

.quickpick {
  border-radius: var(--r-xl);
  padding: 1rem 1.05rem 1.05rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--surface)) 0%, var(--surface) 58%);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
}
.quickpick__head { align-items: center; gap: .5rem .6rem; margin-bottom: .6rem; }
.quickpick__step {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand));
  color: #fff;
  font-size: .76rem;
  font-weight: 780;
  box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--brand) 90%, transparent);
}
.quickpick__head > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .5rem;
}
.quickpick__title { margin: 0; }
.quickpick__note { margin: .45rem 0 .7rem; }
.quickpick__field--wide { grid-column: 1 / -1; }
@media (min-width: 620px) {
  .quickpick__row { grid-template-columns: 1fr 1fr; }
}
.quickpick__field label { font-size: .79rem; }
.quickpick__field select,
.quickpick__field input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  font: inherit;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease;
}
.quickpick__field select {
  appearance: none;
  padding-right: 1.9rem;
  background-image:
    linear-gradient(45deg, transparent 49%, var(--muted-strong) 50%),
    linear-gradient(-45deg, transparent 49%, var(--muted-strong) 50%);
  background-position: right 1rem center, right .68rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.quickpick__field select:hover,
.quickpick__field input[type="search"]:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong));
}
.quickpick__field select:focus,
.quickpick__field input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.quickpick__summary {
  margin: .7rem 0 0;
  padding: .48rem .65rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-2) 90%, transparent);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.quickpick__summary[hidden] { display: none; }
.quickpick__specs span { background: var(--surface); }

/* ------------------------------------------------ small screens --------- */

@media (max-width: 560px) {
  .hero h1, .hero--home h1 { letter-spacing: -.03em; }
  .result { padding: 1.05rem 1rem 1.1rem 1.2rem; border-radius: var(--r-lg); }
  .result .result-figure { font-size: clamp(2.2rem, 11vw, 2.9rem); }
  .group-card { padding: .9rem .85rem .85rem; }
  .quickpick { padding: .9rem .85rem .95rem; }
  .tool-body { padding-inline: .85rem; }
  .result-metrics { grid-template-columns: 1fr; }
  details.adv > summary { padding-right: 5.2rem; font-size: .85rem; }
}

/* ------------------------------------------- section heading icons ------- */

/* Icons are CSS masks over a 24px silhouette, so they inherit the heading
   colour in light and dark mode from one file each. Browsers without mask
   support fall back to no icon rather than a grey block. */
.h2-icon { display: none; }
@supports ((mask-image: url("../img/ic-doc.svg")) or (-webkit-mask-image: url("../img/ic-doc.svg"))) {
  .h2-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: .42em;
    vertical-align: -.08em;
    background-color: color-mix(in srgb, var(--brand) 86%, var(--ink));
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
  }
  .h2-icon--battery { -webkit-mask-image: url("../img/ic-battery.svg"); mask-image: url("../img/ic-battery.svg"); }
  .h2-icon--bolt { -webkit-mask-image: url("../img/ic-bolt.svg"); mask-image: url("../img/ic-bolt.svg"); }
  .h2-icon--plug { -webkit-mask-image: url("../img/ic-plug.svg"); mask-image: url("../img/ic-plug.svg"); }
  .h2-icon--device { -webkit-mask-image: url("../img/ic-device.svg"); mask-image: url("../img/ic-device.svg"); }
  .h2-icon--cable { -webkit-mask-image: url("../img/ic-cable.svg"); mask-image: url("../img/ic-cable.svg"); }
  .h2-icon--globe { -webkit-mask-image: url("../img/ic-globe.svg"); mask-image: url("../img/ic-globe.svg"); }
  .h2-icon--bag { -webkit-mask-image: url("../img/ic-bag.svg"); mask-image: url("../img/ic-bag.svg"); }
  .h2-icon--checklist { -webkit-mask-image: url("../img/ic-checklist.svg"); mask-image: url("../img/ic-checklist.svg"); }
  .h2-icon--scale { -webkit-mask-image: url("../img/ic-scale.svg"); mask-image: url("../img/ic-scale.svg"); }
  .h2-icon--doc { -webkit-mask-image: url("../img/ic-doc.svg"); mask-image: url("../img/ic-doc.svg"); }
  .h2-icon--warning { -webkit-mask-image: url("../img/ic-warning.svg"); mask-image: url("../img/ic-warning.svg"); }
  .h2-icon--calc { -webkit-mask-image: url("../img/ic-calc.svg"); mask-image: url("../img/ic-calc.svg"); }
}

/* ------------------------------------------------- offer surface (v3) -- */

/* Two shapes share one vocabulary: the summary block on the homepage, the
   "Before you buy" card under a tool result, and the code cards on
   /anker-offers/. Codes are plain text in every case, so nothing here is
   required for the page to be usable. */
.offer-summary {
  background: var(--raised-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.35rem 1.4rem 1.4rem;
  box-shadow: var(--shadow-2);
}
.offer-summary > :first-child { margin-top: 0; }
.offer-summary h2 { margin-bottom: .55rem; font-size: 1.16rem; }
.offer-summary p { max-width: var(--measure); }
.offer-summary-list {
  list-style: none;
  margin: .95rem 0 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.offer-summary-list li {
  display: flex;
  gap: .5rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
  padding-left: .95rem;
  position: relative;
  max-width: none;
}
.offer-summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 70%, var(--line));
}
.offer-fine {
  margin: .85rem 0 0;
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--muted);
  max-width: var(--measure);
}

.offer-nudge {
  background: var(--inset-bg);
  border: 1px solid var(--line);
  border-left: 4px solid color-mix(in srgb, var(--brand) 55%, var(--line));
  border-radius: var(--r-md);
  padding: 1.1rem 1.25rem 1.3rem;
  box-shadow: var(--shadow-1);
}
.offer-nudge > :first-child { margin-top: 0; }
.offer-nudge h2 {
  margin: 0 0 .55rem;
  font-size: 1.02rem;
  letter-spacing: -.01em;
}
.offer-nudge p { margin: .45rem 0 0; max-width: var(--measure); }
.offer-nudge .btn-row { margin-top: .95rem; }

.offer-intro { max-width: var(--measure); color: var(--ink-soft); }

.offer-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-top: 1.2rem;
}
@media (min-width: 720px) {
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.offer-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--raised-bg);
  border: 1px solid var(--line);
  border-top: 3px solid color-mix(in srgb, var(--brand) 62%, var(--line));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.offer-card > :first-child { margin-top: 0; }
.offer-value {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.offer-cond {
  margin: 0;
  font-weight: 620;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}
.offer-note { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.offer-code-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin-top: .3rem;
}
.offer-code {
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .09em;
  padding: .5rem .7rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  color: var(--ink);
  -webkit-user-select: all;
  user-select: all;
}
.offer-dates { margin: 0; font-size: var(--t-xs); color: var(--muted-strong); }
.offer-restrictions {
  margin: 0;
  padding-left: 1.05rem;
  font-size: var(--t-xs);
  color: var(--muted);
}
.offer-status {
  margin: .9rem 0 0;
  min-height: 1.25em;
  font-size: var(--t-sm);
  color: var(--ok);
  max-width: var(--measure);
}
.offer-meta {
  margin: .35rem 0 0;
  font-size: var(--t-sm);
  color: var(--muted);
  max-width: var(--measure);
}
.offer-list {
  margin: .9rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: .5rem;
}
.offer-list li { max-width: var(--measure); color: var(--ink-soft); }
.offer-links {
  list-style: none;
  margin: .95rem 0 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.offer-links li { max-width: var(--measure); color: var(--muted); font-size: var(--t-sm); }
.offer-links a { font-weight: 600; }

.btn--sm {
  padding: .5rem .85rem;
  min-height: 38px;
  font-size: var(--t-sm);
}

/* the first screen on a phone: keep the illustration close to the headline */
@media (max-width: 899px) {
  .hero--home { padding: 2rem 0 1.9rem; }
  .hero--art { padding: 1.9rem 0 1.7rem; }
  .hero h1 { max-width: none; }
  .hero .lede { margin-bottom: 1rem; }
  .hero-art,
  .hero--art .hero-art,
  .hero--home .hero-art { margin: 1.05rem auto 0; max-width: 330px; }
}
@media (max-width: 400px) {
  .hero-art,
  .hero--art .hero-art,
  .hero--home .hero-art { max-width: 268px; }
}

/* Responsive layout: shared by all tools and guides. */
html { scroll-padding-top: 9rem; }
main { overflow-wrap: anywhere; }
.grid > *, .footer-grid > *, .offer-grid > *, .quickpick__row > *,
fieldset, .field, .tool, .card, .table-wrap { min-width: 0; }
fieldset { max-width: 100%; }
.control, .field > :where(select), .quickpick select, .quickpick input { min-width: 0; max-width: 100%; }
.table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.btn { text-align: center; }
@media (min-width: 720px) and (max-width: 979px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool .grid--2, .tool .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .tool .quickpick__row { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 979px) {
  html { scroll-padding-top: 6rem; }
  .header-inner { gap: .5rem; padding: .6rem 1rem; }
  .brand { min-width: 0; font-size: .95rem; }
  .brand-sub { font-size: .65rem; }
  .site-nav { width: 100%; margin-left: 0; min-width: 0; }
  .site-nav ul {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem; overflow-x: visible; overflow-y: auto;
    max-height: 65vh; max-height: 65dvh; padding: .5rem .2rem;
    overscroll-behavior-y: contain;
  }
  .site-nav li { min-width: 0; margin: 0; }
  .site-nav a { display: flex; align-items: center; min-height: 44px; height: 100%; white-space: normal; padding: .6rem .7rem; font-size: .9rem; background: var(--surface-2); }
}
@media screen and (max-width: 599px) {
  .wrap { padding-inline: 1rem; }
  .section { padding-block: 1.8rem; }
  .section--tight { padding-block: 1.25rem; }
  .hero, .hero--home, .hero--art { padding-block: 1.6rem; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.7rem); line-height: 1.12; }
  .hero-actions, .btn-row { gap: .6rem; }
  .hero-actions > .btn, .btn-row > .btn { width: 100%; }
  .card, .tool-card, .offer-card, .specs-first { padding: 1rem; }
  .grid { gap: .85rem; }
  .grid > .card + .card { margin-top: 0; }
  .radio-row { gap: .5rem; }
  .radio-row label { min-height: 44px; max-width: 100%; border-radius: var(--r-md); }
  .radio-row input { flex-shrink: 0; }
  .btn--sm, .btn--quiet { min-height: 44px; }
  input, select, textarea, .quickpick__field select { font-size: 16px; }
  details.disclosure summary { min-height: 44px; padding-block: .6rem; }
  details.adv > summary { flex-wrap: wrap; padding-right: 1rem; }
  details.adv > summary::after { position: static; transform: none; margin-left: auto; }
  .badge, .result-state { white-space: normal; }
  .spec-line dt { min-width: 0; width: 100%; }
  .spec-line dd { min-width: 0; }
  .site-footer { margin-top: 2rem; padding-block: 1.8rem; }
  .site-footer li { margin: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 44px; padding-block: .4rem; }
  .footer-grid { gap: 1.3rem; }
}
@media screen and (max-width: 359px) {
  .header-inner { padding-inline: .75rem; }
  .brand { font-size: .85rem; gap: .4rem; }
  .brand-sub { font-size: .59rem; }
  .brand-mark { width: 28px; height: 28px; }
  .site-nav ul { grid-template-columns: minmax(0, 1fr); }
  .tool-head { padding-inline: .85rem; }
  .group-card, .quickpick { padding-inline: .65rem; }
}
@media (hover: none) {
  .tool-card:hover, .btn:hover { transform: none; }
}
@media screen and (max-height: 500px) and (orientation: landscape) {
  .site-header { position: relative; }
}

/* Footer layout. */
.site-footer { background: var(--bg-tint); border-top: 1px solid var(--line-strong); padding: 3rem 0 1.5rem; }
.footer-grid { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-about .brand { white-space: normal; font-size: 1rem; margin-bottom: 1rem !important; }
.footer-about p { font-size: .85rem; line-height: 1.7; }
.footer-about small { display: block; font-size: .75rem; line-height: 1.7; }
.site-footer h2 { color: var(--ink); font-size: .88rem; letter-spacing: 0; text-transform: none; margin-bottom: .85rem; }
.site-footer li { margin: 0 0 .2rem; }
.site-footer li a { display: block; padding: .4rem 0; line-height: 1.5; font-size: .82rem; }
.footer-bottom { font-size: .73rem; gap: .5rem 2rem; align-items: baseline; }
@media (max-width: 979px) {
 .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
 .footer-about { grid-column: 1 / -1; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
 .footer-about p { max-width: 72ch; }
}
@media (max-width: 599px) {
 .site-footer { padding-top: 2rem; }
 .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
 .footer-grid > :last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.25rem; }
 .footer-grid > :last-child ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
 .site-footer li a { display: flex; min-height: 44px; padding-block: .55rem; }
 .footer-bottom { display: grid; line-height: 1.7; }
}

.blog-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg-tint); border-radius: var(--r-md); }
.blog-card .tool-title { margin: .35rem 0 0; }

.nav-toggle { display: none; }
@media screen and (max-width: 979px) {
  .nav-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--brand-tint); }
  .menu-bars { display: grid; align-content: space-between; width: 22px; height: 16px; }
  .menu-bars span { height: 2px; border-radius: 2px; background: currentColor; }
  .nav-toggle[aria-expanded="true"] .menu-bars span:first-child { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .menu-bars span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle[aria-expanded="false"] + .site-nav { display: none; }
}

.support-form { margin-top: 1rem; }
.support-form .btn { min-height: 44px; }

.header-support { order: 1; margin: 0; flex: none; }
.header-support .btn { min-height: 44px; padding-inline: .7rem; white-space: nowrap; }
@media screen and (max-width: 979px) {
  .header-support { order: 0; margin-left: auto; }
  .header-support + .nav-toggle { margin-left: 0; }
}
@media screen and (max-width: 979px) {
  .header-inner > .brand { white-space: normal; }
  .header-inner > .brand > :last-child { min-width: 0; }
}
@media screen and (max-width: 979px) {
  .header-inner > .brand { flex: 1 1 0; }
}
@media screen and (min-width: 980px) {
  .header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
}

.header-support { display: flex; align-items: center; gap: .35rem; }
.result-shop { font-size: .82rem; color: var(--muted); }
.result-shop[hidden] { display: none; }
@media screen and (max-width: 599px) {
  .header-support .btn { padding-inline: .45rem; font-size: .76rem; }
}


/* Keep section footer buttons centered in tablet and desktop previews. */
@media screen and (min-width: 600px) {
  body[data-page="home"] .desktop-actions { display: flex; justify-content: center; }
  body[data-page="home"] .section-bottom-actions { justify-content: center; }
}
