:root {
  color-scheme: light;
  --background: #fafafa;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #a1a1aa;
  --destructive: #e7000b;
  --top-bg: rgb(16 185 129 / 0.10); --top-fg: #047857;
  --sup-bg: rgb(59 130 246 / 0.09); --sup-fg: #2f62c4;
  --wait-bg: rgb(217 119 6 / 0.08); --wait-fg: #a15c07;
  --avoid-bg: rgb(220 38 38 / 0.07); --avoid-fg: #b02a20;
  --radius: 0.625rem;
  --glass: rgb(255 255 255 / 0.72);
  --glass-border: #e4e4e7;
  --highlight: rgb(255 255 255 / 0.65);
  --glow-a: rgb(24 24 27 / 0.07);
  --glow-b: rgb(24 24 27 / 0.05);
  --glow-c: rgb(24 24 27 / 0.04);
  --grid-line: rgb(9 9 11 / 0.05);
  --title-a: #09090b;
  --title-b: #71717a;
  --code-bg: #09090b;
  --code-fg: #fafafa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #09090b;
    --foreground: #fafafa;
    --card: #111113;
    --card-foreground: #fafafa;
    --primary: #e4e4e7;
    --primary-foreground: #18181b;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --accent: #27272a;
    --accent-foreground: #fafafa;
    --border: #27272a;
    --input: #27272a;
    --ring: #d4d4d8;
    --destructive: #ef4444;
    --top-bg: rgb(52 211 153 / 0.11); --top-fg: #7fd6ae;
    --sup-bg: rgb(96 165 250 / 0.12); --sup-fg: #95b9f2;
    --wait-bg: rgb(245 197 66 / 0.10); --wait-fg: #dfbe7c;
    --avoid-bg: rgb(248 113 113 / 0.11); --avoid-fg: #e09c96;
    --glass: rgb(24 24 27 / 0.55);
    --glass-border: rgb(255 255 255 / 0.08);
    --highlight: rgb(255 255 255 / 0.07);
    --glow-a: rgb(250 250 250 / 0.06);
    --glow-b: rgb(250 250 250 / 0.04);
    --glow-c: rgb(250 250 250 / 0.03);
    --grid-line: rgb(255 255 255 / 0.045);
    --title-a: #fafafa;
    --title-b: #a1a1aa;
    --code-bg: #0c0c0e;
    --code-fg: #fafafa;
  }
}

/* Explicit dark choice (topbar toggle) wins regardless of OS setting */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #09090b; --foreground: #fafafa; --card: #111113; --card-foreground: #fafafa;
  --primary: #e4e4e7; --primary-foreground: #18181b;
  --secondary: #27272a; --secondary-foreground: #fafafa;
  --muted: #27272a; --muted-foreground: #a1a1aa;
  --accent: #27272a; --accent-foreground: #fafafa;
  --border: #27272a; --input: #27272a; --ring: #d4d4d8; --destructive: #ef4444;
  --top-bg: rgb(52 211 153 / 0.11); --top-fg: #7fd6ae;
  --sup-bg: rgb(96 165 250 / 0.12); --sup-fg: #95b9f2; --wait-bg: rgb(245 197 66 / 0.10); --wait-fg: #dfbe7c;
  --avoid-bg: rgb(248 113 113 / 0.11); --avoid-fg: #e09c96;
  --glass: rgb(24 24 27 / 0.55); --glass-border: rgb(255 255 255 / 0.08); --highlight: rgb(255 255 255 / 0.07);
  --glow-a: rgb(250 250 250 / 0.06); --glow-b: rgb(250 250 250 / 0.04); --glow-c: rgb(250 250 250 / 0.03);
  --grid-line: rgb(255 255 255 / 0.045); --title-a: #fafafa; --title-b: #a1a1aa;
  --code-bg: #0c0c0e; --code-fg: #fafafa;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--background); }
body { margin: 0; min-width: 280px; background: transparent; color: var(--foreground); -webkit-font-smoothing: antialiased; }
/* Ambient background: aurora glows + faded grid (shadcn/Linear style) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(620px 420px at 12% -6%, var(--glow-a), transparent 62%),
    radial-gradient(720px 520px at 86% -4%, var(--glow-b), transparent 62%),
    radial-gradient(900px 640px at 50% 112%, var(--glow-c), transparent 65%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .9;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 85% 52% at 50% 0%, black 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 52% at 50% 0%, black 25%, transparent 78%);
}
@keyframes hubx-sheen {
  0% { transform: translateX(-160%) skewX(-14deg); }
  55%, 100% { transform: translateX(280%) skewX(-14deg); }
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--secondary); }
.wrap { width: min(100% - 72px, 1100px); margin-inline: auto; }

/* Header — flat white bar, hairline bottom border (shadcn site header) */
.masthead { position: sticky; top: 0; z-index: 50; color: var(--foreground); border-bottom: 1px solid var(--glass-border); background: color-mix(in srgb, var(--background) 72%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); }
.masthead-inner { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { position: relative; overflow: hidden; width: 26px; height: 26px; border-radius: 7px; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.brand-mark::after { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.35), transparent); animation: hubx-sheen 3.6s ease-in-out infinite; }
.networks { display: flex; gap: 18px; color: var(--muted-foreground); font-size: 12.5px; font-weight: 500; }
.networks span { display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ring); }
.dot.testnet { background: var(--muted-foreground); opacity: .55; }

.intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 40px 0 24px; }
.intro h1 { margin: 0; font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.04em; line-height: 1.1; font-weight: 650; background: linear-gradient(180deg, var(--title-a) 25%, var(--title-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro p { margin: 10px 0 0; color: var(--muted-foreground); font-size: 15px; }
.snapshot { display: flex; margin: 0 0 2px; gap: 23px; }
.snapshot dt, .metrics dt { color: var(--muted-foreground); font-size: 12px; font-weight: 500; }
.snapshot dd { margin: 5px 0 0; font: 12px var(--mono); white-space: nowrap; color: var(--foreground); }
.load-status { padding: 20px 0; color: var(--muted-foreground); font-size: 14px; }

/* How-it-works steps — plain bordered cards */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; }
.step { display: flex; gap: 12px; padding: 18px; background: var(--glass); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--highlight), 0 1px 2px rgb(0 0 0 / 0.04); transition: transform .2s ease, border-color .2s ease; }
.step:hover { transform: translateY(-2px); border-color: var(--ring); }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--secondary); color: var(--muted-foreground); font: 600 12px var(--mono); display: grid; place-items: center; margin-top: 1px; }
.step h2 { margin: 0 0 5px; font-size: 14px; letter-spacing: -0.01em; font-weight: 600; }
.step p { margin: 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.55; }

