/* =========================
   Viewer Shell (UPDATED)
   ========================= */

:root {
  --controls-h: 72px;
}

/* RECAP GRID FOR DIMENSION SUMMARY SLIDES */
.recap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    align-content: start;
}
.recap-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-left: 4px solid #22d3ee;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
}
.recap-card.nusa-recap-card {
    border-color: rgba(16, 185, 129, 0.2);
    border-left-color: #10b981;
}
.recap-card h4 {
    font-size: 15px;
    color: #22d3ee;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.recap-card.nusa-recap-card h4 { color: #10b981; }
.recap-card ul {
    list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px;
}
.recap-card li {
    font-size: 13px; color: #cbd5e1; line-height: 1.4; display: flex; align-items: flex-start;
}
.recap-card li span {
    font-weight: 800; color: #f8fafc; margin-right: 8px; white-space: nowrap;
}

/* Zoom/pan usability */
#stage {
  cursor: grab;
  touch-action: none; /* needed for custom pinch/pan (we'll handle) */
}
#stage.is-panning {
  cursor: grabbing;
}

#slide-frame {
  position: absolute;
  top: 0;
  left: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #020617;
  font-family: Inter, sans-serif;
  overflow: hidden; /* slide-like behavior */
}

#app {
  height: 100%;
  width: 100%;
  position: relative;
}

/* Stage takes the whole viewport */
#stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0; /* no reserved space now */
}

#slide-frame {
  transform-origin: top left;
  will-change: transform;
}

/* Controls are an overlay */
#controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: var(--controls-h);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;

  background: rgba(2, 6, 23, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);

  /* hide/show animation */
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

/* When visible */
#app.controls-visible #controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.controls-left {
  display: flex;
  gap: 10px;
  align-items: center;
}
.controls-center {
  display: flex;
  justify-content: center;
}
.controls-right {
  display: flex;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;

  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;

  font-weight: 600;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn:active {
  transform: translateY(1px);
}

.counter {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hide the source slides bucket */
#slides-source {
  display: none;
}

/* =========================
   Your Original Deck CSS (PASTE AS-IS)
   (I kept it exactly, but removed body padding/grid since viewer controls it)
   ========================= */

/* CORE DESIGN SYSTEM - MCKINSEY / BCG STYLE */
.slide-container {
  align-items: flex-start;
  background-color: #0f172a;
  border-radius: 12px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  font-family: "Inter", sans-serif;
  height: 720px;
  justify-content: flex-start;
  overflow: hidden;
  padding: 50px 60px;
  position: relative;
  width: 1280px;
  color: #f8fafc;
}

/* BACKGROUND DECORATION */
.slide-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(34, 211, 238, 0.05) 0%,
      transparent 40%
    ),
    linear-gradient(135deg, rgba(15, 23, 42, 1) 0%, rgba(2, 6, 23, 1) 100%);
  z-index: 0;
}

.slide-container > * {
  position: relative;
  z-index: 1;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
  font-family: "Urbanist", sans-serif;
  margin: 0;
  line-height: 1.2;
}

.slide-header {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator-badge {
  background: #22d3ee;
  color: #020617;
  font-size: 24px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  margin-right: 20px;
}
.indicator-badge.nusa {
  background: #10b981;
}

.slide-title {
  font-size: 28px;
  font-weight: 700;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

p {
  font-size: 16px;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 15px;
}

/* CONTENT LAYOUTS */
.content-area {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.layout-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  height: 100%;
  width: 100%;
}

/* LEFT COLUMN (EXPLANATION & RATIONALE) */
.left-col {
  display: flex;
  flex-direction: column;
  padding-right: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  font-size: 14px;
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  font-weight: 600;
}
.nusa-text {
  color: #10b981;
}

.rationale-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #22d3ee;
  margin-top: 20px;
}
.rationale-box.nusa-box {
  border-left-color: #10b981;
}
.rationale-box h4 {
  color: #22d3ee;
  font-size: 16px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.rationale-box.nusa-box h4 {
  color: #10b981;
}
.rationale-box p {
  font-size: 14px;
  font-style: italic;
  color: #cbd5e1;
  margin: 0;
}

/* RIGHT COLUMN (SURVEY ITEMS) */
.right-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.survey-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.survey-list li {
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 16px;
  color: #f8fafc;
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
}
.survey-list.nusa-list li {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.item-code {
  font-weight: 800;
  color: #22d3ee;
  margin-right: 15px;
  font-size: 16px;
  white-space: nowrap;
}
.survey-list.nusa-list .item-code {
  color: #10b981;
}

/* PAGINATED TABLES (NO SCROLL) */
.paginated-table-container {
  width: 100%;
  flex-grow: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  background: #1e293b;
  color: #f8fafc;
  padding: 12px 20px;
  font-size: 13px;
  text-transform: uppercase;
  border-bottom: 2px solid #22d3ee;
}
.nusa-th {
  border-bottom: 2px solid #10b981;
}
td {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  vertical-align: middle;
  color: #cbd5e1;
}

.dim-tag {
  font-weight: 700;
  color: #22d3ee;
  font-size: 14px;
}
.nusa-dim-tag {
  font-weight: 700;
  color: #10b981;
  font-size: 14px;
}

/* SEPARATORS & SPECIAL SLIDES */
.separator-slide {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}
.separator-slide.nusa-sep {
  background: linear-gradient(135deg, #022c22 0%, #064e3b 100%);
}
.separator-slide h1 {
  font-size: 64px;
  letter-spacing: -2px;
  margin-bottom: 15px;
}
.sub-label {
  font-size: 18px;
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 6px;
  font-weight: 600;
  margin-bottom: 10px;
}
.nusa-sep .sub-label {
  color: #10b981;
}

/* FRAMEWORK BOXES */
.framework-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
  width: 100%;
  z-index: 1;
}
.index-box {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.index-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}
.tag {
  background: #22d3ee;
  color: #0f172a;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 800;
  margin-right: 15px;
  font-size: 16px;
}
.index-header h3 {
  font-size: 24px;
  color: #f8fafc;
}
.dim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.dim-item {
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #cbd5e1;
}
.dim-item strong {
  display: block;
  color: #22d3ee;
  font-size: 16px;
  margin-bottom: 5px;
}

/* WATERMARK ICONS */
.watermark {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 300px;
  color: rgba(255, 255, 255, 0.02);
  z-index: 0;
  pointer-events: none;
}
.page-num {
  position: absolute;
  bottom: 20px;
  right: 40px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 1px;
}
