@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-v12-latin-300.bf9077ba6a28.woff2") format("woff2");
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jost-v12-latin-regular.ca8179325b0c.woff2") format("woff2");
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jost-v12-latin-500.b61a79b40f6c.woff2") format("woff2");
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/jost-v12-latin-700.0ff4ac57e8ac.woff2") format("woff2");
}

:root {
  --bg: #f6faf9;
  --panel: #ffffff;
  --panel-soft: #fbfefe;
  --text: #212529;
  --muted: #6c757d;
  --line: #dce7e8;
  --brand: #28a9b6;
  --brand-dark: #208792;
  --brand-soft: rgba(40, 169, 182, .12);
  --brand-tint: #a8dad9;
  --accent: #d80b75;
  --gold: #b7891f;
  --ok: #198754;
  --warn: #a46a13;
  --danger: #dc3545;
  --radius: 8px;
  --reading-width: 780px;
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--brand-dark);
  color: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 500;
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 15px/1.5 "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 400;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(40, 169, 182, .3);
  outline-offset: 2px;
}

.shell {
  min-height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  min-width: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  border-right: 1px solid var(--line);
  color: var(--text);
  padding: 22px 18px;
  box-shadow: 8px 0 28px rgba(33, 37, 41, .04);
}

.brand {
  display: grid;
  gap: 4px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand strong {
  color: var(--brand);
  font-size: 20px;
  font-weight: 500;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: #344044;
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 400;
}

.nav a.active,
.nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 3px 0 0 var(--brand);
  text-decoration: none;
}

.nav a.nav-resume {
  margin: 4px 0 10px;
  border: 1px solid rgba(40, 169, 182, .32);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.nav-resume span,
.nav-resume small {
  display: block;
}

.nav-resume span {
  color: var(--brand-dark);
  font-weight: 700;
}

.nav-resume small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.nav-group {
  min-width: 0;
}

.nav-group > summary {
  padding: 10px 12px;
  border-radius: 6px;
  color: #344044;
  cursor: pointer;
  font-weight: 500;
  list-style-position: inside;
}

.nav-group > summary:hover,
.nav-group > summary:focus-visible,
.nav-group[open] > summary {
  background: #f1f7f7;
  color: var(--brand-dark);
}

.nav-group-links {
  display: grid;
  gap: 2px;
  margin: 3px 0 4px 12px;
  padding-left: 8px;
  border-left: 1px solid #c8d9da;
}

.nav .nav-group-links a {
  padding: 7px 9px;
  font-size: 13px;
}

.main {
  min-width: 0;
}

.topbar {
  height: 64px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}

.content {
  padding: 28px;
  max-width: 1320px;
}

.page-title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.subtle {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(33, 37, 41, .03);
}

.panel {
  padding: 18px;
}

.card {
  padding: 16px;
}

.metric {
  display: grid;
  gap: 4px;
}

.metric strong {
  font-size: 30px;
  font-weight: 500;
  color: var(--brand-dark);
}

.material-stats {
  margin: 18px 0;
}

.section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: 0;
}

.content-row {
  align-content: start;
}

.content-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

code {
  max-width: 100%;
  display: inline-block;
  overflow-wrap: anywhere;
  color: #344044;
  font-size: 13px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f6f6;
  color: #344044;
  font-size: 12px;
  font-weight: 500;
}

.chip.active,
.chip.ok {
  background: #e8f6f2;
  color: #166534;
}

.chip.pilot {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.chip.warn,
.chip.ocr_needed,
.chip.missing_planned {
  background: #fef3c7;
  color: var(--warn);
}

.chip.archive {
  background: #f7faf9;
  color: #475569;
}

.chip.in_progress,
.chip.started {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.chip.completed,
.chip.passed,
.chip.approved,
.chip.reviewed {
  background: #e8f6f2;
  color: #166534;
}

.chip.failed,
.chip.question {
  background: #fee2e2;
  color: var(--danger);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0;
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.view-tabs a {
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #344044;
  text-align: center;
  font-weight: 500;
}

.view-tabs a:hover,
.view-tabs a.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 2px solid var(--brand-soft);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 190px;
}

.button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  text-decoration: none;
}

.button.secondary {
  background: #fff;
  color: var(--brand);
}

.button.secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.link-button {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 400;
  cursor: pointer;
}

.link-button:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--muted);
  background: #f7fbfb;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  align-items: start;
}

.section-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.section-block h3 {
  margin: 0 0 8px;
}

.document-body {
  overflow-wrap: anywhere;
}

.document-body p {
  max-width: 78ch;
}

.original-text-block {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.original-text-block summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 500;
}

.original-text {
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfefe;
  padding: 12px;
  font: 400 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.learning-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f2f2;
}

.learning-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.progress-actions,
.note-form,
.quiz-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.progress-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-row p {
  margin: 0;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.choice-option:hover {
  border-color: var(--brand-tint);
  background: var(--brand-soft);
}

.wiki-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.wiki-nav-item {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.wiki-nav-item span {
  color: var(--muted);
  font-size: 12px;
}

.wiki-nav-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-nav-item.disabled {
  color: var(--muted);
  background: var(--panel-soft);
}

.toc-list {
  display: grid;
  gap: 6px;
}

.toc-list a,
.toc-list span {
  display: block;
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--text);
}

.toc-list a:hover,
.toc-list a.active {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

.scroll-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.relation-row {
  align-content: start;
}

.handbook-map {
  display: grid;
  gap: 18px;
}

.handbook-block {
  display: grid;
  gap: 8px;
}

.handbook-title {
  font-weight: 500;
  color: var(--text);
}

.register-list {
  display: grid;
  gap: 8px;
}

.register-pill {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
}

.register-pill span {
  grid-row: span 2;
  font-weight: 500;
  color: var(--brand);
}

.register-pill strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.register-pill small {
  color: var(--muted);
}

.register-pill:hover,
.register-pill.active {
  border-color: var(--brand-tint);
  background: var(--brand-soft);
  text-decoration: none;
}

.structure-panel {
  overflow: hidden;
}

.structure-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.structure-header p {
  margin: 0;
}

.org-scroll {
  overflow-x: auto;
  padding: 8px 4px 14px;
}

.org-scroll:focus-visible {
  outline: 3px solid rgba(40, 169, 182, .3);
  outline-offset: 2px;
}

.org-chart {
  min-width: 1120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  align-items: start;
}

.org-column {
  display: grid;
  gap: 22px;
  align-content: start;
  position: relative;
  --org-connector-x: 72px;
  --org-folder-height: 86px;
}

.org-column::before {
  content: "";
  position: absolute;
  top: var(--org-folder-height);
  bottom: 8px;
  left: var(--org-connector-x);
  width: 1px;
  background: #cfdadb;
}

.org-folder {
  width: 190px;
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 2px;
  justify-self: center;
  padding: 12px;
  border: 1px solid #98a8aa;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: center;
}

.org-folder span {
  display: inline;
  padding: 0 4px;
  background: #ffe4d6;
  font-size: 22px;
  line-height: 1.1;
}

.org-folder strong {
  font-size: 20px;
  font-weight: 500;
}

.org-folder:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  text-decoration: none;
}

.org-registers {
  display: grid;
  gap: 16px;
}

.org-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  position: relative;
  color: var(--text);
}

