/* Play Trophy: graphite base, orange for progress and actions, ice blue for links, focus and info. */

:root {
  --pt-bg: #16181D;
  --pt-surface: #20232B;
  --pt-raise: #2A2E38;
  --pt-line: #343844;
  --pt-orange: #FF7A1A;
  --pt-orange-hi: #FF9445;
  --pt-ice: #7DD3FC;
  --pt-text: #F5F5F4;
  --pt-muted: #A1A1AA;
  --pt-ink: #16181D;
  --pt-error: #FCA5A5;
  --pt-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --pt-sans: "Work Sans", Arial, sans-serif;
  --pt-gutter: clamp(16px, 4.5vw, 56px);
  --pt-side-w: 240px;
  --climb: 0;
}

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

html {
  background: var(--pt-surface);
  color: var(--pt-text);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body { overscroll-behavior-y: none; }

body {
  margin: 0;
  background: var(--pt-bg);
  font-family: var(--pt-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

html.pt-locked, html.pt-locked body { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--pt-display);
  font-stretch: 100%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.85rem, 3.3vw, 2.8rem); }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

a { color: var(--pt-ice); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--pt-ice);
  outline-offset: 3px;
  border-radius: 2px;
}

button, input, textarea, select { font: inherit; color: inherit; }

.pt-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pt-skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--pt-ice);
  color: var(--pt-ink);
  font-weight: 500;
}
.pt-skip:focus { top: 12px; }

.pt-num { font-family: var(--pt-display); font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 6px;
  font-family: var(--pt-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pt-btn:hover { text-decoration: none; }
.pt-btn[disabled], .pt-btn[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }

.pt-btn-fill { background: var(--pt-orange); color: var(--pt-ink); }
.pt-btn-fill:hover:not([disabled]) { background: var(--pt-orange-hi); }

.pt-btn-line { border-color: var(--pt-line); color: var(--pt-text); background: transparent; }
.pt-btn-line:hover:not([disabled]) { border-color: var(--pt-ice); }

.pt-btn-even { background: var(--pt-raise); border-color: var(--pt-line); color: var(--pt-text); min-width: 112px; }
.pt-btn-even:hover { border-color: var(--pt-ice); }

.pt-btn-big { min-height: 58px; padding: 0 30px; font-size: 1.1rem; }

.pt-spinner {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pt-spin .8s linear infinite;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }

.pt-badge-link { display: inline-block; line-height: 0; border-radius: 8px; }
.pt-badge-link img { width: auto; height: 62px; margin: -9px -10px; }

/* ---------- Shell ---------- */

.pt-shell { min-height: 100vh; }

.pt-col {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: var(--pt-bg);
}

.pt-main { flex: 1 0 auto; outline: none; }

.pt-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--pt-gutter);
}

.pt-sec { padding: clamp(64px, 8vw, 112px) 0; }
.pt-sec + .pt-sec { padding-top: 0; }

.pt-sec-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 48px); }
.pt-sec-head p { color: var(--pt-muted); font-size: 1.1rem; max-width: 58ch; }

/* ---------- Sidebar (desktop) / top bar (mobile) ---------- */

.pt-side {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--pt-surface);
  border-bottom: 1px solid var(--pt-line);
}

.pt-side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 16px;
}

.pt-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pt-text);
  text-decoration: none;
  font-family: var(--pt-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.pt-logo .pt-mark { width: 30px; height: 30px; flex: none; }
.pt-logo-small { font-size: 1.05rem; }
.pt-logo-small .pt-mark { width: 24px; height: 24px; }

.pt-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--pt-raise);
  border: 1px solid var(--pt-line);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--pt-display);
  font-weight: 600;
}
.pt-menu-icon, .pt-menu-icon::before, .pt-menu-icon::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  transition: transform .2s;
}
.pt-menu-icon { position: relative; }
.pt-menu-icon::before, .pt-menu-icon::after { content: ""; position: absolute; left: 0; }
.pt-menu-icon::before { top: -6px; }
.pt-menu-icon::after { top: 6px; }
.pt-menu-btn[aria-expanded="true"] .pt-menu-icon { background: transparent; }
.pt-menu-btn[aria-expanded="true"] .pt-menu-icon::before { transform: translateY(6px) rotate(45deg); }
.pt-menu-btn[aria-expanded="true"] .pt-menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

