/* ==========================================================================
   Padampetti — stylesheet
   Visual system per DESIGN.md (opencode.ai-inspired):
     · 100% monospace typography
     · warm cream canvas, nearly-black ink
     · 4px radius on interactive elements, 0px on containers
     · flat: hairline rules only, no shadows, no gradients
     · ASCII bracket markers as the only iconography
     · exactly one dark "hero" surface per page
   ========================================================================== */

:root {
  /* brand */
  --ink: #201d1d;
  --ink-deep: #0f0000;

  /* surfaces */
  --canvas: #fdfcfc;
  --surface-soft: #f8f7f7;
  --surface-card: #f1eeee;
  --surface-dark: #201d1d;
  --surface-dark-elevated: #302c2c;

  /* text */
  --charcoal: #302c2c;
  --body: #424245;
  --mute: #646262;
  --stone: #6e6e73;
  --ash: #9a9898;
  --on-dark: #fdfcfc;
  --on-dark-mute: #9a9898;

  /* lines */
  --hairline: rgba(15, 0, 0, 0.12);
  --hairline-strong: #646262;

  /* semantic — used ONLY for data states (confidence, errors, success) */
  --accent: #007aff;
  --warning: #ff9f0a;
  --danger: #ff3b30;
  --success: #30d158;

  /* On-canvas text variants. The raw semantic tokens above are tuned for the
     dark TUI surface and fail WCAG AA on the cream canvas (warning 2.01:1,
     success 1.97:1, danger 3.46:1). These darkened equivalents are the ones to
     use for text and borders on light surfaces. Verified with a contrast audit. */
  --warning-text: #8a5200; /* 6.24:1 on --canvas */
  --danger-text: #c1121f;  /* 6.08:1 on --canvas */
  --success-text: #1a7f45; /* 4.92:1 on --canvas */

  /* Note: --accent, --charcoal and --r-full are part of the documented design
     token set and are reserved rather than currently rendered. */
  --r-sm: 4px;
  --r-full: 9999px;

  --mono: "Berkeley Mono", "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    "Noto Sans Malayalam", "Nirmala UI", monospace;

  --col: 1100px;
  --section-gap: 96px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: break-word;
}

h1, h2, h3 { color: var(--ink); line-height: 1.5; margin: 0; }
h1 { font-size: 38px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 500; }
p { margin: 0 0 12px; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink-deep); }

code {
  background: var(--surface-card);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  font-size: 14px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.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;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--on-dark);
  padding: 8px 16px; border-radius: var(--r-sm);
  z-index: 20; text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

.shell { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 20px; }

.muted { color: var(--mute); }
.small { font-size: 14px; line-height: 2; }
.faint { color: var(--stone); }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- nav --- */

