/* ============================================================
   keel — design tokens, theming, base chrome
   Direction C — "build log": a modern CI / IDE language.
     teal   → the FIXED backbone (Layer 1) + brand
     amber  → EXTENSION slots, your Lego (Layer 3)   [var name: --brass*]
     green  → merged / pass / success
   Type: Geist (display+body) · JetBrains Mono (code/labels)
   Theme:  data-theme = dark (default) | light
   Motion: data-motion = balanced (default) | max
   ============================================================ */

:root {
  --bg:           #090b13;
  --bg-grad-a:    #0b0e19;
  --bg-grad-b:    #090b13;
  --surface:      #10131d;
  --surface-2:    #151926;
  --surface-3:    #1c2233;
  --border:       #252c3f;
  --border-soft:  #181e2d;
  --text:         #e7eaf6;
  --muted:        #8e97ad;
  --faint:        #7c859c;

  --accent:       #6366f1;
  --accent-2:     #818cf8;
  --accent-3:     #a5b4fc;
  --accent-soft:  rgba(99,102,241,0.14);
  --accent-line:  rgba(99,102,241,0.42);

  --brass:        #f5a524;
  --brass-2:      #ffb84d;
  --brass-soft:   rgba(245,165,36,0.15);
  --brass-line:   rgba(245,165,36,0.42);

  --block:        #ef6a5f;
  --block-2:      #ff9286;
  --block-soft:   rgba(239,106,95,0.14);
  --block-line:   rgba(239,106,95,0.42);

  --green:        #10b981;
  --green-2:      #34d399;
  --amber:        #f5a524;
  --red:          #f87171;

  --shadow-lg:   0 30px 80px -22px rgba(0,0,0,0.78);
  --shadow-md:   0 16px 42px -16px rgba(0,0,0,0.66);
  --shadow-glow: 0 0 0 1px rgba(99,102,241,0.28), 0 22px 60px -22px rgba(99,102,241,0.5);
  --shadow-brass: 0 0 0 1px var(--brass-line), 0 18px 50px -20px rgba(245,165,36,0.45);

  --font-display: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1140px;
  --radius: 14px;
  --radius-sm: 10px;
}

:root[data-theme="light"] {
  --bg:           #eef0fa;
  --bg-grad-a:    #e8ebf8;
  --bg-grad-b:    #f1f3fb;
  --surface:      #ffffff;
  --surface-2:    #f3f5fc;
  --surface-3:    #e9ecf8;
  --border:       #d9def0;
  --border-soft:  #e7eaf6;
  --text:         #0e1220;
  --muted:        #4a5268;
  --faint:        #586076;

  --accent:       #4338ca;
  --accent-2:     #3730a3;
  --accent-3:     #312e81;
  --accent-soft:  rgba(67,56,202,0.09);
  --accent-line:  rgba(67,56,202,0.32);

  --brass:        #b45309;
  --brass-2:      #92400e;
  --brass-soft:   rgba(180,83,9,0.10);
  --brass-line:   rgba(180,83,9,0.34);

  --block:        #b13a2e;
  --block-2:      #8f2c22;
  --block-soft:   rgba(177,58,46,0.10);
  --block-line:   rgba(177,58,46,0.36);

  --green:        #047857;
  --green-2:      #065f46;
  --amber:        #b45309;
  --red:          #dc2626;

  --shadow-lg:   0 30px 70px -26px rgba(20,40,60,0.26);
  --shadow-md:   0 16px 38px -16px rgba(20,40,60,0.18);
  --shadow-glow: 0 0 0 1px rgba(67,56,202,0.20), 0 20px 52px -20px rgba(67,56,202,0.30);
  --shadow-brass: 0 0 0 1px var(--brass-line), 0 18px 48px -22px rgba(180,83,9,0.4);
}

