/* SAF Presentations: Shared Styles */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 10pt;
  line-height: 1.55;
  color: #1f2937;
  background: #fff;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
}
@media print {
  .print-bar { display: none; }
  body { padding: 0; max-width: 100%; }
  .slide { page-break-inside: avoid; }
}
.doc-header {
  border-bottom: 3px solid #0078d4;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.doc-header h1 { margin: 0.25rem 0 0.5rem; font-size: 1.5rem; color: #0f172a; }
.program-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; font-weight: 600; }
.deck-tag { display: inline-block; background: #0078d4; color: #fff; font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.65rem; border-radius: 3px; margin-top: 0.35rem; letter-spacing: 0.04em; }
.print-bar { margin-bottom: 1.5rem; display: flex; gap: 0.75rem; align-items: center; }
.btn { display: inline-block; padding: 0.45rem 1rem; border-radius: 5px; font-size: 0.8rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: #0078d4; color: #fff; }
.btn-secondary { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.purpose-box { background: #f0f7ff; border-left: 4px solid #0078d4; padding: 0.8rem 1rem; border-radius: 0 5px 5px 0; margin-bottom: 1.5rem; font-size: 0.88rem; }

/* Slide outline */
.section-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: #9ca3af; border-top: 1px solid #e5e7eb; padding-top: 1rem; margin-top: 2rem;
}
.slide {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.85rem;
  background: #fafafa;
}
.slide-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.slide-num {
  font-size: 0.68rem; font-weight: 700; color: #0078d4;
  background: #e8f2fd; border-radius: 3px;
  padding: 0.1rem 0.45rem; flex-shrink: 0;
}
.slide-type {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: #9ca3af; flex-shrink: 0;
}
.slide h3 { font-size: 0.95rem; margin: 0; color: #1e293b; }
.slide ul { margin: 0.4rem 0 0 1.1rem; padding: 0; }
.slide li { margin-bottom: 0.2rem; font-size: 0.85rem; color: #374151; }
.slide-visual { font-size: 0.78rem; color: #6b7280; font-style: italic; margin-top: 0.5rem; }
.slide-visual::before { content: "Visual: "; font-weight: 600; font-style: normal; color: #0078d4; }
.slide-notes { font-size: 0.78rem; color: #374151; background: #fffbeb; border-left: 3px solid #f59e0b; padding: 0.4rem 0.65rem; border-radius: 0 3px 3px 0; margin-top: 0.5rem; }
.slide-notes::before { content: "Speaker note: "; font-weight: 600; }

/* Problem statement */
.ps-section { margin-bottom: 1.5rem; }
.ps-section h2 { font-size: 1rem; color: #0078d4; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.3rem; margin-bottom: 0.65rem; }
.ps-section p { margin: 0 0 0.5rem; font-size: 0.9rem; }
.metric-row { display: flex; gap: 1rem; margin-top: 0.75rem; }
.metric-card { flex: 1; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0.65rem 0.75rem; background: #f8fafc; }
.metric-card strong { display: block; font-size: 0.78rem; color: #0078d4; margin-bottom: 0.2rem; }
.doc-footer {
  margin-top: 2.5rem; padding-top: 0.75rem; border-top: 1px solid #e2e8f0;
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: #9ca3af;
}
.deck-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
}
.deck-library-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.deck-library-card:hover {
  transform: translateY(-3px);
  border-color: #0078d4;
  box-shadow: 0 10px 24px rgba(15, 35, 58, 0.12);
}
.deck-library-card p { margin: 0.5rem 0 0; color: #5b6778; font-size: 0.82rem; }

/* Full-screen presenter experience. The original outline remains printable
   and readable when JavaScript is unavailable. */
.deck-ready {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #081427;
  color: #f4f7fb;
  font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif;
}
.deck-ready > .doc-header,
.deck-ready > .print-bar,
.deck-ready > .purpose-box,
.deck-ready > .section-label,
.deck-ready > .doc-footer { display: none; }
.deck-shell { min-height: 100vh; display: grid; grid-template-rows: 58px 1fr 54px; }
.deck-topbar,
.deck-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(8, 20, 39, 0.94);
  border-color: #203c5f;
  z-index: 20;
}
.deck-topbar { border-bottom: 1px solid #203c5f; }
.deck-controls { border-top: 1px solid #203c5f; }
.deck-brand { color: #6fbbf1; text-decoration: none; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.deck-brand span { color: #8ca3bf; margin-left: 0.35rem; }
.deck-title { color: #aebdd0; font-size: 0.78rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; text-align: center; }
.deck-actions { display: flex; gap: 0.35rem; }
.deck-actions button,
.deck-controls button {
  border: 1px solid #294b72;
  background: #102744;
  color: #dce8f5;
  border-radius: 5px;
  padding: 0.38rem 0.65rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
}
.deck-controls button { font-size: 1.05rem; width: 38px; height: 32px; padding: 0; }
.deck-actions button:hover,
.deck-controls button:hover { border-color: #5bb3ee; background: #153356; }
.deck-stage { min-height: 0; position: relative; overflow: hidden; }
.deck-ready .slide {
  display: none;
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(3rem, 9vw, 9rem);
  background:
    linear-gradient(115deg, rgba(0,120,212,0.16), transparent 42%),
    linear-gradient(180deg, #0b1b32 0%, #081427 100%);
  overflow: auto;
}
.deck-ready .slide.active { display: block; animation: deck-enter 0.38s ease both; }
.deck-ready .slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 100%;
  background: linear-gradient(180deg, #29a3ee, #f2b84b);
}
.deck-ready .slide-header { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0.8rem; margin-bottom: clamp(2rem, 5vh, 4rem); }
.deck-ready .slide-num { background: #0f6cbd; color: #fff; font-size: 0.78rem; padding: 0.28rem 0.55rem; border-radius: 4px; }
.deck-ready .slide-type { color: #f2b84b; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; }
.deck-ready .slide h3 { grid-column: 1 / -1; color: #fff; font-size: clamp(2rem, 4.4vw, 4.4rem); line-height: 1.08; max-width: 1050px; margin-top: 0.7rem; font-weight: 720; }
.deck-ready .slide ul { margin: 0; max-width: 1050px; list-style: none; display: grid; gap: clamp(0.75rem, 2vh, 1.35rem); }
.deck-ready .slide li { color: #d3dfec; font-size: clamp(1.05rem, 1.65vw, 1.65rem); line-height: 1.4; padding-left: 1.5rem; position: relative; }
.deck-ready .slide li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #5bb3ee; position: absolute; left: 0; top: 0.62em; }
.deck-ready .slide strong { color: #fff; }
.deck-ready .slide-visual {
  margin-top: 2rem;
  max-width: 980px;
  border: 1px dashed #41658c;
  border-left: 4px solid #5bb3ee;
  background: rgba(20, 51, 86, 0.62);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  color: #acc4dc;
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
}
.deck-ready .slide-notes { display: none; }
.deck-ready.show-notes .slide.active .slide-notes {
  display: block;
  position: fixed;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 62px;
  z-index: 30;
  background: #fff7d8;
  color: #332b16;
  border-left: 5px solid #f2b84b;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
}
.deck-progress { flex: 1; height: 5px; background: #1b3554; border-radius: 4px; overflow: hidden; }
.deck-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #0f6cbd, #5bb3ee, #f2b84b); transition: width 0.25s ease; }
.deck-counter { color: #9eb1c8; font-size: 0.75rem; min-width: 52px; text-align: center; }
@keyframes deck-enter { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

.deck-ready.deck-overview { overflow: auto; }
.deck-overview .deck-shell { display: block; }
.deck-overview .deck-topbar { position: sticky; top: 0; height: 58px; }
.deck-overview .deck-controls { display: none; }
.deck-overview .deck-stage { padding: 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; overflow: visible; }
.deck-overview .slide {
  display: block;
  position: relative;
  inset: auto;
  aspect-ratio: 16 / 9;
  padding: 1.25rem;
  border: 1px solid #294b72;
  cursor: pointer;
  overflow: hidden;
}
.deck-overview .slide h3 { font-size: 1.2rem; }
.deck-overview .slide li { font-size: 0.62rem; }
.deck-overview .slide-header { margin-bottom: 0.75rem; }
.deck-overview .slide-visual,
.deck-overview .slide-notes { display: none !important; }
@media (max-width: 700px) {
  .deck-brand span, .deck-title { display: none; }
  .deck-ready .slide { padding: 2rem 1.7rem; }
  .deck-ready .slide h3 { font-size: clamp(1.6rem, 8vw, 2.5rem); }
  .deck-ready .slide li { font-size: 1rem; }
}
@media print {
  .deck-ready { background: #fff; overflow: visible; }
  .deck-ready .deck-shell { display: block; }
  .deck-ready .deck-topbar,
  .deck-ready .deck-controls { display: none; }
  .deck-ready .deck-stage { overflow: visible; }
  .deck-ready .slide {
    display: block !important;
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 7.2in;
    page-break-after: always;
    color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
