/* ZipSched design system: calm control.
   Deep ink, warm ivory, one cobalt accent, amber reserved for collisions.
   Thin rules and soft depth; system fonts, with mono for times and labels. */

:root {
  color-scheme: light;

  --ink: #0f1b2d;
  --ink-2: #16253a;
  --ivory: #f6f2e9;
  --paper: #fffdf8;
  --sand: #eee8db;
  --rule: #ddd5c4;
  --rule-strong: #cbc1ac;
  --muted: #4e5a6c;
  --cobalt: #1f4fd1;
  --cobalt-deep: #183fa8;
  --cobalt-wash: #e6eefc;
  --sky: #9cc3ff;
  --on-ink: #f6f2e9;
  --on-ink-muted: #a9b6c9;
  --amber: #c77a0a;
  --amber-ink: #8a5300;
  --amber-wash: #fcefd6;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 40px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgb(15 27 45 / 0.05), 0 8px 24px -12px rgb(15 27 45 / 0.16);
  --shadow-stage: 0 1px 0 rgb(15 27 45 / 0.04), 0 32px 64px -32px rgb(15 27 45 / 0.28);
  --section-space: clamp(72px, 10vw, 128px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
main { flex: 1 0 auto; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--cobalt-wash); color: var(--ink); }

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

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: 12px; }

