:root {
  --bg: #0c1118;
  --surface: #141c27;
  --surface-2: #1c2735;
  --border: #27303d;
  --text: #e8edf3;
  --muted: #9aa7b8;
  --brand: #4cc2ff;
  --brand-ink: #04293d;
  --danger: #ff5c5c;
  --critical: #ff5c5c;
  --serious: #ff9f43;
  --moderate: #ffd23f;
  --minor: #8aa0b6;
  --ok: #38d39f;
  --radius: 12px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0 0 0.75rem; }
a { color: var(--brand); }

/* --- Accessibility helpers (we eat our own dog food) --- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px;
  border-radius: 8px; font-weight: 700; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 17, 24, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.3rem; text-decoration: none; color: var(--text); }
.brand-mark { color: var(--brand); }
.brand-tld { color: var(--muted); }
nav[aria-label="Primary"] { display: flex; gap: 22px; align-items: center; }
nav[aria-label="Primary"] a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
nav[aria-label="Primary"] a:hover { color: var(--text); }
.nav-cta {
  background: var(--brand); color: var(--brand-ink) !important;
  padding: 8px 16px; border-radius: 8px;
}

/* --- Hero / scanner --- */
.hero { padding: 72px 0 56px; text-align: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem;
  font-weight: 700; color: var(--brand); margin: 0 0 1rem;
}
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 640px; margin: 0 auto 2rem; }
.lede strong { color: var(--text); }

.scan-form {
  display: flex; gap: 10px; max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px; border-radius: 14px;
}
.scan-form input {
  flex: 1; background: transparent; border: 0; color: var(--text);
  font-size: 1.05rem; padding: 12px 14px; min-width: 0;
}
.scan-form input::placeholder { color: #6b7888; }
.scan-form input:focus { outline: none; }
.scan-form:focus-within { border-color: var(--brand); }
#scan-btn, #lead-submit, .plan-cta {
  background: var(--brand); color: var(--brand-ink);
  border: 0; font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
#scan-btn:hover, .plan-cta:hover, #lead-submit:hover { filter: brightness(1.08); }
#scan-btn:disabled { opacity: 0.6; cursor: progress; }
.scan-hint { color: var(--muted); font-size: 0.9rem; margin: 0.9rem auto 0; max-width: 520px; }
.scan-status { margin-top: 1.5rem; color: var(--muted); min-height: 1.2em; font-weight: 600; }
.scan-status.error { color: var(--danger); }

/* --- Results --- */
.results { text-align: left; max-width: 820px; margin: 2.5rem auto 0; }
.score-row {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.score-ring {
  --pct: 0;
  width: 104px; height: 104px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--surface-2) 0);
}
.score-ring::before { content: ""; position: absolute; inset: 10px; background: var(--surface); border-radius: 50%; }
.score-ring span { position: relative; font-size: 1.8rem; font-weight: 800; }
.score-meta h3 { margin: 0 0 4px; }
.score-meta p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.score-meta .scanned-url { color: var(--text); font-weight: 600; word-break: break-all; }

