/* Presenter shell + design system for opc-ai-income (1280×720) */

:root {
  --ink: #06080E;
  --ink-2: #0C111C;
  --ink-3: #121A28;
  --gold: #A88B52;
  --gold-bright: #C4A86A;
  --gold-dim: rgba(168, 139, 82, 0.45);
  --bone: #FFFFFF;
  --bone-dim: rgba(255, 255, 255, 0.88);
  --muted: #7A9BB5;
  --faint: rgba(122, 155, 181, 0.65);
  --line: rgba(168, 139, 82, 0.18);
  --data-hot: #E07070;
  --data-cold: #7A9BB5;
  --data-neutral: #E8E4DC;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "SF Mono", "Menlo", "IBM Plex Mono", monospace;
  --col: 88px;
  --gutter: 24px;
  --margin: 56px;
}

.slide {
  position: absolute;
  inset: 0;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: var(--ink);
  display: none;
}

.slide.active {
  display: block;
  z-index: 1;
}

.slide .rs {
  width: 1280px;
  height: 720px;
  overflow: hidden;
}

.slide .rs .slide-container {
  width: 1280px;
  height: 720px;
  min-height: 720px;
  max-height: 720px;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Atoms — available inside scoped slides */
.slide .u-eyebrow {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
}

.slide .u-num-hero {
  font-family: var(--serif);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  line-height: 1;
}

.slide .u-source {
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  bottom: 28px;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.45;
  font-weight: 300;
}

.slide .u-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
  border-radius: 999px;
}

.slide .u-live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54d36a;
  box-shadow: 0 0 8px #54d36a;
}

.slide .u-quote-policy {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.65;
  color: var(--bone-dim);
}

.slide .u-quote-policy mark,
.slide .u-quote-policy .hl {
  color: var(--gold);
  background: transparent;
  font-weight: 700;
}

.slide .pollbars .bar-fill.fillb,
.slide .live-bars .fillb {
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  height: 100%;
  border-radius: 2px;
  will-change: width;
}

.slide .live-opt-stat,
.slide .k-hero,
.slide [data-live="joined"],
.slide [data-agg="registered"],
.slide [data-agg^="role-"] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.slide .poll-qr-mount,
.slide [data-live="qr"] {
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.slide .poll-qr-mount canvas,
.slide .poll-qr-mount img,
.slide [data-live="qr"] canvas,
.slide [data-live="qr"] img {
  display: block;
}

.slide .live-opt-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.slide .live-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 100%;
}

.slide .live-ref {
  margin-top: 4px;
  padding-top: 8px;
  font-size: 12px;
  color: var(--bone-dim);
  border-top: 1px dashed rgba(168, 139, 82, 0.35);
}

/* Inside a framed panel the bars own the whole box instead of clustering in the middle. */
.slide .poll-mount.panel {
  display: flex;
  flex-direction: column;
}

.slide .poll-mount.panel .live-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.slide .poll-mount.panel .live-bars .live-opt-row {
  margin-bottom: 0;
}

.slide .live-opt-label {
  font-size: 18px;
  line-height: 1.4;
  color: var(--bone-dim);
}

.slide .live-opt-stat {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--gold);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.slide .live-bar-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  grid-column: 1 / -1;
}

.slide .live-ring-wrap {
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

/* Ring poll: scales to whatever panel the slide gives it, and still reads at zero votes. */
.slide .live-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  width: 100%;
}

.slide .ring-svg {
  width: 340px;
  height: 340px;
  flex: none;
}

.slide .ring-tot {
  fill: #fff;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.slide .ring-tot-unit,
.slide .ring-empty {
  fill: var(--bone-dim);
  font-size: 16px;
}

.slide .ring-legend {
  flex: 0 1 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.slide .ring-row {
  display: grid;
  grid-template-columns: 14px 1fr auto 56px;
  align-items: center;
  gap: 14px;
  font-size: 20px;
}

.slide .ring-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.slide .ring-n {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.slide .ring-pct {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--bone-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.slide .k-hero {
  font-family: var(--serif);
  font-size: 180px;
  font-weight: 900;
  color: var(--gold);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

/* Legibility floor: at 1280×720 nothing under 12px survives a projector.
   Higher specificity than the per-slide scoped rules so it applies to every deck page. */
.slide .rs .u-source,
.slide .rs .u-live-badge,
.slide .rs .q-label,
.slide .rs .bar-label {
  font-size: 12px;
}

/* Keep slide footnotes clear of the presenter chrome (#joinBadge / #pageBar own the bottom 14–32px). */
.slide .rs .u-source,
.slide .rs .credit {
  bottom: 36px;
}

.slide .city-rank-row {
  display: grid;
  grid-template-columns: 44px 1fr minmax(120px, 3fr) 56px;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
}

.slide .city-rank {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--bone-dim);
}

.slide .city-bar {
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.slide .city-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(168, 139, 82, 0.55), var(--gold));
}

.slide .city-n {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.slide .city-rank-row.lead .city-name {
  font-weight: 700;
}

.slide .live-wait {
  color: var(--bone-dim);
  padding: 20px 0;
}

/* k = min(a,b,c,d): the shortest plank carries the gold frame. */
.slide .k-row.is-min {
  border-color: rgba(168, 139, 82, 0.65);
  background: linear-gradient(90deg, rgba(168, 139, 82, 0.16), rgba(12, 17, 28, 0.4));
  box-shadow: inset 4px 0 0 var(--gold);
}

/* QA overlay (page shell, not slide) */
#qaOverlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(6, 8, 14, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  color: #fff;
}

#qaOverlay.hidden { display: none !important; }

#qaOverlay h2 {
  font-family: var(--serif);
  font-size: 36px;
  margin-bottom: 8px;
}

#qaOverlay .qa-sub {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

#qaList {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-2);
}

.qa-item .up {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--gold);
  text-align: center;
}

.qa-item .txt {
  font-size: 18px;
  line-height: 1.45;
}
