:root {
  color-scheme: dark;
  --bg: #06101c;
  --panel: #0a1828;
  --panel-2: #0d1e31;
  --panel-3: #10243a;
  --line: #1c3550;
  --line-soft: #142a42;
  --text: #eef6ff;
  --muted: #8fa8c3;
  --faint: #607a96;
  --blue: #4a9dff;
  --cyan: #32d6ff;
  --green: #28dfad;
  --orange: #ff9e57;
  --purple: #9a7cff;
  --pink: #ff6fae;
  --red: #ff6578;
  --yellow: #ffd166;
  --shadow: 0 18px 50px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 70% -10%, #0c2844 0, transparent 32%), var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; border-right: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(6,16,28,.98), rgba(6,17,31,.96)); padding: 20px 14px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px 20px; }
.brand.centered { justify-content: center; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; text-transform: uppercase; color: #5f8ab4; letter-spacing: .1em; font-size: 9px; margin-top: 2px; }
.brand-mark { width: 33px; height: 33px; position: relative; filter: drop-shadow(0 0 14px rgba(74,157,255,.35)); }
.brand-mark span { position: absolute; bottom: 4px; width: 10px; height: 25px; border-radius: 3px 3px 2px 2px; background: linear-gradient(180deg, #7cc4ff, #397cff); transform: skew(-21deg); }
.brand-mark span:nth-child(1){ left: 4px; height: 18px; }
.brand-mark span:nth-child(2){ left: 12px; height: 29px; background: linear-gradient(180deg,#87e9ff,#4d8cff); }
.brand-mark span:nth-child(3){ left: 21px; height: 16px; transform: skew(21deg); }
.nav { display: grid; gap: 5px; }
.nav button { border: 0; background: transparent; color: #9eb4ca; width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: .15s ease; }
.nav button:hover { color: #fff; background: rgba(74,157,255,.08); }
.nav button.active { color: #fff; background: linear-gradient(90deg, rgba(39,111,214,.35), rgba(29,82,150,.17)); box-shadow: inset 2px 0 var(--blue); }
.nav-icon { color: #77aee8; font-size: 16px; text-align: center; }
.org-chip { margin-top: auto; padding: 16px 12px 4px; display: flex; gap: 12px; align-items: center; color: #74a6da; }
.org-chip strong, .org-chip span { display: block; }
.org-chip strong { color: #b8dbff; font-size: 13px; }
.org-chip span { font-size: 10px; margin-top: 2px; }
.orb { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3ddcff, #2559db 28%, #21106e 62%, #050717 72%); box-shadow: 0 0 30px rgba(63,128,255,.45), inset -8px -7px 18px rgba(0,0,0,.5); }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 66px; position: sticky; top: 0; z-index: 9; border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(20px); background: rgba(5,14,25,.86); display: flex; align-items: center; gap: 18px; padding: 0 22px; }
.search-wrap { min-width: 280px; max-width: 680px; flex: 1; display: flex; align-items: center; border: 1px solid var(--line); background: #0a1727; border-radius: 9px; padding: 0 12px; }
.search-wrap input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; padding: 10px; font-size: 13px; }
.search-icon { color: #7196bb; font-size: 19px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.system-status { white-space: nowrap; color: #9db3c9; font-size: 11px; }
.system-status i { display: inline-block; width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 12px rgba(40,223,173,.65); margin-right: 6px; }
.view { padding: 24px; max-width: 1700px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 13px; max-width: 760px; }
.eyebrow { color: #70a7e3 !important; font-size: 10px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 5px !important; }
.button { border: 1px solid var(--line); background: #0c1b2d; color: #ddebfb; border-radius: 8px; padding: 9px 13px; cursor: pointer; font-size: 12px; font-weight: 650; transition: .15s; }
.button:hover { transform: translateY(-1px); border-color: #326293; }
.button.primary { border-color: #327bea; background: linear-gradient(180deg, #1673ea, #0e58bd); color: white; box-shadow: 0 7px 24px rgba(32,115,230,.22); }
.button.founder { background: #0b1829; }
.button.danger { border-color: rgba(255,101,120,.45); color: #ff9caa; background: rgba(255,101,120,.08); }
.button.small { padding: 6px 9px; font-size: 10px; }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.grid { display: grid; gap: 14px; }
.grid.metrics { grid-template-columns: repeat(6, minmax(125px, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: linear-gradient(180deg, rgba(13,30,49,.96), rgba(8,22,37,.96)); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 22px rgba(0,0,0,.12); min-width: 0; }
.card-pad { padding: 16px; }
.metric { padding: 15px; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-top { display: flex; justify-content: space-between; color: #9eb4cc; font-size: 11px; }
.metric-icon { width: 34px; height: 34px; border-radius: 8px; background: rgba(74,157,255,.13); display: grid; place-items: center; color: #77b9ff; }
.metric strong { font-size: 26px; letter-spacing: -.03em; }
.metric small { color: var(--faint); font-size: 10px; }
.metric.green strong { color: var(--green); font-size: 18px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.section-title h2 { font-size: 14px; margin: 0; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; padding: 0 12px 12px; }
table { border-collapse: collapse; width: 100%; font-size: 11px; }
th { text-align: left; color: #6986a5; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; padding: 9px 8px; border-bottom: 1px solid var(--line); }
td { padding: 10px 8px; border-bottom: 1px solid rgba(27,52,78,.55); color: #c7d7e8; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(74,157,255,.035); color: white; }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border: 1px solid #2d4660; border-radius: 999px; padding: 3px 7px; font-size: 9px; color: #b3c9df; background: #102238; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.blue { color: #6bb0ff; border-color: rgba(74,157,255,.3); background: rgba(74,157,255,.08); }
.badge.green { color: #47e9bd; border-color: rgba(40,223,173,.28); background: rgba(40,223,173,.08); }
.badge.orange { color: #ffad69; border-color: rgba(255,158,87,.3); background: rgba(255,158,87,.08); }
.badge.purple { color: #ae95ff; border-color: rgba(154,124,255,.3); background: rgba(154,124,255,.08); }
.badge.red { color: #ff8292; border-color: rgba(255,101,120,.3); background: rgba(255,101,120,.08); }
.progress { width: 100%; height: 6px; background: #11263d; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4f8fff, #38c9ff); }
.progress.green span { background: linear-gradient(90deg,#25b98f,#3ff2c1); }
.progress.orange span { background: linear-gradient(90deg,#f27d46,#ffb05f); }
.progress.purple span { background: linear-gradient(90deg,#735bed,#b086ff); }
.progress.red span { background: linear-gradient(90deg,#e54b62,#ff7586); }
.rule-list, .activity-list, .agent-list, .stack-list { list-style: none; padding: 0; margin: 0; }
.rule-item, .activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(27,52,78,.55); }
.rule-item:last-child, .activity-item:last-child { border-bottom: 0; }
.rule-check { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; color: var(--green); background: rgba(40,223,173,.1); }
.rule-item strong, .activity-item strong { display: block; font-size: 11px; }
.rule-item span, .activity-item span { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; line-height: 1.4; }
.activity-time { color: #6d91b7; min-width: 44px; font-size: 9px; padding-top: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #0b1b2d; color: #8ea8c1; border-radius: 7px; padding: 6px 10px; font-size: 10px; cursor: pointer; }
.tab.active { color: white; border-color: #397fd0; background: rgba(65,135,229,.2); }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; }
.agent-card { padding: 13px; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start; }
.avatar { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 11px; background: linear-gradient(135deg,#174d84,#2e8dd9); color: #e9f6ff; border: 1px solid #2b628f; }
.avatar.builder { background: linear-gradient(135deg,#59361e,#b56a31); border-color: #88512a; }
.avatar.protected { background: linear-gradient(135deg,#3a286c,#6e4bcc); border-color: #5c45a1; }
.agent-card h3 { margin: 1px 0 3px; font-size: 12px; }
.agent-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.agent-card .agent-role { color: #76a8da; margin-bottom: 5px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 7px; box-shadow: 0 0 10px rgba(255,101,120,.35); }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; }
.project-hero { padding: 18px; position: relative; overflow: hidden; }
.project-hero::after { content: ""; position: absolute; inset: -30% -10% auto 55%; height: 280px; background: radial-gradient(circle, rgba(74,157,255,.12), transparent 65%); pointer-events: none; }
.project-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-title-row h1 { margin: 0; font-size: 24px; }
.objective-box { margin-top: 14px; padding: 13px; background: rgba(132,96,255,.09); border: 1px solid rgba(154,124,255,.25); border-radius: 9px; color: #d7d2ee; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.stage-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 16px 0; }
.stage { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #0a1929; }
.stage.active { border-color: #398fe8; box-shadow: inset 0 0 18px rgba(57,143,232,.13); }
.stage.done { border-color: rgba(40,223,173,.27); }
.stage strong { display: block; font-size: 9px; }
.stage span { display: block; color: var(--faint); font-size: 8px; margin-top: 3px; }
.builder-pipeline { display: grid; gap: 7px; padding: 12px 16px 16px; }
.pipeline-row { display: grid; grid-template-columns: 150px 1fr 45px; gap: 10px; align-items: center; }
.pipeline-row span { font-size: 10px; color: #b9c9d9; }
.pipeline-row small { font-size: 8px; color: #65819d; text-align: right; }
.dependency-map { min-height: 220px; position: relative; padding: 22px; background-image: radial-gradient(#17324c 1px, transparent 1px); background-size: 16px 16px; border-radius: 0 0 12px 12px; overflow: hidden; }
.map-center { margin: 62px auto 0; width: 140px; padding: 14px; border: 1px solid rgba(40,223,173,.4); background: rgba(11,59,58,.8); text-align: center; border-radius: 18px; color: #59efca; font-size: 10px; box-shadow: 0 0 32px rgba(40,223,173,.1); }
.map-group { position: absolute; border: 1px solid var(--line); background: rgba(10,26,44,.9); border-radius: 10px; padding: 10px; width: 130px; font-size: 9px; color: #94b7da; }
.map-group b { display: block; color: white; margin-bottom: 3px; }
.map-group.corp { left: 24px; top: 32px; }.map-group.builder { left: 24px; bottom: 28px; }.map-group.independent { right: 24px; top: 32px; }.map-group.protected { right: 24px; bottom: 28px; }
.callout { padding: 12px; border-radius: 9px; border: 1px solid rgba(74,157,255,.23); background: rgba(74,157,255,.06); color: #b9d5f3; font-size: 10px; line-height: 1.5; }
.callout.warning { border-color: rgba(255,209,102,.25); background: rgba(255,209,102,.05); color: #ecdca9; }
.callout.success { border-color: rgba(40,223,173,.25); background: rgba(40,223,173,.05); color: #a9e8d5; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); color: var(--text); background: #081726; border-radius: 8px; padding: 10px 11px; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: #3d7dc2; box-shadow: 0 0 0 3px rgba(61,125,194,.08); }
label { display: grid; gap: 6px; color: #9bb2c8; font-size: 10px; margin: 12px 0; }
.dialog { width: min(620px, calc(100vw - 30px)); border: 1px solid var(--line); border-radius: 14px; background: #081725; color: var(--text); box-shadow: var(--shadow); padding: 0; }
.dialog::backdrop { background: rgba(0,7,14,.72); backdrop-filter: blur(5px); }
.dialog form { padding: 20px; }
.dialog-head, .dialog-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.dialog-head h2 { margin: 0; }.dialog-actions { justify-content: flex-end; margin-top: 18px; }
.icon-button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #0b1b2d; cursor: pointer; font-size: 20px; }
.auth-overlay { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; background: rgba(2,9,17,.92); backdrop-filter: blur(18px); }
.auth-overlay.hidden { display: none; }
.auth-card { width: min(420px, calc(100vw - 28px)); border: 1px solid var(--line); background: #091827; border-radius: 16px; padding: 24px; box-shadow: var(--shadow); text-align: center; }
.auth-card h2 { font-size: 20px; margin: 6px 0; }.auth-card p { color: var(--muted); font-size: 11px; line-height: 1.5; }.auth-card input { margin: 12px 0; }.auth-card .button { width: 100%; }
.error-text { color: #ff8292 !important; min-height: 16px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; padding: 11px 14px; border-radius: 9px; border: 1px solid var(--line); background: #0b1c2e; color: #dcedff; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 11px; max-width: 360px; }
.toast.show { transform: translateY(0); opacity: 1; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: #dbeafa; font-size: 15px; margin-bottom: 5px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #061321; border: 1px solid var(--line); border-radius: 6px; padding: 2px 5px; color: #8dd8ff; font-size: 9px; }
.preview-results { display: grid; gap: 10px; }
.preview-card { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #091a2a; }
.preview-card h3 { margin: 0 0 5px; font-size: 12px; }.preview-card p { white-space: pre-wrap; color: #b6cadf; font-size: 10px; line-height: 1.55; margin: 0; }
.search-match { outline: 1px solid rgba(74,157,255,.45); }
@media (max-width: 1180px) { .grid.metrics { grid-template-columns: repeat(3, 1fr); }.grid.two, .project-layout { grid-template-columns: 1fr; }.grid.three { grid-template-columns: 1fr 1fr; }.stage-track { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 800px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; width: auto; min-height: auto; }.main { grid-column: 1; }.org-chip { display: none; }.nav { grid-template-columns: repeat(3, 1fr); }.nav button { grid-template-columns: 1fr; text-align: center; font-size: 9px; }.nav-icon { display: none; }.topbar { position: static; }.top-actions .system-status, .top-actions .founder { display: none; }.view { padding: 14px; }.grid.metrics { grid-template-columns: repeat(2, 1fr); }.grid.three { grid-template-columns: 1fr; }.project-layout { grid-template-columns: 1fr; }.stage-track { grid-template-columns: 1fr 1fr; } }

/* v0.3 interaction + complete agent build workspace */
.agent-card-button { width:100%; color:inherit; font:inherit; text-align:left; cursor:pointer; appearance:none; -webkit-appearance:none; border:1px solid var(--line); background:linear-gradient(180deg, rgba(11,31,49,.92), rgba(7,24,39,.92)); }
.agent-card-button:hover, .agent-card-button:focus-visible { border-color:rgba(78,160,255,.62); transform:translateY(-1px); box-shadow:0 10px 30px rgba(0,0,0,.18), inset 2px 0 rgba(76,158,255,.85); outline:none; }
.agent-card-button:active { transform:translateY(0); }
.open-build-label { display:inline-block; margin-top:8px; color:#68aef4; font-size:9px; font-weight:700; letter-spacing:.02em; }
.status-dot.ready { background:#4ea0ff; box-shadow:0 0 11px rgba(78,160,255,.5); }
.clickable-agent { cursor:pointer; border-radius:8px; padding:7px; margin:-7px; transition:.15s ease; }
.clickable-agent:hover, .clickable-agent:focus-visible { background:rgba(66,145,234,.08); outline:1px solid rgba(78,160,255,.22); }
.pipeline-button { width:100%; appearance:none; -webkit-appearance:none; border:0; color:inherit; font:inherit; background:transparent; cursor:pointer; text-align:left; }
.pipeline-button:hover { background:rgba(78,160,255,.06); }

.agent-detail-loading { display:grid; gap:7px; max-width:720px; }
.agent-detail-loading span { color:var(--muted); font-size:11px; }
.agent-detail-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-end; margin-bottom:14px; }
.agent-detail-identity { display:grid; gap:12px; }
.agent-hero-row { display:flex; gap:14px; align-items:center; }
.agent-hero-row h1 { margin:2px 0 3px; font-size:28px; line-height:1; }
.agent-hero-row p { margin:0; color:var(--muted); }
.agent-hero-avatar { width:58px; height:58px; border-radius:16px; font-size:18px; flex:0 0 auto; }
.agent-detail-actions { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:7px; }
.agent-status-note { margin-bottom:14px; border-color:rgba(78,160,255,.25); background:rgba(32,100,171,.08); color:#bfd4e8; }
.agent-workspace { display:grid; grid-template-columns:240px minmax(0,1fr); gap:14px; align-items:start; }
.agent-folder-nav { position:sticky; top:82px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(180deg, rgba(8,27,44,.96), rgba(5,20,34,.96)); padding:10px; box-shadow:var(--shadow); display:grid; gap:5px; }
.agent-folder-title { padding:8px 9px 10px; color:#e7f2ff; font-size:11px; font-weight:800; border-bottom:1px solid var(--line-soft); margin-bottom:3px; }
.agent-folder-button { border:0; background:transparent; color:#9fb5ca; text-align:left; font:inherit; font-size:10px; padding:9px 10px; border-radius:8px; cursor:pointer; }
.agent-folder-button:hover { color:white; background:rgba(78,160,255,.08); }
.agent-folder-button.active { color:white; background:linear-gradient(90deg, rgba(42,113,201,.34), rgba(42,113,201,.1)); box-shadow:inset 2px 0 #4ea0ff; }
.agent-folder-meta { margin-top:8px; border-top:1px solid var(--line-soft); padding:10px 8px 4px; display:grid; gap:4px; overflow:hidden; }
.agent-folder-meta span { color:var(--faint); font-size:8px; text-transform:uppercase; letter-spacing:.07em; }
.agent-folder-meta strong, .agent-folder-meta code { color:#aac2d9; font-size:9px; overflow-wrap:anywhere; white-space:normal; }
.agent-folder-content { min-width:0; }
.agent-folder-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:18px; margin:3px 0 12px; }
.agent-folder-heading h2 { margin:2px 0 4px; font-size:22px; }
.agent-folder-heading p { margin:0; color:var(--muted); font-size:10px; line-height:1.5; max-width:760px; }
.agent-overview-metrics { grid-template-columns:repeat(4,1fr); }
.agent-overview-metrics .metric > strong { font-size:13px; overflow-wrap:anywhere; }
.spec-overview-grid { display:grid; grid-template-columns:1fr; gap:10px; margin-top:14px; }
.spec-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
.spec-toolbar input { flex:1; min-width:0; border:1px solid var(--line); border-radius:9px; background:#061728; color:var(--text); padding:9px 11px; font:inherit; font-size:10px; }
.spec-toolbar span { color:var(--faint); font-size:9px; white-space:nowrap; }
.spec-sections { display:grid; gap:8px; }
.spec-section { overflow:hidden; }
.spec-section > summary { list-style:none; display:grid; grid-template-columns:32px 1fr 18px; gap:9px; align-items:center; cursor:pointer; padding:12px 14px; user-select:none; }
.spec-section > summary::-webkit-details-marker { display:none; }
.spec-section > summary:hover { background:rgba(78,160,255,.04); }
.spec-number { display:grid; place-items:center; width:28px; height:28px; border-radius:8px; background:rgba(46,132,221,.16); border:1px solid rgba(77,161,247,.24); color:#7eb8f2; font-size:9px; font-weight:800; }
.spec-section > summary strong { font-size:11px; }
.spec-chevron { color:var(--faint); transition:.15s ease; }
.spec-section[open] .spec-chevron { transform:rotate(180deg); }
.spec-copy { border-top:1px solid var(--line-soft); padding:13px 15px 16px; color:#b8cada; font-size:10px; line-height:1.67; overflow-wrap:anywhere; }
.spec-overview-grid .spec-copy { max-height:none; }
.raw-spec { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; border:1px solid var(--line); border-radius:12px; background:#04111d; color:#b8cada; padding:16px; font:10px/1.62 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-width:100%; overflow:auto; }

@media (max-width: 980px) {
  .agent-workspace { grid-template-columns:1fr; }
  .agent-folder-nav { position:static; display:flex; overflow-x:auto; padding:7px; gap:5px; scrollbar-width:thin; }
  .agent-folder-title, .agent-folder-meta { display:none; }
  .agent-folder-button { flex:0 0 auto; white-space:nowrap; border:1px solid var(--line-soft); }
  .agent-overview-metrics { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 800px) {
  .agent-detail-head { align-items:stretch; flex-direction:column; }
  .agent-detail-actions { justify-content:flex-start; }
  .agent-hero-row h1 { font-size:24px; }
  .agent-hero-avatar { width:52px; height:52px; }
  .agent-folder-heading { align-items:flex-start; flex-direction:column; gap:10px; }
  .agent-folder-heading .toolbar { width:100%; }
  .agent-folder-heading .toolbar .button { flex:1; }
  .agent-overview-metrics { grid-template-columns:1fr 1fr; }
  .spec-section > summary { grid-template-columns:28px 1fr 14px; padding:11px; }
  .spec-copy { padding:12px; font-size:10px; }
}
@media (max-width: 480px) {
  .agent-overview-metrics { grid-template-columns:1fr; }
  .agent-detail-actions .button { width:100%; justify-content:center; }
}
