/* Cognitio Adepta – shared styles
   Direction (ui-ux-pro-max, "Trust & Authority + Conversion", "Accessible & Ethical"):
   navy/slate corporate palette, blue reserved for calls to action, serif display for authority,
   high contrast, visible 3px focus rings, 44px targets, reduced motion respected.
   Layout: one reading column, sticky top bar; problem cards read as symptom, cause, what we do;
   a ledger-style check log is the one monospace element. */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #1e3a5f;        /* navy: brand and structure */
  --accent-soft: #eaf0f6;
  --cta: #0369a1;           /* blue: calls to action only */
  --cta-hover: #075985;
  --cta-ink: #ffffff;
  --band: #0f172a;          /* closing call-to-action band */
  --band-ink: #f8fafc;
  --match: #15803d;
  --flag: #b45309;
  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Lato", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --header-h: 72px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #111a2b; --ink: #e2e8f0; --muted: #a3b1c6; --line: #24324a;
    --accent: #a9c7e8; --accent-soft: #16233a; --cta: #38bdf8; --cta-hover: #7dd3fc; --cta-ink: #0b1220;
    --band: #16233a; --band-ink: #e2e8f0; --match: #4ade80; --flag: #fbbf24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2b; --ink: #e2e8f0; --muted: #a3b1c6; --line: #24324a;
  --accent: #a9c7e8; --accent-soft: #16233a; --cta: #38bdf8; --cta-hover: #7dd3fc; --cta-ink: #0b1220;
  --band: #16233a; --band-ink: #e2e8f0; --match: #4ade80; --flag: #fbbf24;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--cta); text-underline-offset: 3px; }
a:hover { color: var(--cta-hover); }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 3px; border-radius: 4px; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.inner { max-width: 1040px; margin: 0 auto; }

/* Skip link */
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--cta); color: var(--cta-ink); padding: 10px 16px; border-radius: 6px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: var(--cta-ink); }

h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.25rem); }
h3 { font-family: var(--font-body); font-size: 1.08rem; font-weight: 700; }
p { margin: 0; }
.eyebrow { font-size: 0.95rem; font-weight: 700; color: var(--accent); }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 10px; flex-wrap: wrap; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark { width: 32px; height: 32px; border-radius: 6px; background: var(--accent); color: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); font-size: 0.97rem; border-bottom: 2px solid transparent; transition: border-color 200ms ease, color 200ms ease; }
.nav a:hover { border-bottom-color: var(--line); color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }
.nav a.btn { border-bottom: 0; color: var(--cta-ink); padding: 0 16px; }

/* Buttons: the only place the blue appears as a fill */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: var(--cta); color: var(--cta-ink); text-decoration: none; font-weight: 700; padding: 0 20px; border-radius: 6px; cursor: pointer; transition: background-color 200ms ease; }
.btn:hover { background: var(--cta-hover); color: var(--cta-ink); }
.btn.ghost { background: transparent; color: var(--cta); border: 1.5px solid var(--cta); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--cta); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
main { display: block; padding-block: 56px 80px; }
.inner, section { min-width: 0; }
section { display: flex; flex-direction: column; gap: 22px; }
section > * { min-width: 0; max-width: 100%; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 66ch; }
.section-head p { color: var(--muted); }
.hero { display: flex; flex-direction: column; gap: 22px; }
.tagline { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--accent); max-width: 60ch; }

/* Proof strip (home) */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof div { padding: 20px 20px 20px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.proof div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.proof strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--accent); line-height: 1.15; }
.proof span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) { .proof div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
.proof-note { font-size: 0.85rem; color: var(--muted); }

/* Audience cards (home) */
.audiences { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.audience { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.audience h3 { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; }
.audience .size { font-size: 0.92rem; color: var(--muted); }
.audience ul { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.audience .btn { align-self: flex-start; margin-top: auto; }

/* Problem cards */
.problems { display: flex; flex-direction: column; gap: 14px; }
.problem { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 32px; }
.problem .quote { grid-column: 1 / -1; font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.3; }
.problem .quote::before { content: "\201C"; color: var(--accent); }
.problem .quote::after { content: "\201D"; color: var(--accent); }
.problem .label { font-size: 0.85rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 2px; }
.problem .fix .label { color: var(--accent); }
.problem p { font-size: 0.98rem; }
.problem .why p { color: var(--muted); }
@media (max-width: 680px) { .problem { grid-template-columns: 1fr; } }
.problem.option .why .label { color: var(--flag); }

.footnote { font-size: 0.85rem; color: var(--muted); max-width: 75ch; }
td.bad { color: var(--flag); }
td.good { background: var(--accent-soft); font-weight: 700; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--flag); border-radius: 8px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.callout ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.88rem; color: var(--muted); font-weight: 700; background: var(--bg); }
thead th.us { color: var(--accent); }
tbody tr:last-child td { border-bottom: 0; }
td.topic { font-weight: 700; width: 22%; }
td.them { color: var(--muted); width: 34%; }
td.us { background: var(--accent-soft); width: 44%; }

/* Check log: the one monospace element */
.log { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.log-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.log ul { list-style: none; margin: 0; padding: 8px 0; font-family: var(--font-mono); font-size: 0.88rem; min-width: 540px; }
.log li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 8px 16px; }
.st { font-weight: 500; }
.st.ok { color: var(--match); }
.st.fl { color: var(--flag); }
.log em { font-style: normal; color: var(--muted); }

/* Steps: a real sequence */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.step { border-top: 3px solid var(--accent); background: var(--surface); padding: 18px 20px; border-radius: 0 0 8px 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step .when { font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.step p { color: var(--muted); font-size: 0.96rem; }

/* Monthly service */
.includes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.inc { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inc .when { font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.inc ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 0.96rem; }

/* Package box */
.package { background: var(--accent-soft); border-radius: 8px; padding: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 28px; }
.package h2 { grid-column: 1 / -1; }
.package div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.package p { color: var(--muted); font-size: 0.96rem; }

/* Credentials */
.creds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cred { padding: 4px 0 4px 16px; border-left: 2px solid var(--accent); min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cred p { color: var(--muted); font-size: 0.96rem; }

/* Closing CTA band + footer */
.cta { background: var(--band); color: var(--band-ink); border-radius: 10px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.cta h2 { color: var(--band-ink); }
.cta p { max-width: 62ch; }
.contact { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.contact code { font-family: var(--font-body); font-weight: 700; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-size: 0.98rem; user-select: all; }
footer { border-top: 1px solid var(--line); background: var(--surface); }
footer .inner { padding-block: 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer a { color: var(--muted); }

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