:root {
  --bg: #f3efe8;
  --card: #fffdf8;
  --ink: #1d2421;
  --muted: #5d665f;
  --line: #d8d1c4;
  --accent: #8b3d2e;
  --accent-2: #224e46;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #f7f2ea 0%, #eef1ea 100%);
  color: var(--ink);
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
body.modal-open { overflow: hidden; }
.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;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 253, 248, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }
.brand a { font-weight: 700; color: var(--ink); }
.main-nav { display: flex; gap: 0.9rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; width: 100%; }
.nav-link-button {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 400;
}
.nav-link-button:hover { text-decoration: underline; }
.feedback-trigger {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}
.feedback-trigger:hover {
  background: transparent;
  text-decoration: underline;
}
.nav-toggle {
  display: none;
  width: auto;
  padding: 0.55rem 0.85rem;
  background: var(--card);
  color: var(--accent-2);
  border: 1px solid var(--line);
}
.nav-dropdown { position: relative; }
.nav-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-2);
}
.nav-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 12rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(34, 28, 20, 0.12);
  z-index: 10;
}
.nav-menu-right { right: 0; left: auto; }
.nav-menu-section {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-menu-divider {
  height: 1px;
  margin: 0.15rem 0;
  background: var(--line);
}
.nav-menu a { white-space: nowrap; }
.nav-menu form { margin: 0; }
.nav-menu button { width: 100%; padding: 0.6rem 0.75rem; background: transparent; color: var(--accent-2); }
.page-shell { max-width: 980px; margin: 0 auto; padding: 1.5rem; }
.page-shell:has(.docs-shell) { max-width: 1220px; }
.card, .nested-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(34, 28, 20, 0.08);
}
.nested-card { margin-top: 1rem; }
.membership-access-line {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.membership-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.membership-actions .inline-form,
.membership-actions form {
  margin: 0;
  width: auto;
}
.purchase-action {
  display: inline-flex;
  margin: 0;
  width: auto;
}
.purchase-action button {
  width: auto;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  white-space: nowrap;
}
.membership-actions button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.button-link-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button-link-primary:hover { text-decoration: none; }
.subtle-filter {
  max-width: 14rem;
  padding: 0.55rem 0.75rem;
  border-color: #e4ddd0;
  background: #faf7f1;
  color: var(--muted);
  box-shadow: none;
}
.subtle-filter::placeholder {
  color: #7a827d;
}
.subtle-filter:focus {
  outline: none;
  border-color: #cfc4b3;
  background: #fffdf8;
  color: var(--ink);
}
.membership-actions .inline-form button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.admin-user-grid {
  display: grid;
  gap: 0.9rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-user-grid label {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}
.field-span-full {
  grid-column: 1 / -1;
}
.field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-user-options {
  display: grid;
  gap: 0.8rem;
  padding-top: 0.25rem;
}
.stack { display: grid; gap: 0.9rem; }
.stack-tight { display: grid; gap: 0.35rem; }
.narrow { max-width: 560px; }
.course-editor-shell {
  max-width: 980px;
  margin: 0 auto;
}
.course-editor-header {
  align-items: center;
  gap: 0.75rem;
}
.course-editor-kicker {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}
.course-editor-header-actions,
.course-modules-header-actions,
.course-module-secondary-actions {
  justify-content: flex-start;
}
.course-editor-section {
  margin-top: 1rem;
}
.course-editor-grid {
  display: grid;
  gap: 0.9rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.course-module-list {
  margin-top: 1rem;
}
.course-module-card {
  padding: 0.9rem 1rem;
  position: relative;
}
.course-module-delete-form {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  margin: 0;
}
.course-module-delete-form .asset-icon-button.asset-icon-danger {
  background: transparent;
  color: var(--accent-2);
}
.course-module-delete-form .asset-icon-button.asset-icon-danger:hover {
  background: rgba(154, 70, 46, 0.1);
  color: var(--accent-2);
}
.course-module-card-body {
  display: grid;
  gap: 0.75rem;
  padding-right: 0;
}

.course-module-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}
.course-module-meta-primary {
  gap: 0.4rem 0.55rem;
}
.course-module-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  flex-wrap: wrap;
}
.module-reorder-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.course-module-inline-form {
  position: relative;
  padding-bottom: 0.05rem;
}
.course-module-inline-slot {
  display: grid;
  gap: 0;
}
.course-module-inline-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: text;
}
.course-module-title-trigger:hover,
.course-module-summary-trigger:hover {
  background: rgba(139, 61, 46, 0.02);
}
.course-module-title-trigger {
  border-radius: 6px;
}
.course-module-summary-trigger {
  min-height: 1.4rem;
  border-radius: 6px;
}
.course-module-inline-editor[hidden] {
  display: none;
}
.course-module-inline-editor {
  margin-top: 0;
}
.course-module-inline-editor input,
.course-module-inline-editor textarea {
  padding: 0.1rem 0;
  border: 0;
  border-bottom: 1px solid #cfc4b3;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.course-module-inline-editor textarea {
  min-height: 4.5rem;
  resize: vertical;
}
.course-module-pill-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
}
.pill-dropdown {
  position: relative;
}
.pill-dropdown-summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.pill-dropdown-summary::-webkit-details-marker {
  display: none;
}
.pill-badge-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.95rem;
  padding: 0.28rem 0.72rem 0.28rem 0.78rem;
  border-radius: 999px;
  border: 1px solid #d9cfbf;
  background: #ece7de;
  color: var(--accent-2);
  font-size: 0.82rem;
  line-height: 1.2;
}
.pill-badge-button::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.05rem);
  transform-origin: center;
  transition: transform 120ms ease;
}
.pill-dropdown[open] .pill-badge-button::after {
  transform: rotate(-135deg) translateY(-0.02rem);
}
.pill-badge-spinner {
  display: none;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid rgba(34, 78, 70, 0.24);
  border-top-color: var(--accent-2);
  border-radius: 999px;
  animation: pill-spin 700ms linear infinite;
}
.pill-badge-button.is-loading .pill-badge-spinner,
.pill-badge-spinner:not([hidden]) {
  display: inline-block;
}
.pill-badge-label {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.pill-dropdown-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: max-content;
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(34, 28, 20, 0.12);
}
.direct-upload-status {
  margin: 0;
}
.direct-upload-status.is-error {
  color: #8b3d2e;
}
.direct-upload-status.is-success {
  color: #1f5a39;
}
.pill-dropdown-item {
  width: 100%;
  min-height: 2rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--accent-2);
  text-align: left;
  white-space: nowrap;
}
.pill-dropdown-item:hover,
.pill-dropdown-item:focus-visible,
.pill-dropdown-item.is-active {
  background: #f4efe7;
  text-decoration: none;
}
@keyframes pill-spin {
  to {
    transform: rotate(360deg);
  }
}
.course-module-meta-trigger {
  width: auto;
  cursor: pointer;
}
.course-module-meta-trigger:hover {
  background: transparent;
}
.course-module-inline-editor-compact {
  display: inline-flex;
  align-items: center;
}
.course-module-pill-field .pill-select select {
  min-width: 0;
}
.course-module-pill-field-status .pill-select select {
  min-width: 7.25rem;
}
.course-module-pill-field-order .pill-select select {
  min-width: 7.75rem;
}
.course-module-count {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}
.course-module-asset-list {
  display: grid;
  gap: 0.6rem;
  margin: 0.85rem 0 0;
  padding-left: 1rem;
}
.course-module-asset-item,
.course-module-video-item {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}
.course-module-video-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: #fff;
}
.course-module-video-item.is-dragging {
  opacity: 0.65;
  background: rgba(10, 80, 140, 0.08);
}
.course-module-card.is-dragging {
  opacity: 0.65;
  background: rgba(10, 80, 140, 0.08);
}
.course-module-video-materials {
  width: 100%;
  padding-top: 0.35rem;
}
.course-module-video-material-list {
  margin-top: 0.45rem;
  padding-left: 0;
  list-style: none;
}
.course-module-video-material-list .course-module-asset-item {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}
.course-module-asset-meta {
  min-width: 0;
  flex: 1 1 16rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.course-module-asset-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.course-module-asset-actions .inline-form {
  margin: 0;
}
[data-video-drag-handle] {
  cursor: grab;
}
.course-module-video-item.is-dragging [data-video-drag-handle] {
  cursor: grabbing;
}
[data-module-drag-handle] {
  cursor: grab;
}
.course-module-card.is-dragging [data-module-drag-handle] {
  cursor: grabbing;
}
[data-course-drag-handle] {
  cursor: grab;
}
tr.is-dragging [data-course-drag-handle] {
  cursor: grabbing;
}
tr.is-dragging {
  opacity: 0.65;
  background: rgba(10, 80, 140, 0.08);
}
.course-module-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.course-module-file-stack {
  display: grid;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}
.course-module-file-view {
  min-width: 0;
}
.course-module-rename-form {
  display: grid;
  gap: 0.45rem;
  max-width: 28rem;
}
.course-module-rename-form[hidden] {
  display: none;
}
.course-module-rename-form input[type="text"] {
  width: 100%;
}
.course-module-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.split-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.65rem;
}
.split-actions .button-secondary,
.split-actions button[type="submit"] {
  width: 100%;
  margin: 0;
}
.course-module-file-link {
  display: inline-block;
  max-width: 100%;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.course-module-file-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}
