:root {
  --ink: var(--bf-text);
  --paper: var(--bf-paper);
  --canvas: var(--bf-bg);
  --muted: var(--bf-muted);
  --line: var(--bf-border);
  --obsidian: #18181b;
  --accent: var(--bf-cobalt);
  --teal: var(--bf-teal);
  --gold: var(--bf-gold);
  --red: var(--bf-crimson);
  --soft: #f4f4f2;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--obsidian);
  color: var(--ink);
  font-family: var(--font-sans);
}

body { overflow: hidden; }
button { font: inherit; }
a { color: inherit; }

.deck {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 34px;
  padding: 64px 82px calc(var(--nav-h) + 34px);
  overflow: hidden;
  background: var(--canvas);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.24s var(--ease-brand), transform 0.24s var(--ease-brand);
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--accent);
}

.cover {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--obsidian);
  color: #fff;
}

.cover::before { background: var(--gold); }

h1,
h2,
p,
ul {
  margin: 0;
}

h1 {
  max-width: 15ch;
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.04;
}

p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

strong { font-weight: 800; }
code {
  display: inline-flex;
  justify-self: start;
  max-width: 100%;
  padding: 8px 10px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--obsidian);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.pa {
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.x {
  color: var(--gold);
  font-size: 21px;
  font-weight: 800;
}

.brand-row img {
  display: block;
  width: auto;
  height: 42px;
}

.hero-copy,
.slide-head {
  display: grid;
  align-content: start;
  gap: 18px;
}

.cover h1 {
  max-width: 12ch;
  color: #fff;
  font-size: clamp(58px, 10vw, 118px);
  line-height: 0.96;
}

.lead {
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 22px;
  line-height: 1.35;
}

.eyebrow,
.label {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cover .eyebrow { color: var(--gold); }

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.signal-strip span {
  padding: 18px 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  font-weight: 800;
}

.signal-strip span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-content: end;
  min-height: 0;
}

.lane-card {
  display: grid;
  gap: 22px;
  min-height: 300px;
  padding: 28px;
  border-top: 6px solid var(--accent);
  background: var(--paper);
}

.lane-card.ask { border-top-color: var(--gold); }
.lane-card.stop { border-top-color: var(--red); }
.lane-card.ask .label { color: #8c6400; }
.lane-card.stop .label { color: var(--red); }

.lane-card ul {
  display: grid;
  gap: 18px;
  padding: 0;
  list-style: none;
}

.lane-card li {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 800;
  line-height: 1.08;
}

.route-list {
  display: grid;
  gap: 14px;
  align-content: start;
  margin-top: 54px;
}

.route-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-top: 2px solid var(--line);
}

.route-row:last-child {
  border-bottom: 2px solid var(--line);
}

.route-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
}

.route-row:nth-child(2) .route-num { background: var(--teal); }
.route-row:nth-child(3) .route-num { background: var(--gold); color: var(--ink); }

.route-row div {
  display: grid;
  gap: 10px;
}

.route-row p {
  max-width: 52ch;
}

.route-row a {
  width: fit-content;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.route-row a:hover,
.link-row a:hover {
  text-decoration: underline;
}

.first-move {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) 1fr;
  gap: 22px;
  align-items: stretch;
  min-height: 0;
}

.primary-ticket {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 30px;
  background: var(--obsidian);
  color: #fff;
}

.primary-ticket h2 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(44px, 5vw, 72px);
}

.primary-ticket p:not(.label) {
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.checks {
  display: grid;
  border-top: 2px solid var(--line);
}

.checks div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 2px solid var(--line);
}

.checks strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.checks span {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-row a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.deck-nav {
  position: fixed;
  right: 28px;
  bottom: 22px;
  z-index: 5;
  display: grid;
  grid-template-columns: 44px auto 44px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: rgba(24, 24, 27, 0.94);
}

.deck-nav button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 38px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.deck-nav button:hover,
.deck-nav button:focus-visible {
  background: var(--accent);
  outline: 0;
}

.counter {
  min-width: 58px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1100px), (max-height: 760px) {
  .slide {
    gap: 24px;
    padding: 46px 54px calc(var(--nav-h) + 28px);
  }

  .lane-card {
    min-height: 240px;
    padding: 24px;
  }

  .lane-card li {
    font-size: 21px;
  }
}

@media (max-width: 820px) {
  body { overflow: hidden; }

  .deck {
    height: calc(100vh - var(--nav-h));
  }

  .slide,
  .slide.cover {
    display: block;
    padding: 28px 20px 34px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .slide > * + *,
  .slide.cover > * + * {
    margin-top: 22px;
  }

  .brand-row {
    gap: 13px;
    flex-wrap: wrap;
  }

  .brand-row img { height: 30px; }
  .pa { font-size: 22px; }

  .hero-copy,
  .slide-head {
    gap: 12px;
  }

  h1,
  .cover h1 {
    max-width: 12ch;
    font-size: clamp(36px, 11vw, 46px);
    line-height: 0.98;
  }

  .slide-head h1 {
    max-width: 13ch;
  }

  .lead {
    max-width: 28ch;
    font-size: 17px;
  }

  p {
    font-size: 15px;
  }

  .eyebrow,
  .label {
    font-size: 11px;
    letter-spacing: 0.07em;
  }

  .signal-strip {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .signal-strip span {
    padding: 14px 0;
    font-size: 16px;
  }

  .signal-strip span + span {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .lane-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lane-card {
    gap: 13px;
    min-height: 0;
    padding: 18px 18px 19px;
  }

  .lane-card ul {
    gap: 10px;
  }

  .lane-card li {
    font-size: 18px;
    line-height: 1.12;
  }

  .route-list {
    gap: 0;
    margin-top: 18px;
  }

  .route-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
  }

  .route-num {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  h2 {
    font-size: 22px;
  }

  .route-row div {
    gap: 7px;
  }

  .route-row p {
    max-width: 28ch;
  }

  code {
    font-size: 11px;
  }

  .first-move {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .primary-ticket {
    gap: 12px;
    padding: 20px;
  }

  .primary-ticket h2 {
    font-size: 42px;
  }

  .primary-ticket p:not(.label) {
    font-size: 15px;
  }

  .checks div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 0;
  }

  .checks strong {
    font-size: 19px;
  }

  .checks span {
    font-size: 15px;
  }

  .link-row {
    gap: 8px;
  }

  .link-row a {
    min-height: 38px;
    padding: 0 11px;
    font-size: 11px;
  }

  .deck-nav {
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: 54px 1fr 54px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }

  .deck-nav button {
    width: 54px;
    height: 44px;
  }

  .counter {
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .slide,
  .slide.cover {
    padding-right: 17px;
    padding-left: 17px;
  }

  h1,
  .cover h1 {
    font-size: clamp(33px, 10.5vw, 41px);
  }

  .lane-card li {
    font-size: 17px;
  }
}
