:root {
  --ink: #14211d;
  --muted: #61706a;
  --faint: #89958f;
  --cream: #f8f6ef;
  --paper: #fffefa;
  --soft: #edf3ef;
  --line: rgba(20, 33, 29, 0.14);
  --line-strong: rgba(20, 33, 29, 0.23);
  --water: #0b91bd;
  --water-dark: #087599;
  --green: #159b63;
  --green-soft: #e1f4e8;
  --yellow: #d49417;
  --yellow-soft: #fff1cc;
  --red: #c94339;
  --red-soft: #fbe5e2;
  --unknown: #87948e;
  --shadow: 0 16px 44px rgba(24, 43, 36, 0.11);
  --shadow-soft: 0 8px 26px rgba(24, 43, 36, 0.08);
  --radius: 18px;
  --radius-small: 11px;
  --type-caption: clamp(11px, 0.88vw, 13px);
  --type-label: clamp(12px, 1vw, 14px);
  --type-small: clamp(14px, 1.12vw, 16px);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
html { background: var(--cream); }
body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(11, 145, 189, 0.07), transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(21, 155, 99, 0.06), transparent 28%),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, blockquote, figure, pre { margin: 0; }
h1, h2, h3, strong, b { letter-spacing: -0.025em; }

h1 {
  max-width: 1180px;
  font-size: clamp(68px, 9.2vw, 132px);
  line-height: 0.9;
  font-weight: 880;
}

h2 {
  max-width: 1220px;
  font-size: clamp(38px, 4.8vw, 69px);
  line-height: 1.01;
  font-weight: 850;
}

h3 {
  font-size: clamp(21px, 2.2vw, 31px);
  line-height: 1.12;
  font-weight: 820;
}

p, li {
  color: var(--muted);
  font-size: clamp(17px, 1.65vw, 24px);
  line-height: 1.34;
}

small { color: var(--muted); }
a { color: inherit; }

.deck {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 1.55vh, 17px);
  padding: clamp(26px, 3.8vw, 58px) clamp(30px, 4.5vw, 70px) clamp(22px, 3vw, 44px);
  overflow: hidden;
}

.slide.active { display: grid; }

.slide-header,
.slide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.slide-header {
  position: relative;
  min-height: 43px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.slide-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 108px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--water), var(--green));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 860;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.eyebrow {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 720;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.content {
  align-self: center;
  display: grid;
  gap: clamp(16px, 2.2vh, 25px);
  min-width: 0;
  min-height: 0;
}

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.9);
  box-shadow: var(--shadow-soft);
}

.slide-footer {
  min-height: 18px;
  padding-right: 210px;
  color: var(--muted);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 720;
}

.progress {
  width: min(290px, 30vw);
  height: 4px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(20, 33, 29, 0.12);
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--water));
  transition: width 180ms ease;
}

.data-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: var(--type-caption);
  font-weight: 820;
  white-space: nowrap;
}

.data-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--unknown);
}

.data-state.is-live {
  color: var(--green);
  border-color: rgba(21, 155, 99, 0.25);
  background: var(--green-soft);
}

.data-state.is-live::before { background: var(--green); }

.data-state.is-fallback {
  color: #8c6411;
  border-color: rgba(212, 148, 23, 0.28);
  background: var(--yellow-soft);
}

.data-state.is-fallback::before { background: var(--yellow); }

.data-state.is-stale {
  color: var(--red);
  border-color: rgba(201, 67, 57, 0.26);
  background: var(--red-soft);
}

.data-state.is-stale::before { background: var(--red); }

.controls {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 20;
  display: flex;
  gap: 7px;
  opacity: 0.62;
  transition: opacity 160ms ease;
}

.controls:hover,
.controls:focus-within { opacity: 1; }

html:fullscreen .controls { opacity: 0.18; }
html:fullscreen .controls:hover,
html:fullscreen .controls:focus-within { opacity: 1; }

.controls button {
  appearance: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  font: 800 20px/1 system-ui, sans-serif;
  cursor: pointer;
}

.controls button:focus-visible {
  outline: 3px solid rgba(11, 145, 189, 0.35);
  outline-offset: 2px;
}

.controls .presentation-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--water-dark);
  font-size: 14px;
}

.presentation-toggle > span { font-size: 19px; line-height: 1; }
.presentation-toggle > b { font: inherit; font-weight: 800; }
.presentation-toggle[aria-pressed="true"] { color: #fff; border-color: var(--water); background: var(--water); }

.speaker-note {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 72px;
  z-index: 50;
  display: none;
  max-height: 38vh;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #eef7f3;
  background: rgba(18, 31, 27, 0.97);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  line-height: 1.48;
}

body.show-notes .speaker-note { display: block; }

.speaker-note .sources {
  display: block;
  margin-top: 8px;
  color: #abc4bb;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.status-green { color: var(--green) !important; }
.status-yellow { color: var(--yellow) !important; }
.status-red { color: var(--red) !important; }
.status-unknown { color: var(--unknown) !important; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .deck { height: auto; min-height: 100vh; }
  .slide {
    position: relative;
    min-height: 100vh;
    padding: 22px;
    overflow: visible;
  }
  .slide:not(.active) { display: none; }
  .slide-header { align-items: flex-start; }
  .header-meta { align-items: flex-end; flex-direction: column-reverse; gap: 5px; }
  .eyebrow { max-width: 54vw; }
  .slide-footer { padding-right: 0; }
  .progress { width: 32vw; }
  .controls { display: none; }
}

@media print {
  @page { size: landscape; margin: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { width: auto; height: auto; overflow: visible; background: #fff; }
  .deck { width: auto; height: auto; }
  .slide {
    position: relative;
    display: grid !important;
    width: 100vw;
    height: 100vh;
    padding: 28px 42px 24px;
    overflow: hidden;
    break-after: page;
    background: var(--cream);
  }
  .slide-header { align-items: center; }
  .header-meta { align-items: center; flex-direction: row; gap: 12px; }
  .eyebrow { max-width: none; }
  .slide-footer { padding-right: 0; }
  .speaker-note,
  .controls { display: none !important; }
}