/* ---- Base ------------------------------------------------------------ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  padding-top: 64px;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-3); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; font-weight: 600; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin: 0 0 0.5rem; }
h3 { font-size: 1.12rem; margin: 0 0 0.4rem; }
p { color: var(--muted); overflow-wrap: anywhere; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; word-break: break-word; }
pre code { overflow-wrap: normal; word-break: normal; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; box-sizing: border-box; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }
.brass-t { color: var(--brass-2); }
.accent-t { color: var(--accent-2); }
.green-t { color: var(--green-2); }

/* decorative background — single-hue depth */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(48rem 34rem at 88% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 58%),
    radial-gradient(40rem 30rem at 0% 104%, color-mix(in srgb, var(--green) 10%, transparent), transparent 60%),
    linear-gradient(160deg, var(--bg-grad-a), var(--bg) 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center;
  -webkit-mask-image: radial-gradient(120% 86% at 50% -8%, #000, transparent 72%);
  mask-image: radial-gradient(120% 86% at 50% -8%, #000, transparent 72%);
}
:root[data-theme="light"] body::after { opacity: .8; }
/* max motion: slowly drift the signal grid */
:root[data-motion="max"] body::after { animation: hull-drift 40s linear infinite; }
@keyframes hull-drift { to { background-position: 48px 48px; } }
@media (prefers-reduced-motion: reduce) { :root[data-motion="max"] body::after { animation: none; } }

/* ============================================================
   MAXIMUM motion — ambient life, off in Balanced.
   Everything here is gated on prefers-reduced-motion.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  /* breathing glow behind the hero terminal */
  :root[data-motion="max"] .ht { animation: m-cardglow 6.5s ease-in-out infinite; }
  @keyframes m-cardglow { 0%,100% { box-shadow: var(--shadow-lg); } 50% { box-shadow: var(--shadow-lg), 0 0 64px -12px color-mix(in srgb, var(--accent) 38%, transparent); } }
  /* drifting gradient on the hero wordmark */
  :root[data-motion="max"] .hero h1 .grad { background-size: 220% auto; animation: m-grad 6s linear infinite; }
  @keyframes m-grad { to { background-position: 220% center; } }
  /* the anchor bobs like it's afloat */
  :root[data-motion="max"] .hero h1 .anchor { display: inline-block; animation: m-bob 3.4s ease-in-out infinite; }
  @keyframes m-bob { 50% { transform: translateY(-7px) rotate(-5deg); } }
  /* section kickers get a slow shimmer */
  :root[data-motion="max"] .sec-kicker { background: linear-gradient(90deg, var(--accent-2), var(--brass-2), var(--accent-2)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: m-grad 7s linear infinite; }
  :root[data-motion="max"] .sec-kicker.brass { background: linear-gradient(90deg, var(--brass-2), var(--accent-2), var(--brass-2)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; }
  /* dogfood band: drifting aurora */
  :root[data-motion="max"] .reveal-band::before { content: ""; position: absolute; inset: -40%; z-index: 0; pointer-events: none; background: radial-gradient(40% 40% at 30% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), radial-gradient(40% 40% at 70% 60%, color-mix(in srgb, var(--brass) 12%, transparent), transparent 70%); animation: m-aurora 14s ease-in-out infinite; }
  :root[data-motion="max"] .reveal-band > * { position: relative; z-index: 1; }
  @keyframes m-aurora { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(4%, -3%) rotate(6deg); } }
  /* brand mark gently rocks */
  :root[data-motion="max"] .brand img { animation: m-rock 5s ease-in-out infinite; transform-origin: 50% 70%; }
  @keyframes m-rock { 25% { transform: rotate(5deg); } 75% { transform: rotate(-5deg); } }
}


/* ---- Reveal on scroll ----------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1 !important; transform: none !important; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Nav ------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, transform .35s cubic-bezier(.2,.7,.2,1);
}
.nav.nav-hidden { transform: translateY(-100%); }
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.14rem; color: var(--text); }
.brand-link { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); white-space: nowrap; }
.brand-link:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; display: block; }
.brand .ver {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700; transform: translateY(-1px);
  padding: .12rem .5rem; border-radius: 999px;
  color: var(--brass-2); border: 1px solid var(--brass-line); background: var(--brass-soft);
}
.brand .ver:hover { filter: brightness(1.1); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; white-space: nowrap; }
.nav-link { color: var(--muted); font-size: .93rem; font-weight: 500; position: relative; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 2px; background: var(--accent-2); border-radius: 2px; transition: right .25s ease; }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { right: 0; }
.nav-link.active { color: var(--text); }
@media (max-width: 860px) { .nav-link.hide-sm { display: none; } }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; padding: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s, border-color .2s, color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent-line); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

/* mobile light/dark FAB — the titlebar toggle is reflowed off-screen <= 760px,
   so a fixed, always-reachable toggle takes over there. Hidden on desktop. */
.theme-fab { display: none; }
@media (max-width: 760px) {
  /* on mobile the titlebar reflows the toggle off-screen — the FAB takes over,
     so hide the titlebar toggle there to avoid two controls. */
  #theme-toggle { display: none; }
  .theme-fab {
    display: inline-flex; position: fixed; right: 14px; bottom: 14px; z-index: 60;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .theme-fab svg { width: 20px; height: 20px; }
}

/* hamburger + mobile menu */
.nav-burger { display: none; }
.nav-burger .ic-close { display: none; }
.nav-burger.open .ic-open { display: none; }
.nav-burger.open .ic-close { display: block; }
.nav-mobile {
  display: none; flex-direction: column; gap: .1rem;
  padding: .5rem .9rem 1rem; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.nav-mobile.open { display: flex; }
.nav-mlink { padding: .8rem .4rem; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; border-bottom: 1px solid var(--border-soft); }
.nav-mlink:last-child { border-bottom: none; }
.nav-mlink:hover { color: var(--accent-2); }
@media (max-width: 860px) { .nav-burger { display: inline-flex; } }
@media (min-width: 861px) { .nav-mobile { display: none !important; } }

/* ---- Display popover (theme · motion · type) ------------------------ */
.disp { position: relative; }
.disp-pop {
  position: absolute; right: 0; top: calc(100% + 10px); width: 250px; z-index: 70;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: .9rem; opacity: 0; transform: translateY(-6px) scale(.98);
  pointer-events: none; transition: opacity .18s, transform .18s;
}
.disp-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.disp-row { margin-bottom: .85rem; }
.disp-row:last-child { margin-bottom: 0; }
.disp-lab { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 .4rem; display: flex; align-items: center; justify-content: space-between; }
.seg { display: flex; gap: .25rem; padding: .22rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.seg button {
  flex: 1; font-family: var(--font-display); font-weight: 600; font-size: .76rem; color: var(--muted);
  background: transparent; border: 0; padding: .38rem .3rem; border-radius: 7px; cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.22); }
:root[data-theme="light"] .seg button.on { box-shadow: 0 1px 3px rgba(31,58,96,.12); }
.seg button .sw { font-size: .64rem; color: var(--faint); font-family: var(--font-mono); font-weight: 500; }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: 11px; font-weight: 600; font-size: .96rem;
  border: 1px solid var(--border); color: var(--text); cursor: pointer; font-family: var(--font-body);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent-line); color: var(--text); }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: #021018; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { box-shadow: 0 16px 40px -10px color-mix(in srgb, var(--accent) 85%, transparent); color: #021018; }
:root[data-theme="light"] .btn.primary { color: #fff; }
:root[data-theme="light"] .btn.primary:hover { color: #fff; }
.btn.ghost { background: var(--surface-2); }
.btn svg { width: 17px; height: 17px; }

/* ---- Footer ---------------------------------------------------------- */
footer { border-top: 1px solid var(--border); padding: 2.6rem 0; color: var(--faint); margin-top: 2rem; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; color: var(--text); }
.foot-brand img { width: 26px; height: 26px; }
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: .9rem; }
.foot-base { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; flex-wrap: wrap; margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--border-soft); }
.foot-base span { font-size: .82rem; color: var(--faint); }

/* shared section scaffolding */
section { padding: clamp(3rem, 7vw, 5rem) 0; }
section[id], [id="top"] { scroll-margin-top: 84px; }
.sec-head { max-width: 64ch; margin-bottom: 2rem; }
.sec-head.wide { max-width: 90ch; }
.sec-kicker { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; color: var(--accent-2); text-transform: uppercase; margin: 0 0 .6rem; font-weight: 500; }
.sec-kicker.brass { color: var(--brass-2); }
.sec-head p { font-size: 1.06rem; }
.sec-head.wide p { font-size: 1.12rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Accessibility --------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* ---- Swarm Simulator ------------------------------------------------- */
.swarm-sandbox { margin: 2rem 0; width: 100%; }
.sim-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; box-shadow: var(--shadow-md); }
.sim-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sim-presets { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.sim-label { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.sim-pills { display: flex; gap: .4rem; flex-wrap: wrap; }
.sim-pill { background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text); padding: .35rem .75rem; border-radius: 6px; font-size: .84rem; cursor: pointer; transition: all .15s ease; font-family: var(--font-display); }
.sim-pill:hover { border-color: var(--accent-2); }
.sim-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
.sim-controls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sim-btn { padding: .4rem .9rem; border-radius: 6px; font-size: .85rem; font-family: var(--font-mono); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .15s ease; }
.sim-btn-primary { background: var(--green); color: #021018; }
.sim-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.sim-btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.sim-btn-secondary:hover { border-color: var(--muted); }
.sim-speed-box { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); font-family: var(--font-mono); margin-left: .4rem; }
.sim-speed-btn { background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text); padding: .2rem .45rem; border-radius: 4px; font-size: .75rem; cursor: pointer; }
.sim-speed-btn.active { border-color: var(--accent-2); color: var(--accent-2); font-weight: 600; }
.sim-desc { font-size: .92rem; color: var(--muted); margin: 0 0 1.2rem; }
.sim-metrics-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1.5rem; }
.sim-metric { display: flex; flex-direction: column; gap: .2rem; }
.sim-metric .m-val { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--text); }
.sim-metric .m-lbl { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sim-metric.green .m-val { color: var(--green); }
.lock-active { color: var(--brass-2) !important; animation: pulseLock 1.5s infinite; }
.lock-idle { color: var(--green); }
@keyframes pulseLock { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.sim-dag-layout { display: flex; align-items: stretch; gap: 1.2rem; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: .5rem; }
.sim-wave-col { flex: 1; min-width: 280px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.sim-wave-title { font-size: .88rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--border-soft); padding-bottom: .6rem; }
.wave-badge { background: var(--accent-soft); color: var(--accent-2); font-family: var(--font-mono); font-size: .72rem; padding: .15rem .45rem; border-radius: 4px; border: 1px solid var(--accent-line); font-weight: 700; }
.sim-cluster-list { display: flex; flex-direction: column; gap: .75rem; }
.sim-dag-arrow { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--faint); padding: 0 .2rem; }

.sim-issue-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: .85rem; display: flex; flex-direction: column; gap: .45rem; transition: all .2s ease; }
.sim-issue-card.st-running { border-color: var(--accent-2); box-shadow: 0 0 12px -2px rgba(99,102,241,0.25); }
.sim-issue-card.st-jury { border-color: var(--brass-2); box-shadow: 0 0 12px -2px rgba(245,165,36,0.25); }
.sim-issue-card.st-merged { border-color: var(--green); background: rgba(16,185,129,0.04); }
.sim-issue-card.st-blocked { opacity: .65; }