.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 56px; padding: 8px 0;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.wordmark .mark {
  background: var(--surface-dark); color: var(--on-dark);
  border-radius: var(--r-sm); padding: 2px 8px;
  font-size: 14px; letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-links a {
  color: var(--mute); text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--r-sm);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* --------------------------------------------------------------- hero --- */

.hero {
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: 64px 32px;
  margin-bottom: var(--section-gap);
}
.hero-frame { max-width: var(--col); margin: 0 auto; }
.ascii-mark {
  color: var(--on-dark);
  /* The wordmark is 59 columns wide, so scale it to the viewport rather than
     letting it overflow on phones. */
  font-size: clamp(6px, 1.4vw, 13px);
  line-height: 1.15;
  margin: 0 0 24px;
  white-space: pre;
  overflow-x: auto;
}

/* The block wordmark depends on the platform drawing U+2588 at the same advance
   width as a space. Android's per-glyph font fallback does not always do that,
   and the letters overlap into an unreadable smear. Below the breakpoint the
   plain wordmark is used instead — it is guaranteed to render correctly, and it
   is still the same monospace brand. */
.text-mark {
  display: none;
  color: var(--on-dark);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

@media (max-width: 640px) {
  .ascii-mark { display: none; }
  .text-mark { display: block; }
}
.prompt-row {
  background: var(--surface-dark-elevated);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 0 0 8px;
  font-size: 16px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.prompt-row .pipe { color: var(--ash); }
.prompt-row .k { color: var(--on-dark-mute); min-width: 12ch; }
.prompt-row .v { color: var(--on-dark); }
.prompt-row .v.strong { font-weight: 700; }
.hero-keys {
  color: var(--ash); font-size: 14px; line-height: 2;
  margin: 16px 0 0;
}
.hero-keys kbd {
  font: inherit; background: var(--surface-dark-elevated);
  border-radius: var(--r-sm); padding: 1px 6px; color: var(--on-dark);
}

/* ------------------------------------------------------------ sections --- */

main { padding-bottom: var(--section-gap); }

.section { margin-bottom: var(--section-gap); }
.section:last-child { margin-bottom: 0; }

.section-head {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-head .label { color: var(--ink); font-size: 16px; font-weight: 700; }
.section-head .marker { color: var(--stone); font-size: 16px; }
.section-head .hint { color: var(--mute); font-size: 14px; margin-left: auto; }

/* -------------------------------------------------------------- forms --- */

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.control { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.control-search { grid-column: 1 / -1; }
.control-reset { justify-content: flex-end; }

label, .field-label {
  color: var(--mute);
  font-size: 14px;
  line-height: 2;
}

/* Every text-ish input type, not just the ones the catalogue happens to use.
   The auth dialog uses email/password and inline review editing uses number —
   missing them left the only form that creates accounts rendering in the
   browser's default UI font on a white field. */
input[type="search"], input[type="text"], input[type="email"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  min-height: 40px;
}
input[type="search"]:focus, input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  background: var(--canvas);
  border-color: var(--ink);
  outline: none;
}
textarea { padding: 12px; min-height: 0; }

input[type="range"] { accent-color: var(--ink); width: 100%; min-height: 40px; }
output { color: var(--mute); font-size: 14px; }

.btn {
  font: inherit; font-weight: 500; line-height: 2;
  background: var(--ink); color: var(--on-dark);
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  padding: 4px 20px; min-height: 36px;
  cursor: pointer;
}
.btn:active { background: var(--ink-deep); border-color: var(--ink-deep); }
.btn.secondary {
  background: var(--canvas); color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn.secondary:active { background: var(--surface-card); }

/* --------------------------------------------------------- film rows --- */

.legend {
  color: var(--mute); font-size: 14px; line-height: 2;
  display: flex; gap: 16px; flex-wrap: wrap;
  padding-bottom: 8px;
}
.legend .marker { color: var(--stone); }

.film-rows { border-top: 1px solid var(--hairline); }

.row {
  display: grid;
  grid-template-columns: 5ch 5ch minmax(0, 1fr) 22ch 9ch 12ch;
  grid-template-areas: "mark year title meta community gross";
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--body);
}
.row:hover { background: var(--surface-soft); }
.row:hover .row-name { color: var(--ink); text-decoration: underline; }

.row-marker { grid-area: mark; color: var(--stone); }
.row-year { grid-area: year; color: var(--mute); font-size: 14px; }
.row-title { grid-area: title; min-width: 0; display: flex; flex-direction: column; }
.row-name { color: var(--ink); font-weight: 500; }
.row-ml { color: var(--stone); font-size: 14px; line-height: 1.5; }
.row-meta {
  grid-area: meta;
  display: flex; gap: 8px; flex-wrap: wrap;
  color: var(--mute); font-size: 14px;
}
.row-meta .sep { color: var(--stone); }
.row-community {
  grid-area: community;
  text-align: right;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}
.row-dir { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.row-status { color: var(--mute); font-size: 14px; white-space: nowrap; }
.row-gross { grid-area: gross; text-align: right; color: var(--ink); font-weight: 500; white-space: nowrap; }
.row-gross .none { color: var(--stone); font-weight: 400; }
.row-gross .tilde { color: var(--warning-text); margin-left: 2px; cursor: help; }

.empty { padding: 48px 0; text-align: center; color: var(--mute); }

/* ---------------------------------------------------------- data bits --- */

.flag {
  display: inline-block;
  border: 1px solid var(--warning-text);
  color: var(--warning-text);
  background: rgba(255, 159, 10, 0.1);
  border-radius: var(--r-sm);
  padding: 0 6px;
  font-size: 14px;
  line-height: 1.5;
}

.confirm {
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 2;
}
.confirm.ok { border: 1px solid var(--success-text); color: var(--success-text); background: rgba(48, 209, 88, 0.1); }
.confirm.warn { border: 1px solid var(--warning-text); color: var(--warning-text); background: rgba(255, 159, 10, 0.1); }
.confirm.error { border: 1px solid var(--danger-text); color: var(--danger-text); background: rgba(255, 59, 48, 0.08); }

.note { color: var(--mute); font-size: 14px; margin: 0 0 10px; }
.note strong { color: var(--ink); font-weight: 700; }
.notes { margin-top: 16px; }

.ascii-chart {
  margin: 0 0 16px;
  padding: 16px 0;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  color: var(--body);
}
.ascii-chart .sr-only-text { position: absolute; left: -9999px; }

.data-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 16px; }
.data-table caption {
  caption-side: top;
  text-align: left; color: var(--mute); font-size: 14px;
  line-height: 2; padding-bottom: 8px;
}
.data-table th, .data-table td {
  text-align: left; padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: baseline;
}
.data-table th { color: var(--mute); font-weight: 400; width: 44%; }
.data-table td { color: var(--ink); }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }

.kv { list-style: none; padding: 0; margin: 0 0 16px; }
.kv li {
  display: grid; grid-template-columns: 22ch minmax(0, 1fr);
  gap: 16px; padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.kv .k { color: var(--mute); }
.kv .v { color: var(--ink); }
.kv li:last-child { border-bottom: 0; }

.inline-list { color: var(--body); }
.inline-list .sep { color: var(--stone); }

/* ------------------------------------------------------------- header --- */

.film-head { margin-bottom: 32px; }
.film-title { margin-bottom: 4px; }
.film-ml { color: var(--mute); font-size: 16px; margin: 0 0 8px; }
.film-meta { color: var(--mute); font-size: 14px; line-height: 2; margin: 0; }
.film-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mute);
}
.tag.dark { background: var(--surface-dark); border-color: var(--surface-dark); color: var(--on-dark); }
.tag.ok { border-color: var(--success-text); color: var(--success-text); }
.tag.warn { border-color: var(--warning-text); color: var(--warning-text); }

.headline-figs { display: grid; gap: 8px; margin-bottom: 16px; }
.hero .flag { color: var(--warning); background: rgba(255, 159, 10, 0.14); }

/* ----------------------------------------------------------- timeline --- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 5ch 20ch 14ch minmax(0, 1fr);
  grid-template-areas: "mark time type summary";
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item .marker { grid-area: mark; color: var(--stone); }
.timeline-item time { grid-area: time; color: var(--ink); font-size: 14px; }
.timeline-item .type { grid-area: type; color: var(--mute); font-size: 14px; }
.tl-summary { grid-area: summary; margin: 0; color: var(--body); }
.tl-summary .src { color: var(--stone); font-size: 14px; margin-left: 8px; }

/* -------------------------------------------------------------- media --- */

.embed + .embed { margin-top: 32px; }
.embed h3 { margin-bottom: 8px; }
.video-wrap {
  position: relative; padding-top: 56.25%;
  background: #000; border-radius: var(--r-sm); overflow: hidden;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .watch { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--mute); }

.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.yt-card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.yt-card h3 { font-size: 14px; font-weight: 500; margin: 0; color: var(--ink); }
.yt-card p { margin: 0; color: var(--stone); font-size: 14px; }
.yt-card a { font-size: 14px; color: var(--mute); margin-top: auto; }

/* ------------------------------------------------------------ ratings --- */

.rating-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  margin-bottom: 16px;
}
.rating-block {
  padding: 16px 20px; border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 2px;
}
.rating-block:last-child { border-right: 0; }
.rating-value { color: var(--ink); font-size: 24px; font-weight: 700; line-height: 1.3; }
.rating-stars { color: var(--ink); font-size: 16px; letter-spacing: 0.02em; }

.score-list { list-style: none; padding: 0; margin: 0; }
.score-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline);
}
.score-list li:last-child { border-bottom: 0; }
.score-list .src { color: var(--mute); }
.score-list .val { color: var(--ink); }

