/* Retail AI/ML Portfolio Command Center - glass design system
   Data colors (domain hues) are CVD/contrast validated; glass surfaces are kept
   opaque enough that charts read against an effectively solid surface. */
:root {
  color-scheme: light;
  --bg: #edf0f7;
  --blob-1: rgba(91, 108, 255, .30);
  --blob-2: rgba(47, 196, 180, .24);
  --blob-3: rgba(235, 104, 52, .16);
  --blob-4: rgba(144, 110, 233, .22);

  --glass: rgba(255, 255, 255, .66);
  --glass-2: rgba(255, 255, 255, .52);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-border: rgba(255, 255, 255, .9);
  --glass-edge: rgba(15, 23, 40, .07);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .95);
  --shadow: 0 1px 2px rgba(17, 25, 45, .05), 0 12px 40px -12px rgba(17, 25, 45, .16);
  --shadow-lg: 0 30px 80px -20px rgba(17, 25, 45, .35);
  --blur: blur(22px) saturate(170%);

  --surface: #ffffff;
  --ink: #0e1627;
  --ink-2: #455066;
  --muted: #7b8498;
  --line: rgba(15, 23, 40, .08);
  --line-2: rgba(15, 23, 40, .14);
  --grid: rgba(15, 23, 40, .065);

  --brand: #4f63e8;
  --brand-2: #2fb3d6;
  --grad: linear-gradient(135deg, #5a63ff 0%, #3d8ff0 45%, #2fc4b4 100%);
  --grad-soft: linear-gradient(135deg, rgba(90, 99, 255, .14), rgba(47, 196, 180, .12));

  --d-cx: #2a78d6; --d-mx: #1baf7a; --d-op: #eda100; --d-cs: #6250d6; --d-dm: #eb6834;
  --accent: var(--brand);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --base: #b3b8c2;
  --pos: #2a78d6; --neg: #e34948;
  --good: #0ca30c; --good-ink: #057a05; --warn: #fab219; --serious: #ec835a; --critical: #d03b3b; --bad-ink: #b42323;

  --r-sm: 10px; --r: 18px; --r-lg: 24px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
}
/* light is the default; dark only when the viewer picks it (moon button) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060a12;
  --blob-1: rgba(79, 99, 232, .30); --blob-2: rgba(25, 158, 140, .20); --blob-3: rgba(217, 89, 38, .13); --blob-4: rgba(128, 104, 233, .22);
  --glass: rgba(17, 23, 35, .62); --glass-2: rgba(255, 255, 255, .035); --glass-strong: rgba(14, 20, 31, .82);
  --glass-border: rgba(255, 255, 255, .085); --glass-edge: rgba(255, 255, 255, .06); --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 44px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 90px -20px rgba(0, 0, 0, .8);
  --surface: #151b27; --ink: #eef2f9; --ink-2: #b3bccb; --muted: #7d879a;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13); --grid: rgba(255, 255, 255, .06);
  --brand: #7c8cff; --brand-2: #4cc6e6;
  --d-cx: #3987e5; --d-mx: #199e70; --d-op: #c98500; --d-cs: #9085e9; --d-dm: #d95926;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --base: #5a6476; --pos: #3987e5; --neg: #e66767;
  --good-ink: #34c534; --bad-ink: #ff8080;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* aurora background */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 1; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: -14vw; background: var(--blob-1); animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: 4vw; background: var(--blob-2); animation: drift 32s ease-in-out infinite alternate-reverse; }
.aurora i:nth-child(3) { width: 38vw; height: 38vw; right: 18vw; bottom: -18vw; background: var(--blob-3); animation: drift 30s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { width: 34vw; height: 34vw; left: 18vw; bottom: -10vw; background: var(--blob-4); animation: drift 36s ease-in-out infinite alternate-reverse; }
.aurora::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(127, 140, 170, .10) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .6), transparent 70%); }
@keyframes drift { to { transform: translate3d(4vw, 3vw, 0) scale(1.08); } }

/* glass primitive */
.glass, .card {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow), var(--glass-hi);
}
.card { border-radius: var(--r-lg); position: relative; }
.card-p { padding: 22px; }
.tile { background: var(--glass-2); border: 1px solid var(--glass-edge); border-radius: 14px; }