.pt-side-panel { display: none; }
.pt-side-panel.is-open {
  display: block;
  position: absolute;
  left: 0; right: 0; top: 100%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 8px 16px 24px;
  background: var(--pt-surface);
  border-bottom: 1px solid var(--pt-line);
  box-shadow: 0 24px 40px rgba(0, 0, 0, .45);
}

.pt-nav ul { list-style: none; margin: 0; padding: 0; }
.pt-nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--pt-text);
  text-decoration: none;
  font-family: var(--pt-display);
  font-weight: 600;
  font-size: 1.02rem;
}
.pt-nav a:hover { background: var(--pt-raise); }
.pt-nav a[aria-current="page"] {
  background: var(--pt-raise);
  box-shadow: inset 3px 0 0 var(--pt-orange);
}

.pt-side-actions { display: grid; gap: 12px; justify-items: start; margin-top: 18px; padding: 0 4px; }
.pt-side-actions .pt-btn { width: 100%; }
.pt-side-actions .pt-btn[aria-current="page"] { border-color: var(--pt-orange); }
.pt-badge-side img { height: 56px; margin: -8px -9px; }

.pt-climb { display: none; }

.pt-climb-line {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: calc(var(--climb) * 100%);
  background: var(--pt-orange);
}

@media (min-width: 1024px) {
  .pt-shell {
    display: grid;
    grid-template-columns: var(--pt-side-w) minmax(0, 1fr);
  }
  .pt-side {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-bottom: 0;
    border-right: 1px solid var(--pt-line);
  }
  .pt-side-top { padding: 28px 20px 20px; min-height: 0; }
  .pt-menu-btn { display: none; }
  .pt-side-panel,
  .pt-side-panel.is-open {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 8px 16px 24px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .pt-climb-line { display: none; }
  .pt-climb {
    display: block;
    margin-top: auto;
    padding: 28px 4px 0;
  }
}

.pt-climb-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  font-size: .82rem;
  color: var(--pt-muted);
}
.pt-climb-now { color: var(--pt-text); font-family: var(--pt-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-climb-now b { color: var(--pt-orange); font-weight: 800; }
.pt-climb-steps {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: end;
  gap: 3px;
  height: 52px;
}
.pt-climb-steps i {
  display: block;
  height: calc(var(--h) * 10%);
  background: var(--pt-raise);
}
.pt-climb-steps i.is-on { background: var(--pt-orange); }
.pt-climb-ends {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  font-size: .75rem;
  color: var(--pt-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Cookie strip (under the header) ---------- */

.pt-cookie {
  background: var(--pt-raise);
  border-bottom: 1px solid var(--pt-line);
}
.pt-cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px var(--pt-gutter);
}
.pt-cookie p { margin: 0; font-size: .95rem; max-width: 70ch; }
.pt-cookie-actions { display: flex; gap: 10px; }
html.pt-cookie-set .pt-cookie { display: none; }

/* ---------- Age gate ---------- */

.pt-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 11, 14, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}
html.pt-age-ok .pt-gate { display: none; }

.pt-gate-panel {
  background: var(--pt-surface);
  border-bottom: 3px solid var(--pt-orange);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}

.pt-gate-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 36px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px var(--pt-gutter);
}
.pt-gate-mark { width: 84px; height: 84px; }
.pt-gate-title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 8px; }
.pt-gate-copy p { margin: 0; color: var(--pt-muted); max-width: 60ch; }
.pt-gate-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
  .pt-gate-inner { grid-template-columns: 1fr; gap: 18px; padding-top: 28px; padding-bottom: 28px; }
  .pt-gate-mark { width: 72px; height: 72px; }
  .pt-gate-actions .pt-btn { flex: 1 1 200px; }
}

