:root {
  --ink: #14202b;
  --ink-2: #3b4a57;
  --mute: #6b7884;
  --line: #e4e9ee;
  --line-2: #eef2f5;
  --bg: #f5f7f9;
  --card: #ffffff;
  --accent: #1f5fa8;
  --accent-soft: #e8f0fa;
  --observed: #1f7a4d;
  --assumption: #4a6fa5;
  --disputed: #c7831a;
  --unknown: #8a8f98;
  --up: #b5462d;
  --up-soft: #fbeae5;
  --down: #2d7d52;
  --down-soft: #e5f4ec;
  --poc1: #12807a;
  --poc2: #6b4fa0;
  --shared: #5b6b7a;
  --radius: 12px;
  --side-w: 236px;
  --shadow: 0 1px 2px rgba(20, 32, 43, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.55 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 25px; font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14.5px; font-weight: 650; }
p { margin: 0 0 8px; }
small, .small { font-size: 12.5px; }
.mute { color: var(--mute); }
.ink2 { color: var(--ink-2); }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.side {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); z-index: 1100;
  background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 18px 14px 14px; overflow-y: auto;
}
.brand { display: block; padding: 2px 8px 8px; }
.brand img { height: 30px; width: auto; display: block; }
.brand .wordmark { font-weight: 700; font-size: 18px; letter-spacing: .01em; color: var(--ink); }
.brand-sub { padding: 0 8px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 650; line-height: 1.3; }
.brand-sub span { display: block; font-weight: 500; font-size: 10.5px; color: var(--mute); letter-spacing: .05em; text-transform: uppercase; margin-top: 3px; }
.snav { flex: 1; }
.sgroup { margin-bottom: 14px; }
.sgl { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 0 10px 4px; }
.snav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 550; font-size: 13.5px; }
.snav a:hover { background: var(--line-2); text-decoration: none; }
.snav a.on { background: var(--accent-soft); color: var(--accent); }
.side-foot { font-size: 11.5px; color: var(--mute); padding: 10px 10px 0; border-top: 1px solid var(--line-2); }
.maincol { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 14px;
  background: rgba(245, 247, 249, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  padding: 10px 32px; min-height: 54px;
}
.crumbs { font-size: 13px; color: var(--mute); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--ink); font-weight: 650; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.basis-chip { font-size: 12px; color: #6d5313; background: #fff7e8; border: 1px solid #f0dcb2; border-radius: 99px; padding: 4px 10px; white-space: nowrap; cursor: help; }
.menu-btn { display: none; width: 38px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; padding: 8px 9px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.scrim { position: fixed; inset: 0; background: rgba(20, 32, 43, .35); z-index: 1050; }
main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 26px 32px 70px; }
.foot { max-width: 1280px; margin: 0 auto; padding: 0 32px 34px; color: var(--mute); font-size: 12px; }

/* ---------------------------------------------------------------- page structure */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--mute); margin-top: 6px; max-width: 820px; }
.lede { font-size: 16px; color: var(--ink-2); max-width: 860px; margin-top: 8px; line-height: 1.5; }
.lede b { color: var(--ink); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.section-title { margin: 30px 0 12px; font-size: 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; overflow-x: auto; }
.card > h2, .card > h3 { margin-bottom: 10px; }
.card .card-sub { color: var(--mute); font-size: 13px; margin: -4px 0 12px; }
.kpi { display: flex; flex-direction: column; gap: 3px; }
.kpi .v { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.kpi .r { color: var(--ink-2); font-size: 13px; }
.kpi .l { color: var(--mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.formula { font-family: "Cascadia Mono", Consolas, monospace; font-size: 13px; background: var(--line-2); border-radius: 6px; padding: 5px 9px; display: inline-block; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.page-head .chip { white-space: normal; }
.chip.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-observed { color: var(--observed); }
.st-assumption { color: var(--assumption); }
.st-disputed { color: var(--disputed); }
.st-unknown { color: var(--unknown); }
.st-na { color: var(--mute); }
.tag { font-size: 10.5px; font-weight: 650; letter-spacing: .04em; padding: 1px 7px; border-radius: 4px; text-transform: uppercase; display: inline-block; }
.tag.poc1 { background: #e0f2f1; color: var(--poc1); }
.tag.poc2 { background: #efe9f8; color: var(--poc2); }
.tag.shared { background: #e9edf1; color: var(--shared); }
.sev { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.sev.mild { background: #eef4e5; color: #4d6b1f; }
.sev.severe { background: #fdf0de; color: #94600f; }
.sev.extreme { background: #fbe4df; color: #9a3420; }
.sev.relief { background: var(--down-soft); color: var(--down); }

/* ---------------------------------------------------------------- tables */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); font-weight: 650; background: #fafbfc; position: sticky; top: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.sub td { background: #f7f9fb; font-weight: 650; }
tr.total td { background: #eef3f9; font-weight: 700; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f3f7fb; }
.tablewrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; }
.tablewrap table th { z-index: 1; }
.range-cell { min-width: 150px; }
.heat td.num { font-weight: 600; }

/* ---------------------------------------------------------------- controls */
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; }
.toolbar label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.toolbar .hint { font-size: 12.5px; color: var(--mute); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 7px 13px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: #fff; }
.seg button:not(:last-child) { border-right: 1px solid var(--line); }
select, input[type=number], input[type=text] { font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
input[type=number] { width: 110px; }
.btn { font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); display: inline-block; }
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #1a5292; }
.btn.small-btn { font-size: 12.5px; padding: 5px 10px; text-align: left; white-space: normal; }
.btn.big { font-size: 14.5px; padding: 10px 18px; border-radius: 10px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--mute); padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs::-webkit-scrollbar { display: none; }

/* product switcher */
.prodbar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 18px; }
.prodbar .seg button { font-weight: 600; }
.prodbar .views { display: flex; gap: 4px; flex-wrap: wrap; }
.prodbar .views a { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prodbar .views a:hover { background: var(--line-2); text-decoration: none; }
.prodbar .views a.on { background: var(--accent-soft); color: var(--accent); }

/* fold-away details */
details.more { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
details.more > summary { list-style: none; cursor: pointer; padding: 13px 18px; font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(-45deg); transition: transform .15s; flex: none; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more > summary .hint { font-weight: 400; color: var(--mute); font-size: 12.5px; margin-left: auto; }
details.more > .body { padding: 2px 18px 18px; overflow-x: auto; }
details > summary { cursor: pointer; color: var(--accent); font-size: 13px; }
details.more > summary { color: var(--ink); }
.more-group { margin-top: 22px; }
.more-group > .mg-title { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }

/* messages */
.note { background: var(--accent-soft); border: 1px solid #cfe0f3; color: #1d3c61; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.warn { background: #fff7e8; border: 1px solid #f0dcb2; color: #6d5313; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.err { background: #fdecea; border: 1px solid #f5c2bd; color: #8a271b; border-radius: 10px; padding: 12px 14px; }
.synth { background: repeating-linear-gradient(135deg, #f3effa, #f3effa 12px, #ece5f7 12px, #ece5f7 24px); border: 1px solid #d9cdee; color: #46336e; border-radius: 10px; padding: 8px 14px; font-size: 13px; margin-bottom: 18px; }
.synth b { font-weight: 700; }
.cannot { margin: 0; padding-left: 18px; }
.cannot li { margin-bottom: 6px; color: var(--ink-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.observed { background: var(--observed); }
.sw.assumption { background: var(--assumption); }
.sw.disputed { background: var(--disputed); }
.sw.unknown { background: repeating-linear-gradient(45deg, var(--unknown), var(--unknown) 2px, #c5c9cf 2px, #c5c9cf 4px); }
.loading { color: var(--mute); padding: 30px 0; }
.flex { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 18px; } .mt24 { margin-top: 26px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.src a { word-break: break-word; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; }

/* charts */
svg text { font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.chart { width: 100%; display: block; }
.mixbar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--line-2); }
.mixbar > div { height: 100%; }
.hbars { display: flex; flex-direction: column; gap: 7px; margin: 6px 0; }
.hb { display: grid; grid-template-columns: 170px 1fr 70px; gap: 8px; align-items: center; font-size: 13px; }
.hb-bar { background: var(--line-2); border-radius: 4px; height: 12px; overflow: hidden; }
.hb-bar i { display: block; height: 100%; border-radius: 4px; }
.hb-v { text-align: right; color: var(--ink-2); }

/* home */
.hero { padding: 4px 0 6px; }
.hero h1 { font-size: 30px; letter-spacing: -.02em; max-width: 880px; }
.prod-tile { cursor: pointer; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; gap: 4px; }
.prod-tile:hover { border-color: #b9c8d8; transform: translateY(-1px); }
.prod-tile .role { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); font-weight: 600; }
.prod-tile .name { font-size: 18px; font-weight: 700; }
.prod-tile .title { color: var(--ink-2); font-size: 13px; min-height: 38px; }
.prod-tile .big { font-size: 38px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-top: 8px; }
.prod-tile .big small { font-size: 13.5px; font-weight: 500; color: var(--mute); margin-left: 6px; letter-spacing: 0; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 12px; background: var(--line-2); }
.stack i { display: block; height: 100%; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); margin-top: 7px; }
.stack-legend span { display: inline-flex; align-items: center; gap: 5px; }
.stack-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.msg { border-left: 3px solid var(--accent); }
.msg .n { font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.msg h3 { font-size: 16px; margin: 6px 0 6px; line-height: 1.3; }
.msg p { color: var(--ink-2); font-size: 13.5px; margin: 0; }
.goto { display: flex; flex-direction: column; gap: 4px; color: inherit; }
.goto:hover { border-color: #b9c8d8; text-decoration: none; }
.goto .gl { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.goto b { font-size: 15px; }
.goto span.small { color: var(--ink-2); }
.cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }

/* levers and tiles */
.lever { border-left: 3px solid var(--poc1); padding-left: 12px; }
.lever h3 { margin-bottom: 4px; }
.lever .big { font-size: 20px; font-weight: 700; }
.lever + .lever { margin-top: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; transition: border-color .15s; }
.tile:hover { border-color: #b9c8d8; text-decoration: none; }
.tile .tag { align-self: flex-start; }
a.kpi.tile { color: inherit; }

/* maps */
#map { height: 520px; border-radius: 10px; border: 1px solid var(--line); }
.leaflet-container { font: 12px "Segoe UI", system-ui, Arial, sans-serif; }
.leaflet-popup-content { margin: 10px 12px; max-width: 320px; }
.mapkey { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.mapkey i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -2px; }
.basemap-ocean { background: #dde8f1 !important; }
.map-note { background: rgba(255,255,255,.9); border: 1px solid #d6dde4; border-radius: 6px; padding: 4px 8px; font-size: 11.5px; color: #3b4a57; max-width: 260px; }

/* 3D twin */
.twin-host { position: relative; height: 560px; background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #eef2f6 70%); }
.twin-host canvas { display: block; cursor: grab; }
.twin-label { position: absolute; left: 0; top: 0; pointer-events: none; font-size: 11.5px; font-weight: 600; color: #14202b; background: rgba(255,255,255,.85); border: 1px solid #d6dde4; border-radius: 4px; padding: 1px 6px; white-space: nowrap; transform-origin: 0 0; margin-left: -40px; }
.twin-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* data model, ML and AI, summary */
.er-box { cursor: pointer; }
.er-box:hover rect:first-child { fill: #f5f8fb; }
.flash { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
.answer { background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.answer p { margin: 0 0 8px; }
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.acc > details { border-bottom: 1px solid var(--line-2); }
.acc > details:last-child { border-bottom: 0; }
.acc > details > summary { list-style: none; cursor: pointer; padding: 13px 18px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 14px; }
.acc > details > summary::-webkit-details-marker { display: none; }
.acc > details > summary:hover { background: #f8fafc; }
.acc > details[open] > summary { background: #f8fafc; }
.acc > details > summary .meta { margin-left: auto; color: var(--mute); font-size: 12.5px; white-space: nowrap; }
.acc > details > .body { padding: 8px 18px 18px; overflow-x: auto; }
.flow-wrap { overflow-x: auto; }
.flow-wrap svg.flow { min-width: 980px; }
svg.flow .fe { fill: none; stroke: #b8c6d4; stroke-width: 1.2; opacity: 0.7; transition: opacity .15s, stroke .15s; }
svg.flow .fn { cursor: pointer; }
svg.flow .fn rect:first-of-type { transition: fill .15s; }
svg.flow .fn:hover rect:first-of-type, svg.flow .fn:focus rect:first-of-type { fill: #f3f7fb; }
svg.flow .fn:focus { outline: none; }
svg.flow.tracing .fe { opacity: 0.12; }
svg.flow.tracing .fe.on { opacity: 1; stroke: #1f5fa8; stroke-width: 2; }
svg.flow.tracing .fn { opacity: 0.35; }
svg.flow.tracing .fn.on { opacity: 1; }
.flow-info { min-height: 52px; margin-top: 10px; padding: 9px 12px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; }
.stepn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 650; flex: none; }
[id] { scroll-margin-top: 80px; }

/* walkthrough */
.tourbar {
  position: fixed; left: calc(var(--side-w) + 24px); right: 24px; bottom: 18px; z-index: 1200; max-width: 1000px; margin: 0 auto;
  background: var(--ink); color: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(20, 32, 43, .28);
  display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 18px;
}
.tourbar[hidden] { display: none; }
.tourbar .tn { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fc2ea; white-space: nowrap; }
.tourbar .tt { flex: 1; min-width: 0; }
.tourbar .tt b { display: block; font-size: 14.5px; }
.tourbar .tt span { font-size: 13px; color: #d5dde5; }
.tourbar .dots { display: flex; gap: 4px; }
.tourbar .dots i { width: 6px; height: 6px; border-radius: 50%; background: #4b5b69; display: block; }
.tourbar .dots i.on { background: #9fc2ea; }
.tourbar button { font: inherit; font-size: 13px; border-radius: 8px; padding: 7px 13px; cursor: pointer; border: 1px solid #44525f; background: transparent; color: #fff; white-space: nowrap; }
.tourbar button:disabled { opacity: .4; cursor: default; }
.tourbar button.next { background: #fff; color: var(--ink); border-color: #fff; font-weight: 650; }
.tourbar button.x { border: 0; padding: 6px 8px; color: #9aa6b2; font-size: 18px; line-height: 1; }
body.touring main { padding-bottom: 140px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 10px 30px rgba(20, 32, 43, .2); }
  body.nav-open .side { transform: none; }
  .maincol { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; }
  main { padding: 20px 16px 60px; }
  .foot { padding: 0 16px 30px; }
  .tourbar { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; gap: 10px; }
  .tourbar .dots { display: none; }
}
@media (max-width: 900px) { .twin-grid { grid-template-columns: 1fr; } .twin-host { height: 420px; } }
@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span2 { grid-column: auto; }
  .basis-chip { display: none; }
  .hero h1 { font-size: 24px; }
  .hb { grid-template-columns: 110px 1fr 56px; }
  .top { position: static; }
  #tourBtn { padding: 6px 10px; font-size: 12.5px; }
}
[hidden] { display: none !important; }
[data-go] { cursor: pointer; }
.prod-tile:focus, .tile:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.toolbar select { max-width: 300px; }
.rp { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.rp-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 96px; gap: 8px; align-items: center; font-size: 12px; }
.rp-l { color: var(--mute); }
.rp-track { position: relative; height: 12px; background: var(--line-2); border-radius: 6px; }
.rp-track i { position: absolute; top: 0; height: 12px; border-radius: 6px; opacity: .45; }
.rp-track b { position: absolute; top: -2px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; }
.rp-pub { background: #9aa6b2; }
.rp-data { background: #1f5fa8; }
.rp-v { text-align: right; color: var(--ink-2); white-space: nowrap; }
/* 3D teardown */
.twin-host { position: relative; height: 560px; }
.twin-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.twin-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.twin-svg polyline { fill: none; stroke: #5b6b7a; stroke-width: 1.2; }
.twin-svg polyline.on { stroke: var(--accent); stroke-width: 2; }
.twin-svg circle { fill: #14202b; }
.twin-callout { position: absolute; left: 0; top: 0; background: rgba(255,255,255,.95); border: 1px solid #d6dde4; border-radius: 8px; padding: 5px 10px; font-size: 12px; line-height: 1.35; color: var(--ink-2); box-shadow: 0 2px 8px rgba(20,32,43,.08); white-space: nowrap; }
.twin-callout b { display: block; color: var(--ink); font-size: 12.5px; }
.twin-callout.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.twin-tip { position: absolute; left: 0; top: 0; background: var(--ink); color: #fff; font-size: 12px; border-radius: 6px; padding: 5px 9px; white-space: nowrap; }
.twin-caption { position: absolute; left: 14px; right: 14px; bottom: 14px; max-width: 560px; background: rgba(20,32,43,.9); color: #e6edf3; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.twin-caption b { display: block; color: #fff; font-size: 14.5px; margin-bottom: 2px; }
.heat-scale { display: inline-block; width: 120px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #ecf0f4, #f7deaa 20%, #ee9240 56%, #c2412d); }
.twin-side { max-height: 640px; overflow-y: auto; }
.twin-info { background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pl { display: flex; flex-direction: column; }
.pl-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pl-row:hover, .pl-row:focus { background: #f3f7fb; outline: none; }
.pl-row.sel { background: var(--accent-soft); }
.pl-row i { width: 12px; height: 12px; border-radius: 3px; display: block; border: 1px solid rgba(20,32,43,.15); }
.pl-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-v { font-weight: 600; }
.pl-s { text-align: right; color: var(--mute); font-size: 12px; }
@media (max-width: 900px) { .twin-host { height: 420px; } .twin-side { max-height: none; } }
/* network: journey strip, map labels, lever cards */
.journey { display: grid; grid-template-columns: 1.15fr 1fr .8fr 1.15fr 1fr 1fr 1.1fr 1fr 1.05fr; column-gap: 8px; row-gap: 12px; margin-top: 4px; }
.jcell { position: relative; padding-top: 28px; min-width: 0; }
.jcell .jline { position: absolute; top: 10px; left: -4px; right: -4px; height: 3px; background: #c9d3dc; }
.jcell.first .jline { left: 50%; }
.jcell.last .jline { right: 50%; }
.jcell.sea .jline { background: repeating-linear-gradient(90deg, #1f5fa8 0 10px, transparent 10px 15px); }
.jcell .jdot { position: absolute; top: 3px; left: 50%; width: 17px; height: 17px; margin-left: -8.5px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-sizing: border-box; }
.jcell.last .jdot { background: var(--ink); }
.jname { font-weight: 700; font-size: 13px; text-align: center; color: var(--ink); }
.jleg .jname { font-weight: 600; color: var(--ink-2); }
.jplace { font-size: 12px; color: var(--mute); text-align: center; margin: 1px 0 6px; line-height: 1.3; min-height: 2.6em; }
.jchip { font-size: 12px; line-height: 1.35; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; margin-top: 5px; color: var(--ink-2); }
.jchip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.jchip b { display: block; font-size: 14px; color: var(--ink); }
.jchip em { display: block; font-style: normal; }
.jchip span { display: block; color: var(--mute); font-size: 11.5px; margin-top: 2px; }
.jtotal { font-size: 24px; font-weight: 700; text-align: center; line-height: 1.15; margin-top: 4px; }
.jtotal span { display: block; font-size: 11.5px; font-weight: 400; color: var(--mute); margin-top: 3px; }
.jdays { grid-row: 2; font-size: 12px; color: var(--ink-2); text-align: center; border-top: 3px solid var(--accent); padding-top: 5px; }
.jdays.transit { grid-column: 1 / 7; }
.jdays.stock { grid-column: 7 / 8; border-top-color: #9aa6b2; }
.jdays.out { grid-column: 8 / 10; border-top-color: var(--poc1); }
#map.netmap { height: 440px; }
.leaflet-tooltip.map-label { background: rgba(255,255,255,.92); border: 1px solid #d6dde4; border-radius: 6px; box-shadow: none; color: var(--ink); font-size: 11.5px; font-weight: 600; padding: 2px 6px; white-space: nowrap; }
.leaflet-tooltip.map-label::before { display: none; }
.lever-card { border-top: 3px solid var(--poc1); display: flex; flex-direction: column; }
.lever-card .lv-n { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--poc1); margin-bottom: 4px; }
.lever-card h3 { margin: 0 0 10px; }
.lever-card > .mt12:last-child { margin-top: auto; padding-top: 12px; }
.lv-big { font-size: 24px; font-weight: 700; margin: 2px 0 8px; line-height: 1.2; }
.lv-big span { font-size: 12.5px; font-weight: 400; color: var(--mute); }
.gauge { position: relative; height: 18px; border-radius: 9px; background: #f6e3dd; margin-top: 12px; overflow: hidden; }
.gauge .gzone { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(45,125,82,.32); }
.gauge .gband { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(45,125,82,.22) 0 4px, transparent 4px 8px); }
.gauge .ginf { position: absolute; top: 3px; bottom: 3px; background: var(--accent); border-radius: 4px; }
.gaxis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mute); margin-top: 3px; }
.lv-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.lv-row b { width: 34px; flex: none; font-size: 13px; }
.lv-row .ic { display: inline-flex; gap: 2px; }
.lv-row .ic i { display: block; height: 13px; border-radius: 2px; }
.lv-row .ic i.box { width: 8px; background: var(--accent); }
.lv-row .ic i.trl { width: 11px; background: var(--poc1); }
.lv-row .arrow { color: var(--mute); }
.dcdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }
#lbSlider { display: block; width: 100%; margin: 6px 0 2px; }
@media (max-width: 600px) { #dcq th:nth-child(4), #dcq td:nth-child(4) { display: none; } }
@media (max-width: 820px) {
  .journey { grid-template-columns: 1fr; row-gap: 0; }
  .jcell { padding: 0 0 14px 32px; }
  .jcell .jline { top: 0; bottom: 0; left: 9px; right: auto; width: 3px; height: auto; }
  .jcell.first .jline { top: 12px; left: 9px; }
  .jcell.last .jline { bottom: auto; height: 12px; }
  .jcell.sea .jline { background: repeating-linear-gradient(180deg, #1f5fa8 0 10px, transparent 10px 15px); }
  .jcell .jdot { top: 2px; left: 2px; margin-left: 0; }
  .jname, .jplace, .jtotal { text-align: left; }
  .jplace { min-height: 0; margin-bottom: 4px; }
  .jdays, .jdays.transit, .jdays.stock, .jdays.out { grid-row: auto; grid-column: auto; text-align: left; border-top: 0; border-left: 3px solid var(--accent); padding: 2px 0 2px 9px; margin-top: 6px; }
  .jdays.stock { border-left-color: #9aa6b2; }
  .jdays.out { border-left-color: var(--poc1); }
  #map.netmap { height: 360px; }
}
/* (i) icons and their pop-up notes */
.info-i { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1.5px solid #9aa6b2; background: #fff; color: #5b6b7a; font: italic 700 11px/1 Georgia, "Times New Roman", serif; letter-spacing: 0; text-transform: none; cursor: pointer; vertical-align: 2px; flex: none; transition: background .12s, color .12s, border-color .12s; }
.info-i:hover, .info-i.on, .info-i:focus-visible { border-color: var(--accent); background: var(--accent); color: #fff; outline: none; }
.kpi .l .info-i { width: 15px; height: 15px; font-size: 10px; margin-left: 5px; vertical-align: 1px; }
.with-i { display: inline-flex; align-items: center; }
.with-i .info-i { margin-left: 2px; }
.info-pop { position: absolute; z-index: 1500; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #cfd8e1; border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 32, 43, .18); font-size: 13px; line-height: 1.5; color: var(--ink-2); text-align: left; }
.info-pop:focus { outline: none; }
.info-pop .ip-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px 8px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.info-pop .ip-head b { color: var(--ink); font-size: 14px; }
.info-pop .ip-x { border: 0; background: none; font-size: 21px; line-height: 1; color: #6b7884; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.info-pop .ip-x:hover { background: var(--line); color: var(--ink); }
.info-pop .ip-body { padding: 10px 14px 12px; }
.info-pop .ip-body p { margin: 0 0 8px; }
.info-pop .ip-body ul { margin: 0 0 8px; padding-left: 18px; }
.info-pop .ip-body li { margin: 3px 0; }
.info-pop .ip-body li b, .info-pop .ip-body p b { color: var(--ink); }
.info-pop table { margin: 2px 0 10px; font-size: 12.5px; }
.info-pop th, .info-pop td { position: static; padding: 4px 6px; background: none; }
.info-pop tr.total td { font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--line); }
.info-pop .say { background: var(--accent-soft); border-radius: 8px; padding: 7px 10px; color: #1d3c61; margin-top: 4px; }
.info-pop.sheet { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-height: 65vh; }
@media (max-width: 760px) { .top-right .info-i { display: none; } }
