:root {
  --bg: oklch(0.962 0.014 84);
  --ink: oklch(0.24 0.018 62);
  --accent: oklch(0.66 0.16 38);
  --accent-text: oklch(0.55 0.16 38);
  --card: oklch(0.985 0.008 84);
  --hair: oklch(0.85 0.02 80);
  --sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); }
::selection { background: var(--accent); color: oklch(0.97 0.01 84); }

@keyframes revealIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Layout ---------- */
.page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  padding: 64px 24px 120px;
  display: flex;
  justify-content: center;
}
.wrap { width: 100%; max-width: 880px; }

/* ---------- Header ---------- */
.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.brand-label {
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase; color: oklch(0.5 0.04 62);
}
.title {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(36px, 6.4vw, 68px); line-height: 1.02; letter-spacing: -0.02em;
  margin: 0 0 18px; color: oklch(0.22 0.02 62); text-wrap: balance;
}
.lede {
  font-size: clamp(18px, 2.4vw, 21px); line-height: 1.5; max-width: 560px;
  margin: 0 0 44px; color: oklch(0.4 0.02 62);
}

/* ---------- Selector ---------- */
.selector-card {
  background: var(--card); border: 1px solid oklch(0.87 0.02 80); border-radius: 18px;
  padding: 30px 34px 26px; margin-bottom: 56px; box-shadow: 0 1px 0 oklch(0.9 0.02 80);
}
.selector-label {
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.55 0.04 62); margin-bottom: 22px;
}
.rail { position: relative; height: 44px; margin: 0 13px; cursor: grab; touch-action: none; outline: none; }
.rail:active { cursor: grabbing; }
.rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }
.track {
  position: absolute; top: 50%; left: 0; right: 0; height: 4px;
  transform: translateY(-50%); background: oklch(0.9 0.02 80); border-radius: 2px;
}
.track-fill {
  position: absolute; top: 50%; left: 0; height: 4px;
  transform: translateY(-50%); background: var(--accent); border-radius: 2px;
  transition: width 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); width: 0%;
}
.stops {
  position: absolute; top: 0; left: 0; right: 0; height: 100%;
  display: flex; justify-content: space-between; align-items: center;
}
.stop {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent);
  background: var(--card); cursor: pointer; padding: 0;
}
.knob {
  position: absolute; top: 50%; margin-top: -16px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 4px 12px oklch(0.66 0.16 38 / 0.4);
  transition: left 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); left: 0%;
  transform: translateX(-50%); pointer-events: none;
}
.knob-inner { position: absolute; inset: 10px; border-radius: 50%; background: var(--card); }
.labels {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-family: var(--sans);
}
.lbl {
  flex: 1; background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 14px; font-weight: 600; color: oklch(0.6 0.03 62);
  transition: color 0.25s ease;
}
.lbl:nth-child(1) { text-align: left; }
.lbl:nth-child(2), .lbl:nth-child(3) { text-align: center; }
.lbl:nth-child(4) { text-align: right; }
.lbl.is-active { color: var(--accent-text); }

/* ---------- Steps ---------- */
.steps { display: flex; flex-direction: column; }
.step { border-top: 1px solid var(--hair); padding: 30px 0; }
.step:last-child { border-bottom: 1px solid var(--hair); }
.step-row { display: flex; gap: 22px; align-items: baseline; }
.step-num {
  font-family: var(--sans); font-weight: 800; font-size: clamp(28px, 4vw, 42px);
  line-height: 1; color: var(--accent); flex: none; width: 52px;
}
.step-body { flex: 1; }
.step-title {
  font-family: var(--sans); font-weight: 800; font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.08; letter-spacing: -0.01em; color: oklch(0.22 0.02 62);
}
.short {
  font-size: 18px; line-height: 1.55; margin: 16px 0 0; max-width: 600px;
  color: oklch(0.4 0.02 62); animation: revealIn 0.4s ease both;
}
.long { margin-top: 22px; max-width: 620px; animation: revealIn 0.45s ease both; }
.long-kicker {
  font-family: var(--sans); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.6 0.04 62); margin-bottom: 14px;
}
.long p { font-size: 17px; line-height: 1.62; margin: 0 0 16px; color: oklch(0.34 0.018 62); }
.long p:last-child { margin-bottom: 0; }

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

