/* AAIE platform - "Aurora" design system. Light + dark, no framework, no build step. */
:root {
  --bg: #f5f4fb;
  --surface: #ffffff;
  --surface-2: #faf9ff;
  --ink: #15132b;
  --ink-2: #4c4a68;
  --ink-3: #8a88a6;
  --line: #e7e5f3;
  --brand: #6d5efc;
  --brand-2: #c24dff;
  --accent: #ffb23e;
  --ok: #12b886;
  --warn: #f59f00;
  --bad: #f03e5f;
  --info: #3b9cff;
  --grad: linear-gradient(135deg, #6d5efc 0%, #c24dff 55%, #ff7aa8 100%);
  --side: #14122b;
  --side-ink: #b8b6d6;
  --shadow: 0 1px 2px rgba(20, 18, 43, .04), 0 8px 28px rgba(60, 40, 140, .07);
  --shadow-lg: 0 24px 60px rgba(60, 40, 140, .18);
  --r: 16px;
  --r-sm: 10px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0d0c1c;
  --surface: #17152d;
  --surface-2: #1d1b38;
  --ink: #f1f0ff;
  --ink-2: #b9b7d8;
  --ink-3: #7f7da3;
  --line: #2a2849;
  --side: #0a0916;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0c1c; --surface: #17152d; --surface-2: #1d1b38; --ink: #f1f0ff; --ink-2: #b9b7d8; --ink-3: #7f7da3; --line: #2a2849;
    --side: #0a0916; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.ic { flex: none; vertical-align: -.2em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.tr { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; text-decoration: none !important; }
.btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(109, 94, 252, .35); }
.btn-primary:hover { border-color: transparent; box-shadow: 0 12px 28px rgba(109, 94, 252, .45); }
.btn-ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn-danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-icon { padding: 8px; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-block { width: 100%; }

/* ---------- forms ---------- */
.field { display: block; }
.field > .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(109, 94, 252, .16); }
.input::placeholder { color: var(--ink-3); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ink-3); padding: 8px; cursor: pointer; border-radius: 8px; }
.input-wrap .eye:hover { color: var(--brand); }
.field-err { color: var(--bad); font-size: 12.5px; margin-top: 5px; font-weight: 500; }
.hint { color: var(--ink-3); font-size: 12.5px; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- cards / alerts / badges ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: 14px; border: 1px solid transparent; margin-bottom: 16px; }
.alert-ok { background: rgba(18, 184, 134, .12); color: #0b8a63; border-color: rgba(18, 184, 134, .3); }
.alert-bad { background: rgba(240, 62, 95, .1); color: var(--bad); border-color: rgba(240, 62, 95, .3); }
.alert-warn { background: rgba(245, 159, 0, .12); color: #b27300; border-color: rgba(245, 159, 0, .35); }
.alert-info { background: rgba(59, 156, 255, .1); color: #1b73d6; border-color: rgba(59, 156, 255, .3); }
:root[data-theme="dark"] .alert-ok { color: #4ee0b3; } :root[data-theme="dark"] .alert-warn { color: #ffc757; } :root[data-theme="dark"] .alert-info { color: #7cbcff; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent); color: var(--c, var(--brand)); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge-ok { --c: var(--ok); } .badge-off { --c: var(--ink-3); } .badge-bad { --c: var(--bad); } .badge-warn { --c: var(--warn); }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--c, var(--brand)); flex: none; }
.avatar.lg { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.person { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.person b { display: block; line-height: 1.25; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .ic { display: block; margin: 0 auto 10px; opacity: .5; }
.pager { display: flex; gap: 6px; padding: 16px 22px; justify-content: flex-end; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pager .cur { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- admin shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none !important; }
.brand .mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(194, 77, 255, .4); font-weight: 800; font-size: 17px; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--side-ink); letter-spacing: .02em; margin-top: -2px; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #6e6c92; padding: 18px 12px 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--side-ink); font-weight: 600; font-size: 14px; text-decoration: none !important; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.is-active { background: linear-gradient(135deg, rgba(109, 94, 252, .35), rgba(194, 77, 255, .22)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.side-foot { margin-top: auto; padding-top: 18px; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); color: #fff; }
.me b { display: block; font-size: 14px; line-height: 1.2; }
.me small { color: var(--side-ink); font-size: 12px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 32px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .title { font-weight: 700; font-size: 15px; }
.burger { display: none; }
.content { padding: 30px 32px 60px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--ink-3); margin-top: 6px; }
.scrim { display: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 20px; position: relative; overflow: hidden; }
.stat .k { color: var(--ink-3); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; }
.stat .blob { position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad); opacity: .12; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars i { flex: 1; background: var(--grad); border-radius: 6px 6px 3px 3px; min-height: 4px; opacity: .85; position: relative; }
.bars i:hover { opacity: 1; }
.bars i[data-v="0"] { background: var(--line); }
.bar-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.dist-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.dist-row .bar { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); align-items: center; }
.toolbar .input { width: auto; min-width: 150px; padding: 9px 12px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; }
.toolbar .search .input { width: 100%; padding-left: 40px; }
.toolbar .search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }

/* ---------- permission matrix ---------- */
.perm-group { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--surface-2); }
.perm-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 10px; }
.perm-group .check { padding: 6px 0; }
.swatch { width: 14px; height: 14px; border-radius: 5px; background: var(--c); display: inline-block; }

/* ---------- progress ---------- */
.progress { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .25s; }
.progress.anim i { background-size: 28px 28px; background-image: linear-gradient(45deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%), var(--grad); animation: stripes 1s linear infinite; }
.progress.done i { background: var(--ok); animation: none; }
.progress.err i { background: var(--bad); animation: none; }
@keyframes stripes { to { background-position: 28px 0; } }
.steps { list-style: none; margin: 14px 0 0; padding: 0; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--brand); animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.checks li:last-child { border: 0; }
.checks .ok { color: var(--ok); } .checks .warn { color: var(--warn); } .checks .fail { color: var(--bad); } .checks .info { color: var(--info); }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #120f2e; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(40% 40% at 25% 25%, rgba(109, 94, 252, .85), transparent 70%), radial-gradient(35% 35% at 80% 30%, rgba(194, 77, 255, .7), transparent 70%), radial-gradient(40% 40% at 60% 85%, rgba(255, 122, 168, .55), transparent 70%); filter: blur(30px); animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(3%, -3%, 0) scale(1.08); } }
.auth-art > * { position: relative; }
.auth-art h2 { font-size: 44px; line-height: 1.08; letter-spacing: -.035em; max-width: 460px; }
.auth-art p { color: rgba(255, 255, 255, .78); max-width: 420px; margin-top: 16px; font-size: 16px; }
.glass { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(14px); border-radius: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; max-width: 360px; }
.glass + .glass { margin-top: 12px; margin-left: 36px; }
.glass .dot { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.glass b { display: block; font-size: 14px; } .glass small { color: rgba(255, 255, 255, .7); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; }
.auth-card .sub { color: var(--ink-3); margin: 8px 0 26px; }
.auth-top { position: absolute; top: 22px; right: 24px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- student portal ---------- */
.p-nav { display: flex; align-items: center; gap: 16px; padding: 14px 32px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.p-nav .brand { color: var(--ink); padding: 0; }
.p-wrap { max-width: 1080px; margin: 0 auto; padding: 32px 24px 70px; }
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 40px; color: #fff; background: var(--grad); box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.hero::before { content: ""; position: absolute; right: 90px; bottom: -120px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 34px; }
.hero p { color: rgba(255, 255, 255, .85); margin-top: 8px; max-width: 520px; }
.hero .badge { background: rgba(255, 255, 255, .2); color: #fff; margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 24px; }
.tile { padding: 22px; position: relative; }
.tile .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--brand)) 15%, transparent); color: var(--c, var(--brand)); margin-bottom: 14px; }
.tile h3 { font-size: 17px; } .tile p { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.tile.locked { opacity: .65; }
.tile .pill { position: absolute; top: 18px; right: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 99; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .stats { grid-template-columns: repeat(2, 1fr); } .cols { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; width: 280px; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 8, 30, .55); z-index: 50; }
  .burger { display: inline-flex; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .p-nav { padding: 12px 16px; }
  .hero { padding: 28px; border-radius: 22px; }
  .hero h1 { font-size: 26px; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; } .stat .v { font-size: 28px; } .page-head h1 { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

input[type="file"].input { padding: 9px 12px; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 6px 12px; margin-right: 12px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); cursor: pointer; }

/* ---------- scored self-assessment ---------- */
.rate { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--rc, var(--ink-3)) 16%, transparent); color: var(--rc, var(--ink-3)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rate.r-low { --rc: var(--bad); } .rate.r-mid { --rc: var(--warn); } .rate.r-good { --rc: #0f9d8a; } .rate.r-top { --rc: var(--ok); } .rate.r-none { --rc: var(--ink-3); }
.rate.gap { box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 45%, transparent); }
.as-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.as-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.as-tab { appearance: none; font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 12px; padding: 9px 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; font-weight: 600; font-size: 14px; }
.as-tab:hover { border-color: var(--brand); }
.as-tab[aria-selected="true"] { background: var(--grad); color: #fff; border-color: transparent; }
.as-tab .cnt { font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; }
.as-tab.done .cnt::before { content: "\2713 "; }
.as-panel[hidden] { display: none; }
.as-q { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px 20px; margin: 0 0 14px; }
.as-q.is-missing { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent); }
.as-q legend { padding: 0; font-weight: 700; font-size: 15.5px; float: left; width: 100%; margin-bottom: 4px; }
.as-q .qn { color: var(--brand); margin-right: 6px; }
.as-q .opts { clear: both; display: grid; gap: 8px; margin-top: 12px; }
.as-opt { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface-2); line-height: 1.45; }
.as-opt:hover { border-color: var(--brand); }
.as-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.as-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.as-opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
.as-opt .let { font-weight: 800; color: var(--brand); min-width: 1.2em; }
.as-foot { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; margin-top: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.save-state { font-size: 13px; color: var(--ink-3); }
.save-state.err { color: var(--bad); font-weight: 600; } .save-state.ok { color: var(--ok); }
.res-sec { margin-bottom: 16px; }
.res-sec .head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.res-sec .body { padding: 18px 22px; display: grid; gap: 14px; }
.res-sec h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.res-sec ul { margin: 0; padding-left: 20px; } .res-sec li + li { margin-top: 6px; }
.big-score { font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 1px dashed var(--ink-3); color: var(--ink-2); }
.eff { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-right: 6px; }
.eff-lowered { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.eff-superseded, .eff-none { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.cmp-t th, .cmp-t td { text-align: center; } .cmp-t th:first-child, .cmp-t td:first-child { text-align: left; }
.cmp-t th a { color: inherit; } .cmp-t td.rk { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cmp-t tr.incomplete td { opacity: .78; }
.callout { border-left: 4px solid var(--brand); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 16px; }
.callout.warn { border-color: var(--warn); } .callout.bad { border-color: var(--bad); }
.ev-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 14px; flex-wrap: wrap; }
.ev-item + .ev-item { margin-top: 8px; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; }

/* builder */
.bd-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 18px; box-shadow: var(--shadow); }
.bd-card > header { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bd-card > header h3 { font-size: 16px; flex: 1; min-width: 140px; }
.bd-body { padding: 18px; display: grid; gap: 16px; }
.bd-sub { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 14px; display: grid; gap: 12px; }
.bd-sub > .bd-sub-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.bd-opt { display: grid; grid-template-columns: 22px 1fr 84px auto; gap: 8px; align-items: start; }
.bd-opt .let { font-weight: 800; color: var(--brand); padding-top: 10px; text-align: center; }
.bd-opt .more { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bd-band { display: grid; grid-template-columns: 70px 70px 70px 1fr 1.4fr auto; gap: 8px; align-items: center; }
.bd-cond { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(120px, .8fr) 2fr auto; gap: 8px; align-items: start; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }
.bd-group { border-left: 3px solid var(--brand); padding-left: 12px; display: grid; gap: 8px; }
.bd-group .bd-group { border-color: var(--brand-2); }
.bd-opts-pick { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.bd-opts-pick label { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; cursor: pointer; }
.bd-status { position: sticky; top: 64px; z-index: 6; }
.bd-errs { margin: 0; padding-left: 20px; } .bd-errs li + li { margin-top: 3px; }
.mini { font-size: 12px; color: var(--ink-3); }
.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 8px; }
@media (max-width: 760px) {
  .bd-opt { grid-template-columns: 22px 1fr; } .bd-opt .pts { grid-column: 2; } .bd-opt .more { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .bd-band { grid-template-columns: 1fr 1fr 1fr; } .bd-band .wide { grid-column: 1 / -1; }
  .bd-cond { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .as-q { padding: 14px; } .big-score { font-size: 44px; }
}
