/* sfxlegal.org. System fonts only (no third-party requests). Colours follow the app's tokens
   (apps/web/app/globals.css); contrast targets WCAG 2.2 AA in both themes.
   Theme: follows the system unless the visitor picks Light or Dark (theme.js sets data-theme on <html>). */

:root {
  --paper: #f6f7f9;
  --sheet: #ffffff;
  --tint: #eef2fb;
  --rule: #d9dee5;
  --rule-strong: #b8c0cc;
  --ink: #111827;
  --ink-muted: #4b5563;
  --accent: #1f4fd1;
  --accent-hover: #1a43b3;
  --on-accent: #ffffff;
  --ok: #0f7a3d;
  --ok-bg: #e8f6ee;
  --wait: #8a5a00;
  --wait-bg: #fdf4e3;
  --back: #b42318;
  --back-bg: #fdecea;
  --shadow: 0 1px 2px rgb(17 24 39 / 0.06), 0 24px 48px -24px rgb(17 24 39 / 0.28);
  --scrim: rgb(13 17 23 / 0.62);

  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --measure: 38rem;
  --wide: 74rem;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0d1117; --sheet: #151b23; --tint: #17243f; --rule: #2d3846; --rule-strong: #46546a;
  --ink: #e8edf3; --ink-muted: #a3afbf; --accent: #6d95ff; --accent-hover: #8aaaff; --on-accent: #0b1220;
  --ok: #4cc883; --ok-bg: #12301f; --wait: #f0b84a; --wait-bg: #33270c; --back: #ff7b72; --back-bg: #3a1614;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 28px 56px -24px rgb(0 0 0 / 0.7);
  --scrim: rgb(13 17 23 / 0.72);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1117; --sheet: #151b23; --tint: #17243f; --rule: #2d3846; --rule-strong: #46546a;
    --ink: #e8edf3; --ink-muted: #a3afbf; --accent: #6d95ff; --accent-hover: #8aaaff; --on-accent: #0b1220;
    --ok: #4cc883; --ok-bg: #12301f; --wait: #f0b84a; --wait-bg: #33270c; --back: #ff7b72; --back-bg: #3a1614;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 28px 56px -24px rgb(0 0 0 / 0.7);
    --scrim: rgb(13 17 23 / 0.72);
    color-scheme: dark;
  }
}

/* Screenshots exist in a light and a dark version; show the one matching the theme. Both use loading="lazy",
   so the hidden one is never downloaded. */
