/* AI Studio — dark "Liquid Glass" theme.
   Glass = translucent tint over a blurred, saturated backdrop + a specular rim (::before) + a soft
   highlight that follows the pointer (::after, moved by glass.js). As in Apple's system, glass is
   reserved for the floating control layer (sidebar, top capsule, composer, team panel, drawer);
   chat content stays on flat translucent cards. Lime marks only the brand, the main action, focus
   and live work, so "running" stays recognisable. */

:root {
  color-scheme: dark;
  --bg: #050607;
  --ink: rgba(246, 250, 245, .95);
  --ink-2: rgba(226, 236, 230, .76);
  --ink-3: rgba(226, 236, 230, .68);
  --line: rgba(255, 255, 255, .09);
  --lime: #c8ff3d;
  --teal: #47e8cb;
  --amber: #ffc861;
  --red: #ff7a8e;
  --blur: 24px;
  --sat: 175%;
  --shade: rgba(9, 12, 11, .46);
  --inner: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  --inner-edge: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .075);
  --tile: rgba(255, 255, 255, .06);
  --tile-edge: inset 0 0 0 1px rgba(255, 255, 255, .1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
/* The pointer highlight position: registered as non-inherited, so moving it restyles one element only */
@property --mx { syntax: "<length-percentage>"; inherits: false; initial-value: 16% }
@property --my { syntax: "<length-percentage>"; inherits: false; initial-value: -12% }
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility }
button, textarea, input, select { font: inherit }
button, a { -webkit-tap-highlight-color: transparent }
button { color: inherit; cursor: pointer }
button:disabled { cursor: default }
:is(button, a, select, input, summary):focus-visible { outline: 2px solid var(--lime); outline-offset: 3px }
[hidden] { display: none !important }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0 }
h1, h2, h3, p { margin: 0 }
::selection { background: rgba(200, 255, 61, .3); color: #fff }
svg.ico { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: middle; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }

/* ---------- Scene behind the glass (static: the studio stays open for hours) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 5% 3%, rgba(200, 255, 61, .38), rgba(200, 255, 61, .11) 40%, rgba(200, 255, 61, 0) 70%),
    radial-gradient(36vw 36vw at 101% 22%, rgba(47, 227, 195, .3), rgba(47, 227, 195, .08) 42%, rgba(47, 227, 195, 0) 70%),
    radial-gradient(50vw 40vw at 50% 108%, rgba(123, 97, 255, .42), rgba(123, 97, 255, .11) 42%, rgba(123, 97, 255, 0) 70%),
    radial-gradient(26vw 26vw at 86% 96%, rgba(200, 255, 61, .18), rgba(200, 255, 61, 0) 70%),
    radial-gradient(42vw 30vw at 40% 34%, rgba(47, 227, 195, .055), rgba(47, 227, 195, 0) 70%),
    radial-gradient(70vw 60vw at 12% 8%, #0d1a0b, rgba(13, 26, 11, 0) 62%),
    radial-gradient(64vw 64vw at 92% 86%, #0b1220, rgba(11, 18, 32, 0) 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Glass material ---------- */
.sidebar, .team, .topbar, .composer, .bubble, .hero-mark, .run-actions .plain-button, .auth-card { position: relative; isolation: isolate }
:is(.sidebar, .team, .topbar, .composer, dialog, .auth-card) {
  background: linear-gradient(180deg, rgba(255, 255, 255, .11) 0%, rgba(255, 255, 255, .045) 45%, rgba(255, 255, 255, .025) 100%), var(--shade);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, .36),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    0 2px 6px rgba(0, 0, 0, .22),
    0 24px 60px -24px rgba(0, 0, 0, .75);
}
/* Specular rim: brighter top-left and bottom-right, like the edge of thick glass */
:is(.sidebar, .team, .topbar, .composer, dialog, .bubble, .hero-mark, .run-actions .plain-button, .auth-card)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg,
    rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .12) 20%, rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, .12) 84%, rgba(255, 255, 255, .3) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* Soft highlight; glass.js moves it after the pointer */
:is(.sidebar, .team, .topbar, .composer, dialog, .auth-card)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(var(--glow, 320px) circle at var(--mx, 16%) var(--my, -12%), rgba(255, 255, 255, .11), rgba(255, 255, 255, 0) 70%);
}

/* ---------- Layout: floating panels ---------- */
.shell {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr) clamp(20rem, 27vw, 25.5rem);
  grid-template-rows: 3.4rem minmax(0, 1fr);
  grid-template-areas: "side top team" "side main team";
  gap: .75rem;
  padding: .75rem;
  height: 100dvh;
  min-height: 35rem;
}

