:root {
  --ink: #0b1f3a;
  --rail: #8ed3f5;
  --orange: #f15a29;
  --paper: #f7f9fc;
  --navy: #0b1f3a;
  --teal: #0170b9;
  --leather: #7a8074;
  --muted: #5c6770;
  --cream: #f4f1ea;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06);
}

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

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: #fff;
  color: #1a2433;
  font-family: "Literata", Georgia, "Iowan Old Style", serif;
  font-size: 1.0625rem;
  line-height: 1.58;
}

img { max-width: 100%; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  color: var(--navy);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus { top: 0.6rem; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #0b1f3a;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(143, 184, 200, 0.22);
}

.mark {
  display: flex;
  line-height: 0;
  border-radius: 8px;
}

.mark img { border-radius: 8px; }

.eyebrow {
  margin: 0;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--rail);
}

.top nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
}

.top nav a {
  text-decoration: none;
  color: #d9d3c7;
}

.top nav a:hover,
.top a:focus-visible {
  color: white;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 1.25rem;
}


.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem 2rem;
  align-items: start;
  padding: 2.4rem 0 1.2rem;
}

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

.portrait {
  margin: 0;
  width: fit-content;
  background: #fff;
  color: var(--navy);
  padding: 0.5rem 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(11, 31, 58, 0.14);
}

.portrait img {
  display: block;
  width: 210px;
  height: auto;
  border-radius: 3px;
}

.portrait figcaption {
  margin: 0.45rem 0 0;
  text-align: center;
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--navy);
}

.kicker {
  margin: 0;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

h1 {
  margin: 0.25rem 0 0.7rem;
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 5.2vw, 4.6rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h1 em {
  font-style: normal;
  color: var(--orange);
}

.lede {
  margin: 0;
  max-width: 38rem;
  color: #243044;
  font-size: 1.12rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 1rem 0 0;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.92rem;
}

.links a {
  color: var(--teal);
  font-size: 1rem;
  text-underline-offset: 0.22em;
}

.map { padding-top: 1.5rem; }

.map-head h2 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.map-head p {
  margin: 0.35rem 0 1.4rem;
  color: var(--muted);
  max-width: 40rem;
}

.track {
  --spine: 28px;
  position: relative;
}

.track::before {
  content: "";
  position: absolute;
  left: calc(var(--spine) - 5px);
  top: 0.35rem;
  bottom: 0.2rem;
  width: 10px;
  border-radius: 8px;
  background: var(--rail);
  z-index: 0;
}

.track::after {
  content: "";
  position: absolute;
  left: calc(var(--spine) - 14px);
  bottom: 0;
  width: 28px;
  height: 7px;
  border-radius: 2px;
  background: var(--leather);
  z-index: 1;
}

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

.stop {
  position: relative;
  padding: 0 0 1.85rem 4.35rem;
}

.stop::before {
  content: "";
  position: absolute;
  left: calc(var(--spine) - 13px);
  top: 0.95rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper);
  border: 6px solid var(--rail);
  box-shadow: 0 0 0 5px var(--ink);
  z-index: 3;
}

.stop.dest::before {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 5px var(--ink);
}

.train {
  position: absolute;
  left: calc(var(--spine) - 20px);
  width: 40px;
  height: 84px;
  z-index: 2;
  animation: climb 22s linear infinite;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
}

.train svg { display: block; }

@keyframes climb {
  0% { top: calc(100% - 92px); opacity: 0; }
  5% { opacity: 1; }
  88% { top: 0; opacity: 1; }
  96% { top: 0; opacity: 0; }
  100% { top: calc(100% - 92px); opacity: 0; }
}

.plaque {
  background: var(--paper);
  color: #1a2433;
  border-radius: 16px;
  padding: 1.15rem 1.3rem 1.2rem;
  box-shadow: var(--shadow);
}

.stop.dest .plaque {
  outline: 2px solid rgba(241, 90, 41, 0.85);
  outline-offset: 0;
}

.when {
  margin: 0;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.code {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.05rem 0.38rem 0;
  border-radius: 3px;
  background: var(--navy);
  color: var(--paper);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.stop.dest .code { background: var(--orange); }

.plaque h3 {
  margin: 0.35rem 0 0.95rem;
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
}

.plaque h3 span {
  display: block;
  margin-top: 0.5rem;
  font-family: "Literata", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--teal);
}

.plaque h4 {
  margin: 1rem 0 0.2rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.plaque p { margin: 0.45rem 0; }

.plaque ul {
  margin: 0.4rem 0 0.2rem;
  padding-left: 1.15rem;
}

.plaque li { margin: 0.28rem 0; }
.plaque li::marker { color: var(--teal); }

.plaque a {
  color: var(--teal);
  text-underline-offset: 0.15em;
}

.plaque a:hover { color: var(--navy); }

.state {
  font-size: 0.98rem;
  color: #3d4a58;
}

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 0.9rem;
}

.frame-label {
  margin: 0 0 0.35rem;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}

.shot { margin: 0.9rem 0 0; }

.shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  border: 1px solid rgba(28, 51, 84, 0.14);
  background: white;
}

.shot-tall img {
  aspect-ratio: auto;
  height: auto;
  object-fit: unset;
}

.origin .shot img { aspect-ratio: 16 / 8; }

.shot figcaption,
.portrait figcaption {
  font-style: normal;
}

.shot figcaption {
  margin-top: 0.4rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--muted);
}

footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
  color: var(--muted);
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.88rem;
}

footer p { margin: 0.25rem 0; }

footer a { color: var(--teal); }

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

@media (max-width: 740px) {
  .hero { grid-template-columns: 1fr; padding: 1.1rem 0 0.35rem; }
  .portrait { margin-inline: auto; }
  .portrait img { width: min(132px, 42vw); }
  .map { padding-top: 0.4rem; }
  body:not(.ba) > main { min-height: 0; }
  .top { flex-wrap: wrap; padding: 0.55rem 0.8rem; }
  .top nav {
    margin-left: 0;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.8rem;
  }
  .top nav a { flex: 0 0 auto; padding: 0.4rem 0.1rem; }
  .track { --spine: 16px; }
  .stop { padding-left: 2.7rem; }
  h1 { font-size: clamp(2.45rem, 11vw, 3.2rem); }
}

.loop {
  margin: 1rem 0 0.4rem;
  padding: 0.85rem 0.9rem 0.7rem;
  border-radius: 12px;
  background: #e8eef6;
}

.loop-label {
  margin: 0 0 0.55rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.loop-row {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 0.2rem 0.6rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.loop-row span:first-child {
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
}

.loop-row em {
  grid-column: 2;
  font-size: 0.82rem;
  color: var(--muted);
}

.bar {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: rgba(28, 51, 84, 0.08);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #9aa3ad;
  animation: fillwait 2.8s ease forwards;
}

.bar.split { display: flex; gap: 3px; background: transparent; }
.bar.split i { flex: 1; width: auto; border-radius: 7px; transform-origin: left center; animation: grow 2.4s ease forwards; }
.bar.split i:nth-child(1) { background: var(--navy); animation-delay: 0.15s; }
.bar.split i:nth-child(2) { background: var(--teal); animation-delay: 0.45s; }
.bar.split i:nth-child(3) { background: var(--orange); animation-delay: 0.75s; }

@keyframes fillwait { to { width: 100%; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.chips { list-style: none; padding: 0; margin: 0.8rem 0 0.2rem; }
.chips li {
  margin: 0.35rem 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--teal);
}

/* Meetup scanner. Tonight is an instrument: one orange key at a time, big type, short motion. */
.meet {
  width: min(720px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0.9rem 0 3rem;
}
.meet-page .top nav { margin-left: auto; }
@media (max-width: 520px) {
  .meet-page .top { flex-wrap: nowrap; }
  .meet-page .top nav { display: none; }
}

.modes {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0 0 0.9rem;
  border-radius: 999px;
  background: var(--cream);
}
.modes button, .primary, .ghost, .mic, .save, .read, .link {
  font-family: "Outfit", "Avenir Next", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.modes button {
  min-height: 44px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(11, 31, 58, 0.62);
  font-size: 1rem;
  font-weight: 500;
}
.modes button[aria-pressed="true"] { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 3px rgba(11, 31, 58, 0.16); }

.primary {
  min-height: 60px;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 16px;
  background: var(--orange);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
}
.primary:active, .save:active, .read:active { transform: scale(0.98); }
.link {
  min-height: 44px;
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 500;
}
.link:disabled { opacity: 0.5; }

/* Gate */
.gate {
  display: grid;
  gap: 0.75rem;
  max-width: 26rem;
  margin: 12vh auto 0;
  text-align: center;
}
.gate .lock {
  justify-self: center;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.7;
  stroke-linejoin: round;
}
.gate label {
  font: 600 1.5rem/1.2 "Outfit", "Avenir Next", sans-serif;
  color: var(--navy);
}
.gate input {
  width: 100%;
  min-height: 64px;
  padding: 0 1rem;
  border: 2px solid rgba(11, 31, 58, 0.18);
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font: 500 1.4rem "Outfit", "Avenir Next", sans-serif;
  text-align: center;
}
.gate input:focus { outline: none; border-color: var(--navy); }
.gate .primary { width: 100%; }

/* The instrument: place line on top, then the capture key, then the person. */
.instrument {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(11, 31, 58, 0.08), 0 16px 40px rgba(11, 31, 58, 0.12);
}
.instrument #entry { padding: 1.1rem; }

.place-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 0.8rem;
  padding: 0.7rem 0.7rem 0.75rem 1.1rem;
  background: var(--navy);
  color: var(--cream);
}
.place-line .pin {
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
}
.place-line label {
  grid-column: 2;
  font: 600 0.7rem/1.2 "Outfit", "Avenir Next", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.6);
}
.place-line input {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.1rem 0 0.2rem;
  font: 600 1.3rem/1.3 "Outfit", "Avenir Next", sans-serif;
  color: var(--cream);
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(244, 241, 234, 0.2);
  border-radius: 0;
  text-overflow: ellipsis;
}
.place-line input::placeholder { color: rgba(244, 241, 234, 0.45); font-weight: 500; }
.place-line input:focus { outline: none; border-bottom-color: var(--orange); }
.locate {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, 0.26);
  background: rgba(244, 241, 234, 0.06);
  color: var(--cream);
  cursor: pointer;
}
.locate svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.locate:active { background: var(--teal); border-color: var(--teal); }
.locate.busy { cursor: progress; }
.locate.busy svg { animation: meet-spin 1.1s linear infinite; color: var(--orange); }
.locate:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.status.place-status {
  grid-column: 2 / -1;
  grid-row: 3;
  margin: 0.35rem 0 0;
  color: var(--cream);
  opacity: 0.85;
}

/* Capture: one big key. Retake and Read it appear once there is a photo. */
.capture {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
.capture input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  border-radius: 18px;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.file-btn.shoot {
  min-height: 132px;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--cream);
  color: var(--navy);
  font-size: 1.45rem;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.file-btn.shoot svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.file-btn.shoot:active { transform: scale(0.99); }
.instrument[data-stage="shoot"] .file-btn.shoot { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(241, 90, 41, 0.28); }
.instrument .when-taken { display: none; }
.instrument.has-photo .when-empty { display: none; }
.instrument.has-photo .when-taken { display: inline; }
.instrument.has-photo .file-btn.shoot { min-height: 64px; flex-direction: row; font-size: 1.1rem; }
.instrument.has-photo .file-btn.shoot svg { width: 26px; height: 26px; }

.capture-alt { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.file-btn.quiet { min-height: 44px; padding: 0 0.3rem; color: var(--teal); font-size: 1rem; font-weight: 500; }
.instrument.has-photo .file-btn.quiet { display: none; }
.read {
  display: none;
  flex: 1;
  min-height: 64px;
  border: 2px solid var(--navy);
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 600;
}
.instrument.has-photo .read { display: block; }
.instrument[data-stage="read"] .read { background: var(--orange); border-color: var(--orange); color: #fff; }
.read:disabled { opacity: 0.6; cursor: progress; }
.instrument.has-photo .capture { grid-template-columns: 1fr 1fr; }
.instrument.has-photo .capture-alt { grid-column: 2; grid-row: 1; }

.preview {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 14px;
  background: var(--cream);
}

#read-status { margin: 0.8rem 0 0; }

/* The person: a name you can read across a table, then the small facts. */
.fields { display: grid; gap: 0.6rem; margin-top: 1rem; }
.fields input, .fields textarea {
  width: 100%;
  min-height: 56px;
  padding: 0.7rem 0.9rem;
  border: 0;
  border-radius: 14px;
  background: #f7f6f2;
  color: var(--navy);
  font: 500 1.15rem/1.35 "Outfit", "Avenir Next", sans-serif;
  box-shadow: inset 0 0 0 1px rgba(11, 31, 58, 0.08);
}
.fields input::placeholder, .fields textarea::placeholder { color: rgba(11, 31, 58, 0.4); }
.fields input:focus, .fields textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--teal); }
.fields input.name { min-height: 68px; font-size: 1.7rem; font-weight: 600; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.fields textarea { min-height: 96px; resize: none; }
.note-row { display: flex; gap: 0.6rem; align-items: stretch; }
.note-row textarea { flex: 1; }
.mic {
  display: grid;
  place-items: center;
  width: 64px;
  border: 0;
  border-radius: 14px;
  background: #f7f6f2;
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(11, 31, 58, 0.08);
}
.mic svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.mic[aria-pressed="true"] { background: var(--teal); color: #fff; }
#mic-status { margin: 0; }

.save-row { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.save {
  flex: 1;
  min-height: 64px;
  border: 2px solid rgba(11, 31, 58, 0.2);
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 600;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.instrument[data-stage="save"] .save { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(241, 90, 41, 0.28); }

/* Saved: the check draws, then Scan again. Nothing else on the screen asks for a tap. */
.saved {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 3rem 1.1rem 2.6rem;
}
.saved .check { width: 140px; height: 140px; }
.saved .ring, .saved .tick { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.saved .ring {
  stroke: var(--teal);
  stroke-width: 5;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transform: rotate(-90deg);
  transform-origin: 48px 48px;
  animation: meet-draw 0.16s ease-out forwards;
}
.saved .tick {
  stroke: var(--orange);
  stroke-width: 8;
  stroke-dasharray: 56;
  stroke-dashoffset: 56;
  animation: meet-draw 0.1s 0.12s ease-out forwards;
}
.saved-name {
  margin: 0;
  font: 500 1.15rem/1.3 "Outfit", "Avenir Next", sans-serif;
  color: rgba(11, 31, 58, 0.7);
  text-align: center;
}
.saved-name:empty { display: none; }
.saved .again {
  width: min(100%, 360px);
  min-height: 72px;
  margin-top: 0.8rem;
  font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(241, 90, 41, 0.3);
  animation: meet-rise 0.12s 0.12s ease-out both;
}
.saved .again:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
#desk.is-saved .meet-book { display: none; }

/* The book: quiet, below the instrument. */
.meet-book { margin-top: 1.6rem; padding: 0 0.3rem; }
.book-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; }
.meet-book h2 {
  margin: 0;
  font: 600 1rem/1.3 "Outfit", "Avenir Next", sans-serif;
  color: var(--navy);
}
.meet-book h2 span { color: rgba(11, 31, 58, 0.5); font-weight: 500; }
.meet-book.empty .export-row { display: none; }
.export-row { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.quiet { margin: 0.2rem 0; font-family: "Outfit", "Avenir Next", sans-serif; color: rgba(11, 31, 58, 0.45); }
.person { padding: 0.8rem 0 0.3rem; border-top: 1px solid rgba(11, 31, 58, 0.1); }
.person:first-child { margin-top: 0.4rem; }
.person h3 { margin: 0; font: 600 1.2rem/1.3 "Outfit", "Avenir Next", sans-serif; color: var(--navy); }
.person p { margin: 0.15rem 0; font-size: 0.98rem; }
.person .meta { font-family: "Outfit", "Avenir Next", sans-serif; color: rgba(11, 31, 58, 0.6); }
.person .row-actions { display: flex; gap: 1.2rem; }
.social {
  margin-top: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: #e8eef6;
  border-radius: 12px;
}
.social li { margin: 0.25rem 0; }

/* Imagine keeps the longer pitch. */
.pitch { margin: 0.4rem 0 1rem; }
.pitch .pitch-title {
  margin: 0.2rem 0 0.4rem;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy);
}
.panel {
  background: #fff;
  color: #1a2433;
  border-radius: 16px;
  border: 1px solid rgba(11, 31, 58, 0.12);
  padding: 1rem;
  margin-bottom: 0.8rem;
}
.panel h2, .panel h3 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 0.95;
  margin: 0.2rem 0 0.55rem;
}
.panel h2 { font-size: clamp(2rem, 5vw, 2.8rem); }
.panel h3 { font-size: 1.45rem; margin-top: 1rem; }

.pipe {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.2fr;
  gap: 0.4rem;
  align-items: center;
  margin: 1rem 0;
}
.pipe .node {
  background: #e8eef6;
  border-radius: 12px;
  padding: 0.7rem;
  min-height: 4.5rem;
}
.pipe .node strong {
  display: block;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pipe .arrow {
  width: 36px;
  height: 0;
  border-top: 3px solid var(--teal);
  position: relative;
}
.pipe .arrow::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  top: -5.5px;
  left: 0;
  animation: ride 1.4s ease-in-out infinite;
}
.pipe .arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -7px;
  border: 6px solid transparent;
  border-left: 9px solid var(--orange);
}
.fork { display: grid; gap: 0.4rem; }
.fork span {
  display: block;
  background: white;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.95rem;
  line-height: 1.3;
}

.status { font: 500 1rem/1.35 "Outfit", "Avenir Next", sans-serif; color: var(--teal); }
.status:empty { display: none; }
.hidden { display: none !important; }

@media (max-width: 520px) {
  .instrument #entry { padding: 0.9rem; }
  .file-btn.shoot { min-height: 116px; }
  .duo { grid-template-columns: 1fr; }
  .fields input.name { font-size: 1.5rem; }
  .gate { margin-top: 8vh; }
}

@keyframes meet-draw { to { stroke-dashoffset: 0; } }
@keyframes meet-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes meet-spin { to { transform: rotate(360deg); } }

@keyframes ride { from { transform: translateX(0); } to { transform: translateX(24px); } }
@keyframes drop { from { transform: translateY(0); } to { transform: translateY(12px); } }

@media (max-width: 740px) {
  .pipe { grid-template-columns: 1fr; }
  .pipe .arrow {
    width: 0;
    height: 22px;
    border-top: 0;
    border-left: 3px solid var(--teal);
    justify-self: center;
  }
  .pipe .arrow::before {
    top: 0;
    left: -5.5px;
    animation-name: drop;
  }
  .pipe .arrow::after {
    right: auto;
    left: -7.5px;
    top: auto;
    bottom: -7px;
    border: 6px solid transparent;
    border-top: 9px solid var(--orange);
    border-left-color: transparent;
  }
  .loop-row { grid-template-columns: 5.2rem 1fr; }
}

.line {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.15rem 0 0.4rem 1.85rem;
}

.line::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 1.15rem;
  bottom: 1.15rem;
  width: 4px;
  border-radius: 4px;
  background: #d5dbe3;
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "mark name open"
    "note note note";
  column-gap: 0.95rem;
  row-gap: 0.55rem;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 1rem 1.15rem 1.1rem;
  text-decoration: none;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(11, 31, 58, 0.12);
  border-radius: 16px;
}

.station::before {
  content: "";
  position: absolute;
  left: -1.62rem;
  top: 1.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 3px #fff;
}

.station.near {
  box-shadow: inset 4px 0 0 var(--orange);
}

.station.near::before {
  background: var(--orange);
  border-color: white;
}

a.station:hover { background: #f7f9fc; }

.station .code,
.station .logo { grid-area: mark; }

.station .name { grid-area: name; min-width: 0; }

.station .open {
  grid-area: open;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}

a.station:hover .open { color: var(--orange); }

.station .logo {
  display: block;
  width: 108px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(11, 31, 58, 0.12);
}

.station .logo.cn {
  width: 128px;
  height: 56px;
  background: #ed1b2d;
  border-color: #ed1b2d;
}

.station .logo.word { width: 188px; height: 48px; }

.station .logo:not(.cn):not(.word) { width: 56px; height: 56px; padding: 3px; }

.station .note {
  grid-area: note;
  margin: 0.1rem 0 0;
  font-size: 1.02rem;
  line-height: 1.5;
  color: #1a2433;
}

.station .code {
  min-width: 3.2rem;
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: white;
  background: var(--navy);
  border-radius: 8px;
  padding: 0.4rem 0.35rem;
}

.station.here .code { background: var(--orange); }

.station strong {
  display: block;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.95;
}

.station em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (min-width: 741px) {
  .line { gap: 1rem; }
  .station {
    padding: 1.15rem 1.35rem 1.25rem;
  }
  .station .note { font-size: 1.08rem; line-height: 1.55; }
  .station strong { font-size: 2rem; }
  .station .logo.cn { width: 148px; height: 64px; }
  .station .logo.word { width: 220px; height: 56px; }
  .station .logo:not(.cn):not(.word) { width: 68px; height: 68px; }
}

@media (max-width: 740px) {
  .line { padding-left: 1.45rem; gap: 0.7rem; }
  .station {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "mark name"
      "open open"
      "note note";
    padding: 0.85rem 0.9rem 0.95rem;
  }
  .station::before { left: -1.28rem; top: 1.15rem; }
  .station .open { justify-self: start; }
  .station .logo.cn { width: 108px; height: 48px; }
  .station .logo.word { width: 148px; height: 40px; }
  .station strong { font-size: 1.45rem; }
  .station .note { font-size: 0.98rem; line-height: 1.45; }
}

.sheet {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.2rem auto 3rem;
  background: #fff;
  color: #1a2433;
  padding: 0.4rem 0 1.6rem;
}
.sheet .logo { display: block; width: 140px; height: auto; margin: 0.2rem 0 0.7rem; }
.sheet .kicker { color: var(--teal); }
.sheet h1 {
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin: 0.15rem 0 0.7rem;
}
.sheet h2 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
  font-size: 1.6rem;
  margin: 1.1rem 0 0.3rem;
}
.sheet .shot { margin: 1rem 0; }
.sheet .shot img { width: 100%; border-radius: 10px; display: block; }

body.ba {
  min-height: 100vh;
}
body.ba main {
  width: min(1080px, calc(100% - 2rem));
  margin: 1rem auto 2.5rem;
  padding: 0;
  display: block;
}

/* iPad 11-inch, both ways: the spread is the page. The flip stays. */
@media (min-width: 768px) and (max-width: 1210px) and (max-height: 1280px) {
  body.ba {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.ba main {
    width: 100%;
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.7rem 0.6rem;
  }
  body.ba .book {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.ba .book-tools { margin: 0 0 0.4rem; flex: none; }
  body.ba .book-spread {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: auto;
  }
  body.ba .book-under img,
  body.ba .book-front img {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    object-fit: contain;
    object-position: top center;
    background: #fff;
  }
}
.compare {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem 1rem;
  min-height: 0;
}
.compare figure {
  margin: 0;
  position: relative;
  overflow: visible;
  background: transparent;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.compare img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 9rem);
  object-fit: contain;
  object-position: top center;
  display: block;
  background: #f4f6f8;
  border-radius: 8px;
}
.compare figcaption {
  position: static;
  margin: 0;
  padding: 0.55rem 0.3rem 0.15rem;
  background: transparent;
  color: #3d4a58;
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  line-height: 1.35;
}
.compare .frame-label {
  position: static;
  align-self: flex-start;
  z-index: 1;
  margin: 0 0 0.8rem 0.1rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.compare figure:last-child .frame-label { background: var(--orange); }

@media (max-width: 700px) {
  .compare {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.9rem;
  }
  .compare img { max-height: none; }
  .compare figcaption { font-size: 0.82rem; }
}

main.desk {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: calc(100dvh - var(--top-h, 4.15rem));
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.desk > .hero {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.8rem 1.1rem;
  padding: 0.45rem 1rem 0.4rem;
  border-bottom: 1px solid rgba(11, 31, 58, 0.08);
}

.desk > .hero .portrait { padding: 0.28rem 0.28rem 0.35rem; }

.desk > .hero .portrait img { width: 64px; }

.desk > .hero .portrait figcaption { display: none; }

.desk > .hero .hero-copy { min-width: 0; }

.desk > .hero h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  margin: 0.05rem 0 0;
}

.desk > .hero .lede {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  max-width: 46rem;
}

.desk > .hero .links { margin: 0 0 0 auto; }

.artifacts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  padding: 0.4rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(11, 31, 58, 0.08);
  background: #fff;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.92rem;
  line-height: 1.35;
}

.artifacts p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.artifacts a {
  color: var(--teal);
  text-underline-offset: 0.15em;
}

.split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, min(340px, 32vw)) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.synopsis {
  overflow: auto;
  min-width: 0;
  border-right: 1px solid rgba(11, 31, 58, 0.1);
  padding: 0.7rem 0.85rem 1rem 0.75rem;
}

.synopsis .hero {
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.7rem 0.8rem;
  padding: 0.35rem 0 0.15rem;
}

.synopsis .portrait img { width: 84px; }

.synopsis h1 { font-size: clamp(1.55rem, 2.1vw, 2.05rem); }

.synopsis .lede {
  font-size: 0.92rem;
  max-width: none;
  margin: 0.8rem 0 0;
}

.synopsis .map { padding-top: 0.7rem; }

.synopsis .map-head p { margin-bottom: 0.7rem; }

.synopsis footer {
  width: auto;
  margin: 0;
  padding: 1rem 0 0.3rem;
}

.stage {
  overflow: auto;
  min-width: 0;
  padding: 1.35rem 1.8rem 2rem 2.3rem;
  background: #fff;
}

.detail h2 {
  margin: 0.35rem 0 0.75rem;
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--navy);
}

.detail .prose {
  margin: 0;
  max-width: 68rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: #1a2433;
}

.detail-more { margin: 1rem 0 0; }

.detail-more a {
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-weight: 600;
  color: var(--teal);
}

.detail-logo {
  display: block;
  width: auto;
  max-width: 220px;
  height: 56px;
  object-fit: contain;
  margin: 0 0 0.7rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(11, 31, 58, 0.12);
  padding: 4px 6px;
}

.detail-logo.cn {
  width: 148px;
  height: 64px;
  background: #ed1b2d;
  border-color: #ed1b2d;
}

html.split-on .stops {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0.15rem 0.15rem 0.3rem 1.35rem;
}

html.split-on .stops::before {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  border-radius: 3px;
  background: #d5dbe3;
}

html.split-on .station {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "mark name";
  gap: 0.45rem 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
}

html.split-on .station .note,
html.split-on .station .open { display: none; }

html.split-on .station::before {
  left: -1.16rem;
  top: 0.78rem;
  width: 11px;
  height: 11px;
}

html.split-on .station.is-on {
  background: #f7f9fc;
  box-shadow: inset 4px 0 0 var(--orange);
}

.station.pulse {
  animation: section-pulse 0.85s ease-in-out 3;
}

@keyframes section-pulse {
  0%, 100% {
    background: #f7f9fc;
    box-shadow: inset 4px 0 0 var(--orange);
  }
  50% {
    background: #ffd7c4;
    box-shadow: inset 4px 0 0 var(--orange), 0 0 0 3px rgba(241, 90, 41, 0.4);
  }
}

html.split-on .station.is-on::before {
  background: var(--orange);
  border-color: #fff;
}

html.split-on .station strong { font-size: 1.15rem; }

html.split-on .station .logo,
html.split-on .station .logo.cn,
html.split-on .station .logo.word {
  width: 72px;
  height: 32px;
  padding: 2px 4px;
}

html.split-on .station .logo.word { width: 96px; }

html.split-on .station .logo:not(.cn):not(.word) {
  width: 32px;
  height: 32px;
  padding: 2px;
}

.point-arrow {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

#arrow-halo {
  fill: none;
  stroke: #fff;
  stroke-width: 8;
  stroke-linecap: round;
}

#arrow-line {
  fill: none;
  stroke: #f15a29;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 10 7;
  animation: arrow-run 0.9s linear infinite;
}

#arrow-dot {
  fill: #f15a29;
  stroke: #fff;
  stroke-width: 2;
}

@keyframes arrow-run { to { stroke-dashoffset: -17; } }

.book-tools { margin: 0 0 0.75rem; }

.book-toggle {
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  color: white;
  background: var(--orange);
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  cursor: pointer;
}

.book-spread {
  position: relative;
  width: min(100%, 960px);
  aspect-ratio: 1200 / 780;
  perspective: 1800px;
}

.book-under,
.book-face {
  background: #fff;
  border: 1px solid rgba(11, 31, 58, 0.14);
  border-radius: 12px;
  overflow: hidden;
}

.book-under {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.book-under .frame-label,
.book-front .frame-label { margin: 0.7rem 0.8rem 0.35rem; }

.book-under img,
.book-front img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 180px;
  flex: 1 1 auto;
  object-fit: contain;
  object-position: top center;
  background: #f3f5f8;
}

.book-cap {
  margin: 0;
  padding: 0.5rem 0.8rem 0.7rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #3d4a58;
}

.book-page {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 0.85s cubic-bezier(0.45, 0.05, 0.22, 1);
  filter: drop-shadow(-12px 10px 18px rgba(11, 31, 58, 0.16));
}

.book.is-after .book-page { transform: rotateY(-180deg); }

.book-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
}