/* ---------- Home hero ---------- */

.pt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.pt-hero h1 { max-width: 11ch; }
.pt-lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--pt-muted); max-width: 46ch; margin-bottom: 32px; }
.pt-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.pt-hero-actions .pt-link-plain { font-weight: 500; }

.pt-cabinet { display: grid; gap: 20px; }
.pt-trophy {
  width: min(100%, 300px);
  margin: 0 auto;
}

@media (prefers-reduced-motion: no-preference) {
  .pt-trophy .pt-cup { animation: pt-settle .7s .15s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes pt-settle { from { transform: translateY(-18px); } }

.pt-medals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pt-medal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 3px;
  padding: 12px 12px 11px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: 4px;
}
.pt-medal .pt-glyph { width: 34px; height: 34px; margin-bottom: 6px; color: var(--pt-muted); }
.pt-glyph-hex { fill: var(--pt-raise); stroke: var(--pt-line); stroke-width: 1.5; }
.pt-medal-name { font-family: var(--pt-display); font-weight: 600; font-size: .95rem; line-height: 1.15; }
.pt-medal-state { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--pt-muted); line-height: 1.2; }
.pt-medal-state::before {
  content: "";
  width: 9px; height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  box-shadow: 0 -4px 0 -1.5px var(--pt-surface), 0 -4px 0 0 currentColor;
  margin-top: 3px;
}
.pt-medal.is-unlocked { border-color: var(--pt-orange); }
.pt-medal.is-unlocked .pt-glyph { color: var(--pt-ink); }
.pt-medal.is-unlocked .pt-glyph-hex { fill: var(--pt-orange); stroke: var(--pt-orange); }
.pt-medal.is-unlocked .pt-medal-state { color: var(--pt-ice); }
.pt-medal.is-unlocked .pt-medal-state::before {
  width: 9px; height: 5px; margin-top: -3px;
  border-width: 0 0 2px 2px; border-radius: 0; box-shadow: none;
  transform: rotate(-45deg);
}
.pt-medals-note { margin: 0; font-size: .85rem; color: var(--pt-muted); }

.pt-disclaim {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--pt-line);
  border-bottom: 1px solid var(--pt-line);
  color: var(--pt-muted);
  font-size: .93rem;
}
.pt-disclaim svg { width: 22px; height: 22px; margin-top: 2px; }
.pt-disclaim p { margin: 0; }
.pt-disclaim strong { color: var(--pt-text); font-weight: 500; }

@media (max-width: 1180px) and (min-width: 1024px), (max-width: 860px) {
  .pt-hero { grid-template-columns: 1fr; }
  .pt-cabinet { max-width: 560px; }
}

@media (max-width: 520px) {
  .pt-medals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-trophy { width: min(70%, 230px); }
}

/* ---------- The ladder ---------- */

