/* Existing Krommenhoek identity; original logo and locally hosted Sora. */
@font-face {
  font-family: "Sora";
  src: url("/assets/sora-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Bebas Neue";
  src: url("/assets/bebas-neue-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1e1e1e;
  --muted: #595959;
  --accent: #006cad;
  --accent-deep: #00578c;
  --accent-soft: #eaf5fd;
  --sidebar: #1e1e1e;
  --paper: #f4f5f6;
  --surface: #fff;
  --line: #dde1e5;
  --warn: #6d4917;
  --warn-bg: #fff3d9;
  --danger: #922e27;
  --danger-bg: #fff0ec;
  --focus: #068ae0;
  --radius: 14px;
  --shadow: 0 2px 7px rgb(30 30 30 / 5%);
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-inline-size: 280px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus, h1:focus { outline: none; }
h1, h2, h3, h4, p, dl { margin: 0; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 3.4vw, 3.2rem); font-weight: 720; }
h2 { font-size: clamp(1.23rem, 2vw, 1.55rem); font-weight: 700; }
h3 { font-size: 1.17rem; font-weight: 700; }
h4 { font-size: 1rem; }
p, dd { overflow-wrap: anywhere; }
small { font-size: .845rem; }
hr { border: 0; border-top: 1px solid var(--line); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-width: 0;
}
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 10;
  transform: translateY(-150%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem .9rem;
}
.skip-link:focus { transform: none; }
.initial-load { padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.symbol { flex: none; line-height: 1; font-size: 1.12em; }
.eyebrow { font-size: .73rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.app-main { min-width: 0; }
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 34px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 28px 18px 21px;
  background: var(--sidebar);
  color: #fff;
}
.sidebar-top { padding-inline: 8px; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .85rem; line-height: 1.2; color: inherit; }
.brand strong { display: block; font-size: 1.35rem; font-weight: 720; letter-spacing: -.035em; }
.brand small { display: block; margin-top: .28rem; color: #b9bec3; font-size: .75rem; }
.brand-logo { display: block; padding: 10px; background: #fff; max-width: 100%; }
.brand-logo img { display: block; width: 180px; max-width: 100%; height: auto; }
.site-nav { display: grid; align-content: start; gap: 4px; }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: .7rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  color: #e3e3e3;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 550;
}
.site-nav .symbol { width: 1.05rem; text-align: center; color: #b9bec3; }
.site-nav a:hover { background: #292c2f; }
.site-nav a.active { background: #25333d; color: #fff; box-shadow: inset 3px 0 #068ae0; }
.site-nav a.active .symbol { color: #79cbff; }
.sidebar-account { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #44494e; }
.account { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.account > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.account strong { display: block; font-size: .9rem; }
.account small { color: #b9bec3; }
.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25333d;
  color: #eaf5fd;
  font-size: .82rem;
  font-weight: 700;
}
.account-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .65rem; }
.account-actions .bare-link { color: #e3e3e3; font-size: .82rem; }
.mobile-toggle { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  height: 66px;
  padding-inline: clamp(20px, 4vw, 50px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar-label { color: var(--muted); font-size: .86rem; font-weight: 650; }
.app-main > .message { margin: 1rem clamp(20px, 4vw, 50px) 0; }

.workspace { width: min(100%, 1510px); margin-inline: auto; padding: clamp(25px, 4vw, 56px) clamp(18px, 4vw, 50px) 4rem; }
.workspace > * + * { margin-top: 1.45rem; }
.loading { color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; }
.page-head > div:first-child { min-width: 0; flex: 1 1 22rem; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head p { max-width: 65ch; margin-top: .55rem; color: var(--muted); }
.page-head .eyebrow { margin-bottom: .4rem; }
.back-link { display: inline-block; color: var(--accent); font-size: .9rem; font-weight: 650; text-decoration: none; }
.back-link:hover, .table-link:hover { text-decoration: underline; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  text-align: center;
  text-decoration: none;
  padding: .62rem .95rem;
  min-height: 43px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.25;
  font-size: .89rem;
  font-weight: 680;
  transition: background-color .12s ease, border-color .12s ease;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.button.secondary { background: #fff; border-color: #cdd5dc; color: var(--accent-deep); }
.button.secondary:hover { background: var(--accent-soft); border-color: #99b7cd; }
.button.danger-button { background: var(--danger-bg); border-color: #e4ada5; color: var(--danger); }
.button.danger-button:hover { background: #ffe4dd; }
.button.compact { min-height: 37px; font-size: .82rem; padding: .46rem .7rem; }
.button:disabled { opacity: .56; cursor: not-allowed; }
.bare-link {
  display: inline-block;
  width: fit-content;
  border: 0;
  padding: .12rem 0;
  background: transparent;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.bare-link.danger { color: var(--danger); }
.actions, .inline-items, .inline-between { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.inline-between { justify-content: space-between; }
.badge {
  display: inline-flex;
  align-items: center;
  max-width: fit-content;
  padding: .25rem .58rem;
  border: 1px solid transparent;
  border-radius: 100px;
  background: #efefef;
  color: #424242;
  font-size: .73rem;
  font-weight: 720;
  letter-spacing: .005em;
  line-height: 1.25;
}
.badge.good { background: #e0f0e5; color: #23553b; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.muted { background: #f0eeec; color: #604c48; }
.message { padding: .75rem .9rem; border: 1px solid #bdd7e9; border-radius: 8px; color: var(--accent-deep); background: #eaf5fd; font-size: .9rem; }
.message.error { border-color: #eac4bd; background: var(--danger-bg); color: var(--danger); }
.message.success { border-color: #bdd7e9; background: var(--accent-soft); color: var(--accent-deep); }

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(17px, 2.4vw, 28px);
  box-shadow: var(--shadow);
}
.panel > h2 { margin-bottom: 1rem; }
.panel > .message + * { margin-top: .9rem; }
.panel.narrow { max-width: 640px; }
.empty { padding: 2rem 1rem; border: 1px dashed #cdd5dc; border-radius: var(--radius); background: #f7f7f7; text-align: center; }
.empty h3 { margin-top: .5rem; }
.empty p { margin-top: .45rem; color: var(--muted); }
.empty .button { margin-top: 1rem; }
.empty-icon { color: var(--accent); font-size: 1.55rem; font-weight: 700; }

.auth-shell { display: grid; grid-template-columns: minmax(280px, 46fr) minmax(0, 54fr); min-height: 100vh; }
.auth-visual {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100%;
  padding: clamp(24px, 6vw, 82px);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(112deg, #1e1e1e 0 71%, #26313a 71% 100%);
}
.auth-visual::before { content: ""; position: absolute; z-index: 1; inset: 0 auto 0 0; width: 7px; background: var(--accent); }
.auth-visual .brand { z-index: 1; }
.auth-visual-label { position: relative; z-index: 1; margin-top: auto; padding-top: 3rem; color: #d6dadf; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.auth-pattern {
  position: absolute;
  width: 94%;
  max-width: 700px;
  aspect-ratio: 1;
  right: -18%;
  bottom: -3%;
  opacity: .9;
  isolation: isolate;
  pointer-events: none;
}
.auth-pattern i { position: absolute; inset: 0; border: 1px solid rgb(6 138 224 / 68%); background: linear-gradient(135deg, rgb(6 138 224 / 10%), transparent 64%); clip-path: polygon(0 100%, 0 0, 100% 0, 100% 18%, 18% 100%); }
.auth-pattern i:nth-child(1) { background: rgb(6 138 224 / 10%); }
.auth-pattern i:nth-child(2) { transform: scale(.8) translate(-10%, 10%); }
.auth-pattern i:nth-child(3) { transform: scale(.6) translate(-25%, 20%); }
.auth-pattern i:nth-child(4) { transform: scale(.4) translate(-52%, 32%); }
.auth-main { display: grid; align-items: center; justify-items: center; padding: clamp(25px, 6vw, 86px); background-color: var(--paper); background-image: linear-gradient(rgb(30 30 30 / 2.2%) 1px, transparent 1px), linear-gradient(90deg, rgb(30 30 30 / 2.2%) 1px, transparent 1px); background-size: 32px 32px; }
.auth-card { width: min(100%, 480px); padding: clamp(24px, 4vw, 42px); border-top: 5px solid var(--accent); background: #fff; box-shadow: 0 12px 32px rgb(30 30 30 / 8%); }
.auth-card > * + * { margin-top: 1.1rem; }
.auth-card h1 { max-width: 10ch; color: var(--ink); font-family: "Bebas Neue", "Arial Narrow", sans-serif; font-size: clamp(3.2rem, 5vw, 5.1rem); font-weight: 400; line-height: .91; letter-spacing: .015em; text-transform: uppercase; }
.auth-card .intro { color: var(--muted); font-size: 1.05rem; }
.auth-card input:not([type="checkbox"], [type="radio"]) { border-radius: 2px; }
.auth-card .button { border-radius: 2px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.auth-card .message { border-radius: 2px; border-left: 4px solid var(--accent); }
.auth-footnote { font-size: .87rem; }
.demo-actions { display: grid; gap: .67rem; }
.demo-actions .button, .auth-card form > .button { width: 100%; }

.learner-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 245px;
  padding: clamp(23px, 4vw, 48px);
  border-radius: 17px;
  background: #eaf5fd;
  border: 1px solid #bdd7e9;
}
.learner-hero-copy { position: relative; z-index: 1; max-width: 60ch; }
.learner-hero .page-head p { color: #424242; }
.hero-lines { position: absolute; width: min(36vw, 370px); aspect-ratio: 1; right: -3%; top: -38%; transform: rotate(-20deg); opacity: .55; }
.hero-lines i { border-color: #86bce0; background: rgb(6 138 224 / 8%); }
.hero-lines i:nth-child(2) { transform: scale(.8) translate(-10%, 8%); }
.hero-lines i:nth-child(3) { transform: scale(.59) translate(-29%, 16%); }
.hero-totals { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.15rem; }
.hero-totals span { padding: .35rem .62rem; border: 1px solid #bdd7e9; border-radius: 7px; background-color: #f7fbff; color: #424242; font-size: .81rem; }
.hero-totals strong { margin-right: .2rem; }
.course-section > h2 { margin-bottom: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 330px)); gap: 1rem; align-items: stretch; }
.course-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.course-card-cover { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; background: #f0f7fc; padding: 1rem 1.1rem; border-bottom: 1px solid #dde1e5; min-height: 79px; }
.course-card-symbol, .metric-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #bdd7e9; border-radius: 9px; background: #eaf5fd; color: #006cad; font-size: 1.1rem; font-weight: 680; }
.course-card-body { display: grid; flex: 1; gap: .85rem; padding: 1.15rem; align-content: start; }
.course-card h3 { overflow-wrap: anywhere; margin-top: .18rem; }
.course-details { font-size: .84rem; }
.progress { min-width: 0; }
.progress-label { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; margin-bottom: .25rem; font-size: .75rem; color: var(--muted); }
.progress-label strong { color: var(--accent); }
progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: #e3e7eb; overflow: hidden; color: var(--accent); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #e3e7eb; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

.lesson-layout { display: grid; grid-template-columns: minmax(195px, 260px) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.lesson-nav { padding: 1rem; }
.lesson-nav h2 { font-size: 1.02rem; }
.lesson-nav-head { margin-bottom: .85rem; }
.lesson-nav-toggle { display: none; }
.lesson-nav ol { display: grid; gap: 3px; list-style: none; padding: 0; margin: .85rem 0 0; }
.lesson-nav li a, .locked-step { display: flex; align-items: flex-start; gap: .55rem; padding: .53rem .42rem; border-radius: 7px; color: var(--ink); text-decoration: none; line-height: 1.35; font-weight: 560; font-size: .84rem; overflow-wrap: anywhere; }
.lesson-nav li .current { background: var(--accent-soft); color: var(--accent-deep); }
.lesson-nav li a:hover { background: #eaf5fd; }
.locked-step { color: var(--muted); }
.locked-step small { display: block; font-size: .73rem; }
.step-mark { display: grid; place-items: center; flex: none; width: 23px; height: 23px; border-radius: 50%; background: #edf2ed; color: var(--accent); font-size: .73rem; font-weight: 750; }
.step-mark.done { background: #d7eadb; color: #20533c; }
.lesson-content { padding: clamp(19px, 3vw, 36px); }
.lesson-content > * + * { margin-top: 1rem; }
.lesson-content > h2 { margin-bottom: 0; }
.lesson-content header h2 { margin-top: .25rem; font-size: clamp(1.4rem, 2.7vw, 2rem); }
.lesson-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .7rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.rich { min-width: 0; overflow-wrap: anywhere; }
.rich img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.rich table { min-width: 0; width: 100%; table-layout: fixed; }
.rich table td, .rich table th { white-space: normal; padding: .6rem; overflow-wrap: anywhere; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p + p { margin-top: .55rem; }
.prose { line-height: 1.66; max-width: 75ch; }
.prose p, .prose ul, .prose ol, .prose figure, .prose h2, .prose h3, .prose h4 { margin-block: .8rem; }
.prose figure { margin-inline: 0; }
.prose img { margin-block: .55rem; }
.quiz-form { display: grid; gap: 1rem; }
.quiz-question { min-width: 0; padding: 1rem; margin: 0; border: 1px solid var(--line); border-radius: 10px; }
.quiz-question legend { color: var(--accent-deep); padding-inline: .35rem; font-weight: 730; font-size: .9rem; }
.quiz-question > * + * { margin-top: .65rem; }
.question-content { font-weight: 630; }
.choices { display: grid; gap: .4rem; }
.choices > p { font-size: .8rem; }
.choice {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: start;
  gap: .6rem;
  border: 1px solid var(--line);
  padding-inline: .75rem;
  border-radius: 8px;
}
.choice:has(input:checked) { border-color: #9ebda8; background: #eaf5fd; }
.choice input { margin-top: .75rem; }
.choice label { display: block; cursor: pointer; min-height: 43px; padding-block: .6rem; }
.result-summary { display: flex; align-items: center; gap: 1rem; }
.result-icon { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 1.3rem; font-weight: 760; }
.result-summary p { margin-top: .3rem; }
.result-feedback { padding-top: 1rem; border-top: 1px solid var(--line); }
.feedback-item { display: grid; justify-items: start; gap: .35rem; margin-top: .6rem; padding: .8rem; border: 1px solid var(--line); border-radius: 8px; }
.submitted-question { display: grid; gap: .75rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.submitted-answer { display: grid; gap: .35rem; min-width: 0; padding: .7rem .85rem; border-radius: 7px; background: #f4f5f6; }
.submitted-text { white-space: pre-wrap; }
.submitted-options { margin: 0; padding-inline-start: 1.15rem; }
.submitted-options li + li { margin-top: .3rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.metric {
  display: grid;
  align-content: start;
  gap: .25rem;
  min-width: 0;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.metric:hover, .shortcut:hover { border-color: #86bce0; background: #f7fbff; }
.metric .metric-icon { margin-bottom: .35rem; }
.metric > strong { font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 730; line-height: 1.12; }
.metric-label { color: var(--accent-deep); font-size: .85rem; font-weight: 690; }
.metric small { color: var(--muted); }
.review-callout { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: 1rem 1.25rem; border: 1px solid #eed9ad; border-radius: var(--radius); background: #fbf3e0; color: #5f451c; }
.review-callout h2 { font-size: 1.06rem; margin-bottom: .18rem; }
.shortcut-grid { display: grid; gap: .65rem; }
.shortcut { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); text-decoration: none; }
.shortcut span > small { display: block; margin-top: .1rem; color: var(--muted); }
.shortcut > .symbol { color: var(--accent); }
.stack { display: grid; gap: .9rem; align-items: start; }
.wide-stack { gap: 1.4rem; }
.compact-stack { gap: .45rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .8rem 1rem; }
.field { display: grid; align-content: start; min-width: 0; gap: .3rem; color: var(--ink); }
.field > span { font-size: .87rem; font-weight: 680; }
.field small { color: var(--muted); font-weight: 400; }
input:not([type="checkbox"], [type="radio"]), textarea, select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 42px;
  padding: .58rem .7rem;
  border: 1px solid #b6bfc7;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
select { overflow: hidden; text-overflow: ellipsis; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 1.08rem; height: 1.08rem; margin: 0; accent-color: var(--accent); }
.check-field { display: flex; align-items: baseline; gap: .55rem; font-size: .89rem; line-height: 1.4; }
.check-field input { flex: none; align-self: start; margin-top: .07rem; }

.table-panel { padding: 0; }
.table-panel > h2 { padding: 1.1rem 1.2rem 0; }
.table-panel .empty { margin: .8rem 1.1rem 1.1rem; }
.table-wrap { width: 100%; overflow: auto; border-radius: inherit; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: .76rem .9rem; vertical-align: top; }
th { background: #f4f5f6; color: #424242; font-size: .76rem; font-weight: 750; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { line-height: 1.4; overflow-wrap: anywhere; }
td small { display: block; margin-top: .18rem; color: var(--muted); white-space: nowrap; }
td .button { white-space: nowrap; font-size: .8rem; min-height: 36px; padding: .43rem .62rem; }
.table-link { display: inline-block; color: var(--accent); font-weight: 700; text-decoration: none; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; padding: 1rem 1.1rem; }
.filter-bar .field { flex: 1 1 min(13rem, 100%); max-width: 25rem; }
.filter-bar > p { margin-left: auto; font-size: .85rem; align-self: flex-end; padding-bottom: .5rem; }
.meta-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); gap: .7rem 1rem; }
.meta-list div { min-width: 0; }
.meta-list dt { color: var(--muted); font-size: .8rem; }
.meta-list dd { margin: .15rem 0 0; font-size: .91rem; font-weight: 660; }
.meta-list + *, .table-wrap + .message { margin-top: 1rem; }
.queue-totals { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .2rem 1.2rem 1rem; }
.count-pill { display: flex; align-items: center; gap: .35rem; }
.job-note { min-width: 7rem; max-width: 24rem; }
.job-note .job-title { white-space: normal; }
.row-details { min-width: 7rem; }
.row-details .stack { margin-top: .6rem; min-width: 12rem; }
.row-details summary { color: var(--accent); font-weight: 700; cursor: pointer; }

.people-panel { padding: 0; }
.people-panel > h2 { padding: 1.1rem 1.2rem 0; margin-bottom: 0; }
.people-panel .empty { margin: 0 1.15rem 1.15rem; }
.people-list { border-top: 1px solid var(--line); }
.person-row { border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-row > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; justify-content: space-between; padding: .9rem 1.15rem; cursor: pointer; list-style: none; }
.person-row > summary::before { content: "+"; color: var(--accent); font-weight: 750; }
.person-row[open] > summary::before { content: "−"; }
.person-main { flex: 1 1 11rem; min-width: 0; overflow-wrap: anywhere; }
.person-main strong, .person-main small { display: block; }
.person-main small { color: var(--muted); }
.person-tags { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.person-details { display: grid; gap: 1rem; padding: 1rem 1.15rem; background: #f8faf7; border-top: 1px solid var(--line); }
.person-details .field { max-width: 26rem; }
.activation-output { display: grid; gap: .55rem; width: min(100%, 46rem); }
.activation-output .field { max-width: none; }

.editor, .chapter-editors { display: grid; gap: .9rem; }
.chapter-editors + .button { margin-top: .85rem; }
.editor .panel > .muted + .button { margin-top: .7rem; }
.issue-list { margin-block: .5rem 0; padding-inline-start: 1.2rem; }
.issue-list li + li { margin-top: .25rem; }
.issue-list small { display: block; color: var(--muted); }
.chapter-editor { border: 1px solid var(--line); border-radius: 9px; background: #f8faf7; }
.chapter-editor > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .75rem .8rem; cursor: pointer; list-style: none; }
.chapter-editor > summary::before { content: "+"; color: var(--accent); font-size: 1.11rem; font-weight: 700; }
.chapter-editor[open] > summary::before { content: "−"; }
.chapter-editor > summary > strong { min-width: 0; overflow-wrap: anywhere; flex: 1; }
.chapter-editor > summary .muted { font-size: .82rem; }
.chapter-fields { padding: .9rem; border-top: 1px solid var(--line); }
.editor-question, .editor-option { display: grid; gap: .65rem; border: 1px solid var(--line); padding: .75rem; border-radius: 8px; background: #fff; }
.editor-option { border-style: dashed; }
.advanced-editor summary, .archive-details summary { width: fit-content; cursor: pointer; font-weight: 670; color: var(--accent); }
.advanced-editor > * + * { margin-top: .65rem; }
.code-input { font-family: ui-monospace, monospace; font-size: .84rem; }
.save-bar { display: grid; gap: .55rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: #eef4ee; }
.archive-details { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.archive-details > * + * { margin-top: .6rem; }

@media (max-width: 1060px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .workspace { padding-inline: clamp(16px, 3vw, 30px); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-layout { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; max-height: none; gap: .7rem; padding: .8rem 1rem; overflow: visible; }
  .sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding-inline: 0; }
  .brand strong { font-size: 1.15rem; }
  .brand small { font-size: .7rem; }
  .brand-mark { width: 35px; height: 35px; padding: 8px; }
  .mobile-toggle { display: inline-flex !important; border-color: #527361; color: #eff6ee; background: transparent; }
  .mobile-toggle:hover { background: #25333d; }
  .sidebar:not(.menu-open) .site-nav, .sidebar:not(.menu-open) .sidebar-account { display: none; }
  .site-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav a { min-height: 43px; line-height: 1.2; }
  .sidebar-account { padding: .7rem 0 0; margin-top: 0; }
  .topbar { height: 48px; padding-inline: 1rem; }
  .workspace { padding: 1.35rem 1rem 2.7rem; }
  .workspace > * + * { margin-top: 1.15rem; }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .lesson-nav ol { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .2rem; }
  .lesson-nav-toggle { display: inline-flex; }
  .lesson-nav:not(.lesson-nav-expanded) ol { display: none; }
  .learner-hero { min-height: 0; padding: 1.3rem; }
  .hero-lines { width: 52vw; top: -23%; opacity: .32; }
  .auth-shell { display: flex; flex-direction: column; }
  .auth-visual { min-height: 126px; padding: 1.2rem 1.4rem; }
  .auth-pattern { width: 46%; right: -5%; bottom: -22%; opacity: .55; }
  .auth-visual-label { padding-top: 1rem; font-size: .68rem; }
  .auth-main { justify-items: start; padding: 2rem 1.4rem; }
  .auth-card { margin-inline: auto; padding: 1.5rem; }
  .auth-card h1 { font-size: clamp(3.1rem, 11vw, 4rem); }
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .metric small { font-size: .78rem; }
  .panel { border-radius: 11px; }
  .site-nav .symbol { display: none; }
  .site-nav a { padding-inline: .6rem; }
  .page-head > div:first-child { flex-basis: 100%; }
  .page-head > .actions { width: 100%; }
  .page-head > .actions .button { width: 100%; }
  .filter-bar .field { max-width: none; }
  .filter-bar > p { width: 100%; margin: 0; padding: 0; }
  .lesson-footer { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

/* Competency matrix: dense reference tables and explicit, separate review steps. */
.message.warning { border-color: #e2ceaa; background: var(--warn-bg); color: var(--warn); }
.stack.tight { gap: .3rem; }
.matrix-status-list { display: flex; flex-wrap: wrap; gap: .35rem; max-width: 30rem; }
.matrix-status-list > small { flex-basis: 100%; }
.matrix-choices { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.matrix-choice { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; min-width: 0; }
.matrix-choice input { width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; flex: 0 0 1.1rem; accent-color: var(--accent); }
.matrix-choice > span { min-width: 0; overflow-wrap: anywhere; font-size: .91rem; }
.matrix-choice small { display: block; margin-top: .2rem; color: var(--muted); font-size: .8rem; }
.matrix-details > summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.matrix-details[open] > summary { margin-bottom: .8rem; }
.matrix-details > p { white-space: normal; min-width: min(100%, 15rem); max-width: 45rem; }
.matrix-criterion { border: 1px solid var(--line); border-radius: 9px; padding: 1rem; margin: 0; min-width: 0; background: #f8faf7; }
.matrix-criterion > legend { font-weight: 700; padding-inline: .35rem; max-width: 100%; overflow-wrap: anywhere; }
.matrix-criterion > * + * { margin-top: .8rem; }
.matrix-criterion .matrix-choices:empty { display: none; }
.matrix-criterion h3 { margin-bottom: .8rem; }
.matrix-issue { border-left: 3px solid #d7aa58; border-radius: 4px; padding: .8rem 1rem; background: #fbf8ef; }
.matrix-issue > * + * { margin-top: .55rem; }
.matrix-issue > .stack { margin-top: .8rem; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.matrix-criterion .code-input { min-height: 14rem; }
@media (max-width: 760px) {
  .matrix-choices { grid-template-columns: minmax(0, 1fr); }
  .matrix-criterion { padding: .8rem; }
}