.issue-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; font-weight: 600; }
.issue-id { font-family: var(--font-mono); color: var(--accent-3); }
.issue-title { flex: 1; margin: 0 .3rem; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.vendor-tag { font-family: var(--font-mono); font-size: .7rem; padding: .1rem .4rem; border-radius: 4px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }
.tag-google { color: #818cf8; border-color: rgba(99,102,241,0.4); }
.tag-anthropic { color: #f5a524; border-color: rgba(245,165,36,0.4); }
.tag-openai { color: #34d399; border-color: rgba(16,185,129,0.4); }
.tag-deepseek { color: #60a5fa; border-color: rgba(96,165,250,0.4); }

.issue-files { font-family: var(--font-mono); font-size: .73rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-progress-bg { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin: .2rem 0; }
.issue-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width .3s ease; }
.issue-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.issue-status-pill { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; padding: .1rem .4rem; border-radius: 4px; }
.issue-status-pill.st-queued { background: var(--surface-3); color: var(--muted); }
.issue-status-pill.st-blocked { background: var(--surface-3); color: var(--faint); }
.issue-status-pill.st-running { background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--accent-line); }
.issue-status-pill.st-jury { background: var(--brass-soft); color: var(--brass-2); border: 1px solid var(--brass-line); }
.issue-status-pill.st-landing { background: var(--brass-soft); color: var(--brass-2); }
.issue-status-pill.st-merged { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }

.jury-badges { display: flex; gap: .25rem; }
.j-badge { font-family: var(--font-mono); font-size: .65rem; padding: .08rem .3rem; border-radius: 3px; background: var(--surface-3); color: var(--faint); }
.j-badge.ok { background: rgba(16,185,129,0.18); color: var(--green); font-weight: 600; }

.issue-log { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sim-footer { border-top: 1px solid var(--border-soft); padding-top: 1rem; }
.sim-cli-cta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 6px; padding: .6rem .8rem; }
.cta-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.sim-cli-cta code { font-family: var(--font-mono); font-size: .78rem; color: var(--accent-2); flex: 1; word-break: break-all; }
.sim-copy-btn { background: var(--surface-3); border: 1px solid var(--border); color: var(--text); padding: .25rem .6rem; border-radius: 4px; font-size: .76rem; font-family: var(--font-mono); cursor: pointer; }
.sim-copy-btn:hover { border-color: var(--accent-2); }

/* --- Integrations & Ecosystem Catalog --- */
.integ-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.integ-pills { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.integ-pill { background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--muted); padding: .4rem .85rem; border-radius: 20px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s ease; display: inline-flex; align-items: center; gap: .4rem; }
.integ-pill:hover { color: var(--text); border-color: var(--border); background: var(--surface-3); }
.integ-pill.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.integ-count-badge { font-family: var(--font-mono); font-size: .7rem; padding: .1rem .4rem; border-radius: 10px; background: rgba(0,0,0,0.12); }
.integ-pill.active .integ-count-badge { background: rgba(255,255,255,0.25); }

.integ-search-wrap { flex: 1; min-width: 240px; max-width: 360px; }
.integ-search { width: 100%; background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text); padding: .45rem .85rem; border-radius: 6px; font-size: .84rem; outline: none; transition: border-color .15s ease; }
.integ-search:focus { border-color: var(--accent-2); }

.integ-status-bar { font-size: .8rem; color: var(--muted); margin-bottom: 1.2rem; }

.integ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.integ-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.integ-card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 4px 16px -4px rgba(0,0,0,0.08); }

.integ-card-top { display: flex; align-items: center; gap: .75rem; }
.integ-avatar { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--border-soft); flex-shrink: 0; overflow: hidden; }
.integ-icon-img { width: 22px; height: 22px; object-fit: contain; display: block; }
.integ-avatar.tag-assistants { color: #818cf8; background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.25); }
.integ-avatar.tag-backends { color: #34d399; background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); }
.integ-avatar.tag-skills { color: #f5a524; background: rgba(245,165,36,0.08); border-color: rgba(245,165,36,0.25); }
.integ-avatar.tag-platforms { color: #60a5fa; background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.25); }

.integ-meta { display: flex; flex-direction: column; gap: .1rem; }
.integ-name { font-size: .92rem; font-weight: 600; color: var(--text); }
.integ-badge { font-size: .72rem; color: var(--muted); font-family: var(--font-mono); }

.integ-desc { font-size: .82rem; color: var(--muted); line-height: 1.45; margin: 0; flex: 1; }

.integ-cmd-box { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 6px; padding: .4rem .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.integ-cmd-box code { font-family: var(--font-mono); font-size: .72rem; color: var(--accent-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.integ-copy-btn { background: var(--surface-3); border: 1px solid var(--border); color: var(--text); padding: .2rem .5rem; border-radius: 4px; font-size: .7rem; font-family: var(--font-mono); cursor: pointer; flex-shrink: 0; }
.integ-copy-btn:hover { border-color: var(--accent-2); }
.integ-empty { grid-column: 1 / -1; padding: 2.5rem; text-align: center; color: var(--muted); font-size: .9rem; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; }


