/* The classroom: the professor's board on top, the workbench underneath.
   Brand colours only; Pass and Not yet use the two chip colours from portal.css. */
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 18px; }
.btn-small { min-height: 36px; padding: 4px 12px; font-size: 14px; }

.classroom {
  --bench-h: 40%;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto var(--bench-h);
  /* Fills the window. The page opens scrolled to the classroom, with the site
     header one scroll up and the footer one scroll down. */
  height: 100vh; height: 100dvh; min-height: 520px; background: var(--linen);
}

/* Lesson bar */
.class-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: center; padding: 10px var(--gutter); background: var(--white); border-bottom: 1px solid var(--rule); }
.class-bar .crumbs { grid-column: 1; }
.class-bar .crumbs ol { margin: 0; font-size: 13px; }
.class-title { grid-column: 1; font-size: 22px; margin: 0; line-height: 1.2; }
.class-prof { grid-column: 1; margin: 0; font-size: 14px; }
.class-meter { grid-column: 2; grid-row: 1 / span 3; width: min(240px, 30vw); text-align: right; }
.class-meter .progress { height: 8px; margin-bottom: 4px; }
.class-meter .progress > span { transition: width .4s ease; }
@media (max-width: 640px) {
  .class-bar { grid-template-columns: 1fr; padding-top: 8px; padding-bottom: 8px; }
  .class-prof, .class-bar .crumbs { display: none; }
  .class-title { font-size: 18px; }
  .class-meter { grid-column: 1; grid-row: auto; width: 100%; display: flex; align-items: center; gap: 12px; }
  .class-meter .progress { flex: 1; margin: 0; }
}