/* ---------- Sidebar ---------- */
.sidebar { grid-area: side; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: 28px; z-index: 2; --blur: 30px; --shade: rgba(9, 12, 11, .5) }
.brand { display: flex; align-items: center; gap: .7rem; height: 4.6rem; min-height: 4.6rem; padding: 0 1.25rem; font-size: 1.08rem; font-weight: 800; letter-spacing: -.005em; text-transform: uppercase }
.brand-glyph { display: inline-block; position: relative; width: 1.95rem; height: 1.95rem; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(200, 255, 61, .35)) }
.brand-glyph i { position: absolute; width: 68%; height: 34%; left: 13%; top: 23%; border-radius: 30% 42% 30% 42%; transform: rotate(-28deg) skewX(18deg); background: linear-gradient(180deg, #f6ffd8, #dcff8a) }
.brand-glyph i + i { box-shadow: 0 -1px 2.5px rgba(0, 0, 0, .5) }
.brand-glyph i:nth-child(2) { top: 39%; left: 22%; background: linear-gradient(180deg, #d4ff5c, #aeee22) }
.brand-glyph i:nth-child(3) { top: 55%; left: 31%; background: linear-gradient(180deg, #86d412, #4f9a06) }
.brand .close-nav, #open-nav, .scrim { display: none }
/* Scrolling lists fade out at their edges instead of being cut */
.side-scroll {
  flex: 1;
  overflow-y: auto;
  padding: .6rem .7rem 1rem;
  scroll-padding-block: .7rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 .6rem, #000 calc(100% - 1rem), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 .6rem, #000 calc(100% - 1rem), transparent);
}
.side-label, .team-subhead, .drawer-body h3, .project-form legend { color: var(--ink-2); font: 600 .68rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase }
.side-label { margin: 0 .65rem .6rem }
:is(.side-label, .team-subhead, .drawer-body h3, .project-form legend)::before { content: "[ "; content: "[ " / "" }
:is(.side-label, .team-subhead, .drawer-body h3, .project-form legend)::after { content: " ]"; content: " ]" / "" }
.nav-row { display: flex; align-items: center; gap: .62rem; width: 100%; padding: .6rem .65rem; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); font-size: .9rem; line-height: 1.35; text-align: left; transition: background-color .2s, color .2s }
.nav-row:hover, .providers-trigger:hover { background-color: rgba(255, 255, 255, .06); color: var(--ink) }
.nav-row[aria-current="true"] { color: var(--ink); background: var(--inner); box-shadow: var(--inner-edge), inset 3px 0 0 var(--lime) }
.project-row { font-weight: 600; overflow-wrap: anywhere }
.project-row .nav-icon { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; flex-shrink: 0; border-radius: 10px; color: var(--ink-2); background: var(--tile); box-shadow: var(--tile-edge) }
.history { margin-top: 1.9rem }
.side-head { display: flex; align-items: center; justify-content: space-between; margin: 0 .25rem .5rem 0 }
.side-head .side-label { margin-bottom: 0 }
.side-add { width: 1.8rem; height: 1.8rem }
.history .nav-row { align-items: flex-start; padding: .58rem .62rem; margin-bottom: .12rem }
.history-dot { width: .5rem; height: .5rem; margin: .38rem .2rem; flex-shrink: 0; border-radius: 50%; background: rgba(226, 236, 230, .4) }
.history-dot.good { background: var(--teal) }
.history-dot.live { background: var(--lime); box-shadow: 0 0 8px rgba(200, 255, 61, .8) }
.history-dot.warn { background: var(--amber) }
.history-dot.bad { background: var(--red) }
.nav-row small { display: block; margin-top: .28rem; color: var(--ink-3); font-size: .74rem }
.history-name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere }
.side-empty { margin: .6rem .7rem; color: var(--ink-3); font-size: .86rem; line-height: 1.5 }
.provider-panel { padding: .95rem .7rem .6rem; border-top: 1px solid var(--line) }
.provider-panel .side-label { margin-bottom: .45rem }
.provider-list { display: grid; gap: .1rem; margin-bottom: .35rem }
.provider-chip { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .32rem .65rem; color: var(--ink); font-size: .85rem }
.provider-chip .history-dot { margin: 0 .1rem }
.provider-chip .provider-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.provider-chip small { margin-left: auto; color: var(--ink-3); font-size: .74rem; text-align: right; white-space: nowrap }
.providers-trigger { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .66rem .65rem; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); font-size: .85rem; text-align: left; transition: background-color .2s, color .2s }
.providers-trigger > :last-child { margin-left: auto; color: var(--ink-3) }

/* ---------- Top capsule ---------- */
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; padding: 0 .5rem 0 1.2rem; border-radius: 999px; --blur: 22px; --shade: rgba(9, 12, 11, .42) }
.crumb { display: flex; align-items: center; gap: .65rem; min-width: 0; font-size: .9rem; font-weight: 650 }
.crumb-root, .crumb-divider { color: var(--ink-2); font: 600 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap }
.crumb-divider { letter-spacing: 0 }
#crumb-project { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.connection { display: flex; align-items: center; flex-shrink: 0; gap: .5rem; padding: .5rem .8rem .5rem .7rem; border-radius: 999px; color: var(--ink-2); font: 600 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) }
.connection::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: rgba(226, 236, 230, .45) }
.connection[data-state="online"]::before { background: var(--teal); box-shadow: 0 0 0 3px rgba(71, 232, 203, .14) }
.connection[data-state="offline"]::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 200, 97, .14) }

