:root {
  color-scheme: light dark;
  /* Wheat & Honey palette (light), transcribed from
     ExpressionTrainer/Sources/Theme/Themes.swift `Theme.wheat` — the only
     source of truth for these hex values (design §4). */
  --bg: #f7f4ed;
  --surface: #fdfbf6;
  --fill: #f1e7ce;
  --fill-mid: #e7e0ce;
  --line: #e7e0ce;
  --ink: #3e3a28;
  --muted: #7c8074;
  --accent: #8a6b34;
  --on-accent: #fbf6ea;
  --success: #5f7256;
  --success-bg: #e9eee3;
  --error: #98341f;
  --error-bg: #f8e9e3;
  --shadow: 0 20px 60px rgba(62, 58, 40, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Wheat & Honey palette (dark), same source. */
    --bg: #2e2a1c;
    --surface: #3d3826;
    --fill: #4a4128;
    --fill-mid: #4f4830;
    --line: #4f4830;
    --ink: #f3efe1;
    --muted: #bfb89f;
    --accent: #d6b36c;
    --on-accent: #2e2007;
    --success: #9bb386;
    --success-bg: #33402f;
    --error: #e07856;
    --error-bg: #48312a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}
img, svg { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

.wrap { width: min(880px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
}
.brand { font-weight: 780; letter-spacing: -0.02em; text-decoration: none; font-size: 1.05rem; }
.site-nav { display: flex; align-items: center; gap: 14px; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; }
.site-nav a:hover { color: var(--ink); }
.lang-toggle {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }

.hero { padding: 40px 0 56px; }
.eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { max-width: 640px; margin: 16px 0; font-size: clamp(2.1rem, 7vw, 3.4rem); }
h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { margin: 0 0 6px; font-size: 1.1rem; }
.lede { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.button.primary { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.notice {
  margin: 26px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  font-size: 0.92rem;
}

/* Sample transcript card */
.transcript-card {
  margin: 8px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.transcript-card p { margin: 0; font-size: 1.05rem; line-height: 1.9; }
.transcript-card mark {
  padding: 0.02em 0.15em;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
mark.tag-filler { background: color-mix(in srgb, var(--muted) 22%, transparent); text-decoration: underline dotted var(--muted); }
mark.tag-hedge { background: color-mix(in srgb, var(--accent) 20%, transparent); text-decoration: underline dashed var(--accent); }
mark.tag-vague { background: color-mix(in srgb, var(--error) 16%, transparent); text-decoration: underline var(--error); }
.transcript-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.8rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-dot.tag-filler { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.legend-dot.tag-hedge { background: color-mix(in srgb, var(--accent) 65%, transparent); }
.legend-dot.tag-vague { background: color-mix(in srgb, var(--error) 55%, transparent); }

.section { padding: 44px 0; border-top: 1px solid var(--line); }
.section-intro { max-width: 600px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.prose { max-width: 720px; padding: 40px 0 80px; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.prose h2 { margin-top: 40px; font-size: 1.35rem; }
.prose h3 { margin-top: 26px; font-size: 1.05rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose .meta { color: var(--muted); font-size: 0.88rem; }
.prose .path {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
}
.faq-item { padding: 18px 0; border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 0; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .site-header { flex-wrap: wrap; }
}