/* Layout + cards */
.desk-layout { display: grid; grid-template-columns: minmax(235px, 280px) minmax(0, 1fr); align-items: start; gap: 16px; }
.pool-panel, .verdict-panel, .request-panel, .books {
  background: var(--glass); color: var(--card-foreground);
  backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--highlight), 0 8px 32px rgb(0 0 0 / 0.06);
}
.verdict-panel { position: relative; overflow: hidden; }
.verdict-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--ring), transparent); opacity: .65; pointer-events: none; }
.pool-panel { overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--border); }
.panel-heading h2, .request-panel h2, .proof h2, .books-head h2 { font-size: 14px; margin: 0; letter-spacing: -0.01em; font-weight: 600; }
.panel-heading span { color: var(--muted-foreground); font: 12px var(--mono); }
.pool-list { padding: 6px; display: grid; gap: 2px; }
.pool-list button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: calc(var(--radius) - 2px);
  background: transparent; color: var(--foreground); text-align: left; transition: background-color .15s;
}
.pool-list button:hover { background: var(--accent); }
.pool-list button[aria-pressed="true"] { background: var(--accent); color: var(--accent-foreground); border-color: var(--border); }
.pool-list button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.pool-list .verdict-badge { font-size: 10px; padding: 3px 8px; }
.pool-name { display: block; font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.pool-version { display: block; margin-top: 1px; color: var(--muted-foreground); font: 11px var(--mono); }

/* Badges — shadcn variants: default / secondary / outline / destructive */
.verdict-badge { border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.verdict-badge[data-label="TOP_PICK"] { position: relative; overflow: hidden; background: var(--top-bg); color: var(--top-fg); }
.verdict-badge[data-label="TOP_PICK"]::after { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.4), transparent); animation: hubx-sheen 2.8s ease-in-out infinite; }
.verdict-badge[data-label="SUPPLY"] { background: var(--sup-bg); color: var(--sup-fg); }
.verdict-badge[data-label="WAIT"] { background: var(--wait-bg); color: var(--wait-fg); }
.verdict-badge[data-label="AVOID"] { background: var(--avoid-bg); color: var(--avoid-fg); }
.verdict-badge[data-label="HOT"], .verdict-badge[data-label="HOT_STRETCHED"], .verdict-badge[data-label="BUY_ZONE"], .verdict-badge[data-label="SHORT_ZONE"], .verdict-badge[data-label="OK"] { background: var(--top-bg); color: var(--top-fg); }
.verdict-badge[data-label="NO_DATA"], .verdict-badge[data-label="NONE"] { background: transparent; color: var(--muted-foreground); border: 1px dashed var(--muted-foreground); }
.verdict-badge[data-label="BLOCK_SUGGESTED"], .verdict-badge[data-label="WARN"], .verdict-badge[data-label="UNTRUSTED"] { background: var(--avoid-bg); color: var(--avoid-fg); }

.details { display: grid; gap: 16px; min-width: 0; }
.verdict-panel { padding: 24px; }
.pool-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.code { font: 12px var(--mono); color: var(--muted-foreground); margin: 0 0 7px; }
.pool-header h2 { font-size: clamp(24px, 4.3vw, 34px); letter-spacing: -0.045em; line-height: 1.05; margin: 0; font-weight: 650; }
.reason { margin: 12px 0 20px; font-size: 15px; color: var(--muted-foreground); line-height: 1.55; }
.metrics { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--glass-border); border-radius: var(--radius); background: color-mix(in srgb, var(--muted) 55%, transparent); }
.metrics div { padding: 13px 15px; }
.metrics div + div { border-left: 1px solid var(--border); }
.metrics dd { margin: 5px 0 0; font-size: clamp(16px, 2.6vw, 24px); letter-spacing: -0.03em; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metrics dd[data-negative="true"] { color: var(--destructive); }
.metric-note { margin: 11px 0 0; font-size: 12px; color: var(--muted-foreground); }

/* Request panel — shadcn default button (primary black) */
.request-panel { padding: 18px 20px 20px; }
.request-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; margin-bottom: 12px; }
.request-heading span { color: var(--foreground); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.command { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 8px 8px 14px; color: var(--code-fg); background: var(--code-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--highlight), 0 10px 32px rgb(0 0 0 / 0.18); }
.command code { min-width: 0; font: 12.5px var(--mono); overflow-wrap: anywhere; }
.command button { position: relative; overflow: hidden; flex: none; border: 1px solid rgb(255 255 255 / 0.14); border-radius: calc(var(--radius) - 2px); background: var(--primary); color: var(--primary-foreground); padding: 7px 12px; font-size: 12.5px; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); transition: opacity .15s; }
.command button::after { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.35), transparent); animation: hubx-sheen 3.2s ease-in-out infinite; }
.command button:hover { opacity: .88; }
.command button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Ledger books */
.books { margin-top: 16px; padding: 20px; }
.books-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.books-head a { color: var(--muted-foreground); font: 12px var(--mono); text-decoration: none; }
.books-head a:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 4px; }
.books-note { margin: 8px 0 14px; color: var(--muted-foreground); font-size: 13px; line-height: 1.55; max-width: 68ch; }
.books .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.books-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; font: 12px var(--mono); color: var(--muted-foreground); }

