/* Opt-in standalone shell. Future lobbies can override the accent variables. */
.oa-app {
    margin: 0;
    color: var(--oa-ink);
    background: var(--oa-paper);
    font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
.oa-app *, .oa-app *::before, .oa-app *::after { box-sizing: border-box; }
.oa-app a { color: inherit; text-decoration: none; }
.oa-app button, .oa-app input { font: inherit; }
.oa-app :focus-visible { outline: 3px solid var(--oa-accent); outline-offset: 5px; }
.oa-app summary { cursor: pointer; }
.oa-first-screen {
    /* Navigation participates in this grid, so no guessed header offset is needed.
       min-height lets zoomed text/short landscape screens grow safely. */


    min-height: calc(100dvh - var(--oa-header-height, 0px));
    display: grid;
    grid-template-rows: 1fr;
    background: var(--oa-paper);
}
.oa-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px clamp(20px, 4vw, 64px); }
.oa-brand { font-size: 19px; font-weight: 650; letter-spacing: -.7px; white-space: nowrap; }
.oa-brand span { color: var(--oa-accent); }
.oa-brand-dot { margin-left: 1px; }
.oa-back { font-size: 13px; color: var(--oa-muted) !important; }
.oa-back span { margin-right: 6px; }
.oa-back:hover, .oa-premium:hover, .oa-guide-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.oa-lobby { display: grid; place-items: center; padding: 48px 20px 52px; min-width: 0; }
.oa-lobby-content { width: min(100%, 760px); text-align: center; }
.oa-category { display: inline-block; padding: 7px 12px; border: 1px solid #cddbe9; border-radius: 30px; color: var(--oa-accent); font-size: 10px; font-weight: 600; letter-spacing: 1.8px; }
.oa-lobby h1 { margin: 24px 0 16px; font-size: clamp(36px, 4.8vw, 64px); line-height: 1.12; font-weight: 500; letter-spacing: -.04em; }
.oa-lobby h1 span { color: var(--oa-accent); white-space: nowrap; }
.oa-subtitle { margin: 0 auto; max-width: 560px; font-size: clamp(15px, 1.7vw, 19px); line-height: 1.65; color: var(--oa-muted); }
.oa-selected-mode { margin: 30px 0 12px; color: var(--oa-muted); font-size: 11px; letter-spacing: .6px; }
.oa-actions { position: relative; display: flex; justify-content: center; gap: 10px; width: min(100%, 326px); margin: 0 auto; }
.oa-settings, .oa-primary { height: 54px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.oa-settings { width: 54px; color: var(--oa-accent); border: 1px solid #bdcbdc; background: #ffffff70; list-style: none; }
.oa-settings::-webkit-details-marker, .oa-help summary::-webkit-details-marker { display: none; }
.oa-settings:hover, .oa-mode-picker[open] .oa-settings { background: #e9eff6; }
.oa-primary { gap: 22px; flex: 1; padding: 0 18px; background: var(--oa-accent); color: white !important; font-size: 14px; font-weight: 500; }
.oa-primary:hover { background: var(--oa-accent-dark); }
.oa-mode-menu { position: absolute; top: calc(100% + 10px); left: 0; width: 100%; min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--oa-line); border-radius: 12px; text-align: left; background: white; box-shadow: 0 12px 32px #20304714; z-index: 3;  max-height: min(24rem, 45dvh); overflow-y: auto; overscroll-behavior: contain; }
.oa-menu-heading { padding: 10px 12px; font-size: 9px; letter-spacing: 1.4px; color: var(--oa-muted); }
.oa-mode-option { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 6px; cursor: pointer; }
.oa-mode-option:hover, .oa-mode-option:focus-within { background: #f2f5f9; }
.oa-mode-option input { accent-color: var(--oa-accent); flex-shrink: 0; margin: 0; }
.oa-mode-copy { min-width: 0; }
.oa-mode-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.oa-lock { flex-shrink: 0; color: var(--oa-muted); }
.oa-mode-description { display: block; margin-top: 5px; font-size: 10px; line-height: 1.5; color: var(--oa-muted); }
.oa-mode-unavailable { opacity: .6; cursor: default; }
.oa-scoring { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 23px 0 20px; color: var(--oa-muted); font-size: 11px; line-height: 1.5; }
.oa-scoring strong { font-weight: 600; margin-right: 3px; }
.oa-scoring .oa-correct { color: #32745b; }
.oa-scoring .oa-incorrect { color: #a74d51; }
.oa-help { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; }
.oa-help summary { display: flex; justify-content: center; align-items: center; gap: 7px; list-style: none; color: var(--oa-muted); font-size: 12px; line-height: 24px; }
.oa-info-icon { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid #8b96a4; border-radius: 50%; font-size: 9px; font-family: Georgia, serif; }
.oa-help p { position: absolute; z-index: 2; top: 100%; left: 50%; transform: translateX(-50%); width: min(360px, calc(100vw - 40px)); margin: 10px 0 0; padding: 16px 18px; border: 1px solid var(--oa-line); border-radius: 8px; background: white; text-align: left; font-size: 12px; line-height: 1.8; color: var(--oa-muted); box-shadow: 0 8px 24px #2030470d; }
.oa-premium { display: inline-block; margin-top: 29px; color: var(--oa-accent) !important; font-size: 11px; line-height: 1.6; }
.oa-premium span { margin-left: 5px; }
.oa-disclaimer { text-align: center; margin: 0; padding: 22px 20px 27px; font-size: 10px; line-height: 1.7; color: #77818d; }
.oa-guide { border-top: 1px solid var(--oa-line); padding: 80px 24px; background: #fff; }
.oa-guide-inner { max-width: 760px; margin: auto; }
.oa-eyebrow { color: var(--oa-accent); font-size: 10px; letter-spacing: 1.7px; }
.oa-guide h2 { font-size: clamp(25px, 3vw, 34px); font-weight: 500; letter-spacing: -.7px; margin: 18px 0; }
.oa-guide-intro, .oa-faqs p { color: var(--oa-muted); font-size: 14px; line-height: 1.9; }
.oa-faqs { margin: 30px 0; border-top: 1px solid var(--oa-line); }
.oa-faqs details { border-bottom: 1px solid var(--oa-line); }
.oa-faqs summary { padding: 20px 28px 20px 0; font-size: 14px; line-height: 1.6; }
.oa-faqs p { margin: 0 0 20px; }
.oa-guide-link { color: var(--oa-accent) !important; font-size: 13px; line-height: 1.8; }
.oa-visually-hidden, .oa-skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.oa-skip-link:focus { position: absolute; z-index: 10; background: white; padding: 16px; }
.oa-noscript-modes { margin: 20px auto; font-size: 12px; line-height: 1.8; }
.oa-noscript-modes a { text-decoration: underline; }
@media (max-width: 480px) {
    .oa-nav { padding: 22px 20px; gap: 12px; }
    .oa-brand { font-size: 16px; }
    .oa-back { font-size: 11px; }
    .oa-back span { display: none; }
    .oa-lobby { padding: 40px 20px 55px; }
    .oa-scoring { gap: 12px; font-size: 10px; }
    .oa-guide { padding: 56px 22px; }
}

/* Shared header/footer remain untouched; all refinements belong to this wrapper. */
.oa-app { width: 100%; min-width: 0; line-height: 1.5; }
.oa-app .oa-lobby h1 { font-weight: 600; }
.oa-app .oa-category { background: #f3f7fc; border-color: #bfd1e5; }
.oa-app .oa-settings { background: white; border-color: #aabed5; }
.oa-app .oa-primary { font-weight: 600; box-shadow: 0 3px 8px #123a7018; }
.oa-app .oa-mode-menu {
    top: auto; bottom: calc(100% + 10px); z-index: 1001;
    max-height: calc(100dvh - 24px); border-color: #b9cce0;
    box-shadow: 0 10px 32px #123a7026;
}
.oa-app .oa-mode-option { padding: 10px; }
.oa-app .oa-mode-title { font-size: 12px; }
.oa-app .oa-mode-option:has(input:checked) { background: #edf4fc; }
.oa-app .oa-mode-menu[data-positioned] { position: fixed; bottom: auto; }
.oa-app .oa-help summary { font-weight: 400; }

/* Final Optiver visual treatment; shared navigation and footer are unaffected. */
.oa-app.oa-standard .oa-first-screen {
    background: #fafbff;
}

.oa-app.oa-standard .oa-lobby h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5.65vw, 76px);
}
.oa-app.oa-standard .oa-actions { width: min(calc(100% - 3px), 367px); margin-top: 24px; gap: 9px; }
.oa-app.oa-standard .oa-settings,
.oa-app.oa-standard .oa-primary { height: 61px; }
.oa-app.oa-standard .oa-settings { width: 61px; }
.oa-app.oa-standard .oa-settings svg { width: 24px; height: 24px; }
.oa-app.oa-standard .oa-primary { font-size: 16px; gap: 28px; }
.oa-app.oa-standard .oa-scoring {   margin: 19px 0 23px; }
.oa-app.oa-standard .oa-help summary { font-size: 14px; line-height: 24px;  gap: 8px; }
.oa-app.oa-standard .oa-info-icon {
    display: block; flex: 0 0 18px; width: 18px; height: 18px;
    border: 0; border-radius: 0; overflow: visible;
}
.oa-app.oa-standard .oa-premium {
    font-size: 14px; font-weight: 700; margin-top: 28px;
    text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.oa-app.oa-standard .oa-premium:hover { color: var(--oa-accent-dark) !important; text-decoration: underline; }
@media (max-width: 480px) {
    .oa-app.oa-standard .oa-lobby { padding: 40px 20px; }
    .oa-app.oa-standard .oa-actions { gap: 7px; margin-top: 28px; }
    .oa-app.oa-standard .oa-primary { font-size: 14px; gap: 20px; padding-inline: 12px; }
    .oa-app.oa-standard .oa-scoring { font-size: 12px; gap: 14px; }
    .oa-app.oa-standard .oa-premium { font-size: 13px; max-width: 320px; }
}

/* Optiver colour refresh. Geometry and selector positioning are unchanged. */

.oa-app.oa-standard .oa-primary {
    background: var(--oa-accent);
    border: 1px solid #3b59ed;
    border-radius: 11px;
    box-shadow: 0 6px 16px rgba(66, 99, 255, .22), 0 2px 3px rgba(66, 99, 255, .10), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: background-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}
.oa-app.oa-standard .oa-primary:hover {
    background: #3859f3;
    box-shadow: 0 9px 22px rgba(66, 99, 255, .28), 0 3px 6px rgba(66, 99, 255, .10), inset 0 1px 0 rgba(255, 255, 255, .16);
    transform: translateY(-2px);
}
.oa-app.oa-standard .oa-primary:active {
    background: #3451e8;
    box-shadow: 0 2px 5px rgba(66, 99, 255, .20), inset 0 1px 2px rgba(29, 48, 145, .12);
    transform: translateY(1px);
}
.oa-app.oa-standard .oa-settings {
    border: 1px solid #8799f3;
    border-radius: 11px;
    background: #f0f3ff;
    box-shadow: 0 2px 6px rgba(66, 99, 255, .08);
    color: #3856e3;
    transition: background-color 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}
.oa-app.oa-standard .oa-settings:hover {
    background: #e8edff;
    border-color: #4263ff;
    box-shadow: 0 3px 9px rgba(66, 99, 255, .10);
}
.oa-app.oa-standard .oa-mode-picker[open] .oa-settings,
.oa-app.oa-standard .oa-settings:active { background: #dfe6ff; border-color: #4263ff; }
.oa-app.oa-standard .oa-mode-menu {
    background: #fff; border-color: #cad4fa;
    box-shadow: 0 12px 32px rgba(42, 66, 148, .15), 0 2px 6px rgba(42, 66, 148, .06);
}
.oa-app.oa-standard .oa-mode-option:hover,
.oa-app.oa-standard .oa-mode-option:focus-within { background: #f0f3ff; }
.oa-app.oa-standard .oa-mode-option:has(input:checked) { background: #e9eeff; }
/* Saturated text variants retain 4.5:1 contrast at the existing small sizes. */
.oa-app.oa-standard .oa-scoring .oa-correct { color: #008458; }
.oa-app.oa-standard .oa-scoring .oa-incorrect { color: #d52649; }
.oa-app.oa-standard .oa-scoring { color: #657189; }
.oa-app.oa-standard .oa-help summary { color: #3e4d65; transition: color 150ms ease; }
.oa-app.oa-standard .oa-info-icon { color: #4263ff; }
.oa-app.oa-standard .oa-help summary:hover,
.oa-app.oa-standard .oa-help[open] summary { color: #3451e8; }
.oa-app.oa-standard .oa-premium { transition: color 150ms ease; }
.oa-app.oa-standard :focus-visible {
    outline: 3px solid #3451e8;
    outline-offset: 5px;
}
@media (prefers-reduced-motion: reduce) {
    .oa-app.oa-standard .oa-primary,
    .oa-app.oa-standard .oa-settings,
    .oa-app.oa-standard .oa-help summary,
    .oa-app.oa-standard .oa-premium { transition: none; }
    .oa-app.oa-standard .oa-primary:hover,
    .oa-app.oa-standard .oa-primary:active { transform: none; }
}

/* Final content refinements; retain the approved vibrant palette and controls. */
.oa-app.oa-standard .oa-lobby {
    grid-template-rows: minmax(24px, .8fr) auto minmax(24px, 1.2fr);
    padding-block: 24px;
}
.oa-app.oa-standard .oa-lobby-content { grid-row: 2; }
.oa-app.oa-standard .oa-category {
    margin-bottom: 12px; padding: 7px 13px;
    color: #3451e8; background: #eef2ff; border: 1px solid #b9c6ff;
    font-size: 10px; font-weight: 600; letter-spacing: 1.8px;
}
.oa-app.oa-standard .oa-scoring { font-size: 14px; gap: 24px; font-weight: 500; align-items: baseline; }
.oa-app.oa-standard .oa-scoring strong { font-size: 20px; font-weight: 700; margin-right: 5px; }
.oa-app.oa-standard .oa-correct strong { color: #00996b; }
.oa-app.oa-standard .oa-incorrect strong { color: #ef365b; }
.oa-app.oa-standard .oa-menu-heading { font-size: 10px; }
.oa-app.oa-standard .oa-mode-title { font-size: 13.5px; line-height: 1.5; }
.oa-app.oa-standard .oa-mode-description { font-size: 11.5px; line-height: 1.6; }
.oa-app.oa-standard .oa-mode-option { padding: 11px 10px; gap: 11px; }
.oa-app.oa-standard .oa-mode-option input { width: 16px; height: 16px; }
.oa-app.oa-standard .oa-lock { width: 15px; height: 15px; }
.oa-app.oa-standard .oa-guide h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.35; }
.oa-app.oa-standard .oa-guide-intro,
.oa-app.oa-standard .oa-faqs p { font-size: 16px; line-height: 1.85; }
.oa-app.oa-standard .oa-faqs summary { font-size: 16px; font-weight: 500; line-height: 1.6; }
.oa-app.oa-standard .oa-eyebrow { font-size: 11px; }
.oa-app.oa-standard .oa-guide-link { font-size: 15px; }
@media (max-width: 480px) {
    .oa-app.oa-standard .oa-lobby { grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); padding-block: 36px; }
    .oa-app.oa-standard .oa-scoring { font-size: 12px; gap: 14px; }
    .oa-app.oa-standard .oa-category { margin-bottom: 10px; }
}
