/* PrimeAxis Group — monochrome glass. Black by default, light theme chosen in Settings.
   Layout: one centred 1120px column; frosted panels for anything you act on; the certificate is the one ornamental object.
   Every colour is a token below; the light theme only redefines tokens. */
:root {
  color-scheme: dark;
  --bg: #000;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --glass: rgba(255, 255, 255, .055);
  --glass-hi: rgba(255, 255, 255, .09);
  --glass-press: rgba(255, 255, 255, .13);
  --stroke: rgba(255, 255, 255, .1);
  --stroke-hi: rgba(255, 255, 255, .22);
  --card-top: rgba(255, 255, 255, .065);
  --card-bot: rgba(255, 255, 255, .022);
  --card-inset: rgba(255, 255, 255, .07);
  --card-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9);
  --input: rgba(255, 255, 255, .045);
  --input-focus: rgba(255, 255, 255, .07);
  --option-bg: #1c1c1e;
  --header: rgba(0, 0, 0, .66);
  --primary: #f5f5f7;
  --primary-hover: #ffffff;
  --primary-ink: #000;
  --soft: rgba(255, 255, 255, .1);
  --soft-stroke: rgba(255, 255, 255, .26);
  --focus: rgba(255, 255, 255, .85);
  --ring: rgba(255, 255, 255, .14);
  --glow-a: rgba(255, 255, 255, .075);
  --glow-b: rgba(255, 255, 255, .03);
  --ok: #30d158;
  --warn: #ff9f0a;
  --bad: #ff453a;
  --info: #64a8ff;
  --cyan: #64d2ff;
  --neutral: #98989d;
  --gold: #e6c47a;
  --gold-soft: rgba(230, 196, 122, .1);
  --gold-stroke: rgba(230, 196, 122, .38);
  --cert-name-a: #ffffff;
  --cert-name-b: #c3c3c9;
  --code-bg: rgba(0, 0, 0, .5);
  --code-ink: #ffffff;
  --banner: #ffd60a;
  --toast: rgba(40, 40, 44, .86);
  --headline-a: #ffffff;
  --headline-b: #8e8e95;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 20px;
  --r-sm: 12px;
  --blur: saturate(180%) blur(24px);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #515154;
  --dim: #7c7c82;
  --glass: rgba(0, 0, 0, .04);
  --glass-hi: rgba(0, 0, 0, .065);
  --glass-press: rgba(0, 0, 0, .1);
  --stroke: rgba(0, 0, 0, .09);
  --stroke-hi: rgba(0, 0, 0, .2);
  --card-top: rgba(255, 255, 255, .86);
  --card-bot: rgba(255, 255, 255, .7);
  --card-inset: rgba(255, 255, 255, .9);
  --card-shadow: 0 18px 40px -28px rgba(0, 0, 0, .28);
  --input: #ffffff;
  --input-focus: #ffffff;
  --option-bg: #ffffff;
  --header: rgba(245, 245, 247, .74);
  --primary: #1d1d1f;
  --primary-hover: #000000;
  --primary-ink: #ffffff;
  --soft: rgba(0, 0, 0, .07);
  --soft-stroke: rgba(0, 0, 0, .28);
  --focus: rgba(0, 0, 0, .8);
  --ring: rgba(0, 0, 0, .1);
  --glow-a: rgba(255, 255, 255, .9);
  --glow-b: rgba(0, 0, 0, .025);
  --ok: #248a3d;
  --warn: #b25000;
  --bad: #d70015;
  --info: #0066cc;
  --cyan: #0071a4;
  --neutral: #6e6e73;
  --gold: #9a6b12;
  --gold-soft: rgba(154, 107, 18, .07);
  --gold-stroke: rgba(154, 107, 18, .4);
  --cert-name-a: #1d1d1f;
  --cert-name-b: #55555b;
  --code-bg: #ffffff;
  --code-ink: #1d1d1f;
  --banner: #8a6100;
  --toast: rgba(255, 255, 255, .9);
  --headline-a: #1d1d1f;
  --headline-b: #6e6e73;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 76px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5; letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: background-color .25s, color .25s;
}
.glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 45% at 50% -10%, var(--glow-a), transparent 70%),
    radial-gradient(40% 40% at 100% 100%, var(--glow-b), transparent 70%);
}
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.028em; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: 1.5rem; letter-spacing: -.022em; }
h3 { font-size: 1.1rem; letter-spacing: -.015em; font-weight: 600; }
p { margin: 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--stroke-hi); text-underline-offset: 3px; cursor: pointer; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 22px; }
main.page { flex: 1; padding-block: 40px 80px; display: flex; flex-direction: column; gap: 32px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.gradient-text { background: linear-gradient(180deg, var(--headline-a) 30%, var(--headline-b) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot { flex: 1; }

/* header */
header.top { position: sticky; top: 0; z-index: 10; background: var(--header); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--stroke); }
header.top .wrap { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; min-height: 56px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 1.02rem; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; align-items: center; }
nav.main a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; }
nav.main a:hover { color: var(--ink); background: var(--glass); }
nav.main a.on { color: var(--ink); background: var(--glass-hi); }
.who { display: flex; align-items: center; gap: 8px; font-size: .88rem; padding-left: 6px; color: var(--muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--glass-hi); border: 1px solid var(--stroke); display: grid; place-items: center; font-weight: 600; font-size: .74rem; color: var(--ink); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.6rem; border-width: 1px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 999px; padding: 10px 20px; font-weight: 500; font-size: .94rem; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, transform .1s; }
.btn:hover { background: var(--glass-hi); border-color: var(--stroke-hi); }
.btn:active { transform: scale(.98); background: var(--glass-press); }
.btn.primary { background: var(--primary); border-color: transparent; color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn.sm { padding: 6px 13px; font-size: .84rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.ghost:hover { color: var(--ink); background: var(--glass); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* forms */
label.f { display: flex; flex-direction: column; gap: 7px; font-weight: 500; font-size: .88rem; color: var(--ink); }
label.f .hint { font-weight: 400; color: var(--dim); font-size: .82rem; }
.in { width: 100%; border: 1px solid var(--stroke); background: var(--input); border-radius: var(--r-sm); padding: 11px 13px; font-weight: 400; font-size: .95rem; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
.in::placeholder { color: var(--dim); }
.in:hover { border-color: var(--stroke-hi); }
.in:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 4px var(--ring); background: var(--input-focus); }
select.in option { background: var(--option-bg); color: var(--ink); }
textarea.in { min-height: 110px; resize: vertical; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); width: 17px; height: 17px; margin: 0; flex: none; }
.req { color: var(--bad); margin-left: 2px; }
.err { color: var(--bad); font-size: .88rem; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: .92rem; cursor: pointer; }

/* glass surfaces */
.card { position: relative; min-width: 0; background: linear-gradient(180deg, var(--card-top), var(--card-bot)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--stroke); border-radius: var(--r); padding: 22px; box-shadow: inset 0 1px 0 var(--card-inset), var(--card-shadow); }
.card.pad-lg { padding: clamp(22px, 4vw, 34px); }
a.card { color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
a.card:hover { border-color: var(--stroke-hi); transform: translateY(-2px); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.tablewrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--r); background: var(--card-bot); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--stroke); vertical-align: middle; white-space: nowrap; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--glass); }
.empty { border: 1px dashed var(--stroke-hi); border-radius: var(--r); padding: 32px; text-align: center; color: var(--muted); }
.notice { background: var(--soft); border: 1px solid var(--stroke-hi); border-radius: var(--r-sm); padding: 13px 16px; font-size: .92rem; }

/* status pills */
.pill { --c: var(--neutral); display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-submitted { --c: var(--neutral); } .st-under-review { --c: var(--info); } .st-further-information-needed { --c: var(--warn); }
.st-accepted { --c: var(--ok); } .st-rejected { --c: var(--bad); } .st-not-found { --c: var(--bad); }
.st-certified { --c: var(--gold); } .st-in-progress { --c: var(--cyan); } .st-not-started { --c: var(--neutral); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--glass-hi); color: var(--muted); border: 1px solid var(--stroke); }
.tag.acc { background: var(--soft); color: var(--ink); border-color: var(--soft-stroke); }

/* application tracker */
.track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.track .s { display: flex; flex-direction: column; gap: 9px; font-size: .8rem; color: var(--dim); font-weight: 500; }
.track .bar { height: 4px; border-radius: 4px; background: var(--glass-hi); }
.track .s.done { color: var(--ink); }
.track .s.done .bar { background: var(--ink); }
.track .s.cur.warn .bar { background: var(--warn); }
.track .s.cur.ok .bar { background: var(--ok); }
.track .s.cur.bad .bar { background: var(--bad); }
.track .s.cur { color: var(--ink); }
.thread { display: flex; flex-direction: column; border-left: 1px solid var(--stroke-hi); margin-left: 6px; }
.ev { position: relative; padding: 0 0 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.ev::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--stroke-hi); }
.ev.note::before { border-color: var(--warn); }
.ev.reply::before { border-color: var(--ink); }
.ev .msg { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 11px 14px; font-size: .92rem; max-width: 62ch; white-space: pre-wrap; overflow-wrap: anywhere; }

