/* drexel.education.libre.computer: weekly slide decks.
 *
 * This site's own file, not a copy. Colours come from lc-kit.css, so the decks
 * follow the light and dark themes. Each slide is a 16:9 frame whose type is
 * sized to the frame (container units), so a slide reads the same on a laptop
 * and a projector. Without script every slide shows, stacked; js/slides.js
 * shows one at a time. Print gives one slide per page.
 */

.deck-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-sunken);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.deck-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.deck-bar a { color: var(--accent); text-decoration: none; }
.deck-bar a:hover { text-decoration: underline; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "\203A"; margin: 0 0.5rem; color: var(--text-dim); }
.crumbs li:first-child a { font-weight: 600; }
.crumbs [aria-current] { color: var(--text-dim); }
.deck-nav { display: flex; gap: 0.75rem; margin-left: auto; }
.deck-count { color: var(--text-dim); min-width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }

.deck {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  justify-items: center;
}

.slide {
  container-type: inline-size;
  box-sizing: border-box;
  width: min(100%, calc((100vh - 7rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  padding: 5cqw 6cqw;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow, none);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-eyebrow {
  margin: 0 0 2cqw;
  font-size: 1.6cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.slide h1 { margin: 0; font-size: 5.2cqw; line-height: 1.15; }
.slide h2 { margin: 0 0 2.5cqw; font-size: 3.4cqw; line-height: 1.25; }
.slide-topic { margin: 2.5cqw 0 0; font-size: 2.8cqw; line-height: 1.35; }
.slide-sub { margin: 2.5cqw 0 0; font-size: 2.4cqw; color: var(--text-dim); }
.slide-cont { color: var(--text-dim); font-weight: 400; }

.slide ul, .slide ol { margin: 0; padding-left: 3.2cqw; }
.slide li { font-size: 2.3cqw; line-height: 1.4; margin: 0 0 1.4cqw; }
.slide-big { margin: 0; font-size: 2.6cqw; line-height: 1.45; }

.slide a { color: var(--accent); }
.slide code { font-size: 0.92em; background: var(--bg-sunken); padding: 0 0.25em; border-radius: 3px; }

.slide h3 { margin: 1.6cqw 0 1cqw; font-size: 2.3cqw; color: var(--text-dim); }
.slide-teach p:not(.slide-eyebrow) { font-size: 2.3cqw; line-height: 1.45; margin: 0 0 1.4cqw; }
.slide pre {
  margin: 0 0 1.4cqw;
  padding: 1.4cqw 1.8cqw;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1.75cqw;
  line-height: 1.4;
  overflow: hidden;
}
.slide pre code { background: none; padding: 0; font-size: 1em; }
.slide table { border-collapse: collapse; font-size: 1.9cqw; margin: 0 0 1.4cqw; }
.slide th, .slide td { border: 1px solid var(--border); padding: 0.6cqw 1.2cqw; text-align: left; vertical-align: top; }
.slide th { background: var(--bg-raised); }
.slide-notes { display: none; }

/* Board drawings (tools/boards.py). Pin colours are lc-kit's --c-<class>
   tokens, the same palette as the pinout and layout sites. */
.slide { --board: #1f6b45; --board-edge: #4a5058; --silk: #f2f4f6; }
.dark .slide { --board: #1b4332; --silk: #d7dbe0; }
.slide:has(.board-figure) { justify-content: flex-start; padding-top: 3.5cqw; }
.board-figure {
  display: flex;
  gap: 2.5cqw;
  align-items: center;
  margin: 0;
  min-height: 0;
  flex: 1;
}
.board-figure svg { display: block; flex: none; height: 40cqw; width: auto; max-width: 64%; }
.board-header svg { width: 100%; max-width: 100%; height: auto; flex: initial; }
.board-header { flex-direction: column; align-items: stretch; }
.board-figure figcaption { font-size: 1.6cqw; color: var(--text-dim); }
.slide .board-figure figcaption p { margin: 1.2cqw 0 0; font-size: 1.5cqw; line-height: 1.4; color: var(--text-dim); }
.board-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 0.8cqw 2.2cqw; justify-content: start; }
.board-header .board-legend { grid-template-columns: repeat(6, auto); }
.board-key { display: flex; align-items: center; gap: 0.7cqw; font-size: 1.45cqw; color: var(--text); margin: 0; white-space: nowrap; }
.board-swatch { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--border); }
.board-pcb { fill: var(--board); stroke: var(--board-edge); stroke-width: 0.25; }
.board-part { opacity: 0.8; }
.board-silk { fill: none; stroke: var(--silk); stroke-width: 0.12; opacity: 0.6; }
.board-hole { fill: var(--bg); stroke: var(--board-edge); stroke-width: 0.2; }
.board-brass { fill: var(--brass); }
.board-header .is-dim, .board-svg .is-dim { opacity: 0.18; }
.board-strip-bg { fill: var(--board); }
.board-num { font-size: 5px; fill: var(--silk); text-anchor: middle; font-family: system-ui, sans-serif; }

.deck-notes {
  display: none;
  box-sizing: border-box;
  width: min(100%, calc((100vh - 7rem) * 16 / 9));
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.5;
}
.show-notes .deck-notes:not(:empty) { display: block; }

.slide-title { justify-content: flex-end; border-top: 1.2cqw solid var(--accent); }
.slide-handin, .slide-turnin { border-left: 1cqw solid var(--accent); }
.slide-next .slide-big { color: var(--text-dim); }

.deck-help { margin: 0 1.5rem 1.5rem; font-size: 0.85rem; color: var(--text-dim); text-align: center; }

/* One at a time, set by js/slides.js. */
.deck-js .deck { min-height: calc(100vh - 3rem); align-content: center; padding: 1rem; }
.deck-js .slide { display: none; }
.deck-js .slide.is-current { display: flex; }
.deck-js .deck-help { margin-top: 0; }

:fullscreen .deck-bar, :fullscreen .deck-help, :fullscreen .deck-notes { display: none; }
:fullscreen .deck { min-height: 100vh; padding: 0; background: var(--bg); }
:fullscreen .slide { width: min(100vw, calc(100vh * 16 / 9)); border: 0; border-radius: 0; box-shadow: none; }

@media print {
  @page { size: landscape; margin: 0; }
  .deck-bar, .deck-help, .deck-notes { display: none !important; }
  .deck-body { background: #fff; }
  .deck, .deck-js .deck { display: block; padding: 0; min-height: 0; }
  .slide, .deck-js .slide {
    display: flex;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
  }
}