/* !important: these must beat component rules such as ".browser img { display: block }". */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none !important; }
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 30; background: var(--sheet); padding: 0.5rem 0.75rem; }
.skip:focus { left: 0.5rem; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Logo ---------- */
.mark-tile { fill: var(--accent); }
.mark-line { fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linejoin: round; }
.mark-seal { fill: var(--on-accent); }

/* ---------- Header ---------- */
.masthead { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--sheet) 92%, transparent); border-bottom: 1px solid var(--rule); backdrop-filter: saturate(1.4) blur(10px); }
.masthead .wrap { display: flex; align-items: center; gap: 1rem 1.5rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand span { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a { color: var(--ink-muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Theme toggle: a light bulb. Lit = light theme, off = dark theme. Hidden without JavaScript (the site then just
   follows the system setting). The tap target is 44px; the glow and rays fade, and stay still for reduced motion. */
.bulb {
  display: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 0; border-radius: 999px; background: none; color: var(--ink-muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.js .bulb { display: inline-flex; }
@media (hover: hover) { .bulb:hover { background: var(--tint); color: var(--ink); } }
.bulb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bulb svg { width: 1.75rem; height: 1.75rem; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bulb-glass { fill: transparent; transition: fill 0.25s ease, filter 0.25s ease; }
.bulb-filament { stroke: var(--ink-muted); transition: stroke 0.25s ease; }
.bulb-rays { stroke: #d97706; opacity: 0; transform: scale(0.7); transform-origin: 16px 16px; transition: opacity 0.25s ease, transform 0.25s ease; }
.bulb[aria-pressed="true"] { color: var(--ink); }
.bulb[aria-pressed="true"] .bulb-glass { fill: #fcd34d; filter: drop-shadow(0 0 4px rgb(252 211 77 / 0.9)); }
.bulb[aria-pressed="true"] .bulb-filament { stroke: #b45309; }
.bulb[aria-pressed="true"] .bulb-rays { opacity: 1; transform: scale(1); }
.masthead .button { min-height: 2.4rem; font-size: 0.95rem; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.12; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.9rem); letter-spacing: -0.015em; margin: 0 0 1.25rem; max-width: 15ch; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); margin: 0 0 1rem; letter-spacing: -0.008em; max-width: 24ch; }
h3 { font-size: 1.25rem; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--ink-muted); max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose li { margin-bottom: 0.4rem; }
.muted { color: var(--ink-muted); }
code, .mono { font-family: var(--mono); font-size: 0.88em; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-top: 1.75rem; }
.button {
  display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0 1.25rem; border-radius: 6px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600;
}
.button:hover { background: var(--accent-hover); color: var(--on-accent); }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.button.quiet:hover { background: var(--sheet); color: var(--ink); }

/* ---------- Frames for real screenshots ---------- */
.browser { margin: 0; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.browser .bar { display: flex; align-items: center; gap: 0.75rem; height: 2.1rem; padding: 0 0.85rem; border-bottom: 1px solid var(--rule); background: var(--paper); }
.browser .dots { display: flex; gap: 6px; }
.browser .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); }
.browser .url { flex: 1; max-width: 22rem; margin: 0 auto; font-size: 0.75rem; color: var(--ink-muted); background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 0.1rem 0.75rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { display: block; width: 100%; }
.phone { margin: 0; width: 15rem; padding: 0.5rem; background: #0b0f14; border-radius: 2.1rem; box-shadow: var(--shadow), 0 0 0 1px var(--rule-strong); }
.phone img { display: block; width: 100%; border-radius: 1.65rem; }
.caption { font-size: 0.85rem; color: var(--ink-muted); margin-top: 0.75rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 5rem; background:
  radial-gradient(60rem 30rem at 85% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--paper); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 3rem; align-items: center; }
.hero-art { position: relative; padding: 0 0 3rem 0; }
.hero-art .phone { position: absolute; right: -1rem; bottom: -1rem; width: 11.5rem; }
.facts { list-style: none; margin: 2.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; font-size: 0.95rem; color: var(--ink-muted); }
.facts strong { display: block; color: var(--ink); font-size: 1rem; }

/* ---------- Sections ---------- */
.band { padding: 5rem 0; }
.band.sheet { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 44rem; margin-bottom: 2.75rem; }
.section-head p { color: var(--ink-muted); font-size: 1.1rem; }

/* Guide: steps with real screens, text and image alternating. */
.guide { list-style: none; margin: 0; padding: 0; counter-reset: guide; }
.guide > li { counter-increment: guide; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2.5rem 4rem; align-items: center; padding: 2.5rem 0; }
.guide > li + li { border-top: 1px solid var(--rule); }
.guide > li:nth-child(even) .guide-text { order: 2; }
.guide-text h3 { font-size: 1.55rem; }
.guide-text h3::before { content: "Step " counter(guide); display: block; font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--accent); margin-bottom: 0.4rem; }
.guide-text ul { padding-left: 1.15rem; margin: 0; color: var(--ink-muted); }
.guide-text li { margin-bottom: 0.4rem; }
.guide .phone { margin: 0 auto; width: 16rem; }

/* File lifecycle: a real sequence, so numbered. */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.steps li { counter-increment: step; padding: 1.25rem 1.25rem 0; border-right: 1px solid var(--rule); }
.steps li:first-child { padding-left: 0; }
.steps li:last-child { border-right: 0; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--accent); margin-bottom: 0.7rem; }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--ink-muted); font-size: 0.97rem; }

/* Two audiences */
.audiences { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.audience { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 2rem; }
.audience h3 { font-size: 1.45rem; }
.audience ul { padding-left: 1.15rem; margin: 1rem 0 0; }
.audience li { margin-bottom: 0.5rem; }
.photo-band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; margin-bottom: 3rem; }
.photo { margin: 0; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Security highlights */
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.proof > div { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--rule); }
.proof > div:not(:nth-child(3n)) { border-right: 1px solid var(--rule); }
.proof > div:not(:nth-child(3n + 1)) { padding-left: 1.5rem; }
.proof h3 { font-size: 1.1rem; }
.proof p { color: var(--ink-muted); font-size: 0.97rem; margin: 0; }
.proof-figure { margin: 3rem 0 0; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 3rem; align-items: center; }

/* FAQ */
.faq { max-width: 50rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 1.1rem 0; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-muted); max-width: var(--measure); margin: 0 0 1.25rem; }

/* Pilot invitation over a softened photo */
.pilot { position: relative; color: #f4f6fa; padding: 6rem 0; background: #1c2430 url("/img/photo-desk-soft.webp") center / cover no-repeat; }
.pilot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(13 17 23 / 0.86), rgb(13 17 23 / 0.55)); }
.pilot .wrap { position: relative; }
.pilot h2 { color: #ffffff; }
.pilot p { max-width: var(--measure); color: #dbe2ec; font-size: 1.1rem; }
.pilot a:not(.button) { color: #ffffff; }
.pilot .button { background: #ffffff; color: #0b1220; }
.pilot .button:hover { background: #dbe5ff; color: #0b1220; }

/* ---------- Footer ---------- */
.colophon { background: var(--sheet); border-top: 1px solid var(--rule); padding: 3.5rem 0 2.5rem; font-size: 0.93rem; color: var(--ink-muted); }
.colophon .cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.colophon h2 { font-family: var(--sans); font-size: 0.95rem; color: var(--ink); margin: 0 0 0.75rem; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: 0.45rem; }
.colophon a { color: var(--ink-muted); }
.colophon a:hover { color: var(--ink); }
.colophon .brand { margin-bottom: 0.9rem; }
.colophon .fine { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.85rem; }

/* ---------- Inner pages ---------- */
.page { padding: 3.5rem 0 4rem; }
.page .wrap > header { max-width: var(--measure); margin-bottom: 2.5rem; }
.page h2 { margin-top: 2.75rem; }
.toc { border-left: 2px solid var(--rule); padding-left: 1rem; margin: 0 0 2rem; font-size: 0.95rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0.25rem 0; }
.controls { display: grid; grid-template-columns: 12rem minmax(0, 1fr); margin: 0; max-width: 52rem; border-top: 1px solid var(--rule); }
.controls dt, .controls dd { padding: 1rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.controls dt { font-weight: 650; padding-right: 1.5rem; }
.controls dd p:last-child { margin-bottom: 0; }
.draft { max-width: var(--measure); background: var(--wait-bg); color: var(--ink); border-left: 4px solid var(--wait); padding: 1rem 1.25rem; margin: 0 0 2.5rem; border-radius: 2px; }
.draft strong { color: var(--wait); }
.todo { background: var(--wait-bg); color: var(--ink); padding: 0 0.25em; border-radius: 2px; }
.notfound { padding: 5rem 0; }

/* ---------- Small screens ---------- */
@media (max-width: 940px) {
  .hero .wrap, .guide > li, .photo-band, .proof-figure { grid-template-columns: 1fr; }
  .guide > li:nth-child(even) .guide-text { order: 0; }
  .audiences { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; }
  .steps li { padding-left: 0; border-right: 0; }
  .proof { grid-template-columns: 1fr; }
  .proof > div { padding: 1.25rem 0 !important; border-right: 0 !important; }
  .colophon .cols { grid-template-columns: 1fr 1fr; }
  .colophon .cols > :first-child { grid-column: 1 / -1; }
  .hero-art .phone { right: 0; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .masthead .button { display: none; }
  .hero { padding-top: 2.5rem; }
  .facts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .controls dt { padding-bottom: 0.25rem; border-bottom: 0; }
  .hero-art .phone { width: 8.5rem; right: -0.25rem; }
  .audience { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bulb-glass, .bulb-filament, .bulb-rays { transition: none; }
}
@media print {
  .masthead, .colophon, .skip, .pilot::before { display: none; }
  body { background: #fff; color: #000; }
}

.not-fit { margin: 2rem 0 0; max-width: 50rem; font-size: 0.95rem; }

/* Pricing: a fee schedule. Plans side by side, separated by hairline rules (no cards), each with the same rows in the
   same order so they can be compared at a glance. Two columns on tablets, one on phones. */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.plan { display: flex; flex-direction: column; padding: 1.5rem 1.25rem 1.75rem; border-right: 1px solid var(--rule); }
.plan:first-child { padding-left: 0; }
.plan:last-child { border-right: 0; padding-right: 0; }
.page .plan h2 { font-size: 1.4rem; margin: 0 0 0.4rem; max-width: none; }
.plan .for { color: var(--ink-muted); font-size: 0.95rem; margin: 0 0 1.5rem; min-height: 2.9em; }
.price { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.price small { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-muted); letter-spacing: 0; }
.price-note { font-size: 0.88rem; color: var(--ink-muted); margin: 0.4rem 0 0; }
.plan dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; margin: 1.5rem 0; font-size: 0.95rem; border-top: 1px solid var(--rule); }
.plan dt, .plan dd { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.plan dt { color: var(--ink-muted); }
.plan dd { margin: 0; padding-left: 1rem; text-align: right; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.plan .note { margin: auto 0 0; font-size: 0.9rem; color: var(--ink-muted); }
.plans-fine { max-width: 50rem; margin: 1.5rem 0 0; font-size: 0.9rem; color: var(--ink-muted); }
.includes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; border-top: 1px solid var(--rule); }
.includes li { padding: 1rem 0; border-bottom: 1px solid var(--rule); color: var(--ink-muted); }
.includes strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }
@media (max-width: 940px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan:nth-child(2n) { border-right: 0; padding-right: 0; }
  .plan:nth-child(2n + 1) { padding-left: 0; }
  .plan:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 620px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan { border-right: 0; padding-left: 0; padding-right: 0; }
  .plan + .plan { border-top: 1px solid var(--rule); }
  .plan .for { min-height: 0; }
  .includes { grid-template-columns: minmax(0, 1fr); }
}