.wrap {
  width: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* Type */
h1 {
  font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.875rem, 1.35rem + 2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.eyebrow {
  margin-bottom: 18px;
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.eyebrow-on-dark { color: var(--sky); }

.lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  color: var(--muted);
}

/* Controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.2rem;
  border-radius: 8px;
  background: var(--cobalt);
  color: #fff;
  font-weight: 600;
  font-size: 0.9875rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 6px 16px -8px rgb(31 79 209 / 0.6);
}
.button:hover { background: var(--cobalt-deep); }
.button-small {
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
}

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--rule-strong);
}
.text-link:hover { color: var(--cobalt); text-decoration-color: currentColor; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(246 242 233 / 0.94);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.brand-mark { flex: 0 0 auto; }
.nav-links {
  display: flex;
  gap: 28px;
  margin-right: 12px;
}
.nav-links a {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(48px, 8vw, 104px) clamp(72px, 9vw, 120px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 32px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font: 400 0.8125rem/1.5 var(--mono);
  color: var(--muted);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
}

/* Hero illustration */
.flow { min-width: 0; }
.flow-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-color: var(--sand);
  background-image:
    linear-gradient(to right, rgb(15 27 45 / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(15 27 45 / 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  box-shadow: var(--shadow-stage);
}
.flow-cards { display: grid; gap: 0; min-width: 0; }

.mail,
.suggestion,
.cal,
.q-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.mail { padding: 14px 16px 16px; }
.mail-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.mail-from { font-weight: 600; color: var(--ink); }
.mail-meta .mono { font-size: 0.75rem; }
.mail-subject {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}
.mail-body {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}
.mail-body mark {
  padding: 1px 3px;
  margin-inline: -1px;
  border-radius: 3px;
  color: var(--ink);
  background-color: transparent;
  background-image: linear-gradient(var(--cobalt-wash), var(--cobalt-wash));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.flow-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 18px 14px;
  font-size: 0.6875rem;
  color: var(--muted);
}
.flow-step::before {
  content: "";
  position: absolute;
  left: 18px; top: 0; bottom: 0;
  border-left: 1px dashed var(--rule-strong);
}
.flow-dot {
  position: relative;
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 0 0 3px var(--sand);
}

.suggestion {
  padding: 14px 16px 16px;
  border-color: rgb(31 79 209 / 0.35);
  box-shadow: inset 3px 0 0 var(--cobalt), 0 1px 2px rgb(15 27 45 / 0.05), 0 18px 36px -18px rgb(31 79 209 / 0.35);
}
.suggestion-top,
.q-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.state { display: inline-grid; justify-items: end; }
.state > span { grid-area: 1 / 1; }
.state-pending,
.state-approved,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.state-pending,
.pill {
  background: var(--sand);
  color: var(--muted);
}
.state-pending { opacity: 0; }
.state-approved,
.pill-done {
  background: var(--cobalt);
  color: #fff;
}
.suggestion-title {
  margin-top: 10px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.suggestion-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.suggestion-meta dt {
  font: 500 0.625rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.suggestion-meta dd { margin-top: 2px; font-size: 0.8125rem; }
.suggestion-meta dd.mono { font-size: 0.75rem; }

.source {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
  margin-top: 12px;
  padding: 4px 9px 4px 7px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--ivory);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}
.source svg { flex: 0 0 auto; margin-top: 1px; color: var(--cobalt); }
.source span { min-width: 0; }

/* Calendar column */
.cal {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: hidden;
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--muted);
}
.cal-head .mono { font-size: 0.6875rem; }
.cal-day b { margin-left: 2px; font-weight: 600; color: var(--ink); }
.cal-grid {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: repeat(20, minmax(13px, 1fr));
  flex: 1 1 auto;
  padding: 8px 10px 12px 8px;
}
.cal-hour {
  grid-column: 1 / -1;
  grid-row: var(--row);
  margin-top: -1px;
  border-top: 1px solid var(--rule);
  font-size: 0.625rem;
  line-height: 1;
  padding-top: 3px;
  color: var(--muted);
}
.cal-event {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: var(--start) / var(--end);
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 1px 0 1px 4px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgb(15 27 45 / 0.06);
  box-shadow: inset 2px 0 0 rgb(15 27 45 / 0.32);
  font-size: 0.6875rem;
  line-height: 1.25;
  color: var(--ink);
  overflow: hidden;
}
.cal-event span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event .mono { flex: 0 0 auto; font-size: 0.625rem; color: var(--muted); }
.cal-hold {
  background: var(--cobalt-wash);
  box-shadow: inset 3px 0 0 var(--cobalt), 0 0 0 1px rgb(31 79 209 / 0.3);
  color: var(--cobalt-deep);
  font-weight: 600;
}
.cal-hold .mono { color: var(--cobalt-deep); }

.flow-caption {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.flow-caption-on-dark { color: var(--on-ink-muted); }

/* Sections */
.section {
  padding-block: var(--section-space);
  border-top: 1px solid var(--rule);
}
.band + .section,
.principals + .section { border-top: 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-lede {
  margin-top: 18px;
  font-size: 1.125rem;
  color: var(--muted);
}

/* Problem */
.problem-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  counter-reset: problem;
}
.problem-list li {
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  counter-increment: problem;
}
.problem-list li::before {
  content: counter(problem, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  font: 500 0.75rem/1 var(--mono);
  color: var(--muted);
}
.problem-list p { margin-top: 8px; color: var(--muted); }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.steps li {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--rule-strong);
}
.steps li::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: inset 0 0 0 2px var(--cobalt);
}
.steps li:last-child::before { background: var(--cobalt); }
.step-index {
  display: block;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: var(--cobalt);
}
.steps p { margin-top: 8px; color: var(--muted); }

/* Dark band with the review queue */
.band {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: var(--section-space);
}
.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.band h2 { color: var(--on-ink); }
.points { margin-top: 36px; }
.points > div {
  padding-block: 18px;
  border-top: 1px solid rgb(246 242 233 / 0.14);
}
.points > div:last-child { border-bottom: 1px solid rgb(246 242 233 / 0.14); }
.points dt { font-weight: 600; }
.points dd { margin-top: 4px; color: var(--on-ink-muted); }

.queue { min-width: 0; }
.queue-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgb(246 242 233 / 0.1);
  border-radius: 16px;
  background: var(--ink-2);
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.6);
}
.queue-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 4px 6px;
  font-weight: 600;
  font-size: 0.875rem;
}
.queue-head .mono { font-weight: 400; font-size: 0.75rem; color: var(--on-ink-muted); }

.q-card { padding: 14px 16px 16px; color: var(--ink); }
.q-card-conflict { box-shadow: inset 3px 0 0 var(--amber), var(--shadow-card); }
.q-title {
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}
.q-when { margin-top: 2px; font-size: 0.75rem; color: var(--muted); }
.q-note { margin-top: 10px; font-size: 0.75rem; color: var(--muted); }

.overlap { margin-top: 12px; }
.overlap-ruler {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  color: var(--muted);
}
.overlap-track {
  position: relative;
  height: 46px;
  margin-top: 4px;
  border-radius: 4px;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--rule) calc(50% - 0.5px), var(--rule) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to left, var(--rule) 1px, transparent 1px);
}
.overlap-bar {
  position: absolute;
  z-index: 1;
  left: 25%;
  height: 19px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.625rem;
  line-height: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.overlap-existing {
  top: 2px;
  width: 25%;
  background: rgb(15 27 45 / 0.08);
  box-shadow: inset 2px 0 0 rgb(15 27 45 / 0.32);
}
.overlap-new {
  top: 25px;
  width: 50%;
  background: rgb(230 238 252 / 0.85);
  border: 1px dashed var(--cobalt);
  line-height: 17px;
  color: var(--cobalt-deep);
}
.overlap-zone {
  position: absolute;
  left: 25%;
  width: 25%;
  top: -2px; bottom: -2px;
  border-inline: 1px solid var(--amber);
  background: repeating-linear-gradient(135deg, rgb(199 122 10 / 0.22) 0 3px, transparent 3px 7px);
}
.collision {
  margin-top: 12px;
  font-size: 0.8125rem;
}
.collision-flag {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--amber-wash);
  color: var(--amber-ink);
  font: 600 0.625rem/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.move {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--rule-strong);
  border-radius: 6px;
  font-size: 0.8125rem;
}
.move .mono {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.times li {
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--ivory);
  font-size: 0.75rem;
}

