:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #14171c; --muted: #5d6573; --line: #e2e5ea;
  --accent: #3b5bdb; --accent-ink: #ffffff; --soft: #eef2ff;
  --client: #2b8a3e; --agent: #7048e8; --engineering: #1971c2; --devops: #e8590c; --none: #868e96;
  --warn: #c92a2a; --warn-soft: #fff0f0; --ok: #2b8a3e;
  --radius: 10px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --panel: #171a21; --ink: #e8eaed; --muted: #9aa3b2; --line: #2a2f39;
    --accent: #748ffc; --accent-ink: #0f1115; --soft: #1e2333; --warn-soft: #2a1515;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); }
button { font: inherit; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--warn); color: #fff; }
button.link { background: none; color: var(--accent); padding: 4px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
.muted { color: var(--muted); }
.msg { min-height: 1.4em; } .msg.err { color: var(--warn); }

.brand { font-weight: 700; font-size: 17px; } .brand .mark { color: var(--accent); } .brand .by { font-weight: 400; color: var(--muted); font-size: 13px; }

main { padding: 20px 24px; max-width: 1400px; margin: 0 auto; }
.signin { max-width: 380px; margin: 10vh auto; background: var(--panel); padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); }
.signin form button { margin-top: 12px; width: 100%; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 18px 0 8px; } h3 { font-size: 14px; margin: 0 0 6px; }

