/*
 * Tocsio's one stylesheet (docs/BRAND.md): the brand tokens (paper, night, signal), one self-hosted display face,
 * layout, components and the product mock-ups. A `.night` element re-scopes the tokens, so every component inside a
 * night band (header, hero, closing band, footer) turns dark without rules of its own.
 */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url("/assets/fonts/barlow-semi-condensed-latin-700-v5.3.0.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  /* the brand's fixed colours: night bands, the signal (graphics and night buttons only), paper */
  --night: #0a0e18;
  --night-2: #121a2b;
  --night-line: #26304a;
  --night-ink: #eef1f7;
  --night-muted: #a6b0c3;
  --signal: #ff5a1f;
  /* text on a signal fill: 6.4:1 */
  --signal-ink: #120600;
  --bg: #f5f2eb;
  --surface: #ffffff;
  --surface-2: #ece8de;
  --ink: #0f131b;
  --ink-muted: #4a5263;
  --line: #d9d3c5;
  /* form controls' boundary: at least 3:1 against the card and the page (WCAG 1.4.11) */
  --field-line: #7d8590;
  /* links and light buttons: the signal deepened to 4.8:1 or more on every light surface */
  --brand: #b23a0a;
  --brand-soft: #fbe9df;
  --accent: #b23a0a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9df;
  --ok: #146b3f;
  --ok-soft: #e3f4ea;
  --warn: #9a6100;
  --warn-soft: #fbf1dc;
  --crit: #b42318;
  --crit-soft: #fde8e6;
  --info: #2f5bd3;
  --shadow: 0 1px 2px rgb(15 19 27 / 6%), 0 10px 30px rgb(15 19 27 / 8%);
  --radius: 10px;
  --radius-s: 6px;
  --gutter: 16px;
  --max: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f19;
    --surface: #121a29;
    --surface-2: #0f1522;
    --ink: #eaeef5;
    --ink-muted: #a3adbf;
    --line: #253048;
    --field-line: #7a8596;
    --brand: #ff8a55;
    --brand-soft: #2a1a12;
    --accent: var(--signal);
    --accent-ink: var(--signal-ink);
    --accent-soft: #2c1a10;
    --ok: #5fd39a;
    --ok-soft: #12291d;
    --warn: #f0b952;
    --warn-soft: #2b2210;
    --crit: #ff7b72;
    --crit-soft: #2d1514;
    --info: #7da2ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px rgb(0 0 0 / 35%);
  }
}

.night {
  color-scheme: dark;
  --bg: var(--night);
  --surface: var(--night-2);
  --surface-2: #0e1524;
  --ink: var(--night-ink);
  --ink-muted: var(--night-muted);
  --line: var(--night-line);
  --field-line: #7a8596;
  --brand: #ff8a55;
  --brand-soft: #24170f;
  --accent: var(--signal);
  --accent-ink: var(--signal-ink);
  --accent-soft: color-mix(in srgb, var(--signal) 14%, transparent);
  --ok: #5fd39a;
  --ok-soft: #12291d;
  --warn: #f0b952;
  --warn-soft: #2b2210;
  --crit: #ff7b72;
  --crit-soft: #2d1514;
  --info: #7da2ff;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 18px 40px rgb(0 0 0 / 45%);

  background-color: var(--bg);
  color: var(--ink);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 0 0 0.45em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.12;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* the accent, not the raw signal: 4.9:1 or more on paper, the signal itself (6.2:1) on night (WCAG 1.4.11) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius-s);
}

.skip-link:focus {
  left: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 28px;
  }
}

/*
 * The signal marks; it never carries meaning on paper (2.8:1 there). Text, arrows, underlines and state borders use
 * the accent: the deepened signal on paper, the signal itself in a night band (docs/BRAND.md, Colour).
 *
 * The mark: the bell takes the text colour, its dot is always the signal.
 */

.mark-dot {
  fill: var(--signal);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  font: 700 1.55rem/1 var(--display);
  letter-spacing: 0.005em;
}

.brand svg {
  width: 30px;
  height: 30px;
}

