/* Fonts ship with the site (SIL OFL 1.1, assets/fonts/), so it makes no outside requests. */
@font-face { font-family: "Red Hat Display"; font-weight: 500; font-display: swap; src: url("fonts/red-hat-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-weight: 600; font-display: swap; src: url("fonts/red-hat-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-weight: 700; font-display: swap; src: url("fonts/red-hat-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-weight: 800; font-display: swap; src: url("fonts/red-hat-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-weight: 400; font-display: swap; src: url("fonts/red-hat-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-weight: 500; font-display: swap; src: url("fonts/red-hat-text-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-weight: 600; font-display: swap; src: url("fonts/red-hat-text-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-weight: 400; font-display: swap; src: url("fonts/red-hat-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-weight: 500; font-display: swap; src: url("fonts/red-hat-mono-latin-500-normal.woff2") format("woff2"); }
/* Simple Meridian live demo. Tokens match utils/ui.py in the app. */
:root {
  --navy: #0B1B3F; --navy-2: #132A5C; --bg: #F4F6FB; --surface: #FFFFFF; --ink: #101828; --muted: #5B6475;
  --border: #E2E7F0; --grid: #EDF0F6; --primary: #2459E8; --good: #067647; --bad: #B42318; --gold: #FFD166;
  --display: "Red Hat Display", "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px -12px rgba(16,24,40,.18);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 800; }
h2 { font-size: 1.6rem; font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 .8rem; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid #8AB4FF; outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: .5rem .8rem; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- The page is the tour: chapter sidebar + simulated app screens ---------- */
.app { position: relative; display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.app-side { position: sticky; top: 0; z-index: 6; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
            background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #DCE3F1; padding: 1.2rem .8rem; }
.brand { display: flex; align-items: center; gap: .7rem; margin: 0 .3rem 1.3rem; }
.logo { width: 40px; height: 40px; background: #fff; border-radius: 10px; display: grid; place-items: center; flex: none; }
.logo img { width: 82%; height: 82%; object-fit: contain; }
.brand b { display: block; font-family: var(--display); color: #fff; font-size: 1.1rem; font-weight: 800; }
.brand span span { font-size: .75rem; color: var(--gold); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#chapters { display: grid; gap: .15rem; }
.chap { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 10px; background: none;
        color: #C9D4EC; font: 500 .9rem/1.3 var(--body); text-align: left; cursor: pointer; }
.chap:hover { background: rgba(255,255,255,.07); }
.chap .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .72rem; font-weight: 700;
           border: 1px solid rgba(255,255,255,.25); color: #93A3C4; }
.chap.done .n { background: rgba(255,209,102,.18); border-color: transparent; color: var(--gold); }
.chap.on { background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--gold); color: #fff; font-weight: 700; }
.chap.on .n { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.chap .n svg { width: 13px; height: 13px; }
.chap .chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #93A3C4; border-bottom: 2px solid #93A3C4; transform: rotate(-45deg); transition: transform .2s; flex: none; }
.chap[aria-expanded="true"] .chev { transform: rotate(45deg); }
.subs { display: grid; gap: 1px; margin: 2px 0 6px 20px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.14); }
.sub { text-align: left; border: 0; background: none; color: #A9B6D3; font: 500 .82rem/1.3 var(--body); padding: .38rem .55rem; border-radius: 8px; cursor: pointer; }
.sub:hover { background: rgba(255,255,255,.07); color: #fff; }
.sub.on { color: #fff; background: rgba(255,209,102,.14); box-shadow: inset 2px 0 0 var(--gold); }
.app.folded .subs, .app.folded .chev { display: none; }
.side-foot { margin-top: auto; padding-top: 1.2rem; display: grid; gap: .1rem; }
.side-foot .btn { justify-content: center; margin-bottom: .5rem; }
.side-foot a:not(.btn) { color: #C9D4EC; text-decoration: none; font-size: .86rem; padding: .3rem .6rem; border-radius: 8px; }
.side-foot a:not(.btn):hover { background: rgba(255,255,255,.07); }
.side-foot p { margin: .7rem .3rem 0; font-size: .74rem; line-height: 1.45; color: #8193B8; }
.app-main { padding: 1.4rem clamp(1rem, 3vw, 2.4rem) 3rem; min-width: 0; }
/* Wide screens: the tour screens fill the width left of a caption column. */
@media (min-width: 1200px) { .app.touring .app-main { padding-right: calc(380px + 56px); padding-bottom: 70vh; } }

/* Folded sidebar: a narrow rail with chapter numbers only. */
.fold { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06);
        color: #DCE3F1; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.fold svg { width: 18px; height: 18px; transition: transform .2s; }
.fold:hover { background: rgba(255,255,255,.14); }
.app.folded { grid-template-columns: 76px minmax(0, 1fr); }
.app.folded .app-side { padding: 1.2rem .55rem; }
.app.folded .brand { flex-direction: column; gap: .6rem; margin: 0 0 1.1rem; }
.app.folded .brandtext, .app.folded .chap > span:not(.n), .app.folded .side-foot { display: none; }
.app.folded .fold svg { transform: rotate(180deg); }
.app.folded .chap { justify-content: center; padding: .5rem 0; }

/* ---------- Pieces ---------- */
.version { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; background: var(--surface); border: 1px solid var(--border);
           border-radius: 14px; padding: .55rem .9rem; margin: 0 auto 1.4rem; max-width: 1180px; width: 100%; box-shadow: var(--shadow); font-size: .88rem; color: var(--muted); }
.tag { background: linear-gradient(135deg, #0E9F6E, #14B8A6); color: #fff; font-weight: 700; font-size: .75rem; border-radius: 99px; padding: .15rem .6rem; }
.new { display: inline-block; background: linear-gradient(135deg, #F04438, #F79009); color: #fff; font-weight: 800; font-size: .66rem;
       letter-spacing: .06em; padding: .1rem .42rem; border-radius: 6px; vertical-align: 2px; margin-left: .35rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .62rem 1rem; border-radius: 10px; font-weight: 700; font-size: .95rem;
       text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.ic { width: 18px; height: 18px; flex: none; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn:hover { filter: brightness(1.05); }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.lede { color: var(--muted); font-size: 1.02rem; max-width: 72ch; }

/* Welcome page: design 20 (logo, one line, two buttons, byline), filling the window */
.screen[data-screen="home"].on { min-height: calc(100vh - 2.8rem); display: flex; flex-direction: column; justify-content: center; }
.intro { max-width: 960px; width: 100%; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.mark { width: 92px; height: 92px; overflow: visible; }
.mark line { stroke-dasharray: 200; stroke-dashoffset: 200; animation: redraw 6s cubic-bezier(.2,0,0,1) infinite; }
.mark .mk-a { animation-delay: .35s; } .mark .mk-mid { animation-delay: .75s; } .mark .mk-b { animation-delay: .95s; }
@keyframes redraw { 0% { stroke-dashoffset: 200; } 14%, 80% { stroke-dashoffset: 0; } 94%, 100% { stroke-dashoffset: -200; } }
.mark .mk-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: dot .45s cubic-bezier(.2,0,0,1) .1s forwards, float 4s ease-in-out 1.8s infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.intro h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 7.4vw, 6rem); line-height: .95; letter-spacing: -.03em; }
.intro .lede { margin: 0; font-size: 1.3rem; line-height: 1.55; color: #475467; max-width: 820px; }
.starts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pill { border-radius: 99px; padding: 1.05rem 2.1rem; font-size: 1.12rem; font-family: var(--display); }
.pill-dark { background: var(--ink); color: #fff; }
.pill-gold { background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px -12px rgba(237,161,0,.8); }
.pill-story { color: #fff; background: linear-gradient(100deg, #6D4AE8, #2459E8 55%, #14B8A6); box-shadow: 0 10px 24px -12px rgba(109,74,232,.8); }
.pill-story .ic { width: 16px; height: 16px; }
.caption .sep, #t-count { display: none; }
.pill-light { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.pill-light .ic { width: 16px; height: 16px; }

.by { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--border); padding: 24px 14px 0; margin-top: 4px; text-decoration: none; text-align: left; color: #344054; border-radius: 0 0 14px 14px; }
.by:hover b { text-decoration: underline; }
.by img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--border); }
.by small { display: block; font-size: .8rem; color: var(--muted); }
.by b { display: block; color: var(--ink); font-family: var(--display); font-size: 1.12rem; }
.vnote { margin: 0; max-width: 720px; font-size: .78rem; color: #98A2B3; }
.vnote a { color: inherit; }
.app:not(.touring) { background: #fff; }
/* The story page */
.storypage { width: 100%; max-width: min(1500px, calc((100vh - 200px) * 2.55)); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.screen[data-screen="story"].on { min-height: calc(100vh - 2.8rem); display: flex; flex-direction: column; justify-content: center; }
.storypage .kick { align-self: flex-start; margin: 0; }
.motion { width: 100%; height: 420px; border: 0; display: block; border-radius: 22px; }
@media (prefers-reduced-motion: reduce) { .mark line { stroke-dashoffset: 0; } .mark .mk-dot { transform: none; } }

/* Model ready: build animation, then the scores */
.readybox { position: relative; overflow: hidden; }
.build { position: absolute; inset: 0; z-index: 2; background: #fff; display: none; flex-direction: column; align-items: center;
         justify-content: center; gap: .8rem; text-align: center; }
.readybox.building .build { display: flex; }
.ring { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #E9E3FC; border-top-color: #6D4AE8; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btxt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.bbar { width: min(360px, 80%); height: 6px; border-radius: 99px; background: #EDE9FE; overflow: hidden; }
.bbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6D4AE8, #2459E8); }
.readybox.building .bbar span { animation: fill 2.6s ease-in-out forwards; }
@keyframes fill { to { width: 100%; } }
.bdone { display: none; font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--good); align-items: center; gap: .6rem; }
.bdone span { width: 44px; height: 44px; border-radius: 50%; background: #DCFAE6; display: grid; place-items: center; font-size: 1.4rem; animation: pop .4s ease; }
@keyframes pop { from { transform: scale(.4); } 70% { transform: scale(1.15); } to { transform: none; } }
.readybox.isdone .bdone { display: flex; }
.readybox.isdone .ring, .readybox.isdone .btxt, .readybox.isdone .bbar { display: none; }
table.fit { margin: .2rem 0 .8rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table.fit td, table.fit th { text-align: left; white-space: normal; }
table.fit td:nth-child(2) { font-weight: 700; font-family: var(--display); }

/* GeoX */
.why { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.why b { font-family: var(--display); }
.why p { margin: .2rem 0 0; }
.why .arrow { font-size: 1.6rem; color: #6D4AE8; }
.gx2 { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
.gx2 svg { width: 100%; height: auto; display: block; }
.lgd { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.lgd i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; margin-right: .4rem; vertical-align: middle; }
.note { font-size: .78rem !important; color: var(--muted); margin: .4rem 0 0; }
.prior { display: grid; grid-template-columns: 120px 1fr 120px; gap: .8rem; align-items: center; margin: .5rem 0; font-size: .88rem; }
.rbar { position: relative; height: 14px; border-radius: 99px; background: #F2F4F7; }
.rbar span { position: absolute; top: 0; bottom: 0; border-radius: 99px; }

/* Last screen: how to run it */
.ostabs { display: inline-flex; gap: .25rem; background: #F2F4F7; border-radius: 10px; padding: .2rem; margin-bottom: .6rem; }
.ostabs button { border: 0; background: none; padding: .35rem .9rem; border-radius: 8px; font: 600 .88rem var(--body); color: var(--muted); cursor: pointer; }
.ostabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.more { margin-top: .9rem; background: #F4F0FF; border: 1px solid #DDD3FE; color: #3E1C96; border-radius: 12px; padding: .8rem 1rem; font-size: .93rem; }
.more b { display: block; font-family: var(--display); font-size: 1.02rem; margin-bottom: .15rem; }
.me { display: flex !important; align-items: center; gap: .6rem; margin-top: .8rem; padding: .5rem .6rem !important; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0 !important; }
.me img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.6); flex: none; }
.me b { display: block; color: #fff; font-size: .9rem; }
.me small { display: block; color: #93A3C4; font-size: .74rem; }
.safe { background: #ECFDF3; border: 1px solid #ABEFC6; color: #054F31; border-radius: 12px; padding: .8rem 1rem; margin-bottom: .9rem; font-size: .95rem; }
.safe b { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: .15rem; }
.code { position: relative; }
.code pre { padding-right: 5.5rem; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.copy { position: absolute; top: .55rem; right: .55rem; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff;
        border-radius: 8px; padding: .3rem .7rem; font: 600 .8rem var(--body); cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.2); }
.runs { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.runs .box { margin: 0; }
pre { background: var(--navy); color: #E6EDF8; border-radius: 10px; padding: .7rem .9rem; overflow-x: auto; font-size: .82rem; margin: .3rem 0 .7rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Simulated app pieces ---------- */
.screen { display: none; }
.screen.on { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.kick { color: var(--primary); font-weight: 700; font-size: .78rem; margin-bottom: .7rem; }
.screen h3 { font-size: 1.35rem; margin: .1rem 0 .6rem; }
.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.pills span { font-size: .75rem; padding: .2rem .6rem; border-radius: 99px; border: 1px solid var(--border); background: #fff; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .75rem; }
.tile .k { font-size: .74rem; color: var(--muted); }
.tile .v { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.tile .d { font-size: .72rem; color: var(--muted); }
.tile .up { color: var(--good); font-weight: 700; }
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: .8rem; }
table { border-collapse: collapse; width: 100%; font-size: .8rem; font-variant-numeric: tabular-nums; }
th, td { padding: .4rem .6rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; background: #F8FAFC; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .25rem; margin-bottom: .8rem; }
.tabs span { padding: .35rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.tabs span.on { background: linear-gradient(135deg, #2459E8, #5B4BDB); color: #fff; }
.chart { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .6rem; }
.chart svg { width: 100%; height: auto; display: block; }
.fakebtn { display: inline-flex; align-items: center; gap: .4rem; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem;
           padding: .45rem .8rem; border-radius: 9px; margin: .2rem 0 .8rem; }
.slider { height: 6px; background: #E4E7EC; border-radius: 99px; position: relative; margin: .9rem 0 .4rem; }
.slider span { position: absolute; height: 100%; background: var(--primary); border-radius: 99px; }
.callout { background: #EEF3FF; border: 1px solid #D5E0FD; color: #1D3A8A; border-radius: 12px; padding: .6rem .8rem; font-size: .85rem; margin-bottom: .8rem; }

/* Mock app pieces for the tour screens */
.box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .8rem; }
.boxh { font-family: var(--display); font-weight: 700; margin-bottom: .45rem; }
.box p { font-size: .9rem; color: var(--muted); }
.exp { font-size: .82rem; font-weight: 600; margin: .1rem 0 .4rem; color: #344054; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.field { display: flex; flex-direction: column; gap: .15rem; font-size: .74rem; color: var(--muted); }
.field em { font-style: normal; font-size: .84rem; color: var(--ink); background: #F8FAFC; border: 1px solid var(--border); border-radius: 8px; padding: .3rem .5rem; }
.chgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .55rem; }
.chcard { border: 1px solid var(--border); border-top: 4px solid #CBD2E0; border-radius: 10px; padding: .5rem .6rem; display: grid; gap: .35rem; }
.chcard.add { place-items: center; color: var(--primary); font-weight: 700; border-style: dashed; border-top-width: 1px; min-height: 90px; }
.chhead { display: flex; justify-content: space-between; align-items: center; }
.chicons { color: var(--muted); font-size: .8rem; letter-spacing: .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips span { background: #EEF3FF; color: #1D3A8A; border-radius: 8px; padding: .25rem .6rem; font-size: .82rem; font-weight: 600; }
.radio { font-size: .82rem; color: var(--muted); }
.minihero { background: linear-gradient(135deg, var(--navy), #15306B); color: #fff; border-radius: 14px; padding: 1rem; }
.minihero b { font-family: var(--display); font-size: 1.2rem; display: block; margin-bottom: .3rem; }
.minihero p { color: #C9D4EC; font-size: .88rem; }
.fakebtn.gold { background: var(--gold); color: var(--navy); }
.fakebtn.ghost { background: rgba(255,255,255,.12); }
.shot { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .4rem; width: fit-content; max-width: 100%; }
.vchart { min-height: 200px; overflow-x: auto; }
.vchart svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.vchart table { margin: .4rem; width: auto; font-size: .9rem; }
.vload { padding: 3rem 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
.startcards { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: .8rem; }
.startcard { margin: 0; display: flex; flex-direction: column; gap: .3rem; position: relative; }
.startcard.hot { border-color: #9DB7F5; }
.hotchip { align-self: flex-start; background: #DCFAE6; color: #067647; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: .1rem .55rem; }
.drop { margin-top: auto; border: 2px dashed #C9D2E3; border-radius: 12px; padding: 1rem; text-align: center; font-size: .9rem; color: #344054; }
.drop small { display: block; color: var(--muted); font-size: .75rem; margin-top: .3rem; }
.ghostbtn { background: #fff; color: var(--ink); border: 1px solid var(--border); margin-top: auto; justify-content: center; }
.bigbtn { font-size: 1rem; padding: .6rem 1.2rem; margin-top: .6rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.checks span { background: #ECFDF3; color: #067647; border-radius: 8px; padding: .2rem .6rem; font-size: .82rem; font-weight: 600; }
.shot img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 90px); margin: 0 auto; border-radius: 8px; }


/* ---------- Tour caption ---------- */
.caption { background: linear-gradient(var(--surface), var(--surface)) padding-box,
           linear-gradient(135deg, #6D4AE8, #2459E8, #14B8A6) border-box; border: 2px solid transparent; border-radius: 18px;
           padding: .9rem 1.1rem .8rem; box-shadow: 0 18px 44px -18px rgba(11,27,63,.6); }
.caption.floating { position: absolute; z-index: 5; top: 16px; left: 280px; max-width: calc(100% - 24px);
}
.caption:focus { outline: none; }
.caption .top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; font-size: .8rem; font-weight: 700; color: #6941C6; }
.caption .sep { color: #B9A8F5; }
.caption h3 { margin: .45rem 0 .2rem; font-size: 1.2rem; }
.caption p { margin: 0 0 .65rem; color: #344054; }
.progress { height: 5px; background: #EDE9FE; border-radius: 99px; overflow: hidden; margin: .45rem 0 .1rem; }
.progress span { display: block; height: 100%; width: 0; background: #6D4AE8; }
.ctrl { display: flex; flex-wrap: wrap; gap: .5rem; }
.ctrl .btn { padding: .45rem .8rem; font-size: .88rem; }
.btn-link { background: transparent; color: #6941C6; text-decoration: underline; padding-left: .4rem; padding-right: .4rem; }
.keys { margin-top: .45rem; font-size: .72rem; color: #98A2B3; }
[hidden] { display: none !important; }

/* Spotlight: one ring with a huge shadow dims everything but the part being explained (the sidebar stays above it). */
.spot { position: absolute; z-index: 3; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(11,27,63,.55), 0 0 0 3px var(--gold);
        }
.spot::after { content: ""; position: absolute; inset: -3px; border-radius: 16px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,209,102,.7); } 50% { box-shadow: 0 0 0 9px rgba(255,209,102,0); } }

/* ---------- Small screens: chapters become a scrolling strip on top ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { position: sticky; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 16px; }
  .brand { margin: 0; }
  #chapters { display: flex; overflow-x: auto; width: 100%; gap: .3rem; scrollbar-width: none; }
  .subs, .chev { display: none !important; }
  .chap { width: auto; white-space: nowrap; padding: .35rem .6rem; font-size: .82rem; }
  .side-foot, .fold { display: none; }
  .app-main { padding: 1rem 16px 3rem; }
  .startcards, .gx2, .why { grid-template-columns: 1fr; }
  .why .arrow { display: none; }
  .prior { grid-template-columns: 1fr; gap: .3rem; }
  .app.folded { grid-template-columns: minmax(0, 1fr); }
  .app.folded .brandtext { display: block; }
  .app.folded .chap > span:not(.n) { display: inline; }
  .app.folded .brand { flex-direction: row; margin: 0; }
  .keys { display: none; }
  .caption.floating { position: fixed; top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; z-index: 7;
                      max-height: 52vh; overflow-y: auto; padding: .7rem .9rem; transition: none; }
  .caption h3 { font-size: 1.05rem; }
  .caption p { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
