:root {
  --bg: #eef5f1;
  --bg-mid: #e4efe9;
  --bg-deep: #d8e8e1;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(250, 253, 252, 0.98);
  --panel-soft: rgba(255, 255, 255, 0.74);
  --text: #17353b;
  --muted: #4b666a;
  --accent: #17886f;
  --accent-2: #b1791e;
  --accent-3: #2f73b7;
  --danger: #bd6654;
  --border: rgba(23, 53, 59, 0.11);
  --shadow: 0 26px 70px rgba(16, 42, 46, 0.12);
  --glow-a: rgba(23, 136, 111, 0.1);
  --glow-b: rgba(47, 115, 183, 0.08);
  --glow-c: rgba(177, 121, 30, 0.08);
  --grid-line: rgba(23, 53, 59, 0.045);
  --chip-border: rgba(23, 136, 111, 0.2);
  --chip-fill: rgba(23, 136, 111, 0.08);
  --surface-border: rgba(23, 53, 59, 0.08);
  --surface-fill: rgba(255, 255, 255, 0.5);
  --surface-fill-soft: rgba(255, 255, 255, 0.34);
  --surface-fill-strong: rgba(255, 255, 255, 0.62);
  --surface-accent-border: rgba(23, 136, 111, 0.18);
  --surface-accent-fill: rgba(23, 136, 111, 0.1);
  --surface-warm-border: rgba(177, 121, 30, 0.22);
  --surface-warm-fill: rgba(177, 121, 30, 0.1);
  --surface-danger-border: rgba(189, 102, 84, 0.16);
  --surface-danger-fill: rgba(189, 102, 84, 0.08);
  --accent-gradient-soft: rgba(23, 136, 111, 0.1);
  --accent-gradient-strong: rgba(47, 115, 183, 0.08);
  --warm-gradient-soft: rgba(177, 121, 30, 0.1);
  --warm-gradient-strong: rgba(189, 102, 84, 0.08);
  --flow-line-strong: rgba(23, 136, 111, 0.72);
  --flow-line-soft: rgba(23, 136, 111, 0.12);
  --timeline-line: rgba(23, 53, 59, 0.12);
  --timeline-glow: rgba(23, 136, 111, 0.14);
  --button-primary-text: #f8fffc;
}

html[data-theme="dark"],
body.presentation-body[data-theme="dark"],
body.remote-body {
  --bg: #071318;
  --bg-mid: #05141a;
  --bg-deep: #031015;
  --panel: rgba(9, 29, 36, 0.9);
  --panel-strong: rgba(11, 35, 44, 0.96);
  --panel-soft: rgba(14, 46, 57, 0.58);
  --text: #eff8f6;
  --muted: #c2d8d2;
  --accent: #6ce5bc;
  --accent-2: #f7bf6e;
  --accent-3: #77bdfa;
  --danger: #ff8d7a;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
  --glow-a: rgba(108, 229, 188, 0.16);
  --glow-b: rgba(119, 189, 250, 0.14);
  --glow-c: rgba(247, 191, 110, 0.14);
  --grid-line: rgba(255, 255, 255, 0.025);
  --chip-border: rgba(108, 229, 188, 0.22);
  --chip-fill: rgba(108, 229, 188, 0.1);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-fill: rgba(255, 255, 255, 0.04);
  --surface-fill-soft: rgba(255, 255, 255, 0.03);
  --surface-fill-strong: rgba(255, 255, 255, 0.06);
  --surface-accent-border: rgba(108, 229, 188, 0.22);
  --surface-accent-fill: rgba(108, 229, 188, 0.1);
  --surface-warm-border: rgba(247, 191, 110, 0.22);
  --surface-warm-fill: rgba(247, 191, 110, 0.08);
  --surface-danger-border: rgba(255, 141, 122, 0.18);
  --surface-danger-fill: rgba(255, 141, 122, 0.08);
  --accent-gradient-soft: rgba(108, 229, 188, 0.14);
  --accent-gradient-strong: rgba(119, 189, 250, 0.08);
  --warm-gradient-soft: rgba(247, 191, 110, 0.12);
  --warm-gradient-strong: rgba(108, 229, 188, 0.08);
  --flow-line-strong: rgba(108, 229, 188, 0.9);
  --flow-line-soft: rgba(108, 229, 188, 0.1);
  --timeline-line: rgba(255, 255, 255, 0.12);
  --timeline-glow: rgba(108, 229, 188, 0.12);
  --button-primary-text: #071318;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, var(--glow-a), transparent 24%),
    radial-gradient(circle at 88% 18%, var(--glow-b), transparent 20%),
    radial-gradient(circle at 80% 84%, var(--glow-c), transparent 18%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-mid) 54%, var(--bg-deep) 100%);
  font-family: "Aptos", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 54px 54px;
}

