/* =========================================================
   PRINCE2 Handout — Design tokens
   ========================================================= */
:root{
  --bg:            #0A1220;
  --bg-soft:       #0E1A2E;
  --panel:         #121F35;
  --panel-border:  rgba(148, 178, 214, 0.14);
  --line:          rgba(148, 178, 214, 0.16);

  --teal:          #2FE0C6;
  --teal-dim:      #1B8F7E;
  --teal-wash:     rgba(47, 224, 198, 0.10);

  --amber:         #F2A93B;
  --amber-wash:    rgba(242, 169, 59, 0.10);

  --text:          #EAF0F7;
  --text-mid:      #A9B7CC;
  --text-dim:      #6E7E97;

  --font-display:  'Space Grotesk', system-ui, sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'IBM Plex Mono', 'SFMono-Regular', monospace;

  --topbar-h:      68px;
  --footbar-h:     84px;
  --card-pad:      clamp(24px, 5vw, 72px);
  --radius:        18px;
}

*{ box-sizing: border-box; min-width: 0; overflow-wrap: break-word; }
html,body{ height: 100%; max-width: 100%; }
html{ overflow-x: hidden; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle ambient texture on the base background */
body::before{
  content:"";
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(47,224,198,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(242,169,59,0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

h1,h2,h3{ font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p{ margin: 0; }
button{ font-family: inherit; }
svg{ display:block; }

::selection{ background: var(--teal); color: #06110E; }

/* =========================================================
   TOPBAR + STAGE-GATE RAIL (signature nav element)
   ========================================================= */
.topbar{
  position: fixed; top:0; left:0; right:0; height: var(--topbar-h);
  display:flex; align-items:center; gap: 20px;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(10,18,32,0.96), rgba(10,18,32,0.86));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow: hidden;
  z-index: 50;
}
.brand{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.brand-mark{
  font-family: var(--font-mono); font-weight:600; font-size: 13px;
  color: var(--bg); background: var(--teal);
  padding: 4px 7px; border-radius: 6px; letter-spacing: 0.02em;
}
.brand-name{ font-size: 14px; font-weight:600; color: var(--text-mid); display:none; }

.gate-rail{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}
.gate-seg{
  position: relative;
  flex: 1 1 0;
  height: 100%;
  display:flex; align-items:center;
  cursor: pointer;
  min-width: 10px;
}
.gate-seg-track{
  position:relative;
  width:100%; height: 4px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.gate-seg-fill{
  position:absolute; left:0; top:0; bottom:0;
  width: 0%;
  background: var(--teal);
  border-radius: 3px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
}
.gate-seg-label{
  position:absolute; top: calc(50% + 10px); left:0;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--text-dim); white-space:nowrap;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease, color .2s ease;
  pointer-events:none;
}
.gate-seg.is-active .gate-seg-label{ opacity: 1; transform: translateY(0); color: var(--teal); }
.gate-seg:hover .gate-seg-label{ opacity: 1; transform: translateY(0); }
.gate-seg.is-active .gate-seg-track{ background: rgba(47,224,198,0.22); }

.toc-btn{
  flex-shrink:0;
  display:flex; align-items:center; gap:7px;
  background: var(--panel); border: 1px solid var(--panel-border);
  color: var(--text-mid);
  padding: 8px 12px 8px 10px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600;
  cursor:pointer; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.toc-btn svg{ width:16px; height:16px; }
.toc-btn:hover{ border-color: var(--teal); color: var(--text); }

/* =========================================================
   TOC OVERLAY
   ========================================================= */
.toc-overlay{
  position: fixed; inset:0; z-index: 90;
  background: rgba(6,11,20,0.72);
  backdrop-filter: blur(6px);
  display:flex; align-items:center; justify-content:center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease;
  padding: 24px;
}
.toc-overlay.is-open{ opacity: 1; visibility: visible; }
.toc-panel{
  width: min(720px, 100%);
  max-height: min(80vh, 640px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 8px;
  display:flex; flex-direction:column;
  transform: translateY(10px) scale(.98);
  transition: transform .25s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.toc-overlay.is-open .toc-panel{ transform: translateY(0) scale(1); }
.toc-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 18px 12px;
}
.toc-head h2{ font-size: 18px; }
.toc-close{
  width: 32px; height:32px; border-radius:8px;
  background: transparent; border: 1px solid var(--panel-border);
  color: var(--text-mid); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.toc-close svg{ width:16px; height:16px; }
.toc-close:hover{ color: var(--text); border-color: var(--teal); }
.toc-list{ overflow-y:auto; padding: 4px 10px 16px; }
.toc-chapter{ margin-top: 14px; }
.toc-chapter:first-child{ margin-top: 0; }
.toc-chapter-label{
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); padding: 6px 8px; display:block;
}
.toc-item{
  display:flex; align-items:center; gap: 12px;
  width:100%; text-align:left;
  padding: 10px 8px; border-radius: 10px;
  background: transparent; border: none;
  color: var(--text-mid); cursor:pointer;
  font-size: 14.5px;
  transition: background .12s ease, color .12s ease;
}
.toc-item:hover{ background: var(--teal-wash); color: var(--text); }
.toc-item-num{ font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); width: 22px; flex-shrink:0; }

/* =========================================================
   DECK + CARDS
   ========================================================= */
.deck{
  position: relative;
  height: 100vh;
  padding-top: var(--topbar-h);
  padding-bottom: var(--footbar-h);
}
.card{
  position: absolute;
  inset: 0;
  top: var(--topbar-h);
  bottom: var(--footbar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(40px);
  visibility: hidden;
  transition: opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100vw;
  z-index: 1;
}
.card.is-active{
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  z-index: 2;
}
.card.is-prev{ transform: translateX(-40px); }

.card-inner{
  width: min(880px, 100%);
  margin: auto;
  padding: 40px var(--card-pad);
}

.eyebrow{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
h2{ font-size: clamp(26px, 4vw, 38px); margin-bottom: 16px; line-height: 1.15; }
.lede{ font-size: clamp(15px, 1.6vw, 18px); color: var(--text-mid); line-height: 1.6; max-width: 60ch; }
.callout{
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--teal-wash);
  border-left: 2px solid var(--teal);
  border-radius: 0 10px 10px 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
}
.footnote{ display:block; margin-top: 22px; font-size: 11.5px; color: var(--text-dim); font-family: var(--font-mono); }

/* animate content-in on active card */
.card.is-active .card-inner > *{
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
.card.is-active .card-inner > *:nth-child(1){ animation-delay: .02s; }
.card.is-active .card-inner > *:nth-child(2){ animation-delay: .08s; }
.card.is-active .card-inner > *:nth-child(3){ animation-delay: .14s; }
.card.is-active .card-inner > *:nth-child(4){ animation-delay: .20s; }
.card.is-active .card-inner > *:nth-child(5){ animation-delay: .26s; }
@keyframes rise{ from{ opacity:0; transform: translateY(10px); } to{ opacity:1; transform: translateY(0); } }

/* =========================================================
   HERO CARD
   ========================================================= */
.card--hero{ text-align:center; }
.hero-bg{ position:absolute; inset:0; overflow:hidden; z-index:0; pointer-events:none; }
.hero-grid{
  position:absolute; inset:-20%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 75%);
}
.hero-inner{ position:relative; z-index:1; margin: auto; text-align:center; }
.hero-title{
  font-size: clamp(52px, 12vw, 108px);
  line-height: 0.92;
  background: linear-gradient(180deg, #FFFFFF, #B9C9DC);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title-sub{
  display:block;
  font-size: clamp(20px, 3vw, 30px);
  color: var(--teal);
  -webkit-text-fill-color: var(--teal);
  font-weight: 500;
  margin-top: 6px;
  letter-spacing: 0.01em;
}
.hero-lede{ font-size: clamp(15px, 1.8vw, 19px); color: var(--text-mid); max-width: 46ch; margin: 22px auto 0; line-height: 1.6; }
.hero-hint{
  margin: 40px auto 0; display:inline-flex; align-items:center; gap:8px;
  color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono);
}
.hero-hint svg{ width:14px; height:14px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge{ 0%,100%{ transform: translateX(0);} 50%{ transform: translateX(4px);} }

/* =========================================================
   DEFINITION CARD
   ========================================================= */
.card--definition .card-inner{ text-align:center; }
.acronym-line{
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 34px);
  color: var(--text-mid);
  line-height: 1.5;
  font-weight: 500;
}
.acr{ color: var(--teal); font-weight: 700; }
.acr-suffix{ color: var(--amber); font-weight:700; vertical-align: super; font-size: 0.55em; margin-left: 2px; }
.pull-quote{
  margin: 34px 0 0; font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 27px); font-weight: 500;
  color: var(--text); line-height: 1.45; font-style: normal;
  border-top: 1px solid var(--line); padding-top: 30px;
}

/* =========================================================
   CHIP ROW (compact facts — Was ist PRINCE2)
   ========================================================= */
.chip-row{ margin-top: 26px; display:flex; flex-wrap:wrap; gap: 10px; }
.chip{
  font-size: 13px; color: var(--text-mid);
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 100px; padding: 8px 14px;
}
.chip b{ color: var(--teal); font-weight: 600; margin-right: 5px; }

/* =========================================================
   COMPACT GRID (7 Prinzipien / 7 Themen)
   ========================================================= */
.card--divider-slim .chapter-number{ margin-bottom: 10px; }
.card--divider-slim h2{ font-size: clamp(24px, 3.6vw, 34px); }
.card--divider-slim .lede{ margin-bottom: 4px; }
.compact-grid{
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.compact-item{
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px;
  padding: 16px 16px 17px;
  display:flex; flex-direction:column; gap: 4px;
  transition: border-color .18s ease, transform .18s ease;
}
.compact-item:hover{ border-color: var(--teal); transform: translateY(-2px); }
.compact-num{
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--teal); background: var(--teal-wash);
  width: 22px; height: 22px; border-radius: 6px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 6px;
}
.compact-tag{
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 4px;
}
.compact-item strong{ font-size: 14.5px; line-height:1.3; }
.compact-item p{ font-size: 12.5px; color: var(--text-mid); line-height: 1.45; }

/* =========================================================
   PROCESS COMPACT LIST (7 Prozesse, single card)
   ========================================================= */
.process-compact-list{
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.process-compact{
  background: var(--bg-soft); border: 1px solid var(--panel-border); border-radius: 14px;
  padding: 15px 16px;
  display:flex; flex-direction:column; gap: 5px;
}
.process-compact .process-code{
  align-self:flex-start;
  font-family: var(--font-mono); font-size: 11.5px; font-weight:600;
  color: var(--teal); background: var(--teal-wash);
  padding: 3px 8px; border-radius: 6px; margin-bottom: 2px;
}
.process-compact strong{ font-size: 14px; }
.process-compact p{ font-size: 12px; color: var(--text-mid); line-height: 1.45; }

.reason-grid--compact{ grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 10px; }
.reason-grid--compact li{ border-top:none; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; padding: 12px 14px; }
.reason-grid--compact strong{ font-size: 13.5px; font-weight: 600; }

/* =========================================================
   FEATURE LIST (Was ist PRINCE2)
   ========================================================= */
.feature-list{ list-style:none; margin: 30px 0 0; padding:0; display:flex; flex-direction:column; gap:20px; }
.feature-list li{ display:flex; gap:16px; align-items:flex-start; }
.ic{ width: 26px; height: 26px; flex-shrink:0; color: var(--teal); margin-top: 2px; }
.feature-list strong{ display:block; font-size:16px; margin-bottom:4px; }
.feature-list span{ color: var(--text-mid); font-size: 14.5px; line-height:1.5; }

/* =========================================================
   TIMELINE (Herkunft)
   ========================================================= */
.timeline{ margin-top: 32px; display:flex; flex-direction:column; gap: 0; border-left: 2px solid var(--line); padding-left: 28px; }
.timeline-item{ position:relative; padding-bottom: 26px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-dot{ position:absolute; left:-33px; top:4px; width:8px; height:8px; border-radius:50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-wash); }
.timeline-item strong{ display:block; font-family: var(--font-mono); font-size: 13px; color: var(--teal); margin-bottom: 4px; letter-spacing: 0.03em; }
.timeline-item span{ color: var(--text-mid); font-size: 14.5px; line-height: 1.5; }

/* =========================================================
   STAT CARD (Warum scheitern)
   ========================================================= */
.stat-row{ display:flex; align-items:center; gap: 36px; flex-wrap:wrap; margin: 26px 0 30px; }
.stat-figure{ display:flex; flex-direction:column; }
.stat-number{ font-family: var(--font-display); font-size: clamp(64px, 10vw, 92px); font-weight:700; color: var(--amber); line-height:1; }
.stat-caption{ font-size: 12.5px; color: var(--text-dim); max-width:16ch; margin-top:6px; }
.stat-text{ flex: 1; min-width: 240px; }
.reason-grid{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.reason-grid li{ border-top: 1px solid var(--line); padding-top: 12px; }
.reason-grid strong{ display:block; font-size:14.5px; margin-bottom:4px; }
.reason-grid span{ color: var(--text-mid); font-size: 13.5px; line-height:1.5; }

/* =========================================================
   DIVIDER / CHAPTER-OPENER CARDS
   ========================================================= */
.card--divider .card-inner{ text-align:left; }
.chapter-number{
  display:block; font-family: var(--font-mono); font-size: 15px; color: var(--text-dim);
  margin-bottom: 18px; letter-spacing: 0.05em;
}
.divider-title{ font-size: clamp(36px, 7vw, 64px); }
.card--divider .lede{ margin-top: 16px; }

/* =========================================================
   PILLAR GRID (Framework Überblick)
   ========================================================= */
.pillar-grid{ margin-top: 30px; display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pillar{
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 22px 18px; display:flex; flex-direction:column; gap: 6px;
  transition: border-color .2s ease, transform .2s ease;
}
.pillar:hover{ border-color: var(--teal); transform: translateY(-2px); }
.pillar-count{ font-family: var(--font-mono); font-size: 22px; color: var(--teal); font-weight:600; }
.pillar strong{ font-size: 15px; }
.pillar span{ font-size: 12.5px; color: var(--text-mid); line-height:1.5; }

/* =========================================================
   PRINCIPLES
   ========================================================= */
.principle-list{ display:flex; flex-direction:column; gap: 26px; margin-top: 24px; }
.principle{ display:flex; gap: 20px; }
.principle-num{
  font-family: var(--font-mono); font-size: 15px; font-weight:600;
  width: 40px; height: 40px; flex-shrink:0; border-radius: 10px;
  background: var(--teal-wash); color: var(--teal);
  display:flex; align-items:center; justify-content:center;
}
.principle strong{ display:block; font-size: 17px; margin-bottom: 6px; }
.principle p{ color: var(--text-mid); font-size: 14.5px; line-height: 1.6; max-width: 58ch; }
.principle-list--tight{ gap: 20px; }

/* =========================================================
   THEMES
   ========================================================= */
.theme-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 26px; }
.theme-q{ font-family: var(--font-mono); font-size: 11.5px; color: var(--amber); letter-spacing: 0.05em; text-transform: uppercase; }
.theme strong{ display:block; font-size: 19px; margin: 6px 0 10px; }
.theme p{ color: var(--text-mid); font-size: 14px; line-height: 1.6; }
.mini-list{ list-style:none; margin: 12px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.mini-list li{ font-size: 13px; color: var(--text-mid); padding-left: 14px; position:relative; line-height:1.5; }
.mini-list li::before{ content:""; position:absolute; left:0; top: 7px; width:5px; height:5px; border-radius:50%; background: var(--teal); }

/* =========================================================
   RISK STEPS
   ========================================================= */
.risk-steps{ margin-top: 30px; display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.risk-step{
  background: var(--amber-wash); border: 1px solid rgba(242,169,59,0.22); border-radius: 14px;
  padding: 18px 16px; display:flex; flex-direction:column; gap: 8px; font-size: 14.5px; font-weight:600;
}
.risk-step span{ font-family: var(--font-mono); font-size: 12px; color: var(--amber); font-weight:600; }
.risk-step small{ font-weight:400; color: var(--text-mid); font-size:12.5px; line-height:1.5; }

/* =========================================================
   PROCESSES
   ========================================================= */
.process-list{ display:flex; flex-direction:column; gap: 22px; margin-top: 26px; }
.process-list--compact{ gap: 18px; }
.process{ display:flex; gap: 18px; align-items:flex-start; }
.process-code{
  font-family: var(--font-mono); font-size: 13px; font-weight:600;
  background: var(--bg-soft); border: 1px solid var(--panel-border); color: var(--teal);
  padding: 7px 10px; border-radius: 8px; flex-shrink:0; letter-spacing:0.02em;
  min-width: 42px; text-align:center;
}
.process strong{ display:block; font-size: 15.5px; margin-bottom: 4px; }
.process p{ color: var(--text-mid); font-size: 13.5px; line-height: 1.55; max-width: 60ch; }

/* =========================================================
   COMPARISON TABLE
   ========================================================= */
.compare-table{ margin-top: 24px; display:flex; flex-direction:column; border-top: 1px solid var(--line); }
.ct-row{ display:grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ct-row span:first-child{ color: var(--text-dim); font-family: var(--font-mono); font-size: 11.5px; text-transform:uppercase; letter-spacing:0.04em; }
.ct-row span:nth-child(2){ color: var(--text); }
.ct-row span:nth-child(3){ color: var(--text-mid); }
.ct-head{ font-weight:600; }
.ct-head span{ font-family: var(--font-mono) !important; font-size: 11px !important; color: var(--teal) !important; text-transform: uppercase; letter-spacing: 0.05em; }

/* =========================================================
   COMBO GRID (PRINCE2 Agile)
   ========================================================= */
.combo-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 28px 0; }
.combo-block{ background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 22px; }
.combo-label{ font-family: var(--font-mono); font-size: 11px; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; }
.combo-block strong{ display:block; font-size: 18px; margin: 6px 0 10px; }
.combo-block p{ font-size: 13.5px; color: var(--text-mid); line-height: 1.55; }

/* =========================================================
   VERDICT (Fazit)
   ========================================================= */
.verdict-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 26px; }
.verdict-label{ font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; display:block; margin-bottom: 16px; }
.verdict-col--pro .verdict-label{ color: var(--teal); }
.verdict-col--con .verdict-label{ color: var(--amber); }
.verdict-item{ padding: 14px 0; border-top: 1px solid var(--line); }
.verdict-item:first-of-type{ border-top:none; padding-top:0; }
.verdict-item strong{ display:block; font-size: 14.5px; margin-bottom: 4px; }
.verdict-item p{ font-size: 13px; color: var(--text-mid); line-height: 1.5; }

/* =========================================================
   OUTRO
   ========================================================= */
.card--outro .card-inner{ text-align:center; }
.outro-title{ font-size: clamp(28px, 5vw, 44px); margin: 8px 0 14px; max-width: 20ch; margin-left:auto; margin-right:auto; }
.card--outro .lede{ margin: 0 auto; }
.restart-btn{
  margin: 34px auto 0; display:flex; align-items:center; gap:9px;
  background: var(--teal); color: #06110E; border:none; border-radius: 12px;
  padding: 13px 22px; font-size: 14px; font-weight:600; cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.restart-btn svg{ width:16px; height:16px; }
.restart-btn:hover{ transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47,224,198,0.25); }

/* =========================================================
   FOOTER NAV
   ========================================================= */
.footbar{
  position: fixed; bottom:0; left:0; right:0; height: var(--footbar-h);
  display:flex; align-items:center; justify-content:center; gap: 26px;
  background: linear-gradient(0deg, rgba(10,18,32,0.96), rgba(10,18,32,0.8));
  border-top: 1px solid var(--line);
  overflow: hidden;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn{
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  flex-shrink:0;
}
.nav-btn svg{ width:20px; height:20px; }
.nav-btn:hover{ border-color: var(--teal); color: var(--teal); }
.nav-btn:active{ transform: scale(0.94); }
.nav-btn:disabled{ opacity: 0.25; cursor:default; }
.nav-btn:disabled:hover{ border-color: var(--panel-border); color: var(--text); }

.page-status{ display:flex; flex-direction:column; align-items:center; gap:3px; min-width: 140px; }
.page-chapter{ font-size: 12px; color: var(--text-mid); font-weight:600; }
.page-count{ font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.04em; }
#pageCurrent{ color: var(--teal); }

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */
@media (min-width: 640px){
  .brand-name{ display:inline; }
}

@media (max-width: 760px){
  .pillar-grid{ grid-template-columns: 1fr 1fr; }
  .theme-grid{ grid-template-columns: 1fr; gap: 24px; }
  .reason-grid{ grid-template-columns: 1fr; }
  .risk-steps{ grid-template-columns: 1fr 1fr; }
  .combo-grid{ grid-template-columns: 1fr; }
  .verdict-grid{ grid-template-columns: 1fr; gap: 8px; }
  .ct-row{ grid-template-columns: 1fr; gap:2px; padding: 12px 0; }
  .ct-row span:first-child{ color: var(--teal); }
  .ct-head{ display:none; }
  .stat-row{ flex-direction:column; align-items:flex-start; gap: 18px; }
  .compact-grid{ grid-template-columns: 1fr 1fr; }
  .process-compact-list{ grid-template-columns: 1fr 1fr; }
  .reason-grid--compact{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px){
  .compact-grid{ grid-template-columns: 1fr; }
  .process-compact-list{ grid-template-columns: 1fr; }
  .reason-grid--compact{ grid-template-columns: 1fr; }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 480px){
  :root{ --topbar-h: 60px; --footbar-h: 78px; }
  .topbar{ padding: 0 12px; gap: 10px; }
  .brand-mark{ font-size: 11px; padding: 4px 6px; }
  .gate-rail{ gap: 4px; }
  .gate-seg{ min-width: 8px; }
  .toc-btn span{ display:none; }
  .toc-btn{ padding: 8px; gap:0; }
  .card-inner{ padding: 28px 20px; }
  .pillar-grid{ grid-template-columns: 1fr 1fr; gap: 10px; }
  .pillar{ padding: 16px 14px; }
  .risk-steps{ grid-template-columns: 1fr 1fr; }
  .gate-seg-label{ display:none; }
  .footbar{ gap: 12px; padding-left: 12px; padding-right: 12px; }
  .page-status{ min-width: 90px; }
  .nav-btn{ width: 42px; height: 42px; flex-shrink: 0; }
  .stat-number{ font-size: clamp(48px, 16vw, 72px); }
  .hero-title{ font-size: clamp(40px, 15vw, 90px); }
}

@media (max-width: 360px){
  .topbar{ padding: 0 8px; gap: 6px; }
  .brand-name{ display:none; }
  .footbar{ gap: 8px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  .card, .card-inner > *, .gate-seg-fill, .hero-hint svg, .restart-btn, .pillar{
    animation: none !important;
    transition: opacity .01s linear !important;
  }
  .card{ transform:none !important; }
}
