/* PrimeAxis Group — "the registry": an issuing authority for staff credentials.
   Night-ink blue surfaces, seal gold for the main action and for certificates, Archivo (wide for headings).
   The certificate is the one ornamental object. Every colour is a token; the light theme only redefines tokens. */
:root {
  color-scheme: dark;
  /* Night ink: the deep blue of an official document, not black. */
  --bg: #0b1326;
  --ink: #e8ecf6;
  --muted: #a3aec8;
  --dim: #6f7b9c;
  --surface: #111b33;
  --surface-2: #16213d;
  --glass: #141e38;
  --glass-hi: #1b2746;
  --glass-press: #223053;
  --stroke: #243153;
  --stroke-hi: #36466f;
  --card-top: #111b33;
  --card-bot: #111b33;
  --card-inset: rgba(255, 255, 255, .035);
  --card-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 18px 40px -28px rgba(0, 0, 0, .7);
  --input: #0e172c;
  --input-focus: #0f1931;
  --option-bg: #16213d;
  --header: #0d1630;
  /* Seal gold: the colour of the certificate, used for the one main action on a page. */
  --primary: #e9bc55;
  --primary-hover: #f3cb6c;
  --primary-ink: #1a1304;
  --accent: #7aa2ff;
  --soft: rgba(122, 162, 255, .1);
  --soft-stroke: rgba(122, 162, 255, .34);
  --focus: #8fb0ff;
  --ring: rgba(122, 162, 255, .24);
  --glow-a: rgba(122, 162, 255, .07);
  --glow-b: rgba(233, 188, 85, .035);
  --ok: #3ccf8e;
  --warn: #f5a524;
  --bad: #ff5d5d;
  --info: #7aa2ff;
  --cyan: #5cc8e6;
  --neutral: #8f9ab6;
  --gold: #e9bc55;
  --gold-soft: rgba(233, 188, 85, .08);
  --gold-stroke: rgba(233, 188, 85, .4);
  --cert-name-a: #fff7e2;
  --cert-name-b: #e9cf8f;
  --code-bg: #0a1122;
  --code-ink: #f6e7bf;
  --banner: #f5c84c;
  --toast: #1d2a4c;
  --headline-a: #ffffff;
  --headline-b: #a3aec8;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wide: 116%;
  --r: 14px;
  --r-sm: 10px;
  --blur: none;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f7;
  --ink: #101a36;
  --muted: #47537a;
  --dim: #6d7896;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --glass: #f4f6fb;
  --glass-hi: #eaeef6;
  --glass-press: #dfe5f0;
  --stroke: #d8deea;
  --stroke-hi: #b9c3d8;
  --card-top: #ffffff;
  --card-bot: #ffffff;
  --card-inset: rgba(255, 255, 255, 1);
  --card-shadow: 0 1px 2px rgba(16, 26, 54, .05), 0 12px 30px -22px rgba(16, 26, 54, .25);
  --input: #ffffff;
  --input-focus: #ffffff;
  --option-bg: #ffffff;
  --header: #ffffff;
  --primary: #e2ab2f;
  --primary-hover: #eab94a;
  --primary-ink: #1a1304;
  --accent: #2f5bd3;
  --soft: rgba(47, 91, 211, .07);
  --soft-stroke: rgba(47, 91, 211, .3);
  --focus: #2f5bd3;
  --ring: rgba(47, 91, 211, .18);
  --glow-a: rgba(47, 91, 211, .06);
  --glow-b: rgba(226, 171, 47, .05);
  --ok: #157a4a;
  --warn: #a35a00;
  --bad: #c62828;
  --info: #2f5bd3;
  --cyan: #0b6f8c;
  --neutral: #5f6a88;
  --gold: #8f5f00;
  --gold-soft: rgba(226, 171, 47, .09);
  --gold-stroke: rgba(170, 120, 20, .4);
  --cert-name-a: #101a36;
  --cert-name-b: #3a4670;
  --code-bg: #fbf7ec;
  --code-ink: #3a2a05;
  --banner: #8a5c00;
  --toast: #101a36;
  --headline-a: #101a36;
  --headline-b: #47537a;
}
:root[data-theme="light"] #toast { color: #fff; }

* { 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: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
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 svg { width: 60%; height: 60%; }
.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; }

