:root {
  color-scheme: dark;
  --page: #171a18;
  --surface: #202421;
  --line: #3e4740;
  --text: #f0f3ef;
  --muted: #aeb8af;
  --cyan: #00afff;
  --cyan-deep: #0087af;
  --green: #5fd700;
  --green-deep: #3f7400;
  --mono: "DejaVu Sans Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 70px rgb(0 0 0 / 40%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 300px;
  margin: 0;
  background:
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px),
    var(--page);
  background-size: 42px 42px;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a { color: var(--cyan); }

.wrap {
  width: min(1320px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  transform: translateY(-150%);
  background: #fff;
  color: #111;
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
  background: rgb(23 26 24 / 90%);
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.prompt-brand {
  display: inline-flex;
  min-width: 0;
  align-items: stretch;
  color: #fff;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  line-height: 34px;
  text-decoration: none;
  white-space: nowrap;
}

.seg {
  display: inline-block;
  padding: 0 17px 0 16px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}

.seg:first-child {
  padding-left: 11px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.seg + .seg { margin-left: -7px; }
.seg-mark { background: #005f87; }
.seg-cat { display: inline-flex; align-items: center; }
.seg-cat svg { width: 20px; height: 20px; fill: var(--text); }
.seg-cat circle { fill: #005f87; }
.seg-cat .cat-mouth { fill: none; stroke: #005f87; stroke-linecap: round; stroke-width: 3; }
.seg-dir { background: var(--cyan-deep); }
.seg-mode { background: var(--green-deep); }

.sequence-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .7rem;
  white-space: nowrap;
}

.sequence-count span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgb(95 215 0 / 12%);
}

.intro {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: clamp(56px, 9vw, 104px) 0 clamp(38px, 6vw, 64px);
}

.kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.kicker span { color: var(--green); }

h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -.065em;
}

.intro .lede {
  max-width: 24ch;
  margin: 18px 0 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(1.18rem, 3vw, 1.65rem);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.intro .summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.story {
  width: min(100%, 760px);
  margin-inline: auto;
}

.story-item {
  margin: 0 0 clamp(60px, 10vw, 112px);
  scroll-margin-top: 90px;
}

.story-item figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.story-item figcaption::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.story-item figcaption span { color: var(--green); }

.story-item picture,
.story-item img,
.story-item video {
  display: block;
  width: 100%;
}

.story-item img,
.story-item video {
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story-video {
  width: min(100%, 540px);
  margin-inline: auto;
}

.story-video video {
  aspect-ratio: 9 / 16;
  background: #090b09;
  object-fit: contain;
}

.site-footer {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .wrap { width: min(100% - 20px, 760px); }
  .site-header { position: relative; }
  .topbar { min-height: 58px; }
  .seg-mode { display: none; }
  .sequence-count { font-size: 0; }
  .sequence-count span { width: 9px; height: 9px; }
  .intro { padding-top: 44px; }
  .story-item figcaption { margin-inline: 2px; }
  .story-item img, .story-item video { border-radius: 7px; }
}

@media (max-width: 390px) {
  .seg { padding-right: 14px; }
  .topbar { gap: 10px; }
}

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