/* ───────────────────────────────────────────────────────────────────────────
   Shared scene styles for the case-study animations (cs-*.html). Loaded after
   tour-engine.css. All companies, people and figures in those animations are
   samples: never put a real customer's name or numbers in them.
   ─────────────────────────────────────────────────────────────────────────── */
:root { --age0: #2E9E8F; --age1: #E9D45B; --age2: #F0A43C; --age3: #E2662A; --age4: #C9302C; --nd: #4C7547; }
:root[data-theme="dark"] { --age0: #4FC2B2; --age1: #F2DF73; --age2: #F5B454; --age3: #F0804A; --age4: #F0797D; --nd: #ACC3A6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --age0: #4FC2B2; --age1: #F2DF73; --age2: #F5B454; --age3: #F0804A; --age4: #F0797D; --nd: #ACC3A6; } }

.cs-scene { position: absolute; left: 0; right: 0; top: 46px; bottom: 0; }
.cs-bar { position: absolute; left: 0; right: 0; top: 0; height: 46px; background: var(--nav); color: var(--nav-text); display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.cs-bar .logo { font: 700 16px/1 var(--font-head); letter-spacing: .06em; color: #fff; }
.cs-bar .logo b { color: var(--sage); }
.cs-bar .rname { font-size: 13px; font-weight: 600; color: #fff; opacity: .92; }
.cs-bar .sample { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--sage); }

/* dashboard tiles */
.dash { position: absolute; inset: 14px 16px; display: grid; gap: 12px; }
.t { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 12px 14px; position: relative; overflow: hidden; }
.t h6 { margin: 0 0 8px; font: 700 13px/1.2 var(--font-body); color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.t h6 small { font-weight: 500; color: var(--muted); font-size: 11px; }
.kp .kl { font-size: 12px; color: var(--muted); font-weight: 600; }
.kp .kv { font: 700 32px/1.1 var(--font-head); color: var(--text); margin-top: 8px; letter-spacing: -.01em; }
.kp .kv.bad { color: var(--age4); }
.kp .ks { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.brand { display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, var(--nav), #33405A); color: #fff; }
.brand .bn { font: 700 22px/1.1 var(--font-head); letter-spacing: .02em; }
.brand .bs { font-size: 11px; opacity: .75; margin-top: 4px; }
.brand .bd { font-size: 11px; opacity: .85; margin-top: 12px; }
.hb { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 11.5px; color: var(--text-body); }
.hb .hl { width: 92px; text-align: right; font-weight: 600; color: var(--text); white-space: nowrap; }
.hb .track { flex: 1; display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--bg-alt); }
.hb .track i { display: block; height: 100%; }
.hb .hv { width: 62px; font-weight: 700; color: var(--text); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; background: var(--c); vertical-align: -1px; }
.slider { margin-top: 8px; }
.slider .sv { width: 64px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12px; color: var(--text); background: var(--card); }
.slider .rail { position: relative; height: 4px; border-radius: 2px; background: var(--border); margin: 14px 4px 4px; }
.slider .fillr { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--info); }
.slider .knob { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; border: 2px solid var(--info); box-shadow: var(--shadow-sm); }
.slider .mm { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); }

/* tables */
.ct { width: 100%; border-collapse: collapse; font-size: 12px; }
.ct th { text-align: left; padding: 7px 9px; font-weight: 600; color: var(--text); background: var(--bg-alt); border-bottom: 1px solid var(--border); white-space: nowrap; }
.ct td { padding: 7px 9px; border-bottom: 1px solid var(--border-soft); color: var(--text-body); white-space: nowrap; }
.ct .num { text-align: right; font-variant-numeric: tabular-nums; }
.ct tr.l1 td:first-child { padding-left: 26px; }
.ct tr.l2 td:first-child { padding-left: 44px; color: var(--muted); }
.ct tr.hot td { background: color-mix(in srgb, var(--age4) 9%, transparent); }
.ct tr.sel td { background: var(--primary-soft); }
.pm { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid var(--faint); border-radius: 3px; font-size: 10px; line-height: 1; margin-right: 6px; color: var(--muted); vertical-align: -2px; }
.age-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: #fff; }

/* the "scheduler recipe" card: the real setting names, filled in */
.recipe { position: absolute; width: 360px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.recipe .rh { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); font: 700 14px/1.2 var(--font-head); color: var(--text); }
.recipe .rh .ri { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.recipe .rh small { display: block; font: 500 11px/1.3 var(--font-body); color: var(--muted); margin-top: 2px; }
.recipe .rr { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.recipe .rr:last-child { border-bottom: 0; }
.recipe .rr span { color: var(--muted); }
.recipe .rr b { color: var(--text); font-weight: 600; text-align: right; }
.recipe .rr b.on { color: var(--primary); }

/* deliveries */
.mail { position: absolute; width: 300px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.mail .mh { padding: 9px 12px; background: var(--bg-alt); border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.mail .mh b { color: var(--text); display: block; font-size: 12.5px; margin-bottom: 2px; }
.mail .mb { padding: 10px 12px; font-size: 11.5px; color: var(--text-body); line-height: 1.5; }
.mail .att { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 5px 9px; border-radius: 6px; background: color-mix(in srgb, #1F7A47 12%, transparent); color: #1F7A47; font-weight: 600; font-size: 11px; }
:root[data-theme="dark"] .mail .att { color: #6FCF97; }
.phone { position: absolute; width: 250px; height: 420px; border-radius: 30px; background: #0E1A14; padding: 14px 10px; box-shadow: var(--shadow); }
.phone .scr { height: 100%; border-radius: 22px; background: #E8E1D6; overflow: hidden; display: flex; flex-direction: column; }
.phone .ph { background: #1F5E4E; color: #fff; font-size: 12px; font-weight: 600; padding: 10px 12px; }
.phone .ph small { display: block; font-weight: 400; opacity: .8; font-size: 10px; }
.bubble { margin: 10px; padding: 9px 11px; border-radius: 10px 10px 10px 2px; background: #fff; color: #1C232E; font-size: 11.5px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.bubble b { color: #1F5E4E; }
.bubble .tm { display: block; text-align: right; font-size: 9.5px; color: #8A8F94; margin-top: 4px; }
.who { position: absolute; width: 210px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 12px; display: flex; gap: 10px; align-items: center; }
.who .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 12px/1 var(--font-body); flex: none; }
.who b { display: block; font-size: 13px; color: var(--text); }
.who small { font-size: 11px; color: var(--muted); }
.who .cnt { margin-left: auto; font: 700 18px/1 var(--font-head); color: var(--age4); }
.env { position: absolute; width: 40px; height: 28px; border-radius: 5px; background: var(--card); border: 1.5px solid var(--info); color: var(--info); display: grid; place-items: center; font-size: 13px; box-shadow: var(--shadow-sm); }
.tick { color: #2E9E5B; font-weight: 700; }
.big-k { position: absolute; font: 600 12px/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--primary); }
.big-t { position: absolute; font: 700 30px/1.15 var(--font-head); color: var(--text); letter-spacing: -.01em; }
.chip2 { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-body); }
.chip2.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.flowbtn { display: inline-grid; place-items: center; width: 26px; height: 22px; border-radius: 6px; background: var(--c2); color: #fff; font-size: 11px; position: relative; }
.flowbtn .dot { position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--card); background: #2E9E5B; display: none; }
.tok { display: inline-block; padding: 0 6px; border-radius: 5px; background: color-mix(in srgb, var(--c2) 15%, transparent); color: var(--c2); font-weight: 600; }

/* ── The camera world: one full dashboard, flown over by CS.cam / CS.fit ── */
.cs-scene { overflow: hidden; background: var(--app-bg); }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.world .t { position: absolute; }
#ov { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
#ov .recipe, #ov .mail, #ov .phone, #ov .who, #ov .panel { z-index: 41; }
.viewas { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 45; padding: 8px 14px; border-radius: 999px; background: var(--nav); color: #fff; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); display: none; white-space: nowrap; }
.viewas b { color: var(--sage); }
.tabsr { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: -2px -14px 10px; padding: 0 10px; }
.tabsr span { padding: 7px 10px; font-size: 11.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabsr span.on { color: var(--text); font-weight: 700; border-bottom-color: var(--nav); }
.decide { position: absolute; right: 10px; top: 10px; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--c4); padding: 3px 7px; border-radius: 4px; }
.decide.auto { background: var(--c2); }
.decide.ml { background: var(--c3); }
.ai-sum { font-size: 12px; line-height: 1.55; color: var(--text-body); }
.ai-sum b { color: var(--text); }
.ai-sum .hi { color: var(--age4); font-weight: 700; }
.ai-q { margin-top: 8px; padding: 7px 10px; border-radius: 10px 10px 2px 10px; background: var(--nav); color: #fff; font-size: 11.5px; display: inline-block; }
.ai-a { margin-top: 6px; padding: 7px 10px; border-radius: 10px 10px 10px 2px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 11.5px; color: var(--text-body); }
.mini { width: 100%; border-collapse: collapse; font-size: 11px; }
.mini td, .mini th { padding: 5px 6px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; color: var(--text-body); }
.mini th { text-align: left; color: var(--muted); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.mini .num { text-align: right; font-variant-numeric: tabular-nums; }
.scorebar { display: inline-block; height: 7px; border-radius: 4px; background: linear-gradient(90deg, var(--age2), var(--age4)); vertical-align: 1px; margin-right: 6px; }
.flag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.flag.r { background: color-mix(in srgb, var(--age4) 14%, transparent); color: var(--age4); }
.flag.a { background: color-mix(in srgb, var(--age2) 18%, transparent); color: var(--age3); }
.flag.g { background: color-mix(in srgb, #2E9E5B 14%, transparent); color: #2E9E5B; }

/* ── Rich chart tooltip (CS.tip): title, then grouped measures per series ── */
.ctip { position: absolute; z-index: 46; min-width: 280px; max-width: 330px; background: #2A2D33; color: #F2F3F5; border-radius: 10px; padding: 12px 16px 10px; box-shadow: 0 14px 40px rgba(0,0,0,.35); display: none; font-size: 13px; pointer-events: none; transform-origin: 0 0; }
.ctip .tt { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.ctip .tg { margin-top: 8px; }
.ctip .tg > span { display: block; font-size: 12px; color: #C9CDD3; margin-bottom: 2px; }
.ctip .tr { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.ctip .tr i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ctip .tr em { font-style: normal; flex: 1; color: #E6E8EB; }
.ctip .tr b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.hoverbar { outline: 2px solid color-mix(in srgb, var(--info) 60%, transparent); outline-offset: 2px; border-radius: 4px; }
