:root {
  color-scheme: light;
  --navy: #163a5f;
  --navy-dark: #0d2841;
  --orange: #ef4d16;
  --ink: #17212b;
  --muted: #607080;
  --line: #d5dfe7;
  --wash: #f1f5f8;
  --blue-wash: #e8f0f6;
  --orange-wash: #fff0e9;
  --green: #17683e;
  --green-wash: #e8f7ee;
  --red: #9f2a20;
  --red-wash: #fff0ef;
  --shadow: 0 18px 48px rgba(8, 28, 47, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.48;
}
a { color: var(--navy); }
button, .button-link {
  border: 0;
  border-radius: .7rem;
  cursor: pointer;
  font: inherit;
  font-weight: 780;
  padding: .68rem .92rem;
  text-decoration: none;
}
button:focus-visible, a:focus-visible { outline: 3px solid rgba(239, 77, 22, .35); outline-offset: 3px; }

/* Presentación */
.presentation-page {
  min-height: 100vh;
  background: radial-gradient(circle at 75% 10%, #244f78 0, var(--navy-dark) 42%, #081d2f 100%);
  color: #fff;
}
.deck-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  width: min(74rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: .8rem 0;
}
.deck-toolbar .brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.deck-toolbar img { width: 4.7rem; height: 2.4rem; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,.18)); }
.deck-toolbar strong, .deck-toolbar small { display: block; }
.deck-toolbar small { color: #b9c9d8; }
.toolbar-actions { display: flex; gap: .5rem; align-items: center; }
.toolbar-actions button, .toolbar-actions a { background: rgba(255,255,255,.11); color: #fff; border: 1px solid rgba(255,255,255,.2); }

.deck { width: calc(100% - 2rem); max-width: 74rem; margin: .2rem auto 5.7rem; overflow: hidden; }
.slide {
  position: relative;
  display: grid;
  align-content: start;
  aspect-ratio: 16 / 9;
  min-height: 41rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f5f8fa 100%);
  box-shadow: var(--shadow);
  color: var(--ink);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: clamp(2rem, 5vw, 4.2rem);
}
.slide + .slide { margin-top: 1.5rem; }
.js .slide[hidden] { display: none; }
.slide::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: .48rem;
  background: linear-gradient(90deg, var(--orange) 0 30%, var(--navy) 30% 100%);
}
.slide::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(22, 58, 95, .045);
}
.slide-cover {
  align-content: center;
  background: linear-gradient(125deg, var(--navy-dark), var(--navy) 62%, #275a84);
  color: #fff;
}
.slide-cover::before { background: var(--orange); }
.slide-cover::after { width: 33rem; height: 33rem; right: -9rem; bottom: -13rem; border: 3rem solid rgba(255,255,255,.045); background: transparent; }
.cover-logo { width: 10rem; max-height: 7rem; object-fit: contain; margin-bottom: 2rem; }
.kicker { margin: 0 0 .65rem; color: var(--orange); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.slide-cover .kicker { color: #ff9a73; }
.slide h1, .slide h2, .slide h3 { color: var(--navy); line-height: 1.08; }
.slide h1, .slide h2, .slide h3, .slide p, .topic-card { overflow-wrap: anywhere; }
.slide-cover h1, .slide-cover h2 { color: #fff; }
.slide h1 { max-width: 56rem; margin: .2rem 0 1.2rem; font-size: clamp(2.35rem, 5.3vw, 4.8rem); letter-spacing: -.045em; }
.slide h2 { max-width: 58rem; margin: .15rem 0 1.7rem; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.035em; }
.slide h3 { margin: 0 0 .55rem; font-size: 1.25rem; }
.slide p { font-size: 1.05rem; }
.lead { max-width: 55rem; color: #d9e5ee; font-size: clamp(1.08rem, 2vw, 1.4rem) !important; }
.cover-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
.cover-meta span { border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.08); padding: .36rem .72rem; font-size: .8rem; }

.slide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.slide-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topic-card {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: #fff;
  padding: 1.2rem 1.25rem;
}
.topic-card.accent { border-top: .32rem solid var(--orange); }
.topic-card.safe { background: var(--green-wash); border-color: #bfe4ce; }
.topic-card.stop { background: var(--red-wash); border-color: #efc5c1; }
.topic-card p, .topic-card li { font-size: .96rem; }
.topic-card ul, .topic-card ol { margin: .5rem 0 0; padding-left: 1.25rem; }
.topic-card li + li { margin-top: .35rem; }
.number-mark {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: .9rem;
  border-radius: .9rem;
  background: var(--orange-wash);
  color: var(--orange);
  font-size: 1.35rem;
  font-weight: 900;
}
.rule-banner {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  border-left: .38rem solid var(--orange);
  border-radius: .45rem;
  background: var(--orange-wash);
  color: #652510;
  padding: .9rem 1.1rem;
  font-size: 1.08rem;
  font-weight: 750;
}
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.do-dont > div { border-radius: .9rem; padding: 1.15rem 1.25rem; }
.do { background: var(--green-wash); border: 1px solid #b8e1c8; }
.dont { background: var(--red-wash); border: 1px solid #efc4bf; }
.do h3 { color: var(--green); }
.dont h3 { color: var(--red); }
.do-dont ul { margin-bottom: 0; padding-left: 1.2rem; }
.do-dont li + li { margin-top: .42rem; }
.sequence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; counter-reset: steps; }
.sequence > div { counter-increment: steps; border: 1px solid var(--line); border-radius: .85rem; background: #fff; padding: 1rem; }
.sequence > div::before { content: counter(steps); display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .6rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 900; }
.big-message { max-width: 58rem; margin: 1.5rem auto 0; text-align: center; color: var(--navy); font-size: clamp(1.55rem, 3.4vw, 2.7rem) !important; font-weight: 850; line-height: 1.2; }
.source-line {
  position: absolute;
  z-index: 2;
  left: clamp(2rem, 5vw, 4.2rem);
  right: clamp(2rem, 5vw, 4.2rem);
  bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .7rem;
  padding-top: .55rem;
}
.slide-cover .source-line { border-color: rgba(255,255,255,.2); color: #b9cad8; }

.deck-controls {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: .9rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(7, 27, 44, .92);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
  color: #fff;
  padding: .48rem;
  backdrop-filter: blur(10px);
}
.deck-controls button { min-width: 3rem; background: rgba(255,255,255,.11); color: #fff; }
.deck-counter { min-width: 5.1rem; text-align: center; font-size: .82rem; font-weight: 780; }
.deck-progress { position: fixed; z-index: 21; left: 0; bottom: 0; height: .25rem; background: var(--orange); transition: width .2s ease; }

.presentation-page.embedded { min-height: 100%; background: #fff; }
.presentation-page.embedded .deck-toolbar { display: none; }
.presentation-page.embedded .deck { width: 100%; max-width: none; margin: 0 0 4.3rem; }
.presentation-page.embedded .slide {
  min-height: calc(100vh - 4.3rem);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Manual */
.manual-page { background: #eef3f6; }
.manual-header { background: linear-gradient(125deg, var(--navy-dark), var(--navy)); color: #fff; }
.manual-header-inner { width: calc(100% - 2rem); max-width: 64rem; margin: 0 auto; padding: 2.1rem 0 2.5rem; }
.manual-brand { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.manual-brand img { width: 8rem; max-height: 5rem; object-fit: contain; }
.manual-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.manual-actions button, .manual-actions a { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; }
.manual-header h1 { max-width: 51rem; margin: 2rem 0 .7rem; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.045em; }
.manual-header p { max-width: 48rem; color: #d9e6ef; }
.document-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.document-meta span { border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .34rem .66rem; font-size: .78rem; }
.manual-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.2rem; width: calc(100% - 2rem); max-width: 64rem; margin: 1.2rem auto 4rem; align-items: start; }
.manual-toc { position: sticky; top: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: #fff; padding: 1rem; }
.manual-toc strong { display: block; color: var(--navy); margin-bottom: .5rem; }
.manual-toc ol { margin: 0; padding-left: 1.25rem; }
.manual-toc li + li { margin-top: .4rem; }
.manual-toc a { color: var(--muted); font-size: .82rem; text-decoration: none; }
.manual-toc a:hover { color: var(--orange); }
.manual-content { min-width: 0; }
.manual-section { border: 1px solid var(--line); border-radius: .95rem; background: #fff; box-shadow: 0 8px 22px rgba(22,58,95,.06); margin-bottom: 1rem; padding: clamp(1.2rem, 3.5vw, 2.2rem); }
.manual-section h2 { margin: 0 0 1rem; color: var(--navy); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.15; }
.manual-section h3 { margin-top: 1.35rem; color: var(--navy); }
.manual-section li + li { margin-top: .38rem; }
.manual-section .section-label { margin: 0 0 .5rem; color: var(--orange); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.manual-callout { border-left: .35rem solid var(--orange); border-radius: .4rem; background: var(--orange-wash); padding: .9rem 1rem; }
.manual-warning { border-left-color: var(--red); background: var(--red-wash); color: #5f1c17; }
.manual-checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem .9rem; padding: 0; list-style: none; }
.manual-checklist li { position: relative; border-radius: .55rem; background: var(--wash); padding: .7rem .75rem .7rem 2.2rem; }
.manual-checklist li::before { content: "✓"; position: absolute; left: .75rem; color: var(--green); font-weight: 900; }
.source-box { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: .8rem; color: var(--muted); font-size: .82rem; }
.source-list li { overflow-wrap: anywhere; }
.pending-list li::marker { color: var(--orange); }
.manual-footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); text-align: center; padding: 1.5rem 1rem 2.5rem; font-size: .82rem; }

@media (max-width: 760px) {
  .deck-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .deck-toolbar .brand div { display: none; }
  .toolbar-actions .manual-link { display: none; }
  .toolbar-actions .pdf-link { display: none; }
  .toolbar-actions [data-print] { display: none; }
  .toolbar-actions { margin-left: auto; }
  .deck { max-width: calc(100vw - 2rem); }
  .slide { aspect-ratio: auto; min-height: calc(100vh - 8.5rem); border-radius: .8rem; padding: 2rem 1.25rem 5rem; }
  .slide-grid, .slide-grid.three, .do-dont, .sequence { grid-template-columns: 1fr; }
  .slide h1 { font-size: 2.35rem; }
  .slide h2 { font-size: 2rem; }
  .source-line { left: 1.25rem; right: 1.25rem; bottom: 1rem; }
  .manual-header-inner, .manual-layout { max-width: calc(100vw - 2rem); }
  .manual-brand { display: grid; width: 100%; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: flex-start; }
  .manual-brand img { width: 5.5rem; }
  .manual-actions { justify-content: flex-end; }
  .manual-actions [data-print] { display: none; }
  .manual-actions .pdf-link { display: none; }
  .manual-actions .button-link { padding: .55rem .7rem; font-size: .84rem; }
  .manual-header h1 { overflow-wrap: anywhere; }
  .manual-header h1, .manual-header p { width: 100%; max-width: 100%; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-toc { position: static; }
  .manual-checklist { grid-template-columns: 1fr; }
}

@media print {
  .presentation-page { background: #fff; }
  .deck-toolbar, .deck-controls, .deck-progress { display: none !important; }
  .deck { width: auto; margin: 0; }
  .slide, .js .slide[hidden] {
    display: grid !important;
    width: 13.333in;
    height: 7.5in;
    min-height: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }
  .slide + .slide { margin-top: 0; }
  .manual-page { background: #fff; }
  .manual-header { background: var(--navy) !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .manual-actions, .manual-toc { display: none !important; }
  .manual-layout { display: block; width: auto; margin: 0; }
  .manual-content { width: auto; }
  .manual-section { border: 0; border-radius: 0; box-shadow: none; break-inside: avoid; margin: 0; padding: .6in .7in; }
  .manual-header-inner { width: auto; padding: .6in .7in; }
  .manual-footer { display: none; }
}
