/* AccessProof — design system
   Built to WCAG 2.2 AA. No JavaScript required.
   Contrast notes (measured):
     #1d4ed8 on #ffffff  = 6.3:1   (links, primary buttons)
     #2a3547 on #ffffff  = 12.6:1  (body text)
     #16233b on #ffffff  = 15.4:1  (headings)
     #92400e on #ffffff  = 5.9:1   (eyebrow / accent text)
     #5b6b80 on #ffffff  = 5.5:1   (muted text)
     #e8edf5 on #101c30  = 13.9:1  (footer text)
     #9db8e8 on #101c30  = 8.6:1   (footer links)
     #6b7a8d on #ffffff  = 4.0:1   (input borders, non-text 3:1 minimum)
*/

:root {
  --ink: #16233b;
  --body: #2a3547;
  --muted: #5b6b80;
  --brand: #1d4ed8;
  --brand-dark: #173fa8;
  --accent: #92400e;
  --surface: #f4f7fb;
  --surface-border: #d7e0ec;
  --field-border: #6b7a8d;
  --footer-bg: #101c30;
  --footer-text: #e8edf5;
  --footer-link: #9db8e8;
  --focus-ring: #ffd23f;
  --focus-outline: #0f172a;
  --measure: 38rem;
  --page: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 112.5%; /* 18px base; respects user zoom and text scaling */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--body);
  background: #ffffff;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.8rem); margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.8em; }

p { margin: 0 0 1em; max-width: var(--measure); }

/* Long unbreakable tokens (email addresses, URLs) wrap instead of overflowing
   at 320px — required for 1.4.10 Reflow. */
p, li, td, th, h1, h2, h3, legend, label, .hint { overflow-wrap: break-word; }
ul, ol { max-width: var(--measure); padding-left: 1.4em; }
li { margin-bottom: 0.4em; }
li::marker { color: var(--brand); }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

/* One shared focus indicator, visible on light, dark and brand surfaces. */
:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-ring);
  border-radius: 2px;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  border-radius: 4px;
  transform: translateY(-250%);
}
.skip-link:focus-visible { transform: translateY(0); color: #ffffff; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--surface-border);
  background: #ffffff;
}
.header-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.brand .brand-name { letter-spacing: -0.01em; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}
.site-nav a {
  display: inline-block;
  padding: 0.55rem 0.8rem; /* 44px minimum target height with line-height */
  min-height: 44px;
  color: var(--body);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--brand);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--brand);
  border-radius: 6px 6px 0 0;
}

/* Layout */
main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}
.section { padding: 2.5rem 0 0.5rem; }
.section + .section { border-top: 1px solid var(--surface-border); margin-top: 2.5rem; }
.wide { max-width: var(--page); }
.lede { font-size: 1.18rem; color: var(--body); max-width: 40rem; }

.eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  max-width: none;
}

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; }
.hero p:last-of-type { margin-bottom: 0; }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
  max-width: none;
}
.hero-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1px;
  margin: 2rem 0 0;
  padding: 1px;
  max-width: 50rem;
  list-style: none;
  background: var(--surface-border);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  overflow: hidden;
}
.hero-proof li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
}
.hero-proof strong,
.hero-proof span { display: block; }
.hero-proof strong { color: var(--ink); margin-bottom: 0.2rem; }
.hero-proof span { font-size: 0.92rem; }

/* Buttons: 44px+ targets, clear labels, 6.3:1 contrast */
.btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  min-height: 48px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid var(--brand);
}
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-secondary { background: #ffffff; color: var(--brand); }
.btn-secondary:hover { background: var(--surface); }

/* Lane picker */
.lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  max-width: none;
}
.lane {
  display: block;
  border: 2px solid var(--surface-border);
  border-radius: 10px;
  padding: 1.5rem;
  background: #ffffff;
  text-decoration: none;
  color: var(--body);
}
.lane:hover { border-color: var(--brand); }
.lane .lane-title {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.lane:hover .lane-title { color: var(--brand); }
.lane p { margin: 0 0 0.8rem; }
.lane .lane-go { font-weight: 700; color: var(--brand); }

/* Cards and panels */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  max-width: none;
}
.card {
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 1.4rem;
  background: var(--surface);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.2em; }

/* Numbered process steps */
.steps { list-style: none; padding-left: 0; counter-reset: step; max-width: var(--measure); }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.2rem;
  margin-bottom: 1.4rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps .step-title { display: block; font-weight: 700; color: var(--ink); }

/* Callouts */
.notice {
  border-left: 4px solid var(--accent);
  background: #fdf6ec;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  max-width: var(--measure);
}
.notice p:last-child { margin-bottom: 0; }
.panel {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  max-width: var(--measure);
}
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; max-width: var(--page); }
table {
  border-collapse: collapse;
  margin: 1.2rem 0;
  min-width: 34rem;
  font-size: 0.95rem;
}
caption {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 0.6rem;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--surface-border);
  vertical-align: top;
}
thead th { background: var(--ink); color: #ffffff; }
tbody th { background: var(--surface); color: var(--ink); }

/* Definition-style fact rows */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; max-width: none; margin-top: 1.5rem; }
.fact { border: 1px solid var(--surface-border); border-radius: 10px; padding: 1.1rem 1.2rem; }
.fact .fact-num { display: block; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.9rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.fact p { margin: 0.4rem 0 0; font-size: 0.95rem; }

/* Forms */
form { max-width: var(--measure); margin-top: 1.5rem; }
fieldset { border: 1px solid var(--surface-border); border-radius: 10px; padding: 1.25rem 1.4rem 1.4rem; margin: 0 0 1.5rem; }
legend { font-weight: 700; color: var(--ink); padding: 0 0.4rem; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
.field .hint { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.35rem; max-width: none; }
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="date"],
.field textarea,
.field select {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  min-height: 46px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--field-border);
  border-radius: 6px;
}
.field textarea { min-height: 9rem; resize: vertical; }
.required-mark { color: var(--accent); font-weight: 700; }
.radio-group { border: none; padding: 0; margin: 0 0 1.3rem; }
.radio-group legend { margin-bottom: 0.5rem; }
.radio-option { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.55rem; }
.radio-option input { margin-top: 0.35rem; width: 1.15rem; height: 1.15rem; flex: none; }
.radio-option label { font-weight: 400; color: var(--body); margin: 0; }
.form-note { font-size: 0.92rem; color: var(--muted); }

/* Honeypot: off-screen but labelled, out of tab order */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* §2 illustration: same button, with and without a focus outline */
.demo-figure {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--surface);
  max-width: var(--measure);
}
.demo-row { display: flex; flex-wrap: wrap; gap: 1rem 3rem; }
.demo-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--ink);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
}
.demo-btn-focus { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.demo-figure figcaption { margin-top: 1.2rem; color: var(--muted); font-size: 0.95rem; }

/* Price block */
.price-big {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 0.2em;
  line-height: 1.1;
}

/* Article metadata */
.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1.25rem;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2rem;
}
.site-footer h2 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--footer-text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin-top: 0;
}
.site-footer p, .site-footer li { color: var(--footer-text); font-size: 0.95rem; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #ffffff; }
.site-footer ul { list-style: none; padding-left: 0; margin: 0; max-width: none; }
.footer-legal {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}
.footer-legal p { font-size: 0.88rem; color: #b9c6da; max-width: 60rem; }