/* Header and navigation: a night bar; a disclosure on small screens, a row from 960 px, no script. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: color-mix(in srgb, var(--night) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.site-header .brand {
  margin-right: auto;
}

.menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-weight: 600;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu[open] > .nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 8px var(--gutter) 16px;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: block;
  padding: 10px 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
}

.nav a:hover {
  color: var(--brand);
}

.nav a[aria-current="page"] {
  color: var(--brand);
}

.nav a.menu-cta {
  color: var(--brand);
  font-weight: 700;
}

/* an anchor target is not hidden under the sticky header */
[id] {
  scroll-margin-top: 80px;
}

.site-header .header-cta,
.nav-wide {
  display: none;
}

/* From 960 px the row navigation replaces the disclosure; each is removed from the page while the other shows. */
@media (min-width: 960px) {
  .menu {
    display: none;
  }

  .nav-wide {
    display: block;
  }

  .nav-wide ul {
    display: flex;
    gap: 4px;
  }

  .nav-wide a {
    padding: 8px 12px;
    font-size: 0.97rem;
  }

  .site-header .header-cta {
    display: inline-flex;
  }
}

/* Buttons: one filled button per group; a second action is a text link with an arrow. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font: 700 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--field-line);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-link {
  padding-inline: 4px;
  color: var(--ink);
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 0.35em;
}

.btn-link::after {
  content: "→";
  color: var(--accent);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 32px;
}

/* Sections: paper, alternate paper, and night bands; every section heading carries the signal bar. */

.section {
  --section-bg: var(--bg);

  padding: 72px 0;
  background: var(--section-bg);
}

.section.alt {
  --section-bg: var(--surface-2);
}

@media (min-width: 960px) {
  .section {
    padding: 104px 0;
  }
}

.section-head {
  max-width: 780px;
  margin-bottom: 44px;
}

/* the signal bar: above every section heading `sectionHeading` writes (never the hero's, never inside long text) */
.section-title::before {
  content: "";
  display: block;
  width: 32px;
  height: 4px;
  margin-bottom: 20px;
  background: var(--signal);
}

.section-head p {
  color: var(--ink-muted);
  font-size: 1.15rem;
}

/* The hero: a night band with a faint grid and the signal's glow behind the visual. */

.hero {
  padding: 56px 0 72px;
  background:
    radial-gradient(55% 60% at 78% 48%, color-mix(in srgb, var(--signal) 15%, transparent), transparent 70%),
    linear-gradient(rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--night);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  max-width: 14ch;
}

.hero .wrap:not(.has-visual) h1 {
  max-width: 20ch;
}

.hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 600px;
}

@media (min-width: 960px) {
  .hero .wrap.has-visual {
    grid-template-columns: 1fr 1.05fr;
  }

  .hero {
    padding: 96px 0 112px;
  }
}

/* The kicker: a console line with a live signal dot, in sentence case. */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--ink-muted);
  font: 500 0.9rem/1.3 var(--mono);
}

.kicker::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 20%, transparent);
}

.grid {
  display: grid;
  gap: 32px 40px;
}

@media (min-width: 720px) {
  .grid.cols-2,
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1040px) {
  .grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Notes: points in a row as an editorial list, a rule above each, no boxes. */

.note-item {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}

.note-item p {
  color: var(--ink-muted);
  margin: 0;
}

/* Tiles: the boxes that lead somewhere; the whole tile is the link. */

.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.tile:hover {
  border-color: var(--accent);
}

.tile p {
  color: var(--ink-muted);
  margin: 0;
}

.tile a {
  display: inline-block;
  margin-top: 18px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 0.35em;
}

.tile a::after {
  content: " →";
  color: var(--accent);
}

.tile a::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* The path: steps as stations on one signal line (vertical, horizontal from 1040 px), no numbers. */

.path {
  position: relative;
  display: grid;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.path::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--signal), color-mix(in srgb, var(--signal) 15%, transparent));
}

.path > li {
  position: relative;
  padding-left: 44px;
}

.path > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--signal);
  background: var(--section-bg, var(--bg));
}

.path > li:first-child::before {
  background: var(--signal);
}