/* Proof strip — quiet bordered card */
.proof { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 16px 0 42px; padding: 17px 20px; border: 1px solid var(--glass-border); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); box-shadow: inset 0 1px 0 var(--highlight); }
.proof p { margin: 6px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.55; }
.proof strong { color: var(--foreground); font-weight: 600; }
.proof-links { display: flex; flex-wrap: wrap; gap: 14px; flex: none; }
.proof a { padding: 0; color: var(--foreground); font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.proof a:hover { color: var(--muted-foreground); }
.proof a span { margin-left: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

@media (max-width: 820px) {
  .wrap { width: calc(100% - 38px); }
  .intro { align-items: start; flex-direction: column; gap: 17px; padding-top: 32px; }
  .steps { grid-template-columns: 1fr; }
  .desk-layout { grid-template-columns: minmax(0, 1fr); }
  .pool-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
  .pool-list button { flex: 0 0 auto; width: auto; min-width: 138px; border-color: var(--border); }
  .pool-list button + button { margin-top: 0; }
  .proof { flex-direction: column; align-items: flex-start; gap: 12px; }
  .books .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books .metrics div:nth-child(odd) { border-left: 0; }
}
@media (max-width: 470px) {
  .wrap { width: calc(100% - 26px); }
  .masthead-inner { min-height: 52px; }
  .networks { gap: 8px; font-size: 11px; }
  .dot { width: 5px; height: 5px; }
  .verdict-panel { padding: 18px; }
  .request-panel { padding: 14px 16px 16px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics div:nth-child(odd) { border-left: 0; }
  .proof { margin-bottom: 26px; padding: 15px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* All-lanes board */
.lanes { margin-top: 16px; padding: 20px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--highlight), 0 8px 32px rgb(0 0 0 / 0.06); }
.lanes-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lanes-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; font-weight: 600; }
.lane-sub { margin: 6px 0 0; color: var(--muted-foreground); font-size: 13px; max-width: 52ch; }
.lane-tabs { display: flex; gap: 2px; padding: 3px; background: var(--muted); border: 1px solid var(--glass-border); border-radius: calc(var(--radius) + 2px); }
.lane-tabs button { border: 1px solid transparent; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--muted-foreground); padding: 5px 13px; font-size: 12.5px; font-weight: 600; transition: background-color .15s, color .15s; }
.lane-tabs button:hover { color: var(--foreground); }
.lane-tabs button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); }
.lane-banner { margin-top: 14px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--destructive) 35%, transparent); background: color-mix(in srgb, var(--destructive) 8%, transparent); border-radius: var(--radius); font-size: 13px; line-height: 1.5; }
.lane-table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--glass-border); border-radius: var(--radius); background: color-mix(in srgb, var(--card) 60%, transparent); }
.lane-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lane-table th { text-align: left; color: var(--muted-foreground); font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--glass-border); white-space: nowrap; }
.lane-table td { padding: 9px 12px; border-top: 1px solid var(--glass-border); vertical-align: top; line-height: 1.45; }
.lane-table tbody tr:first-child td { border-top: 0; }
.lane-table td:nth-child(3) { color: var(--muted-foreground); min-width: 220px; }
.lane-table .verdict-badge { background: var(--secondary); color: var(--secondary-foreground); }
.lane-table .verdict-badge[data-label="TOP_PICK"], .lane-table .verdict-badge[data-label="HOT"], .lane-table .verdict-badge[data-label="HOT_STRETCHED"], .lane-table .verdict-badge[data-label="BUY_ZONE"], .lane-table .verdict-badge[data-label="OK"] { background: var(--top-bg); color: var(--top-fg); }
.lane-table .verdict-badge[data-label="WAIT"], .lane-table .verdict-badge[data-label="NO_DATA"], .lane-table .verdict-badge[data-label="NONE"] { background: transparent; color: var(--muted-foreground); border-color: var(--border); }
.lane-table .verdict-badge[data-label="BLOCK_SUGGESTED"], .lane-table .verdict-badge[data-label="WARN"], .lane-table .verdict-badge[data-label="UNTRUSTED"] { background: var(--destructive); color: #fff; }
@media (max-width: 640px) { .lanes-head { flex-direction: column; } }

/* App shell (dashboard-01 pattern): sidebar rail + inset main */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
.masthead { position: sticky; top: 0; height: 100vh; border-bottom: 0; border-right: 1px solid var(--glass-border); }
.masthead-inner { display: flex; flex-direction: column; align-items: stretch; gap: 22px; height: 100%; padding: 20px 18px; }
.rail-nav { display: grid; gap: 4px; }
.rail-nav a { padding: 8px 10px; border-radius: calc(var(--radius) - 2px); color: var(--muted-foreground); text-decoration: none; font-size: 13.5px; font-weight: 550; }
.rail-nav a:hover { background: var(--accent); color: var(--accent-foreground); }
.networks { flex-direction: column; align-items: flex-start; gap: 6px; }
.rail-id { margin-top: auto; border-top: 1px solid var(--glass-border); padding-top: 16px; display: grid; gap: 7px; }
.rail-id-label { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }
.rail-id a { font: 12px var(--mono); color: var(--muted-foreground); text-decoration: none; }
.rail-id a:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.main-col { min-width: 0; }
.main-col > .wrap { display: flex; flex-direction: column; width: min(100% - 48px, 1080px); }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 24px; border-bottom: 1px solid var(--glass-border); background: color-mix(in srgb, var(--background) 72%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); }
.crumb { font-size: 13px; font-weight: 550; color: var(--muted-foreground); }
.crumb span { margin: 0 6px; opacity: .55; }
.topbar-chips { display: flex; gap: 8px; align-items: center; }
.topbar-chips a, .topbar-chips .chip { border: 1px solid var(--glass-border); background: var(--glass); padding: 4px 10px; border-radius: 999px; font: 11.5px var(--mono); color: var(--muted-foreground); text-decoration: none; }
.topbar-chips a:hover { color: var(--foreground); }
.how-line { margin: 0 0 16px; color: var(--muted-foreground); font-size: 13px; }
.how-line span { margin: 0 6px; opacity: .6; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.kpi { background: var(--glass); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--highlight), 0 1px 2px rgb(0 0 0 / 0.04); padding: 16px 18px; }
.kpi dt { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-foreground); }
.kpi dd { margin: 8px 0 2px; font-size: 21px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi p { margin: 0; color: var(--muted-foreground); font-size: 12px; }
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .masthead { height: auto; border-right: 0; border-bottom: 1px solid var(--glass-border); }
  .masthead-inner { flex-direction: row; flex-wrap: wrap; align-items: center; height: auto; padding: 12px 18px; gap: 12px; }
  .rail-nav { display: flex; overflow-x: auto; }
  .rail-id, .networks { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lane screens (tabbed board) */
.lane-switch { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px; margin: 0 0 16px; background: var(--glass); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); border: 1px solid var(--glass-border); border-radius: calc(var(--radius) + 2px); box-shadow: inset 0 1px 0 var(--highlight); }
.lane-switch > button { border: 1px solid transparent; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--muted-foreground); padding: 6px 14px; font-size: 13px; font-weight: 600; }
.lane-switch > button:hover { color: var(--foreground); }
.lane-switch > button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); }
.risk-switch { margin-left: auto; display: flex; gap: 2px; padding: 2px; background: var(--muted); border-radius: calc(var(--radius) - 2px); }
.risk-switch button { border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted-foreground); padding: 4px 10px; font-size: 11.5px; font-weight: 600; }
.risk-switch button[aria-pressed="true"] { background: var(--card); color: var(--foreground); border-color: var(--border); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.lane-screen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 4px 0 12px; }
.lane-screen-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.lane-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.lane-list-panel { overflow: hidden; }
.lane-list { padding: 6px; display: grid; gap: 2px; max-height: 560px; overflow-y: auto; }
.lane-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--foreground); text-align: left; font-size: 13px; }
.lane-item:hover { background: var(--accent); }
.lane-item[aria-pressed="true"] { background: var(--accent); border-color: var(--border); }
.lane-item-asset { font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-detail { padding: 22px; min-height: 320px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat-tile { border: 1px solid var(--glass-border); border-radius: var(--radius); background: color-mix(in srgb, var(--muted) 55%, transparent); padding: 11px 13px; }
.stat-tile span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground); }
.stat-tile strong { display: block; margin-top: 5px; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-json { margin: 0 0 14px; padding: 12px 14px; background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--glass-border); border-radius: var(--radius); font: 11px/1.55 var(--mono); overflow: auto; max-height: 190px; }
.venue-link { display: inline-block; padding: 7px 13px; border-radius: calc(var(--radius) - 2px); background: var(--primary); color: var(--primary-foreground); font-size: 12.5px; font-weight: 600; text-decoration: none; margin-bottom: 14px; }
.venue-link:hover { opacity: .88; }
.lane-snippet { margin-top: 4px; }
.all-routes { margin-top: 16px; overflow: hidden; }
.lane-table-wrap.flush { margin-top: 0; border: 0; border-radius: 0; }
@keyframes hubx-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ring) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.pulse { animation: hubx-pulse 1.1s ease-out 2; }
@keyframes hubx-slide-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.feed-in { animation: hubx-slide-in .35s ease-out; }
@media (max-width: 920px) {
  .lane-grid { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-switch { margin-left: 0; }
}

/* ---- Redesign layer (from Claude desk redesign, wired to live data) ---- */
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 4px; font-size: 12px; font-weight: 550; color: var(--muted-foreground); cursor: pointer; }
.theme-toggle input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.theme-toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform .2s; }
.theme-toggle input:checked { background: var(--primary); }
.theme-toggle input:checked::after { transform: translateX(16px); }

