:root {
  color-scheme: light;
  --navy-950: #071426;
  --navy-900: #0c2038;
  --navy-800: #183654;
  --navy-700: #315373;
  --navy-600: #57728c;
  --navy-500: #748aa0;
  --paper: #f7f9fc;
  --white: #fff;
  --line: #d8e2ec;
  --line-strong: #b8c8d8;
  --teal: #008d98;
  --teal-light: #daf5f3;
  --coral: #e9695a;
  --coral-dark: #aa3d34;
  --coral-light: #fff0ed;
  --gold: #e5b343;
  --violet: #6554d7;
  --violet-light: #efedff;
  --green: #19754c;
  --green-light: #e9f6ef;
  --danger: #ad2d3b;
  --danger-light: #fff0f2;
  --focus: #ffb524;
  --shadow-sm: 0 7px 20px rgba(7, 20, 38, 0.09);
  --shadow-lg: 0 28px 70px rgba(7, 20, 38, 0.2);
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Outfit", system-ui, sans-serif;
  --utility: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; overflow-x: hidden; background: var(--paper); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--navy-900); background: var(--paper); font: 400 16px/1.5 var(--body); -webkit-tap-highlight-color: rgba(0, 141, 152, 0.18); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.56; }
a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-900); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 200; top: 0.75rem; left: 0.75rem; min-height: 44px; padding: 0.65rem 1rem; border-radius: 0.5rem; color: var(--white); background: var(--navy-950); transform: translateY(-170%); transition: transform 150ms ease; }
.skip-link:focus { transform: translateY(0); }
.connection-banner { position: sticky; z-index: 100; top: 0; display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.45rem max(1rem, env(safe-area-inset-right)) 0.45rem max(1rem, env(safe-area-inset-left)); color: #fff6e0; background: #62400d; font-size: 0.9rem; }
.connection-banner > span { width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; }

.topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0.85rem max(2rem, env(safe-area-inset-right)) 0.85rem max(2rem, env(safe-area-inset-left)); color: var(--white); background: var(--navy-900); }
.brand { display: inline-flex; min-width: 0; min-height: 44px; align-items: center; gap: 0.8rem; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand > span:last-child { display: grid; min-width: 0; }
.brand strong { font-size: 1.05rem; line-height: 1.15; }
.brand small { margin-top: 0.16rem; color: #a9bfd2; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; }
.brand__mark { position: relative; display: flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(255,255,255,0.24); border-radius: 50%; }
.brand__mark i { display: block; width: 6px; border-radius: 6px; background: #56d6d6; }
.brand__mark i:nth-child(1) { height: 12px; }
.brand__mark i:nth-child(2) { height: 22px; background: var(--gold); }
.brand__mark i:nth-child(3) { height: 16px; background: var(--coral); }
.topbar nav { display: flex; align-items: center; gap: 0.3rem; }
.topbar nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 0.55rem 0.75rem; border-radius: 0.5rem; color: #d8e5f1; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.topbar nav a:hover { color: var(--white); background: rgba(255,255,255,0.08); }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--display); }
h1 { max-width: 760px; margin-bottom: 1rem; font-size: clamp(3rem, 7vw, 6rem); line-height: 0.88; letter-spacing: -0.045em; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.025em; }
h3 { font-size: 1.18rem; line-height: 1.2; }
.eyebrow { margin-bottom: 0.45rem; color: var(--teal); font: 600 0.7rem/1.3 var(--utility); letter-spacing: 0.13em; text-transform: uppercase; }

.hero { position: relative; display: grid; min-height: 440px; grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); overflow: hidden; padding: clamp(4rem, 9vw, 8rem) max(2rem, calc((100vw - 1280px) / 2)); color: var(--white); background: var(--navy-900); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: 0.18; background-image: linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to right, transparent, #000 40%); }
.hero__copy { position: relative; z-index: 1; }
.hero__copy .eyebrow { color: #62e0df; }
.hero__copy > p:last-child { max-width: 650px; margin-bottom: 0; color: #c7d7e5; font-size: clamp(1rem, 2vw, 1.18rem); }
.hero__catalog { position: relative; z-index: 1; height: 270px; }
.hero__catalog article { position: absolute; display: grid; width: min(360px, 88%); min-height: 112px; gap: 0.4rem; padding: 1rem 1.15rem 1rem 1.35rem; border: 1px solid rgba(255,255,255,0.34); border-radius: 0.4rem; color: var(--navy-900); background: var(--white); box-shadow: 12px 16px 0 rgba(0,0,0,0.17); transform-origin: center; }
.hero__catalog article::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 7px; background: var(--teal); }
.hero__catalog article:nth-child(1) { top: 0; right: 8%; transform: rotate(4deg); }
.hero__catalog article:nth-child(2) { z-index: 2; top: 80px; right: 0; transform: rotate(-3deg); }
.hero__catalog article:nth-child(2)::before { background: var(--coral); }
.hero__catalog article:nth-child(3) { top: 155px; right: 12%; transform: rotate(2deg); }
.hero__catalog article:nth-child(3)::before { background: var(--gold); }
.hero__catalog span { color: var(--teal); font: 600 0.66rem var(--utility); letter-spacing: 0.1em; }
.hero__catalog strong { overflow: hidden; font-family: var(--display); font-size: 1.35rem; text-overflow: ellipsis; white-space: nowrap; }
.hero__catalog i { color: var(--navy-500); font: normal 500 0.68rem var(--utility); }

.search-deck { position: relative; z-index: 5; width: min(1180px, calc(100% - 2rem)); margin: -2rem auto 0; padding: 1.35rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--white); box-shadow: var(--shadow-lg); }
.search-deck__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.search-deck__heading h2 { font-family: var(--body); font-size: 1.4rem; font-weight: 700; }
.text-button { min-height: 44px; padding: 0.5rem 0.6rem; border: 0; color: var(--teal); background: transparent; font-weight: 700; text-decoration: underline; text-underline-offset: 0.22em; }
.text-button:hover { color: var(--navy-900); }
.filter-grid { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(160px, 0.75fr)) auto; align-items: start; gap: 0.8rem; }
.field { display: grid; min-width: 0; gap: 0.35rem; color: var(--navy-700); font-size: 0.8rem; font-weight: 700; }
.filter-grid .field { grid-template-rows: auto 48px minmax(1.2em, auto); margin-top: 0; }
.field__label { line-height: 1.5; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 0.72rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 0.55rem; color: var(--navy-900); background: var(--white); font-size: 0.94rem; font-weight: 400; }
.field textarea { resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--navy-500); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field small:not(.field-error) { color: var(--navy-500); font-weight: 400; }
.field__support { display: grid; min-width: 0; min-height: 1.2em; line-height: 1.2; }
.field__support > * { grid-area: 1 / 1; }
.field__support .field-error:empty { visibility: hidden; }
.filter-grid .field:has([aria-invalid="true"]) .field__support small:not(.field-error) { visibility: hidden; }
.field-error { min-height: 1.2em; color: var(--danger); font-weight: 600; }
.field--action .field__label { visibility: hidden; }
.field--action .button { width: 100%; align-self: stretch; white-space: nowrap; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.7rem 1rem; border: 1px solid var(--line-strong); border-radius: 0.58rem; color: var(--navy-900); background: var(--white); font-weight: 700; line-height: 1.15; text-decoration: none; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease; }
.button:hover:not(:disabled) { border-color: var(--navy-700); background: #f0f5f8; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button:active:not(:disabled) { transform: translateY(0); }
.button--primary { border-color: var(--teal); color: var(--white); background: var(--teal); }
.button--primary:hover:not(:disabled) { border-color: var(--navy-900); color: var(--white); background: var(--navy-900); }
.button--quiet { color: var(--navy-700); background: transparent; box-shadow: none; }

.catalog { width: min(1280px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(3.5rem, 7vw, 6rem) 0; scroll-margin-top: 1rem; }
.catalog__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.answer-safe-note { display: flex; max-width: 470px; align-items: flex-start; gap: 0.7rem; margin: 0; color: var(--navy-600); font-size: 0.84rem; }
.answer-safe-note > span:first-child { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-light); font-size: 1.2rem; }
.answer-safe-note strong { display: block; color: var(--navy-800); }
.bank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.bank-card { position: relative; display: flex; min-width: 0; min-height: 300px; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 0.8rem; background: var(--white); box-shadow: 0 1px 0 rgba(7,20,38,0.03); content-visibility: auto; contain-intrinsic-size: auto 310px; transition: border-color 170ms ease, transform 170ms ease, box-shadow 170ms ease; }
.bank-card::before { content: ""; display: block; height: 8px; flex: 0 0 8px; background: var(--teal); }
.bank-card[data-subject="physics"]::before, .bank-card[data-subject="chemistry"]::before { background: var(--coral); }
.bank-card[data-subject="geometry"]::before, .bank-card[data-subject="precalculus"]::before { background: var(--gold); }
.bank-card[data-subject="ela"]::before, .bank-card[data-subject="social-studies"]::before { background: var(--violet); }
.bank-card:hover { border-color: var(--navy-500); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.bank-card--unavailable { opacity: 0.72; }
.bank-card--unavailable::after { content: "Unavailable"; position: absolute; top: 1rem; right: 0.9rem; padding: 0.25rem 0.5rem; border-radius: 2rem; color: var(--danger); background: var(--danger-light); font: 600 0.62rem var(--utility); text-transform: uppercase; }
.bank-card__body { display: flex; min-width: 0; flex: 1; flex-direction: column; padding: 1.15rem; }
.bank-card__subject { margin-bottom: 0.8rem; color: var(--teal); font: 600 0.68rem var(--utility); letter-spacing: 0.1em; text-transform: uppercase; }
.bank-card h3 { margin-bottom: 0.55rem; overflow-wrap: anywhere; font-family: var(--display); font-size: 1.65rem; }
.bank-card__description { display: -webkit-box; min-height: 4.5em; margin-bottom: 1rem; overflow: hidden; color: var(--navy-600); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.bank-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.pill { display: inline-flex; min-height: 30px; align-items: center; padding: 0.28rem 0.58rem; border-radius: 2rem; color: var(--navy-700); background: var(--paper); font: 500 0.66rem var(--utility); text-transform: uppercase; }
.bank-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; padding: 0.85rem 1.15rem; border-top: 1px solid var(--line); background: #fbfcfe; }
.bank-card__actions .text-button { margin-right: auto; }
.bank-card__actions .button { min-height: 44px; padding: 0.55rem 0.8rem; font-size: 0.82rem; }
.bank-card__actions .text-button { font-size: 0.78rem; }

.state-card { display: grid; min-height: 330px; place-content: center; justify-items: center; padding: 2rem; border: 1px dashed var(--line-strong); border-radius: 0.8rem; color: var(--navy-600); background: rgba(255,255,255,0.7); text-align: center; }
.state-card h3 { margin: 0.8rem 0 0.4rem; color: var(--navy-900); font-size: 1.35rem; }
.state-card p { max-width: 520px; }
.state-card--error { border-style: solid; border-color: #e7b1b8; background: var(--danger-light); }
.state-card__mark { display: grid; width: 58px; height: 58px; place-items: center; border: 2px solid currentColor; border-radius: 50%; color: var(--danger); font: 700 1.25rem var(--utility); }
.loader { display: flex; height: 40px; align-items: flex-end; gap: 4px; }
.loader i { display: block; width: 7px; border-radius: 6px 6px 1px 1px; background: var(--teal); animation: pulse 800ms ease-in-out infinite alternate; }
.loader i:nth-child(1) { height: 14px; }
.loader i:nth-child(2) { height: 32px; animation-delay: -260ms; background: var(--gold); }
.loader i:nth-child(3) { height: 22px; animation-delay: -520ms; background: var(--coral); }
@keyframes pulse { from { transform: scaleY(0.65); } to { transform: scaleY(1); } }
.pagination { display: grid; justify-items: center; gap: 0.65rem; margin-top: 1.5rem; }
.pagination p { min-height: 1.4em; margin: 0; color: var(--navy-500); font-size: 0.82rem; }

footer { display: flex; min-height: 90px; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem max(2rem, calc((100vw - 1280px) / 2)); border-top: 1px solid var(--line); color: var(--navy-500); background: var(--white); font-size: 0.82rem; }
footer a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; }

.dialog { width: min(720px, calc(100% - 2rem)); max-height: min(90vh, 900px); padding: 0; overflow: hidden; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 1rem; color: var(--navy-900); background: var(--white); box-shadow: var(--shadow-lg); }
.dialog--preview { width: min(980px, calc(100% - 2rem)); max-width: calc(100vw - 2rem); }
.dialog--compact { width: min(560px, calc(100% - 2rem)); }
.dialog::backdrop { background: rgba(4,13,25,0.76); backdrop-filter: blur(5px); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.dialog__head .eyebrow { margin-bottom: 0.2rem; }
.dialog__head h2 { margin: 0; font-family: var(--body); font-size: 1.3rem; font-weight: 700; }
.dialog__body { max-height: calc(90vh - 156px); overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0.9rem 1.2rem; border-top: 1px solid var(--line); background: var(--paper); }
.icon-button { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--navy-700); background: var(--white); font-size: 1.3rem; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.icon-button:hover { border-color: var(--navy-700); color: var(--navy-950); background: #eef3f7; }
.preview-loading { display: grid; min-height: 300px; place-content: center; justify-items: center; color: var(--navy-600); }
.preview-loading p { margin-top: 0.8rem; }
.preview-head { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.preview-head h3 { margin-bottom: 0.35rem; font-family: var(--display); font-size: 2.1rem; }
.preview-head p { color: var(--navy-600); }
.preview-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.prompt-list { display: grid; gap: 0.7rem; }
.prompt-card { padding: 1rem; border: 1px solid var(--line); border-radius: 0.65rem; background: var(--white); }
.prompt-card > span { color: var(--teal); font: 600 0.67rem var(--utility); text-transform: uppercase; }
.prompt-card h4 { margin: 0.4rem 0 0.65rem; overflow-wrap: anywhere; font-size: 1rem; }
.choice-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.choice-preview li { min-width: 0; padding: 0.55rem 0.65rem; border-radius: 0.4rem; color: var(--navy-700); background: var(--paper); overflow-wrap: anywhere; }
.dialog--preview .dialog__body, .preview-content, .prompt-list, .prompt-card { min-width: 0; max-width: 100%; }
.preview-content .katex-display { max-width: 100%; padding-block: 0.15rem; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; }
.preview-content .katex-error { overflow-wrap: anywhere; white-space: normal; }
.preview-limit { margin: 1rem 0 0; padding: 0.75rem; border-left: 3px solid var(--teal); color: var(--navy-600); background: var(--teal-light); }
.preview-unavailable { display: grid; min-height: 300px; place-content: center; justify-items: center; text-align: center; }
.preview-unavailable > span { display: grid; width: 58px; height: 58px; place-items: center; border: 2px solid currentColor; border-radius: 50%; color: var(--danger); font-size: 1.4rem; }
.preview-unavailable h3 { margin: 0.8rem 0 0.4rem; }
.preview-unavailable p { max-width: 550px; color: var(--navy-600); }
.report-bank { padding: 0.75rem; border-left: 3px solid var(--teal); color: var(--navy-700); background: var(--teal-light); font-weight: 600; overflow-wrap: anywhere; }
.report-bank::before { content: "Reporting: "; color: var(--navy-500); font-weight: 400; }
.report-bank + .field, .dialog .field + .field { margin-top: 1rem; }
.confirm-row { display: flex; min-height: 60px; align-items: flex-start; gap: 0.7rem; margin-top: 1rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.55rem; background: var(--paper); cursor: pointer; }
.confirm-row input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 0.05rem; accent-color: var(--teal); }
.notice { margin-top: 1rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.55rem; }
.notice--error { border-color: #e7b1b8; color: #7b202b; background: var(--danger-light); }
.report-summary { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.report-summary > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0.7rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: 0.5rem; }
.report-summary strong { color: var(--navy-600); font-size: 0.78rem; }
.report-summary span { overflow-wrap: anywhere; }

.toast-region { position: fixed; z-index: 120; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); display: grid; width: min(380px, calc(100% - 2rem)); gap: 0.6rem; pointer-events: none; }
.toast { padding: 0.85rem 1rem; border: 1px solid #9bd1b7; border-radius: 0.65rem; color: #0f5435; background: #eefaf4; box-shadow: var(--shadow-lg); font-weight: 600; animation: toast-in 180ms ease-out both; }
.toast--error { border-color: #e7b1b8; color: #7b202b; background: var(--danger-light); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Ascent Arcade release surface */
html, body { color: #edf6ff; background: #08132b; }
.topbar { border-bottom: 1px solid rgba(104, 222, 220, 0.2); background: #08132b; }
.brand__mark { border-radius: 0.7rem; border-color: rgba(104, 222, 220, 0.38); background: linear-gradient(145deg, rgba(69, 215, 212, 0.2), rgba(136, 108, 255, 0.18)); }
.hero { background: radial-gradient(circle at 82% 20%, rgba(116, 80, 255, 0.22), transparent 35%), radial-gradient(circle at 15% 80%, rgba(58, 218, 215, 0.14), transparent 35%), #08132b; }
.hero__copy > p:last-child, .answer-safe-note, .bank-card__description, .state-card, .preview-head p, .specialized-games > p, footer { color: #b9c9db; }
.search-deck, .bank-card, .state-card, .dialog { border-color: #2a4165; color: #edf6ff; background: #101f3c; }
.search-deck { box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34); }
.search-deck__heading h2, .state-card h3, .answer-safe-note strong, .bank-card h3, .dialog__head h2 { color: #f7fbff; }
.field, .bank-card__meta, .pill { color: #c9d8e8; }
.field input, .field textarea, .field select { border-color: #395274; color: #f7fbff; background: #09172f; }
.field small:not(.field-error) { color: #9db1c8; }
.text-button { color: #65e6df; }
.text-button:hover { color: #fff; }
.button { border-color: #3d587d; color: #f4f9ff; background: #172a49; }
.button:hover:not(:disabled) { border-color: #65e6df; color: #fff; background: #21395c; }
.button--primary { border-color: #3cd6cf; color: #071426; background: #65e6df; }
.button--primary:hover:not(:disabled) { border-color: #ffd16a; color: #071426; background: #ffd16a; }
.pill { background: #1b3152; }
.bank-card__actions, .dialog__head, .dialog__actions { border-color: #2a4165; background: #0c1a34; }
.bank-card:hover { border-color: #65e6df; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3); }
.answer-safe-note > span:first-child, .preview-limit, .selected-bank { color: #bff8f4; background: rgba(70, 222, 215, 0.12); }
.dialog::backdrop { background: rgba(1, 6, 18, 0.84); }
.icon-button { border-color: #3b5475; color: #dce9f5; background: #172a49; }
.icon-button:hover { border-color: #65e6df; color: #fff; background: #21395c; }
.prompt-card, .choice-preview li, .confirm-row, .report-summary > div { border-color: #2a4165; color: #dce8f4; background: #132542; }
footer { border-color: #233a5c; background: #071126; }

.dialog--game-picker { width: min(1040px, calc(100% - 2rem)); }
.selected-bank { display: grid; gap: 0.25rem; margin-bottom: 1rem; padding: 0.9rem 1rem; border-left: 4px solid #65e6df; border-radius: 0.45rem; }
.selected-bank strong { color: #fff; font-size: 1.05rem; }
.selected-bank span { color: #b9c9db; font-size: 0.86rem; }
.game-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1.25rem 0 1.75rem; }
.game-choice { position: relative; display: grid; min-height: 154px; gap: 0.45rem; align-content: start; padding: 1rem; overflow: hidden; border: 1px solid #345072; border-radius: 0.8rem; color: #edf6ff; background: #132542; text-align: left; transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.game-choice::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: #65e6df; }
.game-choice[data-accent="coral"]::before { background: #ff7b6b; }
.game-choice[data-accent="violet"]::before { background: #9e8cff; }
.game-choice[data-accent="gold"]::before { background: #ffd16a; }
.game-choice:hover { border-color: #65e6df; background: #1a3153; transform: translateY(-2px); }
.game-choice strong { font-size: 1.05rem; }
.game-choice span { color: #b9c9db; font-size: 0.88rem; }
.game-choice i { align-self: end; margin-top: auto; color: #65e6df; font: normal 700 0.76rem var(--utility); text-transform: uppercase; }
.specialized-games { padding-top: 1.3rem; border-top: 1px solid #2a4165; }
.specialized-games h3 { margin-bottom: 0.45rem; color: #fff; font-size: 1.35rem; }
.specialized-game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.specialized-game-grid article { display: grid; gap: 0.35rem; padding: 0.85rem; border: 1px dashed #445d7c; border-radius: 0.65rem; background: rgba(10, 25, 49, 0.72); }
.specialized-game-grid strong { color: #ffd16a; }
.specialized-game-grid span { color: #aebfd1; font-size: 0.82rem; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero__catalog { display: none; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--search { grid-column: 1 / -1; }
  .bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .topbar { min-height: 70px; padding-inline: max(1rem, env(safe-area-inset-left)); }
  .topbar nav a:not(:first-child) { display: none; }
  .hero { min-height: 400px; padding: 4rem 1rem 5rem; }
  .hero h1 { font-size: clamp(3.25rem, 15vw, 5rem); }
  .search-deck { margin-top: -2.5rem; padding: 1rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .field--search { grid-column: auto; }
  .catalog { padding-top: 3rem; }
  .catalog__head { align-items: flex-start; flex-direction: column; }
  .bank-grid { grid-template-columns: 1fr; }
  .bank-card { min-height: 275px; }
  .game-choice-grid, .specialized-game-grid { grid-template-columns: 1fr; }
  .game-choice { min-height: 132px; }
  footer { align-items: flex-start; flex-direction: column; padding-inline: 1rem; }
  .choice-preview { grid-template-columns: 1fr; }
  .dialog, .dialog--preview, .dialog--compact { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); }
  .dialog__body { max-height: calc(100vh - 150px); }
  .dialog__actions { display: grid; grid-template-columns: 1fr; }
  .dialog__actions .button { width: 100%; }
  .report-summary > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

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

@media print {
  .topbar, .search-deck, .bank-card__actions, .pagination, footer, .connection-banner { display: none !important; }
  .hero { min-height: 0; padding: 2rem; color: var(--navy-900); background: var(--white); }
  .hero__copy > p:last-child { color: var(--navy-600); }
  .bank-grid { grid-template-columns: repeat(2, 1fr); }
}