/* Capabilities */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tiles li {
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
}
.tile-icon { margin-bottom: 20px; color: var(--cobalt); }
.tiles p { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }

.boundaries {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr);
  gap: 16px 32px;
  margin-top: 48px;
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
}
.boundaries-title { font-size: 1.0625rem; }
.boundaries ul { display: grid; gap: 12px; }
.boundaries li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}
.boundaries li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.8em;
  width: 10px;
  border-top: 1px solid var(--ink);
}
.boundaries strong { font-weight: 600; color: var(--ink); }

/* For principals */
.principals {
  padding-block: var(--section-space);
  background: var(--sand);
  border-block: 1px solid var(--rule);
}
.principals-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.principals .section-head { margin-bottom: 0; }
.principal-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 32px;
}
.principal-points > div {
  padding-top: 16px;
  border-top: 1px solid var(--rule-strong);
}
.principal-points dt { font-weight: 600; }
.principal-points dd { margin-top: 6px; color: var(--muted); }

/* Founder */
.founder {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  max-width: 880px;
}
.founder-photo {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--sand);
}
.founder-copy .eyebrow { margin-bottom: 10px; }
.founder-copy h2 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem); }
.founder-copy p:not(.eyebrow) { margin-top: 14px; max-width: 62ch; color: var(--muted); }

/* Closing call to action */
.closing { padding-bottom: var(--section-space); }
.closing-inner {
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 3px 0 var(--ink);
}
.closing-inner p { margin-top: 14px; max-width: 36em; font-size: 1.125rem; color: var(--muted); }
.closing .hero-actions { margin-top: 28px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-block: 28px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.footer-links a:hover { color: var(--ink); }

/* Privacy page */
.policy { padding-block: clamp(56px, 9vw, 112px) var(--section-space); }
.policy h1 { max-width: 14em; }
.policy-card {
  max-width: 760px;
  margin-top: clamp(32px, 5vw, 48px);
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--cobalt);
}
.policy-card strong { display: block; font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.policy-card p { margin-top: 12px; color: var(--muted); }
.policy-card a { color: var(--cobalt); text-underline-offset: 3px; }

/* Responsive */
@media (min-width: 981px) and (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
  .flow-stage { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); padding: 14px; gap: 12px; }
}

@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}

@media (max-width: 980px) {
  :root { --gutter: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 640px; }
  .flow { max-width: 640px; }
  .band-inner,
  .principals-inner { grid-template-columns: minmax(0, 1fr); }
  .band-copy,
  .queue { max-width: 640px; }
  .principals .section-head { margin-bottom: 8px; }
  .problem-list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .boundaries { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .principal-points { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 76px; }
  .nav { min-height: 60px; gap: 12px; }
  .steps,
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 32px; }
  .flow-stage { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .flow-step { padding-block: 14px; }
  .cal-grid { grid-template-rows: repeat(20, 13px); }
  .cal-event { flex-direction: row; justify-content: space-between; gap: 6px; }
  .founder { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .founder-photo { width: 96px; height: 96px; }
}

@media (max-width: 400px) {
  .brand { font-size: 1rem; gap: 8px; }
  .button-small { padding: 0.5rem 0.7rem; font-size: 0.8125rem; }
  .mail, .suggestion, .q-card { padding-inline: 13px; }
}

/* Motion: the hero sequence plays once, in about four seconds, when the
   illustration first scrolls into view (script.js adds .is-playing), and rests
   on the same frame shown without JavaScript or with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button { transition: background-color 0.15s ease; }

  .js .flow:not(.is-playing) :is(.mail, .flow-step, .suggestion, .cal-hold) { opacity: 0; }
  .js .flow.is-playing .mail { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
  .js .flow.is-playing .mail-body mark { animation: highlight 0.7s ease-out 0.95s both; }
  .js .flow.is-playing .flow-step { animation: fade 0.4s ease 1.4s both; }
  .js .flow.is-playing .suggestion { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.7s both; }
  .js .flow.is-playing .state-pending { animation: pending 1.3s linear 1.7s both; }
  .js .flow.is-playing .state-approved { animation: pop 0.35s ease-out 3s both; }
  .js .flow.is-playing .cal-hold { animation: land 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 3.3s both, ring 0.9s ease-out 3.8s both; }

  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes highlight { from { background-size: 0% 100%; } }
  @keyframes pending { 0%, 82% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes pop { from { opacity: 0; transform: scale(0.9); } }
  @keyframes land { from { opacity: 0; transform: translateY(-8px); } }
  @keyframes ring {
    from { box-shadow: inset 3px 0 0 var(--cobalt), 0 0 0 1px rgb(31 79 209 / 0.3), 0 0 0 0 rgb(31 79 209 / 0.35); }
    to { box-shadow: inset 3px 0 0 var(--cobalt), 0 0 0 1px rgb(31 79 209 / 0.3), 0 0 0 8px rgb(31 79 209 / 0); }
  }
}