/* ------------------------------------------------------------------ shell */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 18px; padding: 14px 18px 14px 14px; }
.side { position: sticky; top: 14px; height: calc(100vh - 28px); border-radius: 26px; display: flex; flex-direction: column;
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow), var(--glass-hi); overflow: hidden; z-index: 50; }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; text-decoration: none; }
.logo { width: 42px; height: 42px; flex-shrink: 0; filter: drop-shadow(0 6px 14px rgba(79, 99, 232, .35)); }
.brand-t { font-family: var(--display); font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; line-height: 1.1; }
.brand-t em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-s { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 14px; scrollbar-width: thin; }
.nav-h { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 18px 10px 8px; }
.nv { display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 7px; border-radius: 14px; text-decoration: none;
  color: var(--ink-2); font-weight: 600; font-size: 13.5px; transition: background .18s, color .18s, transform .18s; position: relative; }
.nv:hover { background: var(--glass-2); color: var(--ink); }
.nv-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--glass-2); border: 1px solid var(--glass-edge); color: var(--ink-2); transition: all .2s; }
.nv-ic svg { width: 16px; height: 16px; }
.nv-num { font-size: 11.5px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
  border-color: color-mix(in srgb, var(--c) 25%, transparent); }
.nv-t { min-width: 0; line-height: 1.2; }
.nv-t small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv.on { background: var(--glass); color: var(--ink); box-shadow: 0 6px 20px -10px rgba(17, 25, 45, .3), var(--glass-hi);
  border: 1px solid var(--glass-border); padding: 6px 9px 6px 6px; }
.nv.on .nv-ic { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px rgba(79, 99, 232, .7); }
.nv.on .nv-num { background: var(--c); color: #fff; box-shadow: 0 6px 16px -6px var(--c); }
.side-foot { padding: 14px 18px 18px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.side-foot b { color: var(--ink-2); font-weight: 700; }

/* covers the gap above the floating top bar so scrolled content never peeks through */
.main::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 16px; z-index: 39; pointer-events: none;
  background: linear-gradient(var(--bg) 70%, transparent); }
.scrim { display: none; }
.main { min-width: 0; grid-column: 2; }
.topbar { position: sticky; top: 14px; z-index: 40; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 12px 0 20px;
  border-radius: 20px; margin-bottom: 18px; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { opacity: .5; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--glass-2); border: 1px solid var(--glass-edge); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.pill:hover { color: var(--ink); background: var(--glass); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8a94a6; flex-shrink: 0; }
.dot.ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); animation: pulse 2.6s infinite; }
.dot.part { background: var(--warn); box-shadow: 0 0 0 4px rgba(250, 178, 25, .2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.ibtn-lg, .icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  background: var(--glass-2); border: 1px solid var(--glass-edge); color: var(--ink-2); transition: all .18s; }
.icon-btn:hover { color: var(--ink); background: var(--glass); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.spin svg { animation: rot .9s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.menu-btn { display: none; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }

.page { max-width: 1600px; min-height: 60vh; }
.page.fading { opacity: .55; transition: opacity .2s; }

/* ------------------------------------------------------------------ typography */
.over { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.over::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.h1 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -.035em; margin: 10px 0 10px; }
.h1 .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--ink-2); font-size: 15px; max-width: 760px; margin: 0; line-height: 1.6; }
.h2 { font-family: var(--display); font-size: 16.5px; font-weight: 750; letter-spacing: -.015em; margin: 0; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ch { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ch-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sec { margin-top: 18px; }
.sec-t { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 30px 2px 14px; }

/* grids */
.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)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.split-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; }

/* ------------------------------------------------------------------ info button + popover */
.ib { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0;
  background: var(--glass-2); border: 1px solid var(--glass-edge); color: var(--muted); transition: all .18s; padding: 0; }
.ib:hover, .ib.on { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px -6px rgba(79, 99, 232, .7); }
.ib svg { width: 14px; height: 14px; }
.on-dark .ib { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); }
.pop { position: fixed; z-index: 120; width: min(400px, calc(100vw - 24px)); border-radius: 20px; padding: 18px 20px 16px;
  background: var(--glass-strong); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), var(--glass-hi); animation: popin .18s ease;
  max-height: min(70vh, 560px); overflow-y: auto; }
