/* StandingBy marketing site - standingby.io
   Brand: Straight A Software. Libre Franklin (headings), Literata (body),
   IBM Plex Mono (data and labels). Fonts are self-hosted so no visitor
   request reaches a third party. */

@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-italic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #1B2230;
  --ink-soft: #4A5263;
  --rule: #DDE1E8;
  --rule-strong: #C3C9D3;
  --accent: #B1122F;
  --accent-wash: #FBEFF1;

  --font-head: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 40rem;
  --wide: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11151D;
    --surface: #1B2230;
    --ink: #E9ECF1;
    --ink-soft: #A7B0C0;
    --rule: #2A3242;
    --rule-strong: #3A4356;
    --accent: #D63A52;
    --accent-wash: #2A1A22;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.8em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); color: var(--ink); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* The 911 line. On every page, above everything, never dismissible. */
.emergency {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 500;
}
.emergency .wrap { padding-block: 0.6rem; }
.emergency p { margin: 0; }
.emergency strong { font-weight: 700; }
.emergency a { color: inherit; font-weight: 700; text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  .emergency { background: var(--accent); color: #FFFFFF; }
}

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-block: 1rem;
}
.wordmark {
  font-family: var(--font-head); font-weight: 700; font-size: 1.35rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.wordmark span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.nav li { margin: 0; }
.nav a {
  font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
  color: var(--ink-soft); text-decoration: none; padding-block: 0.35rem; display: inline-block;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

main { display: block; padding-block: clamp(2rem, 6vw, 4rem); }

/* Labels and data */
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 1rem;
}
.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft);
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0.2rem 0.75rem;
  margin: 0 0 1.5rem;
}
.status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-soft); }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }

.lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.55; color: var(--ink); max-width: 38rem; }

/* Hero */
.hero { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.hero h1 { max-width: 16ch; }

.button {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 0.8rem 1.3rem; border-radius: 6px;
}
.button:hover { background: var(--accent); color: #FFFFFF; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.5rem; }
.button-row .quiet { font-family: var(--font-head); font-weight: 500; }
.small { font-size: 0.9rem; color: var(--ink-soft); }

/* Sections and grids */
.section { border-top: 1px solid var(--rule); padding-block: clamp(2rem, 5vw, 3.5rem); }
.section > .wrap > h2:first-child, .section h2.first { margin-top: 0; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  padding: 1.25rem 1.35rem;
}
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

/* Callouts */
.notice {
  border-left: 4px solid var(--accent); background: var(--accent-wash);
  padding: 1rem 1.25rem; border-radius: 0 6px 6px 0; margin: 1.5rem 0;
  max-width: var(--measure);
}
.notice p:last-child { margin-bottom: 0; }
.notice h2, .notice h3 { margin-top: 0; }
.plain-box {
  border: 1px solid var(--rule-strong); border-radius: 8px; padding: 1rem 1.25rem;
  margin: 1.5rem 0; max-width: var(--measure); background: var(--surface);
}
.plain-box p:last-child, .plain-box ul:last-child { margin-bottom: 0; }

/* Numbered steps (How it works) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.steps > li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 2rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--ink);
  font-family: var(--font-mono); font-weight: 500; font-size: 0.9rem;
  display: grid; place-items: center;
}
.steps h3 { margin-top: 0; }

/* Escalation timeline figure. Vertical, reads top to bottom as a session unfolds. */
.timeline { list-style: none; margin: 1.5rem 0; padding: 0; max-width: var(--measure); }
.timeline li { position: relative; padding: 0 0 1.4rem 2rem; margin: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0.4rem; top: 0.45rem; width: 0.7rem; height: 0.7rem;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--ink);
}
.timeline li::after {
  content: ""; position: absolute; left: 0.72rem; top: 1.3rem; bottom: 0; width: 2px; background: var(--rule-strong);
}
.timeline li:last-child::after { display: none; }
.timeline li.wait { padding-bottom: 1rem; }
.timeline li.wait::before { border-style: dashed; border-color: var(--ink-soft); }
.timeline li.alert::before { background: var(--accent); border-color: var(--accent); }
.timeline .when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); display: block; }
.timeline .what { font-family: var(--font-head); font-weight: 600; }

/* Sample messages */
.sms {
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.55;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  padding: 0.9rem 1rem; white-space: pre; overflow-x: auto; margin: 0.5rem 0 1.5rem;
  max-width: 100%;
}

/* Tables */
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
th { font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; border-bottom-color: var(--rule-strong); }
td code { white-space: nowrap; }

/* Legal documents */
.legal { max-width: var(--measure); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2.4em; padding-top: 0.2em; }
.legal h3 { font-size: 1.1rem; }
.legal .meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); }
.legal .caps { text-transform: uppercase; font-size: 0.95rem; letter-spacing: 0.01em; }
.toc {
  border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.25rem 0.5rem; margin: 1.5rem 0 2rem;
  background: var(--surface);
}
.toc h2 { font-size: 0.8rem; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.5rem; color: var(--ink-soft); }
.toc ol { padding-left: 1.25rem; font-size: 0.95rem; }
.todo {
  font-family: var(--font-mono); font-size: 0.85rem; background: #FFF4CC; color: #4A3B00;
  padding: 0.05rem 0.35rem; border-radius: 3px;
}
@media (prefers-color-scheme: dark) { .todo { background: #4A3B00; color: #FFF4CC; } }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 2.5rem 3rem; font-size: 0.92rem; color: var(--ink-soft); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h2 {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.75rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.maker img { width: 12rem; margin-bottom: 0.75rem; }
.maker p { margin-bottom: 0.4rem; }

@media (prefers-reduced-motion: no-preference) {
  .button, .nav a { transition: background-color 120ms ease, color 120ms ease; }
}

@media print {
  .emergency, .site-header nav, .site-footer .footer-grid > :not(.maker), .skip { display: none; }
  body { background: #FFFFFF; color: #000000; }
}