/* ---------- Closer ---------- */
.closer-q {
  font-size: clamp(20px, 3vw, 26px); line-height: 1.4; font-style: italic;
  margin: 40px 0 0; max-width: 560px; color: oklch(0.3 0.02 62); animation: revealIn 0.45s ease both;
}
.closer-p {
  font-size: 18px; line-height: 1.55; margin: 14px 0 0; max-width: 600px;
  color: oklch(0.4 0.02 62); animation: revealIn 0.5s ease both;
}

/* ---------- Why this site ---------- */
.why { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--hair); }
.why-title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(20px, 3vw, 26px); line-height: 1.1; margin: 0 0 16px; color: oklch(0.3 0.02 62);
}
.why-p { font-size: 18px; line-height: 1.6; margin: 0; max-width: 620px; color: oklch(0.4 0.02 62); }
.fn-ref { font-size: 0.5em; font-weight: 600; vertical-align: super; line-height: 0; padding-left: 4px; }
.fn-ref a { text-decoration: none; }
.footnote {
  font-size: 14px; line-height: 1.55; margin: 20px 0 0; max-width: 620px; color: oklch(0.5 0.02 62);
}
.footnote sup { color: var(--accent-text); }

/* ---------- References ---------- */
.refs {
  margin-top: 56px; padding-top: 32px; border-top: 2px solid var(--accent);
  animation: revealIn 0.5s ease both;
}
.refs-title {
  font-family: var(--sans); font-weight: 800; font-size: 22px;
  letter-spacing: -0.01em; color: oklch(0.22 0.02 62); margin-bottom: 20px;
}
.refs-list { columns: 2; column-gap: 40px; font-size: 13px; line-height: 1.5; color: oklch(0.42 0.018 62); }
.refs-list p { margin: 0 0 12px; break-inside: avoid; }
@media (max-width: 640px) { .refs-list { columns: 1; } }

/* ---------- Wife CTA ---------- */
.wife {
  margin-top: 40px; background: oklch(0.22 0.02 62); border-radius: 20px;
  padding: clamp(36px, 6vw, 64px); text-align: center; animation: revealIn 0.5s ease both;
}
.wife-kicker {
  font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: oklch(0.7 0.1 38); margin-bottom: 18px;
}
.wife-title {
  font-family: var(--sans); font-weight: 800; font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 14px; color: oklch(0.97 0.01 84);
}
.wife-cta {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 18px;
  background: var(--accent); color: oklch(0.99 0.005 84); text-decoration: none;
  padding: 16px 34px; border-radius: 999px; box-shadow: 0 6px 20px oklch(0.66 0.16 38 / 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}
.wife-cta:hover { background: oklch(0.6 0.16 38); transform: translateY(-2px); }

/* ---------- Visibility by level ---------- */
.short, .long, .refs, .closer, .wife { display: none; }
body[data-level="2"] .short,
body[data-level="3"] .short { display: block; }
body[data-level="3"] .long { display: block; }
body[data-level="3"] .refs { display: block; }
body[data-level="1"] .closer,
body[data-level="2"] .closer,
body[data-level="3"] .closer { display: block; }
body[data-level="4"] .wife { display: block; }

/* ---------- Ko-fi dock ---------- */
.kofi-dock {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.kofi-panel-wrap { display: none; }
.kofi-dock.open .kofi-panel-wrap {
  display: block;
  width: min(360px, calc(100vw - 44px)); height: 540px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 16px; box-shadow: 0 14px 44px rgba(0,0,0,0.28);
  overflow: hidden; animation: revealIn 0.28s ease both;
}
.kofi-panel-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.kofi-btn {
  display: flex; align-items: center; gap: 9px; font-family: var(--sans); font-weight: 600;
  font-size: 16px; background: #00bfa5; color: #fff; border: none; cursor: pointer;
  padding: 12px 20px 12px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  transition: background 0.2s ease, transform 0.2s ease;
}
.kofi-btn:hover { background: #00a892; transform: translateY(-2px); }
.kofi-btn .icon { font-size: 20px; line-height: 1; }
