:root {
  --ink: #071c19;
  --deep: #0a2a24;
  --teal: #00e0c0;
  --gold: #f5c518;
  --page: #eef3f1;
  --card: #ffffff;
  --muted: #5b6b67;
  --line: #d5e3de;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
  background: var(--page);
}

body {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.shell {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.mast {
  padding: calc(12px + env(safe-area-inset-top)) 0 12px;
  background: var(--ink);
  color: #fff;
}

.mast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}

.mast-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mast nav,
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.mast nav a {
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.mast nav a:hover { color: var(--gold); }

.lead {
  display: grid;
  gap: 14px;
  padding: 28px 0 8px;
}

.kicker {
  margin: 0 0 8px;
  color: #0a7a68;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.lead > p {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.board {
  display: grid;
  gap: 10px;
  padding: 20px 0 40px;
}

.row {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "pos who"
    "pos bonus"
    "pos rate"
    "go go";
  gap: 10px 12px;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}

.pos {
  grid-area: pos;
  align-self: start;
  min-width: 2.1rem;
  color: var(--teal);
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.plate {
  display: none;
}

.plate img {
  width: auto;
  max-width: 108px;
  max-height: 36px;
  object-fit: contain;
}

.who { grid-area: who; min-width: 0; }

.who h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.who p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.bonus {
  grid-area: bonus;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
}

.bonus span {
  color: #0a7a68;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bonus b {
  color: var(--ink);
  font-size: 1.05rem;
}

.rate {
  grid-area: rate;
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.go {
  grid-area: go;
  display: grid;
  min-height: 44px;
  place-items: center;
  background: var(--teal);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.go:hover { background: #14f0ce; }

.foot {
  padding: 16px 0 calc(18px + env(safe-area-inset-bottom));
  background: var(--deep);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.foot p { margin: 0; }

.foot a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.mast nav a:focus-visible,
.foot a:focus-visible,
.go:focus-visible,
.age-yes:focus-visible,
.age-no:focus-visible,
.cancel-card a:focus-visible,
.doc a:focus-visible {
  outline: 3px solid rgba(0, 224, 192, 0.55);
  outline-offset: 3px;
}

.doc .mast-title { color: #fff; }

.doc main {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 24px 0 36px;
}

.doc article {
  color: #3d4c48;
  font-size: 0.96rem;
  line-height: 1.6;
}

.doc h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.doc h2 {
  margin: 22px 0 8px;
  font-size: 1.12rem;
}

.doc h2:first-of-type { margin-top: 0; }

.doc ul, .doc ol { padding-left: 1.15rem; }
.doc li + li { margin-top: 6px; }

.doc a { color: #0a7a68; font-weight: 700; }

.warn {
  margin: 18px 0;
  padding: 14px;
  background: #e7f8f3;
}

.gate-page { min-height: 100vh; background: var(--page); }

.gate-background {
  min-height: 100vh;
  pointer-events: none;
  user-select: none;
  filter: blur(7px);
  transform: scale(1.02);
}

.preview {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px;
  background: var(--card);
}

.preview-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 16px;
  text-align: center;
}

.preview .plate {
  display: grid;
  width: 120px;
  height: 56px;
  place-items: center;
  background: #f3f7f5;
}

.preview h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.preview > p {
  margin: 0 0 16px;
  color: var(--muted);
  text-align: center;
}

.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chips span {
  padding: 12px;
  border: 1px solid var(--line);
  color: #0a7a68;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chips b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}

.age-gate {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(7, 28, 25, 0.62);
}

.age-card {
  width: min(100%, 400px);
  padding: clamp(22px, 6vw, 32px);
  background: var(--card);
  text-align: center;
}

.age-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  font-weight: 800;
}

.age-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 5vw, 1.55rem);
}

.age-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.age-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.age-actions a {
  display: grid;
  min-height: 46px;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.age-yes {
  background: var(--teal);
  color: var(--ink);
}

.age-no {
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--ink);
}

.age-card small {
  display: block;
  margin-top: 14px;
  color: #8a9a96;
  font-size: 0.72rem;
}

.cancel-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--page);
}

.cancel-card {
  width: min(100%, 420px);
  padding: clamp(24px, 6vw, 36px);
  background: var(--card);
  text-align: center;
  border: 1px solid var(--line);
}

.cancel-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  font-weight: 800;
}

.cancel-card h1 { margin: 0 0 8px; }
.cancel-card p { margin: 0 0 20px; color: var(--muted); }

.cancel-card a {
  display: inline-grid;
  min-height: 44px;
  padding: 0 18px;
  place-items: center;
  background: var(--teal);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

@media (min-width: 600px) {
  .row {
    grid-template-columns: 2.4rem 88px minmax(0, 1fr) auto;
    grid-template-areas:
      "pos plate who go"
      "pos plate bonus go"
      "pos plate rate go";
    column-gap: 14px;
    align-items: center;
  }

  .plate {
    grid-area: plate;
    display: grid;
    width: 88px;
    height: 48px;
    place-items: center;
    background: #f3f7f5;
  }

  .go {
    min-width: 128px;
    align-self: stretch;
  }
}

@media (min-width: 1024px) {
  .shell { width: min(100% - 56px, 1120px); }

  .lead {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 40px;
    padding: 40px 0 16px;
  }

  .row {
    grid-template-columns: 2.6rem 112px minmax(0, 1.3fr) 9.5rem 7.2rem 138px;
    grid-template-areas: "pos plate who bonus rate go";
    padding: 12px 14px;
  }

  .go { align-self: center; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .gate-background {
    filter: none;
    transform: none;
  }
}