/* ---------- Buttons ---------- */
.plain-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; color: var(--ink); background: var(--inner); box-shadow: var(--inner-edge); transition: background-color .2s, box-shadow .2s, transform .2s var(--ease) }
.plain-button { padding: .56rem .95rem .56rem .82rem; border-radius: 999px; font: 650 .72rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase }
.icon-button { width: 2.2rem; height: 2.2rem; flex-shrink: 0; border-radius: 50% }
.plain-button:hover:not(:disabled), .icon-button:hover { background-color: rgba(255, 255, 255, .08) }
.plain-button:active:not(:disabled), .icon-button:active { transform: scale(.96) }
.plain-button:disabled { opacity: .5 }
.run-actions .plain-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)), rgba(9, 12, 11, .3);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 1px .5px rgba(255, 255, 255, .4), 0 6px 18px -8px rgba(0, 0, 0, .6);
}
/* Main action: lime tinted glass. #submit in the list gives these rules id specificity, so
   overrides further down (forced colours) keep #submit in their selector too. */
:is(#submit, .primary-button, .run-actions [data-action="accept"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .62rem 1rem .62rem 1.1rem;
  border: 0;
  border-radius: 999px;
  color: #0b1102;
  font: 700 .72rem/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #e2ff84 0%, #c8ff3d 52%, #aaee22 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, .85),
    inset 0 -3px 8px rgba(60, 100, 0, .3),
    0 0 0 1px rgba(200, 255, 61, .4),
    0 10px 26px -10px rgba(200, 255, 61, .6);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
:is(#submit, .primary-button, .run-actions [data-action="accept"]):hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, .9),
    inset 0 -3px 8px rgba(60, 100, 0, .28),
    0 0 0 1px rgba(200, 255, 61, .55),
    0 14px 34px -12px rgba(200, 255, 61, .75);
}
:is(#submit, .primary-button, .run-actions [data-action="accept"]):active:not(:disabled) { transform: scale(.97) }
:is(#submit, .primary-button):disabled { color: var(--ink-3); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09) }
.run-actions [data-action="accept"]:disabled { opacity: .5 }
.text-link { padding: 0; border: 0; background: none; color: var(--lime); text-decoration: underline; text-decoration-color: rgba(200, 255, 61, .45); text-underline-offset: 2px }

/* ---------- Workspace and chat ---------- */
.workspace { grid-area: main; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0 }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; max-width: 60rem; margin-inline: auto; padding: .85rem clamp(.4rem, 1.6vw, 1.25rem) .2rem }
.chat-title { display: flex; align-items: center; gap: .75rem }
h1 { font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; text-transform: uppercase }
.heading-icon { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 13px; color: var(--ink-2); font-size: 1.15rem; background: var(--tile); box-shadow: var(--tile-edge) }
.run-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; max-width: 100%; min-width: 0 }
/* The chat scrolls beneath the floating composer: glass.js keeps --compose-h equal to its height,
   scroll-padding keeps keyboard focus out from under it, and the top edge fades out. */
.chat-scroll {
  flex: 1;
  min-height: 10rem;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding: 1.5rem 0 calc(var(--compose-h, 8.5rem) + 1.25rem);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1.25rem);
  mask-image: linear-gradient(to bottom, transparent, #000 1.25rem);
}
.chat-content { display: flex; flex-direction: column; gap: 1.35rem; max-width: 60rem; min-height: 100%; margin: 0 auto; padding: 1.25rem clamp(.4rem, 1.6vw, 1.25rem) calc(var(--compose-h, 8.5rem) + 1.25rem) }
.chat-content:has(.welcome) { justify-content: center; align-items: center }
.welcome { max-width: 32rem; padding: 2rem 0; text-align: center }
.welcome h2 { margin: 1.45rem 0 .75rem; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; text-transform: uppercase }
.welcome h2::before { content: "[ AI Studio ]"; content: "[ AI Studio ]" / ""; display: block; margin-bottom: .95rem; color: var(--lime); font: 600 .7rem/1 var(--mono); letter-spacing: .2em }
.welcome p, .muted { color: var(--ink-2); line-height: 1.55 }
.hero-mark {
  display: inline-grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 24px;
  transform: rotate(-6deg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)), rgba(10, 14, 12, .35);
  box-shadow: inset 0 1px .5px rgba(255, 255, 255, .55), 0 22px 44px -18px rgba(200, 255, 61, .4);
}
.hero-mark .brand-glyph { width: 2.6rem; height: 2.6rem; transform: rotate(6deg) }
.message { min-width: 0 }
.sender { display: flex; align-items: center; gap: .55rem; margin-bottom: .6rem; color: var(--ink-2); font-size: .85rem; font-weight: 650 }
.sender time { margin-left: .15rem; color: var(--ink-3); font: 500 .7rem/1 var(--mono); letter-spacing: .04em }
.avatar, .section-glyph { display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; flex-shrink: 0; border-radius: 10px; color: var(--ink-2); background: var(--tile); box-shadow: var(--tile-edge) }
.avatar.human { color: var(--ink) }
/* Content cards: flat translucent fill and a faint rim, no backdrop blur */
.bubble {
  padding: 1rem 1.15rem;
  border-radius: 8px 22px 22px 22px;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02)), rgba(10, 13, 12, .34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 12px 30px -18px rgba(0, 0, 0, .7);
}
.bubble::before { opacity: .45 }
.bubble.user-bubble { background: linear-gradient(180deg, rgba(200, 255, 61, .1), rgba(200, 255, 61, .03) 60%), rgba(12, 16, 8, .36) }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55 }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem .3rem .5rem; border-radius: 999px; color: var(--ink-2); font: 650 .7rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: normal; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09) }
.badge::before { content: ""; width: .4rem; height: .4rem; flex-shrink: 0; border-radius: 50%; background: currentColor }
.badge.good { color: #7ff0da; background: rgba(71, 232, 203, .11); box-shadow: inset 0 0 0 1px rgba(71, 232, 203, .26) }
.badge.live { color: var(--lime); background: rgba(200, 255, 61, .11); box-shadow: inset 0 0 0 1px rgba(200, 255, 61, .3) }
.badge.live::before { box-shadow: 0 0 8px rgba(200, 255, 61, .9) }
.badge.warn { color: #ffd68a; background: rgba(255, 200, 97, .11); box-shadow: inset 0 0 0 1px rgba(255, 200, 97, .28) }
.badge.bad { color: #ff9aaa; background: rgba(255, 122, 142, .12); box-shadow: inset 0 0 0 1px rgba(255, 122, 142, .3) }
.run-summary { margin-top: .75rem }
.plan-line { margin-top: .75rem; color: var(--ink-2); font-size: .9rem; line-height: 1.5 }
.meta-line { display: flex; align-items: flex-start; gap: .5rem; margin-top: .8rem; color: var(--ink-2); font-size: .85rem; line-height: 1.45 }
.meta-line .ico { margin-top: .12rem; color: var(--ink-3) }
.decision { margin-top: .9rem; padding: .62rem .85rem; border-radius: 14px; color: var(--ink-2); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) }
.decision.warn { color: #ffe3ad; background: rgba(255, 200, 97, .08); box-shadow: inset 0 0 0 1px rgba(255, 200, 97, .24) }
.decision.good { color: #bff7ea; background: rgba(71, 232, 203, .08); box-shadow: inset 0 0 0 1px rgba(71, 232, 203, .24) }
.welcome .decision { margin-top: 1.2rem; text-align: left }
.review-block { margin-top: .95rem; padding: .8rem .9rem; border-radius: 16px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) }
.review-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; font-size: .9rem }
.review-head .ico { color: var(--ink-3) }
.review-head strong { flex: 1 1 12rem; min-width: 0 }
.review-head .badge { margin-left: auto }
.review-block > .prose { color: var(--ink-2); font-size: .9rem }
.findings { display: grid; gap: .55rem; margin: .65rem 0 0; padding: 0; list-style: none }
.findings li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; font-size: .87rem; line-height: 1.45; overflow-wrap: anywhere }
.findings small { display: block; margin-top: .15rem; color: var(--ink-3); font-size: .83rem }
.severity { height: fit-content; padding: .2rem .5rem; border-radius: 999px; color: var(--ink-2); font: 650 .68rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; background: rgba(255, 255, 255, .07) }
.severity.critical { color: #ff9aaa; background: rgba(255, 122, 142, .14) }
.severity.major { color: #ffd68a; background: rgba(255, 200, 97, .13) }
.failure { margin-top: .8rem; padding: .7rem .9rem; border-radius: 14px; color: #ffc2cb; background: rgba(255, 122, 142, .09); box-shadow: inset 0 0 0 1px rgba(255, 122, 142, .3) }
.branch-info { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; color: var(--ink-3); font-size: .8rem; overflow-wrap: anywhere }
code, .meta-mono { font-family: var(--mono); font-size: .8rem }
code { padding: .08rem .38rem; border-radius: 6px; color: var(--ink); background: rgba(255, 255, 255, .07) }
.artifacts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .95rem }
.artifact-link { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem .5rem .72rem; border-radius: 999px; color: var(--ink); font-size: .85rem; font-weight: 600; text-decoration: none; background: var(--inner); box-shadow: var(--inner-edge); transition: background-color .2s }
.artifact-link .ico { color: var(--ink-2) }
.artifact-link:first-child { color: var(--lime); background: linear-gradient(180deg, rgba(200, 255, 61, .14), rgba(200, 255, 61, .05)); box-shadow: inset 0 1px 0 rgba(236, 255, 176, .24), inset 0 0 0 1px rgba(200, 255, 61, .3) }
.artifact-link:first-child .ico { color: var(--lime) }
.artifact-link:hover { background-color: rgba(255, 255, 255, .07) }
.log-book { margin-top: .95rem; padding-top: .55rem; border-top: 1px solid var(--line) }
.log-book summary { display: flex; align-items: center; gap: .55rem; width: fit-content; min-height: 2rem; margin-inline: -.25rem; padding-inline: .25rem; color: var(--ink-2); font: 600 .72rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; list-style: none }
.log-book summary::-webkit-details-marker { display: none }
.log-book summary::before { content: ""; width: .38rem; height: .38rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease) }
.log-book[open] summary::before { transform: rotate(45deg) }
.log-book summary:hover { color: var(--ink) }
.events { margin: .6rem 0 0; padding: 0; list-style: none }
.events li { position: relative; margin-left: .22rem; padding: .42rem 0 .46rem .95rem; border-left: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap }
.events li::before { content: ""; position: absolute; left: -.23rem; top: .85rem; width: .4rem; height: .4rem; border-radius: 50%; background: rgba(226, 236, 230, .45) }
/* While the run or agent is working, its newest event is the live one */
:is(.bubble:has(> .badge.live), .drawer-body:has(.badge.live)) .events li:last-child::before { background: var(--lime); box-shadow: 0 0 6px rgba(200, 255, 61, .6) }
.event-title { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .15rem; color: var(--ink-3); font: 500 .7rem/1.3 var(--mono); letter-spacing: .04em }

/* ---------- Composer: the one raised glass control over the chat ---------- */
.compose-area { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; max-width: 60rem; margin: 0 auto; padding: 0 clamp(.4rem, 1.6vw, 1.25rem); pointer-events: none }
.compose-area > * { pointer-events: auto }
.composer {
  container-type: inline-size;
  padding: .8rem .8rem .7rem 1rem;
  border-radius: 26px;
  --blur: 20px;
  --shade: rgba(24, 28, 27, .58);
  background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .075) 50%, rgba(255, 255, 255, .05)), var(--shade);
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, .5),
    0 0 0 1px rgba(0, 0, 0, .6),
    0 -14px 34px -14px rgba(0, 0, 0, .85),
    0 24px 60px -24px rgba(0, 0, 0, .75);
  transition: box-shadow .25s;
}
.composer:has(textarea:focus) {
  box-shadow:
    inset 0 1px .5px rgba(255, 255, 255, .5),
    0 0 0 1px rgba(200, 255, 61, .55),
    0 0 0 5px rgba(200, 255, 61, .1),
    0 -14px 34px -14px rgba(0, 0, 0, .85),
    0 24px 60px -24px rgba(0, 0, 0, .75);
}
.composer textarea { display: block; width: 100%; min-height: 3.1rem; max-height: 11rem; padding: .15rem .1rem; resize: vertical; border: 0; outline: none; color: var(--ink); background: transparent; line-height: 1.5 }
@supports (field-sizing: content) {
  .composer textarea { field-sizing: content; resize: none }
}
.composer textarea::placeholder { color: var(--ink-2) }
.compose-tools { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem }
.context-label { display: flex; align-items: center; gap: .45rem; min-width: 0; color: var(--ink-2); font-size: .8rem; font-weight: 600 }
.context-label .ico { color: var(--ink-3) }
.context-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.depth-picker { margin-left: auto; min-width: 0 }
.depth-picker select {
  -webkit-appearance: none;
  appearance: none;
  max-width: 12rem;
  padding: .5rem 2rem .5rem .85rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .8rem;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9c4bd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right .75rem center / .7rem no-repeat, var(--inner);
  box-shadow: var(--inner-edge);
}
.depth-picker select:hover { background-color: rgba(255, 255, 255, .06) }
.depth-picker option { color: var(--ink); background: #15191b }
#submit { flex-shrink: 0 }
/* A narrow composer puts the project on its own row and lets the select fill the rest */
@container (max-width: 32rem) {
  .compose-tools { flex-wrap: wrap }
  .context-label { flex-basis: 100% }
  .depth-picker { flex: 1; margin-left: 0 }
  .depth-picker select { width: 100%; max-width: none }
}
.request-error { margin-top: .6rem; color: #ff9aaa; font-size: .88rem }
.compose-area .request-error { padding: .55rem .9rem; border-radius: 14px; background: rgba(42, 10, 16, .8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 122, 142, .35) }

/* ---------- Team map ---------- */
.team { grid-area: team; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding-top: 1.2rem; border-radius: 28px; --blur: 30px; --shade: rgba(9, 12, 11, .5) }
.team-heading { display: flex; align-items: center; gap: .65rem; padding: 0 1.2rem }
.team-heading h2 { font-size: 1.02rem; font-weight: 800; letter-spacing: .005em; text-transform: uppercase }
#team-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1.05rem 1.4rem;
  scroll-padding-block: .9rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 .75rem, #000 calc(100% - 1.2rem), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 .75rem, #000 calc(100% - 1.2rem), transparent);
}
.team-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: .95rem .1rem }
.mini-stat { display: flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border-radius: 999px; color: var(--ink-2); font: 600 .68rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07) }
.mini-stat i { width: .45rem; height: .45rem; border-radius: 50%; background: rgba(226, 236, 230, .4) }
.mini-stat.active i { background: var(--lime); box-shadow: 0 0 0 3px rgba(200, 255, 61, .14), 0 0 10px rgba(200, 255, 61, .8) }
.mini-stat.warn { color: #ffd68a; background: rgba(255, 200, 97, .08); box-shadow: inset 0 0 0 1px rgba(255, 200, 97, .26) }
.mini-stat.warn i { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 200, 97, .14) }
/* An empty project has nothing to count yet */
#team-content:has(.map-placeholder) .team-meta .mini-stat:nth-child(-n+2) { display: none }
.map { position: relative; isolation: isolate; display: grid; gap: 1.6rem; padding: 1.35rem .7rem; border-radius: 20px; background: radial-gradient(rgba(255, 255, 255, .085) 1px, transparent 1.3px) 0 0 / 14px 14px, rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 10px 30px -18px rgba(0, 0, 0, .6) }
.map-row { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: .5rem }
.map-links { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none }
.map-links path { fill: none; stroke: rgba(255, 255, 255, .24); stroke-width: 1.5 }
/* Stepped, so a running task does not repaint the glass panel 60 times a second */
.map-links path.in-progress { stroke: var(--lime); stroke-dasharray: 4 4; animation: flow 1s steps(8) infinite }
.map-links path.in-progress.warn { stroke: var(--amber) }
@keyframes flow { to { stroke-dashoffset: -16 } }
.node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  width: min(91%, 14.8rem);
  min-width: 0;
  padding: .7rem .8rem;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .035)), rgba(16, 20, 18, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 24px -14px rgba(0, 0, 0, .85);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.map-row.multi .node { flex: 1 0 42%; max-width: 48%; padding-inline: .66rem }
.node:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .16), 0 14px 28px -14px rgba(0, 0, 0, .9) }
.node.good { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(71, 232, 203, .26), 0 10px 24px -14px rgba(0, 0, 0, .85) }
.node.live { background: linear-gradient(180deg, rgba(200, 255, 61, .13), rgba(200, 255, 61, .035)), rgba(16, 20, 18, .55); box-shadow: inset 0 1px 0 rgba(236, 255, 176, .3), 0 0 0 1px rgba(200, 255, 61, .55), 0 0 28px -6px rgba(200, 255, 61, .45), 0 10px 24px -14px rgba(0, 0, 0, .85) }
.node.warn { box-shadow: inset 0 1px 0 rgba(255, 236, 190, .22), 0 0 0 1px rgba(255, 200, 97, .55), 0 0 26px -8px rgba(255, 200, 97, .42), 0 10px 24px -14px rgba(0, 0, 0, .85) }
.node.bad { box-shadow: inset 0 1px 0 rgba(255, 220, 226, .18), 0 0 0 1px rgba(255, 122, 142, .5), 0 0 22px -8px rgba(255, 122, 142, .35), 0 10px 24px -14px rgba(0, 0, 0, .85) }
.node.active .badge::before { animation: pulse 1.6s ease-in-out infinite }
@keyframes pulse { 50% { opacity: .25 } }
.node.changed { animation: flash-node 1.25s ease-out }
@keyframes flash-node { from { background-color: rgba(255, 255, 255, .16) } }
.node-title { display: flex; align-items: center; gap: .42rem; width: 100%; color: var(--ink); font-size: .87rem; font-weight: 700; letter-spacing: -.005em; overflow-wrap: anywhere; hyphens: auto }
.node-title .ico { color: var(--ink-3) }
.node.live .node-title .ico { color: var(--lime) }
.node-step { display: -webkit-box; min-height: 1em; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink-2); font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere }
.node-live { color: var(--ink-3); font-family: var(--mono); font-size: .72rem; white-space: nowrap }
.node small { color: var(--ink-3); font-size: .72rem; line-height: 1.35; overflow-wrap: anywhere }
.node .badge { font-size: .66rem }
.map-placeholder { min-height: 11rem; align-content: center; justify-items: center; gap: .85rem; padding-inline: 1rem; color: var(--ink-2); font-size: .92rem; line-height: 1.45; text-align: center }
.empty-net { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 18px; color: var(--ink-2); font-size: 1.8rem; background: var(--tile); box-shadow: var(--tile-edge) }
.team-subhead { margin: 1.5rem .2rem .75rem }
.last-event { margin-left: .25rem; padding: .1rem .7rem; border-left: 2px solid rgba(255, 255, 255, .2); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere }
#team-content:has(.node.live) .last-event { border-left-color: rgba(200, 255, 61, .55) }
.last-event .event-title { margin-bottom: .2rem }
.team-hint { margin: .7rem .25rem; color: var(--ink-3); font-size: .8rem; line-height: 1.5 }