.needs { background: var(--soft); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.needs ul { margin: 6px 0 0; padding-left: 18px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.lane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.lane h3 { display: flex; justify-content: space-between; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.card { display: block; width: 100%; text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.card:hover { border-color: var(--accent); }
.card .id { font-size: 12px; color: var(--muted); }
.card .t { font-weight: 600; margin: 2px 0 6px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.chip { border-radius: 99px; padding: 1px 8px; border: 1px solid var(--line); white-space: nowrap; }
.chip.low { border-color: var(--ok); } .chip.medium { border-color: var(--devops); } .chip.high { border-color: var(--warn); }
.chip.blocked { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.wait { font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.tile .v { font-size: 26px; font-weight: 700; } .tile .l { font-size: 12px; color: var(--muted); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--line); margin: 6px 0 10px; }
.bar span { display: block; height: 100%; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.hbar { height: 8px; background: var(--accent); border-radius: 4px; min-width: 2px; }

.quarters { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ini { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: var(--bg); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0; } .progress span { display: block; height: 100%; background: var(--ok); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(760px, 96vw); max-height: 92vh; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.d-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.d-head h2 { margin: 0; flex: 1; }
.d-body { padding: 4px 18px 18px; }
.next { background: var(--soft); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: flex-end; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.timeline .when { color: var(--muted); font-size: 12px; }
pre.plan { white-space: pre-wrap; background: var(--bg); padding: 10px; border-radius: 8px; font: inherit; }
.key { font-family: ui-monospace, monospace; background: var(--bg); padding: 8px; border-radius: 6px; word-break: break-all; }

@media (max-width: 800px) {
  .board { grid-template-columns: 1fr; }
  .cols2, .form-grid { grid-template-columns: 1fr; }
  .who { margin-left: 0; width: 100%; }
}

/* How this works */
.how-steps { margin: 6px 0 0; padding-left: 20px; } .how-steps li { margin: 6px 0; }
.how { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.how-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: 13px; }
.how-toc ul { list-style: none; padding: 0; margin: 8px 0 0; } .how-toc li { margin: 3px 0; } .how-toc li.l3 { padding-left: 12px; }
.how-toc a { text-decoration: none; color: var(--ink); } .how-toc a:hover { color: var(--accent); }
.md { line-height: 1.6; max-width: 900px; } .md h1 { font-size: 24px; } .md h2 { font-size: 20px; margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--line); } .md h3 { font-size: 16px; margin-top: 20px; }
.md h1, .md h2, .md h3 { scroll-margin-top: 70px; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.md-code { position: relative; margin: 10px 0; }
.md-code pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 13px; line-height: 1.45; margin: 0; }
.md-code pre code { background: none; padding: 0; }
.md-copy { position: absolute; top: 6px; right: 6px; font-size: 12px; padding: 3px 10px; }
.md-table { overflow-x: auto; margin: 10px 0; } .md-table table { min-width: 520px; }
.md li { margin: 3px 0; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } .how-toc { position: static; max-height: none; } }
.new-client { border: 1px dashed var(--accent); border-radius: 8px; padding: 6px 12px 10px; margin: 8px 0; }
.new-client legend { font-weight: 600; padding: 0 6px; }
label[hidden], fieldset[hidden] { display: none; }

/* App shell: left sidebar, avatar menu bottom-left */
:root { --side-w: 236px; }
body.app main { margin-left: var(--side-w); max-width: none; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; background: var(--panel); border-right: 1px solid var(--line); z-index: 10; }
.side .brand { padding: 2px 8px; }
.side-client { margin: 0; font-size: 12px; color: var(--muted); padding: 0 6px; }
.side-client select { margin-top: 4px; padding: 6px 8px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.side-nav a:hover { background: var(--bg); color: var(--ink); }
.side-nav a.on { background: var(--soft); color: var(--ink); font-weight: 600; }
.side-nav svg, .chev { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; color: var(--ink); border: 1px solid transparent; padding: 8px; border-radius: 10px; text-align: left; }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: var(--bg); border-color: var(--line); }
.me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; } .me-text strong, .me-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; display: flex; flex-direction: column; }
.me-menu-head { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.me-menu a, .me-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; font-size: 14px; }
.me-menu a:hover, .me-menu button:hover { background: var(--bg); }
.me-menu [hidden] { display: none; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; flex: none; background: var(--muted); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 88px; height: 88px; font-size: 30px; }
.signin .brand { margin-bottom: 16px; font-weight: 700; } .signin .brand .mark { color: var(--accent); } .signin .brand .by { font-weight: 400; color: var(--muted); font-size: 13px; }
.side .brand { font-weight: 700; font-size: 17px; } .side .brand .mark { color: var(--accent); } .side .brand .by { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* Profile */
.profile { max-width: 760px; }
.pic-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.button-like { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 400; margin: 0; }
label small { display: block; font-weight: 400; margin-top: 4px; }
input:disabled { opacity: .7; }

/* Admin: invite bar, members */
.invite-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 12px; align-items: end; }
.invite-bar > button { margin-bottom: 1px; height: 38px; }
.invite-bar .new-client, .invite-bar .msg { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; } .panel-head h2 { margin: 0; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { background: none; color: var(--muted); padding: 5px 12px; border-radius: 6px; font-size: 13px; }
.seg button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.person { display: flex; align-items: center; gap: 10px; }
.small { font-size: 12px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; font-weight: 600; }
.badge.invited { background: #fff4e5; color: #b35c00; } .badge.active { background: #e8f6ec; color: #2b8a3e; } .badge.removed { background: var(--bg); color: var(--muted); }
.role-sel { width: auto; padding: 5px 8px; font-size: 13px; }
.row-actions { white-space: nowrap; text-align: right; } .row-actions button { padding: 5px 10px; font-size: 13px; margin-left: 4px; }
.danger-text { color: var(--warn) !important; }
table.members td { vertical-align: middle; }

/* How it works diagram */
.flow-wrap { overflow-x: auto; margin: 12px 0 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.flow { display: block; min-width: 1100px; width: 100%; height: auto; font-family: inherit; }
.fl-lane { fill-opacity: .06; } .fl-bar { fill-opacity: .9; }
.fl-client { fill: var(--client); } .fl-agent { fill: var(--agent); } .fl-engineering { fill: var(--engineering); } .fl-devops { fill: var(--devops); }
.fl-lane-label { font-size: 13px; font-weight: 600; fill: var(--ink); }
.fl-head { font-size: 12px; fill: var(--muted); }
.fl-box { fill-opacity: .14; stroke-width: 1.5; } .fl-box.fl-client { stroke: var(--client); } .fl-box.fl-agent { stroke: var(--agent); } .fl-box.fl-engineering { stroke: var(--engineering); } .fl-box.fl-devops { stroke: var(--devops); }
.fl-text { font-size: 12.5px; fill: var(--ink); font-weight: 500; }
.fl-rec { font-size: 10.5px; fill: var(--muted); }
.fl-num-bg { fill-opacity: 1; } .fl-num { font-size: 11px; font-weight: 700; fill: #fff; }
.fl-link { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.fl-loop { fill: none; stroke: var(--warn); stroke-width: 1.3; stroke-dasharray: 5 4; }
.fl-loop-label { font-size: 10.5px; fill: var(--warn); stroke: var(--panel); stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; }
.fl-arrowhead { fill: var(--muted); }
.how-detail { margin-top: 8px; } .how-detail summary { cursor: pointer; color: var(--accent); }

@media (max-width: 900px) {
  :root { --side-w: 0px; }
  .side { position: sticky; top: 0; inset: auto; width: auto; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); gap: 8px; }
  .side .brand .by, .side-client { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .side-nav a { white-space: nowrap; padding: 6px 8px; }
  .side-foot { margin: 0 0 0 auto; } .me-text, .chev { display: none; }
  .me-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); width: 220px; }
  main { padding: 16px; }
  .invite-bar { grid-template-columns: 1fr; }
}
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; cursor: pointer; }
.check input { width: auto; margin-top: 3px; }
.check span { display: flex; flex-direction: column; } .check small { font-size: 13px; }

/* Bell */
.side-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bell-wrap { position: relative; }
.bell { position: relative; background: none; color: var(--muted); padding: 6px; border-radius: 8px; border: 1px solid transparent; }
.bell:hover, .bell[aria-expanded="true"] { background: var(--bg); color: var(--ink); border-color: var(--line); }
.bell svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell-count { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-panel { position: absolute; top: calc(100% + 6px); left: 0; width: 340px; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 30; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.bell-panel ul { list-style: none; margin: 0; padding: 4px; }
.bell-panel a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 18px; border-radius: 8px; color: var(--ink); text-decoration: none; position: relative; }
.bell-panel a:hover { background: var(--bg); }
.bell-panel a.unread::before { content: ""; position: absolute; left: 6px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.bell-panel a.unread .b-title { font-weight: 600; }
.b-title { font-size: 14px; } .b-body { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .b-time { font-size: 12px; color: var(--muted); }
.nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; }

/* Board filter, project chips */
.filters { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.filters label { display: flex; align-items: center; gap: 8px; margin: 0; } .filters select { width: auto; padding: 5px 8px; }
.card .proj { color: var(--accent); }
.proj-chip { border-color: var(--accent); color: var(--accent); }
.inline-sel { width: auto; padding: 3px 6px; font-size: 13px; }

/* Chat */
.thread { display: flex; flex-direction: column; gap: 8px; }
.msgs { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.thread.compact .msgs { max-height: 300px; }
.m { display: flex; gap: 10px; align-items: flex-start; }
.m .avatar { width: 30px; height: 30px; font-size: 12px; }
.m-head { font-size: 14px; } .m-text { margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.m.mine .m-text { background: var(--soft); border-radius: 0 10px 10px 10px; padding: 6px 10px; display: inline-block; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--soft); color: var(--accent); font-weight: 600; } .tag.agent { color: var(--agent); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; flex: 1; }
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.chat-list { display: flex; flex-direction: column; gap: 4px; }
.chat-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.chat-list a:hover { background: var(--panel); } .chat-list a.on { background: var(--panel); border-color: var(--line); }
.chat-list .c-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chat-list .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head { display: flex; flex-direction: column; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.proj.archived { opacity: .7; }
.proj h3.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 6px; }
.repos { list-style: none; padding: 0; margin: 0; } .repos li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; }
.proj-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.proj-foot .actions { margin: 0; }
.small-btn { padding: 5px 10px !important; font-size: 13px !important; }
a.button-like { text-decoration: none; }
.edit-slot:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; }
  .bell-panel { left: auto; right: -40px; width: min(340px, 92vw); }
  .side-head { order: 0; }
}

/* Feature studio: chat on the left; components & APIs top-right (70%), complexity bottom-right (30%) */
body.studio-mode main { max-width: none; }
.studio { display: grid; grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr); grid-template-rows: minmax(0, 7fr) minmax(0, 3fr); gap: 14px; height: calc(100vh - 40px); min-height: 560px; }
.studio .panel { margin: 0; min-height: 0; display: flex; flex-direction: column; }
.st-chat { grid-row: 1 / span 2; }
.st-impact, .st-summary { overflow: auto; }
.st-head { display: flex; align-items: flex-end; gap: 8px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.st-pick { flex: 1; margin: 0; } .st-pick select { margin-top: 4px; }
.st-thread { flex: 1; min-height: 0; }
.st-thread .msgs { flex: 1; max-height: none; min-height: 0; }
.st-intro .st-ex { margin-top: 8px; } .st-ex .chip { background: var(--bg); color: var(--ink); cursor: pointer; padding: 4px 10px; font-size: 13px; }
.st-ex .chip:hover { border-color: var(--accent); }
.st-new-side { display: flex; flex-direction: column; gap: 6px; } .st-new-side select { width: 170px; padding: 6px 8px; font-size: 13px; }
.st-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; } .st-title h2 { margin: 0; font-size: 17px; flex: 1 1 auto; }
.avatar.sys, .tag.sys { background: var(--soft); color: var(--agent); }
h3.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; display: flex; align-items: center; gap: 6px; }
.count { font-size: 11px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }
table.impact { width: 100%; border-collapse: collapse; font-size: 14px; }
table.impact th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.impact td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.impact tr:last-child td { border-bottom: 0; }
table.impact.edit td { padding: 4px; } table.impact.edit input, table.impact.edit select { padding: 5px 7px; font-size: 13px; }
code.api { font-size: 13px; overflow-wrap: anywhere; } code.api b { font-size: 11px; color: var(--muted); margin-right: 4px; }
.badge.new { background: var(--soft); color: var(--accent); } .badge.upd { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.av-available { background: #e8f6ec; color: #2b8a3e; } .badge.av-in_progress { background: #fff4e5; color: #b35c00; } .badge.av-to_build { background: var(--warn-soft); color: var(--warn); }
.av-available { background: #2f9e44; } .av-in_progress { background: #f08c00; } .av-to_build { background: var(--warn); }
span.dot.av-available, span.dot.av-in_progress, span.dot.av-to_build { border-radius: 50%; }
.sum-grid { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 2fr); gap: 10px 20px; align-items: start; }
.sum-foot { grid-column: 1 / -1; }
.tier { font-size: 28px; font-weight: 800; line-height: 1.1; margin: 2px 0; }
.tier-low { color: var(--ok); } .tier-medium { color: var(--devops); } .tier-high { color: var(--warn); }
.bar.avail { height: 14px; }
.err { color: var(--warn); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.av-available { background: #12301b; color: #69db7c; }
  :root:not([data-theme="light"]) .badge.av-in_progress { background: #33240b; color: #ffc078; }
}
@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .st-chat { grid-row: auto; min-height: 70vh; }
  .sum-grid { grid-template-columns: 1fr; }
}
.st-summary .link { align-self: flex-start; padding-left: 0; margin-top: 6px; }