.org-row::before {
  content: "";
  position: absolute;
  left: var(--org-connector-x);
  right: calc(100% - 132px);
  height: 1px;
  background: #cfdadb;
}

.org-row:hover {
  color: var(--text);
  text-decoration: none;
}

.org-register-code,
.org-register-card {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 9px;
  border: 1px solid #98a8aa;
  background: #fff;
  text-align: center;
}

.org-register-code {
  font-weight: 500;
  line-height: 1.2;
}

.org-register-card {
  gap: 4px;
  border: 3px solid #e6007e;
  background: #dff4f8;
}

.org-register-card strong {
  max-width: 100%;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.org-register-card small {
  color: #344044;
}

.org-row:hover .org-register-card,
.org-row:focus-visible .org-register-card {
  background: #f0fcfd;
  box-shadow: 0 0 0 3px rgba(230, 0, 126, .12);
}

.context-strip {
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  padding: 10px 12px;
  border-radius: 6px;
  background: #e8f6f2;
  color: #166534;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: min(420px, 100%);
}

.access-page {
  min-height: 100vh;
  margin: 0;
  background: #f5f8f7;
  color: #253336;
}

.access-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.access-box {
  width: min(420px, 100%);
  padding: 38px 36px 34px;
  border: 1px solid #d3dede;
  border-top: 4px solid var(--brand);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(35, 51, 54, .09);
}

.access-brand {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid #9bc4c6;
  border-radius: 50%;
  color: var(--brand-dark);
  font: 500 27px/1 "Jost", sans-serif;
}

.access-brand i {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #d7aa34;
  clip-path: polygon(50% 0, 61% 36%, 100% 38%, 69% 59%, 79% 100%, 50% 75%, 21% 100%, 31% 59%, 0 38%, 39% 36%);
}

.access-eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.access-box h1 {
  margin: 0;
  color: #253336;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
}

.access-intro {
  margin: 12px 0 24px;
  color: #5d6b6e;
  line-height: 1.55;
}

.access-form {
  display: grid;
  gap: 9px;
}

.access-form label {
  color: #344044;
  font-size: 13px;
  font-weight: 600;
}

.access-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aebdbf;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.access-form input[type="password"]:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(16, 129, 133, .16);
  outline-offset: 1px;
}

.access-form .button {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
}

.access-error {
  margin: 2px 0 0;
  color: #a12636;
  font-size: 13px;
}

.access-note {
  margin: 18px 0 0;
  color: #758285;
  font-size: 12px;
  text-align: center;
}

.access-lock-button {
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .access-box {
    padding: 30px 24px 28px;
  }
}

.page-heading,
.content-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-heading {
  margin-bottom: 22px;
}

.page-heading p,
.section-heading p,
.content-heading p {
  margin: 4px 0 0;
}

.section-kicker {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.control-note {
  display: block;
  color: #7b8789;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nav-separator {
  height: 1px;
  margin: 8px 12px;
  background: var(--line);
}

.role-context {
  margin-left: 4px;
  font-size: 12px;
}

.role-switcher select {
  min-width: 210px;
}

.dashboard-metrics,
.dashboard-primary,
.dashboard-secondary,
.dashboard-section {
  margin-top: 18px;
}

.dashboard-metrics .metric strong {
  font-size: 24px;
  line-height: 1.2;
}

.continue-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  border-left: 4px solid var(--brand);
}

.continue-panel h2,
.continue-panel p {
  margin: 0;
}

