/* Assistant Switch — site styles. No frameworks, no external assets, no webfonts.
   Design system: one accent ramp, semantic status colors, generous type scale.
   Light is the default; dark via prefers-color-scheme + [data-theme] override. */

:root {
  /* Surfaces — warm paper stack, subtly layered rather than flat white */
  --bg: #f7f6f3;
  --bg-tint: #eeece7;
  --bg-card: #ffffff;
  --bg-inset: #f2f0ec;
  --line: #e0dcd4;
  --line-strong: #cfc9be;

  /* Ink */
  --text: #191c22;
  --text-soft: #5a626f;
  --text-faint: #868d99;

  /* Accent — indigo, distinct from Google blue on purpose */
  --accent: #4338ca;
  --accent-hover: #3730a3;
  --accent-soft: #ecebfb;
  --accent-line: #c9c5f2;
  --on-accent: #ffffff;

  /* Semantic status */
  --warn: #a2560c;
  --warn-soft: #fdf1e1;
  --warn-line: #f0d5ae;
  --ok: #16704a;
  --ok-soft: #e4f3ea;
  --ok-line: #b6ddc7;
  --bad: #a81f1a;
  --bad-soft: #fbeae8;
  --bad-line: #f0c4c0;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --maxw: 47rem;
  --maxw-wide: 62rem;

  --shadow-sm: 0 1px 2px rgba(19, 22, 28, 0.05), 0 1px 3px rgba(19, 22, 28, 0.04);
  --shadow-md: 0 2px 4px rgba(19, 22, 28, 0.04), 0 6px 16px rgba(19, 22, 28, 0.07);
  --shadow-lg: 0 4px 10px rgba(19, 22, 28, 0.06), 0 18px 40px rgba(19, 22, 28, 0.10);

  --ring: 0 0 0 3px rgba(67, 56, 202, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101319;
    --bg-tint: #161a22;
    --bg-card: #191d26;
    --bg-inset: #20252f;
    --line: #2c323d;
    --line-strong: #3d4553;

    --text: #e9e7e2;
    --text-soft: #a6adb9;
    --text-faint: #79808d;

    --accent: #a5b4fc;
    --accent-hover: #c7d2fe;
    --accent-soft: #1f2438;
    --accent-line: #363e5c;
    --on-accent: #12141c;

    --warn: #f0ab63;
    --warn-soft: #2c2116;
    --warn-line: #4a3620;
    --ok: #6ed09a;
    --ok-soft: #14271d;
    --ok-line: #23422f;
    --bad: #f28d84;
    --bad-soft: #2d1a19;
    --bad-line: #4a2a27;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.44), 0 20px 48px rgba(0, 0, 0, 0.42);
    --ring: 0 0 0 3px rgba(165, 180, 252, 0.34);
  }
}

:root[data-theme="dark"] {
  --bg: #101319;
  --bg-tint: #161a22;
  --bg-card: #191d26;
  --bg-inset: #20252f;
  --line: #2c323d;
  --line-strong: #3d4553;

  --text: #e9e7e2;
  --text-soft: #a6adb9;
  --text-faint: #79808d;

  --accent: #a5b4fc;
  --accent-hover: #c7d2fe;
  --accent-soft: #1f2438;
  --accent-line: #363e5c;
  --on-accent: #12141c;

  --warn: #f0ab63;
  --warn-soft: #2c2116;
  --warn-line: #4a3620;
  --ok: #6ed09a;
  --ok-soft: #14271d;
  --ok-line: #23422f;
  --bad: #f28d84;
  --bad-soft: #2d1a19;
  --bad-line: #4a2a27;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.44), 0 20px 48px rgba(0, 0, 0, 0.42);
  --ring: 0 0 0 3px rgba(165, 180, 252, 0.34);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.68;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--ring);
  border-radius: 5px;
}

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  padding: 0.08em 0.38em;
  border-radius: 5px;
}
kbd { box-shadow: 0 1px 0 var(--line-strong); font-weight: 600; }

hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.site-header .inner {
  max-width: var(--maxw-wide); margin: 0 auto; padding: 0.55rem 1.15rem;
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
}
.brand {
  font-weight: 700; text-decoration: none; color: var(--text);
  font-size: 1.06rem; letter-spacing: -0.022em; margin-right: auto;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 0.1rem;
}
.brand:hover { color: var(--text); }
.brand .dot {
  color: var(--accent); font-weight: 800;
  display: inline-block; padding: 0 0.12em;
}

