/* Base */
:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}
img{max-width:100%}
[hidden]:not([hidden=until-found i]){display:none!important}


/* Climb and trail games additions */
.profile-wrap { margin-top: 14px; }
.profile { width: 100%; height: auto; display: block; }
.pill.bad { background: var(--bad-soft); color: var(--bad); cursor: pointer; }
.node.crev { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.node.crev.done { background: var(--bad-soft); color: var(--bad); }
.crev-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); flex: none; }
.crev-card { border-left: 4px solid var(--bad); }
.unit-h .num.flagged { color: var(--ok); }
.unit-h .num.flagged svg { width: 20px; height: 20px; }
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; margin-top: 10px; }
.flag { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 4px; border-radius: 8px; border: 1px dashed var(--line); font: 600 .78rem var(--font-mono); color: var(--muted); }
.flag svg { width: 13px; height: 13px; }
.flag.on { border: 1px solid var(--ok); background: var(--ok-soft); color: var(--ok); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.badge { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; opacity: .7; }
.badge.on { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.badge b { display: block; font-size: .92rem; } .badge small { color: var(--muted); font-size: .8rem; }
.medal { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface2); border: 2px solid var(--line); }
.badge.on .medal { background: var(--accent); border-color: var(--ok); color: var(--accent-ink); }
.medal svg { width: 14px; height: 14px; }
.bins { display: grid; gap: 8px; }
.bin .k { min-width: 2.6em; }
.cairn-stone { border-left: 4px solid var(--blue); }
.av-clock { font-size: 1.6rem; font-weight: 700; color: var(--blue); }
.av-bar i { background: var(--blue); transition: width .2s linear; }
.game-tile { display: flex; flex-direction: column; align-items: flex-start; }
.game-tile .btn { margin-top: auto; }
@media (max-width: 520px) { .secbar { grid-template-columns: 1fr; } }
.secbar .card.game-tile, .secbar .card.game-tile p { text-align: left; }
/* Illustrated trail map */
.mtn { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #8fc3ea; }
.mtn-img, .mtn-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mtn-camp, .mtn-you { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; }
.mtn-camp .pin { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid #6b7c8f; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); flex: none; }
.mtn-camp.on .pin { background: var(--accent); border-color: #fff; color: var(--accent-ink); }
.mtn-camp .pin svg { width: 12px; height: 12px; }
.mtn-camp .tag, .mtn-you .tag { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; background: rgba(255,255,255,.92); color: #16263a; border-radius: 6px; padding: 2px 7px; font: 600 .74rem/1.25 var(--font-mono); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.mtn-camp .tag small { display: block; font-weight: 500; font-size: .66rem; color: #4a5b6e; }
.mtn-camp.left .tag { right: calc(100% + 6px); text-align: right; }
.mtn-camp.right .tag { left: calc(100% + 6px); }
.mtn-camp:not(.on) .tag { opacity: .85; }
.mtn-you { z-index: 2; }
.mtn-you .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7), 0 1px 5px rgba(0,0,0,.4); animation: mtnpulse 2s ease-out infinite; }
.mtn-you .tag { left: calc(100% + 8px); background: var(--blue); color: #fff; }
@keyframes mtnpulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8), 0 1px 5px rgba(0,0,0,.4); } 100% { box-shadow: 0 0 0 14px rgba(255,255,255,0), 0 1px 5px rgba(0,0,0,.4); } }
@media (prefers-reduced-motion: reduce) { .mtn-you .dot { animation: none; } }
@media (max-width: 520px) { .mtn-camp .tag small { display: none; } .mtn-camp .tag, .mtn-you .tag { font-size: .62rem; padding: 1px 5px; } .mtn-camp .pin { width: 16px; height: 16px; border-width: 2px; } .mtn-camp .pin svg { width: 9px; height: 9px; } .mtn-you .dot { width: 14px; height: 14px; } }
.mtn-you.flip .tag { left: auto; right: calc(100% + 8px); }
.mtn-you .ava.you-ava { width: 44px; height: 44px; border: 3px solid #fff; animation: mtnpulse 2s ease-out infinite; }
@media (max-width: 520px) { .mtn-you .ava.you-ava { width: 30px; height: 30px; border-width: 2px; } }
@media (prefers-reduced-motion: reduce) { .mtn-you .ava.you-ava { animation: none; } }
/* Crew social */
.tabs button { position: relative; }
.tabs button.has-new::after { content: ""; position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.ava { --h: 200; position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; background: hsl(var(--h) 55% 42%); color: #fff; font: 700 .78rem var(--font-mono); overflow: hidden; border: 2px solid #fff; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava.sm { width: 26px; height: 26px; font-size: .64rem; }
.ava.me { box-shadow: 0 0 0 2px var(--blue); }
.mtn-crew { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; z-index: 2; }
.mtn-crew .ava-stack { display: flex; }
.mtn-crew .ava { width: 30px; height: 30px; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
.mtn-crew .ava + .ava { margin-left: -10px; }
.mtn-crew.me .ava.me { box-shadow: 0 0 0 3px var(--blue), 0 1px 5px rgba(0,0,0,.4); }
.mtn-crew .tag { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: rgba(255,255,255,.94); color: #16263a; border-radius: 6px; padding: 2px 7px; font: 600 .74rem/1.3 var(--font-mono); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.mtn-crew.me .tag { background: var(--blue); color: #fff; }
.mtn-crew.flip .tag { left: auto; right: calc(100% + 6px); }
@media (max-width: 520px) { .mtn-crew .ava { width: 22px; height: 22px; font-size: .55rem; border-width: 1.5px; } .mtn-crew .ava + .ava { margin-left: -8px; } .mtn-crew .tag { font-size: .6rem; padding: 1px 5px; } }
.composer { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(21,35,48,.06); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,159,.15); }
.composer-main { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 4px; }
.composer textarea { flex: 1; min-height: 64px; resize: vertical; border: 0; padding: 6px 2px; background: #fff; color: var(--fg); font-family: var(--font-body, inherit); font-size: 1rem; line-height: 1.45; box-shadow: none; outline: none; }
.composer textarea::placeholder { color: #7a8794; opacity: 1; font-family: inherit; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 12px 12px; }
.composer-foot p { margin: 0; font-size: .82rem; color: var(--muted); }
.composer-foot .btn[disabled] { opacity: .5; cursor: default; }
.feed { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.feed-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.feed-item.post { border-left: 4px solid var(--blue); }
.feed-head { display: flex; gap: 10px; align-items: flex-start; }
.feed-meta { flex: 1; min-width: 0; font-size: .95rem; line-height: 1.4; }
.feed-meta small { display: block; font-size: .8rem; }
.kind { display: inline-block; font: 600 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; padding: 3px 6px; border-radius: 5px; margin-left: 2px; vertical-align: 1px; }
.badge-k { background: var(--accent-soft); color: var(--ok); } .flag-k { background: var(--ok-soft); color: var(--ok); }
.task-k { background: var(--surface2); color: var(--fg); } .post-k { background: var(--blue-soft, var(--surface2)); color: var(--blue); }
.feed-text { white-space: pre-wrap; margin: 10px 0 6px; overflow-wrap: anywhere; }
.feed-quote { margin: 8px 0 0; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: .92rem; }
.lesson-chip { cursor: pointer; border: none; font: inherit; font-size: .8rem; }
.feed-acts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.feed-acts .btn.on { color: var(--bad); }
.danger-text { color: var(--bad); }
.thread { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.cmt > div { flex: 1; min-width: 0; } .cmt p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-new { display: flex; gap: 8px; align-items: center; } .cmt-new input { flex: 1; min-width: 0; font: inherit; font-size: .92rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(10,25,45,.45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal .social-ta { width: 100%; box-sizing: border-box; }
/* Guided tour */
.tour-shade { position: fixed; inset: 0; z-index: 90; background: transparent; }
.tour-shade.on { background: rgba(10,25,45,.55); }
.tour-spot { position: fixed; z-index: 91; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10,25,45,.55), 0 0 0 3px var(--accent); pointer-events: none; transition: left .2s, top .2s, width .2s, height .2s; }
.tour-tip { position: fixed; z-index: 92; background: var(--surface); color: var(--fg); border-radius: 14px; padding: 16px 18px 14px; box-shadow: 0 14px 40px rgba(0,0,0,.35); max-width: calc(100vw - 24px); }
.tour-tip.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(400px, calc(100vw - 32px)) !important; }
.tour-tip h3 { margin: 4px 0 6px; } .tour-tip p { margin: 0 0 8px; font-size: .95rem; line-height: 1.5; } .tour-tip .eyebrow { margin: 0; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.tour-dots { display: flex; gap: 4px; } .tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .tour-dots span.done { background: var(--ok); } .tour-dots span.on { background: var(--blue); width: 16px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }
/* Standings and climber cards */
main.wide { max-width: 820px; }
.crew-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "board" "feed"; }
.cg-map { grid-area: map; } .cg-board { grid-area: board; } .cg-feed { grid-area: feed; }
@media (min-width: 1100px) {
  main.wide { max-width: 1220px; }
  .crew-grid { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "map board" "feed board"; align-items: start; }
  .cg-board { position: sticky; top: 76px; }
}
.standings h2 { margin: 0; }
.stand-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.stand-list .gap { text-align: center; color: var(--muted); line-height: 1; }
.stand-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--fg); text-align: left; cursor: pointer; }
.stand-row:hover { background: var(--surface2); }
.stand-row:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.stand-row.me { background: var(--blue-soft, var(--surface2)); }
.stand-row .rk { width: 1.6em; text-align: right; color: var(--muted); font-size: .85rem; }
.stand-row .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.stand-row .ft { text-align: right; } .stand-row .ft b { display: block; font-size: .92rem; } .stand-row .ft small { font-size: .75rem; color: var(--muted); }
.fl { display: inline-flex; align-items: center; gap: 2px; } .fl svg { width: 12px; height: 12px; } .fl.on { color: #d9822b; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; } .linkish:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.ava-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; }
.ava-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mtn-crew .ava-btn + .ava-btn { margin-left: -10px; }
.mtn-crew .tag { border: 0; cursor: pointer; }
.mtn-crew .tag:hover { text-decoration: underline; }
.modal.climber { position: relative; width: min(520px, 100%); }
.modal-x { position: absolute; top: 10px; right: 10px; }
.climber-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding-right: 34px; }
.climber-head h2 { margin: 0; }
.climber-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.climber-stats > div { background: var(--surface2); border-radius: 10px; padding: 8px; text-align: center; }
.climber-stats b { display: block; font-size: 1.15rem; } .climber-stats small { font-size: .72rem; color: var(--muted); }
@media (max-width: 420px) { .climber-stats { grid-template-columns: repeat(2, 1fr); } }
.badge-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px 6px; margin-top: 8px; }
.bw { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.bw small { font-size: .7rem; line-height: 1.2; color: var(--fg); }
.bw:not(.on) small { color: var(--muted); }
.bimg { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); border: 2px dashed var(--line); color: var(--muted); font-weight: 700; overflow: hidden; }
.bimg.on { background: var(--accent-soft); border: 2px solid var(--accent); color: var(--ok); }
.bimg img { width: 100%; height: 100%; object-fit: contain; }
.bw:not(.on) .bimg img { filter: grayscale(1); opacity: .35; }
.bimg svg { width: 22px; height: 22px; }
.bimg:has(img) { border: 0; background: none; }
.bimg.sm { width: 44px; height: 44px; flex: none; }
.badge .bimg.sm:not(.on) img { filter: grayscale(1); opacity: .35; }
.badge.on { background: var(--surface); }
.feed-badge { margin: 8px 0 0 44px; } .feed-badge img { width: 92px; height: 92px; display: block; }
.standings, .register-full { scroll-margin-top: 130px; }
.register-full h2:focus { outline: none; }
.standings h2:focus { outline: none; }
/* Journal tab */
.jr-composer h2 { margin: 0 0 8px; }
.jr-composer textarea { display: block; width: 100%; box-sizing: border-box; min-height: 110px; font: inherit; font-size: .98rem; line-height: 1.45; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--fg); resize: vertical; }
.jr-composer textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,159,.15); }
.jr-entry textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg); }
.jr-comp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.jr-comp-foot select { font: inherit; font-size: .88rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg); max-width: 100%; min-width: 0; width: 100%; flex: 1 1 220px; text-overflow: ellipsis; }
.jr-composer { min-width: 0; overflow: hidden; }
.crew-mini { cursor: pointer; border-radius: 10px; }
.crew-mini:hover { background: var(--surface2); }
.crew-mini:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
@media (max-width: 480px) { .tabs button { font-size: .68rem; padding: 8px 1px 9px; letter-spacing: 0; white-space: nowrap; min-width: 0; } .tabs button svg { width: 20px; height: 20px; } }
.gt-head { display: flex; align-items: center; gap: 10px; }
.gt-art { width: 52px; height: 52px; flex: none; }
.gt-head b { font-size: 1.02rem; }
/* Practice activities */
.acts-card h2 { margin: 0; }
.acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 640px) { .acts { grid-template-columns: 1fr; } }
.act-tile { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.act-tile:hover { border-color: var(--blue); }
.act-top { display: flex; align-items: center; gap: 12px; }
.act-art { width: 56px; height: 56px; flex: none; }
.act-top h3 { margin: 0; font-size: 1.08rem; }
.act-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.act-meta span { font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface2); padding: 2px 7px; border-radius: 5px; }
.act-what { margin: 0; font-size: .93rem; line-height: 1.5; }
.act-why { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.act-why b { color: var(--fg); font-weight: 600; }
.act-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.act-status { font-size: .8rem; color: var(--muted); flex: 1; min-width: 0; }
.act-status.hot { color: var(--bad); font-weight: 600; }
/* Journal entries */
.jr-where { display: inline-flex; align-items: center; gap: 5px; font: 600 .74rem var(--font-mono); color: var(--blue); background: var(--blue-soft, var(--surface2)); padding: 3px 8px; border-radius: 6px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-where svg { width: 12px; height: 12px; flex: none; }
#player .notes-drawer textarea { background: #fff; color: var(--fg); }
.jr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.jr-entry { border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 10px; padding: 9px 12px; background: #fff; }
.jr-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.jr-loc { font: 600 .74rem var(--font-mono); color: var(--blue); text-align: left; }
button.jr-loc { text-decoration: underline; text-underline-offset: 2px; }
.jr-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; }
.jr-acts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.jr-entry textarea { min-height: 80px; margin-top: 6px; }
/* Profiles and onboarding */
.ava.pr { background: #2f6f9f; }
.ava.pr img { object-fit: cover; }
.ava.xs { width: 24px; height: 24px; border-width: 1.5px; }
.ava.md { width: 64px; height: 64px; border-width: 0; }
.ava.xl { width: 104px; height: 104px; border-width: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.me-chip { border: 0; color: inherit; cursor: pointer; padding: 3px 10px 3px 3px; }
.me-chip .me-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .me-chip .me-name { display: none; } .me-chip { padding: 3px; } }
.onb { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background-size: cover; background-position: center; display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
.onb-panel { width: min(640px, 100%); background: var(--surface); color: var(--fg); border-radius: 18px; padding: 26px 26px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.onb-brand { display: flex; align-items: center; gap: 8px; font: 700 .85rem var(--font-mono); color: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.onb-logo { display: inline-flex; width: 26px; height: 26px; } .onb-logo svg { width: 26px; height: 26px; }
.onb-steps { display: flex; align-items: center; gap: 6px; margin: 16px 0 6px; }
.onb-steps span { width: 34px; height: 5px; border-radius: 3px; background: var(--line); }
.onb-steps span.on { background: var(--accent); }
.onb-steps small { margin-left: 6px; color: var(--muted); font-family: var(--font-mono); font-size: .75rem; }
.onb h1 { margin: 6px 0 4px; }
.onb-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.onb-field { display: flex; flex-direction: column; gap: 6px; }
.onb-field label, .onb-field .lbl { font-weight: 600; font-size: .92rem; }
.onb-field input[type=email], .onb-field input[type=password], .onb-field input[type=text] { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--fg); width: 100%; box-sizing: border-box; }
.onb-field input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.onb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .onb-two { grid-template-columns: 1fr; } .onb-panel { padding: 20px 16px; } }
.pw-row { display: flex; gap: 8px; } .pw-row input { flex: 1; }
.pw-meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }
.pw-meter[data-score="3"] i { background: var(--warn, #e0a030); } .pw-meter[data-score="4"] i, .pw-meter[data-score="5"] i { background: var(--ok); }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84rem; color: var(--muted); }
.pw-rules li.ok { color: var(--ok); }
.onb-hint { font-size: .82rem; color: var(--muted); } .onb-hint.ok { color: var(--ok); } .onb-hint.bad { color: var(--bad); }
.onb-err { color: var(--bad); font-size: .9rem; margin: 0; min-height: 1.2em; }
.onb-cta { align-self: flex-start; }
.onb-proto { margin: 18px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--surface2); color: var(--muted); font-size: .82rem; }
.onb-preview { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 12px; border-radius: 14px; background: var(--surface2); }
.onb-preview b { display: block; font-size: 1.15rem; } .onb-preview small { font-size: .85rem; }
.ava-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
@media (max-width: 640px) { .ava-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 480px) { .ava-grid { grid-template-columns: repeat(4, 1fr); } }
.ava-opt { border: 3px solid transparent; border-radius: 50%; padding: 0; background: none; cursor: pointer; justify-self: center; line-height: 0; }
.ava-opt { width: 100%; max-width: 72px; box-sizing: border-box; }
.ava-opt .ava { width: 100%; height: auto; aspect-ratio: 1; max-width: 64px; }
.ava-opt:hover { border-color: var(--line); }
.ava-opt.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 4px 10px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); cursor: pointer; padding: 0; position: relative; display: inline-grid; place-items: center; }
.sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.sw.custom { background: conic-gradient(#e8836b, #f2b84b, #9ccc6e, #4a9fd8, #7a5ea8, #e8836b); color: #fff; font-weight: 700; overflow: hidden; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.who .ava { margin-right: 2px; }
@media (max-width: 440px) { header.top .chips { gap: 4px; } header.top .chip { padding: 4px 7px; font-size: .78rem; } header.top .chip svg { width: 13px; height: 13px; } }
@media (max-width: 440px) { .brand { gap: 7px; } .brand svg { width: 24px; height: 24px; } .brand b { font-size: 1rem; } .brand small { font-size: .58rem; } .brand > div { min-width: 0; overflow: hidden; } .brand b, .brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Main app styles */

/* Layout concept: a trail map for the exam. One column, a deep-blue header band, tabs like trail markers,
   and each capability drawn as a run of waypoints that turn green as you climb. Light theme by design. */
:root {
  color-scheme: light;
  --bg: #F3F7FA; --surface: #FFFFFF; --surface2: #E6EEF4; --fg: #152330; --muted: #5A6B7A; --line: #CFDBE4;
  --band: #0A4F7C; --band-fg: #F6FAFD; --band-muted: #A9C6DA;
  --blue: #0B6AA3; --blue-ink: #FFFFFF; --blue-soft: #DCEBF5;
  --accent: #7DB83A; --accent-ink: #15290A; --accent-soft: #E6F3D6;
  --ok: #1F7A45; --ok-soft: #DDF3E5; --bad: #B9382A; --bad-soft: #FBE3DF; --warn: #9A6400; --warn-soft: #FFF0D0;
  --font-display: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 12px; --shadow: 0 1px 2px rgba(10,79,124,.06), 0 8px 22px rgba(10,79,124,.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; } h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
p { margin: 0 0 .75em; } p:last-child { margin-bottom: 0; }
a { color: inherit; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Nameplate header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--band); color: var(--band-fg);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px; }
.top-in { max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand b { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; white-space: nowrap; }
.brand small { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--band-muted); letter-spacing: .06em; text-transform: uppercase; }
.chips { margin-left: auto; display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-family: var(--font-mono); font-size: .85rem; font-variant-numeric: tabular-nums; }
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.chip.xp { background: rgba(255,255,255,.14); }

/* Tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs button { flex: 1; background: none; border: 0; padding: 8px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .02em; cursor: pointer; border-top: 3px solid transparent; margin-top: -1px; }
.tabs button svg { width: 22px; height: 22px; }
.tabs button[aria-current="page"] { color: var(--blue); border-top-color: var(--blue); }
main { max-width: 820px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 96px; }
@media (min-width: 720px) {
  .tabs { position: static; border-top: 0; border-bottom: 1px solid var(--line); justify-content: center; gap: 8px; padding: 0; }
  .tabs button { flex: 0 0 auto; padding: 12px 18px 10px; flex-direction: row; gap: 8px; border-top: 0; border-bottom: 3px solid transparent; margin: 0 0 -1px; font-size: .95rem; }
  .tabs button[aria-current="page"] { border-bottom-color: var(--blue); }
  main { padding-block: 24px 48px; }
}

/* Cards and blocks */
.stack { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.featured { border-color: var(--blue); box-shadow: var(--shadow); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.grid2 > * { min-width: 0; }
.stat { display: grid; gap: 2px; }
.stat .v { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface2); color: var(--fg); border-radius: 8px; padding: 10px 16px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--surface2); font-size: .92rem; }
.note.warn { background: var(--warn-soft); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-family: var(--font-mono); font-size: .75rem; background: var(--surface2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.amber { background: var(--blue-soft); color: var(--blue); }
.bar { height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
ul.clean { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.list-item .t { flex: 1; min-width: 0; }
.list-item .t b { display: block; font-weight: 600; }
.list-item .t small { color: var(--muted); }
footer { max-width: 820px; margin: 0 auto; padding: 8px 16px 110px; color: var(--muted); font-size: .8rem; }
@media (min-width: 720px) { footer { padding-bottom: 32px; } }

/* Path (circuit) */
.unit { padding: 0; overflow: hidden; }
.unit-h { padding: 14px 16px 10px; display: flex; gap: 12px; align-items: baseline; }
.unit-h .num { font-family: var(--font-mono); color: var(--muted); font-size: .9rem; }
.unit-h .cnt { margin-left: auto; font-family: var(--font-mono); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.rail { position: relative; padding: 10px 16px 6px; overflow-x: auto; }
.rail-in { position: relative; display: flex; gap: 0; align-items: center; min-width: max-content; padding: 6px 4px; }
.node { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-family: var(--font-mono); font-size: .8rem; cursor: pointer; flex: none; color: var(--muted); }
.node.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.node.next { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.wire { width: 26px; height: 3px; background: var(--line); flex: none; }
.wire.live { background: var(--accent); }
.lessons { border-top: 1px solid var(--line); }
.lesson-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; cursor: pointer; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: var(--surface2); }
.lesson-row .idx { font-family: var(--font-mono); color: var(--muted); font-size: .85rem; width: 2.2em; flex: none; }
.lesson-row .t { flex: 1; min-width: 0; }
.lesson-row .t b { font-weight: 600; display: block; }
.lesson-row .t small { color: var(--muted); }
.lesson-row .st { flex: none; }
.locked { border: 1px dashed var(--line); background: transparent; }

/* Player (lesson overlay) */
#player { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; }
.pl-top { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; }
.pl-top-in { max-width: 760px; margin: 0 auto; display: grid; gap: 8px; }
.pl-top .row { flex-wrap: nowrap; }
.pl-top .row > div:first-child { min-width: 0; }
.pl-steps { display: flex; gap: 6px; }
.pl-steps span { flex: 1; height: 6px; border-radius: 999px; background: var(--surface2); }
.pl-steps span.on { background: var(--accent); }
.pl-body { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px calc(32px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }
.learn-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.learn-card h3 { margin-bottom: 8px; }
.learn-card ul, .learn-card ol { margin: .5em 0; padding-left: 1.3em; }
.learn-card li { margin: .25em 0; }
.learn-card li::marker { color: var(--accent); }
.learn-card figure.fig { margin: 14px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.learn-card figure.fig svg { width: 100%; height: auto; display: block; }
.learn-card figure.fig figcaption { padding: 8px 12px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
.learn-card figure.fig[role="button"] { cursor: zoom-in; }
.learn-card figure.fig[role="button"] figcaption::after { content: " · Tap to enlarge"; color: var(--blue); font-weight: 600; }
.learn-card figure.fig[role="button"]:hover { border-color: var(--blue); }
#lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(10, 36, 56, .94); display: flex; flex-direction: column; }
#lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #F6FAFD; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; }
#lightbox .lb-top .cap { font-size: .9rem; min-width: 0; }
#lightbox .lb-top .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #F6FAFD; flex: none; }
#lightbox .lb-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
#lightbox .lb-body svg { width: max(100%, 980px); height: auto; display: block; background: var(--bg); border-radius: 10px; }
#lightbox .hint { color: #A9C6DA; font-size: .8rem; text-align: center; padding: 6px 16px; }

/* Go deeper resources */
.res { display: grid; gap: 8px; }
.res a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; color: inherit; }
.res a:hover { border-color: var(--blue); }
.res .ik { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface2); color: var(--blue); font-family: var(--font-mono); font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.res .ik.video { background: var(--accent-soft); color: var(--ok); }
.res .t { flex: 1; min-width: 0; }
.res .t b { display: block; font-weight: 600; }
.res .t small { color: var(--muted); display: block; }
.res .t .why { font-size: .9rem; margin-top: 2px; }
.res .acc { flex: none; font-family: var(--font-mono); font-size: .7rem; padding: 2px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); align-self: flex-start; }

/* Notes and highlights */
mark.hl { background: #FFE88A; color: inherit; padding: 0 1px; border-radius: 2px; cursor: pointer; box-shadow: 0 0 0 1px #F2D56B inset; }
mark.hl:hover { background: #FFD95C; }
#hlpop { position: absolute; z-index: 30; }
#hlpop button { box-shadow: var(--shadow); }
.notes-drawer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.notes-drawer textarea { width: 100%; min-height: 120px; font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); resize: vertical; }
.notes-drawer .saved { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
.hl-list { display: grid; gap: 6px; }
.hl-list .item { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; border-left: 3px solid #F2D56B; padding: 4px 10px; background: var(--bg); border-radius: 0 6px 6px 0; }
.hl-list .item span { flex: 1; }
.hl-list .item button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 1rem; line-height: 1; }
.pl-top .btn.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.note-lesson { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.note-lesson pre { white-space: pre-wrap; font: inherit; font-size: .92rem; margin: 6px 0 0; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.opt:hover { border-color: var(--muted); }
.opt .k { flex: none; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font-mono); font-size: .8rem; }
.opt[disabled] { cursor: default; }
.opt svg, .node svg { width: 18px; height: 18px; flex: none; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.right .k, .opt.wrong .k { border-color: transparent; }
.opt.sel { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.opt.dim { opacity: .55; }
.fb { border-left: 4px solid var(--line); padding: 12px 14px; border-radius: 8px; background: var(--surface); }
.fb.ok { border-left-color: var(--ok); } .fb.bad { border-left-color: var(--bad); } .fb.mid { border-left-color: var(--warn); }
.fb b.lbl { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; font-size: .95rem; letter-spacing: .02em; }
.fb b.lbl svg { width: 18px; height: 18px; }
.fb.ok b.lbl { color: var(--ok); } .fb.bad b.lbl { color: var(--bad); } .fb.mid b.lbl { color: var(--warn); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.match .opt { min-height: 60px; align-items: center; font-size: .95rem; }
.match .opt.matched { border-color: var(--ok); background: var(--ok-soft); cursor: default; }
.order .slot { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; min-height: 46px; }
.order .slot .n { font-family: var(--font-mono); color: var(--muted); width: 1.5em; }
.order .pool { display: grid; gap: 8px; margin-top: 10px; }
.scene { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.scene img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.scene .cap { padding: 14px 16px; }
.shake { animation: shake .3s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } .bar > i { transition: none; } }
.scorebox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scorebox .card { text-align: center; }
table.lb { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.lb th { text-align: left; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); font-weight: 500; }
table.lb td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.lb tr.me td { background: var(--blue-soft); }
table.lb .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
table.lb .who img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
table.lb .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl { overflow-x: auto; }
#toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--band); color: var(--band-fg); padding: 10px 16px; border-radius: 999px; font-size: .95rem; box-shadow: var(--shadow); z-index: 30; max-width: calc(100vw - 32px); }
@media (min-width: 720px) { #toast { bottom: 24px; } }
input[type="date"] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); min-height: 44px; }
.timer { font-family: var(--font-mono); font-size: 1rem; }
.timer.low { color: var(--bad); }

/* Case management (mirrors the exam: scenario accumulates on the left, actions on the right) */
.case { display: grid; gap: 14px; }
@media (min-width: 720px) { .case { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } .case .info { position: sticky; top: 92px; } }
.case .info { display: grid; gap: 10px; }
.case .step-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.case .step-info.cur { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.case .step-info .eyebrow { margin-bottom: 4px; }
.act { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.act .k { flex: none; width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; }
.act .k svg { width: 14px; height: 14px; opacity: 0; }
.act.sel .k svg, .act.plus .k svg, .act.minus .k svg, .act.zero .k svg { opacity: 1; }
.act.sel { border-color: var(--blue); } .act.sel .k { background: var(--blue); border-color: var(--blue); color: #fff; }
.act[disabled] { cursor: default; }
.act .why { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.act.plus { border-color: var(--ok); background: var(--ok-soft); } .act.minus { border-color: var(--bad); background: var(--bad-soft); } .act.zero { border-color: var(--warn); background: var(--warn-soft); }
.act.plus .k { background: var(--ok); border-color: var(--ok); color: #fff; } .act.minus .k { background: var(--bad); border-color: var(--bad); color: #fff; } .act.zero .k { background: var(--warn); border-color: var(--warn); color: #fff; }
.act .tag { font-family: var(--font-mono); font-size: .72rem; margin-left: auto; flex: none; padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.06); }
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.navgrid button { min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-mono); font-size: .85rem; cursor: pointer; position: relative; }
.navgrid button.ans { background: var(--surface2); }
.navgrid button.flag::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.navgrid button.cur { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--line); }
.secbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.secbar .card { text-align: center; }

.inline-svg { width: 18px; height: 18px; vertical-align: -3px; }


/* ===== Standalone site: sign-in gate and account tools ===== */
#cc-gate.onb { background-image: linear-gradient(rgba(12,32,56,.55), rgba(12,32,56,.7)), url("assets/mountain.webp"); }
body.gated { overflow: hidden; }
.onb-logo { width: 26px; height: 26px; }
.gate-links { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: .9rem; }
.gate-link { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.gate-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--surface2); font-size: .92rem; }
.gate-note.ok { background: var(--ok-soft); color: var(--fg); } .gate-note.warn { background: #fff4d6; color: var(--fg); }
.gate-legal { margin: 18px 0 0; font-size: .8rem; color: var(--muted); } .gate-legal a { color: var(--muted); }
.gate-check { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; } .gate-check input { margin-top: 3px; }
.onb-account { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.onb-account input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.onb-field input[readonly] { background: var(--surface2); color: var(--muted); }