.reveal {
  color: var(--text);
  background: transparent !important;
}

.reveal .slides {
  text-align: left;
}

.reveal-viewport,
.reveal .backgrounds {
  background: transparent !important;
}

.reveal .controls,
.reveal .controls button,
.reveal .progress {
  color: var(--accent);
}

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--surface-fill-strong);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.reveal h1,
.reveal h2,
.reveal h3 {
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.03em;
}

.reveal h1 {
  margin: 0 0 0.7rem;
  font-size: 3.35rem;
  line-height: 1.02;
}

.reveal h2 {
  margin: 0;
  font-size: 2.18rem;
}

.reveal h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.reveal p,
.reveal li,
.reveal td,
.reveal th {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.42;
}

.reveal ul {
  display: block;
  margin: 0;
  padding-left: 1.15rem;
}

.reveal strong {
  color: var(--text);
}

.executive-slide {
  width: 100%;
}

.slide-header {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.eyebrow,
.mini-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deck-copy {
  max-width: 40rem;
  margin: 0;
}

.statement-line {
  max-width: 44rem;
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.44;
}

.hero-subtitle {
  font-size: 1.18rem;
}

.support-copy {
  margin: 0;
  font-size: 0.88rem;
}

.slide-copy-column {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.hero-layout,
.matrix-layout,
.single-panel-layout,
.two-column-layout,
.technology-layout,
.appendix-grid,
.qa-grid,
.remote-grid {
  display: grid;
  gap: 1rem;
}

.hero-layout,
.two-column-layout {
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
}

.matrix-layout {
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 0.66fr);
}

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

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

.appendix-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qa-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.glow-panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
  backdrop-filter: blur(10px);
}

.soft-wrap-panel {
  align-self: start;
  padding-bottom: 1.35rem;
}

.chip-row,
.why-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.chip-row span,
.why-band span,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-fill);
  color: var(--text);
  font-size: 0.84rem;
}

.media-caption {
  margin: 0;
  font-size: 0.84rem;
}

.hero-visual-card {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.eco-cluster {
  display: grid;
  gap: 0.75rem;
}

.eco-node {
  position: relative;
  display: grid;
  gap: 0.18rem;
  padding: 0.9rem 1rem;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: var(--surface-fill);
}

.eco-node strong,
.metric-card strong,
.metric-tile strong,
.timeline-step strong,
.balance-item strong {
  font-size: 1rem;
}

.eco-node span,
.metric-label,
.balance-label,
.tech-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.eco-hub {
  background: linear-gradient(135deg, var(--accent-gradient-soft), rgba(47, 115, 183, 0.12));
  border-color: var(--surface-accent-border);
}

.eco-source.municipal::after,
.eco-source.sludge::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.7rem;
  width: 2px;
  height: 0.7rem;
  background: linear-gradient(180deg, var(--flow-line-strong), var(--flow-line-soft));
}

.eco-source.municipal {
  justify-self: start;
  width: 74%;
}

.eco-source.sludge {
  justify-self: end;
  width: 74%;
}

.eco-outcome.power {
  border-color: var(--surface-warm-border);
  background: linear-gradient(135deg, var(--warm-gradient-soft), var(--warm-gradient-strong));
}

