/*
 * The pre-login site's one stylesheet (LP-1b). The app's colour system
 * (CORE): primary #3D5248, accent #6B8C79, background #F2F7F4. Body text and
 * the buttons' labels are primary on the background or on white, or white
 * on primary (WCAG AA, 4.5:1). The accent is for lines, borders and the
 * band's fill alone: on the background it reaches about 3.4:1, short of AA
 * for text. The system's fonts: nothing is loaded from another origin.
 */
:root {
  --primary: #3D5248;
  --accent: #6B8C79;
  --background: #F2F7F4;
  --white: #FFFFFF;
  --line: rgba(107, 140, 121, 0.45);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--primary);
  background: var(--background);
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--primary); }
a { color: var(--primary); }
h1, h2, h3 { color: var(--primary); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.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;
}

/* ── header ─────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); background: var(--background); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
nav a { text-decoration: none; font-size: 0.95rem; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }

/* ── buttons ────────────────────────────────────────────────────────── */
.button {
  display: inline-block; padding: 10px 18px; border-radius: 6px; border: 2px solid var(--primary);
  background: var(--primary); color: var(--white); font-weight: 600; text-decoration: none;
}
.button:hover, .button:focus-visible { text-decoration: underline; }
.button.secondary { background: transparent; color: var(--primary); }
nav .button { padding: 6px 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── sections ───────────────────────────────────────────────────────── */
main section { padding: 56px 0; }
main section + section { border-top: 1px solid var(--line); }
.hero { padding-top: 72px; }
.hero h1 { max-width: 18em; }
.hero .audience { font-size: 1.15rem; font-weight: 600; max-width: 42em; }
.hero .lead { font-size: 1.1rem; max-width: 42em; }

.grid { display: grid; gap: 24px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.point, .history article {
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 8px; padding: 22px;
}
.point p:last-child, .history article p:last-child { margin-bottom: 0; }

.trust { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; justify-content: center; font-weight: 600; }
.trust li + li::before { content: "·"; margin: 0 0.7em; }

/* ── the example cases ──────────────────────────────────────────────── */
.case-list { padding-left: 1.2em; margin: 0 0 24px; }
.showcase { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.showcase .choice { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.case-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.case-switch label {
  cursor: pointer; padding: 8px 14px; border: 2px solid var(--primary); border-radius: 6px;
  color: var(--primary); background: var(--white); font-weight: 600;
}
.case-panel { display: none; }
.toggle { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.toggle legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.toggle .option { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle input { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; }
.band-figure { display: none; margin: 0; }
.chart { width: 100%; height: auto; display: block; }
.chart .band-area { fill: var(--accent); fill-opacity: 0.35; stroke: var(--accent); stroke-width: 1; }
.chart .band-p50, .chart .history { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.chart .interval { stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.chart .prediction { fill: var(--primary); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .tick, .chart .label, .chart .axis-title { fill: var(--primary); font-size: 13px; }
.chart .label { font-weight: 600; }
.band-figure figcaption { font-size: 0.9rem; margin-top: 4px; }
.computed { margin: 14px 0 0; font-size: 0.95rem; }
.notation { margin: 6px 0 0; font-size: 0.95rem; }

/* ── closing, footer, placeholders ──────────────────────────────────── */
.closing { text-align: center; }
.closing .actions { justify-content: center; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 0.92rem; }
.site-footer p { margin: 0 0 0.5em; }
.placeholder { min-height: 40vh; }

/* Desktop first (the owner's ruling): nothing is designed for phones, and
 * nothing breaks below the desktop sizes either. */
@media (max-width: 900px) {
  .grid.three, .grid.two { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 2.1rem; }
}