@keyframes popin { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.pop-h { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.pop-ic svg { width: 18px; height: 18px; }
.pop-t { font-family: var(--display); font-weight: 750; font-size: 15px; letter-spacing: -.01em; line-height: 1.25; }
.pop-k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pop-s { padding: 10px 0 2px; }
.pop-s h5 { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700;
  display: flex; align-items: center; gap: 6px; }
.pop-s h5 i { width: 6px; height: 6px; border-radius: 2px; background: var(--brand); display: inline-block; }
.pop-s p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.pop-s code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; background: var(--glass-2);
  border: 1px solid var(--glass-edge); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.src-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.src-row:last-child { border-bottom: 0; }
.src-row span { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ buttons + controls */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  font-size: 12.5px; font-weight: 650; text-decoration: none; white-space: nowrap;
  background: var(--glass-2); border: 1px solid var(--glass-edge); color: var(--ink); transition: all .18s; }
.btn:hover { background: var(--glass); transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(17, 25, 45, .35); }
.btn svg { width: 15px; height: 15px; }
.btn.pri { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(79, 99, 232, .8); }
.btn.pri:hover { filter: brightness(1.06); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 10px; }
.btn.on { background: var(--ink); color: var(--surface); border-color: transparent; }
.tools { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--glass-edge); }
.tool { width: 28px; height: 28px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.tool:hover { color: var(--ink); background: var(--glass); }
.tool.on { color: #fff; background: var(--grad); }
.tool svg { width: 15px; height: 15px; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px; background: var(--glass-2); border: 1px solid var(--glass-edge); }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 13px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(17, 25, 45, .2), 0 0 0 1px var(--line); }
.sel { appearance: none; height: 38px; padding: 0 34px 0 13px; border-radius: 12px; font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--ink);
  background: var(--glass-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237b8498' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--glass-edge); }
.sel:hover { background-color: var(--glass); }
.sel option, .sel optgroup { background: var(--surface); color: var(--ink); }
.fld { display: grid; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; margin: 10px 0 4px; cursor: pointer;
  background: linear-gradient(90deg, var(--brand) 0 var(--p, 50%), var(--line-2) var(--p, 50%) 100%); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent), 0 3px 8px rgba(0, 0, 0, .25); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(79, 99, 232, .35); }
.toggle { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; padding: 4px 0; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ------------------------------------------------------------------ overview */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.hero-l { padding: 34px 36px 30px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hero-l::after { content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 99, 255, .16), transparent 65%); pointer-events: none; }
.hero .h1 { font-size: clamp(32px, 3.8vw, 52px); max-width: 720px; }
.mandate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.mand { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.mand i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px;
  color: #fff; background: var(--grad); flex-shrink: 0; box-shadow: 0 6px 14px -6px rgba(79, 99, 232, .7); }
.mand b { display: block; font-size: 13.5px; font-family: var(--display); }
.mand span { font-size: 12px; color: var(--muted); }
.value { padding: 26px 26px 22px; display: flex; flex-direction: column; overflow: hidden; }
.value::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad-soft); pointer-events: none; }
.value > * { position: relative; }
.lbl { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.big { font-family: var(--sans); font-size: clamp(48px, 5vw, 68px); font-weight: 800; letter-spacing: -.045em; line-height: 1; margin-top: 12px; }
.big small { font-size: .3em; letter-spacing: 0; font-weight: 600; color: var(--muted); margin-left: 6px; }
.stack { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; margin: 22px 0 14px; }
.stack span { display: block; transition: flex-grow .6s ease; }
.dlist { display: grid; gap: 2px; }
.drow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
.drow i { width: 10px; height: 10px; border-radius: 3px; }
.drow b { font-variant-numeric: tabular-nums; }
.waves3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.waves3 > div { padding: 10px 12px; }
.waves3 span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.waves3 b { display: block; font-size: 19px; letter-spacing: -.02em; margin-top: 2px; }
.waves3 small { font-size: 11px; color: var(--muted); }

.stat { padding: 18px 20px; }
.stat-h { display: flex; align-items: center; gap: 10px; }
.stat-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent); flex-shrink: 0; }
.stat-ic svg { width: 17px; height: 17px; }
.stat-l { font-size: 12.5px; font-weight: 650; color: var(--ink-2); flex: 1; }
.stat-v { font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin-top: 14px; }
.stat-v small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat-s { font-size: 12px; color: var(--muted); margin-top: 5px; }
.up { color: var(--good-ink); font-weight: 700; }
.down { color: var(--bad-ink); font-weight: 700; }