/* --------------------------------------------------------------- ugc --- */

.entry-list { list-style: none; padding: 0; margin: 0 0 8px; }
.entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.entry:last-child { border-bottom: 0; }
.entry-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.entry-author { color: var(--ink); font-weight: 500; }
.entry-date { color: var(--stone); font-size: 14px; }
.entry p { margin: 0; }
.entry-actions { margin-top: 6px; }

.form {
  display: grid; gap: 12px;
  max-width: 720px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  margin-top: 20px;
}
.form-row { display: grid; gap: 4px; }

.star-picker { display: flex; gap: 4px; }
.star-picker button {
  font: inherit; cursor: pointer;
  background: var(--canvas); color: var(--stone);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 4px 8px; min-height: 36px;
}
.star-picker button.on { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }

.link-btn {
  font: inherit; font-size: 14px; cursor: pointer;
  background: none; border: 0; padding: 0;
  color: var(--mute); text-decoration: underline;
}
/* Danger colour is for destructive actions only. Painting every link-button red
   made sign out, edit and cancel look equally dangerous. */
.link-btn:hover { color: var(--ink); }
[data-delete]:hover, [data-delete].link-btn:hover { color: var(--danger-text); }

.seed-tag { color: var(--stone); font-size: 14px; }

/* ------------------------------------------------------------ sources --- */