.best-card { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: 100%; text-align: left; margin: 0 0 20px; padding: 20px 22px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); border: 1px solid var(--primary); border-radius: calc(var(--radius) + 4px); box-shadow: inset 0 1px 0 var(--highlight), 0 8px 32px rgb(0 0 0 / 0.06); color: var(--foreground); font: inherit; cursor: pointer; }
.best-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--primary) 14%, transparent) 50%, transparent 70%); transform: translateX(-120%); animation: hubx-sheen 6s ease-in-out infinite; pointer-events: none; }
.best-card:hover { border-color: var(--ring); }
.best-main { display: grid; gap: 3px; }
.best-label { font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); }
.shimmer-text { background: linear-gradient(90deg, var(--muted-foreground) 0%, var(--foreground) 50%, var(--muted-foreground) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hubx-shimmer-text 3.5s linear infinite; }
@keyframes hubx-shimmer-text { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.best-name { font-size: 27px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.best-num { display: grid; justify-items: end; gap: 1px; font-size: 12.5px; color: var(--muted-foreground); }
.best-apr { font-size: 27px; font-weight: 650; letter-spacing: -0.02em; color: var(--foreground); font-variant-numeric: tabular-nums; }

.dist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.dist-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.dist-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted-foreground); }
.dist-legend .dist-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.dist-legend .dist-dot[data-label="TOP_PICK"] { background: #2f9e77; }
.dist-legend .dist-dot[data-label="SUPPLY"] { background: #4a76b8; }
.dist-legend .dist-dot[data-label="WAIT"] { background: #b57e2e; }
.dist-legend .dist-dot[data-label="AVOID"] { background: var(--destructive); }
.dist-bar { display: flex; gap: 3px; height: 8px; margin: 0 0 16px; }
.dist-bar span { border-radius: 4px; min-width: 8px; }
.dist-bar span[data-label="TOP_PICK"] { background: #2f9e77; }
.dist-bar span[data-label="SUPPLY"] { background: #4a76b8; }
.dist-bar span[data-label="WAIT"] { background: #b57e2e; }
.dist-bar span[data-label="AVOID"] { background: var(--destructive); }
.dist-bar span[data-label="OTHER"] { background: var(--muted-foreground); }

.pool-tools { display: grid; gap: 9px; padding: 12px 12px 4px; }
.pool-search { width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); background: var(--background); color: var(--foreground); font: 13.5px Inter, ui-sans-serif, sans-serif; }
.pool-search::placeholder { color: var(--muted-foreground); }
.pool-search:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.filter-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-chips button { min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); font-size: 12px; font-weight: 600; }
.filter-chips button:hover { color: var(--foreground); }
.filter-chips button[aria-pressed="true"] { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.grp-label { margin: 13px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.lane-search { margin: 12px 12px 0; width: calc(100% - 24px); }
.lane-head-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.lane-head-meta .metric-note { margin: 0; }

.ask-panel { margin-top: 16px; padding: 20px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--highlight), 0 8px 32px rgb(0 0 0 / 0.06); }
.ask-panel .books-head h2 { font-size: 14px; margin: 0; font-weight: 600; }
.ask-price { color: var(--muted-foreground); font: 12px var(--mono); }
.ask-input { margin-bottom: 12px; }
.ask-command code { white-space: pre-wrap; }

.feed-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--border); font-family: inherit; }
.feed-item:last-child { border-bottom: 0; }
.feed-seq { font: 12px var(--mono); color: var(--muted-foreground); }
.feed-main { min-width: 0; font-size: 13.5px; }
.feed-main b { font-weight: 600; }
.feed-sub { display: block; font: 11.5px var(--mono); color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.proof-sec { margin-top: 16px; }
.proof-sec > h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.proof-sec .steps { margin: 0; }
.step-kicker { margin: 0 0 5px; font: 600 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--primary); }
.step h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.step a { color: var(--primary); font-size: 13px; font-weight: 500; text-decoration: none; }
.step a:hover { text-decoration: underline; text-underline-offset: 3px; }

.desk-footer { margin: 6px 0 42px; color: var(--muted-foreground); font-size: 13px; }
.desk-footer .ids { display: flex; gap: 9px; flex-wrap: wrap; }
.desk-footer .chip { display: inline-flex; align-items: center; padding: 9px 13px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: calc(var(--radius) - 2px); font: 12px var(--mono); color: var(--foreground); text-decoration: none; }
.desk-footer .chip:hover { border-color: var(--primary); }
.desk-footer p { margin: 14px 0 0; max-width: 72ch; line-height: 1.55; }

@media (max-width: 640px) {
  .best-num { justify-items: start; }
  .feed-item { grid-template-columns: minmax(0, 1fr) auto; }
  .feed-seq { display: none; }
}

/* ---- Containment fixes: every panel is a proper bordered box ---- */
.lane-list-panel, .lane-detail, .all-routes {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--highlight), 0 8px 32px rgb(0 0 0 / 0.06);
}
.all-routes { overflow: hidden; }
.lane-list-panel { display: flex; flex-direction: column; }
.lane-list { flex: 1; }

/* Proof steps: block cards (the legacy .step flex row crushed the new markup) */
.proof-sec .step { display: block; }
.proof-sec .step p { margin: 0 0 10px; }
.proof-sec .step .step-kicker { margin: 0 0 5px; }

/* Best card: quiet border, emphasis from the badge/APR */
.best-card { border-color: var(--glass-border); }

/* Ask snippet: one line that scrolls inside its box instead of wrapping */
.ask-command code { white-space: nowrap; overflow-x: auto; }

/* KPI labels never squeeze the value */
.kpi dd { min-width: 0; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; }
  .topbar-chips { flex-wrap: wrap; }
  .topbar-chips a, .topbar-chips .chip { white-space: nowrap; }
  .crumb { font-size: 12.5px; }
  .kpi dd { white-space: normal; overflow-wrap: anywhere; }
  .best-card { flex-direction: column; align-items: flex-start; }
  .best-num { justify-items: start; }
  .metrics dd { overflow-wrap: anywhere; }
}

/* ---- Attio / Gumloop / Linear layer: framed app, hairlines, insight cards ---- */
:root { --sidebar-bg: #fafafa; --radius: 0.875rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sidebar-bg: #0c0c0e; } }
:root[data-theme="dark"] { --sidebar-bg: #0c0c0e; }

/* Product-as-hero: the desk sits in a framed app window on a calm canvas */
.app-shell {
  max-width: 1420px;
  margin: 16px auto;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: clip;
  box-shadow: 0 24px 60px rgb(16 24 40 / 0.10), 0 2px 6px rgb(16 24 40 / 0.06);
  background: var(--card);
}
.masthead { background: var(--sidebar-bg); top: 16px; height: calc(100vh - 32px); }
.main-col { background: var(--card); }

/* Hairline cards, soft shadows (no heavy glass blur) */
.pool-panel, .verdict-panel, .request-panel, .books, .kpi, .ask-panel,
.lane-list-panel, .lane-detail, .all-routes, .best-card, .step {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.05);
}
.pool-panel, .verdict-panel, .request-panel, .books, .ask-panel,
.lane-list-panel, .lane-detail, .all-routes, .step { background: var(--card); }

/* Sidebar: grouped nav with icons */
.rail-group { margin: 2px 10px 7px; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }
.rail-nav a { display: flex; align-items: center; gap: 9px; border-radius: 8px; }
.rail-nav svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.rail-nav a:hover svg { opacity: 1; }

/* Type scale: tighter, larger hero heading, quiet captions */
.intro h1 { font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -0.04em; }
.intro p { max-width: 58ch; }
.kpi dt, .grp-label { letter-spacing: .08em; }

/* Table rows breathe on hover (Stripe-style data tables) */
.lane-table tbody tr { transition: background-color .12s; }
.lane-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 65%, transparent); }

/* Ask: Attio-style prompt composer with suggestion chips */
.ask-composer { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 6px 6px 6px 14px; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s; }
.ask-composer:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
.ask-input-field { width: 100%; border: 0; background: transparent; color: var(--foreground); font: 15px/1.5 Inter, ui-sans-serif, sans-serif; padding: 8px 8px 4px 0; outline: none; }
.ask-input-field::placeholder { color: var(--muted-foreground); }
.ask-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 4px 0; }
.ask-hint { font-size: 11.5px; color: var(--muted-foreground); }
.ask-send { flex: none; min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--primary); color: var(--primary-foreground); font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.ask-send:hover { opacity: .88; }
.ask-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.ask-chip { min-height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); font-size: 12.5px; font-weight: 550; cursor: pointer; transition: color .15s, border-color .15s; }
.ask-chip:hover { color: var(--foreground); border-color: var(--ring); }