.tallies { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tally {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; flex: 1; min-width: 120px;
}
.tally .n { font-size: 1.6rem; font-weight: 800; display: block; }
.tally .l { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tally.critical .n { color: var(--critical); }
.tally.serious .n { color: var(--serious); }
.tally.moderate .n { color: var(--moderate); }
.tally.minor .n { color: var(--minor); }

.violation {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--border); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px;
}
.violation.critical { border-left-color: var(--critical); }
.violation.serious { border-left-color: var(--serious); }
.violation.moderate { border-left-color: var(--moderate); }
.violation.minor { border-left-color: var(--minor); }
.violation-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.violation-head h4 { margin: 0; font-size: 1.05rem; }
.badge {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.badge.critical { background: rgba(255,92,92,0.18); color: var(--critical); }
.badge.serious { background: rgba(255,159,67,0.18); color: var(--serious); }
.badge.moderate { background: rgba(255,210,63,0.16); color: var(--moderate); }
.badge.minor { background: rgba(138,160,182,0.16); color: var(--minor); }
.violation p.desc { color: var(--muted); margin: 8px 0; font-size: 0.95rem; }
.violation .meta { font-size: 0.82rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.violation .wcag-tag { color: var(--brand); font-weight: 600; }
.violation pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; overflow-x: auto; font-size: 0.82rem; margin: 8px 0 0;
  color: #c7d2e0;
}
.violation a.learn { font-size: 0.85rem; font-weight: 600; }

.results-cta {
  text-align: center; background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-top: 8px;
}
.results-cta h3 { margin: 0 0 8px; }
.results-cta p { color: var(--muted); margin: 0 0 18px; }
.results-cta button { background: var(--brand); color: var(--brand-ink); border: 0; font-weight: 700; font-size: 1.05rem; padding: 14px 28px; border-radius: 10px; cursor: pointer; }
.clean-state { text-align: center; padding: 16px; color: var(--ok); font-weight: 600; }

/* --- Why section --- */
.why, .pricing, .faq { padding: 64px 0; border-top: 1px solid var(--border); }
.section-lede { color: var(--muted); max-width: 680px; margin: 0 0 2.5rem; font-size: 1.05rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }
.card strong { color: var(--text); }

/* --- Pricing --- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan-badge {
  position: absolute; top: -12px; left: 26px; background: var(--brand); color: var(--brand-ink);
  font-size: 0.75rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; margin: 0;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.plan h3 { margin: 0 0 6px; }
.price { font-size: 1rem; color: var(--muted); margin: 0 0 16px; }
.price span { font-size: 2.4rem; font-weight: 800; color: var(--text); }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; }
.plan li { padding: 7px 0 7px 26px; position: relative; color: var(--muted); font-size: 0.95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.plan-cta { width: 100%; }
.plan:not(.featured) .plan-cta { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.pricing-note { color: var(--muted); font-size: 0.9rem; margin-top: 22px; text-align: center; }

/* --- FAQ --- */
.faq dl { max-width: 760px; }
.faq dt { font-weight: 700; font-size: 1.1rem; margin-top: 24px; }
.faq dd { margin: 8px 0 0; color: var(--muted); }
.faq dd strong { color: var(--text); }

/* --- Dialog --- */
dialog {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 16px; padding: 28px; max-width: 440px; width: calc(100% - 32px);
}
dialog::backdrop { background: rgba(4, 8, 12, 0.7); backdrop-filter: blur(3px); }
dialog h2 { margin: 0 0 6px; }
.lead-sub { color: var(--muted); margin: 0 0 18px; font-size: 0.95rem; }
dialog label { display: block; font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; }
dialog input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: 9px; font-size: 1rem;
}
dialog input:focus { outline: none; border-color: var(--brand); }
.lead-status { min-height: 1.2em; margin-top: 12px; font-weight: 600; font-size: 0.9rem; }
.lead-status.error { color: var(--danger); }
.lead-status.ok { color: var(--ok); }
.lead-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 11px 18px; border-radius: 9px; font-weight: 600; cursor: pointer; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); }
.site-footer p { margin: 0 0 8px; }
.site-footer .fine { font-size: 0.85rem; max-width: 640px; }