/* Signed-in layout: sidebar on the left, a slide-out menu on phones */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; padding: 18px 14px; border-right: 1px solid var(--stroke); background: var(--header); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); z-index: 20; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 20px; flex: 1; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-title { display: flex; align-items: center; gap: 6px; padding: 0 10px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 600; overflow-wrap: anywhere; }
.side-title .vbadge { text-transform: none; letter-spacing: 0; }
.side-nav a, .side-foot > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.side-nav a:hover, .side-foot > a:hover { background: var(--glass); color: var(--ink); }
.side-nav a.on, .side-foot > a.on { background: var(--glass-hi); color: var(--ink); }
.side-foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--stroke); padding-top: 14px; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 4px 10px; min-width: 0; }
.side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.side-user .tag.pag { width: fit-content; }
.content { min-width: 0; display: flex; flex-direction: column; }
.content main.page { flex: 1; }
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); cursor: pointer; flex: none; }
.iconbtn:hover { background: var(--glass-hi); }
.iconbtn svg { width: 20px; height: 20px; }
.mobilebar, .side-close, .side-scrim { display: none; }
.ws-section { font-size: 1.15rem; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 300px); height: auto; transform: translateX(-104%); transition: transform .25s ease; background: var(--bg); padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: none; }
  body.nav-open .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
  body.nav-open { overflow: hidden; }
  .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 15; }
  body.nav-open .side-scrim { opacity: 1; pointer-events: auto; }
  .side-close { display: grid; }
  .mobilebar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10; padding: 10px 16px; background: var(--header); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--stroke); }
}
@media (prefers-reduced-motion: reduce) { .side, .side-scrim { transition: none; } }

/* ---------- support ---------- */
.st-open { --c: var(--info); } .st-pending, .st-awaiting-your-reply { --c: var(--warn); } .st-on-hold { --c: var(--neutral); }
.st-resolved { --c: var(--ok); } .st-closed { --c: var(--neutral); }
.st-urgent { --c: var(--bad); } .st-high { --c: var(--warn); } .st-normal { --c: var(--neutral); } .st-low { --c: var(--neutral); }
.ticket-row { text-decoration: none; color: inherit; }
.ticket-row:hover b { text-decoration: underline; }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .desk-grid { grid-template-columns: minmax(0, 1fr); } }
.desk-table tr[data-href] { cursor: pointer; }
.desk-table tr[data-href]:hover td { background: var(--glass); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); flex: none; }
.ev.event { padding-bottom: 14px; }
.ev.event::before { width: 7px; height: 7px; left: -4px; top: 7px; border-width: 1px; }
.ev .row .avatar { width: 24px; height: 24px; font-size: .62rem; }
.compose.is-note { border-style: dashed; border-color: color-mix(in srgb, var(--info) 45%, transparent); }
.btn.on { background: var(--soft); border-color: var(--soft-stroke); }
.btn .count { font-family: var(--mono, ui-monospace, monospace); font-size: .75rem; padding: 1px 7px; border-radius: 999px; background: var(--info); color: #fff; }
.cat-opt { padding: 10px 12px; border: 1px solid var(--stroke); border-radius: var(--r-sm); }
.cat-opt:has(input:checked) { border-color: var(--stroke-hi); background: var(--glass); }

/* ======================================================================
   Polish layer (Oct 2026): one page-header pattern, a macOS-style sidebar
   with collapsible menus, quieter labels and tighter app typography.
   ====================================================================== */
:root { --gold-badge: #e6c47a; --obadge-ink: #1a1408; --side-w: 260px; }
:root[data-theme="light"] { --gold-badge: #a67c1f; --obadge-ink: #fff8e6; }

/* Labels read as plain sentence-case captions, not shouted section markers. */
.eyebrow { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
.card > .eyebrow:first-child { color: var(--ink); font-size: .9rem; }

/* App pages: titles sized like a desktop app, not a landing page. */
.shell main.page { padding: 36px clamp(18px, 3.4vw, 44px) 88px; max-width: 1180px; gap: 28px; }
.shell h1 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); letter-spacing: -.026em; }
.shell h2 { font-size: 1.28rem; }
.shell h3 { font-size: 1.04rem; }

.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head.narrow { max-width: 720px; }
.page-head-row { display: flex; gap: 16px 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.page-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 72ch; }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-sub { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; color: var(--dim); }
.crumbs > * + *::before { content: "/"; margin-right: 6px; color: var(--dim); opacity: .7; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .vbadge, .crumbs .obadge { margin-left: -2px; }
.crumbs .vbadge::before, .crumbs .obadge::before, .crumbs .vbadge + .dim::before, .crumbs .obadge + .dim::before { content: none; }
.crumbs .vbadge + .dim, .crumbs .obadge + .dim { margin-left: 4px; }

/* Sidebar */
.shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
@media (max-width: 900px) { .shell { grid-template-columns: minmax(0, 1fr); } }
.side { gap: 18px; padding: 16px 12px; }
.side-nav { gap: 18px; }
.side-group { gap: 1px; }
.side-title { text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--dim); padding: 0 10px 6px; font-weight: 600; flex-wrap: nowrap; }
.side-title-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-nav a, .side-foot > a, .side-sub > summary { justify-content: flex-start; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: .9rem; }
.side-nav a .lbl, .side-sub > summary .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .ic { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--dim); }
.side .ic svg { width: 18px; height: 18px; }
.side a.on .ic, .side-sub > summary.inside .ic { color: var(--ink); }
.side-sub > summary { display: flex; align-items: center; color: var(--muted); font-weight: 500; cursor: pointer; list-style: none; user-select: none; }
.side-sub > summary::-webkit-details-marker { display: none; }
.side-sub > summary:hover { background: var(--glass); color: var(--ink); }
.side-sub > summary.inside { color: var(--ink); }
.side-sub > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.side-sub .chev { display: grid; place-items: center; width: 14px; height: 14px; color: var(--dim); transition: transform .18s ease; }
.side-sub .chev svg { width: 12px; height: 12px; }
.side-sub[open] > summary .chev { transform: rotate(90deg); }
.side-sub-items { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 9px; border-left: 1px solid var(--stroke); }
.side-sub-items a { padding: 6px 10px; font-size: .87rem; }
.side-foot { gap: 6px; }
.side-signout { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; text-align: left; }
.side-signout:hover { background: var(--glass); color: var(--ink); }
.side-user { padding: 6px 10px; }
@media (prefers-reduced-motion: reduce) { .side-sub .chev { transition: none; } }

/* Official badge: gold, the same family as the certificate seal. */
.obadge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--gold-badge); white-space: nowrap; vertical-align: middle; }
.obadge svg { width: 1.15em; height: 1.15em; flex: none; }
.obadge.sm svg { width: 17px; height: 17px; }
h1 .obadge { font-size: .9rem; padding: 4px 10px 4px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold-badge) 45%, transparent); background: color-mix(in srgb, var(--gold-badge) 12%, transparent); }
h1 .obadge svg { width: 18px; height: 18px; }

