:root {
  --purple: #371745;
  --purple-2: #4b2c4d;
  --purple-3: #6e426c;
  --red: #c23939;
  --orange: #ff8a31;
  --green: #5cc44b;
  --green-dark: #003032;
  --cream: #f1ede4;
  --paper: #f6f3ec;
  --yellow: #f2c94c;
  --ink: #211927;
  --shadow: 0 18px 48px rgba(24, 14, 30, 0.22);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
.stage {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--purple);
  color: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.stage {
  position: relative;
}

.screen {
  min-height: 100vh;
  padding: clamp(28px, 4vw, 64px);
  background: var(--screen-bg, var(--purple));
  color: var(--screen-fg, var(--cream));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.screen--paper {
  --screen-bg: var(--paper);
  --screen-fg: var(--ink);
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
}

.kicker,
.tag,
.pill,
.footer,
.small {
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 800;
  letter-spacing: 0;
}

.kicker,
.footer {
  opacity: 0.82;
}

.title {
  margin: 0;
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(48px, 7.2vw, 108px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  max-width: 1140px;
}

.title .accent {
  color: var(--yellow);
}

.content {
  display: grid;
  align-content: center;
  gap: clamp(20px, 3vw, 40px);
}

.cover .content,
.close .content {
  align-content: end;
}

.cover__subtitle {
  color: var(--yellow);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 900;
  margin: 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.hub-card,
.card,
.decision-card,
.overlay {
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hub-card {
  border: 0;
  min-height: 190px;
  padding: 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hub-card:hover,
.hub-card:focus-visible,
.nav-button:hover,
.decision-card:hover {
  transform: translateY(-3px);
}

.hub-card__label {
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 0.92;
  text-transform: uppercase;
}

.hub-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--red);
}

.status-dot.is-done {
  background: var(--green);
}

.slide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
}

.bullets {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullets li {
  position: relative;
  padding-left: 34px;
  font-size: clamp(19px, 2.1vw, 31px);
  line-height: 1.18;
  font-weight: 750;
}

.bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--yellow);
}

.card {
  padding: clamp(20px, 2.5vw, 32px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  padding: 22px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
}

.stat__value {
  color: var(--red);
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(54px, 7vw, 92px);
  line-height: 0.9;
  text-transform: uppercase;
}

.stat__label {
  margin-top: 8px;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 800;
}

.matrix,
.timeline,
.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

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

.matrix .card h3,
.timeline .card h3,
.decision-card h3 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 32px);
}

.matrix .card p,
.timeline .card p,
.decision-card p {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.28;
  font-weight: 650;
}

.decision-card {
  border: 3px solid transparent;
  padding: clamp(20px, 2.4vw, 30px);
  text-align: left;
  cursor: pointer;
  min-height: 230px;
}

.decision-card.is-selected {
  border-color: var(--green);
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-dark);
  text-transform: uppercase;
}

.tag--risk {
  background: var(--red);
  color: var(--cream);
}

.poll-box {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.qr {
  width: min(34vh, 360px);
  min-width: 260px;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.poll-title {
  color: var(--cream);
  text-align: center;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
}

.poll-actions,
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-button,
.icon-button {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--cream);
  cursor: pointer;
  font-weight: 900;
}

.icon-button {
  min-width: 44px;
  padding: 8px 14px;
  font-size: 24px;
}

.ghost {
  background: rgba(246, 243, 236, 0.14);
  color: var(--cream);
  border: 1px solid rgba(246, 243, 236, 0.3);
}

.drill-button {
  border: 0;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
  width: fit-content;
}

.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(21, 10, 27, 0.72);
  display: grid;
  place-items: center;
  padding: 28px;
  z-index: 10;
}

.overlay {
  width: min(840px, 92vw);
  padding: clamp(24px, 4vw, 42px);
}

.overlay h2 {
  margin: 0 0 14px;
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(36px, 5vw, 62px);
  text-transform: uppercase;
}

.overlay p {
  margin: 0 0 20px;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.28;
  font-weight: 650;
}

.notes {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(560px, calc(100vw - 40px));
  max-height: min(70vh, 620px);
  background: #111;
  color: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  z-index: 12;
  overflow: hidden;
}

.notes__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #222;
}

.notes__body {
  padding: 20px;
  font-size: 20px;
  line-height: 1.35;
  overflow: auto;
}

.blackout {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 20;
}

.timer {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 9;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 900;
}

.compliance {
  max-width: 900px;
  font-size: clamp(13px, 1.25vw, 16px);
  opacity: 0.82;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .screen {
    min-height: 100svh;
  }

  .hub-grid,
  .slide-grid,
  .matrix,
  .timeline,
  .stats {
    grid-template-columns: 1fr;
  }

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

  .hub-card {
    min-height: 132px;
  }

  .qr {
    width: min(62vw, 340px);
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  .screen {
    padding: clamp(24px, 3vw, 42px);
    gap: 14px;
  }

  .slide-grid {
    gap: clamp(18px, 3vw, 36px);
  }

  .slide-grid .title {
    font-size: clamp(42px, 5.35vw, 76px);
  }

  .slide-grid .bullets li {
    font-size: clamp(17px, 1.65vw, 24px);
  }

  .decision-card {
    min-height: 176px;
    padding: 18px;
  }

  .decision-card h3 {
    font-size: clamp(20px, 1.9vw, 26px);
  }

  .decision-card p {
    font-size: clamp(15px, 1.35vw, 19px);
  }

  .qr {
    width: min(31vh, 300px);
    min-width: 236px;
  }

  .poll-box {
    gap: 10px;
  }
}

@media print {
  body {
    overflow: visible;
    background: #fff;
  }

  .screen {
    break-after: page;
    min-height: 100vh;
  }

  .nav,
  .notes,
  .blackout,
  .timer,
  .poll-actions {
    display: none !important;
  }
}