.source-list { padding-left: 5ch; margin: 0; }
.source-list li { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.source-list li:last-child { border-bottom: 0; }
.source-list a { font-size: 14px; }
.source-list p { margin: 2px 0 0; color: var(--stone); font-size: 14px; line-height: 1.7; }

/* -------------------------------------------------------------- misc --- */

.status { color: var(--mute); font-size: 14px; min-height: 1px; margin: 0 0 16px; }
.status.error { color: var(--danger-text); font-weight: 500; }

.notice {
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  color: var(--mute);
  font-size: 14px;
  line-height: 2;
}

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0;
  color: var(--mute);
  font-size: 14px;
  line-height: 2;
}
.site-footer p { max-width: 90ch; margin: 0 0 8px; }
.footer-links {
  display: flex; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  margin-top: 16px; padding-top: 16px;
}
.footer-links a { color: var(--mute); text-decoration: none; padding: 4px 0; }
.footer-links a:hover { color: var(--ink); }
.footer-links .sep { color: var(--stone); }

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
  :root { --section-gap: 64px; }
  .row {
    grid-template-columns: 5ch 5ch minmax(0, 1fr) 9ch 12ch;
    grid-template-areas:
      "mark year title community gross"
      ".    .    meta  meta      meta";
  }
  .row-dir { max-width: none; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-item {
    grid-template-columns: 5ch 14ch minmax(0, 1fr);
    grid-template-areas: "mark time summary";
  }
  .timeline-item .type { display: none; }
}