/* Dashboard: compact "needs attention" tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); text-decoration: none; transition: background .15s, border-color .15s; }
.tile:hover { background: var(--glass-hi); border-color: var(--stroke-hi); }
.tile-n { font-size: 1.9rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile-l { font-size: .86rem; color: var(--muted); }

/* Admin: workspaces list */
.ws-admin { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px; }
.ws-admin.is-draft { border-style: dashed; }
.ws-admin-main { display: flex; justify-content: space-between; gap: 16px 28px; align-items: flex-start; flex-wrap: wrap; }
.ws-admin-name { font-weight: 600; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.ws-admin-name:hover { text-decoration: underline; }
.ws-admin-stats { display: flex; gap: 18px; font-size: .86rem; color: var(--muted); }
.ws-admin-stats b { color: var(--ink); font-weight: 600; margin-right: 3px; }
.ws-admin-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--stroke); }
.ws-delete { padding: 16px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 5%, transparent); }
.adminbar.draft { color: var(--ink); background: var(--glass); border: 1px dashed var(--stroke-hi); }
.btn.danger-text { color: var(--bad); }

/* Email-first gate on application and ticket forms */
.gate h2 { font-size: 1.3rem; }

/* Sections and lists read calmer with a touch more air. */
.shell main.page > section, .shell main.page > .stack { gap: 14px; }
table th { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; }
.settings-stack { gap: 16px; max-width: 820px; }
.settings-stack > .card { gap: 14px; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 18px; padding: 26px 24px; border-radius: var(--r); border: 1px solid var(--stroke); background: linear-gradient(180deg, var(--card-top), var(--card-bot)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--card-inset), var(--card-shadow); text-align: left; }
.plan.featured { border-color: var(--stroke-hi); background: linear-gradient(180deg, var(--glass-hi), var(--card-bot)); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-top h3 { font-size: 1.15rem; }
.plan-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-price .amt { font-size: 2.6rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.plan-price .per { color: var(--muted); font-size: .9rem; }
.plan-feats { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; }
.plan-feats li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.2 2.2 4.8-4.8' fill='none' stroke='%2398989d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.plan-cta .btn { width: 100%; justify-content: center; }
.plan-soon, .plan-current { opacity: .6; cursor: default; pointer-events: none; }
.plan-notes ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.plan-chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--stroke); background: var(--glass); color: var(--muted); white-space: nowrap; }
.plan-chip.pro { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 10%, transparent); }
.plan-chip.enterprise { color: var(--gold-badge); border-color: color-mix(in srgb, var(--gold-badge) 45%, transparent); background: color-mix(in srgb, var(--gold-badge) 10%, transparent); }
.plan-chip.unlimited { color: var(--ink); }
.usage { display: flex; flex-direction: column; gap: 7px; }
.usage .bar { height: 6px; border-radius: 999px; background: var(--glass-hi); overflow: hidden; }
.usage .bar span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.locked { border-style: dashed; }
.plan-top { min-height: 30px; }
.dl.answers dd { min-width: 0; }
.ans-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.ans-val { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.ans-btn { flex: none; opacity: .55; }
.ans-row:hover .ans-btn, .ans-btn:focus-visible { opacity: 1; }
.ans-edit { width: 100%; }
.canned-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.canned-bar select { width: auto; min-width: 220px; flex: 1; max-width: 360px; }
.canned-preview { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px dashed var(--stroke-hi); background: var(--glass); }
.canned-preview[hidden] { display: none; }
.canned-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px 18px; }
.member-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); font-size: .86rem; }
.member-chip .avatar { width: 22px; height: 22px; font-size: .58rem; }
.member-chip .x { border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; border-radius: 50%; }
.member-chip .x:hover { color: var(--bad); }
/* People list: staff departments */
.dept-cell { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dept-pill { font-size: .78rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); white-space: nowrap; }
.dept-none { font-size: .78rem; color: var(--warn); }
.dept-cell .btn { padding-inline: 8px; }
.dept-td { min-width: 300px; white-space: normal; }
.dept-edit .chips { max-width: 420px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-sm); border: 1px dashed var(--stroke-hi); background: var(--glass); }
.bulk-bar.on { border-style: solid; border-color: var(--soft-stroke); background: var(--glass-hi); }
.bulk-bar select { width: auto; min-width: 180px; }
.people-table td:first-child input { width: 16px; height: 16px; }

