:root {
  --bg: #f6f1e8;
  --bg-2: #fffdf8;
  --ink: #171410;
  --muted: #6f675c;
  --line: #e2d6c4;
  --accent: #f4a8b8;
  --accent-2: #c45b74;
  --good: #2c6a3b;
  --mid: #9a6410;
  --bad: #c45b74;
  --rust: #f4a8b8;
  --gold: #c45b74;
  --black: #171410;
  --white: #fffdf8;
  --paper: #f6f1e8;
  --paper-2: #efe6d6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-bottom: 2rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

body:before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top, main, footer, .section { position: relative; z-index: 1; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 2.4rem)); margin: 0 auto; }
.muted { color: var(--muted); }

.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, white);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 700; }
img.logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f6f1e8;
}
.nav { display: flex; gap: 1.1rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.nav a.on, .nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  padding: .75rem 1.1rem; cursor: pointer; text-decoration: none; font: inherit;
}
.btn.light { background: var(--white); color: var(--ink); }
.btn.rust, .btn.primary { background: var(--accent); border-color: #e38aa0; color: #3a1420; font-weight: 700; }
.btn.small { padding: .45rem .8rem; font-size: 13px; }

.pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .2rem; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .28rem .7rem; font-size: 12.5px; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 99px; background: #8fbf7a; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; padding: 5rem 0 3.2rem; align-items: center; }
.kicker {
  color: var(--accent-2); text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; font-weight: 700; margin: 0 0 1rem;
}
h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; margin: 0 0 1.2rem;
}
h1 em { font-style: italic; background: #f8cdd6; padding: 0 .12em; }
.lede { max-width: 36rem; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.8rem 0 1rem; }

.stage, .mascot {
  background: var(--bg-2); border: 1px solid var(--line); padding: 1.2rem;
}
.stage-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.call {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent); color: #1a0d08; padding: .25rem .55rem;
}
.screen, .machine {
  background: #0c0b0a; color: #efe7d8; padding: 1rem 1.05rem;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; min-height: 160px;
}
.screen b { color: #f0c9bc; }

.section { padding: 3.2rem 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500; margin: 0 0 .5rem; }
.sub { color: var(--muted); max-width: 40rem; margin: 0 0 1.3rem; }

.grid3, .grid4, .grid2 { display: grid; gap: 1rem; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.grid2 { grid-template-columns: 1fr 1fr; }
.card { background: var(--white); border: 1px solid var(--line); padding: 1.2rem 1.25rem; }
.card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.card p, .card li { color: var(--muted); }
.num { font-family: var(--serif); color: var(--accent); font-size: 1.4rem; display: block; margin-bottom: .25rem; }

.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 0 0 1rem; }
.levels button {
  text-align: left; background: #fffdf8; border: 1px solid var(--line);
  color: var(--ink); padding: .8rem .85rem; cursor: pointer; font: inherit;
}
.levels button.on { background: var(--accent); color: #3a1420; border-color: #e38aa0; }
.levels strong { display: block; font-size: 13px; }
.levels em { display: block; font-style: normal; font-size: 12px; opacity: .75; margin-top: .15rem; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pair pre {
  margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  background: #0c0b0a; color: #efe7d8; border: 1px solid var(--line); padding: 1rem; min-height: 210px;
}
.pair .good { background: #162016; }

.bench { background: var(--bg-2); border: 1px solid var(--line); padding: 1.25rem; margin-bottom: 2.5rem; }
label.field { display: block; margin: 0 0 1rem; }
label.field span { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: .4rem; }
input, textarea {
  width: 100%; background: #fffdf8; color: var(--ink);
  border: 1px solid var(--line); padding: .8rem .9rem; font: inherit;
}
textarea { min-height: 200px; resize: vertical; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.hint { color: var(--muted); font-size: 13px; }

.result { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.result.hidden { display: none; }
.meter { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.score { font-family: var(--serif); font-size: 4rem; line-height: .85; }
.verdict { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.block h4 { margin: 1.15rem 0 .35rem; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.rewrite { background: #171410; color: #f6f1e8; border: 1px dashed #3a342c; padding: 1rem; white-space: pre-wrap; font-size: 15px; }
.hits { margin: 0; padding-left: 1.15rem; color: var(--muted); }

.page-hero { padding: 2.8rem 0 1.2rem; }
.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 700; }

.comic { margin: 0 0 2.2rem; overflow: visible; }
.comic img {
  display: block;
  width: 100%;
  height: auto;
  background: #f6f1e8;
}


footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: #8a8073; font-size: 13px; background: #efe6d6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 1.4rem; }
.footer-grid h4 { margin: 0 0 .4rem; color: var(--ink); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.footer-grid a { display: block; text-decoration: none; margin: .2rem 0; color: var(--ink); }
.brand-foot { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 700; margin: 0 0 .35rem; }
.legal { margin-top: 1.4rem; font-size: 12.5px; color: #8c8173; }

@media (max-width: 860px) {
  .hero, .grid3, .grid4, .grid2, .pair, .footer-grid, .levels { grid-template-columns: 1fr; }
  .nav { display: none; }
  h1 { font-size: 2.5rem; }
}