.pt-ladder-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  column-gap: 6px;
}
.pt-rung { display: contents; }
.pt-rung-step {
  grid-row: 1;
  grid-column: var(--n);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  height: calc(76px + var(--n) * 20px);
  padding: 12px 10px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  color: var(--pt-text);
  text-align: left;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.pt-rung-step:hover { border-color: var(--pt-ice); }
.pt-rung-step[aria-pressed="true"] { background: var(--pt-orange); border-color: var(--pt-orange); color: var(--pt-ink); }
.pt-rung-num {
  font-family: var(--pt-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pt-rung-name { font-family: var(--pt-display); font-weight: 600; font-size: .82rem; line-height: 1.2; overflow-wrap: anywhere; }
.pt-rung-detail {
  grid-row: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 40px;
  padding: 28px 28px 30px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-top: 3px solid var(--pt-orange);
}
.pt-rung-detail[hidden] { display: none; }
.pt-rung-detail h3 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; }
.pt-rung-detail p { margin: 0; }
.pt-rung-at { color: var(--pt-muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.pt-rung-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border: 1px solid var(--pt-ice);
  border-radius: 999px;
  color: var(--pt-ice);
  font-size: .8rem;
  font-weight: 500;
}

.pt-levels-how { margin-top: 56px; }
.pt-levels-how > h3 { margin: 0 0 20px; font-size: 1.5rem; font-weight: 800; }
.pt-levels-how dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 40px;
  margin: 0;
}
.pt-levels-how div { border-top: 1px solid var(--pt-line); padding-top: 16px; }
.pt-levels-how dt { font-family: var(--pt-display); font-weight: 600; font-size: 1.1rem; margin-bottom: 6px; }
.pt-levels-how dd { margin: 0; color: var(--pt-muted); }

@media (max-width: 760px) {
  .pt-ladder-list { display: flex; flex-direction: column; gap: 6px; }
  .pt-rung {
    display: grid;
    grid-template-columns: calc(44px + var(--n) * 5px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
  }
  .pt-rung-step {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    height: 56px;
    border: 1px solid var(--pt-line);
    border-radius: 4px;
    justify-content: center;
    cursor: default;
  }
  .pt-rung-step[aria-pressed="true"] { background: var(--pt-surface); border-color: var(--pt-line); color: var(--pt-text); }
  .pt-rung-step .pt-rung-name { display: none; }
  .pt-rung-step:hover { border-color: var(--pt-line); }
  .pt-rung:last-child .pt-rung-step { background: var(--pt-orange); border-color: var(--pt-orange); color: var(--pt-ink); }
  .pt-rung-detail,
  .pt-rung-detail[hidden] {
    grid-column: 2;
    grid-row: auto;
    display: block;
    padding: 6px 0 14px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--pt-line);
  }
  .pt-rung-detail h3 { font-size: 1.15rem; }
  .pt-rung-detail .pt-rung-text { margin-top: 6px; font-size: .97rem; }
  .pt-rung-tag { margin-top: 8px; }
  .pt-levels-how dl { grid-template-columns: 1fr; }
}

/* ---------- Trophy Match ---------- */

.pt-game-sec { text-align: center; }
.pt-game-sec .pt-sec-head { margin-left: auto; margin-right: auto; }
.pt-game-sec .pt-sec-head p { margin-left: auto; margin-right: auto; }

.pt-game {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: 10px;
  text-align: left;
}

.pt-board-wrap { position: relative; }
.pt-board {
  --gap: 6px;
  position: relative;
  aspect-ratio: 1;
  padding: var(--gap);
  background: var(--pt-bg);
  border-radius: 8px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.pt-board.is-idle .pt-tile { opacity: .45; }
.pt-board-cells { position: absolute; inset: var(--gap); }
.pt-tile {
  position: absolute;
  left: 0; top: 0;
  width: calc((100% - 5 * var(--gap)) / 6);
  height: calc((100% - 5 * var(--gap)) / 6);
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--pt-raise);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transform: translate(calc(var(--c) * (100% + var(--gap))), calc(var(--r) * (100% + var(--gap))));
  transition: transform .2s ease-out, opacity .2s, background-color .15s;
}
.pt-tile svg { width: 66%; height: 66%; pointer-events: none; }
.pt-tile:focus-visible { outline: 3px solid var(--pt-ice); outline-offset: 0; z-index: 2; }
.pt-tile.is-picked { border-color: var(--pt-orange); background: #3A3226; }
.pt-tile.is-clearing { opacity: 0; transform: translate(calc(var(--c) * (100% + var(--gap))), calc(var(--r) * (100% + var(--gap)))) scale(.4); }
.pt-tile.is-nudge { animation: pt-nudge .3s; }
@keyframes pt-nudge { 30% { margin-left: -4px; } 70% { margin-left: 4px; } }

.pt-board.is-still .pt-tile { transition: none; animation: none; }

.pt-board-msg {
  min-height: 3em;
  margin: 14px 0 0;
  font-size: .95rem;
  color: var(--pt-muted);
}
.pt-board-msg strong { color: var(--pt-text); font-weight: 500; }

.pt-game-side { display: flex; flex-direction: column; gap: 20px; }
.pt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--pt-line);
  border-radius: 6px;
}
.pt-stats div { padding: 12px 14px; }
.pt-stats div + div { border-left: 1px solid var(--pt-line); }
.pt-stats dt { font-size: .8rem; color: var(--pt-muted); }
.pt-stats dd {
  margin: 2px 0 0;
  font-family: var(--pt-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pt-stats .pt-coins dd { color: var(--pt-orange); }

.pt-game-actions { display: grid; gap: 10px; }
.pt-refill-note { margin: -8px 0 0; font-size: .85rem; color: var(--pt-muted); }

.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.pt-table caption { text-align: left; font-family: var(--pt-display); font-weight: 600; font-size: 1rem; padding-bottom: 8px; }
.pt-table th, .pt-table td { padding: 8px 0; border-top: 1px solid var(--pt-line); text-align: left; font-weight: 400; vertical-align: top; }
.pt-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--pt-text); white-space: nowrap; padding-left: 12px; }
.pt-table th { color: var(--pt-muted); }

.pt-sound {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--pt-line);
  border-radius: 6px;
  cursor: pointer;
  font-size: .92rem;
}
.pt-sound[aria-pressed="true"] { border-color: var(--pt-ice); color: var(--pt-ice); }
.pt-game-keys { margin: 0; font-size: .85rem; color: var(--pt-muted); }

