/* First Minutes — the public site.
 *
 * Shared by index.html and eap.html. No web fonts, no CDN, no external
 * request of any kind: everything this page needs is in site/.
 *
 * The tokens below are copied from web/app.css so the site and the app are
 * the same colours to the byte. They are copied, not linked, because the app
 * lives at /app/ and must be able to change its stylesheet without the site
 * silently following it.
 *
 * Red is reserved, exactly as in the app: it means "call" and "do not".
 * Buttons are ink, not red — a Print button is neither of those things.
 */

:root {
  --bg: #ffffff;
  --surface: #f4f5f7;
  --surface-2: #e9ebef;
  --text: #14161a;
  --text-dim: #565c66;
  --line: #d3d7de;
  --red: #b8121b;
  --red-ink: #8c0d14;
  --red-wash: #fdeceb;
  --call-bg: #b8121b;
  --call-ink: #ffffff;
  --call-note: #ffe3e4;
  --step-bg: #14161a;
  --step-ink: #ffffff;
  --amber-ink: #7a4b00;
  --amber-wash: #fdf1dc;
  --ok: #0f6b3f;
  --focus: #0b57d0;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 28px);
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --surface: #171a1f;
    --surface-2: #21252c;
    --text: #f2f4f7;
    --text-dim: #a4acb9;
    --line: #333944;
    --red: #ef4b52;
    --red-ink: #ff8b8f;
    --red-wash: #2a1214;
    /* --call-bg, --call-ink and --call-note deliberately do not change:
     * white on the lightened red measures 3.62:1. */
    --step-bg: #f2f4f7;
    --step-ink: #14161a;
    --amber-ink: #f0b45e;
    --amber-wash: #2b2113;
    --ok: #5ed39b;
    --focus: #7cabff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* The keyboard reader's first tab stop. Off-screen until it is focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 650;
  text-decoration: none;
}
.skip:focus { left: var(--gutter); top: 10px; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--wide { max-width: 64rem; }

/* ---------- the lockup ----------
 * Proportions from web/app.css: the flag is 0.88em (1.22x cap height) and the
 * gap is 0.32em. The stripe is --bg, so on a night screen the mark reads as a
 * field divided rather than a white slash glowing.
 */
.lockup { display: inline-flex; align-items: center; gap: 0.32em; font-size: 17px; }
.lockup__flag { width: 0.88em; height: 0.88em; flex: none; display: block; }
.lockup__field { fill: var(--red); }
.lockup__stripe { fill: var(--bg); }
.lockup__word { font-weight: 750; letter-spacing: -0.028em; line-height: 1; }

/* ---------- page furniture ---------- */

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
}
.head__nav { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.head__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  color: var(--text-dim);
  text-decoration: none;
}
.head__nav a:hover { color: var(--text); text-decoration: underline; }

section { padding: 30px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 7vw, 40px); font-weight: 750; margin: 0 0 14px; }
h2 { font-size: clamp(22px, 4.6vw, 27px); font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }

.lede { font-size: 19px; margin: 0 0 18px; }
.kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dim { color: var(--text-dim); }
.small { font-size: 15px; }
.call-first { color: var(--red-ink); font-weight: 700; }

/* ---------- hero ---------- */

.hero { padding: 34px 0 30px; }
.hero .lockup { font-size: 21px; margin-bottom: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 15px 22px;
  font: inherit;
  font-weight: 650;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.btn--primary { background: var(--step-bg); border-color: var(--step-bg); color: var(--step-ink); }
.btn + .btn { margin-left: 8px; }

/* ---------- lists ---------- */

.does { list-style: none; margin: 0 0 20px; padding: 0; }
.does li { padding: 0 0 16px 0; }
.does b { display: block; font-weight: 700; }

.never { list-style: none; margin: 0 0 18px; padding: 0; }
.never li {
  position: relative;
  padding: 0 0 12px 22px;
}
.never li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.note {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 0 0 20px;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }
.note--warn { background: var(--amber-wash); border-color: transparent; color: var(--amber-ink); }

/* ---------- the screenshot ---------- */

figure { margin: 0 0 20px; }
figure img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
figcaption { font-size: 14px; color: var(--text-dim); margin-top: 10px; max-width: 300px; }

/* ---------- get it ---------- */

.gets { display: grid; gap: 12px; margin: 0 0 18px; }
.get {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}
a.get:hover { background: var(--surface-2); }
.get__t { display: block; font-weight: 700; font-size: 18px; }
.get__s { display: block; font-size: 15px; color: var(--text-dim); margin-top: 4px; }
.get__state { display: block; font-size: 15px; font-weight: 650; margin-top: 4px; }

/* ---------- footer ---------- */

.foot { padding: 22px 0 40px; border-top: 1px solid var(--line); margin-top: 10px; }
.foot p { font-size: 14px; color: var(--text-dim); margin: 0 0 8px; }

/* ==========================================================================
   The EAP builder — screen
   ========================================================================== */

.field { display: block; margin: 0 0 16px; }
.field > span {
  display: block;
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 6px;
}
.field .hint { display: block; font-weight: 400; color: var(--text-dim); font-size: 14px; }
/* The border here is --text-dim, not --line.
 *
 * Measured: --line is 1.44:1 against the page in light and 1.65:1 in dark,
 * which is fine for a divider and not fine for the edge of a control somebody
 * has to find. WCAG 1.4.11 wants 3:1 for a control boundary; --text-dim is
 * 6.73:1 and 8.39:1. Dividers and card outlines keep --line, because those are
 * decoration and the thing they bound is identifiable without them. */
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--text-dim);
  border-radius: var(--radius);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.pair { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 33rem) { .pair { grid-template-columns: 1fr 1fr; } }