.site-nav { display: flex; gap: 0.1rem; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--text-soft);
  padding: 0.34rem 0.6rem; border-radius: 7px; font-size: 0.915rem;
  font-weight: 500; transition: background 0.14s ease, color 0.14s ease;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-inset); color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--accent); font-weight: 640; background: var(--accent-soft);
}

#theme-toggle {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 7px;
  color: var(--text-soft); cursor: pointer; padding: 0.3rem 0.62rem;
  font: inherit; font-size: 0.855rem; font-weight: 550;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
#theme-toggle:hover { background: var(--bg-inset); color: var(--text); border-color: var(--line-strong); }

/* ---------- Layout ---------- */

main { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem 1.15rem 4rem; }
main.wide { max-width: var(--maxw-wide); }

/* ---------- Typography ---------- */

h1 {
  font-size: clamp(1.95rem, 1.35rem + 2.6vw, 2.85rem);
  line-height: 1.13; letter-spacing: -0.031em; font-weight: 780;
  margin: 0.6rem 0 0.85rem; text-wrap: balance;
}
h2 {
  font-size: clamp(1.36rem, 1.16rem + 0.85vw, 1.66rem);
  line-height: 1.24; letter-spacing: -0.019em; font-weight: 700;
  margin: 2.9rem 0 0.75rem; text-wrap: balance;
  scroll-margin-top: 4.5rem;
}
h3 {
  font-size: 1.13rem; line-height: 1.34; font-weight: 670;
  letter-spacing: -0.01em; margin: 1.9rem 0 0.5rem;
  scroll-margin-top: 4.5rem;
}
h4 { font-size: 1.02rem; font-weight: 650; margin: 1.4rem 0 0.35rem; }

p { margin: 0.75rem 0; }
ul, ol { margin: 0.75rem 0; padding-left: 1.45rem; }
li { margin: 0.42rem 0; }
li::marker { color: var(--text-faint); }
strong { font-weight: 660; }

.lede {
  font-size: clamp(1.09rem, 1.02rem + 0.34vw, 1.235rem);
  line-height: 1.56; color: var(--text-soft); margin-bottom: 1.4rem;
  text-wrap: pretty;
}

.meta-line {
  font-size: 0.83rem; color: var(--text-faint);
  display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center;
  margin: 0 0 0.85rem;
}
.meta-line > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.meta-line > span + span::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-strong); display: inline-block; margin-right: 0.2rem;
}

/* Hero — the one place we let the design breathe */
.hero {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0 0;
}
.hero::before {
  content: "";
  position: absolute; inset: -3.5rem -50vw 40% -50vw;
  background:
    radial-gradient(60rem 22rem at 30% 0%, var(--accent-soft) 0%, transparent 62%),
    radial-gradient(46rem 18rem at 85% 12%, var(--warn-soft) 0%, transparent 60%);
  opacity: 0.75; z-index: -1; pointer-events: none;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.775rem; font-weight: 680; letter-spacing: 0.075em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 0.3rem 0.7rem; border-radius: 99px; margin: 0 0 0.5rem;
}
.eyebrow.is-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.eyebrow .blip {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

/* Countdown / key-date strip */
.datebar {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin: 1.35rem 0 0.25rem;
}
.datebar .cell {
  flex: 1 1 8.5rem;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-sm);
}
.datebar .k {
  display: block; font-size: 0.72rem; font-weight: 660;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); margin-bottom: 0.18rem;
}
.datebar .v { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.014em; line-height: 1.3; }
.datebar .cell.is-hot { border-color: var(--warn-line); background: var(--warn-soft); }
.datebar .cell.is-hot .v { color: var(--warn); }
.datebar .cell.is-ok { border-color: var(--ok-line); background: var(--ok-soft); }
.datebar .cell.is-ok .v { color: var(--ok); }

/* ---------- Callout boxes ---------- */

.box {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--bg-card); border-radius: var(--radius);
  padding: 0.95rem 1.15rem; margin: 1.35rem 0;
  box-shadow: var(--shadow-sm);
}
.box.warn { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-soft); }
.box.ok { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-soft); }
.box.bad { border-color: var(--bad-line); border-left-color: var(--bad); background: var(--bad-soft); }
.box p:first-child { margin-top: 0; }
.box p:last-child { margin-bottom: 0; }
.box .box-title {
  font-weight: 700; display: block; margin-bottom: 0.3rem;
  letter-spacing: -0.012em; font-size: 1.02rem;
}
.box.warn .box-title { color: var(--warn); }
.box.ok .box-title { color: var(--ok); }
.box.bad .box-title { color: var(--bad); }

/* Pull-quote style emphasis box for the "one-sentence version" */
.box.headline {
  border-left-width: 3px;
  padding: 1.15rem 1.3rem;
}
.box.headline p { font-size: 1.08rem; line-height: 1.55; }

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto; margin: 1.3rem 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; font-size: 0.945rem; }
th, td { text-align: left; padding: 0.68rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  background: var(--bg-inset); font-weight: 660; white-space: nowrap;
  font-size: 0.85rem; letter-spacing: 0.015em; color: var(--text-soft);
  position: sticky; top: 0;
}
tbody th { font-weight: 640; background: var(--bg-inset); }
tr:last-child td, tr:last-child th { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }

/* ---------- Status pills ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 0.32rem;
  font-size: 0.755rem; font-weight: 680; letter-spacing: 0.012em;
  padding: 0.16em 0.62em; border-radius: 99px; white-space: nowrap;
  border: 1px solid transparent; vertical-align: middle;
}
.pill::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.pill.gone { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.pill.partial { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.pill.works { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.pill.info { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

h3 .pill { font-size: 0.72rem; margin-left: 0.4rem; position: relative; top: -1px; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  margin: 1.4rem 0;
}
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-card); padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 0.35rem; font-size: 1.06rem; }
.card p { margin: 0.3rem 0 0; font-size: 0.925rem; color: var(--text-soft); line-height: 1.55; }

a.card {
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
a.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity 0.16s ease;
}
a.card:hover {
  border-color: var(--accent-line); transform: translateY(-2px);
  box-shadow: var(--shadow-md); color: inherit;
}
a.card:hover::after { opacity: 1; }
a.card .go {
  color: var(--accent); font-weight: 640; font-size: 0.9rem;
  margin-top: auto; padding-top: 0.55rem;
}
a.card:hover .go { color: var(--accent-hover); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 0.62rem 1.15rem;
  font: inherit; font-size: 0.985rem; font-weight: 620;
  cursor: pointer; text-decoration: none; line-height: 1.35;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  color: var(--on-accent); box-shadow: var(--shadow-md); transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: var(--bg-card); color: var(--text); border-color: var(--line-strong);
}
.btn.secondary:hover { background: var(--bg-inset); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }

/* ---------- Troubleshooter ---------- */

#troubleshooter { margin-top: 1.2rem; }

.ts-shell {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-card); padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow-md);
}

.ts-question {
  font-size: 1.24rem; font-weight: 720; letter-spacing: -0.018em;
  margin: 0 0 0.9rem; line-height: 1.3;
}
.ts-options { display: grid; gap: 0.55rem; }
.ts-options button {
  text-align: left; font: inherit; cursor: pointer;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem 2.2rem 0.8rem 1rem; line-height: 1.45;
  font-weight: 550; position: relative;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}
.ts-options button::after {
  content: "→"; position: absolute; right: 0.9rem; top: 50%;
  transform: translateY(-50%); color: var(--text-faint);
  transition: color 0.14s ease, transform 0.14s ease;
}
.ts-options button:hover {
  border-color: var(--accent); background: var(--accent-soft);
  transform: translateX(2px);
}
.ts-options button:hover::after { color: var(--accent); transform: translateY(-50%) translateX(2px); }
.ts-options button .sub {
  display: block; font-size: 0.86rem; color: var(--text-soft);
  margin-top: 0.15rem; font-weight: 450;
}