/* ---------- Drawer ---------- */
dialog { width: min(34rem, calc(100vw - 2rem)); max-height: min(85dvh, 49rem); padding: 0; border: 0; border-radius: 28px; overflow: hidden; color: var(--ink); --blur: 32px; --shade: rgba(10, 13, 12, .64) }
dialog[open] { display: flex; flex-direction: column; animation: sheet-in .32s var(--ease) }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(.98) } }
dialog::backdrop { background: rgba(3, 5, 4, .52); -webkit-backdrop-filter: blur(5px) saturate(120%); backdrop-filter: blur(5px) saturate(120%) }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1.05rem 1.1rem 1rem 1.35rem; border-bottom: 1px solid var(--line) }
.drawer-head h2 { font-size: 1.08rem; font-weight: 800; letter-spacing: .005em; text-transform: uppercase; overflow-wrap: anywhere }
.drawer-body { overflow: auto; padding: 1.05rem 1.35rem 1.4rem; line-height: 1.45 }
.drawer-body h3 { margin: 1.25rem 0 .45rem }
.detail-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem .9rem; margin: 0; font-size: .92rem }
.drawer-body .detail-list { grid-template-columns: 10rem minmax(0, 1fr) }
.detail-list dt { color: var(--ink-3) }
.detail-list dd { margin: 0; overflow-wrap: anywhere }
.detail-list.compact { margin-top: .6rem; gap: .35rem .8rem; font-size: .86rem }
.provider-row { padding: .95rem 0; border-bottom: 1px solid var(--line) }
.provider-row:first-child { padding-top: 0 }
.provider-row:last-child { padding-bottom: 0; border: 0 }
.provider-header { display: flex; align-items: center; justify-content: space-between; gap: .7rem }
.provider-row p { margin-top: .35rem; color: var(--ink-2); font-size: .9rem; overflow-wrap: anywhere }
.project-form { display: grid; gap: 1rem }
.project-form label { display: grid; gap: .4rem; font-size: .9rem; font-weight: 600 }
.project-form label small { color: var(--ink-3); font-weight: 400 }
.project-form input[name="name"], .project-form textarea { width: 100%; min-height: 0; padding: .62rem .8rem; border: 0; border-radius: 14px; color: var(--ink); font-weight: 400; line-height: 1.45; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 2px rgba(0, 0, 0, .3) }
.project-form textarea { display: block; resize: vertical; max-height: 12rem }
.project-form :is(input, textarea)::placeholder { color: var(--ink-3) }
.project-form :is(input[name="name"], textarea):focus-visible { outline: 2px solid var(--lime); outline-offset: 2px }
.project-form fieldset { display: grid; gap: .55rem; margin: 0; padding: .6rem .9rem .8rem; border: 1px solid var(--line); border-radius: 16px }
.project-form legend { padding: 0 .35rem }
.project-form .choice { display: flex; align-items: flex-start; gap: .6rem; color: var(--ink-2); font-weight: 400 }
.project-form .choice input { margin-top: .22rem; accent-color: var(--lime) }
.project-form .muted { font-size: .85rem }
.project-form .git-url { display: none; margin: -.1rem 0 .1rem 1.6rem }
.project-form:has(input[value="git"]:checked) .git-url { display: grid }
.project-row small { display: block; margin-top: .1rem; color: var(--ink-3); font-size: .72rem; font-weight: 500 }
.form-actions { display: flex; justify-content: flex-end }