@media (max-width: 640px) {
  :root { --section-gap: 48px; }
  h1 { font-size: 28px; }
  .hero { padding: 40px 20px; }
  .control-search { grid-column: auto; }
  .controls { grid-template-columns: 1fr; }
  .row {
    grid-template-columns: 5ch minmax(0, 1fr);
    grid-template-areas:
      "mark year"
      "title title"
      "meta  meta"
      "community gross";
    gap: 2px 12px;
  }
  .row-gross { text-align: right; }
  .row-community { text-align: left; }
  .rating-block { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .rating-block:last-child { border-bottom: 0; }
  .kv li { grid-template-columns: 1fr; gap: 2px; }
  .timeline-item {
    grid-template-columns: 5ch minmax(0, 1fr);
    grid-template-areas:
      "mark    time"
      "summary summary";
  }
  .data-table th { width: 40%; }
  .section-head .hint { margin-left: 0; }
}

/* --------------------------------------------------------------- auth --- */

.nav-auth { display: inline-flex; align-items: center; gap: 10px; }
.nav-user {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn.auth-open { padding: 2px 14px; min-height: 32px; font-size: 14px; }

.auth-dialog {
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  background: var(--canvas);
  color: var(--body);
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  font-family: var(--mono);
  font-size: 16px;
}
.auth-dialog::backdrop { background: rgba(15, 0, 0, 0.55); }
.auth-dialog .auth-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.auth-dialog .auth-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.auth-dialog .auth-head .marker { color: var(--stone); }
.auth-dialog .auth-dismiss { margin-left: auto; }
.auth-dialog .auth-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--hairline); }
.auth-tab {
  font: inherit; font-weight: 500;
  background: transparent; border: 0; cursor: pointer;
  color: var(--mute);
  padding: 10px 20px;
  border-bottom: 2px solid transparent;
}
.auth-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.auth-dialog .form {
  margin: 0; padding: 20px; border-top: 0; max-width: none;
}

/* ------------------------------------------------------ entry actions --- */

.entry-actions { display: flex; gap: 12px; margin-top: 8px; }
.entry-actions .link-btn { font-size: 14px; }
.form-actions { display: flex; gap: 16px; align-items: center; }
.form-row.checkbox label { display: flex; align-items: center; gap: 8px; color: var(--body); }
.form-row.checkbox input { width: auto; min-height: 0; }
.inline-edit { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.inline-edit h3 { display: none; }

.spoiler {
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 0 0 8px;
}
.spoiler summary { cursor: pointer; color: var(--mute); font-size: 14px; }
.spoiler p { margin: 8px 0 0; }

.notice .btn { margin-top: 8px; }

/* --------------------------------------------------------------- home --- */

.lede {
  color: var(--on-dark);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
}
.hero-sub {
  color: var(--on-dark-mute);
  max-width: 62ch;
  margin: 0 0 8px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Buttons sit on the dark hero here, so they invert. */
.hero .btn { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.hero .btn:active { background: var(--ash); border-color: var(--ash); }
.hero .btn.secondary { background: transparent; color: var(--on-dark); border-color: var(--on-dark-mute); }
.hero .btn.secondary:active { background: var(--surface-dark-elevated); }

.diff-list, .steps { list-style: none; padding: 0; margin: 0; }
.diff-list li, .steps li {
  display: grid;
  grid-template-columns: 5ch minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.diff-list li:last-child, .steps li:last-child { border-bottom: 0; }
.diff-list .marker { color: var(--stone); }
.diff-list strong { display: block; color: var(--ink); font-weight: 700; }
.diff-list p { margin: 4px 0 0; color: var(--mute); }
.step-n { color: var(--stone); font-size: 14px; }
.steps h3 { margin: 0 0 4px; color: var(--ink); font-size: 16px; font-weight: 700; }
.steps p { margin: 0; color: var(--mute); }

.section-head .hint a { color: var(--mute); text-decoration: none; }
.section-head .hint a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 640px) {
  .lede { font-size: 20px; }
  .diff-list li, .steps li { grid-template-columns: 4ch minmax(0, 1fr); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
