@font-face { font-family: "Space Grotesk"; src: url("./fonts/SpaceGrotesk.ttf") format("truetype"); font-style: normal; font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Syne"; src: url("./fonts/Syne.ttf") format("truetype"); font-style: normal; font-weight: 400 800; font-display: swap; }
@font-face { font-family: "STIX Two Math"; src: url("./fonts/STIXTwoMath.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
:root {
  color-scheme: dark;
  scrollbar-gutter: stable;
  --bg: #181620;
  --text: #f4efe4;
  --muted: #b1a9bc;
  --mint: #d6e58b;
  --coral: #ff717b;
  --gold: #ffd16b;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(circle, #f4efe40a 1px, transparent 1px) 0 0 / 24px 24px, radial-gradient(ellipse at 50% 0%, #352536 0, transparent 65%), var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button { color: inherit; border: 0; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 5px; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
.shell { max-width: 1120px; margin: auto; padding: 0 32px 32px; }
.topbar { display: flex; align-items: center; gap: 24px; height: 88px; border-bottom: 1px solid #f4efe416; }
.main-nav { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--muted); }
.main-nav a { padding: 10px 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); }
.main-nav a[aria-current="page"] { box-shadow: 0 1px var(--mint); }
.brand { display: flex; align-items: center; gap: 13px; font-family: "Syne", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -.6px; }
.ai-accent { color: var(--coral); }
.brand-icon { display: grid; grid-template-columns: repeat(2, 9px); gap: 4px; transform: rotate(-8deg); }
.brand-icon i { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.brand-icon i:nth-child(2), .brand-icon i:nth-child(3) { background: var(--gold); }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; background: transparent; color: var(--muted); border-radius: 8px; }
.icon-button:hover { background: #ffffff09; color: var(--text); }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
h1, h2, .player-label { font-family: "Syne", sans-serif; }
h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.8px; }
#setup { max-width: 724px; margin: clamp(24px, 5vh, 56px) auto 0; }
#setup-title { margin-bottom: 30px; outline: none; }
.player-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.player-card { min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--side-color) 40%, #3e394a); border-top: 4px solid var(--side-color); border-radius: 10px; background: #1c1b29; box-shadow: 0 12px 0 -6px #0d0b13, 0 22px 34px -24px #000; }
.player-label { display: flex; align-items: center; gap: 16px; padding: 26px 24px; font-size: 30px; font-weight: 750; letter-spacing: -.8px; color: var(--side-color); background: color-mix(in srgb, var(--side-color) 9%, #1c1b29); border-bottom: 1px solid color-mix(in srgb, var(--side-color) 22%, transparent); }
.choice-group { display: grid; padding: 8px 16px 14px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-face { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 12px 16px; border-bottom: 1px solid #ffffff12; font-size: 16px; transition: background .18s, color .18s; }
.choice:last-child .choice-face { border-bottom-color: transparent; }
.choice-face > span:first-child { transition: transform .18s; }
.choice-face::before { content: ""; position: absolute; inset: 9px auto 9px 0; width: 3px; background: var(--side-color); opacity: 0; transition: opacity .18s; }
.choice input:checked + .choice-face { color: var(--side-color); background: color-mix(in srgb, var(--side-color) 12%, transparent); font-weight: 650; }
.choice input:checked + .choice-face::before { opacity: 1; }
.choice input:focus-visible + .choice-face { outline: 2px solid var(--side-color); outline-offset: -2px; }
.choice-indicator { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s; }
.choice input:checked + .choice-face .choice-indicator { color: #222126; background: var(--side-color); border-radius: 50%; opacity: 1; transform: translateX(0); }
.choice input:checked + .choice-face .choice-indicator::after { content: "\2713"; font-size: 15px; font-weight: 750; }
@media (hover: hover) {
  .choice:hover .choice-face { color: #222126; background: var(--side-color); border-bottom-color: transparent; }
  .choice:hover .choice-face > span:first-child { transform: translateX(6px); }
}
.choice:active .choice-face { background: color-mix(in srgb, var(--side-color) 65%, #1c1b29); color: #222126; }
.coral { --side-color: var(--coral); }
.gold { --side-color: var(--gold); }
.disc { border-radius: 50%; position: relative; background: radial-gradient(circle at 32% 24%, #ffffff35, transparent 52%), var(--side-color); box-shadow: inset 0 -4px 0 #00000025, 0 4px 12px #00000015; }
.disc::after { content: ""; position: absolute; inset: 13%; border-radius: 50%; border: 1px solid #ffffff55; }
.player-label .disc { width: 46px; height: 46px; flex-shrink: 0; }
select { min-width: 0; width: 100%; background: #292536; color: var(--text); border: 1px solid #51475f; border-radius: 8px; padding: 11px 12px; font-size: 14px; }
.settings { margin-top: 24px; }
.settings summary { color: var(--muted); font-size: 13px; width: fit-content; }
.settings-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 16px; }
.settings label { display: grid; gap: 8px; font-size: 12px; color: var(--muted); }
.start-area { margin-top: 28px; text-align: center; }
.primary-button { background: var(--mint); color: #26252b; border: 1px solid #ebf3c1; border-radius: 4px; padding: 13px 32px; font-size: 15px; font-weight: 700; box-shadow: 4px 4px 0 #0d0b13; transition: background .15s, transform .15s, box-shadow .15s; }
.primary-button:hover { background: #e4efb7; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #0d0b13; }
.primary-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #0d0b13; }
.start-area .primary-button { width: min(100%, 280px); }
#game { --game-width: min(680px, max(300px, calc((100svh - 228px) * 1.02))); display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, var(--game-width)) minmax(130px, 1fr); gap: 24px; align-items: start; margin: 16px auto 0; }
.game-sidebar { padding-top: calc(var(--game-width) * .123 + 32px); min-width: 0; }
.right-sidebar { text-align: right; }
.play-surface { container-type: inline-size; min-width: 0; }
.board-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.text-button { background: #ffffff05; border: 1px solid #f4efe42e; font-size: 12px; padding: 8px 12px; color: var(--text); border-radius: 4px; transition: color .15s, border-color .15s, background .15s; }
.text-button:hover { color: var(--mint); border-color: var(--mint); background: #d6e58b0a; }
.text-button:active { background: #d6e58b20; }
.match-player { display: flex; align-items: center; gap: 12px; min-height: 50px; color: var(--muted); }
.right-sidebar .match-player { flex-direction: row-reverse; }
.match-player.active { color: var(--text); }
.match-player h2 { color: var(--side-color); font-size: 21px; margin: 0 0 4px; }
.match-player .disc { width: 32px; height: 32px; flex-shrink: 0; }
.agent-name { font-size: 13px; }
.game-heading { text-align: left; margin: 28px 0 0; }
.game-heading h1 { font-size: 23px; line-height: 1.25; outline: none; }
.game-heading.won h1 { color: var(--winner-color, var(--mint)); }
.board-wrap { position: relative; width: 100%; padding-top: calc(12.3cqw + 32px); margin: 0 auto; isolation: isolate; }
.board-shadow { position: absolute; inset: calc(12.3cqw + 44px) -5px 22px; background: #100d17; z-index: -1; border-radius: 24px; }
.board-frame { position: relative; background: linear-gradient(140deg, #6e617c, #4a415c); border: 1px solid #91849d; border-radius: 23px; padding: 15px; box-shadow: inset 0 2px 0 #ffffff0c, 0 25px 55px #100d1722; }
.board-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.slot { aspect-ratio: 1; border-radius: 50%; background: #171722; box-shadow: inset 0 4px 0 #101019, inset 0 -1px 0 #91849d50; position: relative; display: grid; place-items: center; }
.slot .disc { width: 86%; height: 86%; box-shadow: inset 0 -4px 0 #00000030, 0 2px 3px #00000040; }
.slot.winning .disc { outline: 2px solid #fffff0; outline-offset: 3px; box-shadow: 0 0 24px color-mix(in srgb, var(--side-color) 40%, transparent), inset 0 -4px 0 #00000020; }
.slot.last-move .disc::before { content: ""; position: absolute; width: 4px; height: 4px; left: calc(50% - 2px); top: calc(50% - 2px); border-radius: 50%; background: #ffffffa0; }
.column-controls { position: absolute; inset: 15px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.column-target { background: transparent; border-radius: 30px; position: relative; min-width: 0; }
.column-target:enabled:hover, .column-target:enabled:focus-visible { background: #ffffff0a; }
.column-target:focus-visible { outline-offset: 3px; outline-width: 2px; }
.column-target::before { content: ""; width: 86%; aspect-ratio: 1; border-radius: 50%; position: absolute; bottom: calc(100% + 39px); left: 7%; background: radial-gradient(circle at 32% 24%, #ffffff35, transparent 52%), var(--side-color); box-shadow: inset 0 -4px 0 #00000025, 0 4px 12px #00000025; opacity: 0; transform: translateY(-5px); transition: opacity .12s, transform .12s; }
.column-target:enabled:hover::before, .column-target:enabled:focus-visible::before { opacity: 1; transform: translateY(0); }
.column-numbers { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 15px; gap: 10px; text-align: center; font-size: 11px; color: #a497b2; margin-top: 8px; }
.falling-piece { position: absolute; z-index: 2; pointer-events: none; }
.match-bottom { text-align: right; margin: 28px 0 0; }
.match-bottom .primary-button { padding: 11px 16px; }
#game-message { color: var(--mint); font-size: 13px; margin: 0 0 16px; }
#game-message:empty { display: none; }
.keyboard-hint { display: grid; gap: 8px; font-size: 11px; color: var(--muted); margin: 24px 0 0; }
.keyboard-hint .separator { display: none; }
kbd { font-family: inherit; font-size: 10px; border: 1px solid #ffffff1a; background: #ffffff06; border-radius: 4px; padding: 1px 5px; }
.separator { margin: 0 8px; color: #61718c; }
.secondary-button { background: #342c42; color: var(--text); border: 1px solid #6d5d7d; border-radius: 9px; padding: 9px 16px; font-size: 13px; }
.skip-link { position: fixed; top: -60px; left: 15px; background: var(--mint); padding: 12px; color: #102525; z-index: 10; }
.skip-link:focus { top: 10px; }
.details-page { max-width: 640px; margin: 40px auto 0; }
.theory-content { padding: 4px 0 8px; font-size: 14px; line-height: 1.75; color: #ded6e7; }
.theory-content h2 { margin: 28px 0 10px; font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -.3px; }
.theory-content p { margin: 0 0 14px; }
.theory-content a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.visually-hidden { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.theory-figure { max-width: 520px; margin: 24px auto 32px; }
.theory-figure img { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; border: 1px solid #f4efe419; border-radius: 10px; }
.theory-figure figcaption { margin: 14px 0 0; padding-left: 12px; border-left: 2px solid var(--mint); color: var(--muted); font-size: 13px; font-style: italic; line-height: 1.6; }
.figure-label { display: block; margin-bottom: 5px; color: var(--mint); font-size: 11px; font-weight: 600; font-style: normal; letter-spacing: .8px; text-transform: uppercase; }
.references { padding: 0 0 0 18px; margin: 18px 0 36px; font-size: 13px; }
.references li { margin-bottom: 10px; overflow-wrap: anywhere; }
.math-equations { padding: 18px 12px; margin: 20px 0; border-block: 1px solid #f4efe42e; color: var(--text); }
.math-equations .math-step { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.math-equations math { font-family: "STIX Two Math", "Cambria Math", math; font-size: clamp(18px, 3.8vw, 22px); margin: 0 0 24px; }
.math-equations math:last-child { margin-bottom: 0; }
.implementation-note { font-size: 13px; }
.landing-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 76px 0 88px; }
.hero-copy h1 { font-size: clamp(42px, 4.8vw, 60px); line-height: 1.08; letter-spacing: -1.8px; font-weight: 750; }
.hero-copy > p { max-width: 390px; font-size: 17px; line-height: 1.7; color: var(--muted); margin: 26px 0 30px; }
.hero-play { display: inline-flex; justify-content: center; align-items: center; min-width: 210px; padding: 18px 28px; font-size: 20px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.github-link { display: inline-flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 14px; color: var(--text); }
.github-link:hover { color: var(--mint); }
.github-link .star-icon { width: 17px; height: 17px; color: var(--gold); }
.github-link:hover .star-icon { fill: var(--gold); }
.github-stars { display: block; width: auto; height: 20px; }
.site-footer { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px 40px; margin-top: 16px; padding: 30px 0 12px; border-top: 1px solid #ffffff18; font-size: 13px; color: var(--muted); }
.footer-title { display: inline-block; margin-bottom: 12px; font-family: "Syne", sans-serif; color: var(--text); font-size: 17px; font-weight: 700; }
.footer-credit p { margin: 0; line-height: 1.8; }
.footer-credit .footer-license { margin-top: 6px; font-size: 12px; }
.footer-license a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 3px; }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.hero-board { transform: rotate(-7deg); padding: 12px; }
.hero-board .board-frame { box-shadow: 12px 18px 0 #0d0b13, 0 36px 60px #0003; }
.hero-board .slot.winning .disc { outline-color: var(--gold); }
.project-story { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; padding: 38px 0; border-top: 1px solid #ffffff18; }
.project-story h2 { margin: 3px 0 0; font-size: 23px; line-height: 1.3; letter-spacing: -.5px; font-weight: 650; }
.project-story p { margin: 0 0 18px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.project-story p:last-child { margin-bottom: 0; }
.story-link { display: inline-flex; align-items: center; color: var(--mint); font-size: 14px; padding: 3px 0; }
.story-link:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 850px) {
  .landing-hero { gap: 24px; padding-top: 48px; }
  .hero-copy h1 { font-size: 48px; }
  #game { --game-width: min(600px, calc(100vw - 64px)); max-width: 600px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .game-sidebar { display: contents; }
  #coral-player { grid-column: 1; grid-row: 1; }
  #gold-player { grid-column: 2; grid-row: 1; text-align: right; }
  #gold-player .match-player { flex-direction: row-reverse; }
  .match-player { min-height: 40px; }
  .match-player h2 { font-size: 18px; }
  .match-player .disc { width: 27px; height: 27px; }
  .board-toolbar { justify-content: center; }
  .game-heading { grid-column: 1 / -1; grid-row: 2; text-align: center; margin: 4px 0 0; }
  .play-surface { display: contents; container-type: normal; }
  .board-wrap { grid-column: 1 / -1; grid-row: 3; padding-top: calc(12vw + 28px); }
  .board-shadow { top: calc(12vw + 40px); }
  .match-bottom { grid-column: 1 / -1; grid-row: 4; text-align: center; margin-top: 4px; }
  .keyboard-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
}
@media (max-width: 650px) {
  .shell { padding: 0 18px 24px; }
  .topbar { height: 72px; }
  .brand { font-size: 18px; }
  .topbar { gap: 16px; }
  .main-nav { gap: 16px; font-size: 13px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 72px; padding: 12px 0; row-gap: 6px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; gap: 24px; }
  .main-nav a { padding: 6px 0; }
  .topbar .icon-button { margin-left: auto; }
  .landing-hero { grid-template-columns: 1fr; gap: 38px; padding: 38px 0 48px; }
  .hero-copy h1 { font-size: clamp(42px, 11vw, 58px); letter-spacing: -1.8px; }
  .hero-copy > p { font-size: 16px; margin: 22px 0 26px; }
  .hero-play { width: 100%; }
  .hero-board { max-width: 340px; width: 100%; justify-self: center; }
  .project-story { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
  #setup { margin-top: 28px; }
  .player-choices { grid-template-columns: 1fr; gap: 18px; }
  .player-label { padding: 22px; font-size: 27px; }
  .details-page { margin-top: 28px; }
  .agent-name { font-size: 12px; }
  .game-heading h1 { font-size: 22px; }
  .board-frame { padding: 9px; border-radius: 16px; }
  .board-grid, .column-controls, .column-numbers { gap: 5px; }
  .column-controls { inset: 9px; }
  .slot { box-shadow: inset 0 3px 0 #101019; }
  .slot .disc { box-shadow: inset 0 -3px 0 #00000025; }
  .column-numbers { padding: 0 9px; margin-top: 8px; font-size: 10px; }
  .slot.winning .disc { outline-width: 1.5px; outline-offset: 2px; }
  .column-target::before { bottom: calc(100% + 33px); }
  .keyboard-hint { line-height: 2; font-size: 10px; }
  .keyboard-hint .separator { margin: 0 5px; }
  .board-shadow { border-radius: 16px; inset: calc(12vw + 36px) -3px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