.book-back {
  transform: rotateY(180deg);
  background:
    linear-gradient(90deg, rgba(11, 31, 58, 0.14), rgba(11, 31, 58, 0.02) 22%, transparent 40%),
    #f6f3ec;
}

.stage .book-spread {
  width: 100%;
  max-width: 920px;
  min-height: 320px;
}

@media (max-width: 740px) {
  .desk > .hero { flex-wrap: wrap; gap: 0.45rem 0.7rem; padding: 0.4rem 0.65rem; }
  .desk > .hero .lede { display: none; }
  .desk > .hero .links { margin: 0; }
  .desk > .hero h1 { font-size: 1.15rem; }
  .desk > .hero .portrait img { width: 48px; }
  .split { grid-template-columns: minmax(176px, 52vw) minmax(0, 1fr); }
  .synopsis .lede,
  .synopsis .links,
  .synopsis .map-head p,
  .synopsis .portrait figcaption { display: none; }
  .synopsis .hero {
    grid-template-columns: 44px minmax(0, 1fr);
    padding-top: 0.15rem;
  }
  .synopsis .portrait { padding: 0.25rem; }
  .synopsis .portrait img { width: 44px; }
  .synopsis h1 { font-size: 1.05rem; margin: 0; }
  html.split-on .station strong { font-size: 0.92rem; }
  html.split-on .station .code { min-width: 2.2rem; font-size: 0.68rem; padding: 0.28rem 0.2rem; }
  .stage { padding: 0.85rem 0.7rem 1.2rem 1.15rem; }
  .detail h2 { font-size: 1.55rem; }
  .detail .prose { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .book-page { transition: none; }
  #arrow-line, .station.pulse { animation: none; }
  .train { animation: none; top: 0; opacity: 1; }
  .bar i, .bar.split i, .pipe .arrow::before, .pipe .arrow::after { animation: none; }
  .bar i { width: 100%; }
  .bar.split i { transform: none; }
  .saved .ring, .saved .tick { animation: none; stroke-dashoffset: 0; }
  .saved .again, .locate.busy svg { animation: none; }
  .file-btn.shoot, .save { transition: none; }
}
