:root {
  --paper: #efeae1;
  --ink: #161513;
  --muted: #5f5a53;
  --faint: #8a847a;
  --line: #d3cdc2;
  --surface: #f7f3ec;
  --accent: #b83a12;
  --max: 1080px;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img {
  max-width: 100%;
  height: auto;
}

.page-bg { display: none; }

a, button {
  -webkit-tap-highlight-color: rgba(22, 21, 19, 0.08);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-kicker {
  font-family: var(--cond);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.brand-name {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
}

.brand-mark { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--ink);
  padding: 0 0.7rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

#invite-banner[hidden] { display: none !important; }

/* Landing */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    padding-top: 1.5rem;
  }
}

.eyebrow {
  font-family: var(--cond);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.eyebrow::before { content: none; }

.hero h1 {
  font-family: var(--cond);
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.btn-play:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  min-height: 0;
  text-decoration: none;
}

.btn-play .play-badge {
  display: block;
  height: 52px;
  width: auto;
  max-width: 100%;
}

.btn-ios-soon,
.ios-note {
  display: flex;
  align-items: center;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 16rem;
}

.ios-note {
  margin: 0;
  min-height: 0;
  padding: 0.15rem 0;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  color: var(--faint);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trust-strip span::before { content: none; }

.hero-shot {
  border: 1px solid var(--ink);
  background: #0c0c0c;
  overflow: hidden;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.play-copy {
  display: grid;
  gap: 2.5rem;
  padding-top: 0.5rem;
}

.play-card {
  margin: 0;
  display: grid;
  gap: 1rem;
  align-items: center;
}

.play-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  background: #0c0c0c;
}

.play-card h2 {
  font-family: var(--cond);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 0.4rem;
}

.play-card p {
  color: var(--muted);
  max-width: 28rem;
}

@media (min-width: 800px) {
  .play-card {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
  }
  .play-card:nth-child(even) img { order: 2; }
}

.hero-card,
.hero-board {
  border: 1px solid var(--ink);
  padding: 1.25rem 1.35rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
}

.hero-card h3,
.board-label {
  font-family: var(--cond);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.55;
  margin-bottom: 1rem;
}

.stat-row,
.board-rows {
  display: grid;
  gap: 0.15rem;
}

.board-row,
.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(239, 234, 225, 0.15);
  padding: 0.55rem 0;
  text-align: left;
  background: none;
  border-radius: 0;
}

.stat strong,
.board-row b {
  font-family: var(--cond);
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--paper);
}

.stat span,
.board-row span {
  font-family: var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 0;
}

.board-meta {
  margin-top: 0.9rem;
  font-family: var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  opacity: 0.5;
}

section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.audience {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.section-head {
  max-width: 36rem;
  margin: 0 0 2rem;
}

.section-head h2,
.cta-bottom h2,
.invite-box h2 {
  font-family: var(--cond);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-head p,
.cta-bottom p,
.invite-box p {
  color: var(--muted);
}

.features {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 800px) {
  .features {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
}

.feature {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  column-gap: 0.85rem;
  row-gap: 0.2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  background: none;
  border-radius: 0;
  box-shadow: none;
  align-items: start;
}

.feature:hover { box-shadow: none; border-color: var(--line); }

.feature-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--cond);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
}

.feature h3,
.feature p {
  grid-column: 2;
  min-width: 0;
}

.feature-icon svg { display: none; }

.feature:nth-child(1) .feature-icon::before { content: "01"; }
.feature:nth-child(2) .feature-icon::before { content: "02"; }
.feature:nth-child(3) .feature-icon::before { content: "03"; }
.feature:nth-child(4) .feature-icon::before { content: "04"; }

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.feature p {
  font-size: 0.92rem;
  color: var(--muted);
}

.audience-inner { padding: 3rem 1.25rem; }

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
}

.pill {
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
}

.invite-section { border-top: 1px solid var(--line); }

.invite-box {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 0;
  background: none;
  max-width: 36rem;
  margin: 0;
}

.invite-box code {
  font-family: var(--sans);
  font-size: 0.85rem;
  background: var(--surface);
  padding: 0.1rem 0.3rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cta-bottom {
  text-align: left;
  padding: 3rem 1.25rem 4rem;
  border-top: 1px solid var(--line);
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--faint);
}

.footer-inner a {
  color: var(--ink);
  text-decoration: none;
}

.footer-links { display: flex; gap: 1.25rem; }

@media (max-width: 640px) {
  .header-inner { padding: 0.65rem 1rem; gap: 0.6rem; }
  .brand-name { font-size: 1.2rem; }
  .hero { padding: 1.35rem 1rem 1.75rem; }
  .hero-grid { gap: 1.5rem; }
  .hero-grid > div {
    display: flex;
    flex-direction: column;
  }
  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 2.75rem);
    margin-bottom: 0.9rem;
  }
  .hero .store-row { order: 2; margin-bottom: 0.85rem; }
  .hero-lead {
    order: 3;
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
  }
  .hero .ios-note { order: 4; }
  .trust-strip { order: 5; font-size: 0.72rem; gap: 0.25rem 0.9rem; }
  .store-row { flex-direction: column; align-items: flex-start; }
  .store-row .btn-play:not(.btn),
  .store-row .btn-ios-soon,
  .store-row .ios-note { width: auto; justify-content: flex-start; }
  .btn-play .play-badge { height: 48px; }
  .section-head { margin-bottom: 1.25rem; }
  section,
  .audience-inner,
  .cta-bottom { padding: 1.75rem 1rem; }
  .cta-bottom { padding-bottom: 2.5rem; }
  .feature { padding: 0.95rem 0; }
  .play-copy { gap: 1.75rem; padding-top: 0; }
  .footer-inner { padding: 0; }
  footer { padding: 1.15rem 1rem calc(1.15rem + env(safe-area-inset-bottom)); }
}

