/* Workshop deck: 1920x1080 stage, scaled to fit. Coverflex (Peach DS) tokens, F37 Ginger Pro. */
@font-face { font-family: "F37 Ginger Pro"; src: url("../fonts/F37GingerPro-Light.ttf") format("truetype"); font-weight: 300; font-display: block; }
@font-face { font-family: "F37 Ginger Pro"; src: url("../fonts/F37GingerPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: block; }
@font-face { font-family: "F37 Ginger Pro"; src: url("../fonts/F37GingerPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: block; }

:root {
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --line: #CDD4DC;
  --text: #333E4A;
  --ink: #222A33;
  --mute: #5F7287;
  --a1: #357E78;          /* step 1: teal-600 (text-safe) */
  --a1f: #7CCCC5;         /* teal-300 (fills) */
  --a1s: #E0F2F1;         /* teal-50 */
  --a2: #C23B2C;          /* step 2: peach-900 (text-safe) */
  --a2f: #FF8E7A;         /* peach-300 */
  --a2s: #FCF5F2;         /* peach-50 */
  --red: #C23B2C;
  --acc: var(--a1);
  --accf: var(--a1f);
  --accs: var(--a1s);
  --codebg: #222A33;
  --codetext: #EBEEF2;
  --codeacc: #7CCCC5;
  --font: "F37 Ginger Pro", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow: 0 4px 8px -2px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
  --halo: 0 2px 4px -2px rgba(0,0,0,.5), 0 4px 8px -2px rgba(124,204,197,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #CDD4DC; overflow: hidden; }
body { font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

.viewport { position: fixed; inset: 0; overflow: hidden; contain: paint; }
.stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; margin: -540px 0 0 -960px; transform-origin: center center; background: var(--bg); overflow: hidden; }

.slide { position: absolute; inset: 0; padding: 104px 140px 128px; display: none; flex-direction: column; background: var(--bg); }
.slide.on { display: flex; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .slide.on { animation: none; } .frag { transition: none !important; } }
.s1 { --acc: var(--a1); --accf: var(--a1f); --accs: var(--a1s); --codeacc: #7CCCC5; }
.s2 { --acc: var(--a2); --accf: var(--a2f); --accs: var(--a2s); --codeacc: #FF8E7A; }
.s0 { --acc: var(--a1); --accf: var(--a1f); --accs: var(--a1s); }

/* type */
.k { font: 700 32px var(--font); color: var(--acc); margin-bottom: 26px; display: flex; gap: 18px; align-items: center; letter-spacing: 0; }
.k .t { color: var(--mute); font-weight: 400; }
h1 { font: 700 168px/1 var(--font); letter-spacing: -.03em; margin: 0; color: var(--ink); }
h2 { font: 700 84px/1.05 var(--font); letter-spacing: -.02em; margin: 0 0 40px; max-width: 1560px; color: var(--ink); }
h3 { font: 700 44px/1.15 var(--font); margin: 0 0 14px; color: var(--ink); }
p { margin: 0; }
.lead { font-size: 42px; line-height: 1.4; color: var(--mute); max-width: 1400px; }
.lead b, .lead strong { color: var(--ink); font-weight: 700; }
.sm { font-size: 30px; color: var(--mute); line-height: 1.45; }
.m { font-family: var(--mono); }
code, .code-i { font-family: var(--mono); font-size: .84em; background: #EBEEF2; padding: .06em .3em; border-radius: 8px; color: var(--ink); }
.acc { color: var(--acc); }
.dim { color: var(--mute); }
.em { color: var(--acc); font-weight: 700; }

/* layout helpers */
.cols { display: grid; gap: 56px; align-items: start; flex: 1; min-height: 0; }
.c2 { grid-template-columns: 1fr 1fr; }
.c3 { grid-template-columns: repeat(3, 1fr); }
.c21 { grid-template-columns: 1.25fr 1fr; }
.c12 { grid-template-columns: 1fr 1.25fr; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.grow { flex: 1; }
.mt { margin-top: 36px; }
.center { align-items: center; text-align: center; justify-content: center; }
.card { background: var(--card); border-radius: 24px; padding: 40px 44px; box-shadow: var(--shadow); }
.card.hot { background: var(--accs); box-shadow: inset 0 0 0 3px var(--accf), var(--shadow); }
.card h3 { color: var(--ink); }
.card p { font-size: 32px; color: var(--mute); line-height: 1.4; }
.big-n { font: 700 110px/1 var(--font); color: var(--acc); }
.pill { display: inline-flex; align-items: center; gap: 12px; font: 700 28px var(--font); padding: 10px 26px; border-radius: 99px; background: var(--accs); color: var(--acc); }
.pill.solid { background: var(--accf); color: var(--ink); box-shadow: var(--halo); }
.pill.mute { background: #EBEEF2; color: var(--mute); }
.pill.red { background: #FFEDF1; color: var(--red); }
.tag-row { display: flex; gap: 16px; align-items: center; margin-bottom: 30px; }

/* code */
.code { background: var(--codebg); border-radius: 24px; padding: 34px 44px; font: 36px/1.6 var(--mono); color: var(--codetext); white-space: pre; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.code .c { color: #8E9CAB; }
.code .ln { display: block; margin: 0 -44px; padding: 0 44px; }
.code .ln.hl { background: color-mix(in srgb, var(--codeacc) 20%, transparent); box-shadow: inset 6px 0 0 var(--codeacc); }
.code .em { color: var(--codeacc); }
.code .s { color: #FFAA6C; }
.code.lab { padding-top: 66px; }
.code.sm2 { font-size: 30px; line-height: 1.55; }
.code.xs { font-size: 27px; line-height: 1.55; }
.code.xxs { font-size: 23px; line-height: 1.5; padding: 56px 36px 26px; }
.code.xxs .ln { margin: 0 -36px; padding: 0 36px; }
.label { position: absolute; top: 16px; right: 22px; font: 700 22px var(--font); color: #AEB8C3; }
.term-tag { display: inline-block; font: 700 24px var(--font); padding: 6px 18px; border-radius: 99px; margin-right: 14px; }
.term-tag.a { background: var(--a1f); color: var(--ink); }
.term-tag.b { background: var(--ink); color: #fff; }

/* lists */
ul.l { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
ul.l li { font-size: 40px; line-height: 1.3; padding-left: 58px; position: relative; }
ul.l li::before { content: ""; position: absolute; left: 6px; top: .5em; width: 22px; height: 22px; border-radius: 50%; background: var(--accf); }
ul.l.ck li::before { background: none; border: 4px solid var(--accf); width: 26px; height: 26px; top: .42em; }
ul.l.sm li { font-size: 34px; }
ul.l li b { font-weight: 700; color: var(--ink); }
ul.l li .dim { font-size: .8em; }

/* table */
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 36px; background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
table.t th { text-align: left; font: 700 28px var(--font); color: var(--mute); padding: 22px 28px; background: #EBEEF2; }
table.t td { padding: 22px 28px; border-top: 1.5px solid #EBEEF2; vertical-align: middle; }
table.t td:first-child { color: var(--mute); }
table.t .new { color: var(--acc); font-weight: 700; }
table.t code { font-size: .84em; }

/* callouts */
.warn { display: flex; gap: 22px; align-items: flex-start; padding: 28px 36px; border-radius: 24px; background: #FFF3EC; box-shadow: inset 0 0 0 3px #FFAA6C; font-size: 34px; line-height: 1.4; color: var(--ink); }
.warn i { font-style: normal; font-size: 40px; line-height: 1; }
.tip { padding: 28px 36px; border-radius: 24px; background: var(--accs); box-shadow: inset 0 0 0 3px var(--accf); font-size: 34px; line-height: 1.4; color: var(--ink); }
.expect { font-size: 32px; color: var(--mute); line-height: 1.5; }
.expect::before { content: "expect"; font: 700 26px var(--font); color: var(--acc); margin-right: 18px; }

/* cover + dividers */
.cover { background: var(--a1f); }
.cover h1, .cover .k { color: var(--ink); }
.cover .lead { color: var(--ink); }
.cover .lead code { background: rgba(255,255,255,.6); }
.cover .pill { background: #fff; color: var(--ink); box-shadow: none; }
.cover-ico { width: 112px; height: 112px; border-radius: 28px; margin-bottom: 44px; box-shadow: var(--shadow); }
.divider { justify-content: center; background: var(--a1f); }
.divider.s2 { background: var(--a2f); }
.divider .k, .divider h1, .divider .lead, .divider .lead b { color: var(--ink); }
.divider .k .t { color: var(--ink); }
.divider .num { position: absolute; right: 120px; top: 50%; transform: translateY(-50%); font: 700 880px/0.8 var(--font); color: rgba(255,255,255,.45); letter-spacing: -.05em; }
.divider h1 { font-size: 200px; position: relative; }
.divider .lead { max-width: 1100px; }
.divider .chain { max-width: 1150px; display: flex; gap: 22px; margin-top: 56px; font: 700 38px var(--font); color: var(--ink); position: relative; flex-wrap: wrap; align-items: center; }
.divider .chain b { background: #fff; padding: 2px 22px; border-radius: 99px; font-weight: 700; }

/* checkpoint */
.cp-mark { width: 150px; height: 150px; border-radius: 50%; background: var(--a1f); display: grid; place-items: center; flex: none; box-shadow: var(--halo); }
.cp-mark svg { width: 84px; height: 84px; }
.cp-head { display: flex; gap: 44px; align-items: center; margin-bottom: 48px; }

/* chrome */
.chrome { position: absolute; left: 140px; right: 140px; bottom: 44px; display: flex; justify-content: space-between; align-items: center; font: 700 24px var(--font); color: var(--mute); }
.chrome .url { font-weight: 400; }
.pbar { position: absolute; left: 0; top: 0; height: 8px; background: var(--a1f); transition: width .3s ease; z-index: 5; }
.slide.cover .chrome, .slide.divider .chrome { display: none; }

/* diagrams */
svg.dg { width: 100%; height: auto; overflow: visible; }
.dg text { font-family: var(--font); fill: var(--ink); }
.dg .nd { fill: #fff; stroke: #CDD4DC; stroke-width: 2.5; }
.dg .nd.a1 { stroke: var(--a1f); stroke-width: 4; fill: var(--a1s); }
.dg .nd.a2 { stroke: var(--a2f); stroke-width: 4; fill: var(--a2s); }
.dg .ar { stroke: var(--text); stroke-width: 3; fill: none; }
.dg .ar.a1 { stroke: #3AA097; }
.dg .ar.a2 { stroke: #FF5A44; }
.dg .ar.dash { stroke-dasharray: 11 9; }
.dg .sub { fill: var(--mute); font-size: 24px; }
.dg .lbl { font-size: 32px; font-weight: 700; }
.dg .cap { fill: var(--mute); font-size: 26px; font-weight: 700; }

/* fragments */
.frag { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.frag.in { opacity: 1; transform: none; pointer-events: auto; }
svg .frag { transform: none; }

.ph { border: 3px dashed #AEB8C3; border-radius: 24px; padding: 36px 44px; color: var(--mute); font-size: 32px; line-height: 1.45; }
.ph b { color: var(--ink); }

/* notes + overview */
.notes { display: none; }
.notes-panel { position: fixed; left: 0; right: 0; bottom: 0; max-height: 38vh; overflow: auto; background: rgba(34,42,51,.97); border-top: 4px solid var(--a1f); padding: 18px 28px 24px; font: 17px/1.55 var(--font); color: #EBEEF2; z-index: 20; display: none; white-space: pre-wrap; }
body.show-notes .notes-panel { display: block; }
.notes-panel h4 { margin: 0 0 6px; font: 700 14px var(--font); color: var(--a1f); }
.hint { position: fixed; right: 16px; top: 12px; z-index: 30; font: 700 14px var(--font); color: var(--mute); opacity: 0; transition: opacity .3s; pointer-events: none; }
body.hint-on .hint { opacity: 1; }

.ov { position: fixed; inset: 0; z-index: 40; background: #EBEEF2; overflow: auto; padding: 28px; display: none; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-content: start; }
body.overview .ov { display: grid; }
.ov .cell { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; border: 3px solid transparent; cursor: pointer; background: var(--bg); box-shadow: var(--shadow); }
.ov .cell:hover, .ov .cell.cur { border-color: var(--a1f); }
.ov .cell .inner { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: top left; pointer-events: none; }
.ov .cell .slide { display: flex !important; animation: none; }
.ov .cell .frag { opacity: 1; transform: none; }
.ov .cell .n { position: absolute; right: 8px; bottom: 6px; z-index: 3; font: 700 13px var(--font); color: #fff; background: rgba(34,42,51,.75); padding: 2px 8px; border-radius: 99px; }

/* print / PDF: one slide per page, everything revealed */
@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { overflow: visible; height: auto; background: none; }
  .viewport { position: static; display: block; }
  .stage { transform: none !important; position: static; margin: 0; width: auto; height: auto; overflow: visible; background: none; }
  .slide { display: flex !important; position: relative; width: 1920px; height: 1080px; page-break-after: always; break-after: page; }
  .slide, .slide.on { animation: none !important; opacity: 1 !important; transform: none !important; }
  .frag { opacity: 1 !important; transform: none !important; }
  .pbar, .hint, .ov, .notes-panel { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.vc { justify-content: center; }
.agenda { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 24px; overflow: hidden; background: var(--card); margin-top: 34px; box-shadow: var(--shadow); }
.agenda > div { padding: 24px 28px; border-left: 1.5px solid #EBEEF2; font-size: 32px; line-height: 1.25; color: var(--ink); }
.agenda > div:first-child { border-left: 0; }
.agenda .m { display: block; font: 700 24px var(--font); color: var(--mute); margin-bottom: 8px; }
.agenda .s1c { background: var(--a1s); }
.agenda .s1c .m { color: var(--a1); }
.agenda .s2c { background: var(--a2s); }
.agenda .s2c .m { color: var(--a2); }
.cover-dg { position: absolute; right: 100px; top: 560px; width: 820px; }
.slide.cover .lead { max-width: 760px; }
.vc .cols { flex: none; }

/* guardrails flow */
.flow { display: grid; grid-template-columns: 1fr 60px 0.8fr 60px 1fr; align-items: stretch; gap: 8px; margin-top: -10px; }
.fbox { background: var(--card); border-radius: 24px; padding: 26px 30px; box-shadow: var(--shadow); font-size: 28px; line-height: 1.35; color: var(--ink); }
.fbox.gw { background: var(--accs); box-shadow: inset 0 0 0 3px var(--accf), var(--shadow); }
.fbox .k2 { font: 700 24px var(--font); color: var(--mute); margin-bottom: 10px; }
.farrow { align-self: center; text-align: center; font: 700 48px var(--font); color: var(--acc); }

/* auto-router tiers */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tier { background: var(--card); border-radius: 24px; padding: 22px 28px; box-shadow: var(--shadow); }
.tier .k2 { font: 700 24px var(--font); color: var(--mute); margin-bottom: 8px; }
.tier .q { font-size: 28px; color: var(--ink); min-height: 76px; line-height: 1.3; }
.tier .to { display: inline-block; font: 700 28px var(--font); padding: 6px 22px; border-radius: 99px; margin-top: 10px; }
.tier .to.local { background: var(--a1f); color: var(--ink); }
.tier .to.cloud { background: var(--a2f); color: var(--ink); }

/* phones and tablets: on-screen controls, rotate hint, no rubber-banding */
html, body { overscroll-behavior: none; touch-action: manipulation; }
.mnav, .rotate { display: none; }
@media (pointer: coarse) {
  .hint { display: none; }
  .mnav { display: block; }
  .mnav button { position: fixed; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(34,42,51,.6); color: #fff; font: 700 26px/1 var(--font); display: grid; place-items: center; padding: 0; cursor: pointer; }
  .mnav button:active { background: #3AA097; }
  .mnav [data-a=prev] { left: max(6px, env(safe-area-inset-left)); top: 50%; margin-top: -22px; }
  .mnav [data-a=next] { right: max(6px, env(safe-area-inset-right)); top: 50%; margin-top: -22px; }
  .mnav [data-a=ov] { right: max(6px, env(safe-area-inset-right)); top: max(6px, env(safe-area-inset-top)); width: 36px; height: 36px; font-size: 18px; background: rgba(34,42,51,.45); }
  body.overview .mnav { display: none; }
}
@media (pointer: coarse) and (max-width: 700px) and (orientation: portrait) {
  body:not(.no-rotate) .rotate { display: grid; position: fixed; inset: 0; z-index: 60; place-items: center; background: var(--bg); padding: 24px; text-align: center; }
  .rotate .rico { font-size: 64px; color: #3AA097; margin-bottom: 8px; }
  .rotate h2 { font: 700 24px var(--font); margin: 0 0 10px; color: var(--ink); }
  .rotate p { font-size: 16px; color: var(--text); margin: 0 0 22px; }
  .rotate button { font: 700 16px var(--font); background: #fff; border: 2px solid #3AA097; color: var(--ink); border-radius: 99px; padding: 12px 22px; min-height: 44px; }
  body:not(.no-rotate) .mnav { display: none; }
}
@media (pointer: coarse) { .ov { grid-template-columns: repeat(2, 1fr); } }