.src { font-size: 14px; color: var(--text-dim); margin: -8px 0 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 24px; }
.actions .btn + .btn { margin-left: 0; }

/* ==========================================================================
   The printable sheet
   --------------------------------------------------------------------------
   Black on white, always, in both themes and on paper. Nothing on this sheet
   is distinguished by colour alone: every number is labelled in words, and
   the "phoned" marking is a word, not a tint.
   ========================================================================== */

/* The preview is A4 and stays A4.
 *
 * Reflowing it to a phone would show the operator a layout that is not the one
 * that comes out of the printer, and this sheet's whole job is to be the thing
 * on the wall. So it keeps its paper measure and scrolls sideways inside its
 * own box on a narrow screen; the page itself never scrolls sideways. */
.sheetwrap {
  margin: 0 0 30px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.a4 {
  background: #ffffff;
  color: #000000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12mm;
  width: 210mm;
  max-width: 210mm;
  margin: 0 auto;
  font-size: 11pt;
  line-height: 1.35;
}

.a4 * { color: #000000; }

.a4__bar {
  display: flex;
  align-items: center;
  gap: 4mm;
  background: #000000;
  padding: 3.5mm 4mm;
  margin: 0 0 5mm;
}
.a4__bar * { color: #ffffff; }
.a4__mark { width: 9mm; height: 6.3mm; flex: none; display: block; }
.a4__wordmark { font-weight: 800; letter-spacing: 0.06em; font-size: 12pt; }
.a4__who { margin-left: auto; text-align: right; font-weight: 700; font-size: 11pt; line-height: 1.25; }

.a4__h {
  margin: 0 0 2.5mm;
  font-size: 12pt;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.a4__three { border: 0.6mm solid #000; padding: 4mm; margin: 0 0 5mm; }
.a4__step { display: flex; gap: 3mm; margin: 0 0 3mm; }
.a4__step:last-child { margin-bottom: 0; }
.a4__stepn {
  flex: none;
  width: 7mm;
  height: 7mm;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-weight: 800;
  font-size: 11pt;
  display: flex;
  align-items: center;
  justify-content: center;
}
.a4__stept { font-weight: 700; font-size: 12pt; }
.a4__stepd { display: block; font-weight: 400; font-size: 10pt; margin-top: 0.8mm; }

.a4__nums { margin: 0 0 5mm; }
.a4__num {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4mm;
  border-bottom: 0.3mm solid #000;
  padding: 2mm 0;
}
.a4__numl { font-weight: 700; font-size: 10.5pt; }
.a4__numl small { display: block; font-weight: 400; font-size: 9pt; }
.a4__numv { font-weight: 800; font-size: 17pt; letter-spacing: -0.01em; text-align: right; white-space: nowrap; }
.a4__numv--text { font-size: 11pt; font-weight: 700; white-space: normal; text-align: right; }

.a4__cols { display: flex; gap: 6mm; align-items: flex-start; margin: 0 0 4mm; }
.a4__left { flex: 1 1 auto; min-width: 0; }
.a4__right { flex: none; width: 48mm; text-align: center; }

.a4__evac { margin: 0 0 4mm; }
.a4__evac ol { margin: 0; padding-left: 6mm; }
.a4__evac li { margin: 0 0 1.5mm; font-size: 10.5pt; }

.a4__keeper { font-size: 10pt; margin: 0 0 3mm; }
.a4__keeper b { display: block; }

.a4__qr { width: 48mm; }
.a4__qr svg { display: block; width: 48mm; height: 48mm; }
.a4__qrc { font-size: 8.5pt; line-height: 1.25; margin: 1.5mm 0 0; }

.a4__prov { font-size: 8.5pt; line-height: 1.3; margin: 4mm 0 0; border-top: 0.3mm solid #000; padding-top: 2mm; }

.no-print { display: block; }

@media print {
  @page { size: A4; margin: 12mm }

  body { background: #ffffff; color: #000000; font-size: 11pt; }
  .no-print, .head, .foot, .actions, .skip { display: none !important; }
  .wrap, .wrap--wide { max-width: none; padding: 0; }
  .sheetwrap { margin: 0; overflow: visible; }
  .a4 { border: 0; border-radius: 0; padding: 0; width: auto; max-width: none; margin: 0; }
  section { border-top: 0; padding: 0; }
}