@media (max-width: 820px) {
  .pt-game { grid-template-columns: 1fr; padding: 10px; gap: 20px; }
  .pt-board { --gap: 5px; }
  .pt-game-side { order: -1; }
  .pt-board-wrap { order: 0; }
  .pt-game-more { order: 1; }
}

.pt-game-more { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 821px) {
  .pt-game { grid-template-areas: "board side" "board more"; grid-template-rows: auto 1fr; }
  .pt-board-wrap { grid-area: board; }
  .pt-game-side { grid-area: side; }
  .pt-game-more { grid-area: more; }
}

/* ---------- Challenges ---------- */

.pt-challenges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.pt-challenges h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.pt-challenges > div > p { color: var(--pt-muted); margin-bottom: 16px; }
.pt-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 16px 18px;
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: 4px;
}
.pt-task-name { font-weight: 500; }
.pt-task-reward { font-family: var(--pt-display); font-weight: 600; color: var(--pt-orange); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-task-bar { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pt-task-bar progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 4px;
  background: var(--pt-raise);
  overflow: hidden;
}
.pt-task-bar progress::-webkit-progress-bar { background: var(--pt-raise); }
.pt-task-bar progress::-webkit-progress-value { background: var(--pt-orange); }
.pt-task-bar progress::-moz-progress-bar { background: var(--pt-orange); }
.pt-task-bar span { font-size: .85rem; color: var(--pt-muted); font-variant-numeric: tabular-nums; }
.pt-demo-note { margin-top: 20px; font-size: .88rem; color: var(--pt-muted); }

@media (max-width: 760px) { .pt-challenges { grid-template-columns: 1fr; } }

/* ---------- Stair steps (how it works) ---------- */

.pt-stairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pt-stair {
  --i: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 24px;
  width: min(100%, 640px);
  margin-left: calc(var(--i) * min(16%, 200px));
  padding: 24px 28px;
  background: var(--pt-surface);
  border-top: 4px solid var(--pt-raise);
}
.pt-stair:last-child { border-top-color: var(--pt-orange); }
.pt-stair-num {
  grid-row: span 2;
  font-family: var(--pt-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--pt-orange);
  font-variant-numeric: tabular-nums;
}
.pt-stair h3 { margin: 4px 0 2px; font-size: 1.3rem; }
.pt-stair p { margin: 0; color: var(--pt-muted); }

@media (max-width: 760px) {
  .pt-stair { margin-left: calc(var(--i) * 16px); width: calc(100% - var(--i) * 16px); padding: 20px; gap: 4px 16px; }
  .pt-stair-num { font-size: 2rem; }
}

/* ---------- FAQ rows ---------- */

.pt-faq { border-top: 1px solid var(--pt-line); max-width: 860px; }
.pt-faq details { border-bottom: 1px solid var(--pt-line); }
.pt-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 14px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--pt-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.3;
}
.pt-faq summary::-webkit-details-marker { display: none; }
.pt-faq summary::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-top: 2px solid var(--pt-ice);
  border-left: 2px solid var(--pt-ice);
  transform: rotate(225deg) translate(3px, 3px);
  transition: transform .2s;
}
.pt-faq details[open] summary::after { transform: rotate(45deg) translate(3px, 3px); }
.pt-faq summary:hover { color: var(--pt-ice); }
.pt-faq-a { padding: 0 4px 22px; max-width: 68ch; color: var(--pt-muted); }
.pt-faq-a p:last-child { margin-bottom: 0; }
.pt-faq-more { margin-top: 24px; }