/* ---------- Sign-in page ---------- */
.topbar-tools { display: flex; align-items: center; gap: .5rem; flex-shrink: 0 }
.auth-page { display: grid; place-items: center; min-height: 100dvh; padding: 1.5rem }
.auth-card { width: min(27rem, 100%); padding: 1.7rem 1.6rem 1.6rem; border-radius: 28px; --blur: 30px; --shade: rgba(9, 12, 11, .56) }
.auth-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.4rem; font-size: 1rem; font-weight: 800; text-transform: uppercase }
.auth-card h1 { font-size: clamp(1.4rem, 5vw, 1.8rem) }
.auth-lead { margin: .6rem 0 1.2rem; color: var(--ink-2); line-height: 1.5 }
.auth-form { display: grid; gap: .95rem }
.auth-form label { display: grid; gap: .4rem; font-size: .9rem; font-weight: 600 }
.auth-form input { width: 100%; padding: .7rem .85rem; border: 0; border-radius: 14px; color: var(--ink); background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 2px rgba(0, 0, 0, .3) }
.auth-form input:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px }
.auth-form .code-input { font: 600 1.25rem/1.2 var(--mono); letter-spacing: .3em; text-align: center }
.auth-form .primary-button { margin-top: .3rem; padding-block: .8rem }
.qr-box { display: grid; justify-items: center; gap: .55rem; margin: 0 }
.qr-box > div { width: min(13rem, 70vw); padding: .55rem; border-radius: 18px; background: #fff }
.qr-box svg { display: block; width: 100%; height: auto }
.qr-box figcaption, .auth-note { color: var(--ink-2); font-size: .85rem; line-height: 1.5; text-align: center }
.auth-note code { user-select: all; white-space: nowrap }
.auth-error { margin-top: 1rem; padding: .6rem .85rem; border-radius: 14px; color: #ffc2cb; background: rgba(255, 122, 142, .1); box-shadow: inset 0 0 0 1px rgba(255, 122, 142, .3); font-size: .9rem }

/* ---------- Adaptive layout ---------- */
@media (min-width: 1600px) {
  .shell { grid-template-columns: 16.5rem minmax(0, 1fr) 27rem }
}
@media (max-width: 1280px) {
  .map { padding-inline: .45rem }
  .map-row.multi .node { padding-inline: .55rem }
  .map-row.multi .node-title { font-size: .8rem }
  .map-row.multi .node-title .ico { display: none }
  .team-meta { gap: .3rem }
  .mini-stat { padding: .26rem .5rem; letter-spacing: .03em }
}
@media (max-width: 1180px) {
  .shell { grid-template-columns: 13rem minmax(0, 1fr) 19rem; gap: .6rem; padding: .6rem }
  .team-heading { padding-inline: 1rem }
  #team-content { padding-inline: .8rem }
  .provider-chip { flex-wrap: wrap; row-gap: 0 }
  .provider-chip small { flex-basis: 100%; margin-left: 1.1rem; text-align: left }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr) 18.5rem; grid-template-areas: "top team" "main team"; min-height: 34rem }
  .topbar { padding-left: .45rem }
  .sidebar { display: none; position: fixed; top: .5rem; bottom: .5rem; left: .5rem; width: min(19rem, 85vw); z-index: 6; --shade: rgba(9, 12, 11, .82) }
  body.nav-open .sidebar { display: flex }
  #open-nav, .brand .close-nav { display: inline-flex }
  .brand .close-nav { margin-left: auto; margin-right: -.3rem }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 5; border: 0; background: rgba(3, 5, 4, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px) }
  .provider-chip { flex-wrap: nowrap }
  .provider-chip small { flex-basis: auto; margin-left: auto; text-align: right }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 4.6rem }
  .shell { display: flex; flex-direction: column; gap: .6rem; height: auto; min-height: 100dvh; padding: .5rem }
  .topbar { position: sticky; top: .5rem; z-index: 4; flex-shrink: 0; height: 3.3rem; --blur: 24px; --shade: rgba(9, 12, 11, .56) }
  .shell::before { content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 4; height: 1.75rem; pointer-events: none; background: linear-gradient(var(--bg) 45%, rgba(5, 6, 7, 0)) }
  .workspace { min-height: 31rem }
  .chat-head { padding: .7rem .35rem .2rem }
  /* The chat is an inner scroller here, so the page must keep scrolling once it reaches its end */
  .chat-scroll {
    max-height: 60dvh;
    overscroll-behavior: auto;
    scroll-padding: 1rem 0 1.75rem;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1rem, #000 calc(100% - 1.5rem), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 1rem, #000 calc(100% - 1.5rem), transparent);
  }
  .chat-content { padding: 1rem .35rem 1.75rem }
  .chat-content:has(.welcome) { min-height: 15rem }
  .compose-area { position: static; z-index: auto; max-width: none; margin: 0; padding: .55rem 0 0; pointer-events: auto }
  .team { overflow: visible; padding-top: 1.1rem; border-radius: 24px }
  #team-content { overflow: visible; padding: 0 .9rem 1.4rem; -webkit-mask-image: none; mask-image: none }
  .team .map { max-width: 35rem; margin-inline: auto }
  .team-meta { margin-top: .6rem }
}
@media (max-width: 460px) {
  .crumb-root, .crumb-divider { display: none }
  .topbar { padding-right: .4rem }
  .chat-head { gap: .5rem }
  .heading-icon { width: 2rem; height: 2rem }
  .drawer-body .detail-list { grid-template-columns: minmax(0, 1fr); gap: .1rem 0 }
  .drawer-body .detail-list dd + dt { margin-top: .5rem }
}