/* landing */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding-block: clamp(28px, 7vw, 72px) 8px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -.045em; max-width: 15ch; line-height: 1.02; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 46ch; line-height: 1.45; }
.soon { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke-hi); color: var(--ink); font-weight: 500; font-size: .86rem; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .soon .dot { animation: none; } a.card:hover { transform: none; } body { transition: none; } }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.subnav a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); color: var(--muted); font-size: .88rem; font-weight: 500; text-decoration: none; }
.subnav a:hover { color: var(--ink); border-color: var(--stroke-hi); }
.section { display: flex; flex-direction: column; gap: 22px; }
.section-head { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.section-head p { color: var(--muted); max-width: 54ch; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink); border: 1px solid var(--stroke); }
.feature .ico svg { width: 20px; height: 20px; }
.course-card { display: flex; flex-direction: column; gap: 12px; }
.course-card .meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: .82rem; color: var(--dim); }
.lesson-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.lesson-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--stroke); align-items: baseline; }
.lesson-list .n { font-family: var(--mono); font-size: .78rem; color: var(--dim); }
.lesson-list .t { font-weight: 500; }
.lesson-list .c { grid-column: 2; font-size: .82rem; color: var(--dim); }
.about { max-width: 68ch; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; font-size: 1.08rem; line-height: 1.65; color: var(--muted); }
.about p:first-child { color: var(--ink); font-size: 1.3rem; line-height: 1.45; letter-spacing: -.02em; font-weight: 500; }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.member { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-block: 28px; }
.member .role { font-size: .84rem; color: var(--muted); }
.member .email { font-size: .86rem; overflow-wrap: anywhere; color: var(--muted); }
.member .rbx { font-size: .8rem; color: var(--dim); }
.anatomy { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; justify-content: center; }
.anatomy .seg { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.anatomy .seg b { font-family: var(--mono); font-weight: 600; font-size: clamp(1rem, 2.8vw, 1.55rem); padding: 10px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke-hi); letter-spacing: .06em; }
.anatomy .seg span { font-size: .76rem; color: var(--dim); }
.anatomy .dash { font-family: var(--mono); font-size: 1.4rem; padding-top: 9px; color: var(--dim); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; counter-reset: st; }
.steps > div { counter-increment: st; display: flex; flex-direction: column; gap: 8px; }
.steps > div::before { content: counter(st); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .95rem; border: 1px solid var(--stroke-hi); background: var(--glass); }

