:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #53615c;
  --paper: #f7f4ec;
  --panel: #fffdf8;
  --line: #c9d0ca;
  --green: #1d6949;
  --green-pale: #e4f2e9;
  --amber: #966218;
  --amber-pale: #fff0c9;
  --red: #9d352f;
  --red-pale: #f9dfdb;
  --block: #1d2422;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a { color: #125c44; }
a:hover { text-decoration-thickness: 2px; }

.site-header,
main,
footer {
  width: min(1100px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header { padding: 24px 0 8px; }
.brand { color: var(--ink); font-weight: 850; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }

.hero { padding: clamp(48px, 8vw, 96px) 0 48px; max-width: 830px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5.7rem); }
h2 { margin: 0 0 16px; font-size: clamp(1.55rem, 3vw, 2.5rem); }
h3 { margin: 0 0 10px; font-size: 1.2rem; }
.lede { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }

.profile,
.workspace,
.method,
.sources {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.profile,
.method-grid { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(300px, 1.2fr); gap: 40px; }
.profile > p { margin: 0; color: var(--muted); }

.workspace { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr); gap: 40px; align-items: start; }
.workspace > *,
.grid-scroll,
.table-scroll { min-width: 0; }
form, .results {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 16px 50px rgba(24, 41, 35, .07);
}

label { display: block; margin-bottom: 10px; font-weight: 750; }
code { background: #e9ece7; border-radius: 4px; padding: .08em .28em; }
textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 1px solid #88938e;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 16px;
  font: 700 1rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}
textarea:focus, button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid #e0a42d; outline-offset: 3px; }
.help, .privacy { color: var(--muted); font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
button { border-radius: 999px; padding: 11px 17px; font: inherit; font-weight: 800; cursor: pointer; }
.primary { border: 1px solid var(--green); background: var(--green); color: #fff; }
.secondary { border: 1px solid #8d9993; background: transparent; color: var(--ink); }

.results[hidden] { display: none; }
.result-heading { margin-bottom: 24px; }
.result-heading p:last-child { color: var(--muted); }
.status-pass { color: var(--green); }
.status-fail { color: var(--red); }
.grid-scroll, .table-scroll { width: 100%; max-width: 100%; overflow: auto; padding: 4px; }
.grid { border-collapse: collapse; margin: 0 auto 26px; table-layout: fixed; }
.grid td { width: clamp(22px, calc(250px / var(--columns)), 38px); aspect-ratio: 1; border: 1px solid #69736e; text-align: center; font: 800 .82rem/1 ui-monospace, monospace; }
.grid .blocked { background: var(--block); }
.grid .open { background: #fff; }
.grid .unchecked { background: var(--amber-pale); box-shadow: inset 0 0 0 3px var(--amber); }
.grid .mismatch { outline: 3px solid var(--red); outline-offset: -3px; }
.grid .unchecked.mismatch { background: linear-gradient(135deg, var(--amber-pale) 50%, var(--red-pale) 50%); }
.checks { display: grid; list-style: none; padding: 0; gap: 10px; }
.check { border-left: 4px solid; border-radius: 7px; padding: 12px 14px; }
.check strong, .check span { display: block; }
.check span { margin-top: 3px; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.check.pass { border-color: var(--green); background: var(--green-pale); }
.check.fail { border-color: var(--red); background: var(--red-pale); }
details { margin-top: 24px; }
summary { cursor: pointer; font-weight: 800; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.unknowns { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 24px; }
.input-error { border-left: 4px solid var(--red); background: var(--red-pale); border-radius: 8px; padding: 18px; }
.input-error h2 { font-size: 1.55rem; }

.method-grid article { border-left: 1px solid var(--line); padding-left: 24px; }
.method-grid ul, .sources ul { padding-left: 20px; }
.method-grid li, .sources li { margin: 8px 0; }
footer { padding: 36px 0 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

@media (max-width: 760px) {
  .profile, .workspace, .method-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-top: 48px; }
  h1 { font-size: clamp(2.4rem, 13vw, 4.2rem); }
  .workspace { width: 100%; }
  form, .results { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
