/* ---------- tokens ---------- */
:root {
  --bg: #fbfbf8;
  --surface: #ffffff;
  --text: #1c1f1d;
  --muted: #5d655f;
  --line: #e3e5df;
  --accent: #1f7a4d;        /* fairway green */
  --accent-soft: #e6f2eb;
  --accent-text: #17613d;
  --placeholder: #eef0eb;
  --radius: 10px;
  --maxw: 880px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111412;
    --surface: #181c19;
    --text: #e6e9e5;
    --muted: #9aa39c;
    --line: #2a302c;
    --accent: #4cb883;
    --accent-soft: #1a2a21;
    --accent-text: #7fd3a8;
    --placeholder: #1d221f;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

code { font-family: var(--mono); font-size: 0.85em; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 20px;
}

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

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding-block: 72px 36px;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
}

.subtitle {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--muted);
  margin: 14px auto 26px;
  max-width: 34em;
}

.authors { font-size: 1.1rem; font-weight: 500; margin: 0; }
.authors a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.authors a:hover { border-color: var(--accent); }
.affil { color: var(--muted); margin: 2px 0 0; }
.affil:last-of-type { margin-bottom: 26px; }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-disabled {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  cursor: default;
}
.btn-disabled:hover { transform: none; }

/* ---------- sections ---------- */
section { margin-block: 56px; }

h2 {
  font-size: 1.55rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 14px;
}

h3 { font-size: 1.05rem; margin: 0 0 4px; line-height: 1.35; }

p { margin: 0 0 14px; }

/* ---------- media ---------- */
/* portrait phone video beside the milestone text */
.teaser {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 340px) 1fr;
  gap: 36px;
  align-items: center;
}
.teaser video {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.teaser .milestone { margin-top: 0; }
.teaser-earlier { margin-top: 56px; }
.teaser .caption { text-align: center; margin: 16px 0 0; }

.media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--placeholder);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3 { aspect-ratio: 4 / 3; }

.caption {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  margin: 14px auto 0;
  max-width: 40em;
}
.caption strong { color: var(--text); font-weight: 600; }
.visits { font-family: var(--mono); font-size: 0.78rem; margin-top: 10px; }

/* ---------- milestone ---------- */
.milestone {
  margin-top: 40px;
  padding: 18px 22px;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.milestone p { margin: 0; }
.milestone-tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 4px;
}

/* ---------- diagram ---------- */
.diagram {
  margin: 26px 0 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pipeline {
  display: flex;
  align-items: stretch;
}

.node {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  min-width: 0;
}
.node-stock {
  border-color: var(--muted);
  background: transparent;
}
.node-kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.node-stock .node-kicker { color: var(--muted); }
.node-title { font-weight: 600; line-height: 1.3; }
.node-body { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

.edge {
  flex: 0 0 58px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edge::before {                      /* shaft */
  content: "";
  position: absolute;
  left: 6px; right: 10px; top: 50%;
  height: 1.5px;
  background: var(--muted);
}
.edge::after {                       /* head */
  content: "";
  position: absolute;
  right: 4px; top: 50%;
  border: 5px solid transparent;
  border-left: 7px solid var(--muted);
  border-right: 0;
  transform: translateY(-50%);
}
.edge span {
  position: relative;
  top: -14px;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  white-space: nowrap;
}

.planned {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.planned-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.chip {
  font-size: 0.82rem;
  padding: 3px 10px;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  color: var(--muted);
}

.diagram figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 16px;
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card p { font-size: 0.93rem; color: var(--muted); margin: 0; }
.card-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-text);
  margin-bottom: 8px;
}

/* paragraph that follows the cards */
.cards + p { margin-top: 22px; }

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}
.gallery figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- timeline ---------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 118px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: var(--line);
}
.timeline li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 38px;
  position: relative;
  padding-bottom: 22px;
}
.timeline li::before {                /* dot */
  content: "";
  position: absolute;
  left: 112px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
}
.timeline li.done::before { background: var(--accent); border-color: var(--accent); }
.timeline li.highlight::before { box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline li.next::before { border-color: var(--accent); }
.timeline li.partial::before {        /* half-filled: working, not formally passed */
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, var(--bg) 50%);
}
.timeline li.future { opacity: 0.7; }

.t-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  padding-top: 3px;
}
.t-body p { font-size: 0.95rem; color: var(--muted); margin: 0; }
.highlight .t-body h3 { color: var(--accent-text); }

/* ---------- notice / footer ---------- */
.notice {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.notice h2 { font-size: 1.1rem; margin-bottom: 6px; }
.notice p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.footer {
  padding-block: 28px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- narrow screens ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding-block: 48px 24px; }
  section { margin-block: 44px; }

  .pipeline { flex-direction: column; }
  .edge { flex: 0 0 36px; }
  .edge::before { left: 50%; right: auto; top: 4px; bottom: 10px; width: 1.5px; height: auto; }
  .edge::after {
    left: 50%; right: auto; top: auto; bottom: 3px;
    border: 5px solid transparent;
    border-top: 7px solid var(--muted);
    border-bottom: 0;
    transform: translateX(-50%);
  }
  .edge span { top: 0; left: 44px; transform: translateX(50%); }

  .cards, .gallery { grid-template-columns: 1fr; }
  .teaser { grid-template-columns: 1fr; gap: 24px; }
  .teaser video { max-width: 340px; margin-inline: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }

  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 30px; }
  .timeline li::before { left: 0; }
  .t-date { text-align: left; padding-top: 0; }
}