.ts-controls { margin-top: 1.2rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ts-controls button {
  font: inherit; font-size: 0.885rem; cursor: pointer; font-weight: 550;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 7px;
  color: var(--text-soft); padding: 0.36rem 0.78rem;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.ts-controls button:hover { background: var(--bg-inset); color: var(--text); border-color: var(--line-strong); }

.ts-result h2 { margin-top: 0.4rem; font-size: 1.4rem; }
.ts-verdict {
  font-weight: 720; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.22em 0.7em; border-radius: 99px; border: 1px solid transparent;
}
.ts-verdict::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ts-verdict.fixable { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.ts-verdict.partial { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.ts-verdict.nofix { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }

.ts-sources {
  font-size: 0.855rem; color: var(--text-soft); margin-top: 1.2rem;
  border-top: 1px solid var(--line); padding-top: 0.75rem;
}
.ts-sources a { color: var(--text-soft); }
.ts-sources a:hover { color: var(--accent); }

/* Breadcrumb of answered questions */
.ts-trail {
  font-size: 0.82rem; color: var(--text-faint); margin-bottom: 0.75rem;
  display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center;
}
.ts-trail .crumb { color: var(--text-soft); }
.ts-trail .sep { color: var(--line-strong); }

/* ---------- Steps ---------- */

ol.steps { counter-reset: step; list-style: none; padding-left: 0; margin: 1.1rem 0; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 0.35rem 0 0.35rem 2.65rem; margin: 0.7rem 0;
}
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.3rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent);
  font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Recipe blocks (routines page) */
.recipe {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-card); padding: 1.1rem 1.2rem; margin: 1.3rem 0;
  box-shadow: var(--shadow-sm);
}
.recipe > h3:first-child { margin-top: 0; }

/* ---------- Affiliate slots ---------- */

.affiliate-slot {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-inset), var(--bg-card));
  padding: 0.9rem 1.1rem; margin: 1.15rem 0;
  font-size: 0.945rem;
}
.affiliate-slot .tag {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-faint);
  display: block; margin-bottom: 0.28rem;
}
.affiliate-slot p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */

details.faq {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-card); margin: 0.65rem 0; padding: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.14s ease;
}
details.faq:hover { border-color: var(--line-strong); }
details.faq[open] { border-color: var(--accent-line); }
details.faq summary {
  cursor: pointer; font-weight: 630; padding: 0.85rem 2.4rem 0.85rem 1.1rem;
  list-style: none; position: relative; letter-spacing: -0.011em;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 1rem; top: 50%;
  transform: translateY(-50%); font-size: 1.25rem; font-weight: 400;
  color: var(--text-faint); line-height: 1; transition: transform 0.18s ease, color 0.14s ease;
}
details.faq[open] summary::after { content: "−"; color: var(--accent); }
details.faq summary:hover { color: var(--accent); }
details.faq[open] summary { border-bottom: 1px solid var(--line); }
details.faq .a { padding: 0.7rem 1.1rem 0.95rem; }
details.faq .a > :first-child { margin-top: 0; }
details.faq .a > :last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); margin-top: 3.5rem;
  background: var(--bg-tint);
  color: var(--text-soft); font-size: 0.865rem;
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 1.8rem 1.15rem 2.5rem; }
.site-footer p { margin: 0.5rem 0; line-height: 1.6; }
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--accent); }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem;
  padding-top: 0.9rem; margin-top: 0.9rem; border-top: 1px solid var(--line);
  font-weight: 550;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  main { padding: 1.2rem 1rem 3rem; }
  .site-header .inner { padding: 0.5rem 1rem; gap: 0.5rem; }
  .brand { font-size: 1rem; width: 100%; margin-right: 0; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 0.15rem; flex-wrap: nowrap; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav { scrollbar-width: none; }
  #theme-toggle { position: absolute; top: 0.5rem; right: 1rem; }
  .site-header .inner { position: relative; }
  .ts-shell { padding: 1rem; border-radius: var(--radius); }
  .datebar .cell { flex-basis: 100%; }
}

@media print {
  .site-header, .site-footer, .ts-controls, #theme-toggle, .affiliate-slot, .skip-link { display: none; }
  .hero::before { display: none; }
  body { font-size: 11pt; background: #fff; color: #000; }
  a { text-decoration: underline; }
  .box, .card, .table-wrap, details.faq { box-shadow: none; break-inside: avoid; }
  details.faq[open] .a, details.faq .a { display: block; }
  details.faq summary::after { display: none; }
}
