:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --accent: #c2562f;
  --gold: #e0a03a;
  --accent-deep: #a5441f;
  --line: #e6dccd;
  --tint: #f3e6d6;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .08);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-deep); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 16px; }
h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: var(--radius); }

/* Header: one row, brand + in-page links */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 700 22px/1.2 var(--font-head); }
.mark { flex: none; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--accent-deep); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--accent-deep); }

/* Hero: the tool is the first screen */
.hero { padding: 48px 0 32px; }
.hero h1 { margin-bottom: 8px; }
.lede { max-width: 70ch; font-size: 18px; color: var(--muted); margin-bottom: 24px; }
.strip { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.strip li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--gold); vertical-align: middle; }

.block { padding: 48px 0; border-top: 1px solid var(--line); }
.prose { max-width: 70ch; }

/* How it works: numbered list */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 16px; max-width: 70ch; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start; }
.steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent-deep); font: 700 22px/1 var(--font-head); }
.steps p { margin: 12px 0 0; }

/* Reading results: definition list, term left / text right */
.defs { margin: 24px 0 0; max-width: 960px; }
.defs > div { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.defs > div:first-child { border-top: 1px solid var(--line); }
.defs dt { font: 700 18px/1.2 var(--font-head); padding-top: 4px; }
.defs dd { margin: 0; max-width: 70ch; }

/* Accuracy: two real test tables */
.tests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.test { margin: 0; min-width: 0; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.test h3 { margin-bottom: 12px; }
.test-scroll { overflow-x: auto; }
.test table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.test th, .test td { padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.test th { color: var(--muted); font-weight: 600; }
.test figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.ms-chart { max-width: 720px; margin: 16px 0; padding: 16px; }
.tag { display: inline-block; padding: 0 8px; border-radius: var(--radius); font-size: 12px; font-weight: 600; line-height: 22px; white-space: nowrap; }
.tag-ok { background: var(--tint); color: var(--ink); }
.tag-miss { background: var(--accent-deep); color: #fff; }

/* FAQ: accordion */
.faq-list { max-width: 70ch; display: grid; gap: 8px; }
.faq-list details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.faq-list summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; color: var(--accent-deep); font: 700 22px/1 var(--font-head); }
.faq-list details[open] summary::after { content: "\2013"; }
.faq-list details p { margin: 0 0 16px; }

/* Footer */
.site-foot { margin-top: 48px; background: var(--card); border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--muted); }
.foot-row p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 8px; }
.foot-brand strong { color: var(--ink); }
.site-foot nav { display: flex; gap: 16px; }
.site-foot nav a { color: var(--ink); }

/* Legal pages */
.legal { max-width: 70ch; padding: 48px 0; }
.crumbs { margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.updated { font-size: 14px; color: var(--muted); }
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal ul { padding-left: 24px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  /* Tight header and hero so the tap pad fits on the first screen of a phone */
  .head-row { min-height: 52px; gap: 4px 16px; }
  .brand { font-size: 18px; }
  .nav { gap: 10px; }
  .nav a { font-size: 13px; }
  .hero { padding: 16px 0 24px; }
  .hero .crumbs { margin-bottom: 8px; }
  .lede { font-size: 16px; margin-bottom: 16px; }
  .block { padding: 32px 0; }
  .tests { grid-template-columns: 1fr; }
  .test { padding: 16px; }
  .defs > div { grid-template-columns: 1fr; gap: 8px; }
}
