*{box-sizing:border-box}html,body{margin:0;height:100%;background:#f4efec;color:#2b2623;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;color:inherit}
#top{position:fixed;top:0;left:0;right:0;height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;z-index:20;pointer-events:none}
#top>*{pointer-events:auto}.logo{font-weight:800;letter-spacing:.02em;color:#3f8f84}.tools{display:flex;gap:6px}
.tools button{border:0;background:#ffffffcc;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:600;box-shadow:0 1px 4px #0002}
#nav{position:fixed;left:0;right:0;bottom:0;height:52px;display:flex;align-items:center;gap:12px;padding:0 16px;z-index:20;background:#ffffffd9;backdrop-filter:blur(6px)}
#nav button{width:40px;height:36px;border:0;border-radius:10px;background:#2b2623;color:#fff;font-size:18px}#nav button:disabled{opacity:.3}
#counter{font-weight:700;font-size:13px;min-width:56px}#progressWrap{flex:1;height:5px;background:#e3dbd5;border-radius:3px;overflow:hidden}#progress{height:100%;background:#3f8f84;width:10%;transition:width .4s}
.edge{position:fixed;top:56px;bottom:58px;width:44px;border:0;background:transparent;z-index:15;padding:0}.edge.l{left:0}.edge.r{right:0}
#deck{position:fixed;inset:0;overflow:hidden}
#stage{position:absolute;left:0;top:0;transform-origin:0 0}
.slide{display:none}.slide.active{display:block}
.copy{padding:20px 24px 28px 52px}
.kicker{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#3f8f84}
h1{font-size:30px;line-height:1.1;margin:8px 0 10px;letter-spacing:-.02em}.sub{font-size:17px;line-height:1.4;color:#5c534e;margin:0 0 14px}
p{line-height:1.45}.tag{font-weight:800;color:#3f8f84}.foot{font-size:12px;line-height:1.45;color:#7d756f;margin-top:16px}.note{font-size:14px;color:#5c534e}
.art{width:100%}canvas{display:block;width:100%;height:100%;background:#f6efe8}
.big{display:flex;gap:14px;align-items:center;margin:8px 0 14px}.big b{font-size:56px;color:#e5755f;line-height:1}.big span{font-size:15px;line-height:1.4}.big i,.grid4 i{display:block;font-style:normal;font-size:12px;color:#7d756f}
ul.bars,ul.plain,ol.steps,ol.tiers{list-style:none;padding:0;margin:0}ul.bars li{display:grid;grid-template-columns:1fr auto;gap:0 10px;padding:9px 0;border-bottom:1px solid #e3dbd5;font-size:15px}ul.bars em{grid-column:2;font-style:normal;font-size:12px;color:#7d756f;text-align:right}ul.bars b{color:#3f8f84}
.grid4{display:grid;grid-template-columns:1fr 1fr;gap:10px}.grid4>div{background:#fff;border-radius:14px;padding:12px}.grid4 b{display:block;font-size:30px;color:#3f8f84}.grid4 span{font-size:13px;line-height:1.35;display:block}
ol.steps li{padding:10px 12px;margin:0 0 8px;border-radius:12px;background:#fff;font-size:15px;line-height:1.35;opacity:.55;transition:.3s;border-left:5px solid #e3dbd5}ol.steps li.on{opacity:1;border-color:#e5755f;transform:translateX(4px)}ol.steps li b{color:#e5755f;margin-right:6px}
ul.plain li{padding:6px 0 6px 20px;position:relative;font-size:15px;line-height:1.4}ul.plain li:before{content:"";position:absolute;left:0;top:13px;width:8px;height:8px;border-radius:50%;background:#3f8f84}
ol.tiers li{background:#fff;border-radius:14px;padding:12px 14px;margin-bottom:8px;font-size:14px;line-height:1.4}ol.tiers b{display:block;font-size:16px;color:#3f8f84}
dl.inputs{display:grid;grid-template-columns:64px 1fr;gap:8px 10px;margin:0}dl.inputs dt{font-weight:800;color:#e5755f;font-size:18px}dl.inputs dd{margin:0;font-size:14px;line-height:1.35;align-self:center}
.math div{background:#fff;border-radius:12px;padding:10px 14px;margin-bottom:8px;font-size:20px;font-weight:700;font-family:Georgia,serif}.math small{display:block;font:600 11px Inter,sans-serif;color:#7d756f;letter-spacing:.06em;text-transform:uppercase}
.primary{border:0;background:#3f8f84;color:#fff;font-weight:700;padding:10px 16px;border-radius:12px}.ghost{border:1px solid #cfc6bf;background:#fff;padding:10px 16px;border-radius:12px}#reportState{font-size:13px;color:#3f8f84;font-weight:700;margin-left:6px}
.sim label{font-weight:700;font-size:15px}.sim strong{color:#3f8f84;margin-left:6px}input[type=range]{width:100%;accent-color:#3f8f84;height:32px;margin:6px 0 0}.rng{display:flex;justify-content:space-between;font-size:11px;color:#7d756f}.status{margin:8px 0;font-size:13px;font-weight:700;color:#3f8f84}.status.error{color:#c94b3a}.summary{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px}.summary b{color:#5c534e}
#gate{position:fixed;inset:0;z-index:50;background:#f4efecf2;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:16px}#gate.off{display:none}.gate-card{background:#fff;border-radius:24px;padding:26px;max-width:380px;width:100%;text-align:center;box-shadow:0 10px 40px #0002}.gate-card h2{margin:10px 0 6px;font-size:26px}.gate-card p{margin:0 0 16px;color:#5c534e}.gate-card button{display:block;width:100%;margin:8px 0}.gate-card small{color:#7d756f;line-height:1.4;display:block;margin-top:10px}
#overviewPanel{position:fixed;inset:0;z-index:40;background:#000a;display:flex;align-items:center;justify-content:center}#overviewPanel[hidden]{display:none}.ov{background:#fff;border-radius:18px;padding:16px;max-width:620px;width:92%;max-height:88vh;overflow:auto}#slideGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}#slideGrid button{text-align:left;border:1px solid #e3dbd5;background:#faf7f4;border-radius:10px;padding:10px;font-size:13px}#slideGrid b{color:#3f8f84;margin-right:6px}
/* portrait / narrow: stacked, scrolls */
@media (max-aspect-ratio:1/1),(max-width:700px){#deck{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}#stage{position:relative;transform:none!important;width:100%!important;height:auto!important;padding:48px 0 64px}.art{height:min(52vh,92vw)}.copy{padding:16px 22px 28px 50px}.edge.l{width:34px}.edge.r{width:34px}}
@media (min-aspect-ratio:1/1) and (min-width:701px){#stage{width:1280px;height:720px}.slide.active{display:grid;grid-template-columns:560px 720px;height:720px}.copy{padding:56px 40px 40px 72px;overflow:hidden;align-self:center}h1{font-size:40px}.sub{font-size:20px}.art{height:720px}.dense .copy{padding-top:44px}.dense h1{font-size:34px}.edge{width:64px}}
body.paused *{animation-play-state:paused!important}
@media print{#top,#nav,.edge,#gate{display:none}}
a{color:#3f8f84;font-weight:700}
@media (max-aspect-ratio:1/1),(max-width:700px){.slide.active{display:flex;flex-direction:column}.art{order:-1;flex:none}}
body.pl #top{height:36px}body.pl #top .tools button{padding:4px 9px;font-size:11px}
body.pl .slide.active{display:grid;grid-template-columns:46% 54%;height:100%}
body.pl .copy{overflow-y:auto;height:100%;padding:40px 12px 12px 68px;align-self:stretch}
body.pl h1{font-size:21px;margin:4px 0 6px}body.pl .sub{font-size:13px;margin-bottom:8px}body.pl p,body.pl li,body.pl dd{font-size:12px}body.pl .big b{font-size:34px}body.pl .grid4 b{font-size:22px}body.pl .art{height:100%}body.pl .foot{font-size:10.5px;margin-top:10px}body.pl ol.steps li{padding:6px 10px;font-size:12px;margin-bottom:5px}body.pl .math div{font-size:15px;padding:6px 10px;margin-bottom:5px}
body.pl .edge{width:60px;top:0;bottom:40px}
body.pl .tools span{display:none}
/* Cinema frame: all space outside the 16:9 slide is pure black. */
@media (min-aspect-ratio:1/1) and (min-width:701px){html,body{background:#000}#stage{background:#f7f1e9}.copy{padding-top:58px;padding-bottom:46px}#top{height:38px;background:#000;color:#fff}#top .logo{color:#9acabd}#top .tools button{background:#242424;color:#fff;box-shadow:none;padding:5px 10px;font-size:12px}#nav{height:40px!important;background:#000;color:#fff;padding:0 16px;backdrop-filter:none}#nav button{background:#262626;height:30px}#progressWrap{background:#333}#progress{background:#81bdac}.edge{top:40px;bottom:40px}canvas{background:#f7f1e9}}
body.pl #stage{background:#f7f1e9}body.pl #top{background:#000}body.pl .art{overflow:hidden}body.pl #nav{height:40px!important}
@media (max-aspect-ratio:1/1),(max-width:700px){#top{background:#f7f1e9}.art{height:72vw;max-height:52vh}.copy{padding-left:38px;padding-right:30px}#nav{background:#151515;color:white}#progressWrap{background:#333}.tools button{font-size:11px;padding:7px 9px}.logo{font-size:14px}#stage{padding-top:48px}}
body.pl .copy{padding-top:12px}body.pl .kicker{font-size:10px}body.pl .art{border-left:1px solid #e9ddd3}

body.pl #nav{padding:0 16px}#top .tools button:hover{background:#3a4943}#fullscreen:after{content:" F";font-size:10px;opacity:.65}@media(max-width:900px){#fullscreen:after{content:""}}
