:root {
  color-scheme: light;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  color: #172033;
  background: #f4f6fa;
}

body {
  margin: 0;
}

main {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

header,
section,
.featured {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #dce2ec;
  border-radius: 0.75rem;
  background: #fff;
}

h1,
h2 {
  line-height: 1.35;
}

a {
  color: #245bb5;
}

.eyebrow {
  color: #5f6d82;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive {
  display: grid;
  gap: 0.75rem;
}

.pdf-viewer {
  width: 100%;
  min-height: 70vh;
  border: 1px solid #c9d1de;
}

.audience-qr svg {
  display: block;
  width: min(18rem, 100%);
  height: auto;
  margin-top: 1rem;
}

.speaker-note {
  border-left: 0.3rem solid #4472c4;
}

.presenter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-controls,
.timer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

button {
  padding: 0.55rem 0.85rem;
  border: 1px solid #9aa8bc;
  border-radius: 0.4rem;
  color: #172033;
  background: #fff;
  cursor: pointer;
}

button:focus-visible,
.splitter:focus-visible {
  outline: 0.2rem solid #245bb5;
  outline-offset: 0.15rem;
}

.timer-display {
  min-width: 5ch;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.timer.warning .timer-display {
  color: #b42318;
}

.presentation-layout {
  --pdf-pane-percent: 70;
  --pdf-pane-size: 7fr;
  --script-pane-size: 3fr;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, var(--pdf-pane-size)) minmax(0, var(--script-pane-size));
  gap: 1rem;
  width: 100%;
}

.presentation-layout > section {
  min-width: 0;
}

.pdf-pane,
.script-pane {
  max-height: 80vh;
  overflow: auto;
}

.pdf-pane .pdf-viewer {
  display: block;
  min-height: 65vh;
}

.splitter {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 1.5rem;
  left: calc(var(--pdf-pane-percent) * 1%);
  width: 0.75rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #9aa8bc;
  cursor: col-resize;
  touch-action: none;
}

.speaker-note[aria-current="true"] {
  border-color: #f08c00;
  box-shadow: 0 0 0 0.2rem rgb(240 140 0 / 22%);
  background: #fff9e8;
}

@media (max-width: 767px) {
  main {
    width: min(100% - 1rem, 960px);
    padding-top: 1rem;
  }

  .presenter-toolbar,
  .page-controls,
  .timer {
    flex-wrap: wrap;
  }

  .presentation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pdf-pane,
  .script-pane {
    max-height: none;
  }

  .splitter {
    display: none;
  }
}
