/* slide-shell.css — the ONE shared stylesheet for both deck.html and index.html.
   They must look pixel-identical (see CLAUDE.md), so this is the only place slide visuals
   are defined. Edit here, never duplicate a rule back into either HTML file's <style>.
   deck.html-only elements (notes-panel, timer-badge) and index.html-only elements
   (follow-bar) are both included here — an unused rule in one page is harmless. */

/* ---- Presentation shell: fixed 1600x900 (16:9) stage, scaled to fit any window ---- */

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
}

#viewport {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
}

#stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1600px;
  height: 900px;
  background: var(--paper);
  transform-origin: center center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border-top: 6px solid var(--accent);
}

/* Cover slide: a single-text-block entry renders as a full-bleed dark title slide,
   matching a real presentation's opening/closing slide instead of a centered web blurb. */
#stage.cover {
  background: #0e2a52;
  border-top: none;
}

#slide-body {
  position: absolute;
  inset: 0;
  padding: 64px 96px 0;
  display: flex;
  flex-direction: column;
}

#slide-body.statement {
  justify-content: center;
  padding: 0 140px;
}

.kicker {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  flex: 0 0 auto;
}

.slide-title {
  font-family: var(--font-head);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 8px 0 28px;
  flex: 0 0 auto;
}

.statement .slide-title {
  font-size: 64px;
  line-height: 1.15;
  margin: 18px 0 22px;
}

.statement .slide-text {
  font-size: 24px;
  color: var(--ink-soft);
  max-width: 1000px;
  line-height: 1.5;
}

.statement #slide-content {
  flex: 0 0 auto;
}

#stage.cover .kicker {
  color: #93b4e8;
}

#stage.cover .slide-title {
  color: #ffffff;
}

#stage.cover .slide-text {
  color: #c3cede;
}

#slide-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Multi-column mode: text-heavy slides with 2 grouped heading+list sections lay out
   side by side so they use the stage's width instead of stacking past its height. */
#slide-content.cols {
  column-count: 2;
  column-gap: 64px;
}

#slide-content.cols .block-heading.group-break {
  break-before: column;
}

.block {
  margin-bottom: 20px;
  break-inside: avoid;
}

.block-heading {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}

.block-text {
  font-size: 24px;
  line-height: 1.55;
  color: var(--ink);
}

.block-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 23px;
  line-height: 1.5;
}

.block-list li {
  position: relative;
  padding-left: 30px;
  padding-bottom: 16px;
  color: var(--ink);
}

.block-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
}

.block-list li strong {
  font-weight: 600;
}

.block-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 6px;
}

.tag {
  background: #e8ebf3;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
}

.block-steps .step-row {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.block-steps .step-row:first-child {
  padding-top: 0;
}

.block-steps .step-row:last-child {
  border-bottom: none;
}

.step-number {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  color: var(--accent);
  min-width: 36px;
}

.step-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
}

.step-text {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 4px;
}

.step-text strong {
  color: var(--ink);
  font-weight: 600;
}

.block-timeline {
  display: flex;
  align-items: flex-start;
  height: 100%;
  padding-top: 44px;
  position: relative;
}

.block-timeline::before {
  content: "";
  position: absolute;
  left: calc(100% / 12);
  right: calc(100% / 12);
  top: 44px;
  height: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  flex: 1 1 0;
  text-align: center;
  padding: 0 14px;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  margin: 0 auto 16px;
  width: 64px;
  height: 64px;
  padding: 0 6px;
  border-radius: 32px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.timeline-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 8px;
  color: var(--ink);
}

.timeline-text {
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.block-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: visible;
}

.diagram-line {
  stroke: var(--accent);
  stroke-width: 2.5;
  opacity: 0.55;
}

.diagram-arrowhead {
  fill: var(--accent);
  opacity: 0.55;
}

.diagram-circle,
.diagram-rect {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.5;
}