/* Board */
.classroom [hidden] { display: none !important; }
.board { position: relative; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.board:focus { outline: none; }
.board-inner { max-width: 860px; margin: 0 auto; padding: 20px var(--gutter) 45vh; display: flex; flex-direction: column; gap: 16px; }
.step { background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--rule); padding: 16px 20px; min-width: 0; }
.step.is-live { border-left-color: var(--copper); box-shadow: 0 6px 24px rgba(20, 33, 61, .08); animation: step-in .35s ease-out; }
.step.is-done { opacity: .72; }
.step.is-done:hover, .step.is-done:focus-within { opacity: 1; }
@keyframes step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.step-who { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.step-who img { flex: none; }
.step-tag { margin-left: auto; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--copper-deep); }
.step-text { font-size: 18px; }
.step-text > :last-child { margin-bottom: 0; }
.step-text pre { background: var(--night); color: var(--linen); padding: 12px 16px; overflow-x: auto; font-size: 15px; border-left: 3px solid var(--copper); }
.step-text pre code { background: none; border: 0; padding: 0; color: inherit; }
.step.is-typing .step-text::after { content: "▍"; color: var(--copper); animation: blink 1s infinite; }
.step.is-typing .step-extra, .step.is-typing .step-actions { visibility: hidden; height: 0; overflow: hidden; margin: 0; }
.step-extra { margin-top: 14px; }
.step-where { margin: 0 0 8px; color: var(--muted); }
.step-actions { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-actions:empty { display: none; }
.step-done { font: 600 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.step .hints { margin-top: 12px; }
.step .hints ol { margin: 0 0 4px; padding-left: 22px; }
.chip-detail { font-size: 13px; color: var(--muted); margin-left: 4px; overflow-wrap: anywhere; }
.step-visual .tracer-note { font-size: 16px; }
.step-finish { display: flex; gap: 20px; align-items: flex-start; border-left-color: var(--copper); }
.step-finish img { flex: none; }
.step-finish h2 { margin: 0 0 8px; }
.step-finish .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
@media (max-width: 640px) { .step-finish { flex-direction: column; } .step-text { font-size: 17px; } }

/* On your Mac */
.mac-runs { list-style: none; counter-reset: run; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.mac-runs li { counter-increment: run; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.mac-runs li::before { content: counter(run); width: 24px; height: 24px; border-radius: 50%; background: var(--midnight); color: var(--linen); display: grid; place-items: center; font: 600 13px var(--font-body); }
.mac-runs pre { margin: 0; background: var(--night); color: var(--linen); padding: 10px 14px; overflow-x: auto; font: 14px/1.5 var(--font-code); border-left: 3px solid var(--copper); }
.mac-runs pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; }
.mac-paste { display: block; font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.mac-paste textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1.5px solid var(--midnight); border-radius: var(--radius); font: 14px/1.5 var(--font-code); background: var(--white); color: var(--midnight); resize: vertical; }
.step-mac .chips { margin-top: 12px; }

/* Quiz */
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; min-height: 48px; padding: 10px 14px; background: var(--white); border: 1.5px solid var(--midnight); border-radius: var(--radius); font: inherit; color: var(--midnight); cursor: pointer; }
.quiz-option:hover:not(:disabled) { background: var(--linen); border-color: var(--copper-deep); }
.quiz-option:disabled { cursor: default; border-color: var(--rule); } /* the border fades; the words stay readable */
.quiz-mark { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.quiz-word { margin-left: auto; font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.quiz-option.is-right { border-color: var(--pass); color: var(--midnight); }
.quiz-option.is-right .quiz-mark { background: var(--pass); border-color: var(--pass); color: var(--white); }
.quiz-option.is-right .quiz-word { color: var(--pass); }
.quiz-option.is-wrong { border-color: var(--notyet); }
.quiz-option.is-wrong .quiz-mark { background: var(--notyet); border-color: var(--notyet); color: var(--white); }
.quiz-option.is-wrong .quiz-word { color: var(--notyet); }
.quiz-explain { margin: 12px 0 0; padding: 10px 14px; background: var(--linen); border-left: 4px solid var(--copper); }

/* Divider */
.class-divider { height: 12px; background: var(--night); cursor: row-resize; display: grid; place-items: center; border-top: 3px solid var(--copper); touch-action: none; }
.class-divider span { width: 44px; height: 3px; border-radius: 2px; background: rgba(245, 243, 239, .35); }
.class-divider:hover span, .class-divider:focus-visible span { background: var(--linen); }

/* Workbench */
.bench { background: var(--night); color: var(--linen); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bench .bench-bar { flex: none; flex-wrap: wrap; gap: 8px 16px; padding: 6px 16px; }
.bench-tool { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--bone); }
.bench-tool select { min-height: 36px; padding: 4px 32px 4px 10px; background: var(--night); color: var(--linen); border: 1.5px solid var(--copper); border-radius: var(--radius); font: 600 15px var(--font-body); letter-spacing: 0; text-transform: none; cursor: pointer; }
.bench .bench-status { flex: 0 1 auto; }
.bench-safe { flex: 1; color: rgba(245, 243, 239, .6); text-align: right; }
.bench .link-button { min-height: 36px; }
.link-button.light { color: var(--linen); }
@media (max-width: 640px) { .bench-safe, .bench-tool span { display: none; } .bench .bench-status { flex: 1; min-width: 0; } .bench .bench-bar { flex-wrap: nowrap; } }

.tool { flex: 1 1 auto; min-height: 0; }
.tool[hidden] { display: none; }
.tool-term { overflow-y: auto; padding: 10px 16px 14px; font: 15px/1.6 var(--font-code); cursor: text; }
.term-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-typed { color: var(--bone); }
.term-note { color: rgba(245, 243, 239, .5); font-style: italic; }
.term-value { color: var(--code-number); }
.term-error { color: var(--bone); font-family: var(--font-body); }
.term-raw { color: rgba(245, 243, 239, .4); font-size: 12px; }
.term-entry { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.term-prompt { color: var(--copper); white-space: nowrap; flex: none; }
.term-entry input { flex: 1; margin: 0; min-height: 0; height: auto; border-radius: 0; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--linen); font: inherit; padding: 2px 0; caret-color: var(--copper); }
.tool-term:focus-within { box-shadow: inset 3px 0 0 var(--copper); }

.tool-editor { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); min-height: 0; }
.tool-editor[hidden] { display: none; }
.tool-editor .editor-host { height: auto; min-height: 0; border-right: 1px solid var(--night-line); }
.tool-editor .editor-fallback { min-height: 0; }
.editor-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.editor-side .bench-actions { border-top: 0; border-bottom: 1px solid var(--night-line); padding: 8px 16px; }
.editor-side .console-body { flex: 1; max-height: none; min-height: 0; }
/* The web page preview: the student's own page, on a white sheet like a browser tab. */
.editor-side .preview-frame { flex: 1; min-height: 120px; width: 100%; border: 0; background: #fff; margin-top: 8px; }
.editor-side [hidden] { display: none; }
.page-notes { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--night-line); border-left: 3px solid var(--copper); flex: 0 0 auto; max-height: 8.5em; overflow: auto; color: var(--linen); font-size: 14px; line-height: 1.45; }
.page-notes-head { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone); }
.page-notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.page-notes strong { color: var(--copper); font-weight: 600; margin-right: 4px; white-space: nowrap; }
.flip-preview { display: none; }
@media (max-width: 760px) {
  /* A phone shows the code or the page, with the buttons on top either way. */
  .flip-preview:not([hidden]) { display: inline-flex; margin-left: auto; }
  .tool-editor.is-page { grid-template-rows: auto minmax(0, 1fr); }
  .tool-editor.is-page .editor-side { order: -1; }
  .tool-editor.is-page .page-notes { max-height: 5.6em; padding: 8px 16px; }
  .tool-editor.is-page .page-notes-head { display: none; }
  .tool-editor.is-page .console-head, .tool-editor.is-page:not(.show-preview) .preview-frame { display: none; }
  .tool-editor.is-page.show-preview { grid-template-rows: minmax(0, 1fr); }
  .tool-editor.is-page.show-preview .editor-host { display: none; }
  .tool-editor.is-page.show-preview .preview-frame { margin-top: 0; }
}
@media (max-width: 760px) {
  .tool-editor { grid-template-columns: 1fr; grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
  .tool-editor .editor-host { border-right: 0; border-bottom: 1px solid var(--night-line); }
}

@media (prefers-reduced-motion: reduce) {
  .step.is-live { animation: none; }
  .board { scroll-behavior: auto; }
}

/* On a phone the bench is where the typing happens, so toasts sit above it. */
@media (max-width: 640px) {
  body:has(.classroom) .toasts { bottom: auto; top: 12px; align-items: stretch; }
  body:has(.classroom) .toast { max-width: none; }
}

/* Study page: guide, flashcards, questions, homework */
.study-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.study-jump a { padding: 6px 14px; border: 1px solid var(--night-line); color: var(--linen); text-decoration: none; font-weight: 600; font-size: 15px; min-height: 36px; display: inline-flex; align-items: center; }
.study-jump a:hover { border-color: var(--copper); }
.study-grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .study-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.study-grid .panel { scroll-margin-top: 16px; }
.guide-list { padding-left: 22px; margin: 0 0 16px; }
.guide-list li { margin-bottom: 10px; }
.flashcard { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 220px; padding: 20px 24px; text-align: left; background: var(--linen); color: var(--midnight); border: 1.5px solid var(--midnight); border-left: 6px solid var(--copper); border-radius: var(--radius); font: inherit; cursor: pointer; transition: background .2s, color .2s; }
.flashcard.is-flipped { background: var(--midnight); color: var(--linen); }
.flash-side { font: 600 11px var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--copper-deep); }
.flashcard.is-flipped .flash-side { color: var(--bone); }
.flash-text { font: 22px/1.4 var(--font-heading); flex: 1; display: flex; align-items: center; }
.flash-text code { font-size: .85em; }
.flashcard.is-flipped .flash-text code { background: rgba(245, 243, 239, .1); border-color: var(--night-line); color: var(--linen); }
.flash-tip { color: var(--muted); }
.flashcard.is-flipped .flash-tip { color: rgba(245, 243, 239, .7); }
.deck-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.deck-done { padding: 20px; background: var(--linen); border-left: 4px solid var(--copper); }
.study-question { padding: 16px 0; border-top: 1px solid var(--rule); }
.study-question:first-of-type { border-top: 0; }
.status-pill { display: inline-block; padding: 4px 12px; border: 1.5px solid var(--midnight); font: 600 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.lesson-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.today-homework { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.study-grid [hidden] { display: none !important; }
.handed-in { margin-top: 16px; }
.handed-in summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.handed-in h3 { font: 600 12px var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--copper-deep); margin: 14px 0 6px; }
.handed-in pre { margin: 0; background: var(--night); color: var(--linen); padding: 10px 14px; overflow-x: auto; font: 14px/1.5 var(--font-code); border-left: 3px solid var(--copper); white-space: pre-wrap; overflow-wrap: anywhere; }
.handed-in .btn { margin-top: 14px; }
.study-record { margin: 12px 0 0; }
.inline-form { display: inline; margin-left: 8px; }
.inline-form .link-button { min-height: 0; text-decoration: underline; text-decoration-color: var(--copper); }
.handed-in-task { font-size: 15px; margin-bottom: 6px; }
.handed-in-task > :last-child { margin-bottom: 0; }

/* Study log: automatic time and one-tap adding */
.quick-add { display: grid; gap: 14px; margin: 12px 0 0; }
.chip-row { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.chip-row legend { padding: 0; margin-bottom: 6px; font: 600 12px var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--copper-deep); }
.chip-row label { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--midnight); border-radius: var(--radius); background: var(--white); color: var(--midnight); font-weight: 600; font-size: 15px; cursor: pointer; }
.chip-row input:checked + label { background: var(--midnight); color: var(--linen); }
.chip-row input:checked + label::before { content: "✓"; margin-right: 8px; }
.chip-row input:focus-visible + label { outline: 2px solid var(--copper); outline-offset: 2px; }
.add-row .btn { min-width: 96px; justify-content: center; }
.quick-log-panel { margin-top: 12px; padding: 16px; background: var(--white); border: 1px solid var(--rule); color: var(--midnight); }
.quick-log-panel > p { margin: 0; }
.log-today { border-left: 4px solid var(--copper); }
.log-total { font: 20px var(--font-body); margin: 0 0 8px; }
.log-total strong { font: 56px/1 var(--font-display); margin-right: 6px; }
.log-breakdown, .log-list { list-style: none; padding: 0; margin: 0; }
.log-breakdown li, .log-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.log-list li { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.log-list .link-button { min-height: 36px; }
.log-tag { color: var(--muted); }
.log-heading { margin-top: 32px; }
.log-day { margin-bottom: 20px; }
.log-day h3 { font-size: 18px; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: baseline; }
.class-logged { font-size: 13px; }
.study-logged { color: rgba(245, 243, 239, .7); margin: 12px 0 0; }
.bench-logged { color: rgba(245, 243, 239, .6); margin-left: auto; }
@media (max-width: 520px) { .log-list li { grid-template-columns: minmax(0, 1fr) auto; } .log-tag { grid-row: 2; } }

/* Tutor kit panel on the classroom list */
.kit { margin: 0 0 16px; border-left: 4px solid var(--copper); }
.kit summary { cursor: pointer; min-height: 32px; }
.kit ol { margin: 12px 0; padding-left: 22px; }
.kit li { margin: 4px 0; }

/* SQL results are tables: keep each row on one line and let a wide one scroll sideways. */
.term-line.term-table { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.console-body.is-table { white-space: pre; }

/* On a phone, what a missed check found goes under its label instead of squeezing it. */
@media (max-width: 560px) {
  .step .chips .chip { flex-wrap: wrap; }
  .step .chips .chip .chip-label { flex: 1 1 55%; min-width: 0; }
  .step .chips .chip .chip-word { order: 2; }
  .step .chips .chip .chip-detail { order: 3; flex: 0 0 calc(100% - 30px); margin-left: 30px; max-height: 6.5em; overflow: auto; }
}

/* A missed SQL check shows the first rows it found as a small table under its sentence. */
.chip-table { margin: 6px 0 0; font: 12.5px/1.5 var(--font-code); color: var(--midnight); white-space: pre; overflow-x: auto; }
.step .chips .chip.has-table { flex-wrap: wrap; }
.step .chips .chip.has-table .chip-label { flex: 1 1 55%; min-width: 0; }
.step .chips .chip.has-table .chip-word { order: 2; }
.step .chips .chip.has-table .chip-detail { order: 3; flex: 0 0 calc(100% - 30px); margin-left: 30px; max-height: none; min-width: 0; }

/* The bench bar stays on one line on a phone: a short label for the copy button, and a status that doesn't stack. */
.when-narrow { display: none; }
.bench .bench-status { white-space: nowrap; }
@media (max-width: 640px) {
  .when-wide { display: none; }
  .when-narrow { display: inline; }
  .bench .bench-bar .link-button { white-space: nowrap; flex: none; }
  .bench .bench-status { overflow: hidden; text-overflow: ellipsis; }
}

/* The course list: one list for the Courses page, the welcome screen and "Switch class". */
.course-list { list-style: none; padding: 0; margin: 0; }
/* Programs: each department is a block with its courses inside it. */
.program { margin: 0 0 28px; border-left: 4px solid var(--rule); padding-left: 16px; }
.program.is-current { border-left-color: var(--copper); }
.program-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 10px 0 8px; border-bottom: 2px solid var(--midnight); }
.program-head h2, .program-head h3 { margin: 0; font-size: 26px; }
.program-word { display: block; font: 600 12px var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--copper-deep); margin-bottom: 2px; }
.program-meta { margin: 0; font-size: 14px; color: var(--muted); }
.program-meta strong { color: var(--midnight); }
.course-dialog .program { margin-top: 16px; }
.course-dialog .program-head h3 { font-size: 22px; }
.course-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--rule); }
.course-pick.is-current { padding-left: 12px; padding-right: 12px; background: var(--white); }
.course-pick .eyebrow { margin: 0 0 4px; }
.course-name { margin: 0; font: 700 22px/1.25 var(--font-heading); }
.course-name a { color: var(--midnight); text-decoration: none; }
.course-name a:hover { text-decoration: underline; text-decoration-color: var(--copper); }
.course-tagline { margin: 4px 0 0; }
.course-pick .meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.course-pick.is-going .course-state, .course-pick.is-finished .course-state { color: var(--midnight); font-weight: 600; }
.course-pick-act { display: flex; align-items: center; gap: 16px; }
.course-pick-act form { margin: 0; }
.course-pick-act .btn { min-width: 108px; justify-content: center; }
.course-more-toggle { display: inline-flex; align-items: center; text-decoration: none; }
.course-more-toggle::after { content: "▾"; margin-left: 6px; font-size: 12px; }
.course-more-toggle[aria-expanded=true]::after { content: "▴"; }
.course-more { grid-column: 1 / -1; background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--copper); padding: 16px 20px; }
.course-more[hidden] { display: none; }
.course-more ul { margin: 0 0 12px; padding-left: 22px; }
.course-more p { margin: 0; }
.course-more-head { font-weight: 600; margin: 0 0 4px !important; }
.course-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 0 0 12px; }
.course-facts dt { font-weight: 600; font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.course-facts dd { margin: 0; }
@media (max-width: 640px) {
  .course-pick { grid-template-columns: 1fr; }
  .course-pick-act { justify-content: space-between; }
  .course-facts { grid-template-columns: 1fr; gap: 0; }
  .course-facts dd { margin-bottom: 8px; }
}

/* The list drawn over the page. */
.course-dialog { width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--midnight); background: var(--linen); color: var(--midnight); overflow: hidden; }
.course-dialog[open] { display: flex; flex-direction: column; }
.course-dialog::backdrop { background: rgba(20, 33, 61, .6); }
.course-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: var(--white); border-bottom: 1px solid var(--rule); flex: none; }
.course-dialog-head h2 { margin: 0; font-size: 24px; }
.course-dialog-body { position: relative; min-height: 0; flex: 1; display: flex; }
.course-dialog-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; flex: 1; min-width: 0; }
.course-dialog .course-list { border-top: 0; }
.course-dialog-aside { display: none; }
/* With a mouse and room to spare, pointing at a course shows its details beside the list. */
@media (hover: hover) and (min-width: 900px) {
  .course-dialog-scroll { padding-right: 400px; min-height: 420px; }
  .course-dialog-aside { display: block; position: absolute; top: 20px; right: 20px; width: 360px; margin: 0; padding: 16px 20px; border: 1px dashed var(--rule); }
  .course-dialog .course-more-toggle { display: none; }
  .course-dialog .course-pick:hover .course-more, .course-dialog .course-pick:focus-within .course-more {
    display: block; position: absolute; top: 20px; right: 20px; width: 360px; max-height: calc(100% - 40px); overflow-y: auto; z-index: 1; box-shadow: 0 6px 24px rgba(20, 33, 61, .12); }
  /* Pointing wins over where the keyboard is. */
  .course-dialog .course-list:hover .course-pick:focus-within:not(:hover) .course-more { display: none; }
  .course-dialog .course-pick:hover, .course-dialog .course-pick:focus-within { background: var(--white); }
}

/* The welcome screen. */
.welcome-first { background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--copper); padding: 24px; max-width: 760px; }
.welcome-first h2 { margin: 0 0 8px; }
.welcome-first .meta { color: var(--muted); font-size: 14px; margin: 0; }
.welcome-list-head { margin-top: 40px; }

/* Tools in the lesson bar, and the professor's chat. */
.classroom > * { grid-column: 1; }
.class-tools { grid-column: 2; grid-row: 3; display: flex; gap: 8px; justify-content: flex-end; }
.class-meter { grid-row: 1 / span 2; }
.class-tools .btn { white-space: nowrap; background: var(--white); }
.class-tools .btn[aria-expanded=true] { background: var(--midnight); color: var(--linen); }
.classroom .class-tutor { grid-column: 2; grid-row: 1 / -1; border-width: 0 0 0 1px; min-height: 0; position: static; max-height: none; }
.class-tutor[hidden] { display: none; }
.class-tutor-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.class-tutor .link-button.light { color: var(--linen); }
.class-tutor .tutor-log { min-height: 0; align-content: start; }
.tutor-alert { margin: 0; color: #9B2335; font-weight: 600; font-size: 14px; }
.tutor-alert:empty { display: none; }
.tutor-send-work { display: flex; gap: 8px; align-items: baseline; }
.tutor-send-work input { flex: none; }
.tutor-off { border-top: 1px solid var(--rule); padding: 16px; }
.tutor-off p { margin: 0 0 8px; }
@media (min-width: 1000px) { .classroom.has-tutor { grid-template-columns: minmax(0, 1fr) min(400px, 36vw); } }
@media (max-width: 999.98px) {
  .classroom .class-tutor { position: fixed; inset: 0; z-index: 40; border: 0; }
}
@media (max-width: 640px) {
  .class-meter { grid-row: auto; }
  .class-tools { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .class-tools .btn { flex: 1; justify-content: center; min-height: 40px; }
}

.class-where { display: none; margin: 0; color: var(--copper-deep); font-weight: 600; letter-spacing: .04em; }
@media (max-width: 640px) { .class-where { display: block; grid-column: 1; grid-row: 1; } }