.pt-faq-group + .pt-faq-group { margin-top: 56px; }
.pt-faq-group h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

/* ---------- CTA ---------- */

.pt-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 48px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--pt-surface);
  border-left: 6px solid var(--pt-orange);
}
.pt-cta h2 { margin-bottom: 10px; }
.pt-cta p { margin: 0; color: var(--pt-muted); max-width: 56ch; }
.pt-cta-side { display: grid; gap: 10px; justify-items: start; }
.pt-cta-small { font-size: .85rem; color: var(--pt-muted); }
@media (max-width: 860px) { .pt-cta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.pt-foot {
  background: var(--pt-surface);
  border-top: 1px solid var(--pt-line);
  padding: 0 var(--pt-gutter);
  font-size: .9rem;
}
.pt-foot-row, .pt-foot-note, .pt-foot-legal { max-width: calc(1120px - 2 * var(--pt-gutter)); margin: 0 auto; }
.pt-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 22px 0;
}
.pt-foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pt-foot-nav a { color: var(--pt-text); text-decoration: none; padding: 6px 0; }
.pt-foot-nav a:hover { color: var(--pt-ice); text-decoration: underline; }
.pt-foot-nav a[aria-current="page"] { color: var(--pt-orange); }
.pt-foot-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--pt-line);
  color: var(--pt-muted);
}
.pt-foot-note p { margin: 0; max-width: 92ch; }
.pt-foot-tag {
  align-self: start;
  padding: 2px 10px;
  border: 1px solid var(--pt-orange);
  border-radius: 999px;
  color: var(--pt-orange) !important;
  font-weight: 500;
  white-space: nowrap;
}
.pt-foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  padding: 14px 0 22px;
  border-top: 1px solid var(--pt-line);
  color: var(--pt-muted);
  font-size: .85rem;
}
.pt-foot-legal p { margin: 0; }
.pt-foot-company { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pt-foot-company a { color: var(--pt-muted); }
@media (max-width: 640px) { .pt-foot-note { grid-template-columns: 1fr; } }

/* ---------- Inner page hero ---------- */

.pt-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr);
  grid-template-rows: auto auto;
  column-gap: clamp(28px, 5vw, 64px);
  padding: clamp(40px, 6vw, 80px) 0 clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--pt-line);
}
.pt-page-hero h1 { grid-column: 1; align-self: end; font-size: clamp(2.3rem, 4.6vw, 3.9rem); max-width: 16ch; }
.pt-page-hero .pt-lede { grid-column: 1; margin-bottom: 0; max-width: 54ch; }
.pt-page-hero .pt-plinth { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; width: min(100%, 260px); }
@media (max-width: 760px) {
  .pt-page-hero { grid-template-columns: minmax(0, 1fr) 92px; column-gap: 16px; }
  .pt-page-hero h1 { align-self: center; margin-bottom: .4em; }
  .pt-page-hero .pt-plinth { grid-row: 1; width: 92px; }
  .pt-page-hero .pt-lede { grid-column: 1 / -1; }
}

/* ---------- Generic content blocks ---------- */

.pt-muted { color: var(--pt-muted); }
.pt-small { font-size: .9rem; }
.pt-split-top { align-items: start; }
.pt-form-title { font-size: 1.35rem; font-weight: 800; }
.pt-code-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.pt-light-foot { margin: 20px 0 0; font-size: .95rem; }
.pt-light .pt-btn-fill { color: var(--pt-ink); }

.pt-guide { list-style: none; margin: 0; padding: 0; counter-reset: none; max-width: 860px; }
.pt-guide li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--pt-line);
}
.pt-guide li:last-child { border-bottom: 1px solid var(--pt-line); }
.pt-guide-num {
  display: grid;
  place-items: end start;
  height: 64px;
  padding: 0 0 6px 10px;
  border-left: 4px solid var(--pt-raise);
  font-family: var(--pt-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--pt-muted);
  font-variant-numeric: tabular-nums;
}
.pt-guide li:last-child .pt-guide-num { border-left-color: var(--pt-orange); color: var(--pt-orange); }
.pt-guide h3 { margin: 2px 0 6px; }
.pt-guide p { margin: 0; color: var(--pt-muted); max-width: 62ch; }
@media (max-width: 640px) {
  .pt-guide li { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .pt-guide-num { font-size: 1.8rem; height: 48px; padding-left: 8px; }
}

.pt-points.pt-points-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
.pt-points.pt-points-grid li { border-top: 1px solid var(--pt-line); border-bottom: 0; padding: 20px 0 28px; }
@media (max-width: 960px) { .pt-points.pt-points-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pt-points.pt-points-grid { grid-template-columns: 1fr; } }


.pt-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; }
@media (max-width: 860px) { .pt-split { grid-template-columns: 1fr; } }

.pt-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--pt-line); }
.pt-points li { padding: 18px 0; border-bottom: 1px solid var(--pt-line); }
.pt-points h3 { margin-bottom: 4px; }
.pt-points p { margin: 0; color: var(--pt-muted); }

.pt-light {
  background: var(--pt-text);
  color: var(--pt-ink);
  border-radius: 4px;
  padding: clamp(24px, 4vw, 40px);
}
.pt-light a:not(.pt-btn) { color: #0B5C8A; }
.pt-light p, .pt-light li { color: #3F3F46; }
.pt-light h2, .pt-light h3 { color: var(--pt-ink); }
.pt-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 18px;
  font-family: var(--pt-display);
}
.pt-price b { font-size: clamp(3.6rem, 7vw, 5.4rem); font-stretch: 125%; font-weight: 800; line-height: 1; color: var(--pt-ink); }
.pt-price span { font-size: 1.05rem; color: #3F3F46; }
.pt-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-checks li { position: relative; padding-left: 28px; }
.pt-checks li::before {
  content: "";
  position: absolute;
  left: 4px; top: .45em;
  width: 11px; height: 6px;
  border-left: 2.5px solid var(--pt-orange);
  border-bottom: 2.5px solid var(--pt-orange);
  transform: rotate(-45deg);
}
.pt-light .pt-checks li::before { border-color: #C2410C; }
.pt-nots li::before {
  width: 12px; height: 2.5px; top: .7em; left: 3px;
  border: 0; background: var(--pt-muted); transform: none;
}

.pt-data-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.pt-data-table caption { text-align: left; color: var(--pt-muted); font-size: .9rem; padding-bottom: 12px; caption-side: bottom; padding-top: 12px; }
.pt-data-table th, .pt-data-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--pt-line); text-align: left; vertical-align: top; }
.pt-data-table thead th { font-family: var(--pt-display); font-weight: 600; color: var(--pt-muted); font-size: .9rem; }
.pt-data-table tbody th { font-weight: 500; }
.pt-data-table td.pt-num { font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .pt-data-table thead { display: none; }
  .pt-data-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--pt-line); }
  .pt-data-table th, .pt-data-table td { display: block; border: 0; padding: 2px 0; }
  .pt-data-table td[data-label]::before { content: attr(data-label) ": "; color: var(--pt-muted); font-family: var(--pt-sans); font-weight: 400; }
}

