:root {
  color-scheme: dark;
  --bg: #0b1018;
  --panel: #121a26;
  --panel-2: #172232;
  --line: #29384b;
  --muted: #8b9bb0;
  --text: #ecf2f8;
  --cyan: #63d5d0;
  --blue: #79a9ff;
  --amber: #f3b562;
  --red: #f07178;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 80% -10%, #1b2a3b 0, transparent 35%), var(--bg); color: var(--text); min-width: 1100px; overflow-x: hidden; }
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: not-allowed; opacity: .45; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.shell { max-width: 1680px; margin: 0 auto; padding: 24px 30px 18px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.eyebrow, .label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 5px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.title-badge { display: inline-flex; vertical-align: middle; margin-left: 9px; padding: 5px 8px; border: 1px solid rgba(99, 213, 208, .38); border-radius: 999px; color: var(--cyan); background: rgba(99, 213, 208, .08); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
h2 { font-size: 13px; letter-spacing: .02em; }
h3 { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.session-summary { display: flex; gap: 26px; align-items: center; }
.session-summary > div, .metadata-bar > div { display: grid; gap: 6px; }
.session-summary code { color: var(--cyan); font-size: 11px; }
.metadata-bar { display: grid; grid-template-columns: 1fr 1.15fr 1.65fr 2fr 1.2fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.metadata-bar strong, .metadata-bar code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.metadata-bar code { color: #c4d4e7; }
.pill, .rating { display: inline-flex; width: fit-content; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.pill-agent { color: var(--cyan); border-color: rgba(99, 213, 208, .36); background: rgba(99, 213, 208, .08); }
.pill-human { color: var(--amber); border-color: rgba(243, 181, 98, .46); background: rgba(243, 181, 98, .1); }
.pill-paused, .pill-stopped { color: var(--red); border-color: rgba(240, 113, 120, .4); background: rgba(240, 113, 120, .1); }
.muted { color: var(--muted); font-size: 11px; }
.handoff-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 0; padding: 13px 15px; border: 1px solid rgba(243, 181, 98, .45); background: rgba(243, 181, 98, .1); border-radius: 10px; }
.handoff-banner div { display: grid; gap: 3px; }
.handoff-banner strong { color: var(--amber); font-size: 13px; }
.handoff-banner span { color: #e3c69a; font-size: 11px; }
.hidden { display: none !important; }
.browser-controls { display: flex; gap: 8px; align-items: center; padding: 15px 0; }
.control-caption { display: grid; gap: 3px; min-width: 150px; margin-right: 4px; }
.icon-button, .button, select { border: 1px solid var(--line); color: var(--text); background: var(--panel-2); border-radius: 7px; }
.icon-button { width: 34px; height: 32px; font-size: 18px; color: #c1d1e4; }
.icon-button:hover, select:hover { border-color: #55718f; background: #1c2a3d; }
.address-display { min-width: 0; display: flex; align-items: center; flex: 1; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #0e1621; }
.address-display code { overflow: hidden; color: #b7c6d8; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.address-dot, .live-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-right: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(99, 213, 208, .1); }
select { height: 32px; padding: 0 9px; font-size: 11px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 365px; gap: 18px; align-items: start; }
.viewport-card, .panel-section { border: 1px solid var(--line); border-radius: 11px; background: rgba(18, 26, 38, .92); box-shadow: var(--shadow); }
.viewport-card { min-width: 0; overflow: hidden; }
.viewport-head, .viewport-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 14px; background: #101925; }
.viewport-head { border-bottom: 1px solid var(--line); }
.viewport-head > div:first-child { display: flex; align-items: center; gap: 0; font-size: 10px; letter-spacing: .12em; }
.viewport-head .muted { margin-left: 11px; letter-spacing: 0; }
.viewport-hint, .viewport-foot { color: var(--muted); font-size: 10px; }
.viewport-stage { position: relative; display: flex; min-height: 620px; align-items: center; justify-content: center; overflow: hidden; background: #070b11; }
.browser-frame { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; image-rendering: auto; }
.empty-state { max-width: 360px; padding: 42px 26px; text-align: center; color: var(--muted); }
.empty-icon { color: var(--cyan); font-size: 46px; line-height: 1; margin-bottom: 16px; }
.empty-state h2 { color: var(--text); font-size: 17px; margin-bottom: 9px; }
.empty-state p { line-height: 1.6; font-size: 12px; margin-bottom: 18px; }
.empty-state code { color: var(--cyan); font-size: 10px; }
.pointer-marker { position: absolute; width: 19px; height: 19px; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 5px rgba(240, 113, 120, .62), 0 2px 12px #000; pointer-events: none; }
.human-overlay { position: absolute; inset: 0; cursor: crosshair; }
.viewport-foot { border-top: 1px solid var(--line); }
.viewport-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-panel { display: grid; gap: 12px; }
.dev-context { border-color: rgba(99, 213, 208, .28); background: linear-gradient(145deg, rgba(20, 39, 48, .95), rgba(18, 26, 38, .95)); }
.context-copy { color: #b7c7d5; font-size: 11px; line-height: 1.5; }
.scope-badge { color: var(--cyan); font-size: 8px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.context-grid > div { display: grid; gap: 4px; min-width: 0; padding-top: 8px; border-top: 1px solid rgba(99, 213, 208, .16); }
.context-grid strong, .context-grid code { overflow: hidden; color: #d9e5ef; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.context-grid code { color: #9fb4c8; }
.panel-section { padding: 15px; box-shadow: none; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.button { min-height: 36px; padding: 0 10px; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.button-primary { border-color: rgba(121, 169, 255, .45); background: rgba(121, 169, 255, .13); color: #bed3ff; }
.button-warn { border-color: rgba(243, 181, 98, .52); background: rgba(243, 181, 98, .13); color: #ffd59a; }
.button-secondary { color: #b7e2df; border-color: rgba(99, 213, 208, .4); background: rgba(99, 213, 208, .1); }
.button-danger { border-color: rgba(240, 113, 120, .5); background: rgba(240, 113, 120, .12); color: #ffb2b7; }
.button:hover { filter: brightness(1.18); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 13px; }
.metric-grid > div { display: grid; gap: 3px; padding: 9px 6px; border: 1px solid #223146; border-radius: 7px; background: #101925; text-align: center; }
.metric-grid strong { color: var(--cyan); font-size: 18px; letter-spacing: -.04em; }
.metric-grid span { color: var(--muted); font-size: 9px; }
.rating { color: var(--cyan); }
.rating.medium { color: var(--amber); }
.rating.high { color: var(--red); }
.reason-list { display: grid; gap: 7px; margin: 0; padding-left: 16px; color: #c0ccda; font-size: 11px; line-height: 1.35; }
.timeline-section { min-height: 280px; }
.timeline { display: grid; gap: 0; max-height: 285px; overflow: auto; margin: 0; padding: 0 2px 0 22px; list-style: none; border-left: 1px solid #304156; }
.timeline li { position: relative; padding: 0 0 11px 7px; font-size: 10px; line-height: 1.35; }
.timeline li::before { position: absolute; top: 3px; left: -27px; width: 7px; height: 7px; content: ""; border: 2px solid var(--cyan); border-radius: 50%; background: var(--panel); }
.timeline .time { color: var(--muted); margin-right: 5px; }
.timeline .actor { color: var(--cyan); font-weight: 800; font-size: 9px; letter-spacing: .05em; }
.timeline .event-details { color: #c1cedc; display: block; margin-top: 2px; }
.timeline-empty, .panel-empty { color: var(--muted); font-size: 11px; }
.timeline .timeline-empty::before { display: none; }
.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.findings-list { display: grid; gap: 9px; }
.finding-card { padding: 10px; border: 1px solid #2d3c51; border-radius: 8px; background: #101925; }
.finding-card .finding-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.finding-card strong { font-size: 11px; }
.finding-card .severity { color: var(--amber); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.finding-card p { color: #bfccda; font-size: 10px; line-height: 1.4; }
.finding-card code { color: var(--muted); font-size: 9px; }
.tech-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
pre { min-height: 115px; max-height: 180px; overflow: auto; margin: 0; padding: 10px; border: 1px solid #26364a; border-radius: 7px; background: #0c131d; color: #c0ccda; white-space: pre-wrap; word-break: break-word; font-size: 10px; line-height: 1.45; }
.footer-note { padding-top: 16px; color: var(--muted); font-size: 10px; text-align: right; }
@media (max-width: 1200px) { body { min-width: 0; } .shell { padding: 20px; } .workspace { grid-template-columns: minmax(0, 1fr) 320px; } .session-summary { gap: 12px; } }