.chart-box { position: relative; width: 100%; }
.fillcard { display: flex; flex-direction: column; }
.fillcard .chart-box.fill { flex: 1 1 auto; height: 0; }
.dc-f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px;
  cursor: pointer; transition: background .15s, transform .15s; border: 1px solid transparent; }
.rank li:hover { background: var(--glass-2); border-color: var(--glass-edge); transform: translateX(2px); }
.rank .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.rank .t { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .s { font-size: 11.5px; color: var(--muted); }
.rank .v { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.take { padding: 20px 22px; overflow: hidden; }
.take::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.take b { font-family: var(--display); font-size: 14px; }
.take p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }

.dcard { padding: 20px; text-decoration: none; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; overflow: hidden; }
.dcard::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; border-radius: inherit;
  background: radial-gradient(260px 120px at 20% 0%, color-mix(in srgb, var(--c) 24%, transparent), transparent); }
.dcard > * { position: relative; z-index: 1; }
.dcard:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 24px 50px -24px color-mix(in srgb, var(--c) 70%, transparent); }
.dc-top { display: flex; align-items: center; justify-content: space-between; }
.dc-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c);
  box-shadow: 0 10px 22px -10px var(--c); }
.dc-ic svg { width: 22px; height: 22px; }
.dc-n { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); margin-top: 16px; }
.dc-t { font-family: var(--display); font-weight: 750; font-size: 16px; letter-spacing: -.015em; line-height: 1.25; margin-top: 3px; }
.dc-s { font-size: 12.5px; color: var(--muted); }
.dc-v { font-size: 27px; font-weight: 800; letter-spacing: -.035em; margin-top: 16px; }
.dc-v small { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 3px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 10px; }
.spark span { flex: 1; border-radius: 3px 3px 0 0; background: var(--c); opacity: .85; min-height: 3px; }
.dc-f { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); font-weight: 600; }
.dc-f svg { width: 15px; height: 15px; transition: transform .2s; }
.dcard:hover .dc-f svg { transform: translateX(3px); }

