/* Slopcheck — palette of Steady Robots (Roman 2026-10-23): soft matte "old money" colours — ivory and beige, muted deep green,
   warm grey; serif headings from the system (no external fonts, no cookies). Text contrast stays ≥ 4.5:1 (WCAG AA) in both themes:
   the backgrounds and accents are soft, the text is not. Layout of the pages follows EAA Watch (header, hero with the check,
   cards, plans, FAQ, early access dialog). */
:root {
  --bg: #faf7f1; --bg-soft: #f1ebe0; --card: #fffdf9; --text: #2b2a26; --muted: #5e584e;
  --line: #e2d9cb; --line-strong: #8c8374; /* ≥ 3:1 on --bg: visible control borders */
  --brand: #36513f; --brand-ink: #fbf8f2; --brand-soft: #e5e9df;
  --water: #f2e2c2; --water-ink: #553f12;
  --ok: #36513f; --bad: #9a3a2c; --focus: #9a5a12;
  --radius: 6px; --max: 1080px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a17; --bg-soft: #23211d; --card: #26241f; --text: #ece6da; --muted: #bab2a4;
    --line: #38342d; --line-strong: #7a7266;
    --brand: #a8c0a6; --brand-ink: #1b1a17; --brand-soft: #2a3128;
    --water: #4a3b1d; --water-ink: #f1d9a6;
    --ok: #a8c0a6; --bad: #f0a092; --focus: #e2a95b;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a17; --bg-soft: #23211d; --card: #26241f; --text: #ece6da; --muted: #bab2a4;
  --line: #38342d; --line-strong: #7a7266;
  --brand: #a8c0a6; --brand-ink: #1b1a17; --brand-soft: #2a3128;
  --water: #4a3b1d; --water-ink: #f1d9a6;
  --ok: #a8c0a6; --bad: #f0a092; --focus: #e2a95b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: var(--radius); z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
h1, h2, h3, .logo { font-family: var(--serif); font-weight: 600; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); line-height: 1.25; margin: 0 0 18px; }
h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 8px; }

/* header: row 1 logo and language, row 2 menu (as EAA Watch) */
header.site { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.logo span { color: var(--brand); }
nav.top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav.top a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.3; }
nav.top a:hover { border-color: var(--brand); color: var(--brand); }
nav.top a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
details.lang { position: relative; }
details.lang summary { cursor: pointer; font-weight: 700; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); list-style: none; }
details.lang summary::-webkit-details-marker { display: none; }
details.lang summary::after { content: " ▾"; content: " ▾" / ""; }
details.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 160px; box-shadow: 0 8px 24px rgba(40, 32, 20, 0.12); }
details.lang li a { display: block; padding: 6px 10px; border-radius: 4px; color: var(--text); text-decoration: none; }
details.lang li a:hover, details.lang li a:focus-visible { background: var(--bg-soft); }
details.lang a[aria-current="true"] { font-weight: 800; text-decoration: underline; }

/* sections */
main { display: block; }
section { padding: 44px 0; }
section.soft { background: var(--bg-soft); }
section.soft + section.soft { padding-top: 8px; }
.hero { padding: 56px 0 44px; }
p.byline { color: var(--muted); font-size: .95rem; margin: -8px 0 16px; }
p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; margin: 0 0 28px; }
.badge { display: inline-block; background: var(--brand-soft); color: var(--text); border-radius: 999px; padding: 4px 14px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 16px; }
.meta { color: var(--muted); font-size: 0.95rem; }
.crumbs { margin-bottom: 12px; }
.note { color: var(--muted); font-size: 0.93rem; max-width: 48rem; }
.error { color: var(--bad); font-weight: 600; margin: 12px 0; }

/* buttons and fields */
.btn { display: inline-block; font: inherit; font-weight: 700; padding: 11px 22px; border-radius: var(--radius); border: 1.5px solid var(--brand); background: var(--brand); color: var(--brand-ink); cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn:disabled { opacity: 0.6; cursor: progress; }
form.check { max-width: 48rem; }
label.f { display: block; font-weight: 600; margin: 0 0 6px; }
textarea, input[type=email], select { width: 100%; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; }
textarea { min-height: 220px; resize: vertical; }
textarea:focus, input[type=email]:focus, select:focus { border-color: var(--brand); }
select { width: auto; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 12px 0; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0; font-size: 0.93rem; color: var(--muted); }
.checkbox-row input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand); }

/* result */
#sc-result { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; padding: 0; }
.stats div { background: var(--bg-soft); border-radius: var(--radius); padding: 14px 16px; }
.stats dt { font-size: 0.9rem; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 1.6rem; font-weight: 700; font-family: var(--serif); }
.stats dd small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); font-family: var(--sans); }
.text-out { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; max-height: 32rem; overflow: auto; overflow-wrap: anywhere; }
mark { border-radius: 3px; padding: 0 1px; }
mark.water { background: var(--water); color: var(--water-ink); }

/* cards, plans, call-outs */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.cols3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.cols3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--muted); }
.pricing { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan h3 { margin: 0; }
.plan .price { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; line-height: 1; margin: 0; }
.plan .price small { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; color: var(--muted); flex: 1; }
.plan.featured { border: 2px solid var(--brand); }
.plan .more { margin: 0; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 46rem; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--text); font-weight: 700; display: grid; place-items: center; }
.steps h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }
.callout { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin-top: 28px; }
.callout h2, .callout h3 { margin: 0 0 8px; }
.callout p { margin: 0 0 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px !important; }
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 700; }
details.faq p { margin: 10px 0 2px; color: var(--muted); }

/* prose and legal pages */
.prose > h2 { margin-top: 36px; }
.prose > h2:first-child { margin-top: 0; }
.prose > p { max-width: 46rem; }
.legal { padding-top: 36px; padding-bottom: 56px; }
.legal > * { max-width: 46rem; }
.legal h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
.legal h2 { font-size: 1.3rem; margin: 28px 0 10px; }

/* early access dialog */
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 0; max-width: min(520px, calc(100vw - 32px)); width: 100%; background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(30, 26, 20, 0.5); }
dialog .inner { padding: 24px; position: relative; }
dialog h2 { font-size: 1.45rem; padding-right: 36px; }
dialog form { display: grid; gap: 12px; }
.close-x { position: absolute; right: 10px; top: 8px; background: transparent; color: var(--text); border: none; font: inherit; font-size: 1.6rem; line-height: 1; padding: 4px 10px; cursor: pointer; border-radius: var(--radius); }
#sc-dialog-msg.ok { color: var(--ok); font-weight: 600; }
#sc-dialog-msg.bad { color: var(--bad); font-weight: 600; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.95rem; }
footer.site a { color: var(--muted); }
footer.site .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* narrow screens: the menu as an even grid, full-width buttons in cards and call-outs */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  nav.top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav.top a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 8px; }
  .actions .btn, .plan .btn { width: 100%; }
}
ol.sources { padding-left: 22px; max-width: 46rem; }
ol.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