/* Books: Gumloop analytics grid + Linear-style dark activity feed */
.books-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 16px; align-items: stretch; }
.chart-card { border: 1px solid var(--glass-border); border-radius: calc(var(--radius) - 2px); background: color-mix(in srgb, var(--muted) 45%, var(--card)); padding: 16px 18px; display: flex; flex-direction: column; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chart-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.chart-caption { font: 11.5px var(--mono); color: var(--muted-foreground); text-align: right; }
.books-chart { flex: 1; display: flex; align-items: stretch; gap: 14px; min-height: 128px; padding-top: 6px; font-size: 12.5px; color: var(--muted-foreground); }
.chart-day { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chart-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 92px; border-bottom: 1px solid var(--border); }
.chart-bar { width: 11px; max-width: 34%; border-radius: 3px 3px 0 0; transition: height .4s ease; }
.chart-bar.fee { background: var(--foreground); }
.chart-bar.cost { background: color-mix(in srgb, var(--muted-foreground) 38%, transparent); }
.chart-label { margin-top: 7px; font: 10.5px var(--mono); color: var(--muted-foreground); text-align: center; white-space: nowrap; }
.chart-legend { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 11.5px; color: var(--muted-foreground); }
.chart-legend .sq { display: inline-block; width: 9px; height: 9px; border-radius: 2.5px; margin-right: 6px; }
.chart-legend .sq.fee { background: var(--foreground); }
.chart-legend .sq.cost { background: color-mix(in srgb, var(--muted-foreground) 38%, transparent); }
.chart-range { margin-left: auto; font: 11px var(--mono); }
.feed-card { border-radius: calc(var(--radius) - 2px); background: var(--code-bg); color: var(--code-fg); padding: 16px 18px; display: flex; flex-direction: column; }
.feed-head span { font: 11px var(--mono); color: color-mix(in srgb, var(--code-fg) 62%, transparent); }
.feed-card .books-list { margin-top: 2px; }
.feed-card .feed-item { border-bottom-color: rgb(255 255 255 / 0.09); padding: 9px 2px; }
.feed-card .feed-seq { color: color-mix(in srgb, var(--code-fg) 55%, transparent); }
.feed-card .feed-sub { color: color-mix(in srgb, var(--code-fg) 58%, transparent); }
.feed-card .feed-main b { color: var(--code-fg); }

@media (max-width: 920px) {
  .app-shell { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .masthead { top: 0; height: auto; border-radius: 0; }
  .books-grid { grid-template-columns: 1fr; }
}

/* Chart grouping + mobile nav tidy */
.books-chart { justify-content: center; }
.chart-day { flex: 0 1 88px; }
@media (max-width: 920px) {
  .rail-group { display: none; }
  .rail-nav a { white-space: nowrap; flex: none; }
}

/* ---- Balance the workspace, kill badge sheen, subtle violet dark shade ---- */
.verdict-badge[data-label="TOP_PICK"]::after { display: none; }
.pool-list { max-height: 470px; overflow-y: auto; scrollbar-width: thin; }
.pool-list button { padding: 8px 10px; }
.pool-tools { padding: 10px 12px 2px; }
.filter-chips button { min-height: 28px; }
.grp-label { margin: 10px 10px 3px; }
.agent-rows { display: grid; gap: 0; }
.agent-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 2px; border-top: 1px solid var(--border); font-size: 13px; }
.agent-rows span { color: var(--muted-foreground); }
.agent-rows strong { font-weight: 600; text-align: right; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glow-a: rgb(139 92 246 / 0.13);
    --glow-b: rgb(99 102 241 / 0.10);
    --glow-c: rgb(192 132 252 / 0.08);
    --sidebar-bg: #0e0c14;
  }
  :root:not([data-theme="light"]) .main-col {
    background: linear-gradient(180deg, rgb(139 92 246 / 0.075), rgb(139 92 246 / 0.02) 340px, transparent 580px), var(--card);
  }
}
:root[data-theme="dark"] {
  --glow-a: rgb(139 92 246 / 0.13);
  --glow-b: rgb(99 102 241 / 0.10);
  --glow-c: rgb(192 132 252 / 0.08);
  --sidebar-bg: #0e0c14;
}
:root[data-theme="dark"] .main-col {
  background: linear-gradient(180deg, rgb(139 92 246 / 0.075), rgb(139 92 246 / 0.02) 340px, transparent 580px), var(--card);
}