/* Companion */
body.companion {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.companion .header-inner,
body.companion main,
body.companion .companion-foot {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

body.companion main {
  width: 100%;
  flex: 1;
  padding: 1.1rem 1.1rem 1.4rem;
}

body.companion .companion-foot {
  border: 0;
  background: none;
  width: 100%;
  padding: 0 1.1rem 1.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

body.companion.has-dock .companion-foot { padding-bottom: 5.75rem; }

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel,
.path,
.roster-panel {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.panel h1,
.path h2 {
  font-family: var(--cond);
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.path h2 { font-size: 1.45rem; }

.lead,
.path p,
.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.meta.tight { margin: 0; }

.team-head {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.team-logo,
.team-logo.placeholder {
  width: 48px;
  height: 48px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--cond);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.fact {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0.7rem 0.9rem 0.2rem 0;
  border-bottom: 1px solid var(--line);
}

.fact:first-child { padding-right: 0.9rem; }

.fact span {
  display: block;
  font-family: var(--cond);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.15rem;
}

.fact strong { font-size: 1rem; }

.path {
  padding-top: 0.25rem;
  border-top: 1px solid var(--ink);
}

.path-label {
  font-family: var(--cond);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.path-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.steps {
  list-style: none;
  counter-reset: join-step;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.steps li {
  counter-increment: join-step;
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.55rem;
  color: var(--muted);
}

.steps li::before {
  content: counter(join-step);
  font-family: var(--cond);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.steps li strong { color: var(--ink); }

.path .store-cta,
.path a.btn-play:not(.btn) {
  width: 100%;
  justify-content: flex-start;
}

.path .btn,
.path .btn-google {
  width: 100%;
}

.quiet-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.65rem;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.roster h2 {
  font-family: var(--cond);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
}

.roster ul { list-style: none; }

.roster li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
  align-items: center;
  font-size: 0.95rem;
}

.role-tag {
  font-family: var(--cond);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: end;
  margin: 0.75rem 0 1rem;
}

.scoreboard .team {
  text-align: center;
  padding: 0.5rem 0.2rem;
  background: none;
  border: 0;
  border-radius: 0;
}

.scoreboard .team.winner { background: none; }

.scoreboard .team strong {
  font-family: var(--cond);
  font-size: clamp(3rem, 14vw, 4.25rem);
  font-weight: 700;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.scoreboard .team.winner strong { color: var(--accent); }

.scoreboard .team span {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--muted);
}

.vs {
  font-family: var(--cond);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  padding-bottom: 1.6rem;
}

.quarters {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  margin-bottom: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.qchip {
  flex: 1;
  min-width: 3.5rem;
  text-align: center;
  border: 0;
  background: none;
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--faint);
}

.qchip b {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.awards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.award {
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 26rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--faint);
  font-weight: 600;
}

td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--cond);
  font-size: 1rem;
}

.team-label {
  font-family: var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--accent);
  padding-top: 0.85rem;
}

.status, .error, .ok {
  padding: 0.75rem 0;
  border-radius: 0;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  border: 0;
  background: none;
}

.error { color: #8a1f11; border-top: 1px solid #8a1f11; }
.ok { color: #1f5c38; }
.status { color: var(--muted); }

.row-status { display: flex; align-items: center; gap: 0.55rem; }

.spinner {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  min-height: 48px;
  width: 100%;
  font-size: 0.92rem;
}

.btn.btn-play {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.btn-google {
  background: var(--paper);
  color: var(--ink);
}

.btn-text {
  background: transparent;
  color: var(--muted);
}

.hidden { display: none !important; }

.dock {
  position: sticky;
  bottom: 0;
  z-index: 30;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.7rem 1.1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dock.hidden { display: none !important; }

.dock .btn-play:not(.btn),
.dock .store-cta {
  width: 100%;
  justify-content: center;
  background: transparent;
  min-height: 0;
}

@media (min-width: 720px) {
  .path-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
