:root {
  --red: #da291c;
  --yellow: #ffc72c;
  --dark: #27251f;
  --bg: #f5f5f0;
  --card: #fff;
  --soft: #f0f0eb;
  --border: #deded6;
  --text: #27251f;
  --muted: #625f59;
  --subtle: #8b8982;
  --good: #159947;
  --blue: #2563eb;
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --safe-x: clamp(42px, 6.2vw, 82px);
  --safe-y: clamp(22px, 4vh, 38px);
  --stage-max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }

.deck { height: 100dvh; display: grid; grid-template-rows: 60px 1fr 42px; }
.topbar { z-index: 20; display: grid; grid-template-columns: 300px 1fr 180px; align-items: center; gap: 18px; padding: 0 24px; background: var(--red); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--yellow); color: var(--red); font-size: 20px; font-weight: 800; }
.brand strong { display: block; font-size: 16px; line-height: 1.1; }
.brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.slide-status { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 16px; }
#slideTitle { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.progress { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.22); }
#progressFill { height: 100%; width: 6.66%; border-radius: inherit; background: var(--yellow); transition: width .2s ease; }
.nav-actions { display: flex; justify-content: flex-end; gap: 8px; }
.nav-actions button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; }
.nav-actions button:hover { background: var(--yellow); color: var(--red); }
.nav-actions svg { width: 18px; height: 18px; }

.slides { position: relative; min-height: 0; outline: none; }
.slide { position: absolute; inset: 0; display: none; overflow: auto; outline: none; padding: var(--safe-y) var(--safe-x); background: linear-gradient(180deg, rgba(218,41,28,.055), rgba(245,245,240,0) 44%), var(--bg); }
.slide.active { display: block; animation: enter .18s ease; }
@keyframes enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
.slide-inner { width: min(var(--stage-max), 100%); min-height: 100%; max-height: calc(100dvh - 102px - (var(--safe-y) * 2)); margin: 0 auto; display: flex; flex-direction: column; justify-content: center; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 38px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--red), var(--yellow)); }
h1, h2 { margin-top: 12px; font-weight: 800; letter-spacing: 0; }
h1 { max-width: 860px; font-size: clamp(48px, 5.4vw, 78px); line-height: .95; }
h2 { max-width: 980px; font-size: clamp(30px, 3.45vw, 50px); line-height: 1.05; }
.lead { max-width: 760px; margin-top: 18px; color: var(--muted); font-size: clamp(18px, 1.65vw, 24px); line-height: 1.35; }
.slide-head { margin-bottom: clamp(18px, 2.5vw, 30px); }