/* ---- Postmoderno layer: glowing navy canvas, pill nav, serif display, wordmark ---- */
:root { --wordmark-a: rgb(24 24 27 / 0.13); --wordmark-b: rgb(24 24 27 / 0.015); }

/* Serif display headline (editorial contrast, like the reference site) */
.intro h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 58px);
  letter-spacing: -0.015em;
  line-height: 1.04;
}
.intro { padding-top: 26px; }
.how-line { font-family: var(--mono); font-size: 12px; letter-spacing: 0.01em; }

/* Floating pill topbar with specular top edge */
.topbar {
  margin: 14px 18px 0;
  top: 14px;
  padding: 9px 10px 9px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 84%, transparent);
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 14px 34px rgb(16 24 40 / 0.07);
}
.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--foreground) 32%, transparent), transparent);
  pointer-events: none;
}

/* Best-route card: soft violet wash from the top-right */
.best-card {
  background: radial-gradient(460px 220px at 92% -12%, rgb(139 92 246 / 0.13), transparent 62%), var(--glass);
}

/* Giant gradient wordmark footer (clipped by the app frame) */
.desk-footer { overflow: hidden; margin-bottom: 0; padding-bottom: 20px; }
.desk-footer::after {
  content: "HubX";
  display: block;
  margin: 28px 0 -16px;
  font-size: clamp(88px, 15vw, 210px);
  line-height: 0.78;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-align: center;
  background: linear-gradient(180deg, var(--wordmark-a), var(--wordmark-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  pointer-events: none;
}

/* Dark mode: indigo-violet glow canvas (visible at top, fades down the page) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glow-a: rgb(139 92 246 / 0.17);
    --glow-b: rgb(99 102 241 / 0.12);
    --glow-c: rgb(192 132 252 / 0.09);
    --wordmark-a: rgb(167 139 250 / 0.50);
    --wordmark-b: rgb(99 102 241 / 0.04);
  }
  :root:not([data-theme="light"]) .main-col {
    background:
      radial-gradient(760px 460px at 88% -6%, rgb(139 92 246 / 0.16), transparent 62%),
      radial-gradient(640px 420px at 4% -4%, rgb(99 102 241 / 0.11), transparent 60%),
      linear-gradient(180deg, rgb(139 92 246 / 0.045), transparent 380px),
      var(--card);
  }
  :root:not([data-theme="light"]) .masthead {
    background: linear-gradient(180deg, rgb(139 92 246 / 0.07), transparent 42%), var(--sidebar-bg);
  }
}
:root[data-theme="dark"] {
  --glow-a: rgb(139 92 246 / 0.17);
  --glow-b: rgb(99 102 241 / 0.12);
  --glow-c: rgb(192 132 252 / 0.09);
  --wordmark-a: rgb(167 139 250 / 0.50);
  --wordmark-b: rgb(99 102 241 / 0.04);
}
:root[data-theme="dark"] .main-col {
  background:
    radial-gradient(760px 460px at 88% -6%, rgb(139 92 246 / 0.16), transparent 62%),
    radial-gradient(640px 420px at 4% -4%, rgb(99 102 241 / 0.11), transparent 60%),
    linear-gradient(180deg, rgb(139 92 246 / 0.045), transparent 380px),
    var(--card);
}
:root[data-theme="dark"] .masthead {
  background: linear-gradient(180deg, rgb(139 92 246 / 0.07), transparent 42%), var(--sidebar-bg);
}

@media (max-width: 640px) {
  .topbar { margin: 10px 12px 0; top: 10px; border-radius: 22px; padding-left: 14px; }
  .desk-footer::after { font-size: clamp(64px, 22vw, 120px); }
}

/* ---- Mobile track fix: never let a grid/flex track exceed the viewport ---- */
.app-shell > * { min-width: 0; }
.main-col > .wrap > * { min-width: 0; }
body { overflow-x: clip; }
@media (max-width: 920px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .masthead, .main-col, .rail-nav, .masthead-inner { min-width: 0; }
}
@media (max-width: 640px) {
  .main-col > .wrap { width: min(100% - 28px, 1080px); }
  .pool-list .grp-label { flex: none; align-self: center; }
}

/* ---- Teammate pass: real links, bigger nav, brighter how-line, route cards, logo feel ---- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#desk, #lanes, .books, .proof-sec { scroll-margin-top: 112px; }

.crumb a { color: var(--foreground); text-decoration: none; font-weight: 600; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Sidebar: bigger targets */
.rail-nav a { font-size: 14.5px; padding: 10px 12px; }
.rail-nav svg { width: 17px; height: 17px; }
.rail-nav a[aria-current="true"] { background: var(--accent); color: var(--accent-foreground); }

/* Logo: violet-tinted mark that brightens, grows and wiggles on press */
.brand-mark {
  background: radial-gradient(120% 120% at 80% 0%, rgb(139 92 246 / 0.5), transparent 55%), var(--primary);
  transition: transform .16s ease, filter .16s ease;
}
.wordmark:hover .brand-mark { filter: brightness(1.3); transform: scale(1.08); }
.wordmark:active .brand-mark { animation: hubx-wiggle .34s ease; }
@keyframes hubx-wiggle {
  0% { transform: scale(0.94) rotate(0deg); }
  35% { transform: scale(1.06) rotate(-4deg); }
  65% { transform: scale(1.06) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* How-it-works line: brighter tone, violet arrows */
.how-line { color: color-mix(in srgb, var(--foreground) 80%, transparent); font-size: 12.5px; }
.how-line span { color: #8b5cf6; opacity: 1; }

/* Lane subtitle */
.lane-sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted-foreground); }

/* Every route: bright block cards that open their own detail */
.route-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; padding: 14px; }
.route-card {
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--card);
  padding: 13px 15px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.route-card:hover, .route-card:focus-visible { border-color: var(--ring); transform: translateY(-1px); box-shadow: 0 6px 18px rgb(16 24 40 / 0.08); outline: none; }
.route-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.route-card-top strong { font-size: 14.5px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-apr { font: 600 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--foreground); flex: none; }
.route-card .verdict-badge { align-self: flex-start; }
.route-reason {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.route-card-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted-foreground); }
.route-card-foot a { color: var(--foreground); font-weight: 600; text-decoration: none; white-space: nowrap; }
.route-card-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Ask: label the curl block as the agent API call */
.ask-cmd-label { margin: 0 0 7px; font: 600 10.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted-foreground); }

/* Ledger feed note */
.feed-note { margin: 0 0 8px; font-size: 12px; color: color-mix(in srgb, var(--code-fg) 62%, transparent); }

