/* ============================================================
   Public pages: About, Walkthrough (and the bar on Architecture).
   The app's palette, the front door's type, room to read.
   ============================================================ */

:root {
  --bg: #f4f1ea; --panel: #ffffff; --ink: #1f2328; --muted: #5f6672; --line: #e3e0d8;
  --accent: #4a7c3f; --accent-hover: #3d6934; --accent-ink: #ffffff; --accent-soft: #e6efe2;
  --hint: #2f6fdd; --notice: #fbf1dc; --notice-ink: #6b4500;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181d; --panel: #1e2128; --ink: #e8eaed; --muted: #9aa1ac; --line: #2c3038;
    --accent: #5f9a52; --accent-hover: #6da25e; --accent-ink: #0f1410; --accent-soft: #1f2d1f;
    --hint: #8ab4ff; --notice: #30271a; --notice-ink: #f0c56c;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.40);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16181d; --panel: #1e2128; --ink: #e8eaed; --muted: #9aa1ac; --line: #2c3038;
  --accent: #5f9a52; --accent-hover: #6da25e; --accent-ink: #0f1410; --accent-soft: #1f2d1f;
  --hint: #8ab4ff; --notice: #30271a; --notice-ink: #f0c56c;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.40);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--hint); outline-offset: 2px; }
img { max-width: 100%; }

/* ---------- bar ---------- */
.site-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.site-brand img { border-radius: 7px; }
.site-brand b { font-size: 17px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.site-cta {
  margin-left: auto; padding: 8px 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; font-size: 15px;
}
.site-cta:hover { background: var(--accent-hover); }

main { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
main.narrow { max-width: 820px; }

h1, h2, h3 { text-wrap: balance; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: 18px; color: var(--muted); max-width: 62ch; margin: 0; }
.small { font-size: 13.5px; color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-weight: 700; text-decoration: none; font-size: 15px;
}
.button:hover { border-color: var(--muted); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 44px; align-items: center; padding: 56px 0 40px; }
.hero-text { display: grid; gap: 20px; }
.hero h1 { margin: 0; font-size: clamp(42px, 5.6vw, 72px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.proof { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.proof li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel); font-size: 13px; font-weight: 600; }
.proof li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.hero-shot { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel); }
.hero-shot img { display: block; width: 100%; height: auto; }

/* ---------- bands ---------- */
.band { padding: 44px 0; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.band h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; line-height: 1.15; }
.band-head { display: grid; gap: 6px; }
.band-head p { margin: 0; color: var(--muted); }
.columns { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.columns p { margin: 12px 0 0; max-width: 60ch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 17px; }
.grades { width: 100%; border-collapse: collapse; font-size: 15px; }
.grades th, .grades td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grades tr:last-child th, .grades tr:last-child td { border-bottom: 0; }
.grades th { white-space: nowrap; font-weight: 700; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot.best { background: #3f8f4a; } .dot.good { background: #7aa35a; } .dot.inacc { background: #d9a520; }
.dot.mistake { background: #e0762d; } .dot.blunder { background: #c9372c; }

.features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 36px; }
.features article { display: grid; gap: 10px; align-content: start; }
.features h2 { font-size: 22px; }
.features p { margin: 0; max-width: 62ch; }

.notice { background: var(--notice); border-radius: 16px; padding: 22px 24px; display: grid; gap: 8px; }
.notice h2 { font-size: 22px; color: var(--notice-ink); }
.notice p { margin: 0; max-width: 72ch; }

.faq { gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 2px; max-width: 70ch; }
.closing { justify-items: start; }

/* ---------- slider ---------- */
.slider { display: grid; gap: 14px; outline-offset: 6px; }
.slides {
  list-style: none; margin: 0; padding: 4px 2px 10px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(900px, 86%); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  position: relative;
}
.slides::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px 12px 18px; }
.slide figure { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.slide img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 800; object-fit: cover; object-position: top; }
.slide-text { padding: 0 6px; }
.slide h3 { margin: 0 0 4px; font-size: 19px; }
.slide p { margin: 0; color: var(--muted); max-width: 70ch; }
.slider-controls { display: flex; align-items: center; gap: 12px; }
.slider-controls button.prev, .slider-controls button.next {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 18px; cursor: pointer;
}
.slider-controls button[disabled] { opacity: .4; cursor: default; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); width: 26px; border-radius: 6px; }
.count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- walkthrough ---------- */
.intro { padding: 44px 0 10px; display: grid; gap: 14px; }
.intro h1 { margin: 0; font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -0.03em; line-height: 1.05; }
.mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.mode button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.mode button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.guide-host { padding-bottom: 20px; }

.guide-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.guide-toc button { padding: 6px 12px; font: inherit; font-size: 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.guide-toc button:hover { border-color: var(--muted); }
.guide-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.guide-section h3 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.015em; }
.guide-section h4 { margin: 20px 0 6px; font-size: 16px; }
.guide-section p, .guide-section li { max-width: 68ch; font-size: 16px; line-height: 1.65; }
.guide-section p { margin: 8px 0; }
.guide-section ul { margin: 6px 0; padding-left: 20px; }
.guide-section li + li { margin-top: 4px; }
.guide-section button { font: inherit; color: var(--hint); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.guide-shot { margin: 16px 0; }
.guide-shot img { display: block; width: 100%; max-width: 375px; height: auto; border: 1px solid var(--line); border-radius: 14px; }
.guide-shot.desktop img { max-width: 100%; aspect-ratio: 1280 / 800; object-fit: cover; cursor: zoom-in; }
.guide-shot figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.guide-table { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: 14px; }
.guide-table th, .guide-table td { padding: 8px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.guide-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); }
.guide-table tbody th { font-weight: 600; white-space: nowrap; }
.guide-formula { overflow-x: auto; padding: 8px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.guide-hint { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.guide kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; }
.guide-zoom { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; background: rgba(6, 8, 12, .9); cursor: zoom-out; }
.guide-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; }

.site-foot { max-width: 1160px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 44px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.site-foot p { margin: 4px 0; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .site-bar { gap: 10px 16px; padding: 10px 16px; }
  .site-nav { order: 3; width: 100%; gap: 16px; overflow-x: auto; }
  .site-cta { padding: 7px 13px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 30px 0 26px; }
  .hero h1 { font-size: clamp(40px, 12vw, 54px); }
  .lede { font-size: 16.5px; }
  .hero-shot { max-width: 300px; justify-self: center; border-radius: 26px; border-width: 6px; border-color: #0b0d10; }
  .hero-shot img { aspect-ratio: 375 / 700; object-fit: cover; object-position: top; }
  .columns, .features { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .band { padding: 34px 0; }
  .slides { grid-auto-columns: 82%; }
  .slide img { aspect-ratio: 4 / 5; }
  .card { padding: 16px; }
}
