/* ============================================================
   Fusion Observatory — conversation-first hub (light)
   Layout: persistent left sidebar + center stage.
   Home stage = agent canvas (greeting, recipe cards, composer,
   adaptive thread). Content pages reuse the same shell.
   Edit tokens here once; every page inherits.
   ============================================================ */

:root {
  --fusion-gradient-start: #FFAC01;
  --fusion-gradient-end: #FF6228;
  --fusion-gradient: linear-gradient(135deg, #FFAC01, #FF6228);

  --app-bg: #FFFFFF;
  --side-bg: #FAFAFB;
  --surface: #FFFFFF;
  --surface-soft: #F6F7F9;
  --ink: #2C3036;
  --ink-2: #2F323A;
  --muted: #949CA8;
  --sub: #5b626d;
  --line: #ECEEF1;
  --line-strong: #DDE0E5;

  --red: #F56451;      --red-bg: #FFEFED;
  --blue: #51A0F5;     --blue-bg: #EDF6FF;
  --indigo: #777AFD;   --indigo-bg: #EBEBFF;
  --green: #37C785;    --green-bg: #EDFFF4;
  --yellow: #F9C554;   --yellow-bg: #FEF6E4;
  --pink: #F9978A;     --pink-bg: #FFEFED;

  --font-primary: 'Inter', system-ui, sans-serif;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(20,23,28,.04), 0 1px 3px rgba(20,23,28,.06);
  --shadow-md: 0 8px 30px rgba(20,23,28,.10);

  --side-w: 280px;
  --reading: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background: var(--app-bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.side {
  background: var(--side-bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
.side-head { padding: 18px 16px 6px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-star { width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--fusion-gradient); display: grid; place-items: center; transition: transform .2s ease; flex: none; }
.logo-star svg { width: 17px; height: 17px; fill: #fff; }
.logo:hover .logo-star { transform: scale(1.1); }
.logo-text { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; color: var(--ink); }
.logo-text small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }

.side-scroll { flex: 1; overflow-y: auto; padding: 8px 10px; }
.side-actions { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--sub); transition: background .14s, color .14s; cursor: pointer;
}
.side-link .ico { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.side-link .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.side-link:hover { background: #EFF0F3; color: var(--ink); }
.side-link.active { background: var(--yellow-bg); color: var(--ink); }
.side-link.active .ico svg { stroke: var(--fusion-gradient-end); }
.side-link.cta { color: var(--ink); font-weight: 600; }
.side-soon { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #9a6a00; background: var(--yellow-bg); border-radius: 999px; padding: 2px 7px; flex: none; }
.side-badge { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; flex: none; }
.side-badge.side-soon { color: #9a6a00; background: var(--yellow-bg); }
.side-badge.side-wip { color: #4f52c9; background: var(--indigo-bg); }
.side-sublink.has-badge { display: flex; align-items: center; }
.side-sublink.has-badge > span { overflow: hidden; text-overflow: ellipsis; }

.side-group { font-size: 11px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.recent a { display: block; padding: 8px 11px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent a:hover { background: #EFF0F3; color: var(--ink); }
.recent a .sub { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.side-user { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.side-user .ava { width: 32px; height: 32px; border-radius: 50%; background: var(--fusion-gradient); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.side-user .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.side-user .em { font-size: 11px; color: var(--muted); }

/* ---------- Stage (center) ---------- */
.stage { min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* topbar (content pages) */
.topbar {
  border-bottom: 1px solid var(--line); padding: 14px 28px; display: flex; align-items: center; gap: 12px;
  flex: none; background: var(--app-bg);
}
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar h1 { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.menu-toggle { display: none; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.menu-toggle svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; }

/* ============================================================
   AGENT CANVAS (home)
   ============================================================ */
.chat { flex: 1; overflow-y: auto; }
.chat-inner { max-width: var(--reading); margin: 0 auto; padding: 28px 24px 8px; }

/* empty state */
.chat-empty { min-height: calc(100vh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 0; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--fusion-gradient); display: grid; place-items: center; box-shadow: var(--shadow-md); }
.avatar-lg svg { width: 30px; height: 30px; fill: #fff; }
.chat-empty h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.4px; margin-top: 22px; }
.chat-empty .sub { font-size: 15px; color: var(--muted); margin-top: 8px; }

/* thread */
.thread { display: none; padding-top: 6px; }
.thread.show { display: block; }
.chat-empty.hide { display: none; }
.turn { display: flex; gap: 12px; margin-bottom: 24px; align-items: flex-start; }
.turn .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.turn .av.bot { background: var(--fusion-gradient); }
.turn .av.bot svg { width: 17px; height: 17px; fill: #fff; }
.turn .av.me { background: #E7E9ED; color: var(--ink); font-size: 11px; font-weight: 700; }
.turn .content { min-width: 0; flex: 1; }
.turn.me { flex-direction: row-reverse; }
.turn.me .content { display: flex; justify-content: flex-end; }
.bubble { font-size: 14.5px; line-height: 1.6; padding: 11px 15px; border-radius: 14px; display: inline-block; }
.turn.me .bubble { background: var(--fusion-gradient); color: #fff; border-bottom-right-radius: 4px; max-width: 85%; }
.turn.bot .bubble { background: transparent; padding: 4px 0; }
.turn.bot .bubble b { color: var(--ink); }

/* in-chat adaptive cards */
.incard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-top: 10px; box-shadow: var(--shadow-sm); }
.incard h4 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.incard .hint { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; font-family: inherit; font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; background: var(--surface); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--fusion-gradient-start); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pickchip { font-size: 12.5px; font-weight: 500; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 7px 13px; transition: background .14s, border-color .14s; }
.pickchip:hover, .pickchip.sel { background: var(--yellow-bg); border-color: var(--fusion-gradient-start); }
.incard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.incard-foot .note { font-size: 11.5px; color: var(--muted); }

/* result list inside chat */
.reslist { display: grid; gap: 8px; }
.reslist a, .reslist div.item { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.5px; }
.reslist a:hover { border-color: var(--fusion-gradient-start); background: var(--surface-soft); }
.reslist .meta { font-size: 12px; color: var(--muted); }
.mini-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.mini { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.mini .n { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.mini .l { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* composer */
.composer { flex: none; border-top: 1px solid var(--line); background: var(--app-bg); padding: 14px 24px 18px; }
.composer-inner { max-width: var(--reading); margin: 0 auto; }
.composer form { display: flex; align-items: flex-end; gap: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 8px 8px 8px 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s; }
.composer form:focus-within { border-color: var(--fusion-gradient-start); }
.composer .plus { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; flex: none; }
.composer .plus svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.composer textarea { flex: 1; resize: none; border: 0; outline: none; font-family: inherit; font-size: 15px; color: var(--ink); background: transparent; max-height: 160px; min-height: 26px; padding: 6px 0; line-height: 1.5; }
.composer .send { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 0; cursor: pointer; background: var(--fusion-gradient); display: grid; place-items: center; flex: none; }
.composer .send svg { width: 18px; height: 18px; fill: #fff; }
.composer .foot { text-align: center; font-size: 11px; color: var(--muted); margin-top: 9px; }

/* ============================================================
   CONTENT PAGES (reuse shell, scrollable main)
   ============================================================ */
.main-scroll { flex: 1; overflow-y: auto; padding: 26px 28px 60px; }
.main-scroll .inner { max-width: 980px; margin: 0 auto; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.gradient-text { background: var(--fusion-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-h { font-size: 16px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.block { margin-bottom: 30px; }
.lead { font-size: 14px; color: var(--muted); max-width: 72ch; }

.btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--fusion-gradient); color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }

.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; border-radius: var(--radius-xs); padding: 3px 9px; }
.tag-soon { color: #9a6a00; background: var(--yellow-bg); }
.tag-live { color: #1f8a5b; background: var(--green-bg); }
.tag-import { color: #6b5bd0; background: var(--indigo-bg); text-transform: none; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 16px; font-weight: 600; }
.panel-sub { font-size: 13.5px; color: var(--sub); line-height: 1.5; margin: -6px 0 18px; }

.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g-kpi { grid-template-columns: repeat(2,1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.kpi .k-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .num { font-size: 38px; font-weight: 700; letter-spacing: -1px; margin: 8px 0 6px; line-height: 1.05; }

.eco-core { border: 1px dashed var(--line-strong); border-radius: var(--radius-md); padding: 14px 16px; font-size: 13px; color: var(--muted); margin-bottom: 12px; text-align: center; }
.eco-core b { color: var(--ink); }
.eco-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 760px) { .eco-row { grid-template-columns: repeat(2,1fr); } }
.sys { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; background: var(--surface-soft); }
.sys h4 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.sys .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.sys .fw { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sys .pct { font-size: 12px; color: var(--sub); }

.linklist { display: grid; gap: 10px; }
.linklist a { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.linklist a:hover { border-color: var(--fusion-gradient-start); background: var(--surface-soft); }
.linklist a .meta { color: var(--muted); font-size: 12px; }

.placeholder { border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 20px; background: var(--surface); margin-bottom: 14px; }
.placeholder h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.placeholder p { font-size: 14px; color: var(--muted); }
.placeholder ul { margin: 10px 0 0 18px; color: var(--sub); font-size: 13px; }
.placeholder li { margin-bottom: 5px; }

/* ---------- Auth: sidebar user + role badge ---------- */
.side-user .ava { overflow: hidden; }
.side-user img.ava { object-fit: cover; }
.side-user .em { font-size: 11px; color: var(--muted); }
.role-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; margin-top: 3px; }
.role-admin { color: #9a6a00; background: var(--yellow-bg); }
.role-contrib { color: #1f8a5b; background: var(--green-bg); }
.role-member { color: #4f6da8; background: var(--blue-bg); }
.signout { margin-left: auto; flex: none; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); border-radius: var(--radius-xs); cursor: pointer; display: grid; place-items: center; }
.signout:hover { background: #EFF0F3; color: var(--ink); }

/* read-only repo status (home) */

/* ---------- Sign-in gate ---------- */
.authgate { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.86); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 24px; }
.authgate.hidden { display: none; }
.authcard { text-align: center; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 40px 32px; box-shadow: var(--shadow-md); }
.authcard h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.3px; margin-top: 20px; }
.authcard .sub { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.btn-gh { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: #fff; background: #1f2328; border: 0; border-radius: var(--radius-sm); padding: 12px 20px; transition: transform .15s, background .15s; }
.btn-gh:hover { transform: translateY(-1px); background: #000; }
.gate-note { font-size: 11.5px; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.btn-notnow { display: block; margin: 10px auto 0; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: var(--radius-sm); padding: 8px 14px; }
.btn-notnow:hover { color: var(--ink); background: #EFF0F3; }
.btn-notnow[hidden] { display: none; }
.authgate .btn-gh:focus-visible, .btn-notnow:focus-visible, .btn-inline-gh:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Inline "this needs a sign-in" card — in the chat, the feedback overlay. */
.needs-signin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); background: #F6F7F9; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.needs-signin .btn-inline-gh { flex: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: #fff; background: #1f2328; border: 0; border-radius: var(--radius-xs); padding: 7px 12px; }
.needs-signin .btn-inline-gh:hover { background: #000; }

/* ---------- Responsive sidebar ---------- */
.scrim { display: none; position: fixed; inset: 0; background: rgba(20,23,28,.3); z-index: 55; }
.scrim.show { display: block; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 280px; z-index: 70; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 8px 0 30px rgba(20,23,28,.12); }
  .side.open { transform: translateX(0); }
  .menu-toggle { display: inline-grid; }
  .chat-inner, .main-scroll { padding-left: 16px; padding-right: 16px; }
  .composer { padding-left: 14px; padding-right: 14px; }
}

/* ============================================================
   v0.4 additions — metrics dashboard, token builder, registry,
   embeds, roadmap footnote
   ============================================================ */

/* ---------- Roadmap footnote (compact) ---------- */
.footnote { margin-top: 30px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.footnote .fn-label { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.footnote ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.footnote li { font-size: 12.5px; color: var(--muted); }
.footnote li strong { color: var(--ink); font-weight: 600; }
.footnote li:not(:last-child)::after { content: "·"; margin-left: 10px; color: var(--line-strong); }

/* ---------- Snapshot pills ---------- */
.snap { display: flex; gap: 8px; align-items: center; }
.snap .pill { font-size: 12px; font-weight: 600; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }

/* ---------- Migration bars ---------- */
.mrow { display: grid; grid-template-columns: 210px 1fr 70px; align-items: center; gap: 14px; margin-bottom: 10px; }
.mrow .ml { font-size: 13px; font-weight: 500; }
.mtrack { height: 26px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mfill { height: 100%; border-radius: 7px; display: flex; align-items: center; padding-left: 12px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mrow .mv { font-size: 13px; font-weight: 600; text-align: right; color: var(--sub); }
@media (max-width: 700px) { .mrow { grid-template-columns: 130px 1fr 54px; } }

/* ---------- Checklist ---------- */
.checklist { margin-top: 4px; }
.ci { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ci:first-child { border-top: 0; }
.ci .cbox { width: 20px; height: 20px; border-radius: 6px; background: var(--green); display: grid; place-items: center; flex: none; }
.ci .cbox.pending { background: var(--surface-soft); border: 1px solid var(--line-strong); }
.ci .cbox svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 3; }
.ci .cname { font-weight: 500; }
.ci .cdone { margin-left: auto; font-size: 11px; font-weight: 700; color: #4f6da8; background: var(--blue-bg); border-radius: 999px; padding: 3px 10px; }
.ci .cfw { font-size: 12px; color: var(--muted); width: 96px; text-align: right; }

/* ---------- Donut ---------- */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex: none; }
.donut::before { content: ""; position: absolute; inset: 26px; background: var(--surface); border-radius: 50%; }
.donut .dc { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .dc .n { font-size: 30px; font-weight: 700; line-height: 1; }
.donut .dc .l { font-size: 11px; color: var(--muted); }
.legend { display: grid; gap: 8px; }
.legend .lg { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .lp { color: var(--muted); margin-left: auto; padding-left: 18px; }

/* ---------- Distribution rows ---------- */
.dist .drow { margin-bottom: 14px; }
.dist .dtop { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.dist .dtrack { height: 12px; background: var(--surface-soft); border-radius: 6px; overflow: hidden; }
.dist .dfill { height: 100%; border-radius: 6px; }
.dist .dmeta { font-size: 12px; color: var(--muted); }

/* ---------- Framework detail cards ---------- */
.fw-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.fw-cards.libs { grid-template-columns: repeat(3,1fr); }
@media (max-width: 1100px) { .fw-cards.libs { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 900px) { .fw-cards, .fw-cards.libs { grid-template-columns: 1fr; } }
.fw-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--surface); box-shadow: var(--shadow-sm); border-top: 3px solid var(--line); }
.fw-card h3 { font-size: 15px; font-weight: 600; }
.fw-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.fw-card .min-tag { font-size: 10.5px; font-weight: 600; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.fw-card .stats { display: flex; gap: 20px; }
.fw-card .stat .n { font-size: 22px; font-weight: 700; }
.fw-card .stat .l { font-size: 11px; color: var(--muted); }

/* Figma library cards — branded SVG cover tile + subtle meta footer */
.fw-card.lib { padding: 0; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.fw-card.lib:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lib-cover { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.lib-cover-svg { width: 100%; height: auto; display: block; }
.lib-foot { font-size: 11.5px; color: var(--muted); padding: 11px 15px; }

/* Contribution model cards — branded cover + body with contract button */
.lib-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lib-body h3 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.lib-body .lead { flex: 1; margin: 0; }
.lib-body .btn { align-self: flex-start; margin-top: 4px; }

/* Contract pop-up sections */
.cp-sec { margin-top: 18px; }
.cp-sec:first-child { margin-top: 4px; }
.cp-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.cp-list li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--sub); line-height: 1.5; }
.cp-list li::before { content: "→"; position: absolute; left: 0; color: var(--fusion-gradient-end); }

/* Product libraries — plain mentions, no analytics */
.lib-products { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.lib-products-title { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.lib-prod-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.lib-prod-item { font-size: 13px; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }

/* ---------- Package usage stepper (metrics) ----------
   Row = labeled track: a dot per step with its short name beneath,
   gradient-filled up to the active step. Hover a dot for the step
   description; click the row for the vertical name+description list. */
.pu-head, .pu-row { display: grid; grid-template-columns: 90px 1fr 340px; gap: 16px; align-items: center; }
.pu-head { font-size: 11px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; }
.pu-row { padding: 13px 0 9px; border-top: 1px solid var(--line); }
.pu-team { font-weight: 600; font-size: 14px; }
.pu-products { font-size: 13px; color: var(--sub); }
.pu-strack { display: grid; }
.pu-bstep { position: relative; text-align: center; }
.pu-bstep::before, .pu-bstep::after { content: ""; position: absolute; top: 6px; height: 2px; }
.pu-bstep::before { left: 0; right: 0; background: var(--line); }
.pu-bstep:first-child::before { left: 50%; }
.pu-bstep:last-child::before { right: 50%; }
.pu-bstep.done::after { left: 0; right: 0; background: var(--fusion-gradient); }
.pu-bstep.done:first-child::after { left: 50%; }
.pu-bstep.done:last-child::after { right: 50%; }
.pu-bstep.next::after { left: 0; right: 50%; background: var(--fusion-gradient); }
.pu-bstep.next:first-child::after { left: 50%; }
.pu-bdot { position: relative; display: block; width: 14px; height: 14px; border-radius: 50%; margin: 0 auto; background: var(--surface); border: 2px solid var(--line-strong); z-index: 1; }
.pu-bstep.done .pu-bdot { background: var(--fusion-gradient); border-color: transparent; }
.pu-bstep.next .pu-bdot { border-color: var(--fusion-gradient-end); animation: pu-pulse 2s ease-out infinite; }
@keyframes pu-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,98,40,.35); } 70% { box-shadow: 0 0 0 6px rgba(255,98,40,0); } 100% { box-shadow: 0 0 0 0 rgba(255,98,40,0); } }
.pu-bdot::after { content: attr(data-tip); position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 190px; white-space: normal; line-height: 1.4; background: var(--ink); color: #fff; font-size: 11px; font-weight: 400; padding: 6px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 6; }
.pu-bdot:hover::after { opacity: 1; }
.pu-bname { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.pu-bstep.done .pu-bname { color: var(--sub); }
.pu-bstep.next .pu-bname { color: var(--ink); font-weight: 600; }
.pu-note { margin-top: 18px; }
.pu-note a { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--sub); }
.pu-note a:hover { color: var(--fusion-gradient-end); }
.pu-note .ico { width: 17px; height: 17px; flex: none; display: grid; place-items: center; }
.pu-note .ico svg { width: 17px; height: 17px; stroke: var(--fusion-gradient-end); fill: none; stroke-width: 1.7; }
@media (max-width: 980px) {
  .pu-head { display: none; }
  .pu-row { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Getting started (npm packages) ---------- */
.gs-pre { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.7; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; white-space: pre; color: var(--ink-2); }
.gs-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gs-links .btn { font-size: 13px; }

/* ---------- Install steps (numbered, "Fusion in code") ---------- */
.inst-steps { display: grid; gap: 20px; counter-reset: inst; }
/* minmax(0,1fr) + min-width:0 are load-bearing: a grid item defaults to
   min-width:auto, so the long registry URL inside a white-space:pre block
   would stretch the column past the viewport instead of scrolling in place. */
.inst-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; }
.inst-step > * { min-width: 0; }
.inst-step .n { counter-increment: inst; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-soft); border: 1px solid var(--line-strong); color: var(--ink); font: 700 13px/1 var(--font-primary); }
.inst-step .n::before { content: counter(inst); }
.inst-step .st { font-size: 14px; font-weight: 600; color: var(--ink); margin: 5px 0 4px; }
.inst-step .sd { font-size: 13px; color: var(--sub); line-height: 1.55; margin-bottom: 10px; }
.inst-step .sd:last-child { margin-bottom: 0; }
@media (max-width: 620px) { .inst-step { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ---------- Token schema builder ---------- */
.tierbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tierbar label { font-size: 13px; font-weight: 600; color: var(--sub); }
.tier-select { font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 14px; background: var(--surface); cursor: pointer; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.builder .schema-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.seg { border-radius: 8px; padding: 6px 12px; font-weight: 600; }
.seg.tier { background: #EEE9FF; color: #6b4bd8; }
.seg.cat  { background: var(--blue-bg); color: #3b7fd0; }
.seg.prop { background: var(--green-bg); color: #1f8a5b; }
.seg.val  { background: var(--yellow-bg); color: #a5730a; }
.seg-dot { color: var(--muted); font-weight: 700; }
.example-bar { background: #0d0e11; color: #e9eaec; border-radius: var(--radius-md); padding: 14px 18px; font-size: 15px; margin-top: 16px; display: flex; align-items: center; gap: 14px; overflow-x: auto; }
.example-bar .lbl { font-size: 11px; letter-spacing: 1px; color: #8a8f98; font-weight: 700; border-right: 1px solid #2c2f36; padding-right: 14px; flex: none; }
.example-bar .accent { color: #f2a65a; }
.more { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.more .lbl { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.more code { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; font-size: 12.5px; margin: 8px 6px 0 0; display: inline-block; color: var(--ink); }
.more code .arrow { color: var(--muted); }
.rule-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.rule-note b { color: var(--sub); }

/* ---------- Live tokens preview ---------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px,1fr)); gap: 12px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.swatch .chip { height: 52px; }
.swatch .sm { padding: 8px 10px; }
.swatch .nm { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--ink); word-break: break-all; }
.swatch .hex { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.dim-row { display: flex; align-items: center; gap: 12px; font-size: 12px; margin-bottom: 8px; }
.dim-row .dn { font-family: "JetBrains Mono", ui-monospace, monospace; width: 190px; color: var(--sub); }
.dim-row .db { height: 14px; background: var(--indigo); border-radius: 4px; }
.dim-row .dv { color: var(--muted); }
.tokens-src { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Component registry ---------- */
.reg-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.reg-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); padding: 10px 14px; max-width: 420px; transition: border-color .15s; }
.reg-search:focus-within { border-color: var(--fusion-gradient-start); }
.reg-search svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }
.reg-search input { flex: 1; border: 0; outline: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); }
.reg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.reg-chips .pickchip .cnt { color: var(--muted); font-weight: 600; margin-left: 2px; }
.reg-empty { font-size: 14px; color: var(--muted); padding: 30px 0; text-align: center; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; }
.reg-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .15s, border-color .15s; cursor: pointer; }
.reg-card:hover { transform: translateY(-3px); border-color: var(--fusion-gradient-start); }
.reg-preview { padding: 26px; display: grid; place-items: center; gap: 10px; background: var(--surface-soft); border-bottom: 1px solid var(--line); min-height: 116px; }
.reg-meta { padding: 13px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reg-meta h3 { font-size: 13.5px; font-weight: 600; }
.reg-meta .rb { font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #1f8a5b; background: var(--green-bg); border-radius: 999px; padding: 2px 8px; flex: none; }
.reg-meta .rb.soon { color: #9a6a00; background: var(--yellow-bg); }
.reg-desc { padding: 5px 16px 0; font-size: 12px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reg-facts { padding: 10px 16px 13px; margin-top: auto; display: flex; flex-wrap: wrap; gap: 5px; }
.reg-facts .rf { font-size: 10.5px; font-weight: 600; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.reg-facts .rf.go { color: #a5600a; background: var(--yellow-bg); border-color: #f2ddb1; }
.reg-facts .rf.go:hover { border-color: var(--fusion-gradient-start); }
.reg-facts .rf.link:hover { border-color: var(--fusion-gradient-start); color: var(--ink); }
.reg-facts .rf.off { color: var(--muted); border-style: dashed; cursor: default; }

/* Real gallery screenshots on cards; hand-drawn mini is the fallback */
.reg-preview { position: relative; padding: 0; min-height: 116px; }
.reg-thumb { width: 100%; height: 132px; object-fit: cover; object-position: left top; display: block; background: #F9FAFB; }
.reg-mini { display: none; }
.reg-preview.noimg { padding: 26px; }
.reg-preview.noimg .reg-thumb { display: none; }
.reg-preview.noimg .reg-mini { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
/* Stylized mockup preview (Components page) — the mini is the primary visual */
.reg-preview.mock { padding: 26px; }
.reg-preview.mock .reg-mini { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Templates page ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; margin-bottom: 28px; }
.tpl-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .15s, border-color .15s; padding-bottom: 13px; }
.tpl-card:hover { transform: translateY(-3px); border-color: var(--fusion-gradient-start); }
.tpl-shot { border-bottom: 1px solid var(--line); background: #F9FAFB; aspect-ratio: 16 / 10; overflow: hidden; }
.tpl-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.tpl-mock { width: 100%; height: 100%; display: block; }
/* demo previews — styled with the REAL Fusion light-mode token values
   (pulled from the gallery build; see tools/registry-snapshot).
   Fusion light: primary #514DEC · link #5757F5 · text #181A1F/#686F7D ·
   borders #BBC2CC/#CED4DB · radius 8px · Noto Sans. */
.reg-preview { font-family: "Noto Sans", system-ui, sans-serif; }
.d-btn { font: 500 13px/1 inherit; font-family: inherit; border-radius: 8px; padding: 10px 16px; border: 1px solid transparent; cursor: default; }
.d-btn.pri { background: #514DEC; color: #fff; }
.d-btn.sec { background: #fff; color: #181A1F; border-color: #CED4DB; }
.d-btn.dan { background: #CE230C; color: #fff; }
.d-btn.acc { background: #fff; color: #181A1F; border-color: #4A42D5; }
.d-badge { font: 600 10.5px/1 inherit; font-family: inherit; border-radius: 4px; padding: 4px 8px; border: 1px solid transparent; }
.d-badge.n, .d-badge.nt { background: rgba(94,100,113,.1); color: #32363E; border-color: #A8B0BC; }
.d-badge.o, .d-badge.ok { background: rgba(90,225,159,.1); color: #015B35; border-color: #5AE19F; }
.d-tag { font: 500 11.5px/1 inherit; font-family: inherit; background: #E3E7EB; color: #181A1F; border: 1px solid #BBC2CC; border-radius: 4px; padding: 5px 9px; }
.d-input { font: 400 12.5px/1 inherit; font-family: inherit; border: 1px solid #BBC2CC; border-radius: 8px; padding: 10px 12px; color: #686F7D; background: #fff; width: 150px; }
.d-switch { width: 38px; height: 22px; border-radius: 999px; background: #514DEC; position: relative; }
.d-switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 19px; box-shadow: 0 0 1px rgba(0,0,0,.75), 0 2px 1px rgba(0,0,0,.2); }
.d-check { width: 18px; height: 18px; border-radius: 4px; background: #514DEC; display: grid; place-items: center; }
.d-check svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 3; }
.d-ava { width: 34px; height: 34px; border-radius: 50%; background: #3491F4; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.d-card-mini { border: 1px solid #CED4DB; border-radius: 8px; padding: 12px; width: 170px; background: #fff; }
.d-card-mini .t { font-size: 12.5px; font-weight: 600; color: #181A1F; }
.d-card-mini .s { font-size: 11px; color: #686F7D; margin-top: 3px; }
.d-card-mini .img { height: 44px; border-radius: 4px; background: #EEF1F3; border: 1px solid #E3E7EB; margin-bottom: 8px; }
.d-card-mini.hover { box-shadow: var(--shadow-sm); border-color: #868E9C; }
.d-card-mini.sel { border: 2px solid #4A42D5; background: rgba(101,102,250,.08); }
.d-card-mini.dash { border-style: dashed; }
.d-btn .d-spin.lite { width: 11px; height: 11px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: #fff; margin-right: 7px; vertical-align: -1px; }
.d-group { display: inline-flex; border: 1px solid #BBC2CC; border-radius: 8px; overflow: hidden; background: #fff; }
.d-group span { font: 500 12px/1 inherit; font-family: inherit; padding: 8px 12px; color: #181A1F; border-left: 1px solid #CED4DB; cursor: default; }
.d-group span:first-child { border-left: 0; }
.d-group span.on { background: #E3E7EB; font-weight: 600; }
.d-link { font: 500 13px/1 inherit; font-family: inherit; color: #5757F5; }
.d-code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; background: #F9FAFB; color: #181A1F; border: 1px solid #CED4DB; border-radius: 8px; padding: 9px 12px; white-space: nowrap; }
.d-radio { width: 18px; height: 18px; border-radius: 50%; border: 5px solid #514DEC; background: #fff; display: inline-block; }
.d-radio.off { border-width: 1.5px; border-color: #868E9C; margin-left: 8px; }
.d-slider { width: 140px; height: 4px; border-radius: 999px; background: #E3E7EB; position: relative; display: inline-block; }
.d-slider i { position: absolute; left: 0; top: 0; height: 100%; width: 55%; border-radius: 999px; background: #514DEC; }
.d-slider b { position: absolute; left: 55%; top: 50%; transform: translate(-50%,-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #514DEC; }
.d-input.tall { height: 56px; align-items: flex-start; display: inline-flex; padding-top: 9px; }
.d-avas { display: inline-flex; }
.d-avas .d-ava { border: 2px solid var(--surface-soft); }
.d-avas .d-ava + .d-ava { margin-left: -10px; }
.d-ava.alt { background: #8470FC; }
.d-ava.plus { background: #EEF1F3; color: #4C525D; border: 1.5px solid #CED4DB !important; font-size: 11px; }
.d-ava.big { width: 44px; height: 44px; font-size: 15px; border-radius: 12px; background: var(--fusion-gradient); }
.d-counter { font: 600 10.5px/1 inherit; font-family: inherit; min-width: 20px; text-align: center; background: #A8B0BC; color: #181A1F; border-radius: 999px; padding: 4px 7px; display: inline-block; }
.d-rows { display: grid; gap: 5px; width: 160px; }
.d-rows span { display: flex; justify-content: space-between; font: 500 11.5px/1 inherit; font-family: inherit; color: #181A1F; border: 1px solid #BBC2CC; border-radius: 8px; padding: 9px 10px; background: #fff; }
.d-rows span b { color: #4C525D; font-weight: 700; }
.d-divider { width: 150px; height: 1px; background: #CED4DB; display: inline-block; }
.d-alert { font: 500 11.5px/1.3 inherit; font-family: inherit; border: 1px solid #9ACAFD; border-radius: 8px; padding: 9px 12px; background: #EDF6FF; color: #181A1F; max-width: 180px; }
.d-alert.warn { background: #FFF7E6; border-color: #F9BA34; }
.d-alert.ok { background: #EDFFF4; border-color: #5AE19F; }
.d-alert.new { background: rgba(101,102,250,.14); border-color: #A2A5FE; color: #392F9C; }
.d-tip { font: 500 11px/1 inherit; font-family: inherit; background: #000; color: #F9FAFB; border-radius: 8px; padding: 6px 10px; position: relative; }
.d-tip::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #000; }
.d-progress { width: 150px; height: 8px; border-radius: 999px; background: #E3E7EB; overflow: hidden; display: inline-block; }
.d-progress i { display: block; height: 100%; width: 62%; border-radius: 999px; background: #514DEC; }
.d-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(94,100,113,.3); border-top-color: #686F7D; display: inline-block; animation: dspin 1s linear infinite; }
@keyframes dspin { to { transform: rotate(360deg); } }
.d-skel { display: grid; gap: 7px; width: 150px; }
.d-skel i { display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #E3E7EB 25%, #F3F5F7 50%, #E3E7EB 75%); background-size: 200% 100%; animation: dskel 1.4s ease infinite; }
@keyframes dskel { to { background-position: -200% 0; } }
.d-crumb { font: 500 12px/1 inherit; font-family: inherit; color: #181A1F; }
.d-crumb b { color: #868E9C; margin: 0 2px; font-weight: 500; }
.d-crumb .cur { color: #868E9C; }
.d-tabs { display: inline-flex; gap: 2px; border-bottom: 1.5px solid #CED4DB; padding-bottom: 0; }
.d-tabs span { font: 500 11.5px/1 inherit; font-family: inherit; color: #181A1F; padding: 7px 10px 9px; cursor: default; }
.d-tabs span.on { color: #5757F5; font-weight: 600; box-shadow: inset 0 -2px 0 #5757F5; }
.d-table { display: grid; gap: 4px; width: 160px; }
.d-table i { display: grid; place-items: center start; height: 16px; border-radius: 4px; background: #fff; border: 1px solid #E3E7EB; font: 600 9px/1 inherit; font-family: inherit; color: #686F7D; padding-left: 6px; }
.d-table i.h { background: #F9FAFB; border-color: #CED4DB; }
.d-icons { font-size: 17px; letter-spacing: 6px; color: #4C525D; }

/* ---------- Embed (icon catalogue) ---------- */
.embed-note { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.embed { width: 100%; height: calc(100vh - 190px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }

/* Full-bleed embed — the iframe takes the entire stage below the topbar */
.main-scroll.embed-fill { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.main-scroll.embed-fill .inner { max-width: none; margin: 0; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.main-scroll.embed-fill .embed { flex: 1; height: auto; min-height: 0; border: 0; border-radius: 0; }

/* ============================================================
   v0.5 — Foundations: token sandbox + token creator
   ============================================================ */

/* ---------- Sandbox toolbar ---------- */
.sb-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sb-modes { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.sb-modes button { font: 600 12.5px/1 var(--font-primary); border: 0; background: transparent; color: var(--sub); padding: 8px 14px; cursor: pointer; }
.sb-modes button.sel { background: var(--yellow-bg); color: var(--ink); }
.sb-search { flex: 1; min-width: 180px; max-width: 320px; padding: 8px 12px; }
.sb-count { font-size: 12px; color: var(--muted); margin-left: auto; }

/* ---------- Stage ---------- */
.sb-stage {
  --sb-surface: #FFFFFF; --sb-text: #2C3036; --sb-border: #DFE1E7; --sb-action: #4c53d8;
  --sb-accent: #777AFD; --sb-radius: 12px; --sb-pad: 24px; --sb-bw: 1px; --sb-icon: 24px;
  --sb-icon-color: #656E7D; --sb-shadow: 0 8px 30px rgba(20,23,28,.10);
  display: grid; grid-template-columns: 1fr; gap: 12px;
  background:
    linear-gradient(rgba(20,23,28,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,23,28,.028) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 26px; transition: background-color .25s;
}
.sb-stage.dark { background-color: #101216; border-color: #23262d; }
.sb-card {
  justify-self: center; width: min(420px, 100%);
  background: var(--sb-surface); color: var(--sb-text);
  border: var(--sb-bw) solid var(--sb-border); border-radius: var(--sb-radius);
  box-shadow: var(--sb-shadow); padding: var(--sb-pad);
  transition: all .25s ease;
}
.sb-card-top { display: flex; gap: 12px; align-items: center; }
.sb-ico { flex: none; display: grid; place-items: center; }
.sb-ico svg { width: var(--sb-icon); height: var(--sb-icon); fill: var(--sb-icon-color); transition: all .25s; }
.sb-t1 { font-size: 15px; font-weight: 600; color: var(--sb-text); }
.sb-t2 { font-size: 12.5px; opacity: .62; margin-top: 2px; }
.sb-card-actions { display: flex; align-items: center; gap: 10px; margin-top: calc(var(--sb-pad) * .75); }
.sb-btn { font: 600 13px/1 var(--font-primary); color: #fff; background: var(--sb-action); border-radius: calc(var(--sb-radius) * .66); padding: 9px 15px; transition: all .25s; }
.sb-badge { font: 700 10.5px/1 var(--font-primary); color: var(--sb-accent); border: 1px solid var(--sb-accent); border-radius: 999px; padding: 4px 9px; transition: all .25s; }
.sb-applied { justify-self: center; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.sb-applied .lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .8px; color: var(--muted); font-family: var(--font-primary); }
.sb-stage.dark .sb-applied .lbl, .sb-stage.dark .sb-hint { color: #7d838d; }
.sb-applied code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; font-size: 10.5px; color: var(--sub); }
.sb-stage.dark .sb-applied code { background: #191c22; border-color: #2a2e36; color: #aab0ba; }
.sb-reset { font: 600 10.5px/1 var(--font-primary); color: var(--sub); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.sb-hint { font-size: 12px; color: var(--muted); font-family: var(--font-primary); }

/* ---------- Chain bar ---------- */
.sb-chainbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; background: #0d0e11; color: #e9eaec; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 12px; margin-top: 14px; min-height: 42px; }
.sb-chainbar code { color: #f2a65a; }
.sb-chainbar .arrow { color: #8a8f98; }
.sb-chainbar b { color: #e9eaec; font-weight: 600; }
.sb-chainbar .sb-copy { margin-left: auto; border: 0; background: #1c1f26; color: #aab0ba; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; }

/* ---------- Token grid ---------- */
.sb-group { margin-top: 18px; }
.sb-gname { font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 8px; }
.sb-gname .cnt { color: var(--muted); font-weight: 500; font-family: var(--font-primary); }
.sb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-token {
  display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 108px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 0; overflow: hidden; cursor: pointer; text-align: left;
  transition: transform .12s, border-color .12s;
}
.sb-token:hover { transform: translateY(-2px); border-color: var(--fusion-gradient-start); }
.sb-token.hit { border-color: var(--fusion-gradient-end); box-shadow: 0 0 0 2px var(--yellow-bg); }
.sb-token.wide { width: 168px; }
.sb-chip { height: 40px; display: grid; place-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.sb-shadowchip span { width: 30px; height: 20px; border-radius: 5px; background: #fff; display: block; }
.sb-typechip span { color: var(--ink); line-height: 1; }
.sb-radchip span { width: 30px; height: 24px; border: 2px solid var(--indigo); background: var(--indigo-bg); display: block; }
.sb-opchip { background: repeating-conic-gradient(#e7e9ed 0 25%, #fff 0 50%) 0 0/12px 12px; }
.sb-opchip span { width: 100%; height: 100%; background: var(--ink-2); display: block; }
.sb-barchip { justify-items: start; padding: 0 10px; }
.sb-barchip span { height: 12px; border-radius: 4px; background: var(--indigo); display: block; }
.sb-motionchip { overflow: hidden; }
.sb-motionchip .dotr { width: 12px; height: 12px; border-radius: 50%; background: var(--fusion-gradient); animation: sbrun 1s infinite alternate ease-in-out; }
@keyframes sbrun { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
.sb-valchip span { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--sub); padding: 0 6px; }
.sb-nm { font-family: "JetBrains Mono", monospace; font-size: 9.5px; color: var(--ink); padding: 6px 8px 1px; word-break: break-all; }
.sb-val { font-size: 9.5px; color: var(--muted); padding: 0 8px 7px; font-family: "JetBrains Mono", monospace; }
.sb-token.can-apply .sb-nm::after { content: "·"; color: var(--fusion-gradient-end); margin-left: 3px; font-weight: 700; }

/* ---------- Token creator ---------- */
.tc-tiers { display: flex; gap: 8px; }
.tc-tiernote { margin: 10px 0 14px; }
.tc-segs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-segs .seg { display: inline-flex; align-items: center; padding: 5px 8px; }
.tc-in { font: 600 13.5px/1 "JetBrains Mono", monospace; border: 0; background: transparent; color: inherit; outline: none; }
input.tc-in { border-bottom: 1.5px dashed currentColor; padding-bottom: 2px; min-width: 40px; }
input.tc-in::placeholder { color: inherit; opacity: .45; font-weight: 500; }
select.tc-in { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 14px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="6"><path d="M0 0l4 6 4-6z" fill="%23949CA8"/></svg>') right center no-repeat; }
.tc-name { display: flex; align-items: center; gap: 12px; background: #0d0e11; color: #e9eaec; border-radius: var(--radius-sm); padding: 13px 16px; font-size: 15px; margin-top: 16px; overflow-x: auto; }
.tc-name .lbl { font-size: 10px; letter-spacing: 1px; color: #8a8f98; font-weight: 700; border-right: 1px solid #2c2f36; padding-right: 12px; flex: none; }
.tc-name-out { color: #f2a65a; white-space: nowrap; }
.tc-copy { margin-left: auto; flex: none; border: 0; background: #1c1f26; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; display: grid; place-items: center; }
.tc-copy svg { width: 13px; height: 13px; stroke: #aab0ba; fill: none; stroke-width: 2; }
.tc-copy.did { background: var(--green); }
.tc-copy.did svg { stroke: #fff; }
.tc-ref { margin-top: 14px; max-width: 420px; }
.tc-ref label span { color: var(--muted); font-weight: 500; }
.tc-verdict { margin-top: 6px; }
.tc-banner { font-size: 13px; border-radius: 10px; padding: 10px 13px; margin-bottom: 8px; }
.tc-banner.ok { background: var(--green-bg); color: #17714b; }
.tc-banner.bad { background: var(--red-bg); color: #b3402f; }
.tc-banner b { font-family: "JetBrains Mono", monospace; font-size: 12.5px; }
.tc-row { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--sub); padding: 6px 2px; border-top: 1px dashed var(--line); }
.tc-row:first-child { border-top: 0; }
.tc-row .tc-rule { flex: none; font: 700 10px/1.6 "JetBrains Mono", monospace; letter-spacing: .4px; border-radius: 5px; padding: 2px 7px; }
.tc-row.bad .tc-rule { background: var(--red-bg); color: #b3402f; }
.tc-row.warn .tc-rule { background: var(--yellow-bg); color: #9a6a00; }
.tc-row.ok .tc-rule { background: var(--green-bg); color: #17714b; }
.tc-row.note .tc-rule { background: var(--surface-soft); color: var(--muted); }
.tc-row b { color: var(--ink); }
.tc-row .mono { font-size: 11.5px; }
.tc-foot { margin-top: 14px; }
.tc-actions { display: flex; gap: 8px; }
.tc-json:disabled { opacity: .45; cursor: default; transform: none; }
.tc-compact .tc-name { font-size: 13px; padding: 10px 12px; }
.tc-compact .tc-tiernote { display: none; }

/* ---------- Icon previews in chat results ---------- */
.ic-prev { width: 22px; height: 22px; flex: none; object-fit: contain; }
.ic-prev-none { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); font-size: 13px; }

/* ---------- Icon detail strip (chat) ---------- */
.ic-row { cursor: pointer; transition: border-color .12s, background .12s; }
.ic-row:hover, .ic-row.sel { border-color: var(--fusion-gradient-start); background: var(--surface-soft); }
.ic-row .ic-caret { font-size: 10px; color: var(--muted); }
.ic-detail { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 13px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-soft); }
.ic-detail .btn { font-size: 12.5px; padding: 7px 12px; }
.ic-detail .btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Icon product tags (chat rows) ---------- */
.ic-tag { font-size: 10.5px; font-weight: 600; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ic-tag.warn { color: #9a6a00; background: var(--yellow-bg); border-color: #ecd9a0; }

/* ---------- Token suggestion cards (chat) ---------- */
.tkc .tkc-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tkc-spec { display: inline-flex; flex: none; border-radius: 9px; overflow: hidden; border: 0.5px solid var(--line-strong); }
.tkc-spec i { flex: 1; }
.tkc-spec-val { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--sub); background: var(--surface-soft); padding: 8px 10px; border-radius: 8px; }
.tkc-main { flex: 1; min-width: 220px; }
.tkc-line { font-size: 13.5px; }
.tkc-name { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 12.5px; }
.tkc-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tkc-actions { display: flex; gap: 8px; flex: none; }
.tkc-actions .btn { font-size: 12.5px; padding: 8px 13px; }
.tkc-more { display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 12px; padding: 10px 0 0; font-family: inherit; }
.tkc-details { padding-top: 10px; }
.tkc-segs { display: flex; align-items: flex-start; gap: 5px; flex-wrap: wrap; }
.tkc-seg-w { text-align: center; }
.tkc-seg-w .seg { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 11.5px; padding: 4px 9px; }
.tkc-seg-l { display: block; font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.tkc-chain { font-size: 11px; color: var(--muted); margin-top: 10px; }
.tkc-chain span { color: var(--line-strong); }
.tkc-chain b { color: var(--sub); }
.tkc-alts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tkc-altchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px 4px 5px; cursor: pointer; font-family: inherit; }
.tkc-altchip:hover { border-color: var(--fusion-gradient-start); }
.tkc-altchip code { font-size: 10.5px; }
.tkc-altchip .tkc-spec { border-radius: 50%; }
.tkc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tkc-opt { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px; text-align: center; cursor: pointer; font-family: inherit; transition: transform .12s, border-color .12s; }
.tkc-opt:hover { transform: translateY(-2px); border-color: var(--fusion-gradient-start); }
.tkc-opt-spec { display: grid; place-items: center; background: var(--surface-soft); border-radius: 8px; padding: 12px; }
.tkc-opt-label { display: block; margin-top: 8px; font-size: 11px; font-weight: 600; }
.tkc-opt-label code { font-size: 10.5px; font-weight: 600; }
.tkc-opt-hint { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tkc-check { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--sub); padding: 3px 0; }
.tkc-check span { font-weight: 700; }
.tkc-check.ok span { color: #1f8a5b; }
.tkc-check.bad span { color: #b3402f; }
.tkc-pill { font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; vertical-align: 1px; }
.tkc-pill.new { color: #3b7fd0; background: var(--blue-bg); }
.tkc-pill.bad { color: #b3402f; background: var(--red-bg); }
.tkc-json { background: #0d0e11; color: #e9eaec; border-radius: 10px; padding: 12px 14px; font-size: 11px; margin-top: 10px; overflow-x: auto; }
.tkc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.tkc-filenote { font-size: 11.5px; color: var(--muted); flex: 1; min-width: 200px; }
.tkc-filenote a { color: var(--fusion-gradient-end); }

/* ---------- Token card: expander affordance + segment explorer ---------- */
.tkc-morebar { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.tkc-more { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 13px; margin: 0; width: auto; font-size: 11.5px; font-weight: 600; color: var(--sub); cursor: pointer; font-family: inherit; transition: border-color .12s, background .12s; }
.tkc-more:hover { border-color: var(--fusion-gradient-start); background: var(--yellow-bg); }
.tkc-more .tkc-chev { display: inline-block; transition: transform .15s; font-size: 10px; color: var(--muted); }
.tkc-more.open .tkc-chev { transform: rotate(180deg); }
.tkc-seg-btn { border: 0; cursor: pointer; font-family: "JetBrains Mono", monospace; position: relative; transition: box-shadow .12s; }
.tkc-seg-btn:hover { box-shadow: 0 0 0 2px var(--yellow-bg), 0 0 0 3px var(--fusion-gradient-start); }
.tkc-seg-caret { font-size: 8.5px; opacity: .65; }
.tkc-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; display: block; min-width: 168px; max-height: 240px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-md); padding: 5px; text-align: left; }
.tkc-pop-opt { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 6px 9px; cursor: pointer; font: 500 12px/1.2 "JetBrains Mono", monospace; color: var(--ink); }
.tkc-pop-opt:hover { background: var(--surface-soft); }
.tkc-pop-opt.now { background: var(--yellow-bg); }
.tkc-pop-opt[disabled] { opacity: .4; cursor: default; }
.tkc-pop-opt .tkc-spec { border-radius: 4px; }
.tkc-spec-mini { width: 14px; height: 14px; background: var(--surface-soft); border-radius: 4px; }

/* ============================================================
   v0.6 — Ecosystem: the connection map + token-mapping review
   ============================================================ */

/* ---------- Constellation: dark "universe" viewport ---------- */
.eco-space {
  border-radius: var(--radius-md); overflow: hidden; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), var(--shadow-md);
}
.eco-const { display: block; }
.eco-const svg { width: 100%; height: auto; display: block; }
.eco-const text { font-family: var(--font-primary); }

.const-dust { fill: #fff; opacity: .5; animation: dusttwinkle 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes dusttwinkle { 0%, 100% { opacity: .18; } 50% { opacity: .75; } }

.const-corename { font-size: 15px; font-weight: 700; fill: #fff; letter-spacing: -.2px; }
.const-core use { animation: corepulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes corepulse { 0%, 100% { opacity: .92; } 50% { opacity: 1; } }

/* orbits */
.const-orbit { fill: none; stroke: #fff; stroke-width: 1; opacity: .1; transition: opacity .2s, stroke .2s, stroke-width .2s; }
.const-orbit.active { stroke: var(--tc); opacity: .7; stroke-width: 1.6; }

/* teams (planets + moons) — low-fi flat discs, products on their own orbit */
.const-team { cursor: pointer; outline: none; }
.const-morbit { fill: none; stroke: #fff; stroke-width: 1; opacity: .08; transition: opacity .2s, stroke .2s; }
.const-moon { fill: #cdd2e0; transition: fill .2s; }
.const-mleader { stroke: var(--tc); stroke-width: 1; opacity: 0; transition: opacity .2s; }
.const-mlabel { font-size: 11px; fill: #b6bdd0; opacity: 0; transition: opacity .2s, fill .2s; }
.const-planet { stroke: rgba(255,255,255,.2); stroke-width: 1; transition: transform .2s ease; transform-box: fill-box; transform-origin: center; }
.const-name { font-size: 13.5px; font-weight: 700; fill: #eef0f6; }

.const-team:hover .const-planet, .const-team:focus-visible .const-planet { transform: scale(1.35); stroke: rgba(255,255,255,.55); }
.const-team:hover .const-morbit, .const-team:focus-visible .const-morbit { opacity: .55; stroke: var(--tc); }
.const-team:hover .const-moon, .const-team:focus-visible .const-moon { fill: var(--tc); }
.const-team:hover .const-mleader, .const-team:focus-visible .const-mleader { opacity: .45; }
.const-team:hover .const-mlabel, .const-team:focus-visible .const-mlabel { opacity: 1; fill: #fff; }

/* ---------- Team detail pop-up ---------- */
.team-pop-overlay { position: fixed; inset: 0; z-index: 92; background: rgba(10,12,20,.55); backdrop-filter: blur(4px); display: none; }
.team-pop-overlay.open { display: grid; place-items: center; padding: 24px; }
.team-pop {
  position: relative; width: min(600px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  padding: 24px; animation: popin .2s ease;
}
@keyframes popin { from { transform: translateY(8px) scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.team-pop-close { position: absolute; top: 16px; right: 16px; }
.cd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 40px; }
.cd-head .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cd-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.cd-fw { font-size: 12.5px; color: var(--muted); }
.cd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
@media (max-width: 760px) { .cd-cols { grid-template-columns: 1fr; } }

/* footer = progress section (stage title · status · subtle metrics link) */
.cd-foot { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.cd-foot-title { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
.cd-metrics { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 500; color: var(--muted); }
.cd-metrics:hover { color: var(--sub); text-decoration: underline; }
.cd-label { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cd-prods { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-prod { font-size: 12px; font-weight: 500; color: var(--sub); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.cd-repos { display: grid; gap: 6px; }
.cd-repo { display: flex; align-items: center; gap: 8px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 7px 10px; transition: border-color .15s; }
.cd-repo:hover { border-color: var(--fusion-gradient-start); }
.cd-repo svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.8; flex: none; }
.cd-repodesc { margin-left: auto; font-family: var(--font-primary); font-size: 11px; color: var(--muted); text-align: right; }
.cd-norepo { font-size: 12.5px; color: var(--muted); }
.cd-map { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cd-mapnum { font-size: 26px; font-weight: 700; letter-spacing: -.8px; line-height: 1; }
.cd-maplab { font-size: 12.5px; color: var(--sub); margin-top: 3px; }

/* ---------- Legend for change types ---------- */
.eco-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }
.eco-legend .lgi { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--sub); }
.eco-legend .lgi .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- Mapping overlay (token review) ---------- */
.map-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(20,23,28,.32); backdrop-filter: blur(3px); display: none; }
.map-overlay.open { display: flex; justify-content: flex-end; }
.map-panel {
  width: min(920px, 100%); height: 100%; background: var(--app-bg);
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(20,23,28,.18);
  animation: mapslide .22s ease;
}
@keyframes mapslide { from { transform: translateX(30px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.map-head { flex: none; border-bottom: 1px solid var(--line); padding: 18px 24px 16px; }
.map-head-top { display: flex; align-items: flex-start; gap: 12px; }
.map-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.map-head .map-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.map-head .map-sub code { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--sub); }
.map-close { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.map-close svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2; }
.map-close:hover { background: var(--surface-soft); }

/* coverage headline */
.map-cover { display: flex; align-items: center; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.map-cover .cv-num { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.map-cover .cv-lab { font-size: 12px; color: var(--muted); margin-top: 3px; }
.map-cover .cv-bars { flex: 1; min-width: 220px; display: flex; height: 10px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-soft); }
.map-cover .cv-bars i { height: 100%; display: block; }

/* toolbar: search + filter chips */
.map-tools { flex: none; padding: 14px 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.map-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); padding: 9px 13px; max-width: 100%; transition: border-color .15s; }
.map-search:focus-within { border-color: var(--fusion-gradient-start); }
.map-search svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }
.map-search input { flex: 1; border: 0; outline: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); }
.map-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.map-fchip { display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--font-primary); cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 7px 12px; color: var(--sub); transition: background .14s, border-color .14s, color .14s; }
.map-fchip .fc-sw { width: 8px; height: 8px; border-radius: 2.5px; flex: none; }
.map-fchip .fc-n { color: var(--muted); font-weight: 600; }
.map-fchip:hover { border-color: var(--fusion-gradient-start); }
.map-fchip.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.map-fchip.sel .fc-n { color: rgba(255,255,255,.7); }

/* list */
.map-list { flex: 1; overflow-y: auto; padding: 8px 24px 40px; }
.map-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 48px 0; }
.map-count { font-size: 12px; color: var(--muted); padding: 12px 2px 6px; position: sticky; top: 0; background: var(--app-bg); }
.map-row {
  display: grid; grid-template-columns: 1fr 20px 1fr; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--rc, var(--line));
  border-radius: var(--radius-sm); background: var(--surface); padding: 11px 14px; margin-bottom: 7px;
}
.map-row .m-old, .map-row .m-new { font-family: "JetBrains Mono", monospace; font-size: 11.5px; word-break: break-all; }
.map-row .m-old { color: var(--sub); }
.map-row .m-old.none { color: var(--muted); font-style: italic; font-family: var(--font-primary); }
.map-row .m-new { color: var(--ink); font-weight: 500; }
.map-row .m-new.none { color: #b3402f; font-style: italic; font-family: var(--font-primary); font-weight: 500; }
.map-row .m-arrow { color: var(--muted); text-align: center; }
.map-row .m-badge { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.map-row .m-type { font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-radius: 5px; padding: 2px 7px; color: #fff; background: var(--rc, var(--muted)); }
.map-row .m-vals { display: flex; align-items: center; gap: 6px; font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.map-row .m-vals .sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-strong); flex: none; vertical-align: middle; }
.map-row .m-vals .vchip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.map-row .m-vals .to { color: var(--line-strong); }
@media (max-width: 620px) {
  .map-row { grid-template-columns: 1fr; gap: 4px; }
  .map-row .m-arrow { text-align: left; transform: rotate(90deg); width: 16px; }
}

/* ---------- Chat feedback ("Not what I expected") ---------- */
.fb-foot { margin-top: 10px; padding-left: 2px; }
.fb-flag { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--sub); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 7px 14px; border-radius: 999px; transition: border-color .14s, background .14s, color .14s; }
.fb-flag:hover { color: #b3402f; border-color: var(--fusion-gradient-start); background: var(--yellow-bg); }
.fb-flag svg { flex: none; }
.fb-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.fb-note { flex: 1; min-width: 200px; max-width: 380px; font-family: inherit; font-size: 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--ink); background: var(--surface); }
.fb-note:focus { outline: none; border-color: var(--fusion-gradient-start); }
.fb-thanks { font-size: 13px; color: #1f8a5b; font-weight: 500; }

/* ---------- Feedback admin list ---------- */
.fb-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 14px 16px; margin-bottom: 10px; }
.fb-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fb-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; }
.fb-badge.gap { color: #9a6a00; background: var(--yellow-bg); }
.fb-badge.bad { color: #b3402f; background: var(--red-bg); }
.fb-topic { font-size: 11px; font-weight: 600; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.fb-when { font-size: 11.5px; color: var(--muted); }
.fb-login { font-size: 11.5px; color: var(--sub); font-weight: 600; }
.fb-tools { font-size: 10.5px; color: var(--muted); margin-left: auto; }
.fb-q { font-size: 14px; color: var(--ink); line-height: 1.5; }
.fb-note-row { font-size: 13px; color: var(--sub); margin-top: 6px; font-style: italic; }
.fb-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fb-ans { margin-top: 8px; font-size: 12.5px; }
.fb-ans summary { cursor: pointer; color: var(--muted); }
.fb-ans div { margin-top: 6px; color: var(--sub); line-height: 1.5; white-space: pre-wrap; border-left: 2px solid var(--line-strong); padding-left: 10px; }

/* ============================================================
   v0.7 — Foundations landing (Atlassian-style card grid)
   ============================================================ */
.found-group { margin-bottom: 34px; }
.found-group-title { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.found-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .found-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .found-cards { grid-template-columns: 1fr; } }
.found-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s, box-shadow .15s; }
.found-card:hover { transform: translateY(-3px); border-color: var(--fusion-gradient-start); box-shadow: var(--shadow-md); }
.found-illo { background: var(--surface); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 24px; }
.found-illo svg { width: 108px; height: 81px; display: block; }
.found-card-body { padding: 15px 17px 18px; }
/* Contribute — what you can add, side by side */
.contrib-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 736px; }
.found-card-body h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.2px; }
.found-card-body p { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 5px; }

/* Foundation detail page — hero + light/dark toggle */
.found-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.found-hero .found-illo { flex: none; width: 120px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.found-hero h1 { font-size: 26px; font-weight: 600; letter-spacing: -.4px; }
.found-hero p { font-size: 14px; color: var(--muted); max-width: 60ch; margin-top: 6px; }

/* ============================================================
   v0.7 — Tokens page: guided picker + token list
   ============================================================ */
/* Guided picker steps */
.tp-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: relative; }
.tp-step { font: 600 13px/1 var(--font-primary); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; transition: background .14s, border-color .14s; }
.tp-step.empty { background: var(--sc, var(--ink)); color: #fff; border-color: var(--sc, var(--ink)); }
.tp-step.chosen { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.tp-step.chosen .tp-step-label { text-decoration: underline; text-decoration-color: var(--sc); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.tp-step.chosen:hover { border-color: var(--sc); }
.tp-caret { font-size: 9px; opacity: .7; }
.tp-sep { color: var(--line-strong); font-weight: 700; }
.tp-pop { position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 5px; min-width: 190px; max-height: 280px; overflow-y: auto; }
.tp-pop-opt { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 8px 11px; font: 500 13px/1.3 var(--font-primary); color: var(--ink); cursor: pointer; }
.tp-pop-opt:hover { background: var(--surface-soft); }
.tp-pop-empty { padding: 8px 11px; color: var(--muted); font-size: 12.5px; }
/* Picker result */
.tp-result { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); padding: 16px 18px; }
.tp-result-head { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tp-result-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tp-token { font-family: "JetBrains Mono", monospace; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; color: var(--ink); }
.tp-copy { font: 600 12px/1 var(--font-primary); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 7px 13px; cursor: pointer; color: var(--sub); }
.tp-copy:hover { border-color: var(--fusion-gradient-start); color: var(--ink); }
.tp-vals { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--sub); }
.tp-val { display: inline-flex; align-items: center; gap: 7px; }
.tp-val b { color: var(--ink); font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 11.5px; }
.tp-sw { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line-strong); flex: none; }

/* Picker: "+ New…" option + inline new-segment input */
.tp-pop-new { color: var(--fusion-gradient-end); font-weight: 600; border-top: 1px solid var(--line); margin-top: 3px; }
.tp-new-wrap { padding: 6px; }
.tp-new-in { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; }
.tp-new-in:focus { border-color: var(--fusion-gradient-start); }
.tp-new-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }
/* Picker: create panel */
.tp-create { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); padding: 16px 18px; }
.tp-create-head { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tp-ref { margin: 12px 0; }
.tp-ref label { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 5px; }
.tp-ref label span { color: var(--muted); font-weight: 400; }
.tp-ref input { width: 100%; max-width: 420px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13px; color: var(--ink); background: var(--surface); outline: none; }
.tp-ref input:focus { border-color: var(--fusion-gradient-start); }
.tp-verdict { margin-bottom: 12px; }

/* Token list — token | light | dark, with copy */
.tl-count { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.tl-head { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap: 16px; padding: 0 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.tl-row { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 16px; padding: 10px; border-radius: 8px; border-bottom: 1px solid var(--line); }
.tl-row:hover { background: var(--surface-soft); }
.tl-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tl-name { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-tier { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border-radius: 999px; padding: 3px 7px; flex: none; }
.tl-primitive { color: #3b7fd0; background: var(--blue-bg); }
.tl-semantic { color: #6b4bd8; background: #EEE9FF; }
.tl-component { color: #1f8a5b; background: var(--green-bg); }
.tl-copy { flex: none; width: 26px; height: 26px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .12s, border-color .12s; }
.tl-row:hover .tl-copy { opacity: 1; }
.tl-copy svg { width: 13px; height: 13px; stroke: var(--muted); fill: none; stroke-width: 2; }
.tl-copy:hover { border-color: var(--fusion-gradient-start); }
.tl-copy.did { background: var(--green); border-color: var(--green); }
.tl-copy.did svg { stroke: #fff; }
.tl-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tl-sw { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-strong); flex: none; }
.tl-sw-none { background: repeating-conic-gradient(#eceef1 0 25%, #fff 0 50%) 0 0/8px 8px; opacity: .55; }
.tl-cval { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .tl-head { grid-template-columns: minmax(0,1fr) 64px 64px; }
  .tl-row { grid-template-columns: minmax(0,1fr) 64px 64px; gap: 10px; }
  .tl-cval { display: none; }
  .tl-copy { opacity: 1; }
}

/* ============================================================
   v0.7 — Foundation detail pages: two-column Token | Preview
   ============================================================ */
.fd-group { margin-bottom: 28px; }
.fd-gname { font-size: 12.5px; font-weight: 600; color: var(--sub); margin-bottom: 10px; }
.fd-gname .cnt { color: var(--muted); font-weight: 500; }
.fd-head { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 28px; padding-bottom: 9px; border-bottom: 1px solid var(--line-strong); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.fd-row { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 28px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fd-tok { min-width: 0; }
.fd-name { font-family: "JetBrains Mono", monospace; font-size: 12.5px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; color: var(--sub); display: inline-block; word-break: break-all; }
.fd-name b { color: var(--ink); background: var(--yellow-bg); padding: 0 3px; border-radius: 4px; font-weight: 600; }
.fd-desc { font-size: 13px; color: var(--sub); margin-top: 9px; max-width: 62ch; }
/* A token nobody has documented reads as absent, not as "nothing to say". */
.fd-desc.none { color: var(--muted); font-style: italic; }
/* Status sits beside the name, because it changes whether you may use it at all. */
.fd-status { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: #A8410F; background: var(--yellow-bg); border-radius: 10px; padding: 3px 9px; vertical-align: middle; }
.fd-status code { font-family: "JetBrains Mono", monospace; font-size: 10.5px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.fd-donot { margin: 8px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--sub); max-width: 62ch; }
.fd-donot li { margin-top: 3px; }
.fd-donot code { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--ink); }
.fd-prev { min-width: 0; }
.fd-pv-v { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }
.fd-dual { display: flex; gap: 12px; }
.fd-pv-item { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fd-sw { height: 56px; border-radius: 8px; border: 1px solid var(--line-strong); }
.fd-shadow { height: 56px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.fd-shadow.dk { background: #101216; border-color: #23262d; }
.fd-type { color: var(--ink); line-height: 1.1; }
.fd-dim { display: flex; align-items: center; gap: 12px; }
.fd-bar { height: 16px; border-radius: 5px; background: var(--fusion-gradient); display: block; flex: none; }
.fd-radius { display: inline-block; margin-right: 10px; }
.fd-radius span { display: block; width: 72px; height: 50px; border: 2px solid var(--indigo); background: var(--indigo-bg); }
.fd-op { display: inline-block; width: 56px; height: 40px; margin-right: 10px; background: repeating-conic-gradient(#e7e9ed 0 25%, #fff 0 50%) 0 0/12px 12px; border-radius: 6px; overflow: hidden; }
.fd-op span { display: block; width: 100%; height: 100%; background: var(--ink-2); }
.fd-motion { display: inline-block; width: 72px; height: 24px; overflow: hidden; margin-right: 10px; vertical-align: middle; }
.fd-motion .dotr { width: 14px; height: 14px; border-radius: 50%; background: var(--fusion-gradient); display: block; margin-top: 5px; animation: sbrun 1s infinite alternate ease-in-out; }
@media (max-width: 760px) {
  .fd-head { display: none; }
  .fd-row { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Foundations sidebar sub-nav ---------- */
.side-sub { display: flex; flex-direction: column; margin: 2px 0 4px 0; padding-left: 30px; border-left: 1px solid var(--line); margin-left: 20px; }
.side-sublink { display: block; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .14s, color .14s; }
.side-sublink:hover { background: #EFF0F3; color: var(--ink); }
.side-sublink.active { background: var(--yellow-bg); color: var(--ink); font-weight: 600; }

/* ---------- Token list: dropdown filters + idle (search-driven) state ---------- */
.tl-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tl-toolbar .reg-search { flex: 1; min-width: 220px; max-width: 460px; margin: 0; }
.tl-select { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-select select {
  font: 600 13px/1 var(--font-primary); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 30px 9px 12px; background: var(--surface); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7"><path d="M0 0l5 6 5-6z" fill="%23949CA8"/></svg>');
  background-repeat: no-repeat; background-position: right 11px center;
}
.tl-select select:hover { border-color: var(--fusion-gradient-start); }
.tl-select select:focus { outline: none; border-color: var(--fusion-gradient-start); }
.tl-idle { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--muted); font-size: 14px; padding: 48px 0; }
.tl-idle svg { width: 26px; height: 26px; stroke: var(--line-strong); fill: none; stroke-width: 2; }

/* ---------- Agents catalog page ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 820px) { .agent-grid { grid-template-columns: 1fr; } }
.agent-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.agent-head { display: flex; align-items: center; gap: 12px; }
.agent-ico { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.agent-ico svg { width: 21px; height: 21px; }
.agent-head h3 { font-size: 15px; font-weight: 600; }
.agent-area { font-size: 12px; color: var(--muted); margin-top: 1px; }
.agent-head .tag, .agent-badge { margin-left: auto; flex: none; }
.agent-badge { font-size: 10.5px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.agent-desc { font-size: 13.5px; color: var(--sub); line-height: 1.55; margin: 13px 0; }
.agent-head .agent-badge + .agent-badge { margin-left: 6px; }
.agent-grid > * { min-width: 0; }
.agent-foot { gap: 10px; }
.agent-foot .btn { flex: none; }
/* Fusion-owned skills: the star after the title, like a "verified" mark. */
.fusion-verified { display: inline-flex; vertical-align: -1px; margin-left: 5px; }
.fusion-verified svg { width: 14px; height: 14px; }
.agent-ex { font-size: 12.5px; color: var(--muted); font-style: italic; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; }
.agent-foot { display: flex; align-items: center; justify-content: flex-end; margin-top: 14px; }

/* ---------- Agent "thinking" indicator — a single black Fusion star ----------
   While thinking, the bot avatar bubble is hidden so the animated star is
   the only mark; it recolours to ink and runs a longer, multi-phase loop. */
.turn.is-thinking .av { display: none; }
.thinking-bubble { display: inline-flex; align-items: center; gap: 11px; padding: 2px 0 !important; }
.think-star { width: 28px; height: 28px; display: grid; place-items: center; flex: none; }
.think-star svg { width: 28px; height: 28px; fill: var(--ink); transform-origin: 50% 50%; animation: think-spin 3.4s ease-in-out infinite; }
@keyframes think-spin {
  0%   { transform: rotate(0deg)    scale(.6);  opacity: .45; }
  12%  { transform: rotate(50deg)   scale(1.04); opacity: 1; }
  22%  { transform: rotate(38deg)   scale(.92); }               /* recoil */
  40%  { transform: rotate(180deg)  scale(1.16); opacity: 1; }
  50%  { transform: rotate(170deg)  scale(1.02); }              /* settle */
  68%  { transform: rotate(312deg)  scale(1.12); opacity: 1; }
  80%  { transform: rotate(324deg)  scale(.86);  opacity: .85; }
  100% { transform: rotate(360deg)  scale(.6);  opacity: .45; }
}
.think-label { font-size: 14.5px; color: var(--muted); }
.think-label .td { animation: think-dot 1.4s ease-in-out infinite; }
.think-label .td:nth-child(2) { animation-delay: .2s; }
.think-label .td:nth-child(3) { animation-delay: .4s; }
@keyframes think-dot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .think-star svg { animation: think-pulse 2.4s ease-in-out infinite; }
  @keyframes think-pulse { 0%,100% { opacity:.5; } 50% { opacity:1; } }
  .think-label .td { animation: none; opacity: .6; }
}

/* ---------- suggest-ux — suggestion card + screenshot attachments ---------- */
.sx-ctx { font-size: 11.5px; font-weight: 600; color: var(--sub); letter-spacing: .3px; margin-bottom: 10px; }
.sx-list { display: flex; flex-direction: column; }
.sx-row { border-top: 1px solid var(--line); padding: 10px 2px; cursor: pointer; }
.sx-row:first-child { border-top: 0; padding-top: 2px; }
.sx-row .sx-head { display: flex; align-items: baseline; gap: 10px; }
.sx-sev { flex: none; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; letter-spacing: .2px; }
.sx-sev.fix { color: #b03a2e; background: var(--red-bg); }
.sx-sev.improve { color: #4b4ec9; background: var(--indigo-bg); }
.sx-sev.consider { color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); }
.sx-text { flex: 1; font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.sx-meta { flex: none; font-size: 11px; color: var(--muted); white-space: nowrap; }
.sx-row.open .ic-caret { display: inline-block; transform: rotate(180deg); }
.sx-chips { margin: 6px 0 0 0; font-size: 12px; }
.sx-chips code { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.sx-detail { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; cursor: default; }
.sx-detail[hidden] { display: none; } /* author display beats the hidden attr otherwise */
.sx-why { font-size: 12.5px; color: var(--sub); line-height: 1.5; }
.sx-src { font-size: 12px; color: var(--muted); }
.sx-src a { color: var(--ink); text-decoration: underline; }
.sx-fix { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 10px 12px; font-size: 12px; overflow-x: auto; margin: 0; }
.sx-detail .btn { align-self: flex-start; }
.sx-frame { width: 100%; height: 120px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: #0b0b0e; }

.attach-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 8px 2px; }
.attach-chip { position: relative; display: inline-flex; }
.attach-chip img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); }
.attach-chip button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--sub); font-size: 10px; line-height: 1; cursor: pointer; }
.attach-chip button:hover { color: var(--ink); border-color: var(--fusion-gradient-start); }
.turn .attach-sent { display: flex; gap: 6px; margin-bottom: 6px; justify-content: flex-end; }
.turn .attach-sent img { max-width: 180px; max-height: 120px; border-radius: var(--radius-xs); border: 1px solid var(--line); }

/* ---------- review_icon — the icon request card (add-icon step 1) ----------
   One modal, four questions: name → products → themeable → search terms.
   Products come from icons.json (icon-facets.js) so no invented value can be
   submitted; Submit posts the state straight to the worker. Tokens follow the
   fusion-brand skill's "Application UI — the Observatory" section. */
.ric, .rsc { --ric-ok: #1F8F5B; --ric-bad: #D6453A; --ric-bad-bg: #FFF1F0; --ric-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0; border-color: var(--line-strong); border-radius: var(--radius-lg); box-shadow: 0 10px 36px rgba(20,23,28,.08); max-width: 640px; overflow: visible; }
.ric-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 20px 0; }
/* The whole tile is the surface switch; the badge hangs off its corner and only indicates. */
.ric-art { width: 72px; height: 72px; flex: none; position: relative; border-radius: 12px; border: 1px solid var(--line-strong); background: #FAFBFC; display: grid; place-items: center; cursor: pointer; }
.ric-art:hover { border-color: var(--ink); }
.ric-art.d { background: #1F2126; border-color: #1F2126; }
.ric-art.d:hover { border-color: #E6E8EC; }
.ric-art > svg, .ric-art > img { width: 30px; height: 30px; display: block; }
.ric-art.d > img { filter: invert(1); }
.ric-art.recolor > svg [fill]:not([fill="none"]) { fill: var(--ink); }
.ric-art.recolor > svg [stroke]:not([stroke="none"]) { stroke: var(--ink); }
.ric-art.d.recolor > svg [fill]:not([fill="none"]) { fill: #E6E8EC; }
.ric-art.d.recolor > svg [stroke]:not([stroke="none"]) { stroke: #E6E8EC; }
.ric-surf { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-strong); background: #fff; display: grid; place-items: center; pointer-events: none; box-shadow: 0 1px 3px rgba(20,23,28,.08); }
.ric-art.d .ric-surf { background: #2A2D33; border-color: #3A3E46; }
.ric-chip { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-strong); background: linear-gradient(90deg, #FAFBFC 50%, #1F2126 50%); animation: ric-flip .8s cubic-bezier(.4,0,.2,1) .5s 1 both; }
.ric-art.d .ric-chip { background: linear-gradient(90deg, #1F2126 50%, #FAFBFC 50%); border-color: #3A3E46; }
@keyframes ric-flip { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .ric-chip { animation: none; } }
.ric-id { flex: 1; min-width: 0; }
.ric-name { margin: 0 0 6px; font: 500 17px/1.3 var(--ric-mono); letter-spacing: -.01em; overflow-wrap: anywhere; color: var(--ink); }
.ric-facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13px; }
.ric-facts dt { color: var(--sub); } .ric-facts dd { margin: 0; color: var(--ink); }
.ric-pager { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 13px; flex: none; padding-top: 2px; }
.ric-pager button { background: none; border: 0; color: var(--ink); font-size: 16px; cursor: pointer; padding: 2px 4px; line-height: 1; }
.ric-pager button:disabled { color: var(--muted); cursor: default; }
.ric-pager .ric-x { margin-left: 6px; font-size: 18px; }
.ric-warn { font-size: 12.5px; color: #8a5a00; background: var(--yellow-bg); border-radius: var(--radius-xs); padding: 7px 10px; margin: 14px 20px 0; }
.ric-q { padding: 18px 20px 4px; }
.ric-q h5 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.ric-opts { display: flex; flex-direction: column; }
.ric-opt { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; user-select: none; min-height: 50px; }
.ric-opt:first-child { border-top: 0; }
.ric-n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font: 400 12.5px var(--ric-mono); color: var(--ink); flex: none; background: #fff; }
.ric-opt.on .ric-n { background: var(--ink); border-color: var(--ink); color: #fff; }
.ric-lab { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }
.ric-lab code { font-family: var(--ric-mono); font-size: 13px; }
.ric-lab small { display: block; font-size: 12.5px; color: var(--sub); margin-top: 1px; }
/* ---------- the product picker (step 2) ----------
   Twenty products across seven teams, so the step is a picker in the shape of
   the catalogue's product filter rather than a list: a team row takes its whole
   group, a product row takes one. What is picked sits above it as pills. */
.ric-chosen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 34px; }
.ric-nopick { color: var(--muted); font-size: 13.5px; }
/* A chosen value is one pill wherever it appears — products here, search terms
   on the last step (defined with .ric-tagsel below). `.team` is the variant for
   a pill standing for a whole team rather than one product. */
.ric-tag.team { background: var(--surface); color: var(--ink); }
.ric-tag.team small { color: var(--muted); margin-left: 5px; font-size: 11.5px; }
.ric-pick { position: relative; margin-top: 12px; padding-bottom: 4px; }
.ric-pick-btn { width: 100%; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: 500 13.5px var(--font-primary); color: var(--ink); cursor: pointer; text-align: left; }
.ric-pick-btn:hover, .ric-pick.open .ric-pick-btn { border-color: var(--ink); }
.ric-plus { color: var(--sub); font-weight: 500; }
.ric-chev { margin-left: auto; color: var(--muted); font-size: 11px; }
.ric-menu { margin-top: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; }
.ric-pick:not(.open) .ric-menu { display: none; }
.ric-menu-head { padding: 8px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.ric-menu-head input { flex: 1; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; font: 400 13px var(--font-primary); color: var(--ink); background: var(--surface); outline: 0; }
.ric-menu-head input:focus { border-color: var(--ink); }
.ric-menu-head input::placeholder { color: var(--muted); }
.ric-menu-head button { background: none; border: 0; font: 500 12.5px var(--font-primary); color: var(--sub); cursor: pointer; padding: 2px 6px; }
.ric-menu-head button:hover { color: var(--ink); }
.ric-plist { max-height: 268px; overflow-y: auto; padding: 4px; }
.ric-prow { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--ink); }
.ric-prow:hover { background: var(--surface-soft); }
.ric-box { width: 17px; height: 17px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface); flex: none; display: grid; place-items: center; font-size: 11px; line-height: 1; color: #fff; }
.ric-prow.on .ric-box { background: var(--ink); border-color: var(--ink); }
.ric-prow.on .ric-box::after { content: "✓"; }
.ric-prow.part .ric-box { border-color: var(--ink); }
.ric-prow.part .ric-box::after { content: "–"; color: var(--ink); font-weight: 700; }
.ric-prow .ric-lab { flex: 1; min-width: 0; font-size: 13.5px; }
.ric-prow.team { margin-top: 5px; }
.ric-plist .ric-prow.team:first-child { margin-top: 0; }
.ric-prow.team .ric-lab { font-weight: 600; }
.ric-prow.kid { padding-left: 34px; }
.ric-prow.kid .ric-lab { color: var(--sub); }
.ric-cnt { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ric-only { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--sub); opacity: 0; padding: 0 4px; }
.ric-prow.kid:hover .ric-only, .ric-only:focus-visible { opacity: 1; }
.ric-only:hover { color: var(--ink); }
.ric-psep { height: 1px; background: var(--line); margin: 5px 10px; }
.ric-psep:last-child { display: none; }
.ric-pempty { padding: 14px 12px; color: var(--muted); font-size: 13px; }
.ric-prow:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ric-else .ric-n { color: var(--sub); }
.ric-else input { width: 100%; border: 0; background: transparent; padding: 0; outline: 0; font: 400 13px var(--ric-mono); color: var(--ink); }
.ric-else input::placeholder { color: var(--muted); font: 400 14px var(--font-primary); }
.ric-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface-soft); color: var(--sub); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.ric-pill.bad { color: var(--ric-bad); border-color: rgba(214,69,58,.35); background: var(--ric-bad-bg); }
.ric-pill.add { cursor: pointer; color: var(--ink); }
.ric-pill.add::before { content: "+"; color: var(--sub); font-weight: 500; }
.ric-pill.add:hover { border-color: var(--ink); }
.ric-check { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--sub); padding: 8px 4px 4px 46px; }
.ric-check .ok::before { content: "✓ "; color: var(--ric-ok); font-weight: 600; }
.ric-check .no::before { content: "✕ "; color: var(--ric-bad); font-weight: 600; }
.ric-check .wait { color: var(--muted); }
.ric-check code { font-family: var(--ric-mono); font-size: 12px; color: var(--ink); }
.ric-tagsel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 2px 4px 14px; border-bottom: 1px solid var(--line); }
.ric-tag { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 8px; padding: 5px 7px 5px 11px; font-size: 13px; font-weight: 500; }
.ric-tag b { font-weight: 400; opacity: .7; cursor: pointer; font-size: 14px; line-height: 1; }
.ric-tag b:hover { opacity: 1; }
.ric-tagin { flex: 1 1 110px; min-width: 110px; border: 0; background: transparent; font: 400 13.5px var(--font-primary); color: var(--ink); outline: 0; padding: 5px 2px; }
.ric-tagin::placeholder { color: var(--muted); }
.ric-tagsug { padding: 12px 4px 4px; }
.ric-lbl { font-size: 12.5px; color: var(--sub); margin-bottom: 8px; }
.ric-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ric-dim { color: var(--muted); }
.ric-fld { padding: 10px 4px 12px; border-top: 1px solid var(--line); }
.ric-fld:first-child { border-top: 0; padding-top: 2px; }
.ric-fld label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
.ric-fld label > span { display: flex; align-items: baseline; gap: 6px; }
.ric-fld label small { color: var(--muted); font-weight: 400; font-size: 12px; }
.ric-fld input, .ric-fld textarea { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: 400 13.5px var(--font-primary); color: var(--ink); padding: 9px 12px; outline: 0; width: 100%; }
.ric-fld input:focus, .ric-fld textarea:focus { border-color: var(--ink); }
.ric-fld input::placeholder, .ric-fld textarea::placeholder { color: var(--muted); }
.ric-fld input[type="date"] { max-width: 220px; font-family: var(--ric-mono); font-size: 13px; }
.ric-fld textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.ric-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px 18px; border-top: 1px solid var(--line); margin-top: 12px; }
.ric-sum { color: var(--sub); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ric-sum code { font-family: var(--ric-mono); color: var(--ink); font-size: 12.5px; }
.ric-acts { display: flex; gap: 8px; flex: none; align-items: center; }
.ric-btn { height: 38px; padding: 0 16px; border-radius: 10px; font: 500 13.5px var(--font-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ric-btn.ghost { background: #fff; border: 1px solid var(--line-strong); color: var(--ink); }
.ric-btn.solid { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.ric-btn.solid:disabled { background: var(--surface-soft); border-color: var(--line-strong); color: var(--muted); cursor: default; }
.ric-btn kbd { font: 500 12px var(--font-primary); opacity: .75; }
.ric-link { background: none; border: 0; color: var(--sub); font: 500 13.5px var(--font-primary); cursor: pointer; padding: 0 6px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.ric-link:hover { color: var(--ink); text-decoration-color: var(--line-strong); }
.ric-btn:focus-visible, .ric-link:focus-visible, .ric-opt:focus-visible, .ric-pager button:focus-visible, .ric-pill.add:focus-visible, .ric-art:focus-visible, .ric-tag b:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ric-btn[hidden], .ric-pill[hidden], .ric-check[hidden], .ric-tagsug[hidden], .ric-q[hidden] { display: none; }
.ric-under { color: var(--muted); font-size: 12.5px; text-align: center; padding: 0 20px 14px; }
.ric-under-err { color: var(--ric-bad); }
.ric-sent { opacity: .55; pointer-events: none; }
.ric-busy { opacity: .7; pointer-events: none; }
.ric-gone { padding: 14px 20px; font-size: 13px; color: var(--muted); }
/* the outcome card: one mark, one line, one link */
.ric-done { --ric-ok: #1F8F5B; --ric-bad: #D6453A; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-color: var(--line-strong); border-radius: var(--radius-lg); max-width: 640px; }
.ric-done-mark { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 700; flex: none; color: #fff; background: var(--ric-ok); }
.ric-done.bad .ric-done-mark { background: var(--ric-bad); }
.ric-done-body { flex: 1; min-width: 0; }
.ric-done-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.ric-done-line { font-size: 13px; color: var(--sub); margin-top: 2px; }
.ric-done-line code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--ink); }
.ric-done .ric-btn { flex: none; text-decoration: none; }
@media (max-width: 560px) { .ric-done { flex-wrap: wrap; } .ric-done .ric-btn { margin-left: 46px; } }
/* the source card: the same rows, each holding its own input */
.rsc .ric-q { padding-top: 20px; }
.rsc .ric-opt { align-items: flex-start; }
.rsc .ric-n { margin-top: 2px; }
.rsc-t { font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.rsc-t small { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.rsc-in { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: 400 13px var(--ric-mono); color: var(--ink); padding: 8px 10px; outline: 0; display: none; }
.rsc-opt.on .rsc-in { display: block; }
.rsc-in:focus { border-color: var(--ink); }
.rsc-in::placeholder { color: var(--muted); font-family: var(--font-primary); }
textarea.rsc-in { resize: vertical; min-height: 64px; }
@media (max-width: 560px) { .ric-head { flex-wrap: wrap; } .ric-pager { order: -1; width: 100%; justify-content: flex-end; } .ric-foot { flex-direction: column; align-items: stretch; } .ric-acts { justify-content: flex-end; } .ric-check { padding-left: 4px; } }
/* ============================================================
   Token relationship map — graph canvas (blast radius)

   Two node shapes, on purpose:
     .tg-tok    a TOKEN — a card, same shell for every tier.
     .tg-comp   NOT a token — a pill, so a component can never be
                mistaken for something you edit in packages/tokens.
   The world is one transformed container; pan/zoom never reflows.
   ============================================================ */

.main-scroll .inner.inner-wide { max-width: 1600px; }

.trm-missing { border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 28px; text-align: center; color: var(--sub); }
.trm-missing h3 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.trm-missing p { font-size: 13px; color: var(--muted); }

/* ---------- Hero ---------- */
.trm-hero { margin-bottom: 18px; }
.trm-eyebrow { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--muted); }
.trm-eyebrow-lg { font-size: 11px; color: var(--fusion-gradient-end); }
.trm-hero-title { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 600; letter-spacing: -.4px; margin: 7px 0 8px; }
.trm-hero-title code { font-family: 'JetBrains Mono', monospace; font-size: 19px; font-weight: 600; }
.trm-hero-lead { font-size: 14px; line-height: 1.6; color: var(--sub); max-width: 94ch; }
.trm-hero-lead code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; background: var(--surface-soft); border-radius: 5px; padding: 1px 5px; }
.trm-hero-lead b { color: var(--ink); }

.trm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.trm-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--sub); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; }
.trm-tag b { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--fusion-gradient); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: -.1px; }

.trm-trail { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 11px; }
.trm-trail code { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.trm-trail-step { color: var(--muted); }
.trm-trail-step:hover { color: var(--fusion-gradient-end); }
.trm-trail-now { color: var(--ink); font-weight: 600; }
.trm-trail-sep { color: var(--line-strong); }

/* ---------- Canvas ---------- */
.tg-wrap {
  position: relative; height: calc(100vh - 320px); min-height: 560px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm);
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 22px 22px;
}
.tg-viewport { position: absolute; inset: 0; cursor: grab; touch-action: none; overflow: hidden; }
.tg-viewport:active { cursor: grabbing; }
.tg-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.tg-wires { position: absolute; top: 0; left: 0; width: 2px; height: 2px; overflow: visible; pointer-events: none; }

.tg-wire { fill: none; stroke: #C9CED6; stroke-width: 1.8; transition: stroke .15s, opacity .15s; }
.tg-wire.use { stroke-dasharray: 5 6; }
.tg-port { fill: var(--surface); stroke: #C9CED6; stroke-width: 2; transition: stroke .15s, opacity .15s; }
.isolating .tg-wire, .isolating .tg-port { opacity: .13; }
.isolating .tg-wire.lit { opacity: 1; stroke: var(--fusion-gradient-end); stroke-width: 2.4; }
.isolating .tg-port.lit { opacity: 1; stroke: var(--fusion-gradient-end); }

/* ---------- Nodes ---------- */
.tg-node { position: absolute; top: 0; left: 0; will-change: transform; user-select: none; outline: none; transition: opacity .16s, box-shadow .15s, border-color .15s; }
.isolating .tg-node { opacity: .3; }
.isolating .tg-node.lit { opacity: 1; }

.tg-tok {
  width: 196px; padding: 9px 12px 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.tg-tok:hover, .tg-tok:focus-visible { box-shadow: var(--shadow-md); border-color: var(--fusion-gradient-start); }
.tg-tok.sel { border-color: var(--fusion-gradient-start); box-shadow: 0 0 0 3px rgba(255,172,1,.18), var(--shadow-md); }
.tg-tok-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 5px; }
.tg-tok > code { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600; color: var(--ink); line-height: 1.45; overflow-wrap: break-word; }
.tg-tok-meta { display: block; font-size: 9.5px; color: var(--muted); margin-top: 5px; }

.tg-tier { display: inline-block; font-size: 8.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; }
.tg-tier[data-tier="primitive"] { color: #fff; background: var(--ink); }
.tg-tier[data-tier="semantic"] { color: #fff; background: var(--fusion-gradient); }
.tg-tier[data-tier="component"] { color: #3f42c9; background: var(--indigo-bg); }
.tg-tier[data-tier="comp"] { color: #2c62a8; background: var(--blue-bg); }

.tg-swp { display: inline-flex; border-radius: 5px; overflow: hidden; border: 1px solid rgba(20,23,28,.14); flex: none; }
.tg-swp i { width: 13px; height: 13px; display: block; }
.tg-swp-val { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--sub); border: 0; }

.tg-comp {
  display: inline-flex; align-items: center; gap: 6px; max-width: 220px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--blue); border-radius: 999px; padding: 6px 12px;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.tg-comp:hover, .tg-comp:focus-visible { box-shadow: var(--shadow-md); background: var(--blue-bg); }
.tg-comp.sel { box-shadow: 0 0 0 3px rgba(81,160,245,.25), var(--shadow-md); background: var(--blue-bg); }
.tg-comp-glyph { width: 9px; height: 9px; border-radius: 3px; border: 1.5px solid var(--blue); flex: none; }
.tg-comp-name { overflow: hidden; text-overflow: ellipsis; }
.tg-comp-n { font-size: 9.5px; font-weight: 700; color: #2c62a8; background: var(--blue-bg); border-radius: 999px; padding: 1px 6px; flex: none; }

/* ---------- Overlays ---------- */
.tg-search { position: absolute; top: 12px; left: 12px; z-index: 6; width: 280px; }
.tg-search input {
  width: 100%; font: 500 12px/1 var(--font-primary); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 14px; outline: none; box-shadow: var(--shadow-sm);
}
.tg-search input:focus { border-color: var(--fusion-gradient-start); }
.tg-search-list {
  margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); overflow: hidden; max-height: 320px; overflow-y: auto;
}
.tg-search-list button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font: 500 11.5px var(--font-primary); text-align: left; border: 0; background: transparent;
  padding: 8px 12px; cursor: pointer; color: var(--ink);
}
.tg-search-list button:hover { background: var(--surface-soft); }
.tg-search-list code { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; overflow-wrap: anywhere; }
.tg-search-list small { color: var(--muted); font-size: 10px; flex: none; }
.tg-search-none { display: block; padding: 10px 12px; font-size: 11.5px; color: var(--muted); }

.tg-controls { position: absolute; right: 12px; bottom: 12px; z-index: 6; display: flex; gap: 6px; }
.tg-controls button {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--sub); font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm); display: grid; place-items: center;
}
.tg-controls button:hover { color: var(--ink); border-color: var(--fusion-gradient-start); }

.tg-legend { position: absolute; left: 12px; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 10.5px; color: var(--muted); background: rgba(255,255,255,.86); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; max-width: calc(100% - 200px); }
.tg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tg-legend .tg-lg-tok { width: 11px; height: 9px; border-radius: 3px; border: 1.5px solid var(--sub); }
.tg-legend .tg-lg-comp { width: 12px; height: 8px; border-radius: 999px; border: 1.5px solid var(--blue); }
.tg-legend .tg-lg-wire { width: 16px; height: 0; border-top: 2px solid #C9CED6; }
.tg-legend .tg-lg-wire.use { border-top-style: dashed; }

/* ---------- Detail panel ---------- */
.tg-panel {
  position: absolute; top: 12px; right: 12px; z-index: 7; width: 300px; max-height: calc(100% - 24px);
  overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.tg-panel-head { position: relative; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.tg-panel-head h3 { font-size: 13px; font-weight: 600; margin-top: 6px; overflow-wrap: break-word; }
.tg-panel-head h3 code { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.tg-panel-x { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.tg-panel-x:hover { background: var(--surface-soft); color: var(--ink); }
.tg-panel-body { padding: 8px 14px 14px; }
.tg-panel-sec { font-size: 9.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.tg-panel-team { display: flex; align-items: baseline; gap: 7px; margin-top: 8px; }
.tg-panel-team b { font-size: 12px; }
.tg-panel-team small { font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--green); }
.tg-panel-team.queued small { color: var(--muted); }
.tg-panel-links { display: flex; gap: 12px; margin-top: 10px; }
.tg-panel-links a { font-size: 11.5px; font-weight: 600; color: var(--fusion-gradient-end); }
.tg-jump code { color: var(--fusion-gradient-end); }
.tg-jump:hover code { text-decoration: underline; }
.tg-copy { cursor: copy; }
.tg-copy.copied { background: var(--green-bg); }

.trm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 11.5px; border-bottom: 1px solid var(--line); }
.trm-row:last-child { border-bottom: 0; }
.trm-row-k { color: var(--sub); flex: none; }
.trm-row-v { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); min-width: 0; justify-content: flex-end; text-align: right; }
.trm-row-v code { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--ink); overflow-wrap: break-word; }
.trm-sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(20,23,28,.14); flex: none; display: inline-block; }

/* ---------- Product chips (evidence) ---------- */
.trm-chip-group { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.trm-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; }
.trm-chip-prod { cursor: help; padding-right: 4px; }
.trm-chip-ev { font-size: 8.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border-radius: 999px; padding: 1px 6px; }
.trm-ev-verified .trm-chip-ev { color: #1c7a52; background: var(--green-bg); }
.trm-ev-census .trm-chip-ev { color: #2c62a8; background: var(--blue-bg); }
.trm-ev-queued .trm-chip-ev { color: var(--sub); background: var(--line); }
.trm-ev { font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.trm-ev-verified { color: #1c7a52; background: var(--green-bg); }
.trm-ev-census { color: #2c62a8; background: var(--blue-bg); }

.trm-hint { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- Sources panel ---------- */
.trm-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 18px 20px 20px; box-shadow: var(--shadow-sm); }
.trm-panel h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -.2px; }
.trm-panel code { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--sub); }
.trm-src-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.trm-src-row:last-child { border-bottom: 0; }
.trm-src-row b { display: block; font-size: 12.5px; font-weight: 600; }
.trm-src-row code { display: block; margin: 2px 0 1px; }
.trm-src-row small { font-size: 11px; color: var(--muted); }
.trm-gap { font-size: 11.5px; color: #8a5a00; background: var(--yellow-bg); border-radius: var(--radius-sm); padding: 11px 13px; margin-top: 14px; line-height: 1.55; }
.trm-gap b { display: block; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; margin-bottom: 3px; }

/* ---------- Icon relationship map — the alias graph ----------
   Reuses the shared .tg- canvas. Only the two node shapes and the
   alias/collision vocabulary are icon-specific.
   ------------------------------------------------------------ */

.ig-icon {
  width: 208px; padding: 9px 11px 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.ig-icon:hover, .ig-icon:focus-visible { box-shadow: var(--shadow-md); border-color: var(--fusion-gradient-start); }
.ig-icon.sel { border-color: var(--fusion-gradient-start); box-shadow: 0 0 0 3px rgba(255,172,1,.18), var(--shadow-md); }
.ig-icon.dep { border-style: dashed; }
.ig-icon-top { display: flex; align-items: center; gap: 9px; }
.ig-icon-id { min-width: 0; }
.ig-icon-id b { display: block; font-size: 12px; font-weight: 600; letter-spacing: -.1px; overflow-wrap: break-word; }
.ig-icon-sub { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.ig-icon-meta { display: block; font-size: 9.5px; color: var(--muted); margin-top: 6px; }

.ig-art { width: 26px; height: 26px; flex: none; border-radius: 6px; background: var(--surface-soft); padding: 4px; }
.ig-art-sm { width: 18px; height: 18px; flex: none; border-radius: 4px; background: var(--surface-soft); padding: 2px; vertical-align: -4px; margin-right: 6px; }
.ig-art-lg { width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--surface-soft); padding: 5px; }
.ig-art-missing { display: inline-block; border: 1px dashed var(--line-strong); }

.ig-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.ig-b { font-size: 8.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; padding: 2px 6px; }
.ig-b-lib { color: #2c62a8; background: var(--blue-bg); }
.ig-b-dep { color: #b03a2e; background: var(--red-bg); }
.ig-b-theme { color: #1c7a52; background: var(--green-bg); }
.ig-b-sig { color: #1c7a52; background: var(--green-bg); }
.ig-b-null { color: var(--sub); background: var(--line); }

.ig-alias {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--indigo); border-radius: 999px; padding: 6px 12px;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.ig-alias:hover, .ig-alias:focus-visible { box-shadow: var(--shadow-md); background: var(--indigo-bg); }
.ig-alias.sel { box-shadow: 0 0 0 3px rgba(119,122,253,.25), var(--shadow-md); background: var(--indigo-bg); }
.ig-alias.collide { border-color: var(--red); }
.ig-alias.collide:hover { background: var(--red-bg); }
.ig-alias-glyph { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--indigo); flex: none; }
.ig-alias.collide .ig-alias-glyph { border-color: var(--red); }
.ig-alias-name { overflow: hidden; text-overflow: ellipsis; }
.ig-alias-n { font-size: 9px; font-weight: 700; color: #b03a2e; background: var(--red-bg); border-radius: 999px; padding: 1px 6px; flex: none; }

.tg-wire.warn { stroke: var(--red); stroke-dasharray: 4 4; }
.isolating .tg-wire.warn.lit { stroke: var(--red); }
.tg-lg-wire.warn { border-top-color: var(--red); border-top-style: dashed; }
.tg-lg-comp.ig-lg-alias { border-color: var(--indigo); }
.tg-tier[data-tier="icon"] { color: #2c62a8; background: var(--blue-bg); }
.tg-tier[data-tier="alias"] { color: #3f42c9; background: var(--indigo-bg); }
.tg-tier[data-tier="collide"] { color: #b03a2e; background: var(--red-bg); }
.tg-tier[data-tier="dep"] { color: #b03a2e; background: var(--red-bg); }

.ig-chip-alias { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; }
.ig-chip-alias.collide { border-color: var(--red); color: #b03a2e; }
.ig-chip-warn { font-size: 8.5px; font-weight: 700; color: #b03a2e; background: var(--red-bg); border-radius: 999px; padding: 1px 5px; margin-left: 4px; }
.ig-chip-lib { color: #2c62a8; background: var(--blue-bg); border-color: transparent; }

.ig-answers { display: flex; flex-direction: column; gap: 4px; }
.ig-answer { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 5px 8px; }
.ig-answer:hover { border-color: var(--fusion-gradient-start); color: var(--fusion-gradient-end); }
.ig-answer span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ig-answer em { font-style: normal; flex: none; }

.ig-none { font-size: 11.5px; color: var(--muted); }
.ig-note { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 7px; }
.ig-warn-note { font-size: 11px; color: #b03a2e; background: var(--red-bg); border-radius: var(--radius-xs); padding: 9px 11px; margin-top: 10px; line-height: 1.5; }
.ig-warn-note code { font-size: 10px; color: inherit; overflow-wrap: anywhere; }
.ig-conv { margin-top: 16px; }
.ig-conv-rows { margin-top: 4px; }
.trm-ev-missing { color: #b03a2e; background: var(--red-bg); }

/* ---------- Icon map: view switcher + atlas ---------- */

.im-views { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; }
.im-view { font: 600 12px var(--font-primary); color: var(--sub); background: transparent; border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer; }
.im-view:hover { color: var(--ink); }
.im-view.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
/* Assets page top bar: the three views sit in the bar itself, with "Add an
   icon" and the catalogue's surface switch beside them. */
.topbar .asset-views { margin: 0 0 0 auto; flex: none; }
.asset-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.asset-btn { height: 36px; padding: 0 14px; border-radius: 10px; font: 500 13px var(--font-primary); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.asset-btn:hover { border-color: var(--ink); }
.asset-btn svg { width: 14px; height: 14px; }
.asset-surf { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.asset-surf .chip { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); background: linear-gradient(90deg, #FAFBFC 50%, #1F2126 50%); display: block; }
.asset-surf.d .chip { background: linear-gradient(90deg, #1F2126 50%, #FAFBFC 50%); }
.asset-surf:hover { border-color: var(--ink); }
.asset-surf:disabled { opacity: .35; cursor: default; }
.asset-surf:disabled:hover { border-color: var(--line-strong); }
@media (max-width: 760px) { .topbar .asset-views { order: 3; width: 100%; margin: 0; justify-content: center; } .topbar { flex-wrap: wrap; } }

/* The atlas: one transformed world, virtualised children. */
.ia-wrap { height: calc(100vh - 300px); min-height: 540px; }
.ia-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.ia-regions, .ia-items { position: absolute; top: 0; left: 0; }
.ia-links { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.ia-link { stroke: var(--fusion-gradient-end); stroke-width: 1.6; opacity: .65; }

.ia-region { position: absolute; border: 1px dashed var(--line-strong); border-radius: 14px; background: rgba(246,247,249,.55); }
.ia-region-label { position: absolute; top: -9px; left: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--sub); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ia-region-label i { font-style: normal; font-weight: 600; color: var(--muted); }

.ia-item {
  position: absolute; top: 0; left: 0; width: 34px; height: 34px; padding: 5px;
  display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px;
  background: var(--surface); cursor: pointer; will-change: transform;
}
.ia-item:hover { border-color: var(--fusion-gradient-start); box-shadow: var(--shadow-sm); z-index: 2; }
.ia-item.sel { border-color: var(--fusion-gradient-end); box-shadow: 0 0 0 3px rgba(255,98,40,.2); z-index: 3; }
.ia-item.dep { opacity: .5; }
.ia-item img { width: 22px; height: 22px; display: block; }
.ia-noart { width: 14px; height: 14px; border: 1px dashed var(--line-strong); border-radius: 3px; }
.ia-label { display: none; position: absolute; top: 34px; left: 50%; transform: translateX(-50%); max-width: 90px; font-size: 8px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }

/* level of detail — the whole point of 2,265 nodes staying smooth */
.lod-label .ia-label { display: block; }
.lod-dot .ia-item { width: 13px; height: 13px; padding: 0; border-radius: 4px; background: var(--c, var(--line-strong)); border-color: transparent; }
.lod-dot .ia-item img, .lod-dot .ia-noart { display: none; }
.lod-dot .ia-item.sel { background: var(--fusion-gradient-end); box-shadow: 0 0 0 4px rgba(255,98,40,.35); }
.lod-dot .ia-item:hover { box-shadow: 0 0 0 3px rgba(20,23,28,.18); }

.ia-legend { font-size: 10.5px; }
.ia-legend b { color: var(--ink); }
.ia-legend-hint { color: var(--muted); }

.ia-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; min-height: 40px; }
.ia-head-icon { display: flex; align-items: center; gap: 10px; }
.ia-head-icon b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.ia-head-icon small { display: block; font-size: 11.5px; color: var(--muted); }
.ia-head-near { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ia-head-near > span { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.ia-near { cursor: pointer; font-size: 11px; }
.ia-near:hover { border-color: var(--fusion-gradient-start); color: var(--fusion-gradient-end); }

.ig-chip-tag { font-size: 10.5px; color: var(--sub); background: var(--surface-soft); border-color: transparent; }

/* Agents page — skills that run only in Claude Code */
.local-skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.local-skills li { font-size: 13.5px; color: var(--sub); line-height: 1.5; }
.local-skills li strong { color: var(--ink); font-weight: 600; }
.local-skills code { font-size: 11.5px; }

/* show_copy — the copy options the chat wrote */
.copy-card .copy-opt { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; padding: 10px 2px; border-top: 1px solid var(--line); }
.copy-card .copy-opt:first-child { border-top: 0; padding-top: 2px; }
.copy-card .copy-text { font-size: 15px; line-height: 1.45; color: var(--ink); }
.copy-card .copy-note { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.copy-card .reg-facts { grid-column: 1; }
.copy-card .copy-btn { grid-column: 2; grid-row: 1; font-size: 12.5px; padding: 4px 10px; }

/* Getting started — the main things, as illustrated cards */
.found-cards.gs-main { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .found-cards.gs-main { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .found-cards.gs-main { grid-template-columns: 1fr; } }
.gs-main .found-card-body h3 { font-size: 15px; }

/* search_icons folds its full list once recommend_icon names the pick */
details.ic-all > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; list-style: none; }
details.ic-all > summary::-webkit-details-marker { display: none; }
details.ic-all > summary::before { content: "▸ "; }
details.ic-all[open] > summary::before { content: "▾ "; }
.ic-row.ic-pick { border-color: var(--fusion-gradient-start); }
.ic-tag.ic-rec { background: var(--fusion-gradient); color: #241000; font-weight: 600; }
details.ic-alts { margin-top: 6px; }
details.ic-alts .incard { box-shadow: none; border: 0; padding: 0; margin-top: 6px; }
/* Icon rows wrap instead of scrolling sideways on narrow screens */
.ic-list .ic-row { flex-wrap: wrap; gap: 6px 10px; }
.ic-list .ic-row .meta { flex-wrap: wrap; justify-content: flex-end; }
