/* ============================================================
   Antigravity guide — minimal, warm, cat-friendly
   ============================================================ */

:root {
  --paper: #faf6ee;
  --paper-2: #f3ecdf;
  --card: #fffcf5;
  --ink: #211e19;
  --muted: #6f685b;
  --line: #e5dac9;
  --accent: #d96c4f;
  --accent-ink: #a94a32;
  --accent-soft: #f7e2d8;
  --ok: #4c6b45;
  --warn: #8a5e1e;
  --code-bg: #231f19;
  --code-ink: #f6efe2;
  --cat-paper: #fffcf5;
  --cat-ink: #211e19;
  --cat-box: #f0e3ce;
  --shadow: 0 1px 2px rgba(48, 36, 20, 0.04), 0 20px 40px -32px rgba(48, 36, 20, 0.4);
  --radius: 22px;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme='dark'] {
  --paper: #151310;
  --paper-2: #1c1915;
  --card: #1e1a15;
  --ink: #f1eadd;
  --muted: #a89e8e;
  --line: #332d25;
  --accent: #e98f70;
  --accent-ink: #f0a88d;
  --accent-soft: #2b211b;
  --ok: #9bb78f;
  --warn: #d8a95e;
  --code-bg: #0d0b09;
  --code-ink: #efe6d6;
  --cat-paper: #1e1a15;
  --cat-ink: #f1eadd;
  --cat-box: #2a241c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -34px rgba(0, 0, 0, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 520px at 86% -120px, rgba(217, 108, 79, 0.11), transparent 70%),
    radial-gradient(720px 420px at -10% 12%, rgba(176, 140, 90, 0.09), transparent 65%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

img,
svg {
  max-width: 100%;
}

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

a:hover {
  color: var(--ink);
}

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

.wrap {
  width: min(1140px, 100% - 48px);
  margin-inline: auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-paw {
  width: 21px;
  height: 21px;
  color: var(--accent);
}

.brand-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand-name em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: 2px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 13px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 12px 26px -18px rgba(0, 0, 0, 0.65);
}

.btn:hover {
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -20px rgba(0, 0, 0, 0.65);
}

.btn:active {
  transform: translateY(0);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 12.5px;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon {
  display: none;
}

[data-theme='dark'] .icon-sun {
  display: none;
}

[data-theme='dark'] .icon-moon {
  display: block;
}

.progress-line {
  height: 2px;
  background: transparent;
}

.progress-line span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
  padding: clamp(48px, 7.5vw, 92px) 0 clamp(30px, 4vw, 48px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.hero h1 {
  margin: 0.32em 0 0.3em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 6.2vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-ink);
  text-decoration: underline wavy color-mix(in srgb, var(--accent) 35%, transparent);
  text-decoration-thickness: 3px;
  text-underline-offset: 12px;
}

.lede {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}

.quiet-link {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.quiet-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.fact {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

.fact b {
  color: var(--ink);
  font-weight: 600;
}

.hero-figure {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
}

.cat-art {
  display: block;
  width: 100%;
  height: auto;
}

.cat-art--hero {
  width: min(440px, 100%);
  animation: float 7.5s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(-13px) rotate(0.4deg);
  }
}

.sticker {
  position: absolute;
  left: 0;
  bottom: 4%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 10px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 3px;
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  transform: rotate(-4deg);
}

.sticker-arrow {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

/* ---------- Intro note ---------- */

.intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: clamp(36px, 5vw, 64px);
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.intro-paw {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--accent);
}

.intro p {
  margin: 0;
  max-width: 82ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.intro strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Layout + TOC ---------- */

.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.toc {
  position: sticky;
  top: 94px;
}

.toc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.toc-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.toc-count b {
  color: var(--ink);
  font-weight: 600;
}

.bar {
  height: 4px;
  margin-bottom: 18px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: var(--ink);
}

.toc-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: color-mix(in srgb, var(--muted) 65%, transparent);
}

.toc-tick {
  font-size: 11px;
  text-align: center;
  color: var(--ok);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.toc-list a.active {
  color: var(--ink);
  font-weight: 500;
}

.toc-list a.active .toc-num {
  color: var(--accent);
}

.toc-list li.is-done a {
  color: var(--ink);
}

.toc-list li.is-done .toc-tick {
  opacity: 1;
}

.toc-note {
  margin: 18px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  opacity: 0.8;
}

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

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.step {
  position: relative;
  padding: clamp(24px, 4.2vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 100px;
  transition: border-color 0.3s ease;
}

.step.is-done {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.step-num {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.1em;
}

.step h2 {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 1.72rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.done-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 6px 11px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.done-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.done-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.done-box {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.done-box::after {
  content: '';
  width: 6px;
  height: 3px;
  margin-top: -1px;
  border-left: 1.5px solid var(--card);
  border-bottom: 1.5px solid var(--card);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.2s ease;
}

.done-toggle:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.done-toggle input:checked ~ .done-box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

.done-toggle input:checked ~ .done-box::after {
  transform: rotate(-45deg) scale(1);
}

.done-toggle:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.step > p {
  max-width: 66ch;
  margin: 0.45em 0 1.15em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.step > p em {
  color: var(--ink);
}

.step > p a {
  color: var(--accent-ink);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.ticks {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  max-width: 70ch;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.5em;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 1px;
  transform: rotate(-45deg);
}

.ticks code,
.step > p code,
.bonus p code,
.callout code,
details code {
  font-family: var(--mono);
  font-size: 0.87em;
  white-space: nowrap;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink);
}

.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  max-width: 72ch;
  padding: 15px 18px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}

.callout-label {
  margin-top: 2px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  background: var(--card);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.callout p strong {
  color: var(--ink);
  font-weight: 600;
}

.callout--warn {
  border-left-color: var(--warn);
}

.callout--warn .callout-label {
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--warn);
}

.callout--privacy {
  border-left-color: var(--ok);
}

.callout--privacy .callout-label {
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
  color: var(--ok);
}

.callout--note {
  border-left-color: var(--muted);
}

.callout--note .callout-label {
  border-color: var(--line);
  color: var(--muted);
}

/* ---------- Cat asides ---------- */

.cat-note {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 2px 0;
}

.cat-note-art {
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 26px;
  transform: rotate(-2deg);
}

.cat-note-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.cat-note-body {
  position: relative;
  padding: 15px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  box-shadow: var(--shadow);
}

.cat-note-body::before {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 15px;
  width: 12px;
  height: 12px;
  background: var(--card);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.cat-note-body p {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
}

.cat-note-body span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cat-note--flip {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.cat-note--flip .cat-note-art {
  order: 2;
  transform: rotate(2deg);
}

.cat-note--flip .cat-note-body {
  border-radius: 16px 16px 4px 16px;
}

.cat-note--flip .cat-note-body::before {
  left: auto;
  right: -7px;
  border-left: 0;
  border-bottom: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* ---------- Bonus ---------- */

.bonus {
  margin-top: 18px;
  padding: clamp(24px, 4.2vw, 38px);
  background: linear-gradient(180deg, var(--card), var(--paper-2));
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: var(--radius);
  scroll-margin-top: 100px;
}

.bonus .eyebrow {
  margin-bottom: 10px;
}

.bonus h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bonus > p {
  max-width: 68ch;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14.5px;
}

.code {
  margin: 14px 0 16px;
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(246, 239, 226, 0.5);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code pre {
  margin: 0;
  padding: 15px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.code code {
  font-family: inherit;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  white-space: pre;
}

.copy {
  flex: 0 0 auto;
  padding: 4px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: rgba(246, 239, 226, 0.7);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.copy.done {
  color: #9be3a8;
  border-color: #9be3a8;
}

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

.faq {
  padding-top: clamp(48px, 6vw, 76px);
  scroll-margin-top: 90px;
}

.faq h2 {
  margin: 0.35em 0 0.3em;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-lede {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.faq-list {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 70ch;
  margin: 0;
  padding: 0 44px 20px 4px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---------- Finale ---------- */

.finale {
  margin-top: clamp(44px, 6vw, 72px);
  padding: clamp(32px, 5vw, 56px) clamp(22px, 4vw, 48px);
  background:
    radial-gradient(560px 280px at 50% 0%, rgba(217, 108, 79, 0.13), transparent 70%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.cat-art--done {
  width: min(250px, 62vw);
  margin: 0 auto 4px;
}

.cat-caption {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.finale h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.finale p {
  max-width: 56ch;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.finale-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

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

.site-footer {
  margin-top: clamp(48px, 7vw, 88px);
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.footer-in p {
  margin: 0;
  max-width: 60ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- Toast + confetti ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.paw-fall {
  position: fixed;
  top: -40px;
  z-index: 80;
  color: var(--accent);
  pointer-events: none;
  animation-name: fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes fall {
  to {
    transform: translateY(112vh) rotate(320deg);
    opacity: 0;
  }
}

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
    padding-top: clamp(38px, 7vw, 60px);
  }

  .hero-figure {
    max-width: 390px;
    margin: 6px auto 0;
    width: 100%;
  }

  .lede {
    max-width: 60ch;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .toc {
    position: static;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .toc-head {
    margin-bottom: 8px;
  }

  .bar {
    margin-bottom: 14px;
  }

  .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 2px;
  }

  .toc-list li {
    flex: 0 0 auto;
  }

  .toc-list a {
    display: flex;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-2);
    font-size: 12px;
    white-space: nowrap;
  }

  .toc-list a.active {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .toc-tick {
    display: none;
  }

  .toc-note {
    display: none;
  }
}

@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .header-in {
    height: 62px;
    gap: 12px;
  }

  .brand-name em {
    display: none;
  }

  .nav-link {
    display: none;
  }

  .header-nav {
    gap: 10px;
  }

  .btn {
    padding: 12px 18px;
  }

  .btn--sm {
    padding: 8px 13px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.4rem);
  }

  .hero-actions {
    align-items: flex-start;
    gap: 16px;
    margin-top: 26px;
  }

  .hero-facts {
    margin-top: 24px;
  }

  .intro {
    padding: 18px;
    gap: 12px;
  }

  .intro p {
    font-size: 13.5px;
  }

  .step {
    scroll-margin-top: 88px;
  }

  .step-head {
    gap: 10px;
  }

  .step h2 {
    flex: 1 1 100%;
    order: 3;
  }

  .step-num {
    order: 1;
  }

  .done-toggle {
    order: 2;
    margin-left: auto;
  }

  .step > p,
  .ticks li {
    font-size: 14px;
  }

  .callout {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px 16px;
  }

  .callout-label {
    width: fit-content;
  }

  .cat-note {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
  }

  .cat-note--flip {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .cat-note-art {
    border-radius: 20px;
  }

  .cat-note-body {
    padding: 13px 15px;
  }

  .cat-note-body p {
    font-size: 13.5px;
  }

  .cat-note-body span {
    font-size: 8.5px;
  }

  .code pre {
    font-size: 12px;
    padding: 13px 14px;
  }

  .code-top {
    font-size: 9px;
    padding-left: 14px;
  }

  .faq details p {
    padding-right: 24px;
  }

  .finale {
    border-radius: 24px;
  }

  .footer-in {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .sticker {
    left: 2%;
    bottom: 1%;
    font-size: 13.5px;
    padding: 8px 10px 8px 13px;
  }

  .sticker-arrow {
    width: 24px;
    height: 24px;
  }

  .fact {
    font-size: 9.5px;
    padding: 5px 10px;
  }

  .cat-note {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .cat-note--flip {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .cat-note-body p {
    font-size: 12.5px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    align-items: stretch;
  }

  .quiet-link {
    align-self: flex-start;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .toc,
  .done-toggle,
  .hero-actions,
  .finale-actions,
  .toast,
  .cat-note-art {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .layout {
    display: block;
  }

  .step,
  .intro,
  .bonus,
  .finale {
    box-shadow: none;
    break-inside: avoid;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