/* ---- Critique pass: violet signature ring, real agent sidebar card, no wordmark, tighter type ---- */
:root { --ring: #7c3aed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ring: #a78bfa; } }
:root[data-theme="dark"] { --ring: #a78bfa; }

.agent-card { border: 1px solid var(--glass-border); border-radius: calc(var(--radius) - 2px); background: var(--card); padding: 12px; box-shadow: 0 1px 2px rgb(16 24 40 / 0.05); }
.agent-card .rail-id-label { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #2f9e77; box-shadow: 0 0 0 0 rgb(5 150 105 / 0.45); animation: hubx-live-pulse 2.2s ease-out infinite; }
@keyframes hubx-live-pulse { 0% { box-shadow: 0 0 0 0 rgb(5 150 105 / 0.45); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.agent-id-link { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 2px; border-top: 1px solid var(--border); text-decoration: none; }
.agent-id-link span { font-size: 11.5px; color: var(--muted-foreground); }
.agent-id-link strong { font: 600 11.5px var(--mono); color: var(--foreground); white-space: nowrap; }
.agent-id-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* Footer wordmark removed (cliffhanger cliché) — slim sign-off instead */
.desk-footer { margin-bottom: 42px; padding-bottom: 0; }
.desk-footer::after { content: none; }

/* Stronger section hierarchy */
.panel-heading h2, .books-head h2, .proof-sec > h2, .ask-panel .books-head h2 { font-size: 16px; letter-spacing: -0.015em; }
.intro { padding-top: 22px; }

/* Ask anchor lands below the floating pill */
#ask { scroll-margin-top: 112px; }

/* Daily chart: wider bars on a real 7-day axis */
.chart-bar { width: 13px; }
.books-chart { min-height: 118px; }

/* ---- Grouped route boxes with breathing room; subtle badge outlines ---- */
#routes-rows { padding: 14px 14px 2px; }
.route-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--foreground) 4%, var(--card));
  padding: 14px 14px 2px;
  margin-bottom: 14px;
}
.route-group-head { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; }
.route-group-head h3 { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-foreground); }
.route-group[data-label="TOP_PICK"] h3 { color: color-mix(in srgb, var(--top-fg) 82%, var(--muted-foreground)); }
.route-group[data-label="SUPPLY"] h3 { color: color-mix(in srgb, var(--sup-fg) 82%, var(--muted-foreground)); }
.route-group[data-label="WAIT"] h3 { color: color-mix(in srgb, var(--wait-fg) 82%, var(--muted-foreground)); }
.route-group[data-label="AVOID"] h3 { color: color-mix(in srgb, var(--avoid-fg) 82%, var(--muted-foreground)); }
.route-group-count { font: 11px var(--mono); color: var(--muted-foreground); }
.route-group-line { flex: 1; height: 1px; background: var(--border); }
.route-cards { padding: 0 0 12px; gap: 12px; }
.route-card { padding: 15px 17px 13px; }
.route-reason { line-height: 1.5; }

.verdict-badge { border: 1px solid var(--border); font-weight: 550; }
.verdict-badge[data-label="TOP_PICK"], .verdict-badge[data-label="HOT"], .verdict-badge[data-label="HOT_STRETCHED"] { border-color: color-mix(in srgb, var(--top-fg) 30%, transparent); }
.verdict-badge[data-label="SUPPLY"] { border-color: color-mix(in srgb, var(--sup-fg) 30%, transparent); }
.verdict-badge[data-label="WAIT"] { border-color: color-mix(in srgb, var(--wait-fg) 30%, transparent); }
.verdict-badge[data-label="AVOID"] { border-color: color-mix(in srgb, var(--avoid-fg) 30%, transparent); }

@media (max-width: 640px) {
  #routes-rows { padding: 10px 10px 0; }
  .route-group { padding: 10px 10px 0; margin-bottom: 10px; }
}

/* ---- Shimmer removed everywhere (static gradients stay, motion goes) ---- */
.best-card::after, .brand-mark::after, .command button::after { display: none; }
.shimmer-text {
  animation: none;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--muted-foreground);
}