/* certificate */
.cert { position: relative; border-radius: 24px; padding: clamp(26px, 5vw, 54px); overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, var(--gold-soft), transparent 60%), linear-gradient(180deg, var(--card-top), var(--card-bot)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--gold-stroke); box-shadow: inset 0 1px 0 var(--card-inset), var(--card-shadow); }
.cert::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--gold-stroke); opacity: .45; border-radius: 16px; pointer-events: none; }
.cert .inner { position: relative; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.cert .kicker { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.cert .name { font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 300; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; background: linear-gradient(180deg, var(--cert-name-a), var(--cert-name-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert .course { font-weight: 600; font-size: clamp(1.15rem, 3vw, 1.55rem); letter-spacing: -.02em; }
.cert .meta { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: center; font-size: .84rem; color: var(--dim); }
.cert .meta b { display: block; color: var(--ink); font-weight: 500; margin-top: 2px; }
.seal { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .86rem; letter-spacing: .06em; color: var(--gold); border: 1px solid var(--gold-stroke); background: var(--gold-soft); }
.codebox { font-family: var(--mono); font-weight: 600; letter-spacing: .08em; padding: 10px 16px; border-radius: 12px; font-size: clamp(.8rem, 2.4vw, 1rem); overflow-wrap: anywhere; color: var(--code-ink); background: var(--code-bg); border: 1px solid var(--gold-stroke); }
.cert.mini { width: min(100%, 560px); }

/* admin banner */
.adminbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 11px 16px; border-radius: var(--r-sm); font-size: .9rem; font-weight: 500; color: var(--banner); background: color-mix(in srgb, var(--banner) 10%, transparent); border: 1px solid color-mix(in srgb, var(--banner) 35%, transparent); }
.adminbar a { color: inherit; }
.adminbar svg { width: 17px; height: 17px; flex: none; }

/* segmented control */
.tabs { align-self: flex-start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); overflow-x: auto; max-width: 100%; }
.tabs a, .tabs button { padding: 7px 16px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .88rem; white-space: nowrap; text-decoration: none; border: 0; background: transparent; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { background: var(--card-top); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .25), inset 0 0 0 1px var(--stroke); }
.count { font-size: .72rem; margin-left: 6px; color: var(--dim); }

/* theme picker */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.theme-opt { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--glass); cursor: pointer; text-align: left; color: var(--ink); font-weight: 500; }
.theme-opt:hover { border-color: var(--stroke-hi); }
.theme-opt.on { border-color: var(--focus); box-shadow: 0 0 0 3px var(--ring); }
.swatch { height: 78px; border-radius: 10px; border: 1px solid rgba(128, 128, 128, .3); position: relative; overflow: hidden; }
.swatch.dark { background: #000; }
.swatch.light { background: #f5f5f7; }
.swatch.system { background: linear-gradient(90deg, #000 50%, #f5f5f7 50%); }
.swatch::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 12px; height: 26px; border-radius: 7px; }
.swatch.dark::after { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.swatch.light::after { background: #fff; border: 1px solid rgba(0, 0, 0, .1); }
.swatch.system::after { background: linear-gradient(90deg, rgba(255, 255, 255, .14) 50%, #fff 50%); border: 1px solid rgba(128, 128, 128, .25); }

/* lists */
.item { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 15px 0; border-bottom: 1px solid var(--stroke); }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.applist a { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r-sm); color: var(--ink); border: 1px solid transparent; text-decoration: none; }
.applist a:hover { background: var(--glass); }
.applist a.on { background: var(--soft); border-color: var(--soft-stroke); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--stroke); background: var(--glass); border-radius: 999px; padding: 6px 13px; font-size: .84rem; cursor: pointer; font-weight: 500; color: var(--muted); }
.chip:hover { color: var(--ink); border-color: var(--stroke-hi); }
.chip.on { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
label.chip { display: inline-flex; gap: 8px; align-items: center; }
label.chip:has(input:checked) { background: var(--soft); color: var(--ink); border-color: var(--soft-stroke); }
.dl { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 11px 20px; font-size: .93rem; margin: 0; }
.dl dt { color: var(--dim); }
.dl dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 560px) { .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .dl dd { margin-bottom: 10px; } }
.stat { font-size: 2.4rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; }

/* builders */
.brow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 680px) { .brow { grid-template-columns: minmax(0, 1fr); } }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 560px) { .trow { grid-template-columns: minmax(0, 1fr); } }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }

/* course player */
.player { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 780px) { .player { grid-template-columns: minmax(0, 1fr); } }
.outline { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.outline a { padding: 10px 12px; border-radius: var(--r-sm); color: var(--muted); font-size: .9rem; display: flex; gap: 10px; align-items: center; text-decoration: none; }
.outline a:hover { background: var(--glass); color: var(--ink); }
.outline a.on { background: var(--soft); color: var(--ink); font-weight: 500; }
.outline a.done { color: var(--ink); }
.outline .n { font-family: var(--mono); font-size: .76rem; width: 22px; color: var(--dim); }
.lesson { max-width: 66ch; display: flex; flex-direction: column; gap: 16px; font-size: 1.06rem; line-height: 1.65; }
.lesson p { color: var(--muted); }
.q { border: 0; margin: 0; padding: 20px 0; border-bottom: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 10px; }
.q legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.q label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: var(--r-sm); cursor: pointer; background: var(--glass); transition: border-color .2s, background .2s; }
.q label:hover { border-color: var(--stroke-hi); }
.q label:has(input:checked) { border-color: var(--focus); background: var(--soft); }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--ink); background: var(--toast); border: 1px solid var(--stroke-hi); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
footer.foot { border-top: 1px solid var(--stroke); color: var(--dim); font-size: .82rem; position: relative; z-index: 1; }
footer.foot .wrap { display: flex; gap: 10px 20px; flex-wrap: wrap; justify-content: space-between; padding-block: 22px; }
footer.foot a { color: var(--muted); text-decoration: none; }
footer.foot a:hover { color: var(--ink); }
.loading { display: flex; gap: 10px; align-items: center; color: var(--dim); padding-block: 40px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--stroke-hi); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Verified tick — given to a workspace by PrimeAxis Admins, shown everywhere the workspace appears */
:root { --verified: #1d9bf0; --vbadge-ink: #ffffff; }
:root[data-theme="light"] { --verified: #0a7cc9; --vbadge-ink: #ffffff; }
.vbadge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; letter-spacing: 0; color: var(--verified); white-space: nowrap; vertical-align: middle; }
.vbadge svg { width: 1.15em; height: 1.15em; flex: none; }
h1 .vbadge { font-size: .9rem; padding: 4px 10px 4px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--verified) 40%, transparent); background: color-mix(in srgb, var(--verified) 10%, transparent); }
h1 .vbadge svg { width: 18px; height: 18px; }
.vbadge.sm svg { width: 17px; height: 17px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* switch used for admin toggles */
.perm-grid td { text-align: center; }

/* PAG | Staff and PAG | Admin tags beside names, staff-only notes, moderation labels */
.tag.pag { background: var(--primary); color: var(--primary-ink); border-color: transparent; letter-spacing: .02em; white-space: nowrap; }
.tag.staffnote { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.tag.danger { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.ev.internal::before { border-color: var(--info); border-style: dashed; }
.ev.internal .msg { border-style: dashed; border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 6%, transparent); }
tr[hidden] { display: none; }

/* Legal pages: contents list beside a readable document column */
.legal-layout { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .legal-layout { grid-template-columns: minmax(0, 1fr); } .legal-toc { position: static !important; } }
.legal-toc { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--stroke); border-radius: var(--r); background: var(--glass); }
.legal-toc .eyebrow { margin-bottom: 4px; }
.legal-toc a { color: var(--muted); text-decoration: none; font-size: .88rem; padding: 5px 8px; border-radius: 8px; }
.legal-toc a:hover { color: var(--ink); background: var(--glass-hi); }
.legal-doc { max-width: 70ch; display: flex; flex-direction: column; gap: 14px; line-height: 1.7; font-size: 1rem; }
.legal-doc p, .legal-doc li { color: var(--muted); }
.legal-doc b { color: var(--ink); font-weight: 600; }
.legal-doc h2 { font-size: 1.35rem; margin-top: 22px; scroll-margin-top: 80px; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font-size: 1.02rem; margin-top: 8px; }
.legal-doc ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.legal-doc a { overflow-wrap: anywhere; }
