.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 1000;
  background: var(--ac);
  color: var(--acink);
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.loading {
  padding: 12vh;
  text-align: center;
  color: var(--mu);
}
.brand {
  position: relative;
  width: 100%;
  aspect-ratio: 3.2;
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  isolation: isolate;
  background: var(--bg);
}
.brand-logo {
  position: absolute;
  top: -6%;
  left: -6%;
  width: 112%;
  max-width: none;
  height: auto;
  /* Preserve the supplied artwork; blend its white canvas into the dark UI. */
  filter: invert(1) hue-rotate(180deg) contrast(1.12) brightness(1.25);
  mix-blend-mode: screen;
}

.top form {
  display: contents;
}
.top .role {
  margin-left: auto;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
input,
select,
textarea {
  color-scheme: dark;
}
.page-head {
  padding-top: 38px;
  margin-bottom: 28px;
}
.page-head .h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  margin: 8px 0;
}
.page-head p {
  margin-top: 10px;
}
.spaced {
  margin-top: 24px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.small {
  font-size: 13px;
}
.page-head .actions {
  margin-left: auto;
}
.field textarea {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--line);
  color: var(--tx);
  font: inherit;
  padding: 12px;
  border-radius: 10px;
  resize: vertical;
  line-height: 1.6;
}
.field select,
.field input {
  width: 100%;
}
.field input[type="checkbox"] {
  width: auto;
  accent-color: var(--ac);
}
.field .hint {
  color: var(--mu);
  font-size: 12px;
}
.editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.field.code textarea {
  font:
    12px/1.7 ui-monospace,
    monospace;
}
.error {
  background: #3a201c;
  border: 1px solid var(--bad);
  border-radius: 10px;
  padding: 14px;
  color: #ffb8aa;
  margin: 16px 0;
}
.success {
  color: var(--ok);
}