.pt-prose { max-width: 70ch; }
.pt-prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); margin-top: 2.2em; }
.pt-prose h2:first-child { margin-top: 0; }
.pt-prose h3 { margin-top: 1.6em; }
.pt-prose ul, .pt-prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.pt-prose li { margin-bottom: .4em; }
.pt-prose p, .pt-prose li { color: #D4D4D8; }
.pt-updated { color: var(--pt-muted); font-size: .95rem; }

.pt-legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.pt-toc { position: sticky; top: 24px; align-self: start; font-size: .92rem; }
.pt-toc p { font-family: var(--pt-display); font-weight: 600; margin-bottom: 8px; }
.pt-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--pt-line); }
.pt-toc a { display: block; padding: 5px 0 5px 14px; color: var(--pt-muted); text-decoration: none; }
.pt-toc a:hover { color: var(--pt-ice); }
@media (max-width: 960px) {
  .pt-legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .pt-toc { position: static; }
}

/* ---------- Forms ---------- */

.pt-form-card {
  background: var(--pt-surface);
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 36px);
}
.pt-field { display: grid; gap: 6px; margin-bottom: 20px; }
.pt-field label { font-weight: 500; }
.pt-field input, .pt-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--pt-bg);
  border: 1px solid var(--pt-line);
  border-radius: 6px;
  color: var(--pt-text);
}
.pt-field textarea { min-height: 150px; resize: vertical; }
.pt-field input:focus-visible, .pt-field textarea:focus-visible { outline-offset: 0; border-color: var(--pt-ice); }
.pt-field input[aria-invalid="true"], .pt-field textarea[aria-invalid="true"] { border-color: var(--pt-error); }
.pt-hint { font-size: .88rem; color: var(--pt-muted); margin: 0; }
.pt-error { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--pt-error); font-size: .92rem; }
.pt-error:empty { display: none; }
.pt-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--pt-error);
  color: var(--pt-ink);
  font-weight: 700;
  font-size: .75rem;
}

.pt-steps-bar { list-style: none; display: flex; gap: 6px; margin: 0 0 28px; padding: 0; align-items: flex-end; }
.pt-steps-bar li {
  flex: 1;
  padding: 8px 10px 0;
  border-top: 4px solid var(--pt-raise);
  font-size: .85rem;
  color: var(--pt-muted);
}
.pt-steps-bar li.is-done, .pt-steps-bar li[aria-current="step"] { border-top-color: var(--pt-orange); color: var(--pt-text); }

.pt-code { display: flex; gap: 8px; margin: 6px 0 4px; }
.pt-code input {
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 0;
  text-align: center;
  font-family: var(--pt-display);
  font-weight: 800;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  background: var(--pt-bg);
  border: 1px solid var(--pt-line);
  border-radius: 6px;
}
.pt-code input:focus-visible { outline-offset: 0; border-color: var(--pt-ice); }
.pt-code.is-invalid input { border-color: var(--pt-error); }
.pt-resend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 18px 0 24px; font-size: .95rem; color: var(--pt-muted); }
.pt-link-btn {
  padding: 8px 0;
  background: none;
  border: 0;
  color: var(--pt-ice);
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}
.pt-done { text-align: left; }
.pt-done h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.pt-done-mark { width: 72px; height: 72px; margin-bottom: 18px; }

/* ---------- Toasts ---------- */

.pt-toasts {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}
.pt-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 10px 14px 16px;
  background: var(--pt-raise);
  border: 1px solid var(--pt-line);
  border-left: 4px solid var(--pt-ice);
  border-radius: 6px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .4);
  font-size: .95rem;
}
.pt-toast.is-success { border-left-color: var(--pt-orange); }
.pt-toast p { margin: 0; padding-top: 2px; }
.pt-toast button {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--pt-muted);
}
.pt-toast button:hover { color: var(--pt-text); background: var(--pt-surface); }

/* ---------- 404 ---------- */

.pt-lost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: clamp(48px, 8vw, 110px) 0; }
.pt-lost-links { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .pt-lost { grid-template-columns: 1fr; } .pt-lost svg { max-width: 260px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
}
