/* Ascent by Clevaminds — design system (Brand & Design Guidelines v2.0) */
:root {
  --navy: #0B1F66; --navy-2: #13297A; --navy-3: #1B3390; --blue: #1E6FFF; --blue-soft: #E8F0FF; --amber: #FFB020; --amber-soft: #FFF4DC;
  --white: #FFFFFF; --ice: #F4F7FF; --text: #1A1F2E; --grey: #8C94A6; --grey-2: #5B6478; --divider: #DCE4F5;
  --green: #12805C; --green-soft: #E3F5EE; --red: #C8343B; --red-soft: #FCE9EA;
  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --r: 6px; --r-card: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 102, .04), 0 4px 16px rgba(11, 31, 102, .05);
  --shadow-lg: 0 12px 40px rgba(11, 31, 102, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--ice); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); line-height: 1.2; margin: 0; }
h1 { font-size: 36px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.icon { flex: none; }
.muted { color: var(--grey); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.kicker { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.kicker.grey { color: var(--grey); }
.label { font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--grey-2); }

/* ---- Lockup ---- */
.mark { display: inline-flex; }
.lockup { display: flex; align-items: center; gap: 10px; }
.lockup-name { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--navy); letter-spacing: .01em; line-height: 1; }
.lockup-by { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--amber); margin-top: 4px; }
.lockup.dark .lockup-name { color: #fff; }
.lockup.dark .mark { background: rgba(255,255,255,.08); border-radius: 9px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn.primary { background: var(--amber); color: var(--navy); }
.btn.primary:hover { background: #F5A50E; }
.btn.secondary { background: var(--blue); color: #fff; }
.btn.secondary:hover { background: #155FE6; }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--divider); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.danger { background: var(--red); color: #fff; }
.btn.link { background: none; color: var(--blue); padding: 0 4px; height: auto; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--navy); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.secondary.loading::after, .btn.danger.loading::after { border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--grey-2); cursor: pointer; }
.icon-btn:hover { background: var(--ice); color: var(--navy); border-color: var(--divider); }
.icon-btn.danger:hover { color: var(--red); }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--divider); border-radius: 4px; color: var(--grey-2); background: #fff; }

/* ---- Pills ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.grey { background: var(--ice); color: var(--grey-2); border: 1px solid var(--divider); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.amber { background: var(--amber-soft); color: #8A5A00; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.navy { background: var(--navy); color: #fff; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--grey-2); }
.field .hint { font-size: 12.5px; color: var(--grey); font-style: italic; }
.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--divider); border-radius: var(--r); background: #fff; font: inherit; color: var(--text); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(30, 111, 255, .25); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.code, .input.code { font-family: var(--mono); font-size: 12.5px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B6478' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }

/* ---- Cards & layout ---- */
.card { background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tight { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 40px 0 16px; }
.section-title h2 { font-size: 18px; }
.rule { height: 2px; background: var(--navy); margin-bottom: 16px; }
.divider { height: 1px; background: var(--divider); margin: 24px 0; }

/* ---- App shell ---- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 24px 0 16px; }
.sidebar .lockup { padding: 0 24px 24px; }
.sidebar .who { margin: 0 16px 16px; padding: 12px; border-radius: 8px; background: rgba(255,255,255,.06); }
.sidebar .who b { display: block; font-size: 14px; }
.sidebar .who span { font-size: 12px; color: #AEB8DA; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav-sep { height: 1px; background: rgba(255,255,255,.1); margin: 16px 12px; }
.nav-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: #8C9BD0; padding: 0 24px 8px; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 6px; color: #E4E9FA; font-weight: 500; font-size: 14.5px; text-decoration: none; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.active { background: var(--navy-3); color: #fff; border-left-color: var(--amber); }
.nav a .count { margin-left: auto; font-family: var(--mono); font-size: 11px; background: var(--amber); color: var(--navy); border-radius: 999px; padding: 1px 7px; font-weight: 600; }
.sidebar .bottom { margin-top: auto; }
.main { min-width: 0; }
.page { max-width: 1180px; padding: 40px 48px 80px; margin: 0 auto; }
.page.wide { max-width: 1400px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 260px; }
.page-head h1 { margin-top: 8px; }
.page-head p { margin: 8px 0 0; color: var(--grey-2); max-width: 70ch; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--grey); margin-bottom: 16px; }
.crumbs a { color: var(--grey-2); }
.topbar { display: none; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); padding: 16px 20px; }
.stat .v { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.1; margin-top: 6px; }
.stat .v small { font-size: 15px; color: var(--grey); font-weight: 500; }
.stat .d { font-size: 12.5px; color: var(--grey); margin-top: 2px; }
.stat.alert .v { color: var(--red); }

/* ---- Progress ---- */
.progress { height: 6px; background: var(--divider); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .4s; }
.progress.amber > span { background: var(--amber); }
.progress.green > span { background: var(--green); }
.progress.thick { height: 10px; }
.ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--divider) 0); }
.ring > span { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--navy); }