.table-shell {
  margin-top: 0.9rem;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
}

.feedstock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.feedstock-table th,
.feedstock-table td {
  padding: 0.62rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--surface-border);
}

.feedstock-table th {
  color: var(--text);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-fill-strong);
}

.feedstock-table tfoot td {
  color: var(--text);
  font-weight: 700;
  background: var(--surface-accent-fill);
  border-bottom: 0;
}

.logistics-panel,
.matrix-panel,
.finance-metrics,
.revenue-board,
.community-stack,
.timeline-panel,
.state-value-stack {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.metric-stack,
.metric-grid,
.driver-grid {
  display: grid;
  gap: 0.75rem;
}

.metric-stack {
  grid-template-columns: 1fr;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.metric-tile,
.driver-card,
.pillar-card,
.community-card,
.appendix-card,
.qa-card,
.timeline-step,
.balance-item {
  padding: 0.9rem 0.95rem;
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: var(--surface-fill);
}

.driver-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.solution-card,
.pillar-card.accent,
.community-card.accent,
.defer-card {
  background: linear-gradient(135deg, var(--accent-gradient-soft), var(--accent-gradient-strong));
  border-color: var(--surface-accent-border);
}

.logistics-flow {
  display: grid;
  gap: 0.75rem;
}

.flow-step {
  position: relative;
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem 0.9rem 0.8rem 1rem;
  border-left: 3px solid var(--flow-line-strong);
  background: var(--surface-fill-soft);
  border-radius: 0 18px 18px 0;
}

.flow-step span,
.compliance-row span {
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.24;
}

.flow-step small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.flow-step.final {
  border-left-color: var(--accent-2);
}

.balance-board {
  display: grid;
  align-content: center;
  gap: 0.9rem;
}

.balance-item.negative {
  border-color: var(--surface-danger-border);
  background: var(--surface-danger-fill);
}

.balance-item.positive {
  border-color: var(--surface-accent-border);
  background: var(--surface-accent-fill);
}

.balance-arrow {
  justify-self: center;
  width: 2px;
  height: 2.5rem;
  background: linear-gradient(180deg, var(--surface-warm-fill), var(--accent-2));
}

.benefit-list,
.compact-list,
.system-points {
  display: grid;
  gap: 0.5rem;
}

.circular-loop-card {
  position: relative;
  min-height: 23rem;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.loop-core,
.loop-node {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.16;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  background: var(--surface-fill);
  border: 1px solid var(--border);
}

.loop-core {
  width: 11.5rem;
  height: 11.5rem;
  background: radial-gradient(circle, var(--surface-accent-fill), var(--accent-gradient-strong));
  border-color: var(--surface-accent-border);
}

.loop-node {
  width: 8.2rem;
  min-height: 4.8rem;
}

.node-top {
  top: 0.75rem;
}

.node-right {
  right: 0.3rem;
}

.node-bottom {
  bottom: 2.4rem;
}

.node-left {
  left: 0.3rem;
}

.state-value-stack,
.community-stack {
  grid-template-columns: 1fr;
}

.compliance-board {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.compliance-row {
  display: grid;
  gap: 0.22rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: var(--surface-fill);
  border: 1px solid var(--surface-border);
}

.compliance-row strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.28;
}

.technology-layout {
  align-items: start;
}

.tech-card {
  display: grid;
  gap: 0.7rem;
  min-height: 18.5rem;
}

.tech-label {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
}

.tech-outcome {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.34;
  padding: 1rem 1.1rem;
  border-color: var(--surface-warm-border);
  background: linear-gradient(135deg, var(--warm-gradient-soft), var(--accent-gradient-strong));
}

.revenue-board h3 {
  margin-bottom: 0.25rem;
}

.revenue-bar {
  position: relative;
  overflow: hidden;
  padding: 0.62rem 0.8rem;
  border-radius: 18px;
  color: var(--text);
  font-weight: 600;
}

.revenue-bar span {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 0.88rem;
  line-height: 1.24;
}

.revenue-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
}

.revenue-bar-a::before {
  background: linear-gradient(90deg, rgba(23, 136, 111, 0.72), rgba(23, 136, 111, 0.18));
}

.revenue-bar-b::before {
  background: linear-gradient(90deg, rgba(177, 121, 30, 0.78), rgba(177, 121, 30, 0.18));
}

.revenue-bar-c::before {
  background: linear-gradient(90deg, rgba(47, 115, 183, 0.76), rgba(47, 115, 183, 0.18));
}

.revenue-bar-d::before {
  background: linear-gradient(90deg, rgba(189, 102, 84, 0.74), rgba(189, 102, 84, 0.16));
}

.timeline-panel {
  gap: 0.75rem;
  padding-left: 1.9rem;
}

.timeline-step {
  position: relative;
  padding-left: 1.05rem;
  overflow: visible;
}

.timeline-step span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -1.02rem;
  top: 50%;
  bottom: calc(-50% - 0.75rem);
  width: 2px;
  background: var(--timeline-line);
}

.timeline-step::after {
  content: "";
  position: absolute;
  left: -1.38rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--timeline-glow);
}