/* ---- HX mark + logo hover life + filled sidebar bottom ---- */
.brand-mark svg { width: 20px; height: 20px; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.brand-mark svg path { fill: none; stroke: var(--primary-foreground); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.wordmark:hover .brand-mark { filter: brightness(1.28); animation: hubx-logo-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.wordmark:hover .brand-mark svg { transform: rotate(-5deg) scale(1.08); }
.wordmark:active .brand-mark { animation: hubx-wiggle .34s ease; }
@keyframes hubx-logo-pop {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.14) rotate(-5deg); }
  70% { transform: scale(1.04) rotate(2deg); }
  100% { transform: scale(1.06) rotate(0deg); }
}

.rail-nav { gap: 5px; }
.rail-nav a { padding: 11px 12px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 16px; }
.sidebar-bottom .rail-id { margin-top: 0; }
.rail-quick a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  color: var(--foreground); font-size: 13px; font-weight: 600; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.rail-quick a:hover { border-color: var(--ring); transform: translateY(-1px); }
.rail-quick a strong { font: 600 11px var(--mono); color: var(--muted-foreground); }
.rail-quick .rail-group { margin-bottom: 9px; }

@media (max-width: 920px) {
  .sidebar-bottom { margin-top: 0; display: contents; }
  .rail-quick { display: none; }
}

/* ---- HX mark: merge + swoop-in on load (no pop/wiggle anymore) ---- */
.wordmark:hover .brand-mark { animation: none; transform: none; filter: brightness(1.15); }
.wordmark:active .brand-mark { animation: none; }
.wordmark:hover .brand-mark svg { transform: none; }
.hx-h { animation: hubx-merge-l .5s cubic-bezier(.22, 1, .36, 1) both; }
.hx-x { animation: hubx-merge-r .5s .1s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes hubx-merge-l { from { transform: translateX(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hubx-merge-r { from { transform: translateX(5px); opacity: 0; } to { transform: none; opacity: 1; } }
.brand-mark svg path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: hubx-draw .55s ease-out forwards; }
.hx-x path { animation-delay: .18s; }
@keyframes hubx-draw { to { stroke-dashoffset: 0; } }
.wordmark:hover .hx-x path { animation: hubx-draw .45s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .brand-mark svg path { stroke-dashoffset: 0; animation: none; }
  .hx-h, .hx-x { animation: none; }
}

/* ---- Live agent demo button + log; identity card visible on mobile ---- */
.demo-run { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-btn { border: 0; border-radius: 9px; background: var(--primary); color: var(--primary-foreground); min-height: 38px; padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; }
.demo-btn:hover { opacity: .88; }
.demo-btn:disabled { opacity: .5; cursor: wait; }
.demo-hint { font-size: 11.5px; color: var(--muted-foreground); }
.demo-log { margin: 12px 0 0; padding: 12px 14px; background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--glass-border); border-radius: var(--radius); font: 11.5px/1.6 var(--mono); overflow: auto; max-height: 220px; white-space: pre-wrap; }
.desk-footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 920px) {
  .rail-id { display: block; width: 100%; }
  .agent-card { padding: 10px 12px; }
  .agent-id-link { display: inline-flex; gap: 6px; border-top: 0; padding: 4px 12px 4px 0; }
}

/* ---- One-line reasons in lists (full text on hover / in the detail panel) ---- */
.row-identity { display: block; min-width: 0; flex: 1 1 auto; }
.pool-list button > span:first-child { min-width: 0; }
.row-reason { display: block; margin-top: 2px; color: var(--muted-foreground); font-size: 11.5px; font-weight: 400; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-item-asset { display: block; }
.pool-list button[aria-pressed="true"] .row-reason { color: inherit; opacity: .75; }
@media (max-width: 820px) { .pool-list .row-reason { display: none; } }
.lane-list { grid-template-columns: minmax(0, 1fr); }
.lane-item { min-width: 0; }
.lane-item .verdict-badge { flex: none; }

/* ---- "Nothing qualifies" is a normal state: calm one-line note, not an error ---- */
.lane-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow: hidden;
  padding: 8px 12px; font-size: 13px; line-height: 1.3;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 60%, transparent); color: var(--muted-foreground);
}
.lane-banner[hidden] { display: none; }
.lane-note-lead { color: var(--foreground); font-weight: 550; white-space: nowrap; }
.lane-note-sep { white-space: nowrap; font-size: 12px; }
.lane-note-chip {
  flex: none; padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--foreground); font-family: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.5; cursor: pointer;
}
.lane-note-chip:hover { background: var(--accent); }

/* ---- Every route: tighter frame, groups fold open with a drop, cards tilt ---- */
#routes-rows { padding: 10px 10px 0; }
.route-group { padding: 0; margin-bottom: 10px; overflow: hidden; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.route-group[data-label="TOP_PICK"] { --grp: var(--top-fg); --grp-bg: var(--top-bg); }
.route-group[data-label="SUPPLY"] { --grp: var(--sup-fg); --grp-bg: var(--sup-bg); }
.route-group[data-label="WAIT"] { --grp: var(--wait-fg); --grp-bg: var(--wait-bg); }
.route-group[data-label="AVOID"] { --grp: var(--avoid-fg); --grp-bg: var(--avoid-bg); }
.route-group[data-open="false"] {
  background: linear-gradient(100deg, var(--grp-bg, transparent), color-mix(in srgb, var(--foreground) 3%, var(--card)) 70%);
  border-color: color-mix(in srgb, var(--grp, var(--border)) 28%, var(--border));
}
.route-group-head { margin: 0; padding: 12px 14px; cursor: pointer; user-select: none; border-radius: 13px; transition: background-color .15s; }
.route-group-head:hover { background: color-mix(in srgb, var(--grp, var(--foreground)) 7%, transparent); }
.route-group-head:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.route-group-head:active { transform: scale(.995); }
.route-peek { display: flex; gap: 5px; min-width: 0; overflow: hidden; transition: opacity .2s; }
.route-peek span {
  flex: none; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap;
  color: var(--grp, var(--foreground)); background: var(--card); border: 1px solid color-mix(in srgb, var(--grp, var(--border)) 30%, var(--border));
}
.route-group[data-open="true"] .route-peek { opacity: 0; pointer-events: none; }
.route-chevron { flex: none; font-size: 13px; color: var(--grp, var(--muted-foreground)); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.route-group[data-open="true"] .route-chevron { transform: rotate(180deg); }
.route-group[data-open="false"] .route-chevron { animation: hubx-route-nudge 2.4s ease-in-out infinite; }
@keyframes hubx-route-nudge { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(3px); } 90% { transform: translateY(-1px); } }

.route-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2,.8,.2,1); }
.route-group[data-open="true"] .route-fold { grid-template-rows: 1fr; }
.route-fold > .route-cards { min-height: 0; overflow: hidden; padding: 0 12px; }
.route-group[data-open="true"] .route-fold > .route-cards { padding: 2px 12px 12px; overflow: visible; }
.route-group[data-open="true"] .route-card { animation: hubx-route-drop .5s cubic-bezier(.25,1.4,.45,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes hubx-route-drop {
  0% { opacity: 0; transform: translateY(-16px) rotate(-1.5deg) scale(.96); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.route-card {
  --rx: 0deg; --ry: 0deg;
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: border-color .15s, transform .25s ease-out, box-shadow .15s;
  will-change: transform;
}
.route-card:hover, .route-card:focus-visible { transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-2px); }
.route-card:active { transform: perspective(700px) scale(.98); }

@media (max-width: 640px) {
  #routes-rows { padding: 8px 8px 0; }
  .route-group { padding: 0; margin-bottom: 8px; }
  .route-group-head { padding: 11px 12px; }
  .route-fold > .route-cards { padding: 0 8px; }
  .route-group[data-open="true"] .route-fold > .route-cards { padding: 2px 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .route-fold, .route-chevron { transition: none; }
  .route-group[data-open="false"] .route-chevron, .route-group[data-open="true"] .route-card { animation: none; }
  .route-card, .route-card:hover { transform: none; }
}
.route-group-count { white-space: nowrap; flex: none; }
.route-chevron {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px;
  font-size: 12px; line-height: 1; background: var(--card);
  border: 1px solid color-mix(in srgb, var(--grp, var(--border)) 40%, var(--border));
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.06);
}
.route-group-head:hover .route-chevron { background: var(--grp-bg, var(--accent)); }
.route-peek { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }

/* ---- Friendly "nothing to trade" block: soft colour, one emoji, gentle bob ---- */
.lane-banner {
  gap: 12px; padding: 10px 14px; border-radius: 14px; color: var(--foreground);
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--border));
  background: linear-gradient(110deg, color-mix(in srgb, #8b5cf6 10%, var(--card)), color-mix(in srgb, #3b82f6 8%, var(--card)) 60%, color-mix(in srgb, #10b981 7%, var(--card)));
}
.lane-note-face {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  font-size: 18px; line-height: 1; background: var(--card); border: 1px solid color-mix(in srgb, #8b5cf6 25%, var(--border));
  animation: hubx-calm-bob 3.2s ease-in-out infinite;
}
@keyframes hubx-calm-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-2px) rotate(-6deg); } }
.lane-note-words { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.lane-note-lead { font-size: 13.5px; }
.lane-note-sub { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-note-sep { color: var(--muted-foreground); }
@media (max-width: 640px) {
  .lane-banner { flex-wrap: wrap; }
  .lane-note-words { flex: 1 1 calc(100% - 50px); }
  .lane-note-sub { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .lane-note-face { animation: none; } }

/* ---- Plain "nothing qualifies" note (agent-facing site: no emoji, neutral tone) ---- */
.lane-banner {
  gap: 8px; padding: 8px 12px; border-radius: var(--radius); color: var(--muted-foreground);
  border: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 60%, transparent);
}
.lane-note-lead { font-size: 13px; color: var(--foreground); margin-right: 4px; }
