/* XPND F&B Pulse — soft aura and glass in XPND red, black and grays. */
:root {
  color-scheme: light;
  --page: #d6d6d4;
  --frame: #ececea;
  --text: #0e0e0d;
  --text-2: #55534f;
  --muted: #8f8c85;
  --line: rgba(14, 14, 13, 0.10);
  --glass: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.65);
  --white-card: #ffffff;
  --pill: #ffffff;
  --pill-active: #0e0e0d;
  --pill-active-ink: #ffffff;
  --aura-red: rgba(191, 3, 3, 0.20);
  --aura-grey: rgba(255, 255, 255, 0.85);
  --ink-series: #0e0e0d;            /* group 1 */
  --red: #bf0303;                   /* XPND red: group 2, highlights */
  --gray-series: #b5b3ad;           /* group 3 / context */
  --strip: rgba(255, 255, 255, 0.95);
  --on-ink-series: #ffffff; --on-red: #ffffff; --on-gray-series: #0e0e0d;
  --track: #efeeea;
  --grid: #efeeea;
  /* dark band */
  --band: #0b0b0b;
  --dcard: #1c1c1b;
  --dtext: #f2f1ee;
  --dmuted: #9a978f;
  --dline: rgba(255, 255, 255, 0.08);
  --dred: #e5383b;
  --dgrey: #77756f;
  --dlight: #d6d4ce;
  --dgray: #8c8a84;
  --dtrack: #2a2a28;
  --badge: #141413;
  --chip-ink-bg: #0e0e0d; --chip-ink: #ffffff;
  --chip-red-bg: #fbeaea; --chip-red: #a30202;
  --chip-gray-bg: #f1f0ed; --chip-gray: #6c6a65;
  --banner-bg: rgba(255, 255, 255, 0.7); --banner-ink: #3a3936;
  --logo: url("xpnd-logo.png");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #050505; --frame: #121211; --text: #f2f1ee; --text-2: #c3c2b7; --muted: #8c8a84; --line: rgba(255, 255, 255, 0.10);
    --glass: rgba(40, 40, 38, 0.45); --glass-border: rgba(255, 255, 255, 0.08); --white-card: #1c1c1b; --pill: #1f1f1d; --pill-active: #f2f1ee; --pill-active-ink: #0e0e0d;
    --aura-red: rgba(229, 56, 59, 0.20); --aura-grey: rgba(140, 138, 132, 0.16);
    --ink-series: #e9e8e4; --red: #e5383b; --gray-series: #5c5a55; --on-ink-series: #0e0e0d; --on-gray-series: #f2f1ee; --strip: rgba(255, 255, 255, 0.55); --track: #2a2a28; --grid: #2a2a28;
    --band: #050505; --dcard: #191918;
    --chip-ink-bg: #f2f1ee; --chip-ink: #0e0e0d; --chip-red-bg: #3a1717; --chip-red: #f5a3a3; --chip-gray-bg: #2a2a28; --chip-gray: #b9b7b0;
    --banner-bg: #232321; --banner-ink: #d6d4ce; --logo: url("xpnd-logo-light.png");
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #050505; --frame: #121211; --text: #f2f1ee; --text-2: #c3c2b7; --muted: #8c8a84; --line: rgba(255, 255, 255, 0.10);
  --glass: rgba(40, 40, 38, 0.45); --glass-border: rgba(255, 255, 255, 0.08); --white-card: #1c1c1b; --pill: #1f1f1d; --pill-active: #f2f1ee; --pill-active-ink: #0e0e0d;
  --aura-red: rgba(229, 56, 59, 0.20); --aura-grey: rgba(140, 138, 132, 0.16);
  --ink-series: #e9e8e4; --red: #e5383b; --gray-series: #5c5a55; --on-ink-series: #0e0e0d; --on-gray-series: #f2f1ee; --strip: rgba(255, 255, 255, 0.55); --track: #2a2a28; --grid: #2a2a28;
  --band: #050505; --dcard: #191918;
  --chip-ink-bg: #f2f1ee; --chip-ink: #0e0e0d; --chip-red-bg: #3a1717; --chip-red: #f5a3a3; --chip-gray-bg: #2a2a28; --chip-gray: #b9b7b0;
  --banner-bg: #232321; --banner-ink: #d6d4ce; --logo: url("xpnd-logo-light.png");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { background: var(--page); color: var(--text); font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
svg { display: block; }
.logo { display: block; width: 84px; height: 34px; background: var(--logo) no-repeat left center / contain; flex: none; }