/* ---------------- community forum ---------------- */
.fs-open { --c: var(--info); } .fs-under-review { --c: var(--cyan); } .fs-planned { --c: #bf5af2; } .fs-in-progress { --c: var(--warn); }
.fs-added { --c: var(--ok); } .fs-rejected { --c: var(--bad); } .fs-duplicate { --c: var(--neutral); }
.h3 { font-size: 1.05rem; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .84rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); } .linkbtn.bad { color: var(--bad); }
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; }
.avatar.xl { width: 88px; height: 88px; font-size: 1.5rem; }
.fwho { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.fwho-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; font-weight: 500; }
a.fwho-link:hover .who-name { text-decoration: underline; text-underline-offset: 3px; }
.ubadge { --b: var(--neutral); display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; color: var(--ink);
  background: color-mix(in srgb, var(--b) 16%, transparent); border: 1px solid color-mix(in srgb, var(--b) 38%, transparent); text-decoration: none; }
.ubadge.sm { font-size: .68rem; padding: 1px 7px 1px 5px; }
.ubadge .emo { font-size: 1.05em; line-height: 1; }
.ubadge.more { color: var(--muted); }
.forum-tools { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.forum-search .in { width: auto; min-width: 0; }
.forum-search input { flex: 1 1 180px; }
.forum-list { display: flex; flex-direction: column; gap: 10px; }
.fpost { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "vote main meta" "vote by by"; gap: 6px 14px; padding: 16px 18px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--stroke); }
.fpost:hover { border-color: var(--stroke-hi); }
.fpost.pinned { border-color: color-mix(in srgb, var(--gold) 45%, var(--stroke)); }
.fpost > .vote { grid-area: vote; align-self: start; }
.fpost-main { grid-area: main; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; min-width: 0; }
.fpost-main:hover .fpost-title { text-decoration: underline; text-underline-offset: 3px; }
.fpost-title { font-size: 1rem; }
.fpost-ex { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-line; }
.fpost-meta { grid-area: meta; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fpost-by { grid-area: by; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 52px; min-height: 56px; padding: 6px 0; border-radius: 12px;
  border: 1px solid var(--stroke); background: var(--glass-hi); color: var(--muted); cursor: pointer; font: inherit; text-decoration: none; }
.vote b { color: var(--ink); font-size: .95rem; }
.vote:hover { border-color: var(--stroke-hi); color: var(--ink); }
.vote.on { background: var(--primary); border-color: transparent; color: var(--primary-ink); }
.vote.on b { color: var(--primary-ink); }
.vote-arrow { font-size: .8rem; line-height: 1; }
.fpost-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.fpost-layout > :only-child { grid-column: 1 / -1; max-width: 860px; }
.fpost-top { display: flex; gap: 16px; align-items: flex-start; }
.fpost-h { margin: 0; font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }
.fbody { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.fcomment { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--stroke); }
.fcomment.staff { border-color: color-mix(in srgb, var(--primary) 55%, var(--stroke)); background: color-mix(in srgb, var(--primary) 7%, var(--glass)); }
.fcomment-acts { gap: 14px; }
.fevent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 4px 6px 14px; border-left: 2px solid var(--stroke-hi); }
.fevent-note { flex-basis: 100%; white-space: pre-wrap; font-size: .92rem; padding: 10px 14px; border-radius: var(--r-sm); background: var(--soft); border: 1px solid var(--soft-stroke); }
.fmod { position: sticky; top: 20px; }
.fprofile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.badge-card { --b: var(--neutral); display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-color: color-mix(in srgb, var(--b) 40%, var(--stroke)); }
.badge-emo { font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--b) 18%, transparent); flex: none; }
.badge-pick input { position: absolute; opacity: 0; pointer-events: none; }
.badge-fields { display: grid; grid-template-columns: 90px 1fr 90px; gap: 10px; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 4px; }
.emo-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--stroke); background: var(--glass); cursor: pointer; font-size: 1.05rem; line-height: 1; }
.emo-btn:hover { background: var(--glass-hi); }
@media (max-width: 900px) { .fpost-layout { grid-template-columns: 1fr; } .fmod { position: static; } }
@media (max-width: 600px) {
  .fpost { grid-template-columns: auto 1fr; grid-template-areas: "vote main" "vote meta" "by by"; padding: 14px; }
  .fpost-meta { flex-direction: row; align-items: center; }
  .fpost-top { flex-direction: column; } .fpost-top > .vote { flex-direction: row; width: auto; min-height: 0; padding: 6px 14px; gap: 8px; }
  .badge-fields { grid-template-columns: 70px 1fr; } .badge-fields > :last-child { grid-column: 1 / -1; }
}
a.chip { text-decoration: none; }
.badge-pick.on { background: var(--primary); color: var(--primary-ink); border-color: transparent; }

/* ======================================================================
   Registry design layer (Oct 2026). Solid night-ink surfaces instead of
   glass, wide Archivo headings, squarer controls, gold for the one main
   action, and a certificate with a guilloché ground and a serrated seal.
   ====================================================================== */
body { font-size: 15.5px; letter-spacing: -.003em; line-height: 1.55; font-optical-sizing: auto; }
.glow { background: radial-gradient(70% 50% at 15% -10%, var(--glow-a), transparent 70%), radial-gradient(50% 40% at 100% 0%, var(--glow-b), transparent 70%); }
h1, h2, h3, .brand, .tile-n, .stat, .plan-price .amt, .cert .course { font-stretch: var(--wide); }
h1, h2, h3 { letter-spacing: -.022em; font-weight: 700; }
h1 { font-weight: 750; }
h3 { font-weight: 650; letter-spacing: -.012em; }
.shell h1 { font-size: clamp(1.7rem, 2.5vw, 2.15rem); letter-spacing: -.028em; }
.shell h2 { font-size: 1.22rem; }
.shell h3 { font-size: 1.02rem; }
a { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--primary) 40%, transparent); }

/* Surfaces: flat, one quiet edge highlight. */
.card { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--stroke); border-radius: var(--r); box-shadow: inset 0 1px 0 var(--card-inset), var(--card-shadow); }
a.card:hover { border-color: var(--stroke-hi); transform: none; background: var(--surface-2); }
.tablewrap { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: var(--r); box-shadow: var(--card-shadow); }
thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .78rem; position: sticky; top: 0; z-index: 1; }
th, td { padding: 12px 16px; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.empty { border: 1px dashed var(--stroke-hi); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 50%, transparent); padding: 36px 28px; }
.notice { background: var(--soft); border: 1px solid var(--soft-stroke); border-left: 3px solid var(--accent); border-radius: var(--r-sm); }

/* Controls: squarer than tags, so actions never look like labels. */
.btn { border-radius: var(--r-sm); padding: 10px 18px; font-weight: 600; font-size: .92rem; background: var(--surface-2); border-color: var(--stroke-hi); -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; }
.btn:hover { background: var(--glass-hi); border-color: var(--stroke-hi); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 rgba(0, 0, 0, .25); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.sm { padding: 6px 12px; font-size: .83rem; border-radius: 8px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--glass); }
.btn.danger { background: transparent; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn.on { background: var(--soft); border-color: var(--soft-stroke); color: var(--ink); }
.iconbtn { border-radius: var(--r-sm); background: var(--surface-2); border-color: var(--stroke-hi); }
.in { background: var(--input); border-color: var(--stroke-hi); border-radius: var(--r-sm); padding: 10px 12px; }
.in:hover { border-color: color-mix(in srgb, var(--stroke-hi) 60%, var(--focus)); }
.in:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--ring); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); }
label.f { font-weight: 600; font-size: .86rem; gap: 6px; }

/* Tabs read as tabs: an underline, the current one in gold. */
.tabs { padding: 0; gap: 4px; border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--stroke); align-self: stretch; }
.tabs a, .tabs button { border-radius: 0; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 600; }
.tabs .on { background: none; box-shadow: none; color: var(--ink); border-bottom-color: var(--primary); }