.timeline-step.final::before {
  display: none;
}

.appendix-card,
.qa-card {
  display: grid;
  gap: 0.45rem;
}

.appendix-slide .glow-panel,
.appendix-slide .qa-card {
  align-self: start;
}

.remote-body {
  padding: 1rem;
}

.remote-shell {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.remote-header,
.remote-top-grid,
.remote-grid {
  display: grid;
  gap: 1rem;
}

.remote-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.remote-top-grid,
.remote-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.remote-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.remote-controls button {
  min-height: 3.4rem;
  border: 0;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-fill-strong);
}

.remote-controls button.primary {
  color: var(--button-primary-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.remote-slide-preview {
  min-height: 9rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface-fill-soft);
  overflow: hidden;
}

.remote-slide-preview h1 {
  font-size: 1.55rem;
}

.remote-slide-preview h2 {
  font-size: 1.3rem;
}

.remote-slide-preview h3 {
  font-size: 1rem;
}

.remote-slide-preview p,
.remote-slide-preview li,
#speaker-notes,
#speaker-notes p,
#speaker-notes li {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
}

.remote-slide-preview .hero-layout,
.remote-slide-preview .matrix-layout,
.remote-slide-preview .two-column-layout,
.remote-slide-preview .technology-layout,
.remote-slide-preview .appendix-grid,
.remote-slide-preview .qa-grid {
  grid-template-columns: 1fr;
}

.remote-slide-preview .feedstock-table th,
.remote-slide-preview .feedstock-table td {
  padding: 0.28rem 0.32rem;
  font-size: 0.58rem;
}

#speaker-notes {
  display: grid;
  gap: 0.75rem;
}

#speaker-notes p,
#speaker-notes ul,
#speaker-notes ol {
  margin: 0;
}

#speaker-notes ul,
#speaker-notes ol {
  display: grid;
  gap: 0.38rem;
  padding-left: 1rem;
}

#speaker-notes .notes-lead,
#speaker-notes .notes-callout {
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background: var(--surface-accent-fill);
  border: 1px solid var(--surface-accent-border);
}

#speaker-notes .notes-callout {
  background: var(--surface-warm-fill);
  border-color: var(--surface-warm-border);
}

#speaker-notes .notes-close {
  padding-top: 0.2rem;
  border-top: 1px solid var(--surface-border);
}

@media (max-width: 1180px) {
  .matrix-layout,
  .hero-layout,
  .two-column-layout,
  .technology-layout,
  .appendix-grid,
  .qa-grid,
  .remote-top-grid,
  .remote-grid {
    grid-template-columns: 1fr;
  }

  .tech-outcome {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .driver-grid,
  .metric-grid,
  .remote-command-grid {
    grid-template-columns: 1fr;
  }

  .reveal h1 {
    font-size: 2.7rem;
  }

  .reveal h2 {
    font-size: 1.85rem;
  }

  .statement-line {
    font-size: 1rem;
  }
}
