/* Tektite feature tour. Static, offline, no external requests. Tokens first; dark mode follows the system unless the toggle says otherwise. */
@font-face {
  font-family: 'Press Start 2P';
  src: url('press-start-2p.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fff8f0;
  --surface: #ffffff;
  --surface-2: #f6ece2;
  --ink: #1d2b53;
  --muted: #565d7e;
  --line: #e4d8cc;
  --accent: #1d2b53;
  --accent-ink: #fff1e8;
  --hi: #ffd84a;
  --link: #1f4fd8;
  --focus: #1f4fd8;
  --kbd-bg: #fff1e8;
  --kbd-line: #1d2b53;
  --shadow: 0 1px 2px rgb(29 43 83 / 0.08), 0 8px 24px rgb(29 43 83 / 0.08);
  --video-bg: #0b0f1a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0f1a;
    --surface: #131a2f;
    --surface-2: #1a2340;
    --ink: #fff1e8;
    --muted: #aab1cf;
    --line: #28325a;
    --accent: #ffd84a;
    --accent-ink: #14183a;
    --link: #8fb0ff;
    --focus: #8fb0ff;
    --kbd-bg: #1a2340;
    --kbd-line: #fff1e8;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}
:root[data-theme='dark'] {
  --bg: #0b0f1a;
  --surface: #131a2f;
  --surface-2: #1a2340;
  --ink: #fff1e8;
  --muted: #aab1cf;
  --line: #28325a;
  --accent: #ffd84a;
  --accent-ink: #14183a;
  --link: #8fb0ff;
  --focus: #8fb0ff;
  --kbd-bg: #1a2340;
  --kbd-line: #fff1e8;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a {
  color: var(--link);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 100;
}
.skip:focus {
  top: 8px;
}

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.logo {
  font: 13px/1 'Press Start 2P', monospace;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  text-decoration: none;
}
.top .grow {
  flex: 1;
}
.search {
  flex: 1 1 200px;
  max-width: 360px;
  min-width: 0;
  padding: 8px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.btn {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 40px;
}
.btn:hover {
  border-color: var(--muted);
}
#nav-toggle {
  display: none;
}

/* ---------- layout ---------- */
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.side {
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding-right: 8px;
  font-size: 14px;
}
.side h2 {
  margin: 18px 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.side h2:first-child {
  margin-top: 0;
}
.side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side a {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}
.side a:hover {
  background: var(--surface-2);
}
.side a.current {
  background: var(--accent);
  color: var(--accent-ink);
}
.side .missing::after {
  content: ' ·';
  color: var(--muted);
}

/* ---------- intro ---------- */
.intro h1 {
  margin: 0 0 8px;
  font: 22px/1.4 'Press Start 2P', monospace;
  color: var(--accent);
}
.intro p {
  max-width: 68ch;
  margin: 0 0 12px;
}
.banner {
  display: inline-block;
  margin: 4px 0 18px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
}
.reel {
  margin: 8px 0 8px;
}

/* ---------- feature sections ---------- */
.group {
  margin-top: 56px;
}
.group > h2 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.25;
}
.group > p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 70ch;
}
.feature {
  margin: 0 0 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.feature header {
  margin-bottom: 14px;
}
.kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.feature h3 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.3;
}
.feature h3 a {
  color: inherit;
  text-decoration: none;
}
.feature h3 a:hover::after {
  content: ' #';
  color: var(--muted);
}
.feature-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}
.feature-body.portrait {
  grid-template-columns: minmax(0, 1fr) 300px;
}
.feature h4 {
  margin: 18px 0 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.feature .summary {
  margin: 0;
}
.feature ol,
.feature ul {
  margin: 0;
  padding-left: 1.3em;
}
.feature li {
  margin: 0 0 6px;
}
.feature code {
  font: 0.92em ui-monospace, 'Cascadia Mono', Consolas, monospace;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}
table.controls {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.controls th,
table.controls td {
  text-align: left;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.controls th {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 7px;
  margin: 0 2px 2px 0;
  text-align: center;
  font: 600 13px/1.6 system-ui, sans-serif;
  background: var(--kbd-bg);
  color: var(--ink);
  border: 2px solid var(--kbd-line);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--kbd-line);
}

/* ---------- clips ---------- */
.clip {
  margin: 0;
}
@media (min-width: 981px) {
  .feature .clip {
    position: sticky;
    top: 84px;
  }
}
.frame {
  position: relative;
  background: var(--video-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  line-height: 0;
}
.frame video,
.frame img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.frame.portal video,
.frame.portal img {
  image-rendering: auto;
}
.frame .toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  line-height: 1.2;
  background: rgb(11 15 26 / 0.8);
  color: #fff1e8;
  border-color: rgb(255 241 232 / 0.5);
}
.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 16px;
  text-align: center;
  line-height: 1.5;
  color: #aab1cf;
  font-size: 14px;
}
.clip figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.clip figcaption a {
  margin-right: 10px;
}
.feature.is-phone .frame {
  max-width: 300px;
  margin-inline: auto;
}
.feature.is-phone-wide .frame {
  max-width: 560px;
}
.hidden {
  display: none !important;
}
.none {
  display: none;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
footer.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 48px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- phones and tablets ---------- */
@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 16px 64px;
    gap: 0;
  }
  #nav-toggle {
    display: inline-block;
  }
  .side {
    display: none;
    position: static;
    max-height: none;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .side.open {
    display: block;
  }
  .feature-body,
  .feature-body.portrait {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .feature .clip {
    order: -1;
  }
  .feature {
    padding: 16px;
  }
  .top {
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .search {
    order: 5;
    flex: 1 1 100%;
    max-width: none;
  }
  .logo span {
    display: none;
  }
  html {
    scroll-padding-top: 120px;
  }
}
@media (max-width: 480px) {
  .intro h1 {
    font-size: 17px;
  }
  .group > h2 {
    font-size: 22px;
  }
}
@media print {
  .top,
  .side {
    display: none;
  }
  .shell {
    display: block;
  }
  .feature {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* ---------- the players' guide (apps/site/public/guide): dressed like the landing page above it ---------- */
.players .top {
  background: #1d2b53;
  color: #fff1e8;
  border-bottom: 3px solid #000;
}
.players .top .logo {
  color: #ffec27;
}
.players .top .logo span {
  color: #fff1e8;
}
.players .top .btn {
  color: #fff1e8;
  background: transparent;
  border: 2px solid #fff1e8;
  border-radius: 0;
}
.players .top .search {
  border-radius: 0;
}
.players .top .btn-play {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font: 12px/1 'Press Start 2P', monospace;
  color: #1d2b53;
  background: #ffec27;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 3px 3px 0 #000;
  padding: 0 14px;
}
.players .top .btn-play:hover {
  background: #fff1e8;
}
.players .frame {
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 #000;
}
.players .frame .toggle {
  border-radius: 0;
}
.players .banner {
  border-radius: 0;
}
