:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --white: #fffdf8;
  --ink: #222c25;
  --muted: #58665c;
  --line: #e2e2d7;
  --pine: #183a2f;
  --pine-dark: #102b23;
  --pine-light: #dfeae0;
  --lemon: #e5edaa;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 0.94rem/1.5 var(--sans); color: var(--ink); background: var(--paper); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .46; cursor: default; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #208360; outline-offset: 3px; }
svg { display: block; width: 19px; height: 19px; }
.skip { position: fixed; left: 1rem; top: -6rem; z-index: 2; padding: .5rem 1rem; background: white; }
.skip:focus { top: 1rem; }

.dashboard { display: grid; grid-template-columns: 259px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--pine-dark); color: #fffdf0; padding: 28px 18px 22px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.brand small { display: block; font-size: .75rem; font-weight: 400; color: #b8cbbf; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; background: var(--lemon); color: var(--pine-dark); border-radius: 10px; width: 40px; height: 40px; font: 700 1.1rem var(--serif); }
.course { margin: 30px 8px 14px; padding: 18px 0; border-block: 1px solid #355146; }
.eyebrow { text-transform: uppercase; letter-spacing: .095em; font-size: .7rem; font-weight: 750; color: var(--muted); }
.course .eyebrow { color: #c5d5a0; }
.course h2 { font: 400 2.16rem/.97 var(--serif); letter-spacing: -.04em; margin: 8px 0; }
.course p { font-size: .77rem; color: #bdcfc4; }
#lessons { display: grid; gap: 3px; }
.lesson-link { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 53px; border: 1px solid transparent; text-align: left; background: transparent; color: #fffdf0; padding: 7px 8px; border-radius: 8px; }
.lesson-link:hover { background: #204336; }
.lesson-link:focus-visible, .materials a:focus-visible, .materials summary:focus-visible { outline-color: var(--lemon); }
.lesson-link[aria-current] { color: var(--pine-dark); background: var(--lemon); }
.menu-index { font-size: .7rem; font-weight: 700; min-width: 26px; color: #bccec2; font-variant-numeric: tabular-nums; align-self: start; margin-top: 3px; }
.lesson-link[aria-current] .menu-index { color: #475d4c; }
.menu-title strong, .menu-title small { display: block; }
.menu-title strong { font-size: .8rem; line-height: 1.28; }
.menu-title small { font-size: .71rem; line-height: 1.3; margin-top: 2px; color: #bdd0c3; }
.lesson-link[aria-current] small { color: #43594a; }
.materials { margin: 13px 8px 0; padding-top: 14px; border-top: 1px solid #355146; font-size: .8rem; }
summary { cursor: pointer; }
.materials a { display: block; color: #dfebde; margin: 8px 0 0 14px; }

.workspace { width: min(100%, 1530px); padding: 0 clamp(19px, 3vw, 48px) 44px; margin-inline: auto; }
.workspace-header { display: flex; min-height: 80px; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.view-label, .share-controls, .arrow-controls, .button { display: flex; align-items: center; gap: 9px; }
.view-label { font-size: .84rem; font-weight: 700; }
.view-label span:last-child, .view-label-divider { color: var(--muted); font-weight: 500; }
.private-dot, .status-dot { display: inline-block; width: 8px; height: 8px; background: #74827a; border-radius: 50%; }
.private-dot { background: #427354; }
.button { justify-content: center; min-height: 40px; font-size: .8rem; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 0 13px; white-space: nowrap; }
.primary { background: var(--pine); color: #fff; }
.primary:hover:not(:disabled) { background: #265746; }
.secondary { background: var(--white); color: var(--pine); border-color: #d4dacd; }
.secondary:hover:not(:disabled) { background: #eaf0e5; }
.lesson-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 26px 0 22px; }
.lesson-header h1 { font: 400 clamp(2.1rem, 4vw, 3.65rem)/1.02 var(--serif); letter-spacing: -.043em; margin: 5px 0 7px; }
#lesson-outcome { color: var(--muted); font-size: .9rem; }
.share-status { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; background: #eeeee6; border-radius: 6px; color: #49574c; font-size: .73rem; font-weight: 650; }
.share-status[data-mode="live"] { background: #dcece0; color: #225839; }
.share-status[data-mode="live"] .status-dot { background: #327b46; }
.share-status[data-mode="blank"] { background: #f5e7bc; color: #614b13; }
.share-status[data-mode="blank"] .status-dot { background: #966808; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 315px); gap: 18px; align-items: start; }
.deck, .teacher { background: var(--white); border: 1px solid var(--line); border-radius: 13px; min-width: 0; }
.deck-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 16px; }
.deck-top h2, .teacher-head h2 { font-size: .95rem; font-weight: 750; }
#slide-count, .key-hint { color: var(--muted); font-size: .75rem; }
.preview-wrap { padding: 0 12px; }
.deck-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; }
.dialogue-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 10px; border: 1px solid #d4dacd; border-radius: 8px; background: #eff2e6; }
.dialogue-status { color: var(--muted); font-size: .8rem; }
.icon-button { width: 40px; padding: 0; }
kbd { display: inline-block; font: inherit; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; background: var(--paper); }
#slide-list { display: flex; overflow: auto; gap: 6px; border-top: 1px solid var(--line); padding: 12px; }
.slide-item { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; border-radius: 6px; border: 1px solid var(--line); padding: 6px 8px; background: transparent; color: var(--muted); font-size: .72rem; }
.slide-item:hover { background: var(--paper); }
.slide-item[aria-current] { border-color: #9cb69e; background: #e8efe2; color: var(--pine-dark); font-weight: 700; }
.slide-item:focus-visible { outline-offset: 0; }
.slide-index { font-variant-numeric: tabular-nums; }

.teacher-head { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.teacher-head p { color: var(--muted); font-size: .73rem; }
.teacher-icon { display: grid; place-items: center; border-radius: 8px; background: #e9efdd; color: var(--pine); width: 37px; height: 37px; }
#teacher-content { padding: 12px 14px 6px; }
.current-note { padding: 13px; background: #eff2e6; border: 1px solid #e0e8d6; border-radius: 8px; margin-bottom: 6px; }
.timing { display: flex; align-items: center; gap: 4px; justify-content: space-between; }
.time-chip { border-radius: 5px; background: #e0e9d7; color: #365143; padding: 3px 6px; font-weight: 700; font-size: .69rem; white-space: nowrap; }
.current-note h3 { font-size: .96rem; margin: 6px 0 3px; }
.current-note p, .note-copy { font-size: .82rem; }
.note-section { border-bottom: 1px solid var(--line); }
.note-section:last-child { border-bottom: 0; }
.current-note .note-section { border-top: 1px solid #d6e0d1; margin-top: 9px; }
.note-section > summary { padding: 10px 0; color: var(--pine); font-weight: 700; font-size: .8rem; }
.note-copy { padding-bottom: 12px; white-space: pre-line; }
.note-copy p + p, .plan-step + .plan-step { margin-top: 9px; }

.slide-frame { container-type: inline-size; width: 100%; }
#preview { background: #e8e6d9; border-radius: 8px; overflow: hidden; }
.slide { box-sizing: border-box; position: relative; display: flex; flex-direction: column; min-height: 56.25cqw; font-size: clamp(.69rem, 2.35cqw, 2.75rem); padding: 3.1cqw 5cqw 2.7cqw; background: #f5f2e6; color: #20392c; overflow-wrap: anywhere; }
.slide-header { display: flex; justify-content: space-between; align-items: center; gap: .5em; color: #526a55; font-size: .52em; padding-bottom: 1.2em; border-bottom: 1px solid #ccd4c7; }
.slide-brand { font-size: 1.2em; font-weight: 750; }
.slide-content { flex: 1; display: grid; align-content: center; gap: .75em; padding-block: .54em; }
.slide h2 { font: 400 2.6em/.98 var(--serif); letter-spacing: -.044em; }
.slide-footer { color: #506554; text-align: right; font-size: .55em; }
.slide-cover { background: var(--pine); color: #f8f7e7; }
.slide-cover .slide-header, .slide-cover .slide-footer { color: #d1e2d1; border-color: #507261; }
.slide-cover .slide-content { width: 83%; }
.slide-cover .slide-content::after { content: "¿"; pointer-events: none; z-index: 0; position: absolute; right: .17em; top: 46%; transform: translateY(-50%); color: #315747; font: 400 10em/.86 var(--serif); }
.slide-cover .slide-content > * { z-index: 1; }
.slide-cover h2 { font: 750 .7em/1.1 var(--sans); letter-spacing: .04em; color: var(--lemon); }
.cover-phrase { font: 400 3.05em/.98 var(--serif); letter-spacing: -.043em; text-wrap: balance; }
.slide-cover .slide-lines { font-size: .9em; color: #f0f3dc; max-width: 34em; }
.slide-lines { display: grid; gap: .45em; line-height: 1.38; }
.slide-body:has(.slide-cards) { display: grid; gap: .65em; font-size: .87em; }
.dialogue { display: grid; gap: .25em; font-size: 1.02em; }
.dialogue-turn { display: grid; grid-template-columns: minmax(5em, 17%) 1fr; gap: .5em; padding: .28em .5em; border-radius: .35em; background: #e8eddf; }
.dialogue-turn:nth-child(even) { background: #fdfbf2; }
.dialogue dt { font-weight: 750; font-size: .73em; align-self: center; }
.dialogue dd { line-height: 1.27; }
.phrase-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .38em; font-size: .86em; }
.phrase-pair { padding: .45em .6em; background: #fffdf3; border-left: .14em solid #7b9978; }
.phrase-pair dt { font-weight: 750; }
.phrase-pair dd { color: #465e4c; font-size: .86em; }
.reference, .slide-support, .card-lines { list-style: none; margin: 0; padding: 0; }
.reference { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .34em; }
.reference li { background: #e6eddf; border-radius: .3em; padding: .32em .57em; font-weight: 650; }
.reference.phrase-bank { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: .87em; }
.reference.dense { grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: .81em; }
.slide-body > .slide-lines + .reference { margin-top: .65em; }
.slide-support { display: flex; flex-wrap: wrap; gap: .35em; font-size: .74em; padding-top: .3em; }
.slide-support li { background: #e5ebbb; border-radius: .37em; padding: .26em .57em; font-weight: 650; }
.slide-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5em; }
.slide-card { background: #e7eddf; border-radius: .3em; padding: .4em .6em; }
.with-map { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; align-items: start; }
.with-map > .slide-lines { font-size: .92em; }
.map { min-width: 0; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .22em; padding: .22em; border-radius: .4em; background: #abc0a7; }
.map-cell { display: grid; place-items: center; text-align: center; background: #fcfbf0; min-height: 2.4em; border-radius: .2em; padding: .15em; font-size: .73em; font-weight: 750; }
.map-cell.start { background: var(--pine); color: #fff; }
.map-cell.intersection { background: #e0ebd9; }
.map figcaption { font-size: .65em; line-height: 1.35; margin-top: .45em; }
.slide-paused { background: var(--pine-dark); color: #e5ead4; align-items: center; justify-content: center; gap: .45em; text-align: center; }
.slide-paused .slide-brand { font: 700 .7em var(--sans); }
.student { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: #102b23; }
.student .slide-frame { max-width: min(100vw, 178vh); }
.student .slide-frame:has(.slide-paused) { max-width: none; }
.student .slide-paused { min-height: 100vh; }

@media (min-width: 1250px) {
  .dashboard { grid-template-columns: 272px minmax(0, 1fr); }
  .sidebar { padding-inline: 21px; }
}
@media (max-width: 1050px) {
  .dashboard { grid-template-columns: 220px minmax(0, 1fr); }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .dashboard { display: block; }
  .sidebar { padding: 15px; }
  .course { display: none; }
  #lessons { display: flex; overflow: auto; margin-top: 12px; padding: 3px; }
  .lesson-link { width: auto; flex: 0 0 auto; padding: 7px 9px; min-height: 38px; }
  .menu-index { min-width: 0; }
  .menu-title small { display: none; }
  .materials { margin-top: 9px; padding-top: 8px; }
  .workspace-header, .lesson-header { flex-wrap: wrap; }
  .share-controls { flex-wrap: wrap; }
  .workspace-header { min-height: 0; }
  .lesson-header { margin: 18px 0; }
  .key-hint { display: none; }
}
