/* Recitr site styles. Colour and type tokens live on :root; see DESIGN-NOTES.md. */
:root {
  --paper: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #12161C;
  --muted: #4A5260;
  --rule: #CDD2DA;
  --accent: #1D3FBF;
  --accent-soft: #E7ECFA;
  --on-accent: #FFFFFF;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 40px);
  --measure: 62ch;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1218;
    --surface: #161C26;
    --ink: #E9ECF1;
    --muted: #A5AEBC;
    --rule: #2B3442;
    --accent: #93AEFF;
    --accent-soft: #1B2540;
    --on-accent: #0E1218;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans); font-kerning: normal; text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { font-size: 18px; } }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { margin: 0; padding: 0; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: var(--ink); color: var(--paper);
  padding: 10px 16px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  background: var(--accent); color: var(--on-accent); font: 600 16px/1.2 var(--sans); text-decoration: none;
  border: 1px solid var(--accent); border-radius: 2px; transition: background-color .15s, color .15s;
}
.btn:hover { background: transparent; color: var(--accent); text-decoration: none; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 15px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 14px; }
.wordmark { font: 600 1.55rem/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.nav-list { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; order: 3; width: 100%; }
.nav-list a { color: var(--ink); text-decoration: none; font-size: 15px; padding: 6px 0; display: inline-block; }
.nav-list a:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 760px) {
  .nav-wrap { display: flex; align-items: center; gap: 28px; }
  .nav-list { order: 0; width: auto; }
  .bar { flex-wrap: nowrap; }
}
@media (max-width: 759px) {
  .nav-wrap { display: contents; }
}

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 120px) clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 3.4fr); gap: 72px; align-items: end; } }
h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 11ch; }
.hero-rule { display: block; height: 3px; width: 96px; background: var(--accent); margin: 28px 0; transform-origin: left; animation: draw .9s .15s cubic-bezier(.2,.7,.2,1) both; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lede { font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.5; max-width: 40ch; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.fine { color: var(--muted); font-size: 15px; margin: 28px 0 0; }
.engines { border-top: 2px solid var(--ink); }
.engines-title { font: 600 15px/1.3 var(--sans); padding: 12px 0; margin: 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.engines ul { list-style: none; }
.engines li { font: 500 1.35rem/1.2 var(--serif); padding: 14px 0; border-bottom: 1px solid var(--rule); }

/* Sections: heading sits in the left margin on wide screens, like an audit report */
.section { border-top: 1px solid var(--rule); padding-block: clamp(48px, 8vw, 104px); }
.section-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }   /* minmax(0) lets the wide table scroll in its own box instead of widening the page */
@media (min-width: 1100px) {      /* below this the heading stacks above the content so the report table keeps its full width */
  .section-grid { grid-template-columns: minmax(0, 3.4fr) minmax(0, 8fr); gap: 72px; }
  .section-grid > h2 { position: sticky; top: 24px; align-self: start; }
}
h2 { font-size: clamp(1.7rem, 3.6vw, 2.35rem); line-height: 1.12; }
h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 6px; }
.body > p:last-child { margin-bottom: 0; }

/* Features */
.features { list-style: none; display: grid; gap: 0 40px; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { border-top: 1px solid var(--ink); padding: 18px 0 30px; }
.features p { margin: 0; color: var(--muted); }

/* Steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: 4px 12px; padding: 20px 0; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); font: 500 1.6rem/1.1 var(--serif); color: var(--accent); }
.steps h3 { margin: 0; }
.steps p { grid-column: 2; margin: 0; color: var(--muted); }

/* Sample report: the centrepiece */
.report-section { background: var(--accent-soft); }
.report { margin: 0; min-width: 0; }
.sheet { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--accent);
  padding: clamp(18px, 4vw, 44px); box-shadow: 0 1px 0 var(--rule), 0 24px 48px -32px rgba(10,20,50,.35); }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.sheet-title { font: 500 1.35rem/1.2 var(--serif); margin: 0; }
.sheet-meta { margin: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.sheet h3.sub { font: 600 15px/1.3 var(--sans); letter-spacing: 0; margin: 28px 0 10px; }
.scroll { overflow-x: auto; }
.scroll:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-variant-numeric: tabular-nums lining-nums; }
caption { text-align: left; color: var(--muted); font-size: 14px; padding: 0 0 10px; }
th, td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
thead th { font: 600 14px/1.3 var(--sans); border-bottom: 2px solid var(--ink); vertical-align: bottom; }
th[scope="row"] { text-align: left; font-weight: 600; padding-left: 14px; }
thead th:first-child { text-align: left; }
tr.own th, tr.own td { background: var(--accent-soft); }
tr.own th { box-shadow: inset 4px 0 0 var(--accent); }
.v { display: block; font: 500 1.5rem/1.15 var(--serif); }
.n { display: block; color: var(--muted); font-size: 13px; }
.changes { list-style: none; counter-reset: ch; }
.changes li { counter-increment: ch; display: grid; grid-template-columns: 2rem 1fr; gap: 2px 8px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.changes li::before { content: counter(ch); font: 500 1.25rem/1.3 var(--serif); color: var(--accent); }
.changes strong { font-weight: 600; }
.changes span { grid-column: 2; color: var(--muted); font-size: 14px; }
.sheet-foot { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
figcaption { margin-top: 14px; font: 600 15px/1.4 var(--sans); color: var(--ink); }

/* Plain lists */
.rules { list-style: none; }
.rules li { padding: 14px 0; border-top: 1px solid var(--rule); max-width: var(--measure); }
.rules li:last-child { border-bottom: 1px solid var(--rule); }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 500 1.2rem/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.6rem/1.2 var(--sans); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 20px; margin: 0; color: var(--muted); }

/* Closing call to action */
.cta { background: var(--ink); color: var(--paper); border-top: 0; }
.cta h2 { color: var(--paper); font-size: clamp(2rem, 5vw, 3.4rem); }
.cta p { color: var(--paper); }
.cta .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta .btn:hover { background: transparent; color: var(--paper); }
.cta :focus-visible { outline-color: var(--paper); }
.cta .addr { margin-top: 20px; font-size: 15px; opacity: .85; }

/* Footer */
.site-footer { padding-block: 28px; font-size: 15px; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
.foot ul { display: flex; gap: 24px; list-style: none; }
.foot a { color: var(--ink); display: inline-block; padding-block: 3px; min-height: 24px; }   /* 24px target (WCAG 2.2 AA) */

/* Long text pages (privacy, 404) */
.doc { padding-block: clamp(40px, 7vw, 96px); }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); max-width: 16ch; margin-bottom: 24px; }
.doc h2 { font-size: 1.5rem; margin: 36px 0 10px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print { .skip, .nav-wrap { display: none; } body { background: #fff; color: #000; } }