/* ---- Path cards (learner home) ---- */
.path-list { display: grid; gap: 16px; }
.path-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); padding: 20px 24px; box-shadow: var(--shadow); }
.path-card.focus { border: 2px solid var(--blue); border-left: 5px solid var(--amber); padding: 19px 23px 19px 20px; }
.path-card h3 { font-size: 19px; margin: 4px 0 6px; }
.path-card .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--grey-2); align-items: center; }
.path-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.path-card .bar { margin-top: 12px; max-width: 420px; }
.path-card .bar .progress, .row > .progress { flex: 1; }
.path-card .badge { width: 56px; height: 56px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; }
.path-card .badge.done { background: var(--green); }
.path-card .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ---- Path page: journey timeline ---- */
.timeline { position: relative; display: grid; gap: 12px; }
.tl-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); padding: 16px 20px; position: relative; }
.tl-item .num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: var(--ice); color: var(--navy); border: 2px solid var(--divider); }
.tl-item.done .num { background: var(--green); border-color: var(--green); color: #fff; }
.tl-item.current { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.tl-item.current .num { background: var(--blue); color: #fff; border-color: var(--blue); }
.tl-item.locked { opacity: .62; }
.tl-item h3 { font-size: 16px; }
.tl-item p { margin: 4px 0 0; font-size: 13.5px; color: var(--grey-2); }
.tl-item.summit { background: var(--navy); border-color: var(--navy); color: #fff; }
.tl-item.summit h3 { color: #fff; }
.tl-item.summit p { color: #C7D0F0; }
.tl-item.summit .num { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.hero-path { background: var(--navy); color: #fff; border-radius: 14px; padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; position: relative; overflow: hidden; margin-bottom: 32px; }
.hero-path::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--amber); }
.hero-path h1 { color: #fff; font-size: 32px; margin: 8px 0; }
.hero-path p { color: #C7D0F0; margin: 0; max-width: 64ch; }
.hero-path .kicker { color: var(--amber); }
.hero-path .progress { background: rgba(255,255,255,.18); margin-top: 20px; max-width: 480px; }
.hero-path .progress > span { background: var(--amber); }
.hero-path .facts { display: flex; gap: 24px; margin-top: 16px; font-size: 13px; color: #C7D0F0; flex-wrap: wrap; }
.hero-path .facts b { color: #fff; font-family: var(--display); font-size: 16px; display: block; }

/* ---- Journey player ---- */
.player { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }
.player-side { background: #fff; border-right: 1px solid var(--divider); padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.player-side .back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--grey-2); margin-bottom: 20px; }
.player-side h2 { font-size: 18px; margin: 6px 0 4px; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 2px; }
.steps button { width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: inherit; color: var(--text); }
.steps button:hover { background: var(--ice); }
.steps button.active { background: var(--blue-soft); }
.steps .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--divider); color: var(--grey-2); background: #fff; }
.steps .done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.steps .active .dot { border-color: var(--blue); color: var(--blue); }
.steps .t { font-size: 14px; font-weight: 500; line-height: 1.3; }
.steps .s { font-size: 12px; color: var(--grey); }
.player-main { padding: 40px 56px 120px; max-width: 900px; width: 100%; margin: 0 auto; }
.player-main h1 { font-size: 32px; margin: 8px 0 24px; }
.player-foot { position: sticky; bottom: 0; background: rgba(244,247,255,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--divider); padding: 16px 56px; display: flex; gap: 12px; align-items: center; }
.media-frame { background: var(--navy); border-radius: var(--r-card); overflow: hidden; }
.media-frame video, .media-frame img, .media-frame iframe { display: block; width: 100%; }
.media-frame iframe { aspect-ratio: 16 / 9; border: 0; }
.media-frame.pdf iframe { aspect-ratio: auto; height: 75vh; background: #fff; }
.media-img { background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); padding: 8px; }
.media-img img { display: block; max-width: 100%; margin: 0 auto; border-radius: 6px; }
.caption { margin-top: 16px; }
.missing-media { border: 2px dashed var(--divider); border-radius: var(--r-card); padding: 40px; text-align: center; color: var(--grey); background: #fff; }

/* ---- Prose (Markdown) ---- */
.prose { font-size: 16.5px; line-height: 1.65; max-width: 72ch; }
.prose h2 { font-size: 24px; margin: 32px 0 12px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; color: var(--blue); }
.prose h4 { font-size: 16px; margin: 20px 0 6px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--ice); border: 1px solid var(--divider); padding: 1px 5px; border-radius: 4px; color: var(--navy); }
.prose pre { background: var(--navy); color: #E4E9FA; padding: 16px 20px; border-radius: 8px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.prose blockquote { margin: 0 0 16px; padding: 14px 18px; border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 8px 8px 0; }
.prose blockquote.tip { border-color: var(--green); background: var(--green-soft); }
.prose blockquote.warning { border-color: var(--amber); background: var(--amber-soft); }
.prose blockquote.example { border-color: var(--navy); background: #EEF1FA; }
.prose hr { border: 0; height: 1px; background: var(--divider); margin: 32px 0; }
.prose > :first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--divider); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--ice); font-weight: 600; color: var(--navy); }

/* ---- Questions ---- */
.q-card { background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); padding: 24px; }
.q-card + .q-card { margin-top: 16px; }
.q-card .q-prompt { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--navy); margin: 6px 0 16px; line-height: 1.35; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--divider); border-radius: 8px; cursor: pointer; background: #fff; font-size: 15px; transition: border-color .12s, background .12s; }
.opt:hover { border-color: #B8C6E8; }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }
.opt.selected { border-color: var(--blue); background: var(--blue-soft); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.feedback { margin-top: 12px; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.feedback.ok { background: var(--green-soft); color: #0B5C42; }
.feedback.no { background: var(--red-soft); color: #8E1F25; }
.timer { font-family: var(--mono); font-weight: 600; font-size: 15px; padding: 6px 12px; border-radius: 999px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.timer.low { background: var(--red); }
.result-hero { text-align: center; padding: 40px 24px; }
.result-hero .score { font-family: var(--display); font-size: 64px; font-weight: 700; color: var(--navy); line-height: 1; margin: 16px 0 8px; }
.result-hero .icon-wrap { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; }

/* ---- Tables ---- */
.table-card { background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.table-card .toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--divider); flex-wrap: wrap; }
.table-card .toolbar .input { min-height: 36px; padding: 6px 10px; width: auto; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--grey-2); padding: 10px 16px; border-bottom: 1px solid var(--divider); background: #FAFBFF; white-space: nowrap; }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #F8FAFF; }
table.data .name { font-weight: 600; color: var(--navy); }
table.data .sub { font-size: 12.5px; color: var(--grey); }
table.data td.num { font-family: var(--mono); font-size: 13px; }
.mini-bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.mini-bar .progress { flex: 1; }
.mini-bar span.v { font-family: var(--mono); font-size: 12px; width: 34px; text-align: right; color: var(--grey-2); }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); margin-bottom: 24px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; font: inherit; font-weight: 600; font-size: 14px; color: var(--grey-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs .active { color: var(--navy); border-bottom-color: var(--amber); }

/* ---- Lists (admin builders) ---- */
.list { background: #fff; border: 1px solid var(--divider); border-radius: var(--r-card); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--divider); }
.list-item:last-child { border-bottom: 0; }
.list-item .t { font-weight: 600; color: var(--navy); }
.list-item .s { font-size: 12.5px; color: var(--grey); }
.list-item .ti { width: 34px; height: 34px; border-radius: 8px; background: var(--ice); color: var(--blue); display: grid; place-items: center; flex: none; }
.list-item .pos { font-family: var(--mono); font-size: 12px; color: var(--grey); width: 20px; text-align: right; }
.list-item.click { cursor: pointer; }
.list-item.click:hover { background: #F8FAFF; }

/* ---- Empty / modal / toast ---- */
.empty { text-align: center; padding: 56px 24px; background: #fff; border: 1px dashed var(--divider); border-radius: var(--r-card); }
.empty-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--ice); color: var(--blue); display: grid; place-items: center; margin: 0 auto 16px; }
.empty p { color: var(--grey-2); max-width: 46ch; margin: 8px auto 20px; }
.modal-back { position: fixed; inset: 0; background: rgba(11, 31, 102, .45); display: grid; place-items: center; z-index: 50; padding: 24px; animation: fade .15s; }
.modal { background: #fff; border-radius: 12px; width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--divider); }
.modal-head h2 { font-size: 19px; flex: 1; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-body > * + * { margin-top: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--divider); }
.toasts { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 420px; animation: up .2s; }
.toast.error { background: var(--red); }
.toast .icon { color: var(--amber); }
.toast.error .icon { color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 8px; background: var(--blue-soft); color: var(--navy); font-size: 14px; align-items: flex-start; }
.notice.warn { background: var(--amber-soft); color: #6B4600; }
.notice.error { background: var(--red-soft); color: #8E1F25; }
.notice.ok { background: var(--green-soft); color: #0B5C42; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--divider); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 80px auto; }

/* ---- Login (split screen) ---- */
.auth { display: grid; grid-template-columns: minmax(380px, 560px) 1fr; min-height: 100vh; background: #fff; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px 64px; }
.auth-form .inner { width: 100%; max-width: 420px; }
.auth-form h1 { font-size: 30px; margin: 32px 0 6px; }
.auth-form .sub { color: var(--grey-2); margin: 0 0 32px; }
.auth-form form > * + * { margin-top: 16px; }
.auth-form .foot { margin-top: 32px; font-size: 13px; color: var(--grey); }
.otp-input { font-family: var(--mono); font-size: 26px; letter-spacing: .5em; text-align: center; font-weight: 600; color: var(--navy); }
.auth-art { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 48px; }
.auth-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; }
.auth-art::after { content: ''; position: absolute; width: 520px; height: 520px; right: -140px; top: 18%; background: radial-gradient(circle, rgba(30,111,255,.22), transparent 65%); }
.auth-art .content { position: relative; z-index: 1; text-align: center; max-width: 460px; }
.auth-art .big-mark { width: 84px; height: 84px; border-radius: 18px; background: rgba(255,255,255,.08); display: grid; place-items: center; margin: 0 auto 24px; }
.auth-art .name { font-family: var(--display); font-weight: 700; font-size: 44px; letter-spacing: .01em; }
.auth-art .by { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: .16em; margin-top: 4px; }
.auth-art .amber-rule { width: 48px; height: 2px; background: var(--amber); margin: 24px auto; }
.auth-art .tag { color: #C7D0F0; font-size: 16px; line-height: 1.6; }
.auth-art .feats { display: flex; justify-content: center; gap: 16px; margin-top: 32px; }
.auth-art .feat { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: #AEB8DA; letter-spacing: .04em; }
.auth-art .feat div { width: 48px; height: 48px; border-radius: 10px; background: rgba(255,255,255,.07); display: grid; place-items: center; color: #fff; }
.auth-art .feat:first-child div { color: var(--amber); }
.climb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; opacity: .5; }

/* ---- Certificate ---- */
.cert { background: #fff; border: 1px solid var(--divider); border-radius: 4px; aspect-ratio: 1.414; max-width: 960px; margin: 0 auto; position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; box-shadow: var(--shadow-lg); }
.cert-band { background: var(--navy); color: #fff; padding: 28px 48px; border-bottom: 6px solid var(--amber); display: flex; align-items: center; }
.cert-band .lockup-name { color: #fff; font-size: 24px; }
.cert-body { padding: 40px 64px; display: flex; flex-direction: column; justify-content: center; }
.cert-body .kicker { color: var(--blue); font-size: 13px; }
.cert-body .holder { font-family: var(--display); font-size: 46px; font-weight: 700; color: var(--navy); margin: 12px 0 20px; line-height: 1.1; }
.cert-body .path { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--navy); margin: 8px 0 0; }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 64px 40px; font-size: 13px; color: var(--grey-2); gap: 24px; }
.cert-foot b { display: block; color: var(--navy); font-family: var(--display); font-size: 15px; }
.cert-foot .sig { border-top: 1px solid var(--navy); padding-top: 8px; min-width: 200px; }
.cert .ascent-art { position: absolute; right: -40px; bottom: -40px; opacity: .06; }

/* ---- Admin bits ---- */
.q-edit { border: 1px solid var(--divider); border-radius: var(--r-card); padding: 16px; background: #fff; }
.q-edit + .q-edit { margin-top: 12px; }
.q-edit .opt-row { display: grid; grid-template-columns: 28px 1fr 32px; gap: 8px; align-items: center; margin-top: 8px; }
.q-edit .opt-row input[type=checkbox], .q-edit .opt-row input[type=radio] { width: 18px; height: 18px; accent-color: var(--green); }
.prompt-out { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; background: var(--ice); border: 1px solid var(--divider); border-radius: 8px; padding: 16px; max-height: 420px; overflow: auto; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--ice); border: 1px solid var(--divider); color: var(--grey-2); }
.preview-pane { border: 1px solid var(--divider); border-radius: var(--r-card); padding: 24px; background: #fff; }
.dropzone { border: 2px dashed var(--divider); border-radius: var(--r-card); padding: 24px; text-align: center; color: var(--grey-2); background: #fff; cursor: pointer; }
.dropzone.over { border-color: var(--blue); background: var(--blue-soft); }
.admin-badge { align-self: flex-start; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; background: var(--amber); color: var(--navy); padding: 2px 6px; border-radius: 4px; margin-left: 24px; margin-top: -12px; margin-bottom: 20px; display: inline-block; font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--navy); position: sticky; top: 0; z-index: 30; }
  .topbar .icon-btn { color: #fff; }
  .page { padding: 24px 16px 64px; }
  h1 { font-size: 28px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form { padding: 32px 24px; }
  .player { grid-template-columns: 1fr; }
  .player-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--divider); }
  .player-main { padding: 24px 16px 96px; }
  .player-foot { padding: 12px 16px; }
  .path-card { grid-template-columns: 1fr; }
  .path-card .badge { display: none; }
  .path-card .actions { align-items: stretch; }
  .hero-path { grid-template-columns: 1fr; padding: 24px; }
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
  .cert-body .holder { font-size: 30px; }
}

/* ---- Print (certificates) ---- */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  .cert { box-shadow: none; border: 0; max-width: none; width: 100vw; height: 100vh; aspect-ratio: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
