/* AURIFORTH /aimotion/cctv/ — AI CCTV Command Center deck (demo 01 of the AI Motion suite; the hub is /aimotion/).
   Load after /aimotion/suite.css (tokens, base, header, suite nav, buttons, forms). Does not load /assets/css/site.css. Visual language: Apple — light surfaces
   (#fff / #f5f5f7 / #fbfbfd), #1d1d1f text, #6e6e73 secondary, #d2d2d7 hairlines, Apple blue #0071e3 for actions
   and #0066cc for links, pill buttons, 18–28px cards, translucent bars. Dark (#000 / #1d1d1f) only where video,
   camera or the 3D canvas needs it. CSP: no inline styles anywhere; dynamic values are set through CSSOM. */


/* ---------- deck & slides ---------- */
.deck { display: block; }
.slide { display: none; position: relative; isolation: isolate; min-height: calc(100vh / var(--z, 1)); min-height: calc(100svh / var(--z, 1)); background: var(--bg-alt);
  padding: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 56px) var(--pad-r) calc(var(--nav-h) + var(--safe-b) + 64px) var(--pad-l); }
.slide.active { display: block; animation: slideIn .6s var(--ease) both; }
.slide > :not(picture):not(.shade) { max-width: var(--max); margin-left: auto; margin-right: auto; }
.kicker { font-size: 17px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.slide h1, .hero-title { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.05; font-weight: 700; letter-spacing: -.015em; margin: 10px 0 22px; }
.slide h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.07; font-weight: 700; letter-spacing: -.012em; margin: 4px 0 14px; }
html[lang="th"] .slide h1, html[lang="th"] .hero-title { font-weight: 600; line-height: 1.22; letter-spacing: 0; font-size: clamp(36px, 5.6vw, 70px); }
html[lang="th"] .slide h2 { font-weight: 600; line-height: 1.25; letter-spacing: 0; font-size: clamp(30px, 3.9vw, 50px); }
.slide h2 em, .slide h1 em { color: var(--blue); }
.slide .hero-title { margin: 10px 0 22px; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .slide h2 em, .slide h1 em { background: linear-gradient(90deg, #0071e3, #7d5bf0 60%, #c13ccf); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
  .slide--dark .hero-title em { background-image: linear-gradient(90deg, #2997ff, #a78bfa 60%, #ff6bd6); }
}
.lead, .df-sub, .sz-sub, .org-sub, .command-sub { color: var(--text-2); }
.lead { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.42; max-width: 820px; }
.lead-19 { font-size: clamp(17px, 1.6vw, 21px); margin-bottom: 26px; }
.df-sub, .sz-sub, .org-sub { font-size: 19px; line-height: 1.45; margin: 0 0 28px; max-width: 900px; }
.command-sub { font-size: 15px; line-height: 1.5; }
.hint, .org-foot { font-size: 12px; line-height: 1.6; color: var(--text-2); margin-top: 22px; }
.hint a, .sz-note a, .deck-sources a, .org-foot a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.micro { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 16px; border-radius: 980px; background: var(--bg); color: var(--text-2); font-size: 14px; box-shadow: var(--shadow-sm); }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.insight { margin-top: 22px; padding: 22px 26px; border-radius: var(--r-lg); background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.55; }
.insight strong { color: var(--text); }
.insight-sub { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.swipe-hint { display: none; font-size: 12px; color: var(--text-2); margin: 10px 0 6px; }

/* cards */
.df-board, .vision-panel, .map-panel, .incident-panel, .war-visual, .war-controls, .war-flow-panel, .ig-panel, .ig-roadmap,
.sz-panel, .block, .tr-result, .org-settings, .org-table-wrap, .modebar, .tr-notice, .sz-assumption, .tr-method {
  background: var(--bg); border-radius: var(--r-xl); }
.panel-heading, .ig-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 12px;
  font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; }
.panel-meta, .ig-top > span:last-child { font-size: 12px; font-weight: 400; color: var(--text-2); text-align: right; }
.panel-icon { color: var(--demo-accent); margin-right: 6px; font-weight: 600; }

/* tables (Apple compare style: horizontal hairlines only) */
.detail-table, .org-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.5; }
.detail-table { margin-top: 26px; background: var(--bg); border-radius: var(--r-lg); overflow: hidden; }
.detail-table th, .detail-table td, .org-table th, .org-table td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid #e8e8ed; }
.detail-table th, .org-table th { font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg-soft); }
.detail-table tr:last-child td, .org-table tr:last-child td { border-bottom: 0; }
.detail-table td { color: var(--text); }
.detail-table td + td { color: var(--text-2); }

/* =============================================================== 01 hero (dark: the image needs it) */
.slide--dark { background: #000; color: #f5f5f7; }
.hero-slide { display: none; overflow: hidden; }
.hero-slide.active { display: flex; flex-direction: column; justify-content: center; }
.hero { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .78; z-index: -2; }
.shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #000 6%, rgba(0, 0, 0, .86) 36%, rgba(0, 0, 0, .1) 78%), linear-gradient(0deg, #000 0, transparent 30%); }
.intro-content { width: 100%; }
.intro-content > * { max-width: 660px; }
.hero-slide .kicker { color: #a1a1a6; }
.hero-slide .lead { color: #d2d2d7; }
.hero-slide .tag { background: rgba(255, 255, 255, .1); color: #e8e8ed; box-shadow: none; }
.detail-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 34px; }
.detail-strip strong { display: block; font-size: 17px; margin-bottom: 6px; }
.detail-strip p { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.hero-slide .detail-strip { max-width: 760px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); }
.hero-slide .detail-strip p { color: #a1a1a6; }
.hero-slide .btn-primary { font-size: 17px; padding: 12px 24px; }

/* =============================================================== 02 data flow */
.df-board { overflow: hidden; }
.df-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; padding: 20px 24px 6px; font-size: 14px; font-weight: 600; }
.df-toolbar > div { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 400; }
.df-key { font-size: 13px; }
.df-key.video { color: var(--link); } .df-key.meta { color: #d6003a; } .df-key.archive { color: var(--text-2); }
.record-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--alert); margin-right: 8px; vertical-align: 1px; animation: blink 1.2s infinite; }
.df-scroll, .ig-scroll, .war-flow-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.df-diagram { display: block; width: 100%; height: auto; padding: 8px 18px 0; }
.df-node > rect { fill: var(--bg-alt); stroke: transparent; stroke-width: 1.5; transition: fill .4s, stroke .4s; }
.df-node.active > rect { fill: var(--tint-blue); stroke: var(--blue); }
.df-gpu > rect:first-child { fill: #f2f7fd; stroke: #b9d6f6; }
.df-gpu.active > rect:first-child { fill: var(--tint-blue); stroke: var(--blue); }
.df-title { fill: var(--text); font: 600 14px var(--latin); }
.df-copy { fill: var(--text-2); font: 11.5px var(--latin); }
html[lang="th"] .df-title, html[lang="th"] .df-copy, html[lang="th"] .df-label, html[lang="th"] .flow-th, html[lang="th"] .flow-small,
html[lang="th"] .ig-title, html[lang="th"] .ig-copy { font-family: "Sarabun", var(--latin); }
.df-eyebrow { fill: var(--link); font: 600 10.5px var(--latin); }
.df-label { fill: var(--text-3); font: 600 9.5px var(--latin); text-anchor: middle; }
.df-toplabel { fill: var(--text-3); font: 600 11px var(--latin); }
.df-mod-title { fill: var(--text); font: 600 11.5px var(--latin); }
.df-wire { fill: none; stroke-width: 1.6; }
.df-wire.video { stroke: #7fb8f0; } .df-wire.meta { stroke: #ff8aa3; } .df-wire.archive { stroke: #c7c7cc; stroke-dasharray: 4 5; }
.df-packets { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 7 35; animation: dataPackets 1.8s linear infinite; }
.df-packets.video { stroke: var(--blue); } .df-packets.meta { stroke: #ff2d55; }
.df-stepbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 14px 22px 18px; }
.df-stepbar button { text-align: left; font-size: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-alt); }
.df-stepbar button.active { background: var(--text); color: #fff; }
.df-stepbar button small { display: block; font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.df-stepbar button.active small { color: #a1a1a6; }
.df-explainer { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px 24px; margin: 0 22px 22px; border-radius: var(--r-md); background: var(--bg-alt); min-height: 128px; }
.df-explainer span { font-size: 13px; font-weight: 600; color: var(--link); }
.df-explainer h3 { font-size: 21px; margin: 4px 0 6px; }
.df-explainer p { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.df-explainer button { white-space: nowrap; flex: none; }
.df-bottom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.df-bottom > div { background: var(--bg); border-radius: var(--r-lg); padding: 20px 22px; }
.df-bottom b, .sz-bottom b, .tr-bottom b, .org-notes b { display: block; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.df-bottom p { font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* =============================================================== 03 command center */
.command-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.system-badge { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 980px; background: var(--bg); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.system-badge i, .ux-status-strip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52, 199, 89, .18); }
.system-badge span { font-weight: 400; color: var(--text-2); }
.ux-status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; }
.ux-status-strip > span { display: block; padding: 14px 18px; border-radius: var(--r-md); background: var(--bg); font-size: 12px; font-weight: 600; color: var(--text-2); }
.ux-status-strip i { margin-right: 8px; vertical-align: 1px; }
.ux-status-strip b { display: block; margin-top: 4px; font-size: 17px; color: var(--text); }
.modebar { margin-top: 12px; padding: 16px; }
.playbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 4px 12px; font-size: 13px; color: var(--text-2); }
.autoflag { color: var(--demo-ink); font-weight: 600; }
#scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
#scenarios button, .tr-event-tabs button { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 72px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg-alt); color: var(--text); box-shadow: inset 0 0 0 1px transparent; }
#scenarios button:hover, .tr-event-tabs button:hover { background: #eeeef2; }
#scenarios button.active, .tr-event-tabs button.active { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 2px var(--card-accent), var(--shadow-sm); }
.acc-violet { --card-accent: #af52de; --card-glyph: #fff; } .acc-blue { --card-accent: #0071e3; --card-glyph: #fff; }
.acc-teal { --card-accent: #00a0b0; --card-glyph: #fff; } .acc-pink { --card-accent: #ff2d55; --card-glyph: #fff; }
.acc-amber { --card-accent: #ff9f0a; --card-glyph: #1d1d1f; } .acc-orange { --card-accent: #ff6a00; --card-glyph: #fff; }
.ux-event-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--card-accent); color: var(--card-glyph); font-size: 20px; line-height: 1; }
.ux-event-copy { display: block; min-width: 0; }
.ux-event-copy b { display: block; font-size: 15px; line-height: 1.3; }
.ux-event-copy small { display: block; margin-top: 2px; font-size: 11px; color: var(--text-2); }
.ux-event-check { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--card-accent); color: var(--card-glyph); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s var(--ease); }
button.active .ux-event-check { opacity: 1; transform: none; }
.ux-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 12px; font-size: 14px; font-weight: 600; }
.ux-viewbar small { font-size: 13px; font-weight: 400; color: var(--text-2); margin-left: 8px; }
.ux-viewbar > div { display: inline-flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 980px; }
.ux-viewbar button, .war-buttons button, .tr-clip-buttons button { background: transparent; color: var(--text); min-height: 38px; padding: 8px 16px; font-size: 13px; }
.ux-viewbar button:where(:hover), .war-buttons button:where(:hover), .tr-clip-buttons button:where(:hover) { background: rgba(0, 0, 0, .05); }
.ux-viewbar button.active, .war-buttons button.active, .tr-clip-buttons button.active,
.ux-viewbar button[aria-pressed="true"], .war-buttons button[aria-pressed="true"], .tr-clip-buttons button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 16px; align-items: start; }
.ops-panel { display: grid; gap: 16px; min-width: 0; }
.vision-panel, .map-panel, .incident-panel { overflow: hidden; min-width: 0; }
/* camera (dark: it is video) */
.camera { position: relative; margin: 0 14px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-md); background: #000; color: #fff; font-family: var(--latin); }
.camera picture { display: contents; }
.scene { position: absolute; top: 0; left: 0; width: 300%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 22%; }
.event-animation { display: none; position: absolute; inset: 0; width: 100%; height: 100%; }
.event-animation.is-on { display: block; }
.camera::after { content: ""; pointer-events: none; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0, transparent 3px, rgba(0, 0, 0, .14) 4px); opacity: .5; }
.scan { position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(transparent, rgba(100, 210, 255, .06), rgba(100, 210, 255, .28)); border-bottom: 1px solid rgba(100, 210, 255, .5); animation: scan 2.4s linear infinite; z-index: 1; }
.hud-corners { position: absolute; inset: 10px; pointer-events: none; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; z-index: 1; }
.camera-crosshair { position: absolute; top: 46%; left: 49%; color: rgba(255, 255, 255, .35); font: 26px var(--mono); pointer-events: none; z-index: 1; }
.camera-telemetry { position: absolute; top: 14px; right: 14px; text-align: right; z-index: 2; }
.camera-telemetry span { display: inline-block; padding: 5px 10px; border-radius: 980px; background: rgba(0, 0, 0, .55); color: var(--demo-accent); font: 600 11px var(--mono); }
.camera-telemetry small { display: block; margin-top: 6px; font: 9px var(--mono); color: rgba(255, 255, 255, .7); }
.camera-label { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; align-items: center; max-width: 60%; padding: 6px 12px; border-radius: 980px; background: rgba(0, 0, 0, .55); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .camera-label, .camera-telemetry span, .frame-time, .sim-label, .city-note { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.frame-time, .sim-label { position: absolute; bottom: 12px; z-index: 2; padding: 4px 10px; border-radius: 980px; background: rgba(0, 0, 0, .55); font-size: 11px; }
.frame-time { left: 14px; font-family: var(--mono); }
.sim-label { right: 14px; color: #d2d2d7; }
.bbox { position: absolute; z-index: 2; border: 2px solid var(--demo-accent); border-radius: 6px; opacity: 0; transition: opacity .35s; box-shadow: 0 0 22px rgba(0, 0, 0, .25); }
.bbox.is-on { opacity: 1; }
.bbox::before { content: attr(data-label); position: absolute; left: -2px; top: -26px; padding: 3px 9px; border-radius: 6px; background: var(--demo-accent); color: #fff; font: 600 11px var(--font); white-space: nowrap; }
.bbox::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--demo-accent); border-radius: 6px; animation: detect 1.4s ease-out infinite; }
.pipeline { display: flex; align-items: center; justify-content: space-around; gap: 6px; margin: 14px 14px 0; padding: 12px 10px; border-radius: var(--r-md); background: var(--bg-alt); }
.pipe-node { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--text-2); transition: color .4s; }
.pipe-node b { display: block; font-size: 20px; margin-bottom: 2px; color: #aeaeb2; transition: color .4s; }
.pipe-node.hot { color: var(--text); font-weight: 600; }
.pipe-node.hot b { color: var(--demo-accent); }
.pipe-link { position: relative; flex: 0 0 11%; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pipe-link::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 2px; border-radius: 2px; background: var(--demo-accent); animation: packet .9s linear infinite; }
.explanation { padding: 12px 18px; min-height: 48px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.sequence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 14px 16px; }
.sequence span { padding: 9px 4px; border-radius: 10px; background: var(--bg-alt); text-align: center; font-size: 12px; color: var(--text-2); transition: background .3s, color .3s; }
.sequence span.current { background: var(--tint-blue); background: color-mix(in srgb, var(--demo-accent) 14%, #fff); color: var(--demo-ink); font-weight: 600; }
/* map */
.spatial-v2 .panel-heading { align-items: flex-start; }
.spatial-overline { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.spatial-title { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.map-demo-badge { flex: none; font-size: 12px; font-weight: 600; color: var(--green-ink); background: var(--tint-green); padding: 5px 11px; border-radius: 980px; white-space: nowrap; }
.map-toolbar { display: flex; justify-content: space-between; gap: 10px; margin: 0 22px 10px; font-size: 13px; color: var(--text-2); }
.map-count { font-size: 12px; font-weight: 600; }
.spatial-canvas { position: relative; margin: 0 14px; border-radius: var(--r-md); overflow: hidden; background: #000; }
.city-tools { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #1d1d1f; }
.city-tools b { font-size: 12px; font-weight: 600; color: #f5f5f7; }
.city-tools div { display: flex; flex-wrap: wrap; gap: 6px; }
.city-tools button { min-height: 34px; min-width: 34px; padding: 6px 12px; font-size: 13px; color: #f5f5f7; background: rgba(255, 255, 255, .14); }
.city-tools button:where(:hover) { background: rgba(255, 255, 255, .24); }
.city-tools svg { display: block; }
#city3d { display: block; width: 100%; height: 480px; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#city3d.is-dragging { cursor: grabbing; }
.city-note { position: absolute; left: 12px; bottom: 12px; right: 12px; max-width: max-content; pointer-events: none; padding: 7px 12px; border-radius: 12px; background: rgba(0, 0, 0, .6); color: #f5f5f7; font-size: 12px; line-height: 1.5; }
.city-note > span:last-child { color: #a1a1a6; }
.city-hint--touch { display: none; }
@media (hover: none) and (pointer: coarse) { .city-hint--mouse { display: none; } .city-hint--touch { display: inline; } }
.spatial-canvas:fullscreen { width: calc(100vw / var(--z, 1)); height: calc(100vh / var(--z, 1)); margin: 0; border-radius: 0; }
.spatial-canvas:-webkit-full-screen { width: calc(100vw / var(--z, 1)); height: calc(100vh / var(--z, 1)); margin: 0; border-radius: 0; }
.spatial-canvas:fullscreen #city3d { height: calc(100vh / var(--z, 1) - 54px) !important; }
.spatial-canvas:-webkit-full-screen #city3d { height: calc(100vh / var(--z, 1) - 54px) !important; }
.map-focus { display: flex; align-items: center; gap: 12px; margin: 12px 14px; padding: 10px 14px; border-radius: var(--r-md); background: var(--bg-alt); }
.focus-marker { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--bg); color: var(--demo-accent); font-size: 18px; }
.focus-eyebrow { display: block; font-size: 11px; font-weight: 600; color: var(--text-2); }
.map-focus strong { display: block; font-size: 14px; }
.focus-state { margin-left: auto; flex: none; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 10px; border-radius: 980px; background: var(--bg); white-space: nowrap; }
.focus-state.alerting { color: #fff; background: var(--alert); }
.camera-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px 12px; }
.camera-switch button { text-align: left; padding: 9px 12px; border-radius: var(--r-sm); background: var(--bg-alt); font-size: 13px; font-weight: 600; min-height: 52px; }
.camera-switch button span { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--text-2); }
.camera-switch button i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #aeaeb2; margin-right: 6px; vertical-align: 1px; }
.camera-switch button.selected, .camera-switch button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 2px var(--demo-accent); }
.camera-switch button.selected i { background: var(--demo-accent); }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 22px 18px; font-size: 12px; color: var(--text-2); }
.map-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #aeaeb2; margin-right: 6px; vertical-align: 0; }
.map-key i.red { background: var(--alert); }
/* incident console */
.event-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 14px; font-size: 12px; color: var(--text-2); }
.event-card > div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-alt); min-width: 0; }
.event-card strong { display: block; margin-top: 2px; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.event-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 22px 10px; font-size: 19px; font-weight: 600; }
#phase { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 980px; color: var(--demo-ink); background: var(--tint-blue); background: color-mix(in srgb, var(--demo-accent) 13%, #fff); white-space: nowrap; }
.progress { height: 4px; margin: 0 22px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.progress i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--demo-accent); transition: width .5s var(--ease); }
.log { margin: 12px 22px 0; min-height: 48px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.incident-panel .buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 14px; }
.incident-panel #ack { grid-column: 1 / -1; }
.incident-panel #ack:disabled { color: var(--text-3); background: var(--fill); }
.command-center .hint { margin-top: 16px; }

/* one-screen dashboard (large landscape screens; JS adds .is-fit and scales .command-fit) */
.command-center.is-fit { height: calc(100vh / var(--z, 1)); height: calc(100dvh / var(--z, 1)); min-height: 0; padding: 0; overflow: hidden; }
.command-center.is-fit .command-fit { position: absolute; transform-origin: top left; width: 1200px; display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; gap: 10px; max-width: none; margin: 0; }
.is-fit .command-heading { gap: 12px; }
.is-fit .kicker { font-size: 14px; margin: 0; }
html .command-center.is-fit h2 { font-size: 32px; line-height: 1.15; margin: 2px 0; }
.is-fit .command-sub { font-size: 13px; }
.is-fit .ux-status-strip, .is-fit .modebar, .is-fit .ux-viewbar, .is-fit .demo-grid, .is-fit .hint { margin-top: 0; margin-bottom: 0; }
.is-fit .ux-status-strip > span { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 11px; }
.is-fit .ux-status-strip i { margin: 0; }
.is-fit .ux-status-strip b { margin: 0 0 0 auto; font-size: 13px; }
.is-fit .modebar { padding: 10px 12px; border-radius: var(--r-lg); }
.is-fit .playbar { margin-bottom: 8px; font-size: 12px; }
.is-fit #scenarios { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.is-fit #scenarios button { min-height: 52px; padding: 8px 10px; gap: 9px; }
.is-fit .ux-event-icon { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
.is-fit .ux-event-copy b { font-size: 13px; }
.is-fit .ux-event-copy small { font-size: 10px; }
.is-fit .ux-event-check { display: none; }
.is-fit .ux-viewbar { font-size: 13px; }
.is-fit .ux-viewbar button { min-height: 32px; padding: 5px 14px; font-size: 12px; }
.is-fit .demo-grid, .is-fit.ux-camera-focus .demo-grid, .is-fit.ux-map-focus .demo-grid { min-height: 0; height: 100%; align-items: stretch; gap: 12px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, .74fr); }
.is-fit.ux-camera-focus .demo-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, .74fr); }
.is-fit.ux-map-focus .demo-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr) minmax(0, .74fr); }
.is-fit .ops-panel { display: contents; }
.is-fit .vision-panel, .is-fit .map-panel, .is-fit .incident-panel { display: flex; flex-direction: column; min-height: 0; height: 100%; border-radius: var(--r-lg); }
.is-fit .vision-panel > *, .is-fit .map-panel > *, .is-fit .incident-panel > * { flex-shrink: 0; }
.is-fit .panel-heading { padding: 12px 16px 8px; font-size: 13px; min-height: 0; }
.is-fit .panel-meta { display: none; }
.is-fit .vision-panel .camera { flex: 1 1 auto; min-height: 140px; aspect-ratio: auto; margin: 0 10px; }
.is-fit .pipeline { margin: 8px 10px 0; padding: 7px; flex: none; }
.is-fit .pipe-node { font-size: 11px; } .is-fit .pipe-node b { font-size: 16px; margin: 0; }
.is-fit .explanation { padding: 7px 12px; min-height: 0; font-size: 12px; flex: none; }
.is-fit .sequence { margin: 0 10px 10px; gap: 4px; flex: none; }
.is-fit .sequence span { font-size: 11px; padding: 6px 2px; }
.is-fit .spatial-title { font-size: 15px; } .is-fit .spatial-overline { font-size: 11px; }
.is-fit .map-toolbar { margin: 0 16px 6px; font-size: 12px; }
.is-fit .map-panel .spatial-canvas { flex: 1 1 auto; min-height: 160px; display: flex; flex-direction: column; margin: 0 10px; }
.is-fit .spatial-canvas #city3d { flex: 1; height: 100% !important; min-height: 0; }
.is-fit .city-tools { padding: 7px 9px; } .is-fit .city-tools button { min-height: 30px; min-width: 30px; padding: 4px 10px; font-size: 12px; }
.is-fit .city-note { font-size: 11px; }
.is-fit .map-focus { margin: 8px 10px; padding: 6px 10px; flex: none; }
.is-fit .map-focus strong { font-size: 12px; }
.is-fit .camera-switch { padding: 0 10px 8px; gap: 5px; flex: none; }
.is-fit .camera-switch button { min-height: 0; padding: 5px 9px; font-size: 11px; }
.is-fit .camera-switch button span { font-size: 10px; }
.is-fit .map-key { padding: 0 14px 10px; font-size: 11px; flex: none; }
.is-fit .event-card { grid-template-columns: 1fr; gap: 4px; margin: 0 10px; font-size: 11px; }
.is-fit .event-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 10px; }
.is-fit .event-card strong { margin: 0; font-size: 12px; text-align: right; }
.is-fit .event-status { padding: 12px 14px 8px; font-size: 16px; }
.is-fit .progress { margin: 0 14px; }
.is-fit .incident-panel .log { flex: 1 1 auto; min-height: 36px; overflow: hidden; margin: 8px 14px 0; font-size: 13px; }
.is-fit .incident-panel .buttons { grid-template-columns: 1fr 1fr; margin-top: auto; padding: 10px; gap: 6px; }
.is-fit .incident-panel button { min-height: 40px; font-size: 13px; padding: 8px 10px; }
.is-fit .hint { font-size: 11px; }

/* =============================================================== 04 war room */
.war-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.war-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 16px; }
.war-visual, .war-controls, .war-flow-panel { overflow: hidden; min-width: 0; }
.war-room { display: block; width: calc(100% - 28px); height: auto; margin: 0 14px; border-radius: var(--r-md); background: #000; }
.wall-feed { cursor: pointer; transition: opacity .4s; outline: none; }
.wall-feed:hover > rect, .wall-feed.selected > rect { stroke: #2997ff; stroke-width: 2.5; }
.wall-feed:focus-visible > rect { stroke: #fff; stroke-width: 3; }
.war-room.focus-mode .wall-feed:not(.selected) { opacity: .2; }
.war-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 16px 22px 20px; font-size: 14px; }
.war-selection > span:last-child { margin-left: auto; font-size: 13px; font-weight: 600; color: #d6003a; }
.war-led-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--alert); animation: blink 1.5s infinite; }
.war-module { padding: 14px 22px; border-top: 1px solid #e8e8ed; }
.war-module b { font-size: 15px; }
.war-module p { font-size: 14px; line-height: 1.55; color: var(--text-2); margin-top: 4px; }
.war-buttons { display: inline-flex; gap: 2px; margin-top: 12px; padding: 3px; border-radius: 980px; background: var(--fill); }
.war-connection { padding: 14px 22px 20px; font-size: 13px; color: var(--green-ink); border-top: 1px solid #e8e8ed; }
.war-flow-panel { margin-top: 16px; }
.war-flow { display: block; width: 100%; height: auto; padding: 4px 16px; }
.flow-card rect { fill: var(--bg-alt); stroke: transparent; }
.flow-card text { text-anchor: middle; font: 600 10.5px var(--latin); fill: var(--link); }
.flow-card .flow-th { font: 600 12.5px var(--latin); fill: var(--text); }
.flow-card .flow-small { font: 11px var(--latin); fill: var(--text-2); }
.wf-vpn { fill: var(--text-3); font: 600 9px var(--latin); }
.gpu-core rect { fill: #f2f7fd; stroke: var(--blue); stroke-width: 1.5; animation: gpuGlow 2s ease-in-out infinite; }
.war-packets { animation: warPackets 1.7s linear infinite; }
.war-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 22px 22px; }
.war-services span { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.war-services b { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.wall-detect { animation: blink 2s infinite; }
.wall-car { animation: wallCar 5s linear infinite; }
.wall-flame { transform-box: fill-box; transform-origin: bottom; animation: fireBK .8s infinite alternate; }
.wall-smoke { animation: wallSmoke 3s linear infinite; }
.war-led { animation: blink 1.4s infinite; }

/* =============================================================== 05 / 06 flows, architecture */
.ig-panel, .ig-roadmap { overflow: hidden; margin-top: 8px; }
.ig-svg { display: block; width: 100%; height: auto; padding: 4px 16px 16px; }
.ig-box > rect { fill: var(--bg-alt); stroke: transparent; }
.ig-title { font: 600 15px var(--latin); fill: var(--text); }
.ig-copy { font: 11.5px var(--latin); fill: var(--text-2); }
.ig-over { font: 600 11px var(--latin); fill: var(--link); }
.ig-path { fill: none; stroke: var(--line); stroke-width: 2; }
.ig-travel { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 9 38; animation: igTravel 2s linear infinite; }
.ig-chip { animation: igChip 2.5s ease-in-out infinite; }
.architecture { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.block { padding: 24px; }
.block h3 { font-size: 21px; margin-bottom: 10px; }
.block p { font-size: 15px; line-height: 1.75; color: var(--text-2); }
.cloud-provider { box-shadow: inset 0 0 0 2px var(--blue); }
.cloud-provider .micro { color: var(--link); }
.cloud-architecture .detail-strip { margin-top: 16px; gap: 16px; }
.cloud-architecture .detail-strip > div { background: var(--bg); border-radius: var(--r-lg); padding: 20px 22px; }

/* =============================================================== 07 pilot */
.ig-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 6px 22px 22px; }
.ig-stage { position: relative; overflow: hidden; display: block; text-align: left; padding: 18px; min-height: 200px; border-radius: var(--r-lg); background: var(--bg-alt); color: var(--text); }
.ig-stage:where(:hover) { background: #eeeef2; }
.ig-stage.active, .ig-stage[aria-pressed="true"] { background: var(--bg); box-shadow: inset 0 0 0 2px var(--blue), var(--shadow); }
.ig-stage-num { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ig-stage-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 14px 0; border-radius: 15px; background: var(--tint-blue); color: var(--blue); font-size: 26px; }
.ig-stage strong { display: block; font-size: 19px; margin-bottom: 6px; }
.ig-stage-desc { display: block; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.ig-stage-line { position: absolute; left: 0; bottom: 0; height: 3px; width: 25%; border-radius: 3px; background: var(--blue); opacity: .55; animation: igStage 4s ease-in-out infinite; }
.ig-stage:nth-child(2) .ig-stage-line { animation-delay: -1s; } .ig-stage:nth-child(3) .ig-stage-line { animation-delay: -2s; } .ig-stage:nth-child(4) .ig-stage-line { animation-delay: -3s; }
.ig-pilot-detail { margin: 0 22px 22px; padding: 22px 24px; border-radius: var(--r-md); background: var(--bg-alt); min-height: 136px; }
.ig-pilot-detail .ig-over { font-size: 13px; font-weight: 600; color: var(--link); }
.ig-pilot-detail h3 { font-size: 21px; margin: 4px 0 6px; }
.ig-pilot-detail p { font-size: 15px; line-height: 1.65; color: var(--text-2); }
.ig-gates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.ig-gates > div { padding: 20px 22px; border-radius: var(--r-lg); background: var(--bg); }
.ig-gates span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tint-blue); color: var(--blue); font-size: 17px; margin-bottom: 12px; }
.ig-gates b { font-size: 17px; }
.ig-gates p { font-size: 14px; line-height: 1.55; color: var(--text-2); margin-top: 4px; }
.ig-guardrails { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ig-guardrails span { padding: 9px 16px; border-radius: 980px; background: var(--bg); font-size: 14px; color: var(--text-2); }
.ig-guardrails b { color: var(--text); margin-right: 6px; }

/* =============================================================== 08 sizing */
.sz-assumption, .tr-notice, .tr-method { display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; padding: 18px 22px; border-radius: var(--r-lg); font-size: 15px; }
.sz-assumption b, .tr-method b { font-size: 15px; color: var(--text); }
.sz-assumption span, .tr-method span { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.sz-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; }
.sz-panel { overflow: hidden; min-width: 0; }
.sz-profile { padding: 0 22px; }
.sz-profile label, .sz-inputs label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.sz-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px 22px; }
.sz-inputs label { margin: 0; }
.sz-inputs input { margin-top: 8px; font-size: 22px; font-weight: 600; }
.sz-note { margin: 4px 22px 16px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.sz-formula { margin: 0 14px 14px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--bg-alt); font-size: 14px; line-height: 1.6; color: var(--text); }
.sz-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 8px 22px 18px; }
.sz-metrics strong { display: block; font-size: 44px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sz-metrics span { display: block; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.sz-rack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 22px 14px; }
.sz-chip { position: relative; overflow: hidden; padding: 11px 12px; border-radius: var(--r-sm); background: var(--bg-alt); }
.sz-chip span { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); }
.sz-chip b { display: block; font-size: 14px; margin: 2px 0; }
.sz-chip small { font-size: 12px; color: var(--text-2); }
.sz-chip.active { background: var(--tint-blue); } .sz-chip.active small, .sz-chip.active span { color: var(--link); }
.sz-chip.active::after { content: ""; position: absolute; left: 0; bottom: 0; width: 25%; height: 3px; border-radius: 3px; background: var(--blue); animation: igStage 3s linear infinite; }
.sz-chip.reserve { background: var(--tint-green); } .sz-chip.reserve small, .sz-chip.reserve span { color: var(--green-ink); }
.sz-fit { margin: 0 22px 12px; font-size: 15px; line-height: 1.6; color: var(--text); }
.sz-comparison { margin-top: 16px; }
.sz-comparison .detail-table { margin: 0; border-radius: 0; font-size: 14px; }
.sz-comparison .detail-table th, .sz-comparison .detail-table td { padding: 12px 22px; }
.sz-comparison .detail-table td { line-height: 1.6; }
.sz-bottom, .tr-bottom, .org-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sz-bottom > div, .tr-bottom > div, .org-notes > div { padding: 20px 22px; border-radius: var(--r-lg); background: var(--bg); }
.sz-bottom p, .tr-bottom p, .org-notes p { font-size: 14px; line-height: 1.6; color: var(--text); margin: 4px 0 8px; }
.sz-bottom small { display: block; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.org-notes p, .tr-bottom p { color: var(--text-2); }

/* =============================================================== 09 training */
.tr-notice { flex-direction: row; align-items: center; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.tr-event-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.tr-event-tabs button { background: var(--bg); }
.tr-method b { color: var(--training-ink); }
.tr-stagebar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.tr-stagebar > span { padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); font-size: 14px; color: var(--text-2); transition: background .3s, color .3s; }
.tr-stagebar small { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); }
.tr-stagebar > span.active { background: var(--text); color: #fff; }
.tr-stagebar > span.active small { color: #a1a1a6; }
.tr-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
#trSceneHost { margin: 0 14px; border-radius: var(--r-md); overflow: hidden; background: #000; }
.train-scene { display: block; width: 100%; height: auto; max-height: 320px; background: #152536; }
.tr-clip-buttons { display: flex; gap: 2px; margin: 14px 14px 0; padding: 3px; border-radius: 980px; background: var(--fill); }
.tr-clip-buttons button { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 13px; }
.tr-annotation { padding: 16px 22px 22px; }
.tr-annotation .ig-over { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.tr-annotation h3 { font-size: 19px; margin: 4px 0; color: var(--training-ink); }
.tr-annotation p { font-size: 14px; line-height: 1.6; color: var(--text-2); min-height: 44px; }
.tr-timeline { height: 8px; margin: 12px 0 8px; border-radius: 8px; background: var(--fill); overflow: hidden; }
.tr-timeline i { display: block; height: 100%; width: 50%; margin-left: 20%; border-radius: 8px; background: var(--training-accent); transition: margin .3s var(--ease), width .3s var(--ease); }
.tr-annotation small { font-size: 12px; color: var(--text-2); }
.tr-dataset { padding: 4px 22px 16px; }
.tr-dataset > strong { font-size: 44px; font-weight: 700; letter-spacing: -.02em; }
.tr-dataset > strong small { font-size: 15px; font-weight: 400; letter-spacing: -.01em; color: var(--text-2); }
.tr-split { display: flex; gap: 3px; margin: 12px 0; border-radius: var(--r-xs); overflow: hidden; }
.tr-split span { flex: 1; padding: 9px 6px; text-align: center; font-size: 12px; font-weight: 600; color: #fff; background: #0a7d91; }
.tr-split span:first-child { flex: 3; background: var(--blue); }
.tr-split span:last-child { background: #1c7a33; }
.tr-dataset p { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.tr-model { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-alt); }
.tr-model span { text-align: center; font-size: 13px; font-weight: 600; line-height: 1.4; }
.tr-model small { font-size: 11px; font-weight: 400; color: var(--text-2); }
.tr-model b { color: var(--text-3); }
.tr-job { padding: 18px 22px 22px; }
.tr-job > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tr-job b { font-size: 15px; }
.tr-job span { flex: none; font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tr-progress { height: 6px; margin: 12px 0; border-radius: 6px; background: var(--fill); overflow: hidden; }
.tr-progress i { display: block; width: 0; height: 100%; border-radius: 6px; background: var(--training-accent); transition: width .35s var(--ease); }
.tr-job p { font-size: 14px; line-height: 1.6; color: var(--text-2); min-height: 66px; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tr-result { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 22px 24px; }
.tr-result .ig-over { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tr-result h3 { font-size: 19px; margin: 4px 0 6px; }
.tr-result p { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.tr-result button { flex: none; white-space: nowrap; }
.ta { animation: trainA 1.6s ease-in-out infinite; } .tb { animation: trainB 1.6s ease-in-out infinite; }
.train-scene.walk .ta { animation: trainWalk 4s linear infinite; } .train-scene.walk .tb { animation: trainWalk 4s linear infinite reverse; }
.train-scene.sport .ta, .train-scene.sport .tb { animation: trainSport 1.2s ease-in-out infinite alternate; }
.tr-smoke { animation: trSmoke 3s linear infinite; transform-box: fill-box; transform-origin: center; }
.tr-smoke.dl-06 { animation-delay: -.6s; } .tr-smoke.dl-12 { animation-delay: -1.2s; }
.tr-fire { animation: fireBK .75s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
.tr-car-hit-a { animation: trHitA 4s ease-out infinite; } .tr-car-hit-b { animation: trHitB 4s ease-out infinite; }
.tr-pass-a { animation: trPassA 4s linear infinite; } .tr-pass-b { animation: trPassB 4s linear infinite; }
.tr-enter { animation: trEnter 4s ease-in-out infinite; } .tr-outside { animation: trOutside 4s ease-in-out infinite; }

/* camera event animations (inside the dark video frame) */
.fighter-a { animation: shoveA 1.5s ease-in-out infinite; } .fighter-b { animation: shoveB 1.5s ease-in-out infinite; }
.impact { animation: flashBK 1.5s infinite; }
.car-a { animation: crashA 5s ease-out infinite; } .car-b { animation: crashB 5s ease-out infinite; }
.flame { transform-box: fill-box; transform-origin: bottom; animation: fireBK .7s ease-in-out infinite alternate; }
.smoke { animation: smokeBK 3s linear infinite; }
.smoke.s1, .flame.s1 { animation-delay: -.5s; } .smoke.s2, .flame.s2 { animation-delay: -1s; } .smoke.s3, .flame.s3 { animation-delay: -1.5s; }

/* =============================================================== 10 agencies + sources footer */
.org-settings { display: grid; grid-template-columns: .55fr 1fr 1fr 1.5fr; gap: 18px; align-items: start; padding: 22px; margin-bottom: 16px; }
.org-settings label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.org-settings input { margin-top: 8px; max-width: 200px; font-size: 20px; font-weight: 600; }
.org-settings small, .org-table small { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--text-2); }
.org-fps b { display: block; font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -.02em; color: var(--blue); }
.org-fps span { font-size: 13px; color: var(--text-2); }
.org-basis b { display: block; font-size: 15px; }
.org-basis span { display: block; margin-top: 6px; font-size: 15px; color: var(--text); }
.org-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.org-table { font-size: 14px; }
.org-table th { white-space: normal; }
.org-table td:first-child { width: 28%; }
.org-table td:first-child b { font-size: 15px; }
.org-table td:nth-child(n+4) { font-size: 19px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.org-table a { font-weight: 600; }
.org-table input { width: 110px; min-height: 40px; padding: 6px 10px; font-size: 16px; font-weight: 600; }
.deck-foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; color: var(--text-2); }
.deck-foot h3 { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.deck-sources { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.deck-sources li > span { display: block; color: var(--text-2); }
.deck-sources a { font-weight: 600; }
.deck-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e8e8ed; }

/* =============================================================== bottom slide navigation */
.nav { position: fixed; z-index: 40; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 18px; border-radius: 980px;
  background: rgba(255, 255, 255, .96); box-shadow: 0 4px 20px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05); font-family: var(--font); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.counter { font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dots { display: flex; align-items: center; }
.dot { min-height: 24px; min-width: 24px; padding: 0; background: transparent; display: grid; place-items: center; border-radius: 980px; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 980px; background: #c7c7cc; transition: width .3s var(--ease), background .3s; }
.dot:hover:not(:disabled) { background: transparent; } .dot:hover::before { background: #86868b; }
.dot.active::before { width: 22px; background: var(--text); }
.dot.active { min-width: 32px; }
.ux-jump { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.ux-jump select { width: auto; max-width: 260px; min-height: 40px; padding: 6px 34px 6px 14px; font-size: 14px; border: 0; border-radius: 980px; background-color: var(--fill); background-position: right 13px center; }
.nav-controls { display: flex; gap: 4px; }
.nav-btn { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--fill); color: var(--text); }
.nav-btn svg { display: block; }
.nav-btn .i-play { display: none; } .nav-btn.is-paused .i-pause { display: none; } .nav-btn.is-paused .i-play { display: block; }
.nav-btn.is-paused { background: var(--blue); color: #fff; }
.toast { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); padding: 8px 14px; border-radius: 980px; background: rgba(29, 29, 31, .9); color: #fff; font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s; }
.toast.is-on { opacity: 1; }
.on-dark .nav { background: rgba(40, 40, 42, .92); box-shadow: 0 4px 24px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .on-dark .nav { background: rgba(40, 40, 42, .7); } }
.on-dark .counter, .on-dark .ux-jump { color: #a1a1a6; }
.on-dark .dot::before { background: rgba(255, 255, 255, .35); } .on-dark .dot.active::before { background: #f5f5f7; }
.on-dark .nav-btn, .on-dark .ux-jump select { background-color: rgba(255, 255, 255, .14); color: #f5f5f7; }
.on-dark .nav-btn:where(:hover) { background: rgba(255, 255, 255, .24); }
.on-dark .nav-btn.is-paused { background: var(--blue); }
.on-dark .ux-jump select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23d2d2d7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.on-dark .ux-jump select option { color: #1d1d1f; }

/* =============================================================== motion */
@keyframes slideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes scan { from { top: -20%; } to { top: 100%; } }
@keyframes detect { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes packet { from { left: -12px; } to { left: 100%; } }
@keyframes dataPackets { to { stroke-dashoffset: -84; } }
@keyframes warPackets { to { stroke-dashoffset: -102; } }
@keyframes igTravel { to { stroke-dashoffset: -94; } }
@keyframes igChip { 50% { filter: drop-shadow(0 0 10px rgba(0, 113, 227, .45)); } }
@keyframes igStage { 0% { left: -25%; } 100% { left: 100%; } }
@keyframes gpuGlow { 50% { stroke: #7fb8f0; filter: drop-shadow(0 0 6px rgba(0, 113, 227, .35)); } }
@keyframes shoveA { 50% { transform: translate(292px, 200px) rotate(7deg); } }
@keyframes shoveB { 50% { transform: translate(353px, 200px) rotate(-6deg); } }
@keyframes flashBK { 0%, 30%, 80%, 100% { opacity: 0; } 50%, 65% { opacity: 1; } }
@keyframes crashA { 0% { transform: translate(20px, 245px); } 55%, 100% { transform: translate(230px, 230px); } }
@keyframes crashB { 0% { transform: translate(510px, 212px); } 55%, 100% { transform: translate(340px, 212px) rotate(-8deg); } }
@keyframes fireBK { to { transform: scale(.85, 1.15); } }
@keyframes smokeBK { from { transform: translateY(20px) scale(.7); opacity: .5; } to { transform: translateY(-130px) scale(1.4); opacity: 0; } }
@keyframes wallCar { from { transform: translate(-40px, -10px); } to { transform: translate(40px, 15px); } }
@keyframes wallSmoke { to { transform: translateY(-25px); opacity: 0; } }
@keyframes trainA { 50% { transform: translateX(12px); } }
@keyframes trainB { 50% { transform: translateX(-12px); } }
@keyframes trainWalk { from { transform: translateX(-80px); } to { transform: translateX(100px); } }
@keyframes trainSport { to { transform: translateY(-14px); } }
@keyframes trSmoke { to { transform: translateY(-90px) scale(1.7); opacity: 0; } }
@keyframes trHitA { 0% { transform: translate(65px, 200px); } 55%, 100% { transform: translate(185px, 200px); } }
@keyframes trHitB { 0% { transform: translate(405px, 198px); } 55%, 100% { transform: translate(295px, 198px) rotate(-6deg); } }
@keyframes trPassA { 0% { transform: translate(20px, 192px); } 100% { transform: translate(340px, 192px); } }
@keyframes trPassB { 0% { transform: translate(240px, 218px); } 100% { transform: translate(560px, 218px); } }
@keyframes trEnter { 0%, 15% { transform: translate(230px, 0); } 65%, 100% { transform: translate(385px, 0); } }
@keyframes trOutside { 0% { transform: translate(120px, 0); } 100% { transform: translate(245px, 0); } }
/* reduced motion: keep the demonstrations moving, slower; drop decorative loops and transitions */
@media (prefers-reduced-motion: reduce) {
  .slide.active { animation: none; }
  .record-dot, .war-led-dot, .war-led, .wall-detect, .scan, .bbox::after, .pipe-link::after, .ig-stage-line, .sz-chip.active::after, .gpu-core rect, .ig-chip { animation: none !important; }
  .df-packets, .war-packets, .ig-travel { animation-duration: 6s !important; }
  .fighter-a, .fighter-b, .impact, .car-a, .car-b, .smoke, .tr-smoke, .ta, .tb, .train-scene .ta, .train-scene .tb, .tr-car-hit-a, .tr-car-hit-b, .tr-pass-a, .tr-pass-b, .tr-enter, .tr-outside, .wall-car, .wall-smoke { animation-duration: 8s !important; }
  .flame, .tr-fire, .wall-flame { animation-duration: 2.4s !important; }
  button, .progress i, .tr-progress i { transition: none; }
}

/* =============================================================== responsive */
@media (max-width: 1068px) {
  .dots { display: none; }
  .war-layout { grid-template-columns: minmax(0, 1fr); }
  .war-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .war-controls > .panel-heading, .war-connection { grid-column: 1 / -1; }
  .war-module:nth-of-type(odd) { border-right: 1px solid #e8e8ed; }
  .tr-event-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-stages, .ig-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .demo-grid, .command-center.ux-camera-focus .demo-grid, .command-center.ux-map-focus .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .command-center.ux-map-focus .ops-panel { order: -1; }
  .df-scroll .df-diagram { min-width: 1080px; }
  .ig-scroll .ig-svg { min-width: 900px; }
  .war-flow-scroll .war-flow { min-width: 960px; }
  .org-table { min-width: 960px; }
  .swipe-hint { display: block; }
  .swipe-hint--in { margin: 0 22px 4px; }
  .sz-layout, .tr-layout { grid-template-columns: minmax(0, 1fr); }
  .sz-comparison { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sz-comparison .detail-table { min-width: 640px; }
  .architecture, .df-bottom, .sz-bottom, .tr-bottom, .org-notes, .detail-strip { grid-template-columns: minmax(0, 1fr); }
  .war-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .df-stepbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .df-explainer { flex-direction: column; align-items: flex-start; }
  .tr-result { flex-direction: column; align-items: flex-start; }
  .tr-stagebar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .command-heading, .war-heading { flex-direction: column; align-items: flex-start; }
  #city3d { height: clamp(320px, 58vh, 460px); }
  .hero-slide .detail-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  .slide { padding-top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 32px); padding-bottom: calc(var(--nav-h) + var(--safe-b) + 40px); }
  .kicker { font-size: 15px; }
  .df-sub, .sz-sub, .org-sub { font-size: 17px; margin-bottom: 20px; }
  .hero-slide.active { justify-content: flex-end; }
  .hero { object-position: 68% 30%; opacity: .7; }
  .shade { background: linear-gradient(0deg, #000 36%, rgba(0, 0, 0, .7) 62%, rgba(0, 0, 0, .15) 100%); }
  .hero-slide .detail-strip { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ux-status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ux-status-strip > span:last-child { grid-column: 1 / -1; }
  #scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #scenarios button, .tr-event-tabs button { min-height: 64px; padding: 10px; gap: 10px; }
  .ux-event-icon { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
  .ux-event-check { display: none; }
  .modebar { padding: 12px; }
  .playbar { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ux-viewbar { flex-direction: column; align-items: stretch; }
  .ux-viewbar > div { display: flex; }
  .ux-viewbar button { flex: 1 1 0; padding: 8px 6px; }
  .ux-viewbar small { display: block; margin: 2px 0 0; }
  .camera { margin: 0 10px; }
  .camera-label { font-size: 11px; max-width: 58%; top: 10px; left: 10px; }
  .camera-telemetry { top: 10px; right: 10px; } .camera-telemetry small { display: none; }
  .sim-label { display: none; }
  .camera-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-card { grid-template-columns: minmax(0, 1fr); }
  .incident-panel .buttons { grid-template-columns: minmax(0, 1fr); }
  .df-stepbar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px 14px; }
  .df-stepbar button:last-child { grid-column: 1 / -1; }
  .df-explainer { margin: 0 14px 14px; padding: 18px; }
  .df-toolbar { padding: 18px 18px 4px; }
  .war-controls { display: block; }
  .war-module:nth-of-type(odd) { border-right: 0; }
  .war-services { grid-template-columns: minmax(0, 1fr); }
  .ig-stages { padding: 4px 14px 14px; gap: 8px; }
  .ig-stage { min-height: 0; padding: 14px; }
  .ig-stage-icon { width: 40px; height: 40px; font-size: 20px; margin: 10px 0; border-radius: 12px; }
  .ig-stage strong { font-size: 16px; }
  .ig-pilot-detail { margin: 0 14px 14px; padding: 18px; }
  .ig-gates { gap: 10px; }
  .ig-gates > div { padding: 16px; }
  .sz-inputs { grid-template-columns: minmax(0, 1fr); padding: 14px 18px; }
  .sz-profile { padding: 0 18px; }
  .sz-metrics { padding: 4px 18px 14px; }
  .sz-metrics strong { font-size: 34px; }
  .sz-rack { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 18px 12px; }
  .tr-stagebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-stagebar > span:last-child { grid-column: 1 / -1; }
  .tr-model { flex-wrap: wrap; justify-content: center; }
  .org-settings { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .org-settings input { max-width: none; }
  .block, .insight { padding: 20px; }
  .panel-heading, .ig-top { padding: 16px 18px 10px; }
  .deck-legal { flex-direction: column; }
  .nav { gap: 6px; padding: 6px; left: 12px; right: 12px; transform: none; width: auto; max-width: none; justify-content: space-between; }
  .counter { display: none; }
  .ux-jump { flex: 1 1 auto; min-width: 0; }
  .ux-jump > span { display: none; }
  .ux-jump select { width: 100%; max-width: none; min-height: 44px; }
  .toast { white-space: normal; width: max-content; max-width: calc(100vw - 48px); text-align: center; }
}
@media (max-width: 420px) {
  .slide .hero-title { font-size: 36px; }
  html[lang="th"] .slide .hero-title { font-size: 32px; }
  .slide h2 { font-size: 30px; }
  html[lang="th"] .slide h2 { font-size: 28px; }
  .camera-label { max-width: 52%; }
  .tr-clip-buttons button { font-size: 12px; padding: 8px 2px; }
}
@media (max-width: 360px) {
  #scenarios button, .tr-event-tabs button { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav-controls { gap: 2px; }
}
/* phones in landscape: short screens */
@media (max-height: 500px) and (orientation: landscape) {
  .slide { padding-top: calc(var(--top-h) + 20px); }
  .hero-slide.active { justify-content: flex-start; }
  .slide .hero-title { font-size: 34px; margin: 6px 0 12px; }
  #city3d { height: 300px; }
}

/* =============================================================== print: every slide on its own page */
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; overflow: visible !important; }
  .nav, .swipe-hint, .city-tools, .toast { display: none !important; }
  .slide, .hero-slide { display: block !important; min-height: 0 !important; height: auto !important; padding: 0 0 8mm !important; background: #fff !important; break-after: page; animation: none !important; }
  .slide:last-of-type { break-after: auto; }
  .slide--dark { color: var(--text) !important; }
  .slide--dark .lead, .hero-slide .detail-strip p, .hero-slide .kicker { color: var(--text-2) !important; }
  .hero, .shade { display: none !important; }
  .hero-slide .tag { background: var(--bg-alt) !important; color: var(--text-2) !important; }
  .command-center.is-fit, .command-center { height: auto !important; overflow: visible !important; padding: 0 !important; }
  .command-fit { position: static !important; transform: none !important; width: auto !important; height: auto !important; display: block !important; }
  .df-board, .vision-panel, .map-panel, .incident-panel, .war-visual, .war-controls, .war-flow-panel, .ig-panel, .ig-roadmap, .sz-panel, .block, .tr-result, .org-settings, .org-table-wrap, .modebar, .detail-table, .insight { box-shadow: none !important; border: 1px solid var(--line); break-inside: avoid; }
  .df-scroll, .ig-scroll, .war-flow-scroll, .org-table-wrap, .sz-comparison { overflow: visible !important; }
  .df-diagram, .ig-svg, .war-flow, .org-table, .sz-comparison .detail-table { min-width: 0 !important; }
  *, *::before, *::after { animation-play-state: paused !important; transition: none !important; }
  .camera, .spatial-canvas, #trSceneHost, .war-room { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: var(--text-2); word-break: break-all; }
  .org-table a[href^="http"]::after { content: ""; }
}
/* EN: the scenario's English sub-label would repeat its name */
html[lang="en"] #scenarios .ux-event-copy small { display: none; }
.ig-gates b, .ig-stage strong, .ux-event-copy b, .sz-chip b { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 380px) { .ig-gates { grid-template-columns: minmax(0, 1fr); } }
/* a viewer pause must never freeze a slide's entrance (it would stay invisible) */
.is-paused .slide.active { animation-play-state: running !important; }
/* wide diagrams/tables: focusable scroll regions on small screens (set by cctv/app.js) */
[data-scroller]:focus-visible { outline: 3px solid rgba(0, 125, 250, .6); outline-offset: -3px; }
/* hero: who it is for */
.audience { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.audience__label { font-size: 14px; font-weight: 600; color: #a1a1a6; margin-right: 4px; }
.audience__chip { padding: 7px 14px; border-radius: 980px; background: rgba(255, 255, 255, .12); color: #f5f5f7; font-size: 14px; line-height: 1.35; }
.audience + .tag { margin-top: 14px; }
@media print { .audience__label { color: var(--text-2) !important; } .audience__chip { background: var(--bg-alt) !important; color: var(--text) !important; } }
@media print {
  .slide h2 em, .slide .hero-title em { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--link) !important; }
  #city3d:not(.has-frame), #city3d:not(.has-frame) + .city-note { display: none !important; }
  .city-note { position: static; max-width: none; margin: 0; border-radius: 0; }
}


/* =============================================================== 11 the full demo suite */
.suite-slide .lead { margin-bottom: 28px; }
.suite-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.suite-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 220px; padding: 26px 26px 64px; border-radius: var(--r-xl);
  background: var(--bg); color: var(--text); text-decoration: none; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.suite-card:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.suite-card__label { font-size: 14px; font-weight: 600; color: var(--link); }
.suite-card__title { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
html[lang="th"] .suite-card__title { font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.suite-card__text { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.suite-card__go { position: absolute; right: 22px; bottom: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fill); font-size: 17px; }
.suite-card:hover .suite-card__go { background: var(--blue); color: #fff; }
@media (max-width: 900px) { .suite-cards { grid-template-columns: minmax(0, 1fr); } .suite-card { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .suite-card { transition: none; } .suite-card:hover { transform: none; } }
@media print { .suite-card { border: 1px solid var(--line); break-inside: avoid; } .suite-card__go { display: none; } }
/* Thai descenders/ascenders are not clipped by the gradient text (background-clip: text) */
.slide h2 em, .slide .hero-title em, .suite-card__title em { padding: .06em 0 .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