/* Status pills: small stamps. Tags beside names stay round. */
.pill { border-radius: 7px; padding: 3px 9px 3px 8px; font-size: .76rem; }
.pill::before { width: 6px; height: 6px; }
.tag { border-radius: 7px; font-size: .72rem; padding: 3px 8px; background: var(--surface-2); border-color: var(--stroke-hi); }
.tag.acc { background: var(--soft); border-color: var(--soft-stroke); color: var(--ink); }
.tag.pag { border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-weight: 700; }
.chip { background: var(--surface-2); border-color: var(--stroke-hi); }
.chip.on, label.chip:has(input:checked) { background: var(--soft); color: var(--ink); border-color: var(--soft-stroke); }
.chip.on { box-shadow: inset 0 0 0 1px var(--soft-stroke); }
a.chip.on { background: var(--primary); color: var(--primary-ink); border-color: transparent; box-shadow: none; }
a.chip.on .dim { color: inherit; opacity: .7; }
#toast { background: var(--toast); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: var(--r-sm); border-color: var(--stroke-hi); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); }

/* Sidebar: a solid rail. The current page has a gold mark. */
.side { background: var(--header); -webkit-backdrop-filter: none; backdrop-filter: none; border-right-color: var(--stroke); }
.side-head .brand { font-size: 1rem; }
.side-nav a, .side-foot > a, .side-sub > summary { position: relative; border-radius: 8px; }
.side-nav a.on, .side-foot > a.on { background: var(--glass-hi); color: var(--ink); }
.side-nav a.on::before, .side-foot > a.on::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.side-sub-items a.on::before { left: -11px; }
.side .ic { color: var(--dim); }
.side a.on .ic { color: var(--primary); }
.side-user { margin-top: 2px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--stroke); }
.mobilebar { background: var(--header); -webkit-backdrop-filter: none; backdrop-filter: none; }
header.top { background: color-mix(in srgb, var(--bg) 88%, transparent); }
nav.main a { border-radius: 8px; }
nav.main a.on { background: var(--glass-hi); }

/* Page heads: wide headline, actions on the right. */
.page-head { gap: 10px; padding-bottom: 6px; }
.page-sub { font-size: .97rem; max-width: 68ch; }
.crumbs { font-size: .82rem; }

/* Dashboard tiles: the number is the point. */
.tile { background: var(--surface); border-color: var(--stroke); border-radius: var(--r-sm); position: relative; overflow: hidden; }
.tile:hover { background: var(--surface-2); border-color: var(--stroke-hi); }
.tile-n { font-size: 2rem; font-weight: 750; }
.tile::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stroke-hi); }
.tile:hover::after { background: var(--primary); }

/* Lists, threads, players */
.applist a.on { background: var(--soft); border-color: var(--soft-stroke); }
.outline a.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--primary); border-radius: 8px; }
.q label:has(input:checked) { border-color: var(--primary); background: var(--gold-soft); }
.ev .msg { background: var(--surface-2); }
.ev.reply::before { border-color: var(--primary); }
.track .s.done .bar { background: var(--primary); }
.usage .bar span { background: var(--primary); }
.theme-opt { background: var(--surface-2); border-radius: var(--r); }
.theme-opt.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.swatch.dark { background: #0b1326; }
.swatch.light { background: #eef1f7; }
.swatch.system { background: linear-gradient(90deg, #0b1326 50%, #eef1f7 50%); }
.swatch.dark::after { background: #16213d; border-color: #36466f; }
.plan { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: var(--r); }
.plan.featured { background: var(--surface); border-color: var(--gold-stroke); box-shadow: inset 0 3px 0 var(--primary), var(--card-shadow); }
.plan-price .amt { font-weight: 750; }
.legal-toc { background: var(--surface); }
.vote { background: var(--surface-2); border-color: var(--stroke-hi); border-radius: var(--r-sm); }
.fpost, .fcomment { background: var(--surface); border-radius: var(--r); }
.fpost:hover { background: var(--surface-2); }
.fcomment.staff { border-color: var(--gold-stroke); background: linear-gradient(90deg, var(--gold-soft), transparent 60%), var(--surface); }
.member-chip, .dept-pill { background: var(--surface-2); border-color: var(--stroke-hi); }
.adminbar.draft { background: var(--surface); }

/* ---------- the certificate: guilloché ground, serrated gold seal ---------- */
.cert {
  border-radius: 18px; border-color: var(--gold-stroke);
  background:
    repeating-radial-gradient(circle at 0% 0%, transparent 0 9px, color-mix(in srgb, var(--gold) 7%, transparent) 9px 10px),
    repeating-radial-gradient(circle at 100% 100%, transparent 0 9px, color-mix(in srgb, var(--gold) 6%, transparent) 9px 10px),
    radial-gradient(90% 70% at 50% 0%, var(--gold-soft), transparent 70%),
    var(--surface);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 0 0 6px var(--surface), inset 0 0 0 7px var(--gold-stroke), 0 30px 60px -36px rgba(0, 0, 0, .8);
}
.cert::before { inset: 14px; border-radius: 10px; border-style: dashed; opacity: .35; }
.cert .kicker { letter-spacing: .22em; }
.cert .name { font-weight: 400; font-stretch: 108%; letter-spacing: -.03em; }
.seal { position: relative; width: 74px; height: 74px; font-size: .9rem; font-weight: 800; font-stretch: var(--wide); letter-spacing: .04em; color: var(--primary-ink); border: 0;
  background: radial-gradient(circle, var(--primary) 0 54%, color-mix(in srgb, var(--primary) 70%, #000) 55% 58%, var(--primary) 59% 100%); }
.seal::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(var(--primary) 0 6deg, transparent 6deg 12deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); }
.cert .inner { isolation: isolate; }
.codebox { border-radius: 8px; letter-spacing: .1em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.anatomy .seg b { background: var(--surface-2); border-color: var(--gold-stroke); border-radius: 8px; color: var(--code-ink); }

/* ---------- landing: split hero with a live certificate ---------- */
.hero2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(28px, 6vw, 72px) 12px; }
.hero2-text { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero2 h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); overflow-wrap: break-word; line-height: 1; letter-spacing: -.04em; font-stretch: 118%; font-weight: 800; max-width: none; }
.hero2 h1 .line2 { display: block; color: var(--muted); }
.hero2 .lede { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: var(--muted); max-width: 44ch; line-height: 1.5; }
.hero2-cert { position: relative; }
.hero2-cert .cert { transform: rotate(-2.2deg); }
.hero2-cert .stamp { position: absolute; right: -6px; bottom: -14px; transform: rotate(4deg); display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--stroke-hi); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .7); font-size: .8rem; }
.hero2-cert .stamp b { color: var(--ok); font-size: .9rem; }
.hero2-cert .stamp .mono { font-size: .74rem; color: var(--muted); }
.soon { background: var(--surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 8px; }
.subnav { justify-content: flex-start; }
.subnav a { border-radius: 8px; background: transparent; }
.section-head { align-items: flex-start; text-align: left; }
.feature .ico { background: var(--gold-soft); color: var(--primary); border-color: var(--gold-stroke); border-radius: 10px; }
.steps > div::before { background: var(--primary); color: var(--primary-ink); border: 0; font-weight: 800; border-radius: 9px; }
@media (max-width: 900px) { .hero2 { grid-template-columns: minmax(0, 1fr); } .hero2-cert .cert { transform: none; } .hero2-cert .stamp { right: 8px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero2-cert .cert { animation: settle .9s cubic-bezier(.2, .8, .2, 1) both .1s; }
  .hero2-cert .stamp { animation: stampin .5s cubic-bezier(.3, 1.4, .5, 1) both .85s; }
  @keyframes settle { from { opacity: 0; transform: translateY(18px) rotate(1deg); } to { opacity: 1; transform: rotate(-2.2deg); } }
  @keyframes stampin { from { opacity: 0; transform: scale(1.35) rotate(10deg); } to { opacity: 1; transform: rotate(4deg); } }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) { @keyframes settle { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } } }
/* Signed-out header on phones: brand on top, the links in one swipeable row. */
@media (max-width: 760px) {
  header.top .wrap { gap: 6px; padding-block: 8px 6px; }
  nav.main { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { white-space: nowrap; padding: 6px 10px; }
  .top-signin { margin-left: auto; }
}
.top-signin { flex: none; }

/* ---------- inside a workspace: its own menu, nothing else from the site ---------- */
.ws-mode .side { gap: 16px; }
.ws-back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 6px; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 600; text-decoration: none; border: 1px solid var(--stroke); background: var(--surface-2); }
.ws-back:hover { color: var(--ink); border-color: var(--stroke-hi); }
.ws-back svg { width: 16px; height: 16px; flex: none; }
.ws-ident { display: flex; gap: 12px; align-items: center; padding: 6px 6px 0; min-width: 0; }
.ws-mark { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-stretch: var(--wide); font-size: .95rem; letter-spacing: .02em;
  color: var(--primary-ink); background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #7a4b00)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.ws-ident-name b { font-size: 1rem; font-stretch: var(--wide); letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-ident-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-role { margin-left: 60px; margin-top: -8px; width: fit-content; }
.ws-mode .side-nav { gap: 14px; }
.ws-mode .side-nav a .count { margin-left: auto; }
.ws-mobile-name { font-weight: 700; font-stretch: var(--wide); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.ws-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r-sm); border: 1px solid var(--stroke); background: var(--surface); color: var(--ink); text-decoration: none; position: relative; overflow: hidden; }
.ws-stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stroke-hi); }
.ws-stat:hover { background: var(--surface-2); } .ws-stat:hover::after { background: var(--primary); }
.ws-stat-n { font-size: 1.9rem; font-weight: 750; font-stretch: var(--wide); letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ws-stat-l { font-size: .86rem; color: var(--muted); }
.ws-bar { display: inline-block; width: 120px; height: 6px; border-radius: 999px; background: var(--glass-hi); overflow: hidden; vertical-align: middle; }
.ws-bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.ws-course-meter { gap: 10px; flex-wrap: nowrap; }
.ws-progress td:first-child, .ws-progress th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 2; }
.ws-progress thead th:first-child { background: var(--surface-2); z-index: 3; }
/* Taking a course: focus mode */
.focus-mode { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.focusbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 10px clamp(14px, 3vw, 28px); background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 1px solid var(--stroke); }
.focusbar-title { font-weight: 700; font-stretch: var(--wide); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.focusbar-me { margin-left: auto; }
.focus-mode main.page { max-width: 1060px; }
@media (max-width: 600px) { .focusbar-title { display: none; } .ws-bar { width: 70px; } }

/* ---------- certificates that expire, and recognised ones ---------- */
.st-expired { --c: var(--warn); } .st-passed, .st-qualified { --c: var(--ok); }
.recog { flex-basis: 100%; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-sm); border: 1px dashed var(--stroke-hi); background: var(--surface-2); }

/* ---------- sessions ---------- */
.ss-scheduled { --c: var(--info); } .ss-live { --c: var(--ok); } .ss-finished { --c: var(--neutral); } .ss-cancelled { --c: var(--bad); } .ss-missed { --c: var(--warn); }
.live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: pulse 1.8s ease-in-out infinite; } }
.sess-live { display: flex; gap: 14px; align-items: center; border-color: color-mix(in srgb, var(--ok) 45%, var(--stroke)); }
.sess-livecard { display: flex; flex-direction: column; gap: 12px; border-color: color-mix(in srgb, var(--ok) 45%, var(--stroke)); }
.sess-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sess-day { min-height: 110px; padding: 9px; border-radius: var(--r-sm); border: 1px solid var(--stroke); background: var(--surface); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sess-day.today { border-color: var(--gold-stroke); box-shadow: inset 0 2px 0 var(--primary); }
.sess-dayname { font-size: .78rem; color: var(--dim); font-weight: 600; }
.sess-dayname b { color: var(--ink); font-size: .92rem; margin-left: 2px; }
.sess-ev { display: flex; flex-direction: column; gap: 1px; padding: 6px 7px; border-radius: 7px; font-size: .76rem; line-height: 1.25; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--info) 13%, transparent); border-left: 2px solid var(--info); min-width: 0; }
.sess-ev b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-ev span { color: var(--muted); }
.sess-ev.mine { background: color-mix(in srgb, var(--primary) 14%, transparent); border-left-color: var(--primary); }
.sess-ev.live { background: color-mix(in srgb, var(--ok) 15%, transparent); border-left-color: var(--ok); }
.sess-ev:hover { filter: brightness(1.15); }
.sess-row { text-decoration: none; color: inherit; flex-wrap: nowrap; }
.sess-row:hover b { text-decoration: underline; text-underline-offset: 3px; }
.sess-date { flex: none; width: 48px; height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--stroke-hi); line-height: 1.05; }
.sess-date b { font-size: 1.2rem; font-stretch: var(--wide); }
.sess-date span { font-size: .7rem; color: var(--muted); font-weight: 600; }
.sess-detail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.sess-detail > :only-child { grid-column: 1 / -1; }
.sess-code { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; position: sticky; top: 20px; border-color: var(--gold-stroke); }
.code-big { font-family: var(--mono); font-weight: 700; font-size: 2rem; letter-spacing: .14em; color: var(--code-ink); padding: 10px 16px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--gold-stroke); }
.sess-code .later, .later { font-size: .74rem; font-weight: 600; color: var(--gold); padding: 3px 9px; border-radius: 7px; background: var(--gold-soft); border: 1px solid var(--gold-stroke); }
.sess-checkin { align-items: flex-end; }
.sess-people td { white-space: nowrap; }
.sess-people .grade { display: inline-flex; gap: 4px; }
.sess-note { min-width: 160px; padding: 6px 9px; font-size: .86rem; }
.sess-facts { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }
.sess-past summary { list-style: none; }
.sess-past summary::-webkit-details-marker { display: none; }
.qual { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; font-size: .86rem; font-weight: 600; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--stroke)); }
.qual.expired { background: var(--surface-2); border-color: var(--stroke-hi); color: var(--muted); }
.qual-tick { color: var(--ok); }
.is-archived { opacity: .65; }
@media (max-width: 900px) { .sess-detail { grid-template-columns: minmax(0, 1fr); } .sess-code { position: static; } }
@media (max-width: 760px) { .sess-week { grid-template-columns: repeat(7, minmax(84px, 1fr)); overflow-x: auto; padding-bottom: 4px; } }
.sess-week { max-width: 100%; }
@media (max-width: 600px) { .sess-row { flex-wrap: wrap; } .sess-row > .row { width: 100%; justify-content: flex-end; } }