.continue-panel .button {
  justify-self: start;
  margin-top: 4px;
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.dashboard-shortcut {
  display: grid;
  min-height: 124px;
  align-content: start;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.dashboard-shortcut:hover,
.dashboard-shortcut:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}

.dashboard-shortcut span {
  color: var(--muted);
  font-weight: 300;
}

.compact-list {
  gap: 2px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.topic-card {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.topic-card:hover {
  border-color: var(--brand-tint);
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.topic-card strong {
  font-size: 16px;
  font-weight: 500;
}

.topic-card span {
  color: var(--muted);
  font-size: 13px;
}

.library-search {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(320px, 1fr);
  gap: 6px 14px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.library-search label,
.form-field > label,
.role-choice-field legend {
  font-size: 13px;
  font-weight: 500;
}

.search-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.personal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0 18px;
}

.personal-tabs a {
  padding: 7px 10px;
  border-radius: 6px;
  color: #344044;
}

.personal-tabs a.active,
.personal-tabs a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.library-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.library-section {
  margin-top: 28px;
}

.library-list {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 18px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.library-item:hover {
  background: rgba(255, 255, 255, .72);
  color: var(--brand-dark);
  text-decoration: none;
}

.library-item-main {
  display: grid;
  gap: 4px;
}

.library-item-main strong {
  font-size: 16px;
  font-weight: 500;
}

.library-item-side {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.library-item > .control-note {
  grid-column: 1 / -1;
}

.library-control-note {
  margin-top: 28px;
}

.empty-state {
  margin-top: 22px;
}

.content-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.content-heading {
  margin-bottom: 18px;
}

.editor-chips {
  justify-content: flex-end;
}

.learner-nav .wiki-nav-item strong {
  white-space: normal;
  line-height: 1.25;
}

.wiki-nav-item small {
  margin-top: 2px;
}

.wiki-nav-center {
  text-align: center;
}

.document-body .section-block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.document-body .section-block h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
}

.content-media-list {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.content-media {
  margin: 0;
}

.content-media img,
.content-media video {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #f2f6f6;
}

.content-media figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.compact-panel {
  padding: 14px;
}

.progress-summary {
  margin-top: 8px;
}

.learning-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.learning-actions form,
.learning-actions .button,
.action-panel .button {
  width: 100%;
}

.action-panel {
  display: grid;
  gap: 8px;
}

.control-details {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.control-details summary {
  cursor: pointer;
  font-weight: 400;
}

.control-data {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.control-data div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
}

.control-data dt {
  font-weight: 500;
}

.control-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.editor-panel {
  border-left: 3px solid #e6007e;
}

.stage-list,
.stage-goals {
  display: grid;
  gap: 16px;
}

.stage-goals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.stage-goal {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.stage-reference {
  margin-top: 14px;
}

.editor-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.editor-action {
  display: grid;
  gap: 5px;
  min-height: 92px;
  align-content: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.editor-action:hover {
  border-color: var(--brand-tint);
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.editor-action span {
  color: var(--muted);
  font-size: 13px;
}

.upload-panel {
  margin-bottom: 18px;
}

.editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-top: 16px;
}

.content-editor-panel {
  width: 100%;
  max-width: var(--reading-width);
}

.content-editor-form {
  display: grid;
  gap: 18px;
}

.content-editor-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.content-editor-textarea {
  min-height: 58vh;
  line-height: 1.6;
}

.editor-formset {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.editor-formset-heading h2 {
  margin: 3px 0 6px;
  font-size: 18px;
}

.editor-formset-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.editor-formset-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) minmax(210px, 1.4fr) minmax(130px, .85fr) minmax(150px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.editor-external-link-row {
  grid-template-columns: minmax(150px, .9fr) minmax(220px, 1.4fr) minmax(170px, 1fr) 92px auto auto;
}

.form-checkbox {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  white-space: nowrap;
  font-size: 13px;
}

.form-checkbox-delete {
  color: #9b2f4f;
}

.content-external-links {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.content-external-links h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.content-external-links ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-external-links li {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  align-items: baseline;
}

.content-external-links li span {
  color: var(--muted);
  font-size: 13px;
}

.form-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-help {
  color: var(--muted);
  font-size: 12px;
}

.role-choice-field {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.role-choice-field ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.role-choice-field label,
.checkbox-field label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.role-choice-field input,
.checkbox-field input {
  width: auto;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.checkbox-field .form-help,
.checkbox-field .errorlist {
  grid-column: 2;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.errorlist,
.form-errors {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.editor-status-grid {
  align-items: start;
}

.status-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.status-count:last-child {
  border-bottom: 0;
}

.technical-details {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.technical-grid {
  margin-top: 16px;
}

.chip.published {
  background: #e8f6f2;
  color: #166534;
}

.chip.review,
.chip.draft {
  background: #fef3c7;
  color: var(--warn);
}

.chip.archived {
  background: #eef2f2;
  color: #475569;
}

[hidden] {
  display: none !important;
}

.compact-button {
  padding: 7px 10px;
}

.nav-with-count {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-count {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e6007e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.now-due {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.now-due > h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.now-due-packages,
.now-due-items {
  display: grid;
  gap: 8px;
}

.now-due-package {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.now-due-package-title {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.now-due-package-title span,
.now-due-items small {
  color: var(--muted);
  font-size: 11px;
}

.now-due-field > summary,
.now-due-completed > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.now-due-items {
  margin: 6px 0 8px 9px;
}

.now-due-items a {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #344044;
  font-size: 12px;
  line-height: 1.25;
}

.completed-items a {
  color: var(--muted);
  text-decoration: line-through;
}

.now-due-mobile {
  display: none;
}

.package-grid,
.learning-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.package-card,
.learning-field-panel,
.package-progress-summary {
  display: grid;
  gap: 12px;
  align-content: start;
}

.package-card .section-title {
  margin: 8px 0 0;
}

.package-card time {
  color: var(--muted);
  font-size: 13px;
}

.package-progress-summary {
  grid-template-columns: auto minmax(200px, 1fr);
  align-items: center;
  margin-bottom: 18px;
}

.package-progress-summary > div:first-child {
  display: grid;
}

.package-progress-summary strong {
  font-size: 24px;
}

.learning-field-panel header {
  border-bottom: 1px solid var(--line);
}

.package-item-list {
  display: grid;
}

.package-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.package-item:last-child {
  border-bottom: 0;
}

.package-item.completed .package-item-main > a {
  color: var(--muted);
  text-decoration: line-through;
}

.package-item-main {
  display: grid;
  gap: 5px;
}

.package-status-form select {
  min-width: 0;
  padding: 7px;
}

.package-builder-grid,
.management-grid,
.question-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.package-builder-item,
.assignment-row,
.account-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.package-search {
  max-width: 680px;
}

.package-search-results {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.package-search-result {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.package-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.package-add-form {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr .8fr .8fr;
  gap: 8px;
  align-items: end;
}

.package-reading-scope,
.package-section-picker {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.package-section-picker.is-inactive {
  opacity: .5;
}

.package-reading-scope {
  display: grid;
  gap: 5px;
}

.package-reading-scope label,
.package-section-picker label {
  display: flex;
  grid-template-columns: none;
  gap: 7px;
  align-items: start;
  font-weight: 400;
}

.package-reading-scope input,
.package-section-picker input {
  width: auto;
  margin-top: 3px;
}

.package-section-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
}

.package-section-picker legend,
.package-reading-scope legend {
  font-size: 12px;
  font-weight: 500;
}

.package-relevance {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 500;
}

.package-add-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.package-add-form .checkbox-field {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}

.package-add-form .package-note {
  grid-column: span 3;
}

.table-wrap {
  overflow-x: auto;
}

.activation-link {
  border-left: 3px solid var(--brand);
}

.marks-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.marks-filter label,
.tag-edit-form {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.marks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.tag-manager {
  position: sticky;
  top: 18px;
}

.tag-row,
.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-collection-list,
.tag-collection-row,
.tag-rename-form {
  display: grid;
  gap: 8px;
}

.tag-collection-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  justify-items: start;
}

.tag-collection-row details,
.tag-collection-row details form {
  width: 100%;
}

.tag-rename-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 8px 0;
}

.study-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #cbd5d6;
  border-radius: 999px;
  background: #f4f7f7;
  color: #263033;
  font-size: 12px;
  font-weight: 500;
}

.study-tag.yellow { background: #fff1a8; border-color: #d6bd4b; }
.study-tag.mint { background: #c8f0df; border-color: #70b79a; }
.study-tag.blue { background: #cfe8ff; border-color: #77a9d3; }
.study-tag.rose { background: #ffd6e7; border-color: #cf7ba0; }

.tag-checkboxes label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
}

.tag-checkboxes input,
.annotation-recipients input {
  width: auto;
}

.annotation-quote {
  margin: 8px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  white-space: pre-wrap;
}

.question-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.question-row blockquote {
  margin: 6px 0 0;
  color: var(--muted);
}

.question-side {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.message-thread {
  display: grid;
  gap: 10px;
}

.thread-message {
  margin-left: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: var(--panel-soft);
}

.thread-message.from-trainee {
  margin: 0 24px 0 0;
  border-left-color: #e6007e;
}

.thread-message p {
  margin: 6px 0;
}

.thread-message time {
  color: var(--muted);
  font-size: 11px;
}

.annotatable-text {
  max-width: 78ch;
  white-space: pre-wrap;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.text-annotation {
  padding: 0;
  border-radius: 2px;
  color: inherit;
  cursor: pointer;
}

.text-annotation.is-preview {
  box-shadow: 0 0 0 1px rgba(23, 105, 170, .38);
}

.bg-none { background: transparent; }
.bg-yellow { background: #fff1a8; }
.bg-mint { background: #c8f0df; }
.bg-blue { background: #cfe8ff; }
.bg-rose { background: #ffd6e7; }
.underline-magenta { border-bottom: 3px solid #c0006f; }
.underline-blue { border-bottom: 3px solid #1769aa; }
.underline-green { border-bottom: 3px solid #217a4a; }
.underline-red { border-bottom: 3px solid #b42318; }

.text-annotation.needs-review {
  outline: 2px dashed var(--warn);
  outline-offset: 1px;
}

.annotation-indicators {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  margin-left: 2px;
  color: var(--brand-dark);
  font-size: 10px;
  line-height: 1;
  vertical-align: super;
  cursor: pointer;
}

.annotation-indicator {
  width: 13px;
  height: 13px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #9ab7b9;
  font: 700 9px/1 "Jost", sans-serif;
}

.annotation-indicator.tag::before { content: "#"; }
.annotation-indicator.note::before { content: "\270E"; }

.annotation-toolbar {
  width: 100%;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding: 10px 12px 12px;
  border: 1px solid #9bb5b8;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(33, 37, 41, .12);
}

.annotation-toolbar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.annotation-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: 500 24px/1 "Jost", sans-serif;
  cursor: pointer;
}

.annotation-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 10px;
  margin-top: 8px;
}

.annotation-form > label,
.annotation-form fieldset {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.annotation-form legend,
.annotation-form > label {
  font-size: 12px;
  font-weight: 500;
}

.annotation-style-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.annotation-colors,
.annotation-underlines {
  display: flex !important;
  gap: 5px !important;
  align-items: center;
}

.annotation-colors label,
.annotation-underlines label {
  position: relative;
}

.annotation-colors input,
.annotation-underlines input {
  position: absolute;
  opacity: 0;
}

.color-swatch {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 4px;
  color: #172023;
  cursor: pointer;
}

.color-swatch.yellow { background: #fff1a8; }
.color-swatch.mint { background: #c8f0df; }
.color-swatch.blue { background: #cfe8ff; }
.color-swatch.rose { background: #ffd6e7; }
.annotation-colors input:checked + .color-swatch,
.annotation-colors input:focus-visible + .color-swatch { border-color: #172023; }

.underline-swatch {
  width: 28px;
  height: 28px;
  display: block;
  position: relative;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #f8fbfb;
  cursor: pointer;
}

.underline-swatch::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 6px;
  left: 5px;
  height: 3px;
  border-radius: 2px;
  background: #aebabc;
}

.underline-swatch.magenta::after { background: #c0006f; }
.underline-swatch.blue::after { background: #1769aa; }
.underline-swatch.green::after { background: #217a4a; }
.underline-swatch.red::after { background: #b42318; }
.annotation-underlines input:checked + .underline-swatch,
.annotation-underlines input:focus-visible + .underline-swatch { border-color: #172023; }

.annotation-note textarea {
  width: 100%;
  min-height: 42px;
  resize: vertical;
}

.annotation-tags,
.annotation-note,
.annotation-recipients {
  width: 100%;
}

.annotation-tags .tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.annotation-tags > input[type="text"] {
  width: 100%;
}

.annotation-recipient-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.annotation-recipients label {
  display: flex;
  gap: 5px;
  align-items: center;
}

.annotation-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.annotation-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.annotation-delete {
  margin-left: auto;
  color: var(--danger);
}

.portal-assistant {
  position: fixed;
  z-index: 40;
  right: 22px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  pointer-events: none;
  letter-spacing: 0;
}

.assistant-window,
.assistant-launcher {
  pointer-events: auto;
}

.assistant-window {
  position: absolute;
  right: 0;
  bottom: 86px;
  width: 100%;
  max-height: min(650px, calc(100vh - 126px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #9bb5b8;
  border-top: 4px solid #e6007e;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(33, 37, 41, .22);
  transform-origin: bottom right;
  animation: assistant-open .18s ease-out;
}

.assistant-window[hidden] {
  display: none;
}

.assistant-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #f3fbfb;
}

.assistant-header img {
  width: 58px;
  height: 64px;
  object-fit: contain;
  object-position: center top;
}

.assistant-header div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.assistant-header strong {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 500;
}

.assistant-header span {
  color: var(--muted);
  font-size: 12px;
}

.assistant-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: 400 24px/1 "Jost", sans-serif;
  cursor: pointer;
}

.assistant-icon-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.assistant-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.assistant-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 500 14px/1.2 "Jost", sans-serif;
  cursor: pointer;
}

.assistant-tabs button[aria-selected="true"] {
  border-bottom-color: var(--brand);
  color: var(--brand-dark);
}

.assistant-body {
  min-height: 270px;
  overflow-y: auto;
  padding: 14px;
}

.assistant-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.assistant-command .button,
.assistant-command input,
.assistant-command textarea {
  min-height: 42px;
}

.assistant-feedback {
  min-height: 22px;
  margin: 8px 0 2px;
  font-size: 12px;
}

.assistant-results {
  display: grid;
}

.assistant-result {
  display: grid;
  gap: 4px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
}

.assistant-result a {
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}

.assistant-result a:hover {
  color: var(--brand-dark);
}

.assistant-result p {
  margin: 0;
  color: #4b5558;
  font-size: 13px;
  line-height: 1.4;
}

.assistant-result span {
  color: var(--muted);
  font-size: 11px;
}

.assistant-empty {
  margin: 10px 0 0;
  color: var(--muted);
}

.assistant-chat {
  min-height: 188px;
  max-height: 340px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 2px 14px;
}

.assistant-message {
  max-width: 88%;
  padding: 9px 11px;
  border-radius: 8px;
  background: #eef7f7;
  color: var(--text);
}

.assistant-message.user {
  justify-self: end;
  background: var(--brand);
  color: #fff;
}

.assistant-message.unavailable {
  border-left: 3px solid #e6007e;
  background: #fff3f8;
}

.assistant-message p {
  margin: 0;
  white-space: pre-wrap;
}

.assistant-sources {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.assistant-sources a {
  font-size: 12px;
}

.assistant-ai-command textarea {
  max-height: 110px;
}

.assistant-launcher {
  position: relative;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: end center;
  margin-left: auto;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #eaf8f8;
  box-shadow: 0 8px 26px rgba(33, 37, 41, .24);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .12s ease;
}

.assistant-launcher:hover,
.assistant-launcher:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(33, 37, 41, .28);
}

.assistant-launcher img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  object-position: center top;
  transform: translateY(8px);
}

.assistant-launcher-status {
  position: absolute;
  right: 6px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e6007e;
}

.assistant-tooltip {
  position: fixed;
  right: 112px;
  bottom: 42px;
  width: max-content;
  max-width: 180px;
  padding: 6px 9px;
  border-radius: 6px;
  background: #263236;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.assistant-launcher:hover .assistant-tooltip,
.assistant-launcher:focus-visible .assistant-tooltip {
  opacity: 1;
}

.portal-assistant.is-open .assistant-launcher {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(.86);
}

@keyframes assistant-open {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
  }

  .now-due-desktop {
    display: none;
  }

  .now-due-mobile {
    display: block;
    margin: 12px 18px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .now-due-mobile > summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    cursor: pointer;
    font-weight: 500;
  }

  .now-due-mobile > summary span {
    color: var(--muted);
    font-size: 12px;
  }

  .now-due-mobile-body {
    padding: 0 13px 13px;
  }

  .package-builder-grid,
  .management-grid,
  .question-detail-grid,
  .marks-layout {
    grid-template-columns: 1fr;
  }

  .tag-manager {
    position: static;
  }

  .package-add-form,
  .marks-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .package-section-picker {
    grid-template-columns: 1fr;
  }

  .brand {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .nav {
    display: grid;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav a {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .nav-separator {
    width: 1px;
    height: 36px;
    margin: 2px 6px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .detail-layout,
  .wiki-nav {
    grid-template-columns: 1fr;
  }

  .topic-grid,
  .editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .structure-header {
    display: grid;
  }

  .org-chart {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .org-column::before {
    left: 56px;
  }

  .org-folder {
    width: min(220px, 100%);
  }

  .org-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  .org-row::before {
    left: 56px;
    right: calc(100% - 106px);
  }

  .org-register-card strong {
    font-size: 15px;
  }

  .progress-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    height: auto;
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .page-heading,
  .content-heading,
  .section-heading {
    display: grid;
  }

  .topbar {
    padding: 12px 14px;
  }

  .role-switcher,
  .role-switcher select {
    width: 100%;
  }

  .content {
    padding: 16px 14px;
  }

  .topic-grid,
  .editor-actions,
  .stage-goals,
  .editor-form,
  .library-search,
  .learning-actions {
    grid-template-columns: 1fr;
  }

  .package-grid,
  .learning-field-grid,
  .package-progress-summary,
  .package-item,
  .package-add-form,
  .marks-filter,
  .annotation-form {
    grid-template-columns: 1fr;
  }

  .package-add-form .package-note {
    grid-column: 1;
  }

  .package-result-heading {
    display: grid;
  }

  .annotation-colors {
    display: flex;
  }

  .annotation-recipients,
  .annotation-error,
  .annotation-form .form-actions {
    grid-column: 1;
  }

  .question-row,
  .package-builder-item,
  .assignment-row,
  .account-row {
    grid-template-columns: 1fr;
  }

  .question-side {
    justify-items: start;
  }

  .search-command {
    grid-template-columns: 1fr;
  }

  .library-item {
    grid-template-columns: 1fr;
  }

  .library-item-side {
    justify-content: flex-start;
  }

  .library-item > .control-note,
  .form-field-wide {
    grid-column: 1;
  }

  .checkbox-field {
    grid-template-columns: auto 1fr;
  }

  .control-data div {
    grid-template-columns: 1fr;
  }

  .portal-assistant {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
  }

  .assistant-window {
    bottom: 0;
    max-height: calc(100vh - 16px);
    transform-origin: bottom center;
  }

  .assistant-command {
    grid-template-columns: 1fr;
  }

  .assistant-command .button {
    width: 100%;
  }

  .assistant-launcher {
    width: 72px;
    height: 72px;
  }

  .assistant-launcher img {
    width: 82px;
    height: 82px;
  }

  .assistant-tooltip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-window {
    animation: none;
  }

  .assistant-launcher,
  .assistant-tooltip {
    transition: none;
  }
}

.explorer-breadcrumb {
  margin-bottom: 18px;
}

.explorer-heading {
  display: flex;
  max-width: 980px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.explorer-heading p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
}

.explorer-modes {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.explorer-modes a {
  min-width: 112px;
  padding: 9px 18px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.explorer-modes a:hover,
.explorer-modes a:focus-visible {
  color: var(--brand-dark);
  text-decoration: none;
}

.explorer-modes a.active {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 500;
}

.explorer-filter-panel {
  max-width: 1180px;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .62);
}

.explorer-filter-panel > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
}

.explorer-filter-panel > summary::-webkit-details-marker {
  display: none;
}

.explorer-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.explorer-filter-toggle-icon {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.explorer-filter-panel[open] .explorer-filter-toggle-icon {
  transform: rotate(90deg);
}

.explorer-filter-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
}

.explorer-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 4px 0 18px;
}

.explorer-filters label {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.explorer-filters input,
.explorer-filters select {
  width: 100%;
  min-width: 0;
}

.explorer-filter-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}

.explorer-groups {
  display: grid;
  max-width: 1080px;
  gap: 34px;
}

.explorer-group {
  min-width: 0;
}

.explorer-group > header {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.explorer-group > header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.explorer-group > header p {
  margin: 0;
  color: var(--muted);
}

.explorer-rows {
  border-top: 1px solid var(--line);
}

.explorer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  transition: background-color .16s ease, box-shadow .16s ease;
}

.explorer-row:hover,
.explorer-row:focus-visible {
  background: var(--panel-soft);
  box-shadow: inset 3px 0 0 var(--brand);
  color: var(--text);
  text-decoration: none;
}

.explorer-row-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.explorer-row-main strong {
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 500;
}

.explorer-row-eyebrow {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 500;
}

.explorer-row-description {
  color: var(--muted);
  font-size: 13px;
}

.explorer-row-meta {
  display: flex;
  max-width: 340px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 12px;
}

.explorer-row-meta span + span::before {
  content: "\00b7";
  margin-right: 12px;
  color: var(--brand-tint);
}

.explorer-row-arrow {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.explorer-index-tools,
.explorer-source {
  display: flex;
  max-width: 1080px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.explorer-source {
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.explorer-source > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
}

.explorer-index-list {
  max-width: 1080px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.explorer-index-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 12px 15px calc(12px + (var(--index-depth) * 22px));
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.structure-outline-linear .explorer-index-row {
  padding-left: 12px;
}

.explorer-index-marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
}

.explorer-index-heading,
.explorer-index-targets,
.explorer-index-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.explorer-index-heading > span:first-child {
  color: var(--brand-dark);
  font-weight: 500;
}

.explorer-index-heading strong {
  font-size: 16px;
}

.explorer-index-path {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.explorer-index-path span + span::before {
  content: "›";
  margin-right: 7px;
}

.explorer-index-targets {
  margin-top: 8px;
}

.explorer-index-targets a {
  display: inline-grid;
  gap: 1px;
  padding: 7px 9px;
  border-left: 2px solid var(--accent);
  background: var(--panel-soft);
}

.explorer-index-targets a span {
  color: var(--muted);
  font-size: 11px;
}

.explorer-index-targets a strong {
  color: var(--text);
  font-size: 13px;
}

.semantic-reference-list .explorer-row {
  grid-template-columns: minmax(0, 1fr) 18px;
}

.semantic-reference-list .explorer-row-arrow {
  grid-column: 2;
}

.reference-review-list {
  display: grid;
  max-width: 1180px;
  gap: 0;
  border-top: 1px solid var(--line);
}

.reference-review-row {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  gap: 26px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.reference-review-source,
.reference-review-form {
  display: grid;
  align-content: start;
  gap: 8px;
}

.reference-review-source blockquote {
  margin: 4px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--brand-tint);
  color: var(--muted);
  font-size: 13px;
}

.reference-review-source mark {
  background: rgba(183, 137, 31, .22);
  color: var(--text);
}

.reference-review-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.reference-review-form select,
.reference-review-form input {
  width: 100%;
}

@media (max-width: 1120px) {
  .explorer-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav a {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .explorer-modes {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .explorer-modes a {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .explorer-filter-summary {
    display: none;
  }

  .explorer-filters {
    grid-template-columns: 1fr;
  }

  .explorer-filter-actions {
    grid-column: auto;
  }

  .dashboard-shortcuts {
    grid-template-columns: 1fr;
  }

  .explorer-row {
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 10px;
    padding-right: 6px;
    padding-left: 8px;
  }

  .explorer-row-meta {
    grid-column: 1;
    justify-content: flex-start;
  }

  .explorer-row-meta span + span::before {
    margin-right: 8px;
  }

  .explorer-row-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .explorer-index-tools,
  .explorer-source {
    align-items: flex-start;
    flex-direction: column;
  }

  .explorer-source > div {
    justify-content: flex-start;
  }

  .explorer-index-row {
    grid-template-columns: 26px minmax(0, 1fr);
    padding-left: calc(8px + (var(--index-depth) * 10px));
  }

  .reference-review-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .explorer-row {
    transition: none;
  }
}

/* Ablenkungsarme Azubi-Leseansicht */
.breadcrumb-stack {
  width: 100%;
  max-width: var(--reading-width);
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
}

.breadcrumb-stack-bottom {
  max-width: var(--reading-width);
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.path-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.learning-path-breadcrumb,
.document-path-breadcrumb {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.breadcrumb-origin-learning .learning-path-breadcrumb,
.breadcrumb-origin-archive .document-path-breadcrumb {
  color: #344044;
  font-size: 15px;
}

.breadcrumb-origin-learning .learning-path-breadcrumb .breadcrumb-label,
.breadcrumb-origin-archive .document-path-breadcrumb .breadcrumb-label {
  font-weight: 700;
}

.breadcrumb-label {
  color: var(--brand-dark);
  font-weight: 500;
}

.breadcrumb-current-title {
  display: block;
  max-width: var(--reading-width);
  margin-top: 8px;
  color: #263236;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.reading-heading {
  margin-bottom: 20px;
}

.reading-tools {
  position: sticky;
  z-index: 35;
  top: 12px;
  width: 100%;
  max-width: var(--reading-width);
  margin: 0 0 14px;
}

.reading-toolbar {
  width: 100%;
  display: flex;
  align-items: stretch;
  border: 1px solid #c6d2d3;
  border-radius: 6px;
  background: rgba(247, 250, 250, .97);
  box-shadow: 0 3px 12px rgba(33, 37, 41, .06);
}

.reading-tools:has(.annotation-toolbar:not([hidden])) .reading-toolbar {
  border-radius: 6px 6px 0 0;
}

.reading-mode-switch {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 0;
}

.reading-mode-button {
  min-height: 44px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 0;
  border-right: 1px solid #c6d2d3;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 8px 12px 6px;
  background: transparent;
  color: #344044;
  font: 500 13px/1.2 "Jost", sans-serif;
  cursor: pointer;
}

.reading-mode-button:first-child {
  border-radius: 5px 0 0 5px;
}

.reading-mode-button.active {
  border-bottom-color: var(--brand);
  background: #fff;
  color: var(--brand-dark);
}

.reading-mode-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.page-toc {
  position: relative;
  flex: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
}

.page-toc-label {
  min-height: 44px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 12px;
  color: #3e4c50;
  font: 500 13px/1.2 "Jost", sans-serif;
  cursor: pointer;
  list-style: none;
}

.page-toc-label::-webkit-details-marker { display: none; }

.page-toc[open] .page-toc-label {
  background: #fff;
  color: var(--brand-dark);
}

.page-toc .toc-list {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  right: 0;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #c6d2d3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(33, 37, 41, .14);
}

.page-toc .toc-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.page-toc .toc-list a:hover,
.page-toc .toc-list a:focus-visible {
  background: #f1f7f7;
}

.package-reading-notice {
  max-width: var(--reading-width);
  display: grid;
  gap: 3px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border-left: 4px solid #e6007e;
  background: #fff5fa;
}

.package-reading-notice p {
  margin: 5px 0 0;
}

.reading-document {
  width: 100%;
  max-width: var(--reading-width);
  margin: 0;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  font-size: 17px;
  line-height: 1.72;
}

.reading-document .annotatable-text {
  line-height: 1.72;
  white-space: pre-line;
}

.reading-document .section-block {
  margin-top: 26px;
  padding-top: 0;
  border-top: 0;
}

.editorial-content-note {
  margin: 0 0 24px;
  padding: 10px 12px;
  border-left: 3px solid #c92f45;
  background: #fff6f7;
  color: #a22236;
  font-size: 14px;
  line-height: 1.45;
}

.editorial-content-note strong,
.editorial-content-note p {
  margin: 0;
}

.editorial-content-note p + p {
  margin-top: 4px;
}

.content-section-split {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(180px, .8fr);
  gap: 34px;
}

.content-section-split .content-section-aside {
  min-width: 0;
}

.content-section-aside > div {
  white-space: pre-line;
}

.content-section-document_code .annotatable-text {
  font-weight: 600;
}

.reading-followup {
  width: 100%;
  max-width: var(--reading-width);
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.reading-followup .note-form textarea {
  min-height: 110px;
}

.stage-path-nav,
.package-path-nav {
  max-width: var(--reading-width);
  margin: 28px 0 0;
}

.next-path-actions {
  width: 100%;
  max-width: var(--reading-width);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.next-path-action {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 15px 16px;
  border: 1px solid #c8d5d6;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #fff;
  color: #263236;
}

.next-path-action.archive {
  border-left-color: #e6007e;
}

.next-path-action:hover {
  border-color: var(--brand);
  color: #263236;
  text-decoration: none;
}

.next-path-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.next-path-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  color: #667579;
  font-size: 11px;
  line-height: 1.35;
}

.next-path-breadcrumb span:not(:last-child)::after {
  content: "\203A";
  margin-left: 5px;
  color: #9aa6a8;
}

.next-path-action strong {
  font-size: 16px;
  line-height: 1.35;
}

.next-path-action.disabled {
  border-left-color: #adbabc;
  background: #f7f9f9;
  color: var(--muted);
}

.package-path-nav {
  padding-top: 18px;
  border-top: 2px solid #e6007e;
}

.supporting-topics,
.action-panel,
.control-details,
.version-details {
  max-width: var(--reading-width);
  margin-top: 22px;
}

.annotation-root.mode-browse .annotatable-text {
  cursor: text;
}

.annotation-root.mode-browse .text-annotation {
  cursor: text;
}

.annotation-root.mode-annotate .annotatable-text,
.annotation-root.mode-annotate .text-annotation {
  cursor: crosshair;
}

.content-section {
  scroll-margin-top: 112px;
}

.content-reference-link {
  color: var(--brand-dark);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content-reference-link::after {
  content: "\2197";
  display: inline-block;
  margin-left: 2px;
  color: var(--brand);
  font-size: .68em;
  line-height: 1;
  vertical-align: super;
}

.content-reference-kind {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 5px;
  border: 1px solid #9bc4c6;
  border-radius: 3px;
  background: #edf7f7;
  color: #24484a;
  font-size: .68em;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  vertical-align: .12em;
  white-space: nowrap;
}

.training-plan-toc {
  display: grid;
  gap: 26px;
}

.training-plan-chapter {
  display: grid;
  gap: 10px;
}

.training-plan-chapter h2 {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0;
  color: #253336;
  font-size: 19px;
}

.training-plan-chapter h2 span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.training-plan-entries {
  display: grid;
  border-top: 1px solid #d9e2e3;
}

.training-plan-entry {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 8px;
  border-bottom: 1px solid #d9e2e3;
  color: #253336;
}

.training-plan-entry:hover,
.training-plan-entry:focus-visible {
  background: #f0f8f8;
  color: var(--brand-dark);
  text-decoration: none;
}

.training-plan-goal {
  color: #5d6b6e;
  font-size: 12px;
  font-weight: 500;
}

.training-plan-entry strong {
  font-weight: 500;
  line-height: 1.35;
}

.training-plan-arrow {
  color: var(--brand);
  font-size: 23px;
  line-height: 1;
  text-align: right;
}

@media (max-width: 620px) {
  .editor-formset-row,
  .editor-external-link-row {
    grid-template-columns: 1fr;
  }

  .form-checkbox {
    min-height: auto;
  }

  .training-plan-entry {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .training-plan-goal {
    grid-column: 1;
  }

  .training-plan-entry strong {
    grid-column: 1;
  }

  .training-plan-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

.text-annotation .content-reference-link {
  text-decoration-style: double;
}

.learner-folder-list {
  display: grid;
  gap: 20px;
}

.learner-folder {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.learner-folder-heading,
.learner-register-list a {
  display: grid;
  gap: 4px;
}

.learner-folder-heading strong {
  font-size: 26px;
}

.learner-folder-heading small,
.learner-register-list small {
  color: var(--muted);
}

.learner-register-list {
  display: grid;
  gap: 8px;
}

.learner-register-list a {
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  background: #fff;
}

.reading-edge-toggle {
  display: none;
  position: fixed;
  z-index: 60;
  min-height: 38px;
  gap: 6px;
  align-items: center;
  border: 1px solid #b7c7c8;
  border-radius: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .96);
  color: #263236;
  font: 500 12px/1 "Jost", sans-serif;
  box-shadow: 0 3px 14px rgba(33, 37, 41, .1);
  cursor: pointer;
}

.reading-menu-toggle {
  top: 14px;
  left: 14px;
}

.reading-account-toggle {
  top: 14px;
  right: 14px;
}

body.reading-focus .reading-edge-toggle {
  display: inline-flex;
}

body.reading-focus .content {
  width: min(900px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 76px 34px 56px;
}

@media (min-width: 981px) {
  body.reading-focus .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body.reading-focus .sidebar {
    position: fixed;
    z-index: 55;
    left: 0;
    width: 260px;
    transform: translateX(calc(-100% + 9px));
    opacity: .12;
    transition: transform .2s ease, opacity .2s ease;
  }

  body.reading-focus .sidebar:hover,
  body.reading-focus .sidebar:focus-within,
  body.reading-focus.reading-navigation-open .sidebar {
    transform: translateX(0);
    opacity: 1;
  }

  body.reading-focus .topbar {
    position: fixed;
    z-index: 54;
    top: 0;
    right: 0;
    left: 0;
    transform: translateY(calc(-100% + 8px));
    opacity: .12;
    transition: transform .2s ease, opacity .2s ease;
  }

  body.reading-focus .topbar:hover,
  body.reading-focus .topbar:focus-within,
  body.reading-focus.reading-account-open .topbar {
    transform: translateY(0);
    opacity: 1;
  }

}

@media (max-width: 980px) {
  .learner-folder {
    grid-template-columns: 1fr;
  }

  body.reading-focus .sidebar {
    position: fixed;
    z-index: 55;
    inset: 0 auto 0 0;
    width: min(300px, 88vw);
    height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 12px 0 38px rgba(33, 37, 41, .18);
    padding-top: 70px;
  }

  body.reading-focus.reading-navigation-open .sidebar {
    transform: translateX(0);
  }

  body.reading-focus .sidebar .nav {
    display: grid;
    overflow: visible;
  }

  body.reading-focus .topbar {
    position: fixed;
    z-index: 54;
    top: 58px;
    right: 14px;
    left: auto;
    width: min(300px, calc(100vw - 28px));
    display: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(33, 37, 41, .16);
  }

  body.reading-focus.reading-account-open .topbar {
    display: flex;
  }

  body.reading-focus .now-due-mobile {
    display: none;
  }
}

@media (max-width: 640px) {
  body.reading-focus .content {
    padding: 70px 18px 42px;
  }

  .reading-document {
    padding: 20px 18px;
    font-size: 16px;
    line-height: 1.66;
  }

  .content-section-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reading-tools {
    top: 58px;
  }

  .reading-toolbar {
    overflow: visible;
  }

  .reading-mode-button {
    gap: 4px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }

  .reading-toolbar {
    flex-wrap: nowrap;
  }

  .page-toc {
    width: auto;
    flex-basis: auto;
    border-top: 0;
  }

  .page-toc .toc-list {
    right: 0;
  }

  .reading-tools .annotation-toolbar {
    max-height: 58vh;
  }

  .annotation-colors,
  .annotation-underlines {
    justify-content: start;
  }

  .next-path-actions {
    grid-template-columns: 1fr;
  }

  .stage-path-nav,
  .package-path-nav {
    grid-template-columns: 1fr;
  }

  .reading-mode-hint {
    display: none;
  }

  .content-section {
    scroll-margin-top: 150px;
  }
}

.structure-page-heading {
  align-items: end;
}

.structure-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.structure-index-card {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.structure-index-card h2,
.structure-index-card p {
  margin: 0;
}

.structure-index-card .button {
  margin-top: auto;
}

.structure-index-card-heading,
.structure-entry-heading,
.structure-source-links,
.structure-targets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.structure-source-panel,
.source-index-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.source-index-notice > div:first-child {
  display: grid;
  gap: 3px;
}

.structure-outline {
  padding: 0;
  overflow: hidden;
}

.structure-entry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 15px 18px 15px calc(18px + (var(--index-depth) * 24px));
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.structure-entry:last-child {
  border-bottom: 0;
}

.structure-entry:target {
  background: var(--brand-soft);
  box-shadow: inset 4px 0 0 var(--brand);
}

.structure-outline-linear .structure-entry {
  padding-left: 18px;
}

.structure-entry-marker {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.structure-entry-body {
  min-width: 0;
}

.structure-entry-heading strong {
  font-size: 16px;
}

.structure-code {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-weight: 700;
}

.structure-entry-path {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.structure-entry-path span + span::before {
  content: "›";
  margin: 0 6px;
}

.structure-targets {
  margin-top: 9px;
}

.structure-target {
  display: inline-grid;
  gap: 1px;
  min-width: 170px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.structure-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.structure-target strong {
  color: var(--text);
  font-size: 13px;
}

.structure-open-note {
  margin: 7px 0 0;
  color: var(--warn);
}

.structure-entry.status-open,
.structure-entry.status-planned,
.structure-entry.status-partial {
  box-shadow: inset 3px 0 0 rgba(164, 106, 19, .45);
}

.index-path-nav {
  margin-top: 20px;
}

@media (max-width: 640px) {
  .structure-source-panel,
  .source-index-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .structure-entry {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-right: 12px;
    padding-left: calc(12px + (var(--index-depth) * 12px));
  }

  .structure-outline-linear .structure-entry {
    padding-left: 12px;
  }

  .index-path-nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.reading-focus .sidebar,
  body.reading-focus .topbar {
    transition: none;
  }
}