.path p {
  color: var(--ink-muted);
  margin: 0;
}

@media (min-width: 1040px) {
  .path {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 40px;
  }

  .path::before {
    left: 10px;
    right: 0;
    top: 9px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--signal), color-mix(in srgb, var(--signal) 15%, transparent));
  }

  .path > li {
    padding-left: 0;
    padding-top: 48px;
  }

  .path > li::before {
    top: 0;
  }
}

.feature {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.section-head + .feature {
  border-top: 0;
}

.feature + .grid {
  margin-top: 28px;
}

.feature p,
.split p {
  color: var(--ink-muted);
  font-size: 1.08rem;
}

@media (min-width: 900px) {
  .feature.has-visual,
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .feature.flip > .visual,
  .split.reverse > .visual {
    order: -1;
  }
}

.split {
  display: grid;
  gap: 36px;
  align-items: center;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.ticks li {
  position: relative;
  padding-left: 28px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}

/* Pricing */

.tiers {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tier {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.tier.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
}

.tier .price {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 6px 0 0;
}

.tier .unit {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.tier .ticks {
  margin-bottom: 24px;
  flex: 1;
}

.note {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-top: 22px;
  max-width: 820px;
}

/* FAQ */

.faq {
  max-width: 860px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 650;
  font-size: 1.08rem;
}

.faq details p {
  color: var(--ink-muted);
}

/* Closing band: a night band with the tocsin's rings spreading from the right. */

.closing-band {
  background:
    repeating-radial-gradient(
      circle at 92% 50%,
      transparent 0 54px,
      color-mix(in srgb, var(--signal) 13%, transparent) 55px 56px
    ),
    var(--night);
}

.closing {
  max-width: 720px;
}

.closing h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.closing p {
  color: var(--ink-muted);
  font-size: 1.15rem;
}

/* Prose pages */

.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 1.8em;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.6em;
}

.facts {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.facts th,
.facts td {
  text-align: left;
  vertical-align: top;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.facts th {
  width: 34%;
  padding-right: 16px;
  color: var(--ink-muted);
  font-weight: 600;
}

/* Demo form */

.form-card {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend {
  font-weight: 720;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.fields {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }

  .field.wide {
    grid-column: 1 / -1;
  }
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field [aria-invalid="true"] {
  border-color: var(--crit);
  box-shadow: 0 0 0 1px var(--crit);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
}

.check input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.form-foot small {
  color: var(--ink-muted);
}

.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--crit-soft);
  color: var(--crit);
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.challenge {
  margin-top: 18px;
  min-height: 65px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer: the night bar again, with the mark. */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: grid;
  gap: 16px;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

/* Product mock-ups: product imagery drawn in HTML and CSS, read by assistive technology as one labelled image. */

.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.mock-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill.crit {
  background: var(--crit-soft);
  color: var(--crit);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill.info {
  background: var(--brand-soft);
  color: var(--brand);
}

.mock-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-rows > li {
  display: grid;
  grid-template-columns: 4.2em 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}

.mock-rows > li:first-child {
  border-top: 0;
}

.mock time,
.mock .mono {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.mock .muted {
  color: var(--ink-muted);
}

/*
 * The home hero's scene: a phone in true proportions (9 : 19.5), the events converging into it, the rings of the
 * alarm around it and the audiences it reaches. Its SVG is 560 × 600 units; the HTML on top is placed in percent of
 * the same box, so both scale together. Text inside the phone scales with the phone (container units).
 */

.scene {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 14 / 15;
  margin-inline: auto;
  container-type: inline-size;
}

.scene-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* each ring rests at its own size and strength; the animation ends there, so nothing snaps when it stops */
.scene .ring {
  --rest-scale: 1;
  --rest-opacity: 0.35;

  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  opacity: var(--rest-opacity);
  transform: scale(var(--rest-scale));
  transform-origin: 230px 300px;
}

.scene .ring.g1 {
  --rest-scale: 1.8;
  --rest-opacity: 0.2;
}

.scene .ring.g2 {
  --rest-scale: 2.6;
  --rest-opacity: 0.1;
}

/* the events rest at the edge; when they converge they fade out at the incident and back in at the edge */
.scene .ev {
  --rest-opacity: 0.6;

  fill: var(--night-muted);
  opacity: var(--rest-opacity);
}

.scene .ev.d0,
.scene .ev.d3 {
  fill: var(--signal);
}

.scene .ev.r0 {
  --r: 230px;
}

.scene .ev.r1 {
  --r: 190px;
}

.scene .ev.r2 {
  --r: 150px;
}

.scene .link {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-dasharray: 3 6;
  opacity: 0.75;
}

/* centred on the incident's point (230 of 560 units, 41.07 %), 40 % wide */
.scene .phone {
  position: absolute;
  left: 21.07%;
  top: 2.5%;
  width: 40%;
}

/* a browser without container units cannot size the phone's text: it keeps the rings and the events only */
@supports not (font-size: 1cqi) {
  .scene .phone,
  .scene .chip {
    display: none;
  }
}

.phone {
  aspect-ratio: 9 / 19.5;
  max-width: 280px;
  margin: 0 auto;
  padding: 3.4%;
  border-radius: 13% / 6%;
  background: #05070c;
  box-shadow:
    0 0 0 1px #2a3550,
    0 30px 80px rgb(0 0 0 / 55%),
    0 0 120px color-mix(in srgb, var(--signal) 18%, transparent);
  container-type: inline-size;
}

.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 3cqi;
  height: 100%;
  padding: 16cqi 5cqi 5cqi;
  border-radius: 10% / 4.6%;
  background: radial-gradient(120% 70% at 50% 0%, #1b2a4a 0%, #0b1222 60%, #070a12 100%);
  color: #ffffff;
  font-size: 5cqi;
  line-height: 1.35;
}

.phone-time {
  text-align: center;
  font: 300 21cqi/1 var(--font);
  letter-spacing: -0.02em;
}

.phone-date {
  text-align: center;
  opacity: 0.8;
}

/* a lock screen: the clock at the top, the notifications at the bottom */
.phone-date + .notice {
  margin-top: auto;
}

.notice {
  background: rgb(255 255 255 / 94%);
  color: #12161c;
  border-radius: 6cqi;
  padding: 4.5cqi 5cqi;
}

.notice strong {
  display: block;
  margin: 1cqi 0;
}

.notice .from {
  display: flex;
  justify-content: space-between;
  font-size: 4.2cqi;
  color: #4a5361;
  font-weight: 650;
}

.notice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3cqi;
  margin-top: 4cqi;
}

.notice-actions span {
  text-align: center;
  padding: 3.2cqi;
  border-radius: 3.5cqi;
  font-weight: 700;
  background: #e8ecf1;
}

.notice-actions span.go {
  background: var(--signal);
  color: var(--signal-ink);
}

.notice-quiet {
  background: rgb(255 255 255 / 12%);
  color: #eef1f7;
  font-size: 4.4cqi;
}

.chip {
  position: absolute;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
  width: 34%;
  padding: 1.6cqi 2.2cqi;
  translate: 0 -50%;
  border: 1px solid var(--night-line);
  border-radius: 8px;
  background: rgb(18 26 43 / 92%);
  box-shadow: 0 12px 30px rgb(0 0 0 / 35%);
  color: var(--night-ink);
  font-size: clamp(0.62rem, 2.5cqi, 0.82rem);
  line-height: 1.3;
}

.chip b {
  font-weight: 700;
}

.chip span {
  grid-column: 2;
  color: var(--night-muted);
  font-size: 0.9em;
}

.chip-dot {
  grid-row: span 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
}

.chip-dot.ok {
  background: var(--ok);
}

.chip-dot.info {
  background: var(--info);
}

/* over the empty middle of the lock screen, clear of the notifications */
.chip.c0 {
  left: 0;
  top: 42%;
}

.chip.c1,
.chip.c2,
.chip.c3 {
  left: 66.4%;
}

.chip.c1 {
  top: 19.7%;
}

.chip.c2 {
  top: 46%;
}

.chip.c3 {
  top: 71.7%;
}

.panes {
  display: grid;
  gap: 10px;
}

.pane {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 10px 12px;
}

.pane b {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ladder li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 10px 12px;
}

.ladder li.done {
  background: var(--ok-soft);
  border-color: transparent;
}

.flow {
  display: grid;
  gap: 8px;
}

.flow > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 10px 12px;
  background: var(--surface-2);
}

.flow > div.key {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.flow .arrow {
  border: 0;
  background: none;
  padding: 0;
  text-align: center;
  color: var(--ink-muted);
}

.map {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px 10px;
  align-items: center;
}

.map .from,
.map .to {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 8px 10px;
}

.map .to {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.map .head {
  font-weight: 700;
  border: 0;
  background: none;
  padding: 0 0 2px;
}

.clocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.clocks div {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 8px;
  text-align: center;
}

.clocks strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.05rem;
}

/*
 * Motion: only for visitors who have not asked for less of it, and played once: every animation ends within five
 * seconds of the page loading (WCAG 2.2.2), then each element rests in its own style, which is also what a visitor
 * with reduced motion sees from the start. The sequence: the events converge (to 4.1 s), three rings spread once
 * (to 4.8 s), the notification drops in, the people it reaches appear (to 2.7 s), the links flow (to 4.2 s).
 */

@media (prefers-reduced-motion: no-preference) {
  .kicker::before {
    animation: beacon 2.4s ease-out 2;
  }

  .scene .ring {
    animation: ring 3.6s cubic-bezier(0.2, 0.6, 0.3, 1) backwards;
  }

  .scene .ring.g1 {
    animation-delay: 0.6s;
  }

  .scene .ring.g2 {
    animation-delay: 1.2s;
  }

  .scene .ev {
    animation: converge 2.8s ease-in backwards;
  }

  .scene .ev.d1 {
    animation-delay: 0.25s;
  }

  .scene .ev.d2 {
    animation-delay: 0.5s;
  }

  .scene .ev.d3 {
    animation-delay: 0.75s;
  }

  .scene .ev.d4 {
    animation-delay: 1s;
  }

  .scene .ev.d5 {
    animation-delay: 1.25s;
  }

  .scene .link {
    animation: flow 1.4s linear 3;
  }

  .scene .notice:not(.notice-quiet) {
    animation: drop 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.15s both;
  }

  .scene .chip {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .scene .chip.c0 {
    animation-delay: 0.3s;
  }

  .scene .chip.c1 {
    animation-delay: 0.8s;
  }

  .scene .chip.c2 {
    animation-delay: 1.4s;
  }

  .scene .chip.c3 {
    animation-delay: 2s;
  }

  .tile {
    transition:
      border-color 0.2s,
      transform 0.2s;
  }

  .tile:hover {
    transform: translateY(-3px);
  }

  .btn-link::after {
    transition: transform 0.2s;
  }

  .btn-link:hover::after {
    transform: translateX(4px);
  }

  @keyframes beacon {
    0% {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent);
    }

    70%,
    100% {
      box-shadow: 0 0 0 10px color-mix(in srgb, var(--signal) 0%, transparent);
    }
  }

  /* one pulse out to the edge, then the ring fades back in at its resting size */
  @keyframes ring {
    0% {
      opacity: 0.55;
      transform: scale(0.7);
    }

    55% {
      opacity: 0;
      transform: scale(3.4);
    }

    56% {
      opacity: 0;
      transform: scale(var(--rest-scale));
    }

    100% {
      opacity: var(--rest-opacity);
      transform: scale(var(--rest-scale));
    }
  }

  @keyframes converge {
    0% {
      opacity: 0;
      transform: translateX(0);
    }

    12%,
    58% {
      opacity: 0.9;
    }

    70% {
      opacity: 0;
      transform: translateX(calc(-1 * var(--r)));
    }

    71% {
      opacity: 0;
      transform: translateX(0);
    }

    100% {
      opacity: var(--rest-opacity);
      transform: translateX(0);
    }
  }

  @keyframes flow {
    to {
      stroke-dashoffset: -18;
    }
  }

  @keyframes drop {
    from {
      opacity: 0;
      transform: translateY(-14px);
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
  }
}