.notice {
  border-left: 3px solid var(--ac);
  padding: 12px 16px;
  background: var(--s1);
  color: var(--mu);
  font-size: 13px;
  border-radius: 0 8px 8px 0;
}
.guide {
  white-space: pre-wrap;
  line-height: 1.8;
  color: #d4d3cf;
  max-width: 800px;
}
.guide h3 {
  color: var(--tx);
}
.reading-player img {
  filter: brightness(0.6);
}
.reading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  gap: 18px;
  background: linear-gradient(0deg, #0009, transparent);
}
.reading-overlay h2 {
  font-size: clamp(20px, 3vw, 36px);
  max-width: 450px;
}
.reading-overlay p {
  max-width: 440px;
  color: #eee;
  font-size: 14px;
}
.player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}
.upnext .un b {
  overflow-wrap: anywhere;
}
.lesson-actions {
  margin-top: 18px;
}
.assignment-strip {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(90deg, rgba(var(--ac-rgb), 0.09), transparent);
  border: 1px solid rgba(var(--ac-rgb), 0.27);
  border-radius: 12px;
}
.assignment-strip a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 12px;
}
.muted-link {
  color: var(--mu);
  text-decoration: underline;
}
.stack {
  display: grid;
  gap: 14px;
}
.notification {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--s1);
}
.notification.unread {
  border-left: 3px solid var(--ac);
}
.notification p {
  margin: 8px 0;
  color: var(--mu);
}
.notification small {
  color: var(--fa);
}
.badge-count {
  background: var(--ac);
  color: var(--acink);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
}
.ticklist {
  max-height: 280px;
  overflow: auto;
  margin: 10px 0;
}
.ticklist label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px;
}
.ticklist input {
  accent-color: var(--ac);
}
dialog {
  color: var(--tx);
  background: var(--s1);
  border: 1px solid var(--line2);
  border-radius: 18px;
  padding: 28px;
  width: min(620px, calc(100vw - 32px));
  max-height: 88vh;
  overflow: auto;
  margin: auto;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-family: var(--fd);
  font-size: 26px;
  margin-bottom: 20px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.dialog-head button {
  padding: 0 4px;
  font-size: 24px;
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 12px;
  margin-top: 20px;
}
.feedback {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 12px;
  margin: 12px 0;
  text-align: left;
}
.feedback p {
  margin-top: 8px;
  color: var(--mu);
}
.feedback.correct {
  border-left: 3px solid var(--ok);
}
.feedback.incorrect {
  border-left: 3px solid var(--bad);
}
.opt input {
  accent-color: var(--ac);
}
.profile {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.content-table td:first-child {
  min-width: 220px;
}
.content-table .mu {
  font-size: 12px;
}
.content-table .actions {
  flex-wrap: nowrap;
}
.user-secret {
  font-family: ui-monospace, monospace;
  background: var(--s2);
  padding: 16px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.outbox-item summary {
  cursor: pointer;
  padding: 16px;
  background: var(--s2);
  border-radius: 10px;
}
.outbox-item pre {
  white-space: pre-wrap;
  font: 14px/1.7 var(--fb);
  padding: 20px;
  color: var(--mu);
}
.form-error:empty {
  display: none;
}
.chart-ring {
  display: grid;
  place-items: center;
  min-width: 160px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--ac) var(--progress), var(--s3) 0);
  position: relative;
}
.chart-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--s1);
}
.chart-ring > div {
  z-index: 1;
  text-align: center;
}
.chart-ring b {
  display: block;
  font-size: 42px;
  font-family: var(--fd);
}
.chart-ring span {
  font-size: 12px;
  color: var(--mu);
}
.source-note {
  font-size: 12px;
  color: var(--fa);
  margin-top: 14px;
}
.cert .link {
  white-space: normal;
}
.qnav button {
  min-width: 100px;
}
.admin-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.stat b {
  min-height: 36px;
}
.pill {
  vertical-align: middle;
}
.course-status {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}
.role a {
  padding: 6px 14px;
  font-size: 13px;
}
.role a.on {
  background: var(--tx);
  color: var(--bg);
  border-radius: 999px;
}
.field label.checkbox {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  display: flex;
  gap: 10px;
}
.field label.checkbox input {
  width: auto;
}
.tab-p {
  scroll-margin-top: 100px;
}
.lesson-guide-label {
  display: block;
  margin-bottom: 12px;
  color: var(--ac);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.form-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.form-section h3 {
  margin-bottom: 16px;
}
.empty .btn {
  margin-top: 18px;
}
.heat .cell {
  background: rgba(var(--ac-rgb), var(--intensity));
}
.certificate-banner {
  padding: 20px;
  border: 1px solid #5cc08d66;
  border-radius: 12px;
  margin-top: 20px;
  background: #5cc08d11;
}
.certificate-banner .btn {
  margin-top: 14px;
}
@media (max-width: 900px) {

  .editor-grid {
    grid-template-columns: 1fr;
  }
  .nav a {
    font-size: 10px;
  }
  .nav a svg {
    width: 18px;
    height: 18px;
  }
  .nav {
    overflow: auto;
  }
  .top .role {
    display: none;
  }
  .profile {
    display: grid;
  }
  .top .bell {
    display: grid;
  }
}
@media (max-width: 560px) {

  .top {
    padding: 12px 16px;
  }
  .top .search {
    max-width: calc(100% - 92px);
  }
  .hero-in {
    padding-bottom: 32px;
  }
  .sec {
    margin-top: 32px;
  }
  .ce-top {
    align-items: center;
  }
  .page-head .h1 {
    font-size: 34px;
  }
  .tbl th,
  .tbl td {
    padding: 10px 8px;
  }
  .editor-grid {
    gap: 10px;
  }
  .actions .btn {
    font-size: 12px;
  }
  .nav a {
    min-width: 54px;
  }
  .reading-overlay p {
    display: none;
  }
  .w-meta {
    gap: 10px;
  }
  .upnext .un {
    grid-template-columns: 90px 1fr;
  }
  .page-head {
    padding-top: 26px;
  }
}
.question-editor {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.question-editor legend {
  font-weight: 700;
  color: var(--ac);
  padding: 0 8px;
}
.answer-editor {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.answer-row {
  display: grid;
  grid-template-columns: 20px 1fr 24px;
  align-items: center;
  gap: 10px;
}
.answer-row input[type="radio"] {
  accent-color: var(--ac);
}
.answer-row input[data-q-option] {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--line);
  color: var(--tx);
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
}
.text-button {
  color: var(--mu);
  font-size: 13px;
  text-decoration: underline;
}
.text-button:hover {
  color: var(--ac);
}
.chapter-editor {
  display: grid;
  grid-template-columns: 110px 1fr 24px;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.chapter-editor .field {
  margin-bottom: 0;
}
.form-section + #captions {
  margin-top: 20px;
}
@media (max-width: 560px) {
  .question-editor {
    padding: 14px;
  }
  .chapter-editor {
    grid-template-columns: 85px 1fr 20px;
  }
}