@media (max-width: 520px) {
  .scan-form { flex-direction: column; }
  #scan-btn { width: 100%; }
  nav[aria-label="Primary"] a:not(.nav-cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================================
   Content engine: nav active state, breadcrumbs, articles, tools, footer.
   ========================================================================= */

nav[aria-label="Primary"] a.active { color: var(--text); }

/* --- Breadcrumb --- */
.breadcrumb { border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.breadcrumb .container { padding-top: 12px; padding-bottom: 12px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-current] { color: var(--text); font-weight: 600; }
.crumb-sep { color: var(--border); margin: 0 8px; }

/* --- Generic CTA button --- */
.cta-btn {
  display: inline-block; background: var(--brand); color: var(--brand-ink);
  font-weight: 700; padding: 13px 24px; border-radius: 10px; text-decoration: none;
}
.cta-btn:hover { filter: brightness(1.08); }

/* --- Article / prose pages --- */
.prose-hero { padding: 56px 0 8px; border-bottom: 1px solid var(--border); }
.prose-hero h1 { max-width: 18ch; }
.prose-lede { margin-left: 0; margin-right: 0; max-width: 60ch; }
.article-meta { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }

.prose-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding-top: 40px; padding-bottom: 24px; align-items: start; }
.toc { position: sticky; top: 84px; font-size: 0.9rem; }
.toc-title { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { margin: 0 0 8px; padding-left: 4px; border-left: 2px solid var(--border); }
.toc a { color: var(--muted); text-decoration: none; display: block; padding: 2px 0 2px 12px; }
.toc a:hover { color: var(--text); }

.prose { max-width: 70ch; font-size: 1.05rem; }
.prose h2 { margin: 40px 0 14px; scroll-margin-top: 84px; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.prose h3 { margin: 28px 0 10px; font-size: 1.2rem; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: 0.9em; color: #c7d2e0; }
.prose strong { color: var(--text); }

ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li { position: relative; padding: 0 0 4px 44px; margin-bottom: 16px; }
ol.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px; width: 30px; height: 30px;
  background: var(--brand); color: var(--brand-ink); border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem;
}

/* WCAG checklist rows */
ul.wcag-list { list-style: none; padding-left: 0; }
ul.wcag-list li {
  border-left: 3px solid var(--border); padding: 8px 0 8px 14px; margin-bottom: 8px;
}
.sc { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); margin-right: 6px; }
.lvl { font-size: 0.7rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; margin-right: 8px; letter-spacing: 0.04em; }
.lvl-a { background: rgba(76,194,255,0.16); color: var(--brand); }
.lvl-aa { background: rgba(56,211,159,0.16); color: var(--ok); }
.new { background: rgba(255,210,63,0.16); color: var(--moderate); font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }

/* Callouts */
.callout { border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 16px 18px; margin: 22px 0; background: var(--surface); }
.callout-title { font-weight: 700; margin: 0 0 6px; }
.callout p:last-child { margin-bottom: 0; }
.callout-key { border-left-color: var(--brand); }
.callout-tip { border-left-color: var(--ok); }
.callout-warn { border-left-color: var(--serious); }

/* Data tables */
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 0.95rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table thead th { color: var(--text); border-bottom: 2px solid var(--border); }
.data-table td { color: var(--muted); }
.data-table strong { color: var(--text); }

/* Inline conversion CTA */
.inline-cta {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin: 32px 0; text-align: center;
}
.inline-cta h2 { margin: 0 0 8px; }
.inline-cta p { color: var(--muted); margin: 0 0 18px; }

/* Related / hub cards */
.related { padding: 48px 0; border-top: 1px solid var(--border); margin-top: 32px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-link h2, .card-link h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card-link a { text-decoration: none; }
.card-link a:hover { text-decoration: underline; }
.card-tag { display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); margin-bottom: 8px; }
.card-tag-live { color: var(--ok); }

.home-resources { padding: 64px 0; border-top: 1px solid var(--border); }

/* Hub + tool pages */
.tool-hero { padding: 56px 0 8px; }
.tool-wrap { padding-top: 32px; padding-bottom: 24px; }
.hub-list { padding-top: 32px; padding-bottom: 8px; }
.hub-note { color: var(--muted); margin-top: 28px; }

/* --- Color contrast checker --- */
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.cc-controls { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cc-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.cc-input-row { display: flex; gap: 10px; align-items: center; }
.cc-input-row input[type="color"] { width: 46px; height: 46px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }
.cc-input-row input[type="text"] { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: 9px; font-size: 1rem; font-family: ui-monospace, monospace; text-transform: uppercase; }
.cc-input-row input[type="text"]:focus { outline: none; border-color: var(--brand); }
.cc-swap { align-self: flex-start; }

.cc-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.cc-ratio { text-align: center; }
.cc-ratio #cc-ratio-num { font-size: 2.6rem; font-weight: 800; display: block; line-height: 1; }
.cc-ratio-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cc-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-badge { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.cc-b-label { font-size: 0.78rem; color: var(--muted); }
.cc-b-val { font-weight: 800; }
.cc-badge.pass { border-color: var(--ok); }
.cc-badge.pass .cc-b-val { color: var(--ok); }
.cc-badge.fail { border-color: var(--danger); }
.cc-badge.fail .cc-b-val { color: var(--danger); }

.cc-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; transition: none; }
.cc-prev-large { font-size: 24px; font-weight: 700; margin: 0 0 12px; }
.cc-prev-normal { font-size: 16px; margin: 0 0 16px; }
.cc-prev-btn { background: transparent; border: 2px solid currentColor; color: inherit; padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: 1rem; }
.tool-explainer { max-width: 70ch; }
.tool-explainer h2 { font-size: 1.3rem; }

/* FAQ item wrapper (shared schema/markup) */
.faq-item { margin-bottom: 4px; }

/* --- Paste-HTML tools (heading + alt checkers) --- */
.tool-textarea {
  width: 100%; min-height: 180px; resize: vertical;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 14px; font-family: ui-monospace, monospace;
  font-size: 0.92rem; line-height: 1.5;
}
.tool-textarea:focus { outline: none; border-color: var(--brand); }
.tool-actions { display: flex; gap: 10px; margin: 14px 0 24px; flex-wrap: wrap; }
.tool-summary { min-height: 1.2em; font-weight: 600; margin-bottom: 16px; }
.tool-summary.ok { color: var(--ok); }
.tool-summary.warn { color: var(--serious); }

/* Heading outline */
.hs-outline { list-style: none; padding: 0; margin: 0 0 28px; }
.hs-row {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--brand); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 6px;
}
.hs-row.hs-bad { border-left-color: var(--serious); }
.hs-tag { font-weight: 800; color: var(--brand); font-size: 0.85rem; font-variant-numeric: tabular-nums; min-width: 28px; }
.hs-text { color: var(--text); }
.hs-warn { color: var(--serious); font-size: 0.85rem; font-weight: 600; }

/* Alt-text audit list */
.at-list { margin-bottom: 28px; }
.at-row { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.at-row.at-fail { border-left-color: var(--danger); }
.at-row.at-warn { border-left-color: var(--serious); }
.at-row.at-info { border-left-color: var(--brand); }
.at-row.at-ok { border-left-color: var(--ok); }
.at-row-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.at-badge { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.at-badge.dot-fail { background: rgba(255,92,92,0.18); color: var(--danger); }
.at-badge.dot-warn { background: rgba(255,159,67,0.18); color: var(--serious); }
.at-badge.dot-info { background: rgba(76,194,255,0.18); color: var(--brand); }
.at-badge.dot-ok { background: rgba(56,211,159,0.18); color: var(--ok); }
.at-src { color: var(--muted); font-size: 0.85rem; word-break: break-all; }
.at-alt { margin: 8px 0 0; color: var(--text); font-size: 0.95rem; }
.at-note { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }

/* Accessibility statement generator */
.asg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.asg-form { display: flex; flex-direction: column; gap: 14px; }
.asg-form .cta-btn { align-self: flex-start; }
.asg-output label, .cc-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.cc-field input[type="text"], .cc-field input[type="email"], .cc-field input[type="number"], .cc-field select {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: 9px; font-size: 1rem;
}
.cc-field input:focus, .cc-field select:focus, .asg-output textarea:focus { outline: none; border-color: var(--brand); }
.opt { color: var(--muted); font-weight: 400; }

/* Tap target preview */
.tt-preview-wrap { display: grid; place-items: center; min-height: 180px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.tt-preview { border-radius: 6px; min-width: 8px; min-height: 8px; transition: none; }

/* Inline legend dots */
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot-fail { background: var(--danger); }
.dot-warn { background: var(--serious); }
.dot-info { background: var(--brand); }
.dot-ok { background: var(--ok); }

/* --- WCAG criteria hub + criterion pages --- */
.crit-group { margin-bottom: 28px; }
.crit-group h2 { font-size: 1.3rem; margin: 0 0 12px; }
.crit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.crit-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px;
}
.crit-row a { color: var(--text); text-decoration: none; flex: 1; }
.crit-row a:hover { color: var(--brand); }
.crit-num { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; margin-right: 6px; }

.crit-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 600;
}
.crit-nav a { text-decoration: none; }
.crit-nav .crit-up { color: var(--muted); }
.crit-prev, .crit-next { max-width: 45%; }
.crit-next { text-align: right; }

/* --- Glossary --- */
.prose-wrap-narrow { grid-template-columns: 1fr; max-width: 760px; }
.gloss-full { color: var(--muted); font-weight: 600; font-size: 0.6em; }
.gloss-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.gloss-row { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.gloss-row a { text-decoration: none; }
.gloss-term { font-weight: 700; color: var(--brand); }
.gloss-def { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.gloss-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.gloss-chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; font-size: 0.88rem; text-decoration: none; color: var(--text); }
.gloss-chip:hover { border-color: var(--brand); color: var(--brand); }

/* --- Newsletter band --- */
.newsletter { border-top: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--bg)); padding: 44px 0; }
.nl-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.nl-copy h2 { margin: 0 0 8px; font-size: 1.5rem; }
.nl-copy p { margin: 0; color: var(--muted); }
.nl-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nl-form input {
  flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 13px 14px; border-radius: 10px; font-size: 1rem;
}
.nl-form input:focus { outline: none; border-color: var(--brand); }
.nl-form button { background: var(--brand); color: var(--brand-ink); border: 0; font-weight: 700; font-size: 1rem; padding: 13px 22px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.nl-form button:hover { filter: brightness(1.08); }
.nl-form button:disabled { opacity: 0.6; cursor: progress; }
.nl-msg { flex-basis: 100%; min-height: 1.1em; margin: 4px 0 0; font-size: 0.9rem; font-weight: 600; }
.nl-msg.ok { color: var(--ok); }
.nl-msg.error { color: var(--danger); }

/* --- Footer columns --- */
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.footer-brand .fine { font-size: 0.85rem; max-width: 42ch; }
.footer-links h3 { font-size: 0.95rem; margin: 0 0 12px; color: var(--text); }
.footer-links a { display: block; color: var(--muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.footer-links a:hover { color: var(--text); }
.footer-legal { font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 18px; margin: 0; }

@media (max-width: 860px) {
  .prose-wrap { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; margin-bottom: 24px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cc-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .data-table { font-size: 0.85rem; }
}