.frame { max-width: 1440px; margin: 24px auto; background: var(--frame); border-radius: 30px; border: 4px solid rgba(255,255,255,0.75); overflow: hidden; position: relative; box-shadow: 0 40px 100px rgba(0,0,0,0.12); }
:root[data-theme="dark"] .frame { border-color: #1d1d1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .frame { border-color: #1d1d1c; } }

/* ---------- Light top section with aura ---------- */
.top { position: relative; padding: 22px 34px 36px; isolation: isolate; }
.aura { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aura i { position: absolute; border-radius: 50%; filter: blur(70px); }
.aura .b { width: 520px; height: 420px; left: 4%; top: 22%; background: var(--aura-red); }
.aura .y { width: 560px; height: 460px; left: 36%; top: 12%; background: var(--aura-grey); }
.aura .w { width: 380px; height: 120px; left: 26%; top: 32%; background: rgba(255,255,255,0.7); filter: blur(40px); transform: rotate(-14deg); }

.nav { display: flex; align-items: center; gap: 16px; }
.pills { display: flex; gap: 6px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pills a { padding: 11px 22px; border-radius: 999px; background: var(--pill); color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.pills a.active { background: var(--pill-active); color: var(--pill-active-ink); }
.nav-tools { display: flex; gap: 8px; }
.round { appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--pill); display: grid; place-items: center; cursor: pointer; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.round svg { width: 18px; height: 18px; }
:is(.pills a, .round, .seg button, .pill-cta, .mini):focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 46px 0 26px; }
.hello h1 { margin: 0; font-size: clamp(32px, 4vw, 50px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.hello p { margin: 10px 0 0; color: var(--text-2); font-size: 16px; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; gap: 4px; }
.seg button { appearance: none; border: 0; background: var(--pill); padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.seg button[aria-pressed="true"] { background: var(--pill-active); color: var(--pill-active-ink); }
.pill-cta { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; background: var(--pill-active); color: var(--pill-active-ink); text-decoration: none; font-size: 13px; cursor: pointer; border: 0; }
.banner { display: none; align-items: center; gap: 8px; background: var(--banner-bg); color: var(--banner-ink); border-radius: 14px; padding: 9px 14px; margin: -10px 0 18px; font-size: 13px; }
.banner.show { display: flex; }

.top-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }

/* Glass performance card */
.glass { position: relative; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(30px) saturate(1.2); -webkit-backdrop-filter: blur(30px) saturate(1.2); padding: 22px 26px 24px; min-width: 0; }
.card-title { margin: 0; font-size: 21px; font-weight: 400; letter-spacing: -0.015em; }
.card-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.badge-wrap { display: grid; place-items: center; padding: 16px 0 22px; }
.badge { position: relative; width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2a2a28, var(--badge) 62%); box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08); display: grid; place-items: center; text-align: center; cursor: default; }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge .v { font-size: 38px; font-weight: 400; color: #ffffff; letter-spacing: -0.02em; line-height: 1; }
.badge .v small { font-size: 16px; color: #a8a69f; margin-left: 2px; }
.badge .l { color: #b9b7b0; font-size: 14px; line-height: 1.35; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 16px 18px 0; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 4px; }
.stat .row { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.stat .lbl { color: var(--text-2); font-size: 13.5px; }
.stat .num { font-size: 32px; font-weight: 400; letter-spacing: -0.03em; }
.strip { display: flex; align-items: flex-end; gap: 3px; height: 40px; margin-top: 10px; cursor: default; }
.strip i { flex: 1; min-width: 2px; max-width: 5px; background: var(--strip); border-radius: 1px; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.04); }
.strip i.hl { background: var(--red); }
.strip-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* White card */
.wcard { background: var(--white-card); border-radius: 26px; padding: 22px 26px 24px; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.03); position: relative; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mini { appearance: none; border: 0; background: var(--track); color: var(--text-2); width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; cursor: pointer; flex: none; }
.mini svg { width: 16px; height: 16px; }
.legend-dots { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 13.5px; margin: 14px 0 6px; }
.legend-dots span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dots i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-dots em { font-style: normal; color: var(--muted); }
.needles svg { width: 100%; overflow: visible; }
.needles text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.needles text.in { fill: #ffffff; font-size: 11.5px; font-weight: 500; }
.needles text.in.dk { fill: #0e0e0d; }

/* ---------- Dark band ---------- */
.band { background: var(--band); padding: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; color: var(--dtext); }
.dcard { background: var(--dcard); border-radius: 26px; padding: 22px 26px 24px; min-width: 0; }
.dcard .card-sub { color: var(--dmuted); }
.dcard .mini { background: #2a2a28; color: #d6d4ce; }
.gauge { display: grid; place-items: center; margin-top: 8px; }
.gauge svg { width: min(100%, 380px); overflow: visible; }
.gauge text { font-family: inherit; }
.dlegend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13.5px; margin-top: 4px; }
.dlegend span { display: inline-flex; align-items: center; gap: 7px; }
.dlegend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dlegend.sq i { width: 12px; height: 12px; border-radius: 3px; }
.dlegend em { font-style: normal; color: var(--dmuted); }
.hist svg { width: 100%; overflow: visible; }
.hist text { fill: var(--dmuted); font-size: 11px; font-family: inherit; }
.split { display: flex; height: 7px; gap: 4px; margin: 14px 0 12px; }
.split i { border-radius: 999px; }
.dbars { display: grid; grid-template-columns: minmax(100px, max-content) minmax(40px, 1fr) max-content; gap: 12px 14px; align-items: center; margin-top: 18px; }
.dbars .row { display: contents; }
.dbars .lb { font-size: 13.5px; color: #d6d4ce; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbars .tr { height: 8px; background: var(--dtrack); border-radius: 999px; position: relative; cursor: default; }
.dbars .tr:focus { outline: none; box-shadow: 0 0 0 3px rgba(229,56,59,0.3); }
.dbars .b { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--dgrey); min-width: 6px; }
.dbars .b.lead { background: var(--dred); }
.dbars .v { font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }
.dbars .v span { color: var(--dmuted); margin-left: 6px; display: inline-block; min-width: 30px; }

/* ---------- Light lower section ---------- */
.lower { padding: 34px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.span-12 { grid-column: span 12; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; } .span-8 { grid-column: span 8; }
.section-h { grid-column: span 12; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: -6px; scroll-margin-top: 20px; }
.section-h h2 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.section-h span { color: var(--muted); font-size: 13px; }
.lbars { display: grid; grid-template-columns: minmax(100px, max-content) minmax(40px, 1fr) max-content; gap: 12px 14px; align-items: center; margin-top: 18px; }
.lbars .row { display: contents; }
.lbars .lb { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbars .tr { height: 8px; background: var(--track); border-radius: 999px; position: relative; cursor: default; }
.lbars .tr:focus { outline: none; box-shadow: 0 0 0 3px rgba(191,3,3,0.15); }
.lbars .b { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--ink-series); min-width: 6px; }
.lbars .b.hl { background: var(--red); }
.lbars .v { font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }
.lbars .v span { color: var(--muted); margin-left: 6px; display: inline-block; min-width: 30px; }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 200px; margin-top: 18px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; cursor: default; }
.cols .c:focus { outline: none; }
.cols .n { font-size: 12.5px; }
.cols .bar { width: 100%; max-width: 34px; border-radius: 8px; background: var(--ink-series); min-height: 4px; }
.cols .bar.hl { background: var(--red); }
.cols .x { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.journey { display: grid; gap: 16px; margin-top: 18px; }
.journey .st { display: grid; grid-template-columns: 1fr auto; gap: 6px; cursor: default; }
.journey .st:focus { outline: none; }
.journey .nm { font-size: 13.5px; color: var(--text-2); }
.journey .nv { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.journey .nv span { color: var(--muted); margin-left: 6px; }
.journey .tr { grid-column: span 2; height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; }
.journey .tr i { display: block; height: 100%; border-radius: 999px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12.5px; padding: 0 10px 10px 0; }
.tbl td { padding: 13px 10px 13px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl td.m { color: var(--text-2); }
.tbl td:last-child, .tbl th:last-child { text-align: right; padding-right: 0; }
.chip { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip.ink { background: var(--chip-ink-bg); color: var(--chip-ink); }
.chip.red { background: var(--chip-red-bg); color: var(--chip-red); }
.chip.gray { background: var(--chip-gray-bg); color: var(--chip-gray); }
.tbl-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
table.data th, table.data td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-weight: 400; }
table.data .n { text-align: right; font-variant-numeric: tabular-nums; }
.dcard table.data th, .dcard table.data td { border-color: var(--dline); }
.note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.dcard .note { color: var(--dmuted); }
.foot { padding: 0 34px 30px; font-size: 12px; color: var(--muted); max-width: 900px; }

/* Tooltip, toast, empty */
.tip { position: fixed; z-index: 50; pointer-events: none; background: #0e0e0d; color: #f2f1ee; border-radius: 12px; padding: 9px 12px; font-size: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.25); opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; max-width: 280px; }
.tip.show { opacity: 1; transform: none; }
.tip .trow { display: flex; align-items: center; gap: 8px; }
.tip .tv { font-size: 14px; font-weight: 500; white-space: nowrap; }
.tip .tl { color: #b9b7b0; }
.tip .trow i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 10px); background: #0e0e0d; color: #fff; padding: 9px 14px; border-radius: 12px; font-size: 13px; opacity: 0; transition: 0.2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { padding: 40px 10px; text-align: center; color: var(--text-2); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-weight: 500; font-size: 20px; }
.empty button { margin-top: 14px; }
.loading { opacity: 0.55; transition: opacity 0.2s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .top-grid, .band { grid-template-columns: 1fr; }
  .span-4 { grid-column: span 6; }
}
@media (max-width: 820px) {
  .frame { margin: 0; border-radius: 0; border: 0; }
  .top { padding: 16px 16px 24px; }
  .nav { flex-wrap: wrap; gap: 10px; }
  .pills { order: 3; width: 100%; margin: 0; }
  .pills a { padding: 9px 16px; font-size: 13px; }
  .nav-tools { margin-left: auto; }
  .hello { margin: 26px 0 20px; }
  .band, .lower { padding: 18px 16px; gap: 16px; }
  .span-6, .span-4, .span-8 { grid-column: span 12; }
  .glass, .wcard, .dcard { padding: 18px; border-radius: 22px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); padding: 14px 4px 4px; }
  .stat:first-child { border-top: 0; }
  .badge { width: 170px; height: 170px; }
  .foot { padding: 0 16px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }
