/* 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; }

/* 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); }
.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); }

/* ======================================================================
   Staff Portal additions. Everything above is shared with the main site,
   so the two look the same; only portal-specific pieces live below.
   ====================================================================== */
.brand .sub { color: var(--dim); font-weight: 500; }
.signin-wrap { flex: 1; display: grid; place-items: center; padding: 40px 22px 80px; }
.signin { max-width: 460px; width: 100%; text-align: center; align-items: center; gap: 18px; }
.signin .mark { width: 64px; height: 64px; }
.st-pending, .st-investigation, .st-requested { --c: var(--warn); }
.st-approved, .st-signed, .st-active, .st-complete { --c: var(--ok); }
.st-declined, .st-overturned, .st-closed-account, .st-dismissal, .st-suspended { --c: var(--bad); }
.st-cancelled, .st-withdrawn, .st-expired, .st-closed, .st-closed-no-action, .st-left { --c: var(--neutral); }
.st-probation, .st-acknowledge, .st-upheld { --c: var(--info); }
.st-sign { --c: var(--gold); }
.count.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin: 0; border-radius: 999px; background: var(--info); color: #fff; font-size: .7rem; font-weight: 600; font-family: var(--font); }
.count.badge.warn { background: var(--warn); color: #000; }

/* leave balances */
.bals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.bal { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--glass); }
.bal .n { font-size: 2.1rem; font-weight: 650; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.bal .n small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.bal .meter { height: 6px; border-radius: 999px; background: var(--glass-hi); overflow: hidden; display: flex; }
.bal .meter span { display: block; height: 100%; }
.bal .meter .used { background: var(--ink); }
.bal .meter .pend { background: var(--warn); }
.bal .facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--dim); }
.bal .facts b { color: var(--muted); font-weight: 600; }

/* team calendar */
.cal { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.cal th, .cal td { padding: 0; border-bottom: 1px solid var(--stroke); text-align: center; min-width: 30px; height: 38px; white-space: nowrap; }
.cal th.who, .cal td.who { position: sticky; left: 0; z-index: 1; text-align: left; padding: 0 14px; min-width: 190px; background: var(--option-bg); border-right: 1px solid var(--stroke); }
.cal thead th { font-size: .7rem; color: var(--dim); font-weight: 600; height: 44px; line-height: 1.2; }
.cal .off { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.cal .hol { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.cal .today { box-shadow: inset 0 0 0 1px var(--focus); }
.cal .lv { display: block; margin: 7px 1px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--info) 55%, transparent); }
.cal .lv.pending { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--warn) 55%, transparent) 0 5px, color-mix(in srgb, var(--warn) 25%, transparent) 5px 10px); }
.cal .lv.am { margin-right: 50%; } .cal .lv.pm { margin-left: 50%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* org chart */
.org, .org ul { list-style: none; margin: 0; padding: 0; }
.org ul { margin-left: 22px; padding-left: 18px; border-left: 1px solid var(--stroke-hi); }
.org li { padding-top: 10px; position: relative; }
.org ul > li::before { content: ""; position: absolute; left: -18px; top: 34px; width: 16px; border-top: 1px solid var(--stroke-hi); }
.org-node { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); text-decoration: none; min-width: 240px; }
.org-node:hover { border-color: var(--stroke-hi); background: var(--glass-hi); }
.org-node .avatar { width: 36px; height: 36px; }

/* people */
.person { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; min-width: 0; }
a.person:hover b { text-decoration: underline; }
.person b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.person .sub { font-size: .8rem; color: var(--dim); display: block; font-weight: 400; }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.dir-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
a.dir-card:hover { border-color: var(--stroke-hi); background: var(--glass-hi); }
.dir-card .avatar { width: 44px; height: 44px; }
.dir-card .meta { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--muted); }
.profile-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-hero .avatar.lg { width: 84px; height: 84px; }

/* documents */
.docbody { max-width: 72ch; display: flex; flex-direction: column; gap: 12px; line-height: 1.7; }
.docbody p, .docbody li { color: var(--muted); }
.docbody h2 { font-size: 1.2rem; margin-top: 10px; } .docbody h3 { font-size: 1.02rem; margin-top: 6px; }
.docbody ul, .docbody ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 5px; }
.docbody strong { color: var(--ink); }
.pdf { width: 100%; height: min(78vh, 900px); border: 1px solid var(--stroke); border-radius: var(--r-sm); background: #fff; }
.sigbox { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r); border: 1px solid var(--gold-stroke); background: radial-gradient(120% 80% at 50% 0%, var(--gold-soft), transparent 60%), var(--glass); }
.signature { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 2rem; line-height: 1.2; color: var(--ink); border-bottom: 1px solid var(--stroke-hi); padding-bottom: 6px; overflow-wrap: anywhere; }
.hash { font-family: var(--mono); font-size: .76rem; color: var(--dim); overflow-wrap: anywhere; letter-spacing: 0; }

/* accounts */
.acct { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--glass); }
.acct .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--stroke); font-weight: 700; font-size: .95rem; flex: none; }
.acct .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acct .id { font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; letter-spacing: 0; }

/* checklists */
.progress { height: 6px; border-radius: 999px; background: var(--glass-hi); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.task:last-child { border-bottom: 0; }
.task.done .t { color: var(--dim); text-decoration: line-through; }
.task .t { flex: 1; min-width: 0; }

/* list editors in Settings */
.ed-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.ed-row:last-child { border-bottom: 0; }
@media (max-width: 720px) { .ed-row { grid-template-columns: minmax(0, 1fr); } }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .in { width: auto; }
.toolbar input[type="search"] { min-width: 220px; flex: 1; max-width: 340px; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 20px; align-items: start; }
@media (max-width: 980px) { .split-2 { grid-template-columns: minmax(0, 1fr); } }
td .row { flex-wrap: nowrap; }
.wrap-cell { white-space: normal; min-width: 220px; max-width: 420px; }
.ann { display: flex; flex-direction: column; gap: 10px; }
.ann .body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.ann.unread { border-color: var(--soft-stroke); }
.g2s { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.dl.tight { grid-template-columns: minmax(0, 92px) minmax(0, 1fr); gap: 8px 14px; font-size: .88rem; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: .95rem; white-space: nowrap; }
.stars .off { color: var(--stroke-hi); }
.reports-to { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.reports-to .person .avatar { width: 24px; height: 24px; font-size: .6rem; }
.dirtable td { vertical-align: top; }
.dirtable td:first-child { min-width: 220px; }