/* ---------- Accessibility: contrast, motion, transparency, forced colours ---------- */
@media (prefers-contrast: more) {
  :root { --ink-2: rgba(240, 245, 242, .92); --ink-3: rgba(236, 242, 238, .84); --line: rgba(255, 255, 255, .2) }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important }
}
@media (prefers-reduced-transparency: reduce) {
  :is(.sidebar, .team, .topbar, .composer, dialog, .node, .run-actions .plain-button, .compose-area .request-error, .scrim:not([hidden])) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  :is(.sidebar, .team, .topbar, .composer, .bubble, dialog) { background: #111517 }
  .bubble.user-bubble { background: #161c10 }
  .node { background-color: #161a19 }
  .run-actions .plain-button { background: #1a1f1d }
  .scrim:not([hidden]) { background: rgba(3, 5, 4, .9) }
  dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(3, 5, 4, .9) }
  body::after { display: none }
}
@media (forced-colors: active) {
  :is(.sidebar, .team, .topbar, .composer, .bubble, dialog, .node, .map, .decision, .review-block, .failure, .plain-button, .icon-button, .artifact-link, .badge, .connection, .auth-card, .auth-form input) { border: 1px solid CanvasText }
  :is(.sidebar, .team, .topbar, .composer, dialog, .bubble, .hero-mark, .run-actions .plain-button)::before,
  :is(.sidebar, .team, .topbar, .composer, dialog)::after { display: none }
  :is(#submit, .primary-button, .run-actions [data-action="accept"]) { border: 1px solid ButtonText }
  :is(#submit, .primary-button):disabled { border-color: GrayText }
  .depth-picker select { border: 1px solid ButtonText; -webkit-appearance: auto; appearance: auto; background-image: none; padding-right: .5rem }
  .project-form :is(input[name="name"], textarea) { border: 1px solid CanvasText }
  .composer:has(textarea:focus) { outline: 2px solid Highlight; outline-offset: 2px }
  .nav-row[aria-current="true"] { outline: 2px solid Highlight; outline-offset: -2px }
  .map-links path { stroke: CanvasText }
  .map-links path.in-progress { stroke: Highlight }
  svg.ico { color: inherit !important }
}