.diagram-circle--primary {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.diagram-circle--hub {
  fill: var(--accent);
  stroke: none;
}

.diagram-rect--hub {
  fill: var(--accent);
  stroke: none;
}

.diagram-label {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 14px;
  box-sizing: border-box;
  font-family: var(--font-body);
}

.diagram-label--primary {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
}

.diagram-label--hub {
  color: #fff;
}

.diagram-label--hub strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 25px;
}

.diagram-label--hub span {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.85;
}

.diagram-label--leaf {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}

.diagram-label--flow strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
}

.diagram-label--flow span {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.diagram-label--flow span strong {
  font-size: 15px;
  color: var(--ink);
}

.diagram-label--flow-hub strong {
  color: #fff;
}

.diagram-label--flow-hub span {
  color: rgba(255, 255, 255, 0.85);
}

.diagram-label--flow-hub span strong {
  color: #fff;
}

.block-cardgroup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  height: 100%;
  align-content: center;
}

.cardgroup-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  padding: 22px 24px;
}

.cardgroup-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  margin-bottom: 10px;
}

.cardgroup-card .block-tags {
  margin: 0 0 10px;
}

.cardgroup-text {
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.cardgroup-text strong {
  color: var(--ink);
  font-weight: 600;
}

.block-prompt,
.block-doc {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.block-prompt {
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 26px;
}

.prompt-actions,
.doc-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.prompt-scroll,
.doc-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-right: 10px;
}

.block-prompt pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.block-doc {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.block-doc summary {
  flex: 0 0 auto;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-head);
  font-size: 20px;
  background: var(--bg);
}

.block-doc[open] {
  padding-bottom: 0;
}

.doc-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 30px 28px;
  display: flex;
  flex-direction: column;
}

.block-doc .doc-body p {
  font-size: 19px;
  line-height: 1.75;
  margin: 0;
}

.block-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
}

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

#footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-size: 15px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

#stage.cover #footer {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.15);
  color: #8a9bc2;
}

#status-dot {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live-green);
  opacity: 0.55;
  z-index: 50;
}

/* deck.html: red = last broadcast publish failed */
#status-dot.fail {
  background: var(--live-red);
}

/* index.html: amber = connecting, red = offline (connection state, not publish state) */
#status-dot.connecting {
  background: var(--live-amber);
}

#status-dot.offline {
  background: var(--live-red);
}

/* deck.html only */
#notes-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 28vh;
  background: rgba(28, 25, 23, 0.95);
  color: #fff;
  padding: 18px 32px;
  font-size: 16px;
  overflow-y: auto;
  z-index: 60;
  border-top: 2px solid var(--accent);
}

#notes-panel h4 {
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* deck.html only */
#timer-badge {
  position: fixed;
  top: 14px;
  right: 14px;
  background: rgba(28, 25, 23, 0.85);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-head);
  font-size: 18px;
  z-index: 45;
}

#timer-badge.warn {
  background: var(--live-red);
}

#jump-indicator {
  position: fixed;
  top: 14px;
  left: 14px;
  background: rgba(28, 25, 23, 0.85);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 16px;
  z-index: 45;
}

#menu-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(28, 25, 23, 0.55);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  z-index: 46;
}

/* deck.html only: nudge Menu down when the timer badge is showing in the same corner */
#timer-badge:not([hidden]) ~ #menu-btn,
#menu-btn.shift {
  top: 58px;
}

#drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  z-index: 50;
}

#drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  background: var(--paper);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  z-index: 51;
  padding: 20px;
  overflow-y: auto;
}

#drawer h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

#drawer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#drawer li button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 8px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#drawer .live-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--live-green);
}

#drawer-close {
  border: none;
  background: none;
  font-size: 22px;
  float: right;
  cursor: pointer;
}

/* index.html only: tells a browsing participant the presenter has moved on, with a way back */
#follow-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 17, 21, 0.92);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  z-index: 55;
}

#follow-bar button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