.course-module-file-link.is-clickable {
  cursor: pointer;
}
.asset-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 0.55rem;
  color: #6c6254;
  text-decoration: none;
  background: transparent;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.asset-icon-svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.asset-icon-button:hover {
  color: var(--accent-2);
  background: rgba(154, 70, 46, 0.1);
}
.asset-icon-button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.asset-icon-danger {
  color: #8e4a4a;
}
.asset-icon-danger:hover {
  color: #9a2f2f;
  background: rgba(154, 47, 47, 0.1);
}
.course-module-video-label {
  display: grid;
  gap: 0.12rem;
}
.modal-dialog-compact {
  max-width: 28rem;
}
@media (max-width: 640px) {
  .course-module-asset-item,
  .course-module-video-item {
    align-items: flex-start;
  }
  .course-module-asset-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
.inline-save-status {
  position: absolute;
  right: 0;
  bottom: -1.1rem;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  font-size: 0.82rem;
  transition: opacity 120ms ease;
}
.inline-save-status[data-state="saving"],
.inline-save-status[data-state="saved"],
.inline-save-status[data-state="error"] {
  opacity: 1;
}
.inline-save-status[data-state="saving"] { color: #7a4c18; }
.inline-save-status[data-state="saved"] { color: #1f5a39; }
.inline-save-status[data-state="error"] { color: #8f2f2f; }
.course-module-title-link {
  color: var(--ink);
}
.course-module-title-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  color: var(--accent-2);
}
.button-secondary-compact {
  min-height: 2.2rem;
  padding: 0.45rem 0.8rem;
}
.button-danger-compact {
  width: auto;
  min-height: 2.35rem;
  padding: 0.5rem 0.85rem;
}
.pill-select {
  display: inline-flex;
  width: auto;
}
.pill-select select {
  width: auto;
  min-width: 8.75rem;
  min-height: 1.95rem;
  padding: 0.32rem 1.9rem 0.32rem 0.8rem;
  border-radius: 999px;
  border-color: #ddd4c7;
  background: #f7f3eb;
}
.about-profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.about-profile-figure {
  margin: 0;
}
.about-profile-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(34, 28, 20, 0.14);
}
.about-profile-copy > :first-child {
  margin-top: 0;
}
@media (max-width: 780px) {
  .course-editor-grid {
    grid-template-columns: 1fr;
  }
  .course-editor-header,
  .course-modules-header,
  .bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .course-module-inline-form {
    padding-bottom: 0.75rem;
  }
  .inline-save-status {
    position: static;
    opacity: 1;
  }
  .inline-save-status:empty {
    display: none;
  }
  .about-profile-layout {
    grid-template-columns: 1fr;
  }
  .about-profile-figure {
    max-width: 360px;
  }
}
input, textarea, select, button {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-line input[type="checkbox"] {
  width: auto;
}
.label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
}
.product-meta-note {
  color: var(--muted);
  font-size: 0.95rem;
}
.product-meta-note p {
  margin: 0.2rem 0;
}
.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0;
  vertical-align: middle;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}
.info-tooltip-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 0.45rem);
  z-index: 20;
  display: none;
  width: min(22rem, 70vw);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172033;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
}
.info-tooltip:hover .info-tooltip-panel,
.info-tooltip:focus .info-tooltip-panel,
.info-tooltip:focus-within .info-tooltip-panel {
  display: block;
}
.info-tooltip-panel span {
  display: block;
}
.info-tooltip-panel span + span {
  margin-top: 0.35rem;
}
button {
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button-secondary,
.inline-form button { background: transparent; color: var(--accent-2); }
.actions-cell > button,
.actions-cell > .button-danger,
.actions-cell > .button-secondary,
.actions-cell > .button-link,
.actions-cell > .inline-form button,
.form-actions button,
.danger-zone button {
  width: auto;
}
.membership-actions .inline-form button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button-danger { background: #8f2f2f; color: #fff; }
.inline-form { display: inline-flex; margin: 0; }
.flash-stack { max-width: 980px; margin: 1rem auto 0; padding: 0 1.5rem; }
.flash { padding: 0.85rem 1rem; border-radius: 12px; margin-bottom: 0.5rem; }
.flash-success { background: #e3f1e8; }
.flash-warning { background: #f9efd9; }
.flash-danger { background: #f6dddd; }
.flash-info { background: #ddeef6; }
.badge {
  display: inline-block;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
}
.notify-link { position: relative; }
.bar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.table-tools,
.form-actions,
.danger-zone,
.actions-cell { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.form-actions,
.danger-zone { justify-content: space-between; }
.table-tools { margin-bottom: 0.85rem; justify-content: space-between; }
.table-tools input { max-width: 18rem; }
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 760px; }
.actions-head { text-align: right; }
.actions-cell { justify-content: flex-end; }
.actions-cell .inline-form { display: inline-flex; }
.primary-actions,
.delete-action {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.primary-actions { justify-content: flex-start; }
.delete-action { margin: 0; }
.form-actions .button-secondary { width: auto; }
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.2;
}
.table-action:hover { text-decoration: none; background: #f4efe7; }
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #ece7de;
  color: var(--accent-2);
  font-size: 0.82rem;
  line-height: 1.2;
}
.status-pill-ok { background: #e3f1e8; color: #1f5a39; }
.status-pill-warn { background: #f9efd9; color: #7a4c18; }
.table-sort {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
}
.muted-note { color: var(--muted); line-height: 1.55; }
.field-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.field-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #ece7de;
  color: var(--accent-2);
  font-size: 0.8rem;
  line-height: 1.2;
}
.field-status-ok { background: #e3f1e8; color: #1f5a39; }
.field-status-warn { background: #f9efd9; color: #7a4c18; }
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: auto;
}
.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.role-guide {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f1e8;
}
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4efe7;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
}
.info-tip-panel {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.45rem);
  z-index: 20;
  display: none;
  width: min(20rem, 70vw);
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 16px 32px rgba(20, 18, 14, 0.18);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
  transform: translateX(-50%);
}
.info-tip:hover .info-tip-panel,
.info-tip:focus .info-tip-panel,
.info-tip:focus-within .info-tip-panel {
  display: block;
}
.section-title { margin: 0; }
.is-submitting { opacity: 0.88; }
.prose p, .prose li { line-height: 1.6; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice.unread { border-left: 4px solid var(--accent); padding-left: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 0.6rem; text-align: left; }
.video-card { background: #f6f5f1; padding: 0.85rem; border-radius: 8px; }
.video-card iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  line-height: normal;
}
.admin-video-preview-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  line-height: normal;
}
.student-video-playlist {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.7rem;
  margin-bottom: 0;
  padding: 0 0 0.35rem;
  padding-left: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.student-video-playlist-item {
  position: relative;
  display: grid;
  gap: 0.35rem;
  flex: 0 0 10rem;
  align-content: start;
  padding: 0.4rem 0.4rem 0.45rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.student-video-playlist-item.is-now-playing {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, white);
  box-shadow: 0 8px 18px rgba(29, 36, 33, 0.08);
}
.student-video-playlist-item.is-loading {
  opacity: 0.72;
}
.student-video-playlist-main {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.student-video-playlist-number {
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  z-index: 1;
  min-width: 1.55rem;
  padding: 0.12rem 0.25rem;
  border-radius: 999px;
  background: rgba(29, 36, 33, 0.8);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  text-align: center;
}
.student-video-playlist-thumb {
  display: block;
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #d9d6cd;
}
.student-video-playlist-thumb-link {
  display: block;
  width: 128px;
  height: 72px;
  border-radius: 6px;
}
.student-video-playlist-thumb-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.student-video-playlist-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.25;
}
.student-video-playlist-text a,
.student-video-playlist-text strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.document-preview-shell h1 {
  overflow-wrap: anywhere;
}
.document-preview {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.document-preview table {
  margin: 1rem 0;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 1.5rem;
}
.modal.is-open {
  display: grid;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 21, 0.45);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
}
.modal-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 16px 36px rgba(20, 18, 14, 0.16);
}
.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.modal-header {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem 0;
}
.modal-footer {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.modal-footer .button-secondary,
.modal-footer button[type="submit"],
.modal-close-button {
  width: auto;
}
.modal-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}
.modal-close-button:hover {
  background: #f4efe7;
  color: var(--ink);
}
.modal-help-text {
  margin: -0.2rem 0 0;
  font-size: 0.92rem;
}
.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.docs-toggle {
  display: none;
  width: auto;
  justify-self: start;
  background: var(--card);
  color: var(--accent-2);
}
.docs-sidebar {
  position: sticky;
  top: 5.5rem;
}
.docs-nav-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
}
.docs-nav-list a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  color: var(--ink);
}
.docs-nav-list a:hover,
.docs-nav-list a.is-active {
  background: #efe7dc;
  text-decoration: none;
}
.docs-card h1:first-child,
.docs-card h2,
.docs-card h3 {
  line-height: 1.2;
}
@media (max-width: 700px) {
  .admin-user-grid {
    grid-template-columns: 1fr;
  }
  .field-span-full {
    grid-column: auto;
  }
}
.docs-card pre {
  overflow-x: auto;
  padding: 0.9rem;
  border-radius: 12px;
  background: #201c18;
  color: #f6f0e8;
}
.docs-card code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}
.docs-card table {
  display: block;
  overflow-x: auto;
}
@media (max-width: 800px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 100%; padding-top: 0.5rem; }
  .main-nav.is-open { display: flex; }
  .nav-menu,
  .nav-menu-right { position: static; min-width: 0; width: 100%; }
  .table-tools input { max-width: 100%; width: 100%; }
  .bar,
  .form-actions,
  .danger-zone { align-items: stretch; }
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-toggle {
    display: inline-flex;
  }
  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    padding: 1rem 0.75rem 1rem 1rem;
    background: rgba(24, 25, 22, 0.25);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    z-index: 30;
  }
  .docs-sidebar.is-open {
    transform: translateX(0);
  }
  .docs-sidebar-card {
    height: 100%;
    overflow: auto;
  }
}