.cover { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 50px; align-items: center; }
.hero-card { padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 16px 42px rgba(39,37,31,.1); }
.hero-card span, article > span, .example-strip span, .mini-table span { color: var(--subtle); font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.hero-card strong { display: block; margin-top: 22px; color: var(--red); font-size: clamp(36px, 4.2vw, 60px); line-height: .96; }
.hero-card p { margin-top: 14px; color: var(--muted); font-size: 17px; line-height: 1.4; }

.approval-grid, .formula-grid, .tier-grid, .prize-grid, .grand-grid, .crew-method-grid, .budget-grid, .final-grid, .economics-grid, .target-impact-grid { display: grid; gap: 16px; }
.approval-grid, .crew-method-grid, .budget-grid, .final-grid { grid-template-columns: repeat(4, 1fr); }
.formula-grid, .tier-grid, .prize-grid, .grand-grid { grid-template-columns: repeat(3, 1fr); }
.economics-grid, .target-impact-grid { grid-template-columns: repeat(3, 1fr); }
.approval-grid article, .formula-grid article, .tier-grid article, .prize-grid article, .grand-grid article, .crew-method-grid article, .budget-grid article, .final-grid div, .hero-card, .table-card, .example-table-card, .economics-grid article, .scenario-economics, .target-impact-grid article { border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.approval-grid article, .formula-grid article, .prize-grid article, .grand-grid article, .crew-method-grid article, .budget-grid article, .economics-grid article, .target-impact-grid article { min-height: 190px; padding: 20px; }
.approval-grid svg, .prize-grid svg, .final-grid svg { width: 30px; height: 30px; color: var(--red); }
.approval-grid strong, .prize-grid strong, .crew-method-grid strong { display: block; margin-top: 22px; font-size: 22px; line-height: 1.12; }
.approval-grid span, .formula-grid p, .prize-grid p, .grand-grid p, .crew-method-grid span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.35; }

.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.roadmap-grid article { min-height: 172px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.roadmap-grid span { display: inline-flex; width: 42px; height: 30px; align-items: center; justify-content: center; border-radius: 999px; background: rgba(218,41,28,.1); color: var(--red); font-family: var(--mono); font-size: 13px; font-weight: 800; }
.roadmap-grid strong { display: block; margin-top: 22px; font-size: 22px; line-height: 1.1; }
.roadmap-grid p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.35; }

.equation-grid { display: grid; grid-template-columns: 1fr 48px 1fr 48px 1fr; gap: 14px; align-items: stretch; }
.equation-grid article, .growth-card { min-height: 220px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.equation-grid strong, .budget-grid strong { display: block; margin-top: 26px; font-family: var(--mono); font-size: clamp(40px, 4.7vw, 68px); line-height: .92; }
.equation-grid small, .budget-grid small { display: block; margin-top: 13px; color: var(--muted); font-size: 14px; }
.math-sign { display: grid; place-items: center; color: var(--red); font-family: var(--mono); font-size: 56px; font-weight: 800; }
.dark { background: var(--dark) !important; color: #fff; }
.dark span { color: rgba(255,255,255,.62); }
.dark strong { color: var(--yellow); }
.dark small { color: rgba(255,255,255,.75); }
.big-insight { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(218,41,28,.22); border-radius: 10px; background: rgba(218,41,28,.07); color: var(--muted); font-size: 17px; font-weight: 700; }
.big-insight svg { width: 26px; height: 26px; color: var(--red); flex: 0 0 auto; }
.big-insight b { color: var(--red); font-family: var(--mono); font-size: 28px; }

.formula-grid strong { display: block; margin-top: 22px; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.1; }
.example-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.example-strip div { min-height: 96px; padding: 16px; border-radius: 10px; background: var(--dark); color: #fff; }
.example-strip b { display: block; margin-top: 12px; color: var(--yellow); font-family: var(--mono); font-size: clamp(18px, 1.65vw, 24px); line-height: 1.15; }

.tier-grid article { min-height: 235px; padding: 20px; overflow: hidden; position: relative; }
.tier-grid article::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--red); }
.tier-b::before { background: var(--yellow) !important; }
.tier-c::before { background: var(--blue) !important; }
.tier-grid strong { display: block; margin-top: 28px; font-family: var(--mono); font-size: clamp(40px, 4.2vw, 60px); line-height: .9; }
.tier-grid small { display: block; margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.35; font-weight: 700; }

.store-slide { justify-content: flex-start; }
.store-controls { display: grid; grid-template-columns: repeat(4, auto) 1fr; gap: 8px; margin-bottom: 10px; }
.tier-filter, #storeSearch { min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted); font-weight: 800; }
.tier-filter { padding: 0 14px; }
.tier-filter.active, .tier-filter:hover { border-color: var(--red); background: var(--red); color: #fff; }
#storeSearch { padding: 0 12px; outline: none; }
.store-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.store-summary div { min-height: 68px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.store-summary span { color: var(--subtle); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.store-summary b { display: block; margin-top: 5px; font-family: var(--mono); font-size: 24px; }
.table-card, .example-table-card { overflow: auto; padding: 14px 18px; }
.store-table-card { max-height: min(340px, 42vh); }
table { width: 100%; min-width: 940px; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--subtle); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; position: sticky; top: 0; background: var(--card); }
td { color: var(--muted); font-size: 14px; }
td:first-child { color: var(--text); font-weight: 800; }

.prize-grid b { display: inline-flex; margin-top: 22px; padding: 9px 13px; border-radius: 999px; background: var(--soft); font-family: var(--mono); font-size: 18px; }
.ladder { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.ladder div { min-height: 135px; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.ladder span { color: var(--subtle); font-weight: 800; font-size: 12px; }
.ladder b { font-family: var(--mono); font-size: clamp(22px, 2.2vw, 34px); }

.ranking-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.ranking-table { display: grid; gap: 8px; }
.ranking-table div { display: grid; grid-template-columns: 1fr repeat(3, 1fr); gap: 8px; align-items: center; min-height: 54px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); }
.ranking-table span { color: var(--subtle); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.ranking-table b { font-family: var(--mono); font-size: 25px; }
.rule-card { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--dark); color: #fff; }
.rule-card strong { font-size: 26px; }
.rule-card ol { margin: 18px 0 0 20px; color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.45; }
.grand-grid strong { display: block; margin-top: 24px; font-family: var(--mono); font-size: clamp(34px, 3.2vw, 50px); line-height: .98; }

.example-table-card table { min-width: 900px; }
.example-table-card th, .example-table-card td { padding: 11px 12px; font-size: 15px; }
.crew-method-grid article { min-height: 190px; }
.mini-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.mini-table div { min-height: 112px; padding: 18px; border-radius: 10px; background: var(--dark); color: #fff; }
.mini-table b { display: block; margin-top: 12px; color: var(--yellow); font-family: var(--mono); font-size: 28px; }
.mini-table strong { display: block; margin-top: 10px; font-size: 18px; }
.budget-grid strong { color: var(--red); }
.scenario-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.scenario-line span { padding: 18px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 22px; font-family: var(--mono); font-weight: 800; text-align: center; }
.economics-grid strong { display: block; margin-top: 32px; font-family: var(--mono); font-size: clamp(42px, 4.6vw, 72px); line-height: .95; }
.economics-grid small { display: block; margin-top: 16px; color: var(--muted); font-size: 17px; }
.scenario-economics { overflow: auto; padding: 18px; }
.scenario-economics table { min-width: 920px; }
.scenario-economics th, .scenario-economics td { padding: 14px 14px; font-size: 16px; }
.scenario-economics td:first-child { color: var(--text); font-weight: 800; }
.scenario-economics td:nth-child(5) { color: var(--red); font-family: var(--mono); font-weight: 800; }
.target-impact-grid strong { display: block; margin-top: 26px; font-family: var(--mono); font-size: clamp(36px, 4vw, 60px); line-height: .95; }
.target-impact-grid small { display: block; margin-top: 13px; color: var(--muted); font-size: 15px; }
.target-bridge { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr; align-items: center; gap: 12px; margin-top: 18px; }
.target-bridge div { min-height: 92px; padding: 14px; border-radius: 10px; background: var(--dark); color: #fff; }
.target-bridge span { color: rgba(255,255,255,.62); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.target-bridge b { display: block; margin-top: 12px; color: var(--yellow); font-family: var(--mono); font-size: clamp(22px, 2vw, 30px); line-height: 1; }
.target-bridge small { display: block; margin-top: 8px; color: rgba(255,255,255,.72); }
.target-bridge svg { justify-self: center; width: 22px; height: 22px; color: var(--red); }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.timeline article { min-height: 245px; padding: 18px; border-left: 5px solid var(--red); border-radius: 10px; background: var(--card); }
.timeline time { color: var(--red); font-family: var(--mono); font-size: 13px; font-weight: 800; }
.timeline strong { display: block; margin-top: 28px; font-size: 20px; line-height: 1.15; }
.timeline span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; }
.final h2 { max-width: 980px; font-size: clamp(44px, 5.2vw, 76px); }
.final-grid { margin-top: 42px; grid-template-columns: repeat(2, 1fr); }
.final-grid div { min-height: 66px; display: flex; align-items: center; gap: 12px; padding: 15px; font-size: 18px; font-weight: 800; }
.final-grid svg { flex: 0 0 auto; }

.footer { z-index: 20; display: grid; grid-template-columns: 110px 1fr 160px; align-items: center; gap: 16px; padding: 0 24px; border-top: 1px solid var(--border); background: rgba(255,255,255,.82); color: var(--subtle); font-family: var(--mono); font-size: 12px; }
.dots { display: flex; justify-content: center; gap: 8px; }
.dot { width: 8px; height: 8px; border: 0; border-radius: 999px; background: #c8c8c0; }
.dot.active { width: 28px; background: var(--red); }
.overview { position: fixed; inset: 60px 0 42px; z-index: 30; display: none; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; overflow: auto; padding: 24px; background: rgba(39,37,31,.94); }
.overview.open { display: grid; }
.overview-card { min-height: 130px; padding: 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; text-align: left; }
.overview-card strong { display: block; color: var(--yellow); font-family: var(--mono); font-size: 13px; }
.overview-card span { display: block; margin-top: 14px; font-size: 17px; font-weight: 800; }

@media (max-width: 980px) {
  body { overflow: auto; }
  .deck { min-height: 100dvh; height: auto; grid-template-rows: auto 1fr auto; }
  .topbar { grid-template-columns: 1fr auto; min-height: 60px; }
  .slide-status { display: none; }
  .slide { padding: 28px 16px; }
  .slide-inner, .cover { display: flex; flex-direction: column; justify-content: flex-start; }
  .approval-grid, .formula-grid, .tier-grid, .prize-grid, .grand-grid, .crew-method-grid, .budget-grid, .final-grid, .equation-grid, .example-strip, .store-summary, .ranking-layout, .mini-table, .scenario-line, .timeline, .economics-grid, .roadmap-grid, .target-impact-grid, .target-bridge { grid-template-columns: 1fr; }
  .math-sign { display: none; }
  .store-controls { grid-template-columns: repeat(2, 1fr); }
  #storeSearch { grid-column: 1 / -1; }
  .ladder { grid-template-columns: repeat(3, 1fr); }
  .footer { grid-template-columns: 80px 1fr; }
  .footer > span:last-child { display: none; }
  .overview { grid-template-columns: 1fr; }
}
