/* Nines launch page. Palette, type and layout from docs/site/BRIEF.md. */

:root {
  --bg: #f4f1ea;
  --surface: #fbf9f4;
  --surface-sunken: #ebe6db;
  --border: #ddd6c8;
  --border-strong: #b8af9e;
  --ink: #16191d;
  --ink-muted: #4f5660;
  --ink-subtle: #6a707a;
  --accent: #0b6b5f;
  --accent-hover: #08574d;
  --accent-contrast: #ffffff;
  --accent-soft: #dcefe9;
  --investigating: #8a5800;
  --investigating-soft: #f8ebcf;
  --resolved: #17803d;
  --resolved-soft: #e0f1e5;
  --sev1: #b42318;
  --focus: #2f6fe4;
  --shadow-tint: 34 28 18;

  /* Text drawn on the soft status fills, darkened where needed for AA. */
  --resolved-ink: #106130;
  --sev1-contrast: #ffffff;
  /* --ink-subtle is 4.4:1 on --bg in light; small text uses this instead. */
  --text-subtle: #5c626b;
  --shadow:
    0 1px 2px rgb(var(--shadow-tint) / 0.06),
    0 12px 32px -8px rgb(var(--shadow-tint) / 0.14);
  --card-border: var(--border);

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --radius: 14px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(5rem, 10vw, 9rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f13;
    --surface: #141920;
    --surface-sunken: #090b0e;
    --border: #252c36;
    --border-strong: #3a4350;
    --ink: #ebe8e2;
    --ink-muted: #a3acb8;
    --ink-subtle: #8a94a2;
    --accent: #3ec5ae;
    --accent-hover: #63d5c2;
    --accent-contrast: #03201b;
    --accent-soft: #10302b;
    --investigating: #e6b04c;
    --investigating-soft: #2d2410;
    --resolved: #52c97d;
    --resolved-soft: #10291a;
    --sev1: #f07168;
    --focus: #6ea0ff;
    --shadow-tint: 0 0 0;

    --resolved-ink: var(--resolved);
    --text-subtle: var(--ink-subtle);
    --sev1-contrast: #1d0604;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.45), 0 12px 32px -8px rgb(0 0 0 / 0.45);
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 em,
h2 em {
  font-style: italic;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  max-width: 22ch;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.mono,
.eyebrow {
  font-family: var(--font-mono);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

main > section + section {
  margin-top: var(--section-gap);
}

.lede {
  max-width: 38rem;
  color: var(--ink-muted);
  margin-top: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Links and buttons ---------- */

a {
  color: inherit;
}

a,
button,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 500 1rem/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease),
    transform 200ms var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 1px 2px rgb(var(--shadow-tint) / 0.12);
}

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

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

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

.btn-small {
  min-height: 2.75rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.9375rem;
}

.btn-large {
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  font-size: 1.0625rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition:
    color 200ms var(--ease),
    transform 200ms var(--ease);
}

.text-link:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

.text-link:active {
  transform: translateY(1px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}

.site-header[data-scrolled] {
  border-bottom-color: var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms var(--ease);
}

.logo:active {
  transform: translateY(1px);
}

.logo-mark {
  color: var(--accent);
  flex: none;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.logo:hover .logo-word {
  color: var(--accent);
}

.header-nav {
  margin-left: auto;
}

.header-nav ul {
  display: flex;
  gap: 0.25rem;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.75rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition:
    color 200ms var(--ease),
    background-color 200ms var(--ease),
    transform 200ms var(--ease);
}

.header-nav a:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.header-nav a:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .header-nav {
    display: none;
  }

  .header-row .btn {
    margin-left: auto;
  }
}

/* ---------- 1. Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 11fr 9fr;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: clamp(3rem, 7vw, 6rem);
}

.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 5.2vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero h1 em {
  color: var(--accent);
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: 1.1875rem;
  color: var(--ink-muted);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.reassure {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.hero-visual {
  position: relative;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.dot-grid {
  position: absolute;
  inset: -2rem;
  background-image: radial-gradient(var(--border) 1.4px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent);
  mask-image: radial-gradient(closest-side, #000 45%, transparent);
  pointer-events: none;
}

.incident-card {
  position: relative;
  padding: 1.5rem;
  transform: rotate(-1.5deg);
}

.incident-top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.pill-sev {
  background: var(--sev1);
  color: var(--sev1-contrast);
  border-radius: 6px;
  letter-spacing: 0.04em;
}

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

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

.incident-date {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.status {
  display: grid;
  margin-left: auto;
}

.status > * {
  grid-area: 1 / 1;
  justify-self: end;
}

.status-from {
  opacity: 0;
}

.incident-title {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

.rail-wrap {
  position: relative;
  margin-top: 1.25rem;
}

.rail-track {
  position: absolute;
  left: 5px;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.rail-line {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: top;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.25rem 0.75rem;
  padding-left: 1.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.stop + .stop {
  margin-top: 1rem;
}

.stop-dot {
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent);
}

.stop-time {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  padding-top: 0.08rem;
}

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

.stop-body strong {
  font-weight: 600;
  color: var(--ink);
}

.followups-label {
  margin: 1.5rem 0 0.625rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.checklist li + li {
  margin-top: 0.5rem;
}

.tick {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tick rect {
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.tick path {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 16;
  stroke-dashoffset: 0;
}

/* The one-time play: main.js adds .will-play, and the finished state is the
   default, so without JS (or with reduced motion) the card is resolved. */
.will-play .rail-line {
  animation: rail-draw 1.6s var(--ease) 400ms both;
}

.will-play .stop-dot {
  animation: dot-fill 300ms var(--ease) both;
}

.will-play .stop:nth-child(1) .stop-dot {
  animation-delay: 400ms;
}

.will-play .stop:nth-child(2) .stop-dot {
  animation-delay: 900ms;
}

.will-play .stop:nth-child(3) .stop-dot {
  animation-delay: 1900ms;
}

.will-play .status-from {
  animation: fade-out 400ms var(--ease) 1950ms both;
}

.will-play .status-to {
  animation: fade-in 400ms var(--ease) 1950ms both;
}

.will-play .tick path {
  animation: tick-draw 500ms var(--ease) both;
}

.will-play .checklist li:nth-child(1) .tick path {
  animation-delay: 2250ms;
}

.will-play .checklist li:nth-child(2) .tick path {
  animation-delay: 2330ms;
}

.will-play .checklist li:nth-child(3) .tick path {
  animation-delay: 2410ms;
}

@keyframes rail-draw {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes dot-fill {
  from {
    background-color: var(--surface);
    border-color: var(--border-strong);
  }
  to {
    background-color: var(--accent);
    border-color: var(--accent);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tick-draw {
  from {
    stroke-dashoffset: 16;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 899px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .incident-card {
    transform: none;
  }

  .hero-visual {
    padding-inline: 0;
  }

  .dot-grid {
    inset: -2rem calc(var(--gutter) * -1);
  }
}

/* ---------- Reveals (classes added by main.js) ---------- */

.gap.will-reveal,
.feature.will-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease);
}

.feature.will-reveal {
  transform: translateY(16px);
}

.gap.will-reveal.is-in,
.feature.will-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 2. The gap ---------- */

.gap {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gap .gap-quote {
  max-width: 44rem;
  font-family: var(--font-display);
  font-weight: 400;
  margin-inline: auto;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.gap-note {
  max-width: 44rem;
  margin: 1.5rem auto 0;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* ---------- 3. How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
}

.step-rule {
  display: block;
  height: 1px;
  margin: 1.25rem 0 1.25rem;
  background: var(--border-strong);
  transform-origin: left;
}

.step p {
  margin-top: 0.5rem;
  color: var(--ink-muted);
}

.steps.will-reveal .step-rule {
  transform: scaleX(0);
  transition: transform 600ms var(--ease);
}

.steps.will-reveal.is-in .step-rule {
  transform: scaleX(1);
}

.steps.will-reveal .step:nth-child(2) .step-rule {
  transition-delay: 120ms;
}

.steps.will-reveal .step:nth-child(3) .step-rule {
  transition-delay: 240ms;
}

@media (max-width: 767px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- 4. Features ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(3rem, 7vw, 5.5rem);
}

.feature-flip .feature-text {
  order: 2;
}

.feature-text h3 {
  font-size: 1.375rem;
}

.feature-text p {
  margin-top: 0.75rem;
  max-width: 38rem;
  color: var(--ink-muted);
}

.specimen {
  padding: 1.25rem;
  min-width: 0;
}

/* 4a. Blameless check */
.field-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.textarea-mock {
  padding: 0.75rem 0.875rem;
  min-height: 5.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.9375rem;
}

.flagged {
  text-decoration: underline wavy var(--investigating);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

.notice {
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  background: var(--investigating-soft);
  color: var(--investigating);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.notice strong {
  font-weight: 600;
}

/* 4b. Stat tiles */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  background: var(--surface-sunken);
  border-left: 3px solid var(--accent);
  min-width: 0;
}

.stat dt {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.stat-figure {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin: 0.25rem 0;
  white-space: nowrap;
}

.stat-change {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* 4c. Tooling matrix */
.matrix-card {
  padding: 0;
  overflow: hidden;
}

.matrix-scroll {
  overflow-x: auto;
  padding: 1.25rem;
  border-radius: var(--radius);
}

.matrix {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.matrix th {
  text-align: left;
  font-weight: 600;
}

.matrix thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.matrix tbody th,
.matrix td {
  padding: 0.625rem 0.5rem 0.625rem 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.matrix tbody tr:last-child > * {
  border-bottom: 0;
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.none {
  color: var(--text-subtle);
}

/* 4d. Certifications */
.certs {
  display: grid;
  gap: 0.625rem;
}

.cert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  background: var(--surface-sunken);
  font-size: 0.9375rem;
  font-weight: 500;
}

.badge {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.badge-valid {
  background: var(--resolved-soft);
  color: var(--resolved-ink);
}

.badge-soon {
  background: var(--investigating-soft);
  color: var(--investigating);
}

.badge-expired {
  border: 1px solid var(--sev1);
  color: var(--sev1);
}

.cert-expired {
  opacity: 0.55;
}

.cert-expired .cert-name {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

@media (max-width: 899px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature-flip .feature-text {
    order: 0;
  }
}

@media (max-width: 599px) {
  .matrix-scroll {
    padding-right: 4.5rem;
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
    mask-image: linear-gradient(to right, #000 82%, transparent);
  }

  .stat-figure {
    font-size: 2rem;
  }
}

@media (max-width: 479px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ---------- 5. Themes ---------- */

.themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 0.5rem;
}

.theme-card {
  padding: 0.75rem 0.75rem 1.125rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 300ms var(--ease),
    border-color 300ms var(--ease);
}

.theme-card:hover,
.theme-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.theme-card h3 {
  margin: 1rem 0.25rem 0;
}

.theme-desc {
  margin: 0.125rem 0.25rem 0;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.mini {
  border-radius: 9px;
  padding: 0.875rem;
  min-height: 13.5rem;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.4;
}

.mini-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-bottom: 0.625rem;
  margin-bottom: 0.875rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.625rem;
}

.mini-nav span {
  margin-right: auto;
  font-weight: 600;
}

.mini-nav i {
  width: 1.5rem;
  height: 0.25rem;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.35;
}

.mini-name {
  font-size: 1.0625rem;
  font-weight: 600;
}

.mini-head {
  margin-top: 0.25rem;
  opacity: 0.85;
}

.mini-sev {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
}

.mini-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
}

.mini-stat b {
  font-size: 1.25rem;
}

.mini-console {
  background: #0b0f14;
  color: #e6edf3;
  font-family: ui-monospace, Menlo, monospace;
}

.mini-console .mini-nav {
  border-bottom-color: #1f2a37;
}

.mini-console .mini-name {
  color: #3ddc84;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9375rem;
}

.mini-console .mini-sev {
  background: #3a1416;
  color: #ff8a80;
}

.mini-console .mini-stat {
  background: #121923;
  border-left: 2px solid #3ddc84;
}

.mini-console .mini-stat b {
  color: #3ddc84;
}

.mini-paper {
  background: #faf6ee;
  color: #221d17;
  font-family: "Iowan Old Style", Georgia, serif;
}

.mini-paper .mini-nav {
  border-bottom: 2px solid #221d17;
}

.mini-paper .mini-name {
  font-size: 1.25rem;
  font-weight: 400;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #8a3a12;
  display: inline-block;
}

.mini-paper .mini-sev {
  border: 1px solid #8a3a12;
  color: #8a3a12;
}

.mini-paper .mini-stat {
  background: #f1eadc;
}

.mini-paper .mini-stat b {
  color: #8a3a12;
  font-weight: 400;
}

.mini-signal {
  background: #ffffff;
  color: #111827;
  font-family: system-ui, sans-serif;
}

.mini-signal .mini-nav {
  border-bottom-color: #e5e7eb;
}

.mini-signal .mini-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.mini-signal mark {
  background: #f59e0b;
  color: #111827;
  padding-inline: 0.15em;
}

.mini-signal .mini-sev {
  background: #4338ca;
  color: #ffffff;
}

.mini-signal .mini-stat {
  background: #4338ca;
  color: #ffffff;
}

@media (max-width: 767px) {
  .themes {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.5rem var(--gutter) 1rem;
    scroll-padding-inline: var(--gutter);
  }

  .theme-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}

/* ---------- 6. The real app ---------- */

.browser {
  margin-top: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 36px;
  padding-inline: 0.875rem;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.browser-pill {
  margin-inline: auto;
  padding: 0.1rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  transform: translateX(-1.5rem);
}

.browser-frame {
  display: block;
  width: 100%;
  height: min(78vh, 760px);
  border: 0;
  background: var(--surface);
  transition: opacity 600ms var(--ease);
}

.browser-frame.frame-pending {
  opacity: 0;
}

.try-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

@media (max-width: 599px) {
  .browser-frame {
    height: 640px;
  }
}

/* ---------- 7. Yours to keep ---------- */

.files {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.file {
  padding: 1.5rem;
}

.file-icon {
  color: var(--accent);
}

.file-name {
  margin: 1rem 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.file p:last-child {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.privacy p {
  max-width: 44rem;
  font-weight: 500;
}

.shield {
  flex: none;
  color: var(--accent);
}

@media (max-width: 767px) {
  .files {
    grid-template-columns: 1fr;
  }
}

/* ---------- 8. Closing call to action ---------- */

.closing {
  position: relative;
  padding-block: clamp(5rem, 12vw, 10rem);
  background: var(--surface-sunken);
  border-top: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}

.closing-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing h2 {
  max-width: 16ch;
  font-size: clamp(2.75rem, 1.6rem + 5.2vw, 5.75rem);
  line-height: 1.02;
}

.closing h2 em {
  color: var(--accent);
}

.closing-line {
  max-width: 38rem;
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  color: var(--ink-muted);
}

.closing .btn-large {
  margin-top: 2.25rem;
}

.closing-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.closing-rail {
  position: relative;
  width: min(30rem, 100%);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 1;
  pointer-events: none;
}

.closing-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--border-strong);
}

.closing-rail i {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent);
  transition:
    background-color 400ms var(--ease),
    border-color 400ms var(--ease);
}

.closing-rail.will-reveal i {
  background: var(--surface-sunken);
  border-color: var(--border-strong);
}

.closing-rail.will-reveal.is-in i {
  background: var(--accent);
  border-color: var(--accent);
}

.closing-rail i:nth-child(2) {
  transition-delay: 120ms;
}
.closing-rail i:nth-child(3) {
  transition-delay: 240ms;
}
.closing-rail i:nth-child(4) {
  transition-delay: 360ms;
}
.closing-rail i:nth-child(5) {
  transition-delay: 480ms;
}
.closing-rail i:nth-child(6) {
  transition-delay: 600ms;
}
.closing-rail i:nth-child(7) {
  transition-delay: 720ms;
}
.closing-rail i:nth-child(8) {
  transition-delay: 840ms;
}
.closing-rail i:nth-child(9) {
  transition-delay: 960ms;
}

/* ---------- 9. Footer ---------- */

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-small .logo-word {
  font-size: 1.125rem;
}

.footer-row > p {
  flex: 1;
}

.footer-links {
  display: flex;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  color: var(--ink-muted);
  text-underline-offset: 0.25em;
  transition:
    color 200ms var(--ease),
    transform 200ms var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-links {
    margin-left: -0.5rem;
  }
}

/* ---------- Phones ---------- */

@media (max-width: 479px) {
  .hero .btn-row {
    flex-direction: column;
  }

  .hero .btn-row .btn,
  .closing .btn-large {
    width: 100%;
  }

  .header-row .btn {
    width: auto;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-property: color, background-color, border-color !important;
    transition-delay: 0ms !important;
  }
}