.fly { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: center; }
.fly svg { width: 100%; height: auto; }
.fly-ring { transform-origin: 150px 150px; animation: rot 50s linear infinite; }
.fly-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fly-step { padding: 12px 14px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.fly-step i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; font-size: 13px; }
.fly-step b { font-size: 13.5px; font-family: var(--display); }
.fly-step small { color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.fly-step p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.sigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sig { padding: 14px 16px; min-width: 0; }
.sig-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); }
.sig-h .st { font-size: 10.5px; letter-spacing: 0; text-transform: none; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.sig-h .st .dot { width: 6px; height: 6px; animation: none; box-shadow: none; }
.sig-v { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; }
.sig-v small { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sig-s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.mini-l { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.mini-l li { display: flex; justify-content: space-between; gap: 10px; }
.mini-l .m { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-l .c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fallback { font-size: 12.5px; color: var(--muted); padding: 10px 0; }

/* ------------------------------------------------------------------ domain page */
.dhead { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; overflow: hidden; }
.dhead::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(700px 320px at 0% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); }
.dhead > * { position: relative; }
.dh-l { padding: 32px 34px; }
.dh-ic { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; color: var(--on-accent, #fff); background: var(--accent);
  box-shadow: 0 14px 30px -12px var(--accent); margin-bottom: 18px; }
.dh-ic svg { width: 26px; height: 26px; }
.tagl { font-family: var(--display); font-size: 17px; font-weight: 650; color: var(--ink); }
.dh-l p { color: var(--ink-2); font-size: 14px; margin: 10px 0 0; max-width: 580px; line-height: 1.6; }
.dh-r { padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: center; }
.dstat { padding: 16px 18px; }
.dstat .stat-v { margin-top: 6px; font-size: 28px; }

.fbar { position: sticky; top: 88px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  border-radius: 18px; margin: 18px 0; }
.fbar .fl { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.fbar .grow { flex: 1; }

.uc { display: flex; flex-direction: column; padding: 20px; min-width: 0; transition: transform .2s ease, box-shadow .2s ease; animation: rise .45s ease both; }
.uc::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.uc:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 26px 50px -26px color-mix(in srgb, var(--accent) 60%, transparent); }
.uc:hover::after { opacity: 1; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.uc-h { display: flex; align-items: center; gap: 8px; }
/* amber (Operational Efficiency) is too light for white text - use dark ink on it */
.page[data-dom="op"] { --on-accent: #241900; }
.nv.on[style*="d-op"] .nv-num, .dcard[style*="d-op"] .dc-ic, .dchip[style*="d-op"] i { color: #241900; }
.wave { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; color: var(--on-accent, #fff); background: var(--accent);
  box-shadow: 0 6px 14px -8px var(--accent); }
.qd { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.uc-h .tools { margin-left: auto; }
.uc h3 { font-family: var(--display); font-size: 17px; font-weight: 750; letter-spacing: -.02em; margin: 14px 0 3px; line-height: 1.25; }
.uc .desc { font-size: 12.5px; color: var(--muted); margin: 0; }
.tele { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tl { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 9px; font-size: 11.5px; font-weight: 650;
  color: var(--ink-2); background: var(--glass-2); border: 1px solid var(--glass-edge); white-space: nowrap; }
.tl svg { width: 15px; height: 15px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
/* KPI tiles: labels and notes wrap (never truncate); values align across a row */
.k { padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; }
.k-l { font-size: 11.5px; color: var(--muted); font-weight: 650; line-height: 1.3; min-height: 2.6em; overflow-wrap: anywhere; }
.k-v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; display: flex; align-items: center; gap: 7px; line-height: 1.15; }
.k-v .st { width: 16px; height: 16px; flex-shrink: 0; }
.k-s { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; margin-top: 4px; overflow-wrap: anywhere; }
.kv .k-l, .res .k-l, .explain .k-l { min-height: 0; }

/* the briefing's three ratings, labelled */
.rating { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; border-radius: 13px;
  background: var(--glass-2); border: 1px solid var(--glass-edge); }
.rating > div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-width: 0; }
.rating > div + div { border-left: 1px solid var(--line); }
.rating svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }
.rating span { min-width: 0; line-height: 1.2; }
.rating small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rating b { font-size: 12.5px; font-weight: 700; }

/* floating chart tooltip (HTML, so it is never clipped by the card) */
.ctip { position: fixed; z-index: 150; pointer-events: none; max-width: 300px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px;
  background: rgba(12, 18, 30, .94); color: #dfe6f0; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .08);
  opacity: 0; transition: opacity .12s; line-height: 1.45; }
.ctip.on { opacity: 1; }
.ctip b { display: block; color: #fff; font-weight: 700; margin-bottom: 4px; }
.ctip i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }
.ctip div { white-space: normal; }

/* custom dropdown (enhances native <select class="sel">) */
.csel { position: relative; display: inline-block; min-width: 160px; }
.fld .csel { min-width: 200px; }
.fld .csel.wide { min-width: 300px; }
.csel-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; left: 8px; bottom: 0; }
.csel-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 38px; padding: 0 12px 0 14px;
  border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 650; color: var(--ink); background: var(--glass-2);
  border: 1px solid var(--glass-edge); transition: all .15s; text-align: left; }
.csel-btn:hover { background: var(--glass); }
.csel-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csel-btn svg { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; transition: transform .2s; }
.csel.open .csel-btn { border-color: color-mix(in srgb, var(--brand) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.csel.open .csel-btn svg { transform: rotate(180deg); }
.csel-pop { position: fixed; z-index: 130; padding: 6px; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--glass-strong); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), var(--glass-hi); animation: popin .14s ease; }
.csel-search { margin: 2px 2px 6px; height: 36px; padding: 0 12px 0 34px; border-radius: 11px; border: 1px solid var(--glass-edge); font-size: 13px;
  background: var(--glass-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b8498' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center; }
.csel-search:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.csel-list { overflow-y: auto; scrollbar-width: thin; }
.csel-g { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.csel-o { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px; color: var(--ink); }
.csel-o small { margin-left: auto; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.csel-o svg { width: 14px; height: 14px; color: var(--brand); flex-shrink: 0; visibility: hidden; }
.csel-o.sel svg { visibility: visible; }
.csel-o.sel { font-weight: 700; }
.csel-o.act { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.csel-empty { padding: 12px; font-size: 12.5px; color: var(--muted); }

/* domain story: chapters, per-card filter row, next domain */
.inshort { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55;
  color: var(--ink-2); max-width: 600px; background: color-mix(in srgb, var(--accent) 9%, var(--glass-2)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.inshort svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.inshort b { color: var(--ink); }
.chapter { margin-top: 26px; }
.ch-head { display: flex; align-items: center; gap: 14px; margin: 0 2px 14px; }
.ch-n { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--on-accent, #fff);
  background: var(--accent); padding: 6px 11px; border-radius: 999px; box-shadow: 0 6px 16px -8px var(--accent); }
.ch-head .ch-r { margin-left: auto; }
.uc-slot { min-width: 0; display: flex; }
.uc-slot > .uc { flex: 1; }
.uc.fading { opacity: .5; transition: opacity .15s; }
.cf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; min-height: 34px; }
.cf-l { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.cf-l svg { width: 13px; height: 13px; }
.cf-none { font-size: 12px; color: var(--muted); }
.cf-reset { margin-left: auto; border: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.cf-reset:hover { background: var(--glass-2); }
.seg.sm { padding: 3px; border-radius: 11px; }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 8px; }
.csel.sm { min-width: 0; }
.csel.sm .csel-btn { height: 32px; padding: 0 9px 0 11px; font-size: 12px; border-radius: 10px; gap: 6px; }
.nextd { display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-top: 26px; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.nextd:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 22px 44px -24px var(--c); }
.nextd .dc-ic { flex-shrink: 0; }
.nextd b { display: block; font-family: var(--display); font-size: 17px; margin-top: 2px; }
.nextd p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.nextd > svg { width: 20px; height: 20px; margin-left: auto; flex-shrink: 0; color: var(--ink-2); }

/* "how to read" guide */
.hint { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 18px; margin-bottom: 18px; }
.hint p { margin: 0; font-size: 13.5px; color: var(--ink-2); flex: 1; }
.hint b { color: var(--ink); }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 18px; align-items: start; }
.anat { position: relative; padding: 18px; border-radius: 20px; background: var(--glass-2); border: 1px solid var(--glass-edge); }
.anat .uc { animation: none; box-shadow: none; }
.anat .uc:hover { transform: none; }
.mark-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11.5px;
  font-weight: 800; flex-shrink: 0; box-shadow: 0 4px 10px -4px rgba(79, 99, 232, .8); }
.steps-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps-l li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.steps-l b { color: var(--ink); }
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.mods .tile { padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); }
.mods .tile b { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 2px; }
.rt-def { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.rt-def .tile { padding: 14px 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.rt-def h5 { margin: 0 0 6px; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.rt-def h5 svg { width: 16px; height: 16px; color: var(--brand); }
@media (max-width: 1000px) { .guide-grid, .mods, .rt-def { grid-template-columns: minmax(0, 1fr); } }
.uc .chart-box { height: 210px; margin-top: 16px; }
.insight { display: flex; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; color: var(--ink);
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.insight svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.uc-f { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.uc-f .val { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.uc-f .val small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.uc-f .scope { font-size: 11px; color: var(--muted); text-align: right; max-width: 60%; line-height: 1.4; }
.uc .spacer { height: 14px; }
.err { padding: 16px; color: var(--bad-ink); font-size: 13px; }

.tview { margin-top: 14px; max-height: 220px; overflow: auto; border-radius: 14px; border: 1px solid var(--glass-edge); background: var(--glass-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th, .tbl td { padding: 7px 11px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { position: sticky; top: 0; background: var(--glass-strong); backdrop-filter: blur(10px); color: var(--muted); font-weight: 700; font-size: 11.5px; }

.heat { display: grid; gap: 3px; font-size: 10.5px; }
.heat .hc { border-radius: 5px; min-height: 21px; outline: 2px solid transparent; outline-offset: -1px; }
.heat .hc:hover { outline-color: var(--ink); }
.heat .hl { color: var(--muted); display: grid; align-items: center; font-variant-numeric: tabular-nums; }
.heat .hl.c { justify-items: center; }
.scale { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 10px; }
.scale .bar { height: 8px; flex: 1; max-width: 180px; border-radius: 4px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-bg { position: absolute; inset: 0; background: rgba(6, 10, 18, .45); backdrop-filter: blur(6px); animation: fade .2s; }
.modal-c { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1060px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  overflow: auto; border-radius: 28px; padding: 30px 32px; background: var(--glass-strong); backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg), var(--glass-hi); animation: mpop .24s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes mpop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } }
.modal-x { position: absolute; right: 18px; top: 18px; }
.modal .chart-box { height: 360px; margin-top: 18px; }
.explain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.explain .tile { padding: 14px 16px; }
.explain h5 { margin: 0 0 5px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.explain p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* ------------------------------------------------------------------ prioritization lab */
.lab-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.weights { position: sticky; top: 88px; }
.wrow { margin-top: 16px; }
.wrow-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 650; }
.wrow-h span { font-size: 12.5px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.lbl-s { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650;
  cursor: pointer; color: var(--ink); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); transition: all .15s; }
.dchip i { width: 18px; height: 18px; border-radius: 6px; background: var(--c); color: #fff; font-style: normal; font-size: 10px; display: grid; place-items: center; }
.dchip.off { opacity: .45; filter: grayscale(1); }
.rtable { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13px; }
.rtable th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 12px; cursor: pointer; user-select: none; white-space: nowrap; }
.rtable th:hover { color: var(--ink); }
.rtable td { padding: 11px 12px; background: var(--glass-2); border-top: 1px solid var(--glass-edge); border-bottom: 1px solid var(--glass-edge); vertical-align: middle; }
.rtable td:first-child { border-left: 1px solid var(--glass-edge); border-radius: 14px 0 0 14px; }
.rtable td:last-child { border-right: 1px solid var(--glass-edge); border-radius: 0 14px 14px 0; }
.rtable tbody tr { cursor: pointer; transition: transform .15s; }
.rtable tbody tr:hover td { background: var(--glass); }
.rtable .nm { font-weight: 650; }
.rtable .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.rtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.rk { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); }
.chipsm { display: inline-flex; height: 24px; align-items: center; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 650;
  background: var(--glass-2); border: 1px solid var(--glass-edge); color: var(--ink-2); white-space: nowrap; }
.score { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.score .tr { flex: 1; height: 7px; border-radius: 6px; background: var(--line); overflow: hidden; }
.score .fl { height: 100%; border-radius: 6px; background: var(--grad); transition: width .35s ease; }
.score b { font-variant-numeric: tabular-nums; width: 26px; text-align: right; }
.twrap { overflow-x: auto; }

/* ------------------------------------------------------------------ roadmap */
.waves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.wv { padding: 22px; overflow: hidden; }
.wv::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--wc); }
.wv-top { display: flex; align-items: center; justify-content: space-between; }
.wv-n { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--wc);
  box-shadow: 0 10px 20px -10px var(--wc); font-size: 16px; }
.wv h3 { font-family: var(--display); font-size: 18px; margin: 14px 0 0; letter-spacing: -.02em; }
.wv .m { font-size: 12px; color: var(--muted); font-weight: 600; }
.wv p { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.55; }
.wv .keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.wv-v { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wv-v b { font-size: 26px; letter-spacing: -.03em; }
.wv-v span { font-size: 12px; color: var(--muted); }
.g-axis, .g-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: center; }
.g-axis { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.g-ticks { position: relative; height: 18px; }
.g-ticks span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; font-weight: 600; }
.g-row { min-height: 30px; border-radius: 10px; cursor: pointer; }
.g-row:hover { background: var(--glass-2); }
.g-row .gn { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px 0 6px; display: flex; align-items: center; gap: 8px; }
.g-track { position: relative; height: 30px; background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.g-bar { position: absolute; top: 9px; height: 12px; border-radius: 6px; box-shadow: 0 4px 10px -4px currentColor; }
.g-ramp { position: absolute; top: 9px; height: 12px; border-radius: 0 6px 6px 0; opacity: .28; }
.g-sep { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 16px 6px 6px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stepc { padding: 22px; display: flex; flex-direction: column; }
.stepc .sn { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--brand); }
.stepc h3 { font-family: var(--display); margin: 8px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.stepc p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 650; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ------------------------------------------------------------------ AI lab */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 18px; margin: 20px 0 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 13px; text-decoration: none;
  font-weight: 650; font-size: 13.5px; color: var(--ink-2); transition: all .15s; }
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--ink); background: var(--glass-2); }
.tab.on { color: #fff; background: var(--grad); box-shadow: 0 10px 22px -12px rgba(79, 99, 232, .9); }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ctrl { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.feat { display: grid; gap: 6px; margin-top: 8px; }
.gauge { display: grid; place-items: center; position: relative; margin-top: 4px; }
.gauge svg { width: 260px; max-width: 100%; height: auto; }
.gauge .gv { position: absolute; bottom: 0; text-align: center; display: grid; justify-items: center; gap: 6px; }
.gauge .gv b { font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.contrib { display: grid; gap: 9px; margin-top: 10px; }
.cb { display: grid; grid-template-columns: 160px minmax(0, 1fr) 52px; gap: 12px; align-items: center; font-size: 12.5px; }
.cb .tr { position: relative; height: 10px; border-radius: 6px; background: var(--line); }
.cb .tr::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1.5px; background: var(--line-2); }
.cb .fl { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.cb .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 650; }
.action { margin-top: 18px; padding: 14px 16px; }
.action h5 { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
textarea.msg { width: 100%; min-height: 120px; resize: vertical; border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.55;
  background: var(--glass-2); border: 1px solid var(--glass-edge); }
textarea.msg:focus { outline: 2px solid color-mix(in srgb, var(--brand) 50%, transparent); }
.ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ex button { border: 1px dashed var(--line-2); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; color: var(--ink-2); text-align: left; }
.ex button:hover { border-style: solid; color: var(--ink); background: var(--glass-2); }
.res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge svg { width: 13px; height: 13px; }
.b-p1 { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--bad-ink); }
.b-p2 { background: color-mix(in srgb, var(--warn) 24%, transparent); color: var(--ink); }
.b-p3 { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good-ink); }
.meter { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width .4s; }
.reply { white-space: pre-wrap; font-size: 13.5px; line-height: 1.65; padding: 16px 18px; margin-top: 8px; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }
.note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--brand); }

.sk { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--glass-2) 0%, var(--glass) 50%, var(--glass-2) 100%); background-size: 200% 100%;
  animation: sh 1.3s infinite; border: 1px solid var(--glass-edge); }
@keyframes sh { to { background-position: -200% 0; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 200; padding: 11px 18px; border-radius: 14px; font-size: 13px;
  font-weight: 650; opacity: 0; pointer-events: none; transition: all .25s; background: var(--glass-strong); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); color: var(--ink); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1320px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mandate { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1120px) {
  .g3, .waves, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .split, .split-r, .dhead, .lab-grid { grid-template-columns: minmax(0, 1fr); }
  .weights { position: static; }
  .fly { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .fly svg { max-width: 240px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 0; }
  .main { grid-column: 1; }
  .side { position: fixed; left: 10px; top: 10px; height: calc(100vh - 20px); width: 280px; transform: translateX(calc(-100% - 20px)); transition: transform .3s ease; }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 45; background: rgba(6, 10, 18, .4); backdrop-filter: blur(3px); display: none; }
  .scrim.open { display: block; }
  .menu-btn { display: grid; }
  .topbar { top: 10px; padding: 0 10px; margin-bottom: 14px; }
  .g2, .g3, .g4, .g5, .waves, .steps, .res, .sigs, .fly-steps, .explain, .waves3 { grid-template-columns: minmax(0, 1fr); }
  .g4.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-r { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 18px; }
  .dh-l, .hero-l { padding: 24px 20px; }
  .fbar { position: static; }
  .g-axis, .g-row { grid-template-columns: 130px minmax(0, 1fr); }
  .cb { grid-template-columns: 110px minmax(0, 1fr) 46px; }
  .hide-sm { display: none; }
  .modal-c { padding: 22px 18px; border-radius: 22px; }
  .pop { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .side, .pop, .modal-c { background: var(--surface); }
}
