/* EAA Watch — no external fonts, no cookies, WCAG-friendly contrast */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f8;
  --text: #14181d;
  --muted: #4a5561;
  --line: #d5dbe1;
  --line-strong: #8a94a0; /* ≥3:1 on --bg: visible control borders */
  --brand: #0b5cad;
  --brand-ink: #ffffff;
  --brand-soft: #e6f0fa;
  --ok: #1d6b3a;
  --warn: #8a5300;
  --bad: #a3221b;
  --focus: #c25e00;
  --radius: 10px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101418;
    --bg-soft: #182027;
    --text: #eef2f5;
    --muted: #b4bec8;
    --line: #2c3742;
    --line-strong: #5c6b7a;
    --brand: #6fb1f0;
    --brand-ink: #0b1622;
    --brand-soft: #16293b;
    --ok: #6fd193;
    --warn: #f0b860;
    --bad: #ff8f86;
    --focus: #ffb366;
  }
}
:root[data-theme="dark"] {
  --bg: #101418; --bg-soft: #182027; --text: #eef2f5; --muted: #b4bec8; --line: #2c3742; --line-strong: #5c6b7a;
  --brand: #6fb1f0; --brand-ink: #0b1622; --brand-soft: #16293b; --ok: #6fd193; --warn: #f0b860; --bad: #ff8f86; --focus: #ffb366;
}
* { 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.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
/* row 1: logo left, language top right; row 2: menu — same order visually and for the keyboard */
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { font-weight: 800; font-size: 1.15rem; 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: 8px; 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; border: none; padding: 0; margin: 0; background: transparent; }
details.lang summary { cursor: pointer; font-weight: 700; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 8px; list-style: none; }
details.lang summary::-webkit-details-marker { display: none; }
details.lang summary::after { content: " ▾"; content: " ▾" / ""; } /* decorative: not part of the accessible name */
details.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; min-width: 160px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
details.lang li a { display: block; padding: 6px 10px; border-radius: 6px; 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; }
main { display: block; }
.hero { padding: 56px 0 40px; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero 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 12px; font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; font-size: 0.95rem; color: var(--muted); }
.checkbox-row input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
form.check { display: flex; flex-wrap: wrap; gap: 10px; max-width: 44rem; }
form.check label.url-label { flex-basis: 100%; font-weight: 600; }
form.check .checkbox-row { flex-basis: 100%; margin: 0; }
input[type="url"], input[type="email"] {
  flex: 1 1 260px; min-width: 0; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
input[type="url"]:focus, input[type="email"]:focus { border-color: var(--brand); }
button, .btn {
  font: inherit; font-weight: 700; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink);
  border-radius: var(--radius); padding: 12px 20px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
}
button.secondary, .btn.secondary { background: transparent; color: var(--brand); }
button[disabled] { opacity: 0.6; cursor: progress; }
section { padding: 40px 0; }
section.soft { background: var(--bg-soft); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; margin: 0 0 18px; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 0 0 8px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; color: var(--muted); }
.note { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.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 .price { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; color: var(--muted); flex: 1; }
.plan.featured { border: 2px solid var(--brand); }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; background: var(--bg); }
summary { font-weight: 700; cursor: pointer; }
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; }
pre.code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.code code { background: none; padding: 0; white-space: inherit; }
/* checklist */
ul.checklist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
ul.checklist li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.tag { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 0.85rem; font-weight: 600; border: 1.5px solid currentColor; }
.tag.auto { color: var(--ok); }
.tag.partial { color: var(--warn); }
.tag.manual { color: var(--muted); }
/* results */
#result { margin-top: 24px; }
.summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 18px; }
.pill { border-radius: 999px; padding: 6px 14px; font-weight: 700; border: 2px solid var(--line); }
.pill.critical, .pill.serious { border-color: var(--bad); color: var(--bad); }
.pill.moderate { border-color: var(--warn); color: var(--warn); }
.pill.minor { border-color: var(--muted); color: var(--muted); }
.issue { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; background: var(--bg); }
.issue h4 { margin: 0 0 6px; font-size: 1.02rem; }
.issue .meta { font-size: 0.9rem; color: var(--muted); }
.issue code { font-size: 0.85rem; background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
details.where { margin-top: 8px; }
details.where summary { cursor: pointer; font-weight: 600; }
details.where ul { margin: 6px 0 0; padding-left: 18px; }
details.where li { margin: 6px 0; }
details.where code.snippet { color: var(--muted); }
.upsell .pricing { margin: 14px 0 10px; }
.free-slot { margin-top: 14px; }
/* "Save as PDF or print": only the result report goes to paper */
@media print {
  body * { visibility: hidden; }
  #result, #result * { visibility: visible; }
  #result { position: absolute; left: 0; top: 0; width: 100%; }
  #result .upsell, #result .print-btn { display: none !important; }
  .issue { break-inside: avoid; }
}
.status { padding: 12px 16px; border-radius: var(--radius); background: var(--bg-soft); }
.upsell { margin-top: 18px; }
/* dialog */
dialog { border: none; border-radius: 14px; padding: 0; max-width: min(520px, calc(100vw - 32px)); width: 100%; color: var(--text); background: var(--bg); }
dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
dialog .inner { padding: 24px; position: relative; }
dialog h2 { padding-right: 36px; }
dialog h2 { font-size: 1.4rem; }
dialog form { display: grid; gap: 12px; }
.close-x { position: absolute; right: 10px; top: 8px; background: transparent; color: var(--text); border: none; font-size: 1.6rem; padding: 4px 10px; width: auto !important; line-height: 1; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legal h1 { font-size: 2rem; }
.legal { padding: 32px 0 56px; max-width: 46rem; }
.prose > h2 { margin-top: 32px; }
.prose > p, .prose > ul, .prose > ol, .prose > table { max-width: 46rem; }
.prose li { margin-bottom: 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 18px; background: var(--bg); }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
/* narrow screens: menu as an even grid (equal widths, aligned rows) instead of ragged wrapping */
@media (max-width: 900px) {
  nav.top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; } /* equal button heights in a row */
  nav.top a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; }
  nav.top a:last-child:nth-child(3n+2) { grid-column: span 2; } /* fill an incomplete last row */
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  button, .btn { width: 100%; }
  nav.top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  nav.top a { padding: 8px; }
  nav.top a:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
