/* [project]/apps/web/src/app/globals.css [app-client] (css) */
:root {
  --surface-0: #faf7f0;
  --surface-1: #f4efe3;
  --surface-2: #ebe5d3;
  --surface-3: #d8d0ba;
  --border-1: #d8d0ba;
  --border-2: #c1b89c;
  --text-1: #1a1812;
  --text-2: #47413a;
  --text-3: #7a726a;
  --text-4: #a59c8c;
  --accent: #9c3a2e;
  --accent-cold: #2c5fb8;
  --warm: #c4623a;
  --ok: #2f8b5a;
  --warn: #c38b1f;
  --err: #b8402d;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-1: 0 1px 2px rgba(26, 24, 18, .04), 0 1px 1px rgba(26, 24, 18, .02);
  --shadow-2: 0 4px 12px rgba(26, 24, 18, .06), 0 1px 2px rgba(26, 24, 18, .04);
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--surface-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

input, select, button, textarea {
  font: inherit;
  color: inherit;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.dashboard-header, .project-header {
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 32px;
  padding-bottom: 24px;
}

.eyebrow {
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
}

h1 {
  font-family: var(--font-serif);
  margin-bottom: 8px;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
}

h2 {
  font-family: var(--font-serif);
  color: var(--text-1);
  margin-bottom: 16px;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
}

h3 {
  font-family: var(--font-sans);
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  color: var(--text-2);
  max-width: 60ch;
  font-size: 16px;
}

.muted {
  color: var(--text-3);
  font-weight: 400;
}

.back-link {
  color: var(--text-3);
  margin-bottom: 12px;
  font-size: 13px;
  transition: color .12s;
  display: inline-block;
}

.back-link:hover {
  color: var(--accent);
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  margin-bottom: 20px;
  padding: 24px;
}

.card h2 {
  margin-bottom: 16px;
}

.danger-card {
  border-color: color-mix(in oklab, var(--err) 30%, var(--border-1));
  background: color-mix(in oklab, var(--err) 4%, var(--surface-1));
}

.create-card {
  background: var(--surface-1);
}

.form-grid {
  grid-template-columns: 1fr 1fr 140px auto;
  align-items: end;
  gap: 12px;
  display: grid;
}

.form-grid.add-objective {
  grid-template-columns: 1fr 220px auto;
}

.form-row {
  align-items: stretch;
  gap: 8px;
  display: flex;
}

.inline-form {
  margin-left: auto;
  display: inline-flex;
}

.field {
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  display: flex;
}

.field-narrow {
  max-width: 140px;
}

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

.field span {
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  font-weight: 600;
}

input[type="text"], input[type="number"], select, textarea {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  outline: none;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

select {
  cursor: pointer;
}

.form-row input[type="text"] {
  flex: 1;
}

@media (max-width: 720px) {
  .form-grid, .form-grid.add-objective {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .field-narrow {
    max-width: none;
  }
}

.btn {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  background: var(--surface-0);
  color: var(--text-1);
  cursor: pointer;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  transition: background .12s, border-color .12s, transform 80ms;
  display: inline-flex;
}

.btn:hover {
  background: var(--surface-2);
  border-color: var(--text-3);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--text-1);
  color: var(--surface-0);
  border-color: var(--text-1);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-danger {
  background: var(--err);
  color: #fff;
  border-color: var(--err);
}

.btn-danger:hover {
  background: color-mix(in oklab, var(--err) 80%, black);
  border-color: color-mix(in oklab, var(--err) 80%, black);
}

.btn-ghost {
  color: var(--text-3);
  background: none;
  border-color: rgba(0, 0, 0, 0);
  padding: 4px 10px;
  font-size: 12px;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.btn-small {
  padding: 2px 8px;
  font-size: 10px;
}

.lo-image-row {
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0 4px;
  display: flex;
}

.lo-thumbnail {
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  max-width: 160px;
  max-height: 100px;
}

.lo-image-picker {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding: 6px 10px;
  display: flex;
}

.lo-image-picker select {
  max-width: 280px;
}

.media-tile.is-cover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.media-meta {
  font-family: var(--font-mono);
  color: var(--text-3);
  font-size: 10px;
}

.media-ai-caption {
  color: var(--text-2);
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 4px 0 0;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
}

.ai-tag {
  background: var(--accent-cold);
  color: #fff;
  font-family: var(--font-mono);
  vertical-align: middle;
  border-radius: 3px;
  margin-right: 4px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  display: inline-block;
}

.slide-media-caption {
  color: var(--text-3);
  text-align: center;
  max-width: 100%;
  margin-top: 8px;
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
  display: block;
}

.handout-block-figure figcaption {
  color: var(--text-3);
  text-align: center;
  margin-top: 4px;
  font-size: 9pt;
  font-style: italic;
}

.editor-shell {
  background: var(--surface-0);
  flex-direction: column;
  min-height: 100vh;
  display: flex;
}

.editor-header {
  border-bottom: 1px solid var(--border-1);
  background: var(--surface-1);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  display: flex;
}

.editor-header-left {
  flex: 1;
}

.editor-title-eyebrow {
  font-family: var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 8px 0 2px;
  font-size: 10px;
}

.editor-title {
  font-family: var(--font-serif);
  margin: 0;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
}

.editor-empty {
  color: var(--text-3);
  flex: 1;
  place-items: center;
  padding: 64px;
  display: grid;
}

.editor-main {
  flex: 1;
  min-height: 0;
  padding: 16px 24px;
  display: block;
  position: relative;
}

.editor-canvas-stage {
  background: linear-gradient(0deg, var(--surface-2) 0%, var(--surface-1) 100%);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: auto;
  container-type: inline-size;
}

.editor-canvas {
  background: var(--surface-0);
  box-shadow: var(--shadow-2);
  border-radius: var(--radius-md);
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.editor-background-image {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  z-index: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.editor-element {
  z-index: 1;
}

.editor-shape {
  display: block;
}

.editor-element {
  cursor: move;
  box-sizing: border-box;
  border: 2px solid rgba(0, 0, 0, 0);
  border-radius: 4px;
  transition: border-color .12s;
  position: absolute;
}

.editor-element:hover {
  border-color: color-mix(in oklab, var(--accent-cold) 40%, var(--border-1));
}

.editor-element.selected {
  border-color: var(--accent-cold);
  box-shadow: 0 0 0 1px var(--accent-cold);
}

.editor-element.locked {
  cursor: default;
}

.editor-element.locked.selected {
  border-color: color-mix(in oklab, var(--accent-cold) 60%, var(--border-2));
  box-shadow: none;
  border-style: dashed;
}

.editor-element.locked:hover {
  border-color: color-mix(in oklab, var(--accent-cold) 20%, var(--border-2));
}

.snap-guide {
  pointer-events: none;
  z-index: 20;
  opacity: .85;
  background: #ff3b8b;
  position: absolute;
}

.snap-guide-v {
  width: 2px;
  margin-left: -1px;
  top: 0;
  bottom: 0;
}

.snap-guide-h {
  height: 2px;
  margin-top: -1px;
  left: 0;
  right: 0;
}

.lock-badge {
  font-family: var(--font-mono);
  background: color-mix(in oklab, var(--accent-cold) 12%, var(--surface-0));
  color: var(--accent-cold);
  border-radius: var(--radius-sm);
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 10px;
  font-style: normal;
}

.shortcut-hint {
  font-family: var(--font-mono);
  opacity: .7;
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.6;
}

.editor-text {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  cursor: move;
  outline: none;
  padding: 8px 12px;
  overflow: hidden;
}

.editor-text[contenteditable="true"] {
  cursor: text;
  background: color-mix(in oklab, var(--accent-cold) 6%, transparent);
  outline: 1px dashed var(--accent-cold);
  overflow: auto;
}

.resize-handle {
  background: var(--accent-cold);
  border: 2px solid var(--surface-0);
  cursor: nwse-resize;
  z-index: 10;
  border-radius: 2px;
  width: 12px;
  height: 12px;
  position: absolute;
}

.resize-handle.handle-nw {
  cursor: nwse-resize;
  top: -6px;
  left: -6px;
}

.resize-handle.handle-ne {
  cursor: nesw-resize;
  top: -6px;
  right: -6px;
}

.resize-handle.handle-sw {
  cursor: nesw-resize;
  bottom: -6px;
  left: -6px;
}

.resize-handle.handle-se {
  cursor: nwse-resize;
  bottom: -6px;
  right: -6px;
}

.editor-toolbar {
  z-index: 40;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  width: 320px;
  box-shadow: var(--shadow-3);
  flex-direction: column;
  gap: 2px;
  max-height: 72vh;
  padding: 10px 14px;
  display: flex;
  position: fixed;
  overflow-y: auto;
}

.editor-toolbar.hidden {
  display: none;
}

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

.toolbar-header-row h3 {
  margin: 0;
}

.tb-grid {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.tb-row {
  align-items: center;
  gap: 6px;
  display: flex;
}

.tb-field {
  width: 100%;
}

.tb-label {
  width: 22px;
  height: 22px;
  color: var(--text-2);
  flex: 0 0 22px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  display: inline-flex;
}

.tb-value {
  font-family: var(--font-mono);
  color: var(--text-2);
  text-align: right;
  min-width: 38px;
  font-size: 11px;
}

.tb-row input[type="range"] {
  flex: 1;
  min-width: 0;
}

.tb-color {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  width: 28px;
  height: 28px;
  padding: 0;
}

.tb-num {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  width: 52px;
  height: 28px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  font-size: 12px;
}

.tb-select {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  flex: 1;
  height: 28px;
  padding: 0 6px;
  font-size: 12px;
}

.tb-icon {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  width: 30px;
  height: 30px;
  color: var(--text-1);
  cursor: pointer;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 14px;
  transition: background .12s, border-color .12s;
  display: inline-flex;
}

.tb-icon:hover:not(:disabled) {
  background: var(--surface-1);
  border-color: var(--accent-cold);
}

.tb-icon:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.tb-icon.active {
  background: var(--accent-cold);
  color: #fff;
  border-color: var(--accent-cold);
}

.tb-icon i {
  font-style: italic;
  font-family: var(--font-serif);
}

.tb-icon.tb-danger:hover:not(:disabled) {
  color: #fff;
  background: #c0392b;
  border-color: #c0392b;
}

.tb-seg {
  justify-content: space-between;
}

.tb-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  display: flex;
}

.tb-sep {
  background: var(--border-2);
  width: 1px;
  height: 20px;
  margin: 0 4px;
}

.tb-full {
  width: 100%;
}

.toolbar-section {
  border-bottom: 1px solid var(--border-1);
  padding: 10px 0;
}

.toolbar-section:last-child {
  border-bottom: none;
}

.toolbar-section h3 {
  font-family: var(--font-serif);
  margin: 0 0 4px;
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
}

.toolbar-section .field {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.toolbar-section .field span {
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  font-weight: 600;
}

.toolbar-btn-row {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.toolbar-chip {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 6px 10px;
}

.toolbar-chip:hover {
  background: var(--surface-2);
}

.toolbar-chip.active {
  background: var(--accent-cold);
  color: #fff;
  border-color: var(--accent-cold);
}

.editor-bottom-bar {
  background: var(--surface-1);
  border-top: 1px solid var(--border-1);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  display: flex;
}

.editor-bottom-left, .editor-bottom-right {
  align-items: center;
  gap: 12px;
  display: flex;
}

.btn-edit-visual {
  background: color-mix(in oklab, var(--accent-cold) 10%, var(--surface-0));
  color: var(--accent-cold);
  border: 1px solid color-mix(in oklab, var(--accent-cold) 30%, var(--border-1));
  border-radius: var(--radius-sm);
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
}

.btn-edit-visual:hover {
  background: var(--accent-cold);
  color: #fff;
  border-color: var(--accent-cold);
}

.library-panel {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  width: 420px;
  max-height: calc(100vh - 140px);
  box-shadow: var(--shadow-3);
  z-index: 50;
  flex-direction: column;
  display: flex;
  position: fixed;
  bottom: 72px;
  right: 16px;
  overflow: hidden;
}

.library-header {
  border-bottom: 1px solid var(--border-1);
  background: var(--surface-1);
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  display: flex;
}

.library-header h3 {
  font-family: var(--font-serif);
  margin: 0;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
}

.library-upload {
  border-bottom: 1px solid var(--border-1);
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  display: flex;
}

.library-generate {
  border-bottom: 1px solid var(--border-1);
  background: var(--surface-2);
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  display: flex;
}

.library-generate-label {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.library-generate-title {
  color: var(--fg-1);
  letter-spacing: .02em;
  font-size: 12px;
  font-weight: 600;
}

.library-generate-prompt {
  width: 100%;
  font: inherit;
  border: 1px solid var(--border-1);
  resize: vertical;
  background: var(--surface-1);
  min-height: 44px;
  color: var(--fg-1);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.library-generate-prompt:focus {
  outline: 2px solid var(--accent-1);
  outline-offset: -1px;
}

.library-grid {
  flex: 1;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  display: grid;
  overflow-y: auto;
}

.library-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  cursor: pointer;
  padding: 0;
  transition: border-color .12s, transform .12s;
  display: block;
  position: relative;
  overflow: hidden;
}

.library-thumb:hover {
  border-color: var(--accent-cold);
  transform: translateY(-1px);
}

.library-thumb img {
  object-fit: contain;
  background: var(--surface-2);
  width: 100%;
  height: 100%;
  display: block;
}

.library-preview {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  width: 360px;
  max-width: calc(100vw - 480px);
  box-shadow: var(--shadow-3);
  z-index: 60;
  pointer-events: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  display: flex;
  position: fixed;
}

.library-preview img {
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  width: 100%;
  height: auto;
  max-height: 360px;
  display: block;
}

.library-preview-name {
  font-family: var(--font-mono);
  color: var(--text-2);
  word-break: break-all;
  padding: 2px 4px 4px;
  font-size: 11px;
}

.library-origin {
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: .04em;
  background: rgba(0, 0, 0, .55);
  border-radius: 2px;
  padding: 1px 5px;
  font-size: 9px;
  position: absolute;
  top: 4px;
  left: 4px;
}

.library-origin-editor_upload {
  background: color-mix(in oklab, var(--accent-cold) 80%, black);
}

.library-origin-slide_render {
  background: #444;
}

@media (max-width: 900px) {
  .editor-toolbar {
    width: calc(100vw - 32px);
    max-height: 60vh;
    bottom: 80px;
    right: 16px;
    top: auto !important;
    left: 16px !important;
  }

  .library-panel {
    width: auto;
    left: 8px;
    right: 8px;
  }
}

.public-shell {
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: flex;
}

.public-header {
  border-bottom: 1px solid var(--border-1);
  padding-bottom: 24px;
}

.public-header h1 {
  font-family: var(--font-serif);
  margin: 6px 0 10px;
  font-size: 40px;
  line-height: 1.1;
}

.public-header .lead {
  color: var(--text-2);
  max-width: 58ch;
  font-size: 16px;
}

.public-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 28px;
}

.public-card h2 {
  font-family: var(--font-serif);
  margin-bottom: 14px;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
}

.public-empty {
  text-align: center;
  color: var(--text-3);
  padding: 48px 0;
}

.public-footer {
  text-align: center;
  border-top: 1px solid var(--border-1);
  margin-top: auto;
  padding-top: 32px;
}

.intro-card .muted {
  margin-bottom: 16px;
}

.intro-card .form-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.intro-card button {
  justify-self: start;
  margin-top: 4px;
}

.alert {
  border-radius: var(--radius-md);
  margin: 12px 0;
  padding: 10px 14px;
  font-size: 14px;
}

.alert-error {
  background: color-mix(in oklab, var(--err) 12%, var(--surface-0));
  border: 1px solid color-mix(in oklab, var(--err) 35%, var(--border-1));
  color: color-mix(in oklab, var(--err) 75%, var(--text-1));
}

.analytics-card {
  background: color-mix(in oklab, var(--ok) 3%, var(--surface-1));
  border-color: color-mix(in oklab, var(--ok) 22%, var(--border-1));
}

.class-summary {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 28px;
  padding: 20px;
  display: grid;
}

.class-summary-metric {
  text-align: center;
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.class-summary-metric .metric-value {
  font-family: var(--font-serif);
  color: var(--text-1);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.class-summary-metric .metric-label {
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 600;
}

.analytics-subhead {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 14px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.analytics-questions {
  flex-direction: column;
  gap: 14px;
  list-style: none;
  display: flex;
}

.analytics-question {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.analytics-question-top {
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  display: flex;
}

.analytics-q-num {
  font-family: var(--font-mono);
  color: var(--text-3);
  min-width: 28px;
  font-size: 11px;
  font-weight: 700;
}

.analytics-q-stem {
  color: var(--text-1);
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.analytics-rate {
  font-family: var(--font-mono);
  text-align: right;
  min-width: 48px;
  font-size: 15px;
  font-weight: 700;
}

.analytics-rate.rate-ok {
  color: var(--ok);
}

.analytics-rate.rate-warn {
  color: var(--warn);
}

.analytics-rate.rate-bad {
  color: var(--err);
}

.analytics-rate-bar {
  background: var(--surface-2);
  border-radius: 999px;
  height: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.analytics-rate-fill {
  height: 100%;
  transition: width .3s;
}

.analytics-rate-fill.rate-ok {
  background: var(--ok);
}

.analytics-rate-fill.rate-warn {
  background: var(--warn);
}

.analytics-rate-fill.rate-bad {
  background: var(--err);
}

.analytics-response-count {
  font-family: var(--font-mono);
  margin: 0 0 10px;
}

.analytics-options {
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  list-style: none;
  display: flex;
}

.analytics-option {
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 12px;
  display: grid;
}

.analytics-option-text {
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.analytics-option.option-correct .analytics-option-text {
  color: var(--text-1);
  font-weight: 600;
}

.analytics-option-dist {
  background: var(--surface-2);
  border-radius: 3px;
  align-items: center;
  gap: 8px;
  height: 16px;
  display: flex;
  position: relative;
}

.analytics-option-bar {
  border-radius: 3px;
  transition: width .3s;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
}

.analytics-option-bar.bar-correct {
  background: color-mix(in oklab, var(--ok) 55%, white);
}

.analytics-option-bar.bar-distractor {
  background: color-mix(in oklab, var(--err) 35%, white);
}

.analytics-option-count {
  font-family: var(--font-mono);
  color: var(--text-1);
  z-index: 1;
  margin-left: auto;
  padding-right: 8px;
  font-size: 10px;
  font-weight: 600;
  position: relative;
}

@media (max-width: 720px) {
  .class-summary {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .analytics-option {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.share-card {
  background: color-mix(in oklab, var(--accent-cold) 3%, var(--surface-1));
  border-color: color-mix(in oklab, var(--accent-cold) 22%, var(--border-1));
}

.share-links-list {
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
  list-style: none;
  display: flex;
}

.share-link-row {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.share-link-info {
  margin-bottom: 12px;
}

.share-link-top {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  display: flex;
}

.share-link-url {
  font-family: var(--font-mono);
  color: var(--accent-cold);
  word-break: break-all;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.share-link-url:hover {
  text-decoration: underline;
}

.attempts-table {
  border-collapse: collapse;
  border-top: 1px solid var(--border-1);
  width: 100%;
  margin-top: 10px;
  font-size: 13px;
}

.attempts-table th {
  text-align: left;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px 8px 0;
  font-size: 10px;
  font-weight: 600;
}

.attempts-table td {
  border-bottom: 1px solid var(--border-1);
  color: var(--text-2);
  vertical-align: middle;
  padding: 8px 12px 8px 0;
}

.attempts-table tr:last-child td {
  border-bottom: none;
}

.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
  list-style: none;
  display: grid;
}

.project-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px 20px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
  display: flex;
}

.project-card:hover {
  border-color: var(--text-3);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.card-top {
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.lang {
  font-family: var(--font-mono);
  color: var(--text-3);
  text-transform: uppercase;
  font-size: 11px;
}

.project-card .desc {
  color: var(--text-2);
  flex: 1;
  font-size: 13px;
}

.project-card .meta, .project-header .meta {
  font-family: var(--font-mono);
  color: var(--text-3);
  letter-spacing: .02em;
  font-size: 11px;
}

.badge {
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.badge-draft, .badge-draft_wizard {
  background: var(--surface-2);
}

.badge-generating {
  background: color-mix(in oklab, var(--warn) 18%, var(--surface-1));
  color: color-mix(in oklab, var(--warn) 70%, var(--text-1));
}

.badge-finalized {
  background: color-mix(in oklab, var(--ok) 18%, var(--surface-1));
  color: color-mix(in oklab, var(--ok) 70%, var(--text-1));
}

.badge-archived {
  background: var(--surface-3);
  color: var(--text-3);
}

.bloom-badge {
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-1);
  margin-right: 12px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  display: inline-block;
}

.bloom-remember {
  color: #78350f;
  background: #fef3c7;
}

.bloom-understand {
  color: #7c2d12;
  background: #fed7aa;
}

.bloom-apply {
  color: #7f1d1d;
  background: #fecaca;
}

.bloom-analyze {
  color: #4c1d95;
  background: #ddd6fe;
}

.bloom-evaluate {
  color: #312e81;
  background: #c7d2fe;
}

.bloom-create {
  color: #1e1b4b;
  background: #a5b4fc;
}

.objective-list {
  counter-reset: obj;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  list-style: none;
  display: flex;
}

.objective-list li {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  display: flex;
}

.objective-list .statement {
  color: var(--text-1);
  flex: 1;
  font-size: 14px;
}

.add-objective {
  border-top: 1px dashed var(--border-1);
  margin-top: 8px;
  padding-top: 16px;
}

.project-header h1 {
  margin-top: 8px;
}

.project-header .badge {
  margin-bottom: 8px;
}

.project-badges {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  display: flex;
}

.mode-badge {
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
}

.mode-fidelity {
  background: color-mix(in oklab, var(--accent-cold) 15%, var(--surface-1));
  color: color-mix(in oklab, var(--accent-cold) 75%, var(--text-1));
  border-color: color-mix(in oklab, var(--accent-cold) 35%, var(--border-1));
}

.mode-remix {
  background: color-mix(in oklab, var(--accent) 15%, var(--surface-1));
  color: color-mix(in oklab, var(--accent) 75%, var(--text-1));
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border-1));
}

textarea {
  resize: vertical;
  min-height: 64px;
  font-family: inherit;
}

.form-grid-wide {
  grid-template-columns: repeat(3, 1fr) auto;
}

@media (max-width: 720px) {
  .form-grid-wide {
    grid-template-columns: 1fr;
  }
}

.status-flow {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}

.status-form {
  margin: 0;
  display: inline-block;
}

.chip {
  border: 1px solid var(--border-2);
  background: var(--surface-0);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: all .12s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip-active {
  background: var(--text-1);
  color: var(--surface-0);
  border-color: var(--text-1);
}

.lo-list, .question-list {
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  list-style: none;
  display: flex;
}

.lo-card, .question-card {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  display: flex;
}

.lo-top {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}

.lo-card h4, .question-card h4 {
  color: var(--text-1);
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.lo-content {
  color: var(--text-2);
  white-space: pre-wrap;
  margin: 0;
  font-size: 14px;
}

.lo-type-badge {
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-1);
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
}

.lo-type-intro {
  color: #4c1d95;
  background: #ddd6fe;
}

.lo-type-concept {
  color: #312e81;
  background: #c7d2fe;
}

.lo-type-example {
  color: #7c2d12;
  background: #fed7aa;
}

.lo-type-analogy {
  color: #78350f;
  background: #fde68a;
}

.lo-type-practice {
  color: #14532d;
  background: #bbf7d0;
}

.lo-type-case {
  color: #831843;
  background: #fbcfe8;
}

.lo-type-definition {
  color: #1e3a8a;
  background: #dbeafe;
}

.lo-type-citation {
  color: #5c3d20;
  background: #f5e6d3;
}

.lo-type-summary {
  color: #1a1812;
  background: #d8d0ba;
}

.lo-type-custom {
  background: var(--surface-2);
  color: var(--text-2);
}

.q-type-mcq_single {
  color: #312e81;
  background: #c7d2fe;
}

.q-type-mcq_multi {
  color: #4c1d95;
  background: #ddd6fe;
}

.q-type-true_false {
  color: #7c2d12;
  background: #fed7aa;
}

.q-type-cloze {
  color: #14532d;
  background: #bbf7d0;
}

.difficulty-badge {
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border-1);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  display: inline-block;
}

.diff-easy {
  color: #14532d;
  background: #bbf7d0;
}

.diff-medium {
  color: #78350f;
  background: #fde68a;
}

.diff-hard {
  color: #7f1d1d;
  background: #fecaca;
}

.small {
  font-size: 11px;
}

.q-stem {
  color: var(--text-1);
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.q-options {
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  font-size: 13px;
  list-style: none;
  display: flex;
}

.q-options li {
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.opt-correct {
  background: color-mix(in oklab, var(--ok) 12%, transparent);
  color: color-mix(in oklab, var(--ok) 80%, var(--text-1));
  font-weight: 500;
}

.opt-wrong {
  color: var(--text-3);
}

.lo-top .inline-form {
  margin-left: auto;
}

.add-lo, .add-question {
  border-top: 1px dashed var(--border-1);
  margin-top: 8px;
  padding-top: 16px;
}

code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: .9em;
}

.card-header-row {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  display: flex;
}

.card-header-row h2 {
  margin: 0;
}

.btn-ai {
  background: var(--accent-cold);
  color: #fff;
  border-color: var(--accent-cold);
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

.btn-ai:hover {
  background: color-mix(in oklab, var(--accent-cold) 85%, black);
  border-color: color-mix(in oklab, var(--accent-cold) 85%, black);
}

.ai-mode {
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-transform: lowercase;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  display: inline-block;
}

.ai-mode.live {
  background: rgba(255, 255, 255, .25);
}

.ai-mode.mock {
  background: rgba(0, 0, 0, .18);
}

.ai-jobs-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.ai-jobs-table thead {
  border-bottom: 1px solid var(--border-1);
}

.ai-jobs-table th {
  text-align: left;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px 8px 0;
  font-size: 11px;
  font-weight: 600;
}

.ai-jobs-table td {
  border-bottom: 1px solid var(--border-1);
  color: var(--text-2);
  vertical-align: middle;
  padding: 10px 12px 10px 0;
}

.ai-jobs-table tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: var(--font-mono);
}

.status-pill {
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.status-queued {
  background: var(--surface-2);
}

.status-running {
  background: color-mix(in oklab, var(--warn) 18%, var(--surface-1));
  color: color-mix(in oklab, var(--warn) 70%, var(--text-1));
}

.status-succeeded {
  background: color-mix(in oklab, var(--ok) 18%, var(--surface-1));
  color: color-mix(in oklab, var(--ok) 70%, var(--text-1));
}

.status-failed {
  background: color-mix(in oklab, var(--err) 18%, var(--surface-1));
  color: color-mix(in oklab, var(--err) 70%, var(--text-1));
}

.status-cancelled {
  background: var(--surface-2);
}

.status-timeout {
  background: color-mix(in oklab, var(--err) 18%, var(--surface-1));
  color: color-mix(in oklab, var(--err) 70%, var(--text-1));
}

.objective-actions {
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  display: inline-flex;
}

.objective-list .statement {
  flex: 1;
  min-width: 200px;
}

.linked-counts {
  font-family: var(--font-mono);
  color: var(--text-3);
  margin-left: 8px;
  font-size: 11px;
}

.btn-ai-sm {
  background: var(--accent-cold);
  color: #fff;
  border-color: var(--accent-cold);
  border-radius: var(--radius-sm);
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
}

.btn-ai-sm:hover {
  background: color-mix(in oklab, var(--accent-cold) 85%, black);
  border-color: color-mix(in oklab, var(--accent-cold) 85%, black);
}

.ai-mode-sm {
  font-family: var(--font-mono);
  text-transform: lowercase;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 600;
  display: inline-block;
}

.ai-mode-sm.mock {
  background: rgba(0, 0, 0, .18);
}

.preview-shell {
  background: var(--surface-0);
  flex-direction: column;
  min-height: 100vh;
  display: flex;
}

.header-top {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  display: flex;
}

.preview-cta {
  text-decoration: none;
}

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

.btn-export {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.create-import {
  border-style: dashed;
  border-color: var(--border-2);
}

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

.import-mode-choice {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  display: flex;
}

.import-mode-choice h3 {
  font-family: var(--font-serif);
  margin: 0 0 2px;
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
}

.import-mode-choice p {
  flex: 1;
  margin: 0;
  line-height: 1.5;
}

.import-mode-choice button {
  align-self: flex-start;
  margin-top: 8px;
}

.import-mode-fidelity {
  border-color: color-mix(in oklab, var(--accent-cold) 35%, var(--border-1));
  background: color-mix(in oklab, var(--accent-cold) 4%, var(--surface-0));
}

@media (max-width: 720px) {
  .import-modes {
    grid-template-columns: 1fr;
  }
}

.file-input {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-2);
  cursor: pointer;
  flex: 1;
  padding: 10px 12px;
}

.file-input::-webkit-file-upload-button {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  font-family: var(--font-sans);
  color: var(--text-1);
  cursor: pointer;
  margin-right: 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: background .12s;
}

.file-input::file-selector-button {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  font-family: var(--font-sans);
  color: var(--text-1);
  cursor: pointer;
  margin-right: 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: background .12s;
}

.file-input::-webkit-file-upload-button:hover {
  background: var(--surface-2);
}

.file-input::file-selector-button:hover {
  background: var(--surface-2);
}

.generate-all-card {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent-cold) 6%, var(--surface-1)), var(--surface-1));
  border-color: color-mix(in oklab, var(--accent-cold) 25%, var(--border-1));
}

.generate-all-row {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  display: flex;
}

.generate-all-row h2 {
  margin: 0 0 4px;
}

.btn-ai-large {
  gap: 12px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
}

.live-or-mock {
  background: rgba(255, 255, 255, .22);
}

.spinner {
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  animation: .7s linear infinite scribal-spin;
  display: inline-block;
}

@keyframes scribal-spin {
  to {
    transform: rotate(360deg);
  }
}

.source-attribution {
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--accent-cold) 10%, var(--surface-2));
  border: 1px solid color-mix(in oklab, var(--accent-cold) 25%, var(--border-1));
  color: color-mix(in oklab, var(--accent-cold) 75%, var(--text-1));
  font-family: var(--font-mono);
  letter-spacing: .02em;
  cursor: help;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
  max-width: 240px;
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 10px;
  display: inline-block;
  overflow: hidden;
}

.source-card {
  padding-top: 6px;
}

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

.source-title {
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
}

.source-subhead {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}

.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  list-style: none;
  display: grid;
}

.media-tile {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  transition: border-color .12s, transform .12s;
  display: flex;
}

.media-tile:hover {
  border-color: var(--text-3);
  transform: translateY(-1px);
}

.media-tile a {
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
  display: block;
  position: relative;
  overflow: hidden;
}

.media-tile img {
  object-fit: contain;
  width: 100%;
  height: 100%;
  display: block;
}

.media-caption {
  font-family: var(--font-mono);
  color: var(--text-3);
  text-align: center;
  padding-top: 2px;
  font-size: 10px;
}

.source-slides-detail summary {
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 8px;
  font-size: 11px;
}

.source-slides-list {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  margin-top: 12px;
  padding: 12px;
  list-style: none;
}

.source-slides-list li {
  border-bottom: 1px dashed var(--border-1);
  padding: 4px 0;
  font-size: 13px;
}

.source-slides-list li:last-child {
  border-bottom: none;
}

.btn-export:hover {
  background: var(--surface-3);
  border-color: var(--text-3);
  color: var(--text-1);
}

.preview-header {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-1);
  z-index: 10;
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  padding: 16px 24px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.preview-header-inner {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
}

.preview-title {
  text-align: center;
}

.preview-title .eyebrow {
  margin-bottom: 0;
  font-size: 10px;
}

.preview-title h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.preview-tabs {
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 3px;
  display: inline-flex;
}

.preview-tab {
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  transition: background .12s, color .12s;
}

.preview-tab:hover {
  color: var(--text-1);
}

.preview-tab.active {
  background: var(--surface-0);
  color: var(--text-1);
  box-shadow: var(--shadow-1);
}

.preview-stage {
  flex-direction: column;
  flex: 1;
  display: flex;
}

.preview-empty, .quiz-empty {
  text-align: center;
  color: var(--text-3);
  flex: 1;
  place-items: center;
  padding: 96px 24px;
  display: grid;
}

.deck-wrap {
  flex: 1;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  display: grid;
  position: relative;
}

.slide {
  aspect-ratio: 16 / 9;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  box-shadow: var(--shadow-2);
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 56px 64px;
  display: flex;
  overflow: hidden;
}

.slide:has(.slide-fidelity-render) {
  background: #000;
  padding: 0;
}

.slide-fidelity-render {
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
}

.slide-fidelity-image {
  object-fit: contain;
  width: 100%;
  height: 100%;
  display: block;
}

.slide h1 {
  font-family: var(--font-serif);
  margin-bottom: 16px;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.05;
}

.slide h2 {
  font-family: var(--font-serif);
  margin-bottom: 24px;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.1;
}

.slide h3 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.slide p {
  color: var(--text-2);
  max-width: 70ch;
  margin-bottom: 14px;
  font-size: 19px;
  line-height: 1.55;
}

.slide .subtitle {
  color: var(--text-2);
  font-size: 22px;
  font-style: italic;
  font-family: var(--font-serif);
  margin-bottom: 24px;
}

.slide .eyebrow {
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 600;
}

.slide-cover {
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.slide-cover.with-image .cover-bg-image {
  object-fit: cover;
  z-index: 0;
  opacity: .35;
  filter: saturate(80%);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.slide-cover.with-image .cover-inner {
  z-index: 1;
  background: linear-gradient(to right, var(--surface-0) 45%, color-mix(in oklab, var(--surface-0) 92%, transparent) 80%, transparent 100%);
  border-radius: var(--radius-md);
  max-width: 72%;
  margin: -32px;
  padding: 32px;
  position: relative;
}

.cover-inner {
  flex-direction: column;
  align-items: flex-start;
  display: flex;
}

.cover-meta {
  font-family: var(--font-mono);
  color: var(--text-3);
  gap: 24px;
  margin-top: 32px;
  font-size: 13px;
  display: flex;
}

.cover-meta span {
  position: relative;
}

.cover-meta span + span:before {
  content: "·";
  color: var(--text-3);
  margin-right: 24px;
}

.slide-outline ol {
  counter-reset: outline;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  display: flex;
}

.slide-outline li {
  color: var(--text-1);
  align-items: center;
  gap: 16px;
  font-size: 18px;
  display: flex;
}

.slide-outline li:before {
  counter-increment: outline;
  content: counter(outline, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--text-3);
  min-width: 28px;
  font-size: 14px;
}

.slide-section-opener {
  background: linear-gradient(135deg, var(--surface-1), var(--surface-0));
  align-items: flex-start;
}

.slide-section-opener h1 {
  font-size: 64px;
}

.slide-content, .slide-example, .slide-analogy, .slide-practice {
  align-items: flex-start;
}

.slide-content.with-image, .slide-example.with-image, .slide-analogy.with-image, .slide-practice.with-image {
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 48px;
  display: grid;
}

.slide-text {
  min-width: 0;
}

.slide-media {
  border-radius: var(--radius-md);
  justify-content: center;
  align-items: center;
  max-height: 100%;
  display: flex;
  overflow: hidden;
}

.slide-media img {
  object-fit: contain;
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  max-height: 420px;
  box-shadow: var(--shadow-2);
  background: var(--surface-1);
}

@media (max-width: 720px) {
  .slide-content.with-image, .slide-example.with-image, .slide-analogy.with-image, .slide-practice.with-image {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .slide-cover.with-image .cover-inner {
    max-width: 100%;
    margin: 0;
  }
}

.slide-citation blockquote {
  font-family: var(--font-serif);
  color: var(--text-1);
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
  padding: 0 32px;
  font-size: 36px;
  font-style: italic;
  line-height: 1.3;
  position: relative;
}

.slide-citation blockquote:before {
  content: "“";
  color: var(--accent);
  font-size: 100px;
  font-family: var(--font-serif);
  position: absolute;
  top: -40px;
  left: -10px;
}

.slide-citation cite {
  text-align: center;
  color: var(--text-3);
  margin-top: 24px;
  font-size: 15px;
  font-style: normal;
  display: block;
}

.slide-quiz-intro {
  text-align: center;
  align-items: center;
}

.slide-quiz-intro h1 {
  font-size: 64px;
}

.slide-question h2 {
  margin-bottom: 32px;
  font-size: 30px;
}

.question-options-preview {
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  list-style: none;
  display: flex;
}

.question-options-preview li {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  background: var(--surface-1);
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 16px;
  display: flex;
}

.opt-correct-preview {
  border-color: color-mix(in oklab, var(--ok) 50%, var(--border-1));
  background: color-mix(in oklab, var(--ok) 8%, var(--surface-1));
}

.opt-wrong-preview {
  background: var(--surface-1);
}

.opt-letter {
  font-family: var(--font-mono);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 28px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.opt-text {
  flex: 1;
}

.slide-closing {
  text-align: center;
  align-items: center;
}

.slide-foot, .block-foot {
  font-family: var(--font-mono);
  color: var(--text-3);
  margin-top: auto;
  padding-top: 16px;
  font-size: 11px;
}

.deck-nav-btn {
  border: 1px solid var(--border-2);
  background: var(--surface-1);
  width: 48px;
  height: 48px;
  color: var(--text-2);
  cursor: pointer;
  border-radius: 50%;
  align-self: center;
  place-items: center;
  font-size: 24px;
  font-weight: 300;
  transition: background .12s, color .12s, border-color .12s;
  display: grid;
}

.deck-nav-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.deck-nav-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.deck-footer {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  font-family: var(--font-mono);
  color: var(--text-3);
  box-shadow: var(--shadow-1);
  border-radius: 999px;
  align-items: center;
  gap: 16px;
  padding: 8px 18px;
  font-size: 12px;
  display: flex;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.deck-counter {
  color: var(--text-2);
  font-weight: 600;
}

.deck-variant {
  text-transform: lowercase;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.deck-hint {
  color: var(--text-4);
}

@media (max-width: 720px) {
  .deck-wrap {
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
    padding: 16px 8px;
  }

  .slide {
    aspect-ratio: auto;
    min-height: 60vh;
    padding: 32px 24px;
  }

  .slide h1 {
    font-size: 36px;
  }

  .slide h2 {
    font-size: 26px;
  }

  .slide p {
    font-size: 16px;
  }

  .deck-hint {
    display: none;
  }
}

.handout-paper {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  max-width: 760px;
  font-family: var(--font-sans);
  color: var(--text-1);
  box-shadow: var(--shadow-2);
  margin: 32px auto 96px;
  padding: 64px 72px;
  line-height: 1.65;
}

.handout-cover {
  border-bottom: 2px solid var(--accent);
  margin-bottom: 48px;
  padding-bottom: 32px;
}

.handout-cover-image {
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  width: 100%;
  height: 180px;
  margin-bottom: 24px;
}

.handout-block-figure {
  float: right;
  max-width: 280px;
  margin: 0 0 12px 18px;
  padding: 0;
}

.handout-block-figure img {
  border-radius: var(--radius-sm);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-1);
  background: var(--surface-1);
}

.handout-block.with-image {
  overflow: auto;
}

.handout-cover h1 {
  font-family: var(--font-serif);
  margin: 8px 0 16px;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.05;
}

.handout-cover .subtitle {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--text-2);
  margin-bottom: 24px;
  font-size: 20px;
}

.handout-cover-meta {
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin-top: 16px;
  font-size: 13px;
  display: grid;
}

.handout-cover-meta dt {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}

.handout-cover-meta dd {
  color: var(--text-2);
}

.handout-toc {
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  padding: 24px;
}

.handout-toc h2 {
  font-family: var(--font-serif);
  margin-bottom: 16px;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
}

.handout-toc ol {
  counter-reset: toc;
  list-style: none;
}

.handout-toc li {
  border-bottom: 1px dashed var(--border-1);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  display: flex;
}

.handout-toc li:last-child {
  border-bottom: none;
}

.handout-toc li:before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--text-3);
  min-width: 28px;
  font-size: 12px;
}

.toc-label {
  flex: 1;
}

.toc-count {
  font-family: var(--font-mono);
  color: var(--text-3);
  font-size: 11px;
}

.handout-section {
  margin-bottom: 48px;
}

.handout-section-header {
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 24px;
  padding-bottom: 16px;
}

.handout-section-header h2 {
  font-family: var(--font-serif);
  margin: 6px 0 8px;
  font-size: 28px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.handout-block {
  margin-bottom: 32px;
}

.handout-block h3 {
  font-family: var(--font-sans);
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
}

.lo-type-tag {
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}

.handout-block p {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
  margin-bottom: 12px;
}

.handout-block-example {
  background: color-mix(in oklab, var(--accent) 5%, var(--surface-1));
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
}

.handout-block-practice {
  background: color-mix(in oklab, var(--accent-cold) 5%, var(--surface-1));
  border-left: 3px solid var(--accent-cold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
}

.handout-block-summary {
  background: var(--surface-1);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.handout-quiz {
  border-top: 2px solid var(--border-2);
  padding-top: 32px;
}

.handout-quiz-list {
  flex-direction: column;
  gap: 24px;
  list-style: none;
  display: flex;
}

.handout-quiz-item {
  border-bottom: 1px dashed var(--border-1);
  padding-bottom: 20px;
}

.handout-quiz-item:last-child {
  border-bottom: none;
}

.handout-quiz-options {
  margin: 8px 0 12px 24px;
}

.handout-quiz-options li {
  margin-bottom: 4px;
}

.handout-quiz-options .opt-correct {
  font-weight: 600;
}

.handout-quiz-answer {
  background: var(--surface-1);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.handout-quiz-answer summary {
  cursor: pointer;
  color: var(--text-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

.feedback-text {
  color: var(--text-2);
  margin-top: 6px;
  font-style: italic;
}

.handout-footer {
  border-top: 1px solid var(--border-1);
  font-family: var(--font-mono);
  color: var(--text-3);
  text-align: center;
  margin-top: 64px;
  padding-top: 16px;
  font-size: 11px;
}

@media (max-width: 720px) {
  .handout-paper {
    margin: 16px;
    padding: 32px 24px;
  }

  .handout-cover h1 {
    font-size: 32px;
  }
}

.quiz-play {
  width: 100%;
  max-width: 640px;
  margin: 32px auto 96px;
  padding: 0 24px;
}

.quiz-progress {
  font-family: var(--font-mono);
  color: var(--text-3);
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 12px;
  display: flex;
}

.quiz-count {
  color: var(--text-2);
  font-weight: 600;
}

.quiz-progress-bar {
  background: var(--surface-2);
  border-radius: 999px;
  flex: 1;
  height: 4px;
  overflow: hidden;
}

.quiz-progress-fill {
  background: var(--accent);
  height: 100%;
  transition: width .32s cubic-bezier(.16, 1, .3, 1);
}

.quiz-meta {
  text-transform: uppercase;
  gap: 8px;
  font-size: 11px;
  display: flex;
}

.quiz-meta span {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  padding: 2px 8px;
}

.quiz-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  margin-bottom: 24px;
  padding: 32px;
}

.quiz-card h2 {
  font-family: var(--font-serif);
  color: var(--text-1);
  margin-bottom: 24px;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
}

.quiz-options {
  flex-direction: column;
  gap: 10px;
  list-style: none;
  display: flex;
}

.quiz-option {
  background: var(--surface-0);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  width: 100%;
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 15px;
  transition: background .12s, border-color .12s, transform 80ms;
  display: flex;
}

.quiz-option:hover:not(:disabled):not(.correct):not(.wrong) {
  background: var(--surface-2);
  border-color: var(--text-3);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option.correct {
  border-color: var(--ok);
  background: color-mix(in oklab, var(--ok) 12%, var(--surface-0));
}

.quiz-option.wrong {
  border-color: var(--err);
  background: color-mix(in oklab, var(--err) 12%, var(--surface-0));
}

.quiz-option .opt-letter {
  background: var(--surface-2);
}

.quiz-option.correct .opt-letter {
  background: var(--ok);
  color: #fff;
}

.quiz-option.wrong .opt-letter {
  background: var(--err);
  color: #fff;
}

.quiz-feedback {
  border-radius: var(--radius-md);
  margin-top: 24px;
  padding: 16px 20px;
  font-size: 14px;
}

.feedback-ok {
  background: color-mix(in oklab, var(--ok) 12%, var(--surface-1));
  border: 1px solid color-mix(in oklab, var(--ok) 30%, var(--border-1));
}

.feedback-ko {
  background: color-mix(in oklab, var(--err) 10%, var(--surface-1));
  border: 1px solid color-mix(in oklab, var(--err) 30%, var(--border-1));
}

.feedback-title {
  margin-bottom: 6px;
  font-weight: 600;
}

.feedback-ok .feedback-title {
  color: color-mix(in oklab, var(--ok) 70%, var(--text-1));
}

.feedback-ko .feedback-title {
  color: color-mix(in oklab, var(--err) 70%, var(--text-1));
}

.quiz-actions {
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  display: flex;
}

.quiz-result {
  text-align: center;
  max-width: 640px;
  margin: 64px auto 96px;
  padding: 0 24px;
}

.quiz-result h1 {
  font-family: var(--font-serif);
  margin: 12px 0 16px;
  font-size: 96px;
  font-weight: 400;
  line-height: 1;
}

.quiz-result .subtitle {
  margin-bottom: 32px;
  font-size: 18px;
}

.result-pass {
  color: var(--ok);
}

.result-fail {
  color: var(--err);
}

.quiz-recap {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  text-align: left;
  margin-bottom: 24px;
  padding: 24px;
}

.recap-row {
  border-bottom: 1px solid var(--border-1);
  gap: 12px;
  padding: 10px 0;
  display: flex;
}

.recap-row:last-child {
  border-bottom: none;
}

.recap-mark {
  font-family: var(--font-mono);
  text-align: center;
  width: 24px;
  font-size: 16px;
  font-weight: 700;
}

.recap-mark.ok {
  color: var(--ok);
}

.recap-mark.ko {
  color: var(--err);
}

.recap-body {
  flex: 1;
}

.recap-stem {
  margin-bottom: 4px;
  font-size: 14px;
}

.recap-correct {
  color: var(--text-2);
  font-size: 13px;
  font-style: italic;
}

.difficulty-easy {
  color: color-mix(in oklab, var(--ok) 70%, var(--text-1));
}

.difficulty-medium {
  color: color-mix(in oklab, var(--warn) 70%, var(--text-1));
}

.difficulty-hard {
  color: color-mix(in oklab, var(--err) 70%, var(--text-1));
}

.byok-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  display: grid;
}

.byok-card {
  border: 1px solid var(--border);
  background: var(--surface-1);
  border-radius: 12px;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  display: flex;
}

.byok-card-head {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  display: flex;
}

.byok-card-head h2 {
  margin: 0;
  font-size: 16px;
}

.byok-badge {
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border);
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  border-radius: 999px;
  padding: 3px 8px;
}

.byok-badge-on {
  background: color-mix(in oklab, var(--ok) 15%, var(--surface-2));
  color: var(--ok);
  border-color: color-mix(in oklab, var(--ok) 40%, var(--border));
}

.byok-form {
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  display: flex;
}

.byok-actions {
  justify-content: flex-end;
  display: flex;
}

.byok-delete {
  justify-content: flex-end;
  margin-top: 6px;
  display: flex;
}

/*# sourceMappingURL=apps_web_src_app_globals_ea8a3ee7.css.map*/