:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0d1117; color: #eef2f8; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at top right, #1c2b42, #0d1117 44rem); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { align-items: center; border-bottom: 1px solid #283241; display: flex; justify-content: space-between; padding: 1rem clamp(1rem, 4vw, 4rem); position: sticky; top: 0; z-index: 2; background: rgba(13, 17, 23, .88); backdrop-filter: blur(14px); }
.brand { background: none; border: 0; color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; padding: 0; }
.topbar-actions, .button-row, .inline-form, .topnav { align-items: center; display: flex; gap: .65rem; }
.topnav { margin-right: .8rem; }
.nav-button { background: transparent; border: 0; color: #aab5c5; padding: .35rem .2rem; }
.nav-button:hover, .nav-button:focus-visible { color: #fff; }
.status-pill, .status-text { color: #9da9bb; font-size: .82rem; }
.status-pill { border: 1px solid #394557; border-radius: 999px; padding: .35rem .7rem; }
.status-pill.healthy { border-color: #2f8b68; color: #78e0b3; }
.status-pill:not(.healthy) { border-color: #886c42; color: #ffcf85; }
.shell { margin: 0 auto; max-width: 1180px; padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 2rem); }
.section-heading { align-items: flex-end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 2rem; }
.section-heading.compact { align-items: center; margin-bottom: 1rem; }
.dashboard-heading { margin-bottom: 1.5rem; }
.dashboard-heading h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.04em; margin: 0; max-width: none; }
.eyebrow { color: #86aaff; font-size: .75rem; font-weight: 750; letter-spacing: .14em; margin: 0 0 .6rem; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 5rem); letter-spacing: -.06em; line-height: .96; margin-bottom: .9rem; max-width: 12ch; }
h2 { font-size: 1.05rem; margin-bottom: 0; }
.lead { font-size: 1.05rem; max-width: 48ch; }
.muted, .small-note { color: #aab5c5; line-height: 1.6; }
.small-note { font-size: .86rem; }
.button { border: 0; border-radius: .62rem; padding: .68rem 1rem; }
.button-primary { background: #89aaff; color: #0f1521; font-weight: 750; }
.button-primary:hover { background: #aac1ff; }
.button-quiet { background: #202a39; color: #dce7f7; }
.button-quiet:hover { background: #2d3a4e; }
.button-danger { background: #532c3a; color: #ffb9c8; }
.small-button { font-size: .8rem; padding: .45rem .7rem; }
.card { background: rgba(22, 29, 39, .88); border: 1px solid #2c3747; border-radius: 1rem; padding: 1.25rem; }
.operator-panel { margin-bottom: 1.5rem; max-width: 680px; }
.auth-state-row { align-items: baseline; display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.discovery-card { margin-top: 1rem; }
.discovery-item { gap: .7rem; }
.discovery-item .item-heading { width: 100%; }
button:disabled { cursor: not-allowed; opacity: .55; }
.form-card { display: grid; gap: 1rem; margin-bottom: 2.5rem; max-width: 680px; }
.stack-form { display: grid; gap: .8rem; }
.optional-fields { border-top: 1px solid #2c3747; color: #aab5c5; font-size: .86rem; padding-top: .7rem; }
.optional-fields summary { color: #d6dfec; }
.optional-fields label { margin-top: .8rem; }
label { color: #d6dfec; display: grid; font-size: .86rem; gap: .4rem; }
input, textarea, select { background: #10161f; border: 1px solid #3b485b; border-radius: .55rem; color: #fff; padding: .72rem; width: 100%; }
select { appearance: auto; }
input:focus, textarea:focus, select:focus { border-color: #86aaff; outline: 2px solid rgba(134, 170, 255, .18); }
.metric-grid { display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { display: grid; gap: .7rem; }
.metric span { color: #9eabc0; font-size: .82rem; }
.metric strong { font-size: 2rem; letter-spacing: -.05em; }
.list-heading { margin-top: 2.5rem; }
.project-list { display: grid; gap: .75rem; }
.project-card, .activity-item { align-items: center; background: rgba(22, 29, 39, .88); border: 1px solid #2c3747; border-radius: .85rem; color: inherit; display: flex; justify-content: space-between; padding: 1rem 1.15rem; text-align: left; width: 100%; }
.project-card:hover, .activity-item:hover { border-color: #6f91de; transform: translateY(-1px); }
.project-card > span:first-child { display: grid; gap: .35rem; }
.project-facts { align-items: stretch; display: grid; flex: 1; gap: .9rem; grid-template-columns: minmax(10rem, 1.5fr) repeat(4, minmax(7rem, 1fr)); }
.project-facts > span { display: grid; gap: .2rem; min-width: 0; }
.project-facts small { color: #7f8b9f; font-size: .72rem; text-transform: uppercase; }
.project-facts strong { overflow-wrap: anywhere; }
.secret-reveal-row { align-items: center; display: flex; gap: .65rem; min-height: 2rem; }
.secret-reveal-row output { color: #ffcf85; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; max-width: 100%; overflow-wrap: anywhere; }
.project-card-description { color: #aab5c5; font-size: .9rem; }
.activity-card { margin-top: 1rem; }
.activity-item { background: #151c26; border: 0; border-radius: .55rem; font-size: .86rem; }
.empty-state { color: #7f8b9f; margin: 0; padding: .5rem 0; }
.hidden { display: none !important; }
.error { color: #ff9d9d; min-height: 1.2rem; }
.back-link { background: none; border: 0; color: #9bb7ff; margin-bottom: 2rem; padding: 0; }
.project-header { margin-bottom: 2.2rem; }
.project-header h1, #run-title { font-size: clamp(2rem, 5vw, 3.7rem); max-width: none; }
.detail-grid, .run-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.stack-list, .file-list { display: grid; gap: .7rem; }
.list-item { background: #151c26; border-radius: .65rem; display: grid; gap: .4rem; padding: .8rem; }
.objective-item.selected { border: 1px solid #6f91de; }
.objective-select { align-items: center; background: none; border: 0; color: inherit; display: flex; gap: .75rem; justify-content: space-between; padding: 0; text-align: left; width: 100%; }
.objective-select > span:first-child { display: grid; gap: .35rem; }
.objective-select > span:last-child { color: #9bb7ff; font-size: .78rem; white-space: nowrap; }
.item-heading, .run-item, .file-item { align-items: center; display: flex; justify-content: space-between; gap: .75rem; }
.list-item span, .list-item small { color: #aab5c5; font-size: .86rem; }
.run-item { background: #151c26; border: 0; color: inherit; text-align: left; width: 100%; }
.run-item > span:first-child { display: grid; gap: .3rem; }
.file-item { background: #151c26; border: 0; border-radius: .5rem; color: #dce7f7; padding: .65rem .75rem; text-align: left; }
.file-item:hover { background: #202a39; }
.file-item small { color: #7f8b9f; }
.code-preview { background: #0b1017; border: 1px solid #2c3747; border-radius: .6rem; color: #cbd7e9; font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 22rem; min-height: 5rem; overflow: auto; padding: .85rem; white-space: pre-wrap; word-break: break-word; }
.state-panel { display: grid; gap: 1rem; }
.run-result { border: 1px solid #394557; border-radius: .7rem; display: grid; gap: .65rem; min-height: 9rem; padding: 1rem; }
.run-result strong { line-height: 1.45; }
.run-result small { color: #aab5c5; }
.result-passed, .result-succeeded { border-color: #2f8b68; background: rgba(47, 139, 104, .12); }
.result-failed, .result-blocked, .result-cancelled, .result-expired { border-color: #81505d; background: rgba(129, 80, 93, .14); }
.result-inconclusive, .result-pending { border-color: #886c42; background: rgba(136, 108, 66, .12); }
.result-state { font-size: .9rem; }
.phase-badge { background: #253554; border-radius: .6rem; color: #b8ccff; display: inline-block; font-size: 1.2rem; font-weight: 750; padding: .8rem 1rem; text-transform: uppercase; width: max-content; }
.facts { display: grid; gap: .55rem; grid-template-columns: max-content 1fr; margin: 0; }
.facts dt { color: #7f8b9f; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.event-list { display: grid; gap: .65rem; max-height: 36rem; overflow: auto; }
.event-item { background: #111821; border-left: 2px solid #5976b8; border-radius: .4rem; padding: .75rem; }
.event-item > div { display: flex; gap: 1rem; justify-content: space-between; }
.event-item time { color: #7f8b9f; font-size: .75rem; }
.event-item pre { color: #aab5c5; font: .75rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; margin: .65rem 0 0; white-space: pre-wrap; word-break: break-word; }
.terminal-toolbar { align-items: end; display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1rem; }
.terminal-toolbar label { display: grid; gap: .35rem; min-width: 8rem; }
.terminal-toolbar label:first-child { min-width: 13rem; }
.terminal-screen { background: #05080c; border: 1px solid #394557; border-radius: .7rem; color: #d7e4f6; font: .88rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 28rem; overflow: auto; padding: 1rem; white-space: pre-wrap; word-break: break-word; }
.terminal-screen:focus { border-color: #89aaff; outline: 2px solid rgba(137, 170, 255, .25); }
.terminal-screen pre { margin: 0; min-height: 26rem; }
.terminal-screen .ansi-bold { font-weight: 700; }
.terminal-screen .ansi-dim { opacity: .7; }
.terminal-screen .ansi-italic { font-style: italic; }
.terminal-screen .ansi-underline { text-decoration: underline; }
.terminal-screen .ansi-inverse { background: #d7e4f6; color: #05080c; }
.terminal-screen .ansi-fg-black { color: #111827; }
.terminal-screen .ansi-fg-red { color: #f87171; }
.terminal-screen .ansi-fg-green { color: #86efac; }
.terminal-screen .ansi-fg-yellow { color: #fde68a; }
.terminal-screen .ansi-fg-blue { color: #93c5fd; }
.terminal-screen .ansi-fg-magenta { color: #f0abfc; }
.terminal-screen .ansi-fg-cyan { color: #67e8f9; }
.terminal-screen .ansi-fg-white { color: #f8fafc; }
.terminal-screen .ansi-fg-bright-black { color: #94a3b8; }
.terminal-screen .ansi-fg-bright-red { color: #fca5a5; }
.terminal-screen .ansi-fg-bright-green { color: #bbf7d0; }
.terminal-screen .ansi-fg-bright-yellow { color: #fef08a; }
.terminal-screen .ansi-fg-bright-blue { color: #bfdbfe; }
.terminal-screen .ansi-fg-bright-magenta { color: #f5d0fe; }
.terminal-screen .ansi-fg-bright-cyan { color: #a5f3fc; }
.terminal-screen .ansi-fg-bright-white { color: #ffffff; }
.terminal-screen .ansi-bg-black { background: #111827; }
.terminal-screen .ansi-bg-red { background: #7f1d1d; }
.terminal-screen .ansi-bg-green { background: #14532d; }
.terminal-screen .ansi-bg-yellow { background: #713f12; }
.terminal-screen .ansi-bg-blue { background: #1e3a8a; }
.terminal-screen .ansi-bg-magenta { background: #701a75; }
.terminal-screen .ansi-bg-cyan { background: #164e63; }
.terminal-screen .ansi-bg-white { background: #e2e8f0; }
.terminal-screen .ansi-bg-bright-black { background: #334155; }
.terminal-screen .ansi-bg-bright-red { background: #991b1b; }
.terminal-screen .ansi-bg-bright-green { background: #166534; }
.terminal-screen .ansi-bg-bright-yellow { background: #854d0e; }
.terminal-screen .ansi-bg-bright-blue { background: #1d4ed8; }
.terminal-screen .ansi-bg-bright-magenta { background: #a21caf; }
.terminal-screen .ansi-bg-bright-cyan { background: #0e7490; }
.terminal-screen .ansi-bg-bright-white { background: #f1f5f9; }
.status-passed, .status-succeeded, .status-completed, .status-active, .status-healthy { color: #78e0b3; }
.status-ready { color: #8ec7ff; }
.status-in-progress { color: #ffcf85; }
.status-in-construction { color: #aab5c5; }
.status-failed, .status-blocked, .status-cancelled, .status-expired { color: #ff9d9d; }
.status-fresh, .status-read, .status-mutate { color: #8ec7ff; }
.status-error, .status-stale, .status-secret { color: #ffcf85; }
.view-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: -1rem 0 2rem; position: sticky; top: 4.25rem; z-index: 1; }
.view-nav a { background: #202a39; border: 1px solid #2c3747; border-radius: 999px; color: #cbd7e9; font-size: .8rem; padding: .42rem .7rem; text-decoration: none; }
.view-nav a:hover { border-color: #6f91de; color: #fff; }
.project-section { scroll-margin-top: 6rem; }
.summary-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: .8rem; }
.summary-item { background: #151c26; border-radius: .65rem; display: grid; gap: .35rem; padding: .8rem; }
.summary-item span, .summary-item small, .setting-item span { color: #aab5c5; font-size: .84rem; }
.criteria-columns { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .8rem; }
.criteria-list { color: #aab5c5; font-size: .84rem; margin: .45rem 0 0; padding-left: 1.1rem; }
.criteria-list li + li { margin-top: .35rem; }
details { color: #d6dfec; font-size: .84rem; margin-top: .35rem; }
summary { cursor: pointer; }
.setting-item { align-items: center; display: flex; justify-content: space-between; }
.run-reconnect-status { min-height: 1.2rem; }
.approval-item { border-left: 2px solid #d99d54; }
.audit-item { border-left: 2px solid #5976b8; }

@media (max-width: 760px) {
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading.compact { align-items: center; flex-direction: row; }
  .metric-grid, .detail-grid, .run-grid { grid-template-columns: 1fr; }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full-width { grid-column: auto; }
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: .75rem; }
  .topbar-actions { align-items: flex-end; flex-direction: column; gap: .3rem; }
  .topnav { margin-right: 0; order: 3; width: 100%; }
  .button-row { flex-wrap: wrap; }
  .view-nav { position: static; }
  .summary-grid, .criteria-columns { grid-template-columns: 1fr; }
  .setting-item { align-items: flex-start; flex-direction: column; gap: .25rem; }
}
