:root {
  color-scheme: light;
  --ink: #0e141b;
  --ink-soft: #263442;
  --muted: #687887;
  --muted-light: #8d9aa6;
  --canvas: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --surface-muted: #f3f6f8;
  --line: #dfe6ec;
  --line-strong: #cfd9e1;
  --sky: #4fa6e8;
  --sky-deep: #2f7fc4;
  --sky-soft: #eaf5fc;
  --yolk: #f4b400;
  --yolk-soft: #fff5d8;
  --green: #17915a;
  --green-soft: #e8f6ef;
  --red: #e4593d;
  --red-soft: #fcece8;
  --violet: #8069b6;
  --violet-soft: #f0ecf8;
  --shadow: 0 24px 80px rgba(30, 51, 67, .12), 0 2px 8px rgba(30, 51, 67, .06);
  --shadow-card: 0 8px 24px rgba(30, 51, 67, .055);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --rail-width: 72px;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(79, 166, 232, .13), transparent 27rem),
    linear-gradient(145deg, #f7f9fb, var(--canvas));
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; }

.voice-panel { display: grid; gap: 10px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); padding: 12px; }
.voice-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-soft); font-size: 11px; }
.voice-panel textarea { width: 100%; resize: vertical; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); padding: 9px; }

.controlled-demo-split { display: grid; grid-template-columns: minmax(330px, .78fr) minmax(500px, 1.22fr); align-items: start; gap: 16px; }
.controlled-demo-conversation { min-height: 100%; }
.controlled-run-form { display: grid; gap: 2px; margin-bottom: 16px; border: 1px solid #bbddf3; border-radius: 12px; background: var(--sky-soft); padding: 12px; }
.controlled-run-form .button { width: 100%; }
.controlled-browser { position: sticky; top: 14px; min-width: 0; overflow: hidden; border: 1px solid #b9cbd7; border-radius: var(--radius-lg); background: #edf2f5; box-shadow: var(--shadow-card); }
.controlled-browser-banner { background: #263442; color: #fff; font-size: 10px; font-weight: 850; letter-spacing: .04em; padding: 9px 14px; text-align: center; text-transform: uppercase; }
.controlled-browser:focus-visible, [data-outbound-view]:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; }
.controlled-browser-chrome { display: flex; align-items: center; gap: 5px; min-height: 35px; border-bottom: 1px solid #c4d1da; background: #e3e9ed; padding: 7px 10px; }
.controlled-browser-chrome > span { width: 8px; height: 8px; border-radius: 50%; background: #a4b4c0; }.controlled-browser-chrome > span:first-child { background: #de735d; }.controlled-browser-chrome > span:nth-child(2) { background: #dfad3d; }.controlled-browser-chrome > span:nth-child(3) { background: #57aa75; }
.controlled-browser-address { min-width: 0; flex: 1; margin-left: 5px; overflow: hidden; border: 1px solid #cbd6dd; border-radius: 6px; background: #fff; color: #455968; font-size: 8px; padding: 4px 8px; text-overflow: ellipsis; white-space: nowrap; }
.controlled-browser-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; background: #fff; padding: 13px 15px 8px; }.controlled-browser-header h2 { margin: 2px 0 0; font-size: 16px; }
.controlled-browser-live { min-height: 34px; margin: 0; border-bottom: 1px solid #d6e0e6; background: #fff; color: #455968; font-size: 10px; padding: 5px 15px 11px; }
.controlled-browser-viewport { position: relative; max-height: 570px; overflow: auto; padding: 12px; }
.controlled-browser-viewport .controlled-surface { min-height: 360px; box-shadow: none; }
.controlled-browser-viewport .panel { padding: 16px; }.controlled-browser-viewport .section-heading { margin-bottom: 12px; }.controlled-browser-viewport .section-heading h2 { font-size: 16px; }
.surface-results { margin-top: 14px; }
[data-outbound-view].is-controlled-focus::after { position: absolute; inset: 18px; pointer-events: none; border: 2px solid rgba(47, 127, 196, .8); border-radius: 13px; content: ""; animation: controlled-pulse 1.4s ease-in-out 2; }
.controlled-cursor { position: absolute; z-index: 3; right: 28px; bottom: 26px; width: 15px; height: 21px; pointer-events: none; transform: rotate(-18deg); opacity: 0; background: var(--ink); clip-path: polygon(0 0, 100% 70%, 58% 72%, 40% 100%); }
.controlled-browser[data-control-state="running"] .controlled-cursor { opacity: 1; animation: controlled-cursor 1.4s ease-in-out 2; }
.controlled-browser[data-control-state="approval_required"] { border-color: #d2a72e; box-shadow: 0 0 0 3px var(--yolk-soft); }.controlled-browser[data-control-state="approval_required"] .controlled-cursor { display: none; }
.controlled-browser[data-control-state="failed_to_safe_state"] { border-color: #d87a65; }.controlled-safe-fallback { margin: 0 12px 12px; border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; background: var(--red-soft); color: #843321; padding: 10px 12px; }.controlled-safe-fallback strong, .controlled-safe-fallback span { display: block; }.controlled-safe-fallback span { margin-top: 3px; font-size: 10px; }
.controlled-browser > .microcopy { margin: 0 14px 12px; text-align: center; }
.normal-dashboard-fallback { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }.normal-dashboard-fallback summary { cursor: pointer; color: var(--ink-soft); font-size: 11px; font-weight: 800; padding: 12px 14px; }.normal-dashboard-content { border-top: 1px solid var(--line); padding: 14px; }

@keyframes controlled-pulse { 0%, 100% { opacity: .35; transform: scale(.985); } 50% { opacity: 1; transform: scale(1); } }
@keyframes controlled-cursor { 0% { transform: translate(-70px, -35px) rotate(-18deg); } 100% { transform: translate(0, 0) rotate(-18deg); } }

:focus-visible {
  outline: 3px solid rgba(47, 127, 196, .8);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  border-radius: 9px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.experience-shell {
  width: min(1180px, calc(100vw - 48px));
  min-height: min(790px, calc(100vh - 48px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(207, 217, 225, .86);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rail {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 16px 10px 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--yolk);
  border-radius: 13px;
  box-shadow: 0 7px 16px rgba(244, 180, 0, .2);
}
.brand-mark svg { width: 100%; height: 100%; }

.rail-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  gap: 7px;
  margin-top: 32px;
}

.rail-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}
.rail-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rail-link > span {
  position: absolute;
  left: calc(100% + 12px);
  z-index: 8;
  width: max-content;
  max-width: 180px;
  transform: translateX(-4px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
  transition: opacity .15s ease, transform .15s ease;
}
.rail-link:hover, .rail-link:focus-visible { background: var(--surface-muted); color: var(--ink-soft); }
.rail-link:hover > span, .rail-link:focus-visible > span { opacity: 1; transform: translateX(0); }
.rail-link.is-current { background: var(--sky-soft); color: var(--sky-deep); }
.rail-link.is-current::before { content: ""; position: absolute; left: -10px; width: 3px; height: 22px; border-radius: 0 5px 5px 0; background: var(--sky-deep); }
.rail-button { margin-top: 10px; }

.workspace-frame { min-width: 0; background: var(--surface); }

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
}
.topbar-context, .topbar-actions, .operator { display: flex; align-items: center; }
.topbar-context { gap: 10px; min-width: 0; }
.topbar-actions { gap: 12px; }
.breadcrumb { margin: 0 0 1px; color: var(--muted-light); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.workspace-name { overflow: hidden; margin: 0; color: var(--ink-soft); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.command-button, .icon-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.command-button { min-width: 170px; gap: 8px; border-radius: 10px; padding: 8px 9px; text-align: left; }
.command-button svg, .icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.command-button span { flex: 1; }
kbd { border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); color: var(--muted-light); font-family: inherit; font-size: 10px; padding: 1px 5px; }
.icon-button { justify-content: center; width: 38px; height: 38px; border-radius: 10px; }
.mobile-nav-toggle { display: none; }
.operator { gap: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.operator-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sky-soft); color: var(--sky-deep); font-size: 11px; }

.experience-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-bottom: 1px solid #f3dfaa;
  background: var(--yolk-soft);
  color: #765c0b;
  padding: 7px 24px;
  font-size: 12px;
}
.experience-status span:last-child { color: #8f771e; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yolk); box-shadow: 0 0 0 4px rgba(244, 180, 0, .14); }

main { min-height: 650px; background: linear-gradient(180deg, #fbfcfd, #f7f9fb); padding: clamp(20px, 3vw, 34px); }
.page-stack { display: grid; gap: 20px; max-width: 1050px; margin: 0 auto; }

.hero-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #d6eaf8;
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, #edf7fd, #f7fbfe 62%, #fffaf0);
  padding: clamp(22px, 4vw, 38px);
}
.eyebrow { margin: 0 0 7px; color: var(--sky-deep); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 760px; margin: 0; font-size: clamp(28px, 4vw, 43px); line-height: 1.08; letter-spacing: -.04em; }
.hero-copy { max-width: 700px; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.status-pill { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 7px 10px; white-space: nowrap; }
.status-pill > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-neutral { background: var(--surface-muted); color: var(--muted); }
.status-caution { background: var(--yolk-soft); color: #866706; }
.status-ready { background: var(--green-soft); color: var(--green); }
.status-blocked { background: var(--red-soft); color: var(--red); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); padding: 17px; }
.kpi-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--kpi-color); }
.kpi-card > p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; }
.kpi-card > strong { display: block; margin-top: 7px; font-size: 27px; line-height: 1; letter-spacing: -.03em; }
.kpi-card > span { display: block; overflow: hidden; margin-top: 7px; color: var(--muted-light); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.kpi-sky { --kpi-color: var(--sky); }.kpi-yolk { --kpi-color: var(--yolk); }.kpi-violet { --kpi-color: var(--violet); }.kpi-green { --kpi-color: var(--green); }.kpi-red { --kpi-color: var(--red); }
.meter { height: 4px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: var(--surface-muted); }
.meter span { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: var(--kpi-color); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .85fr); gap: 16px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); padding: 20px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.section-heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.section-heading.compact { margin-bottom: 12px; }
.count-badge { display: grid; place-items: center; min-width: 27px; height: 27px; border-radius: 9px; background: var(--yolk-soft); color: #846506; font-size: 11px; font-weight: 800; }

.evidence-list, .unknown-list { display: grid; gap: 9px; }
.evidence-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); padding: 11px; }
.evidence-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; }
.evidence-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.evidence-verified { background: var(--green-soft); color: var(--green); }.evidence-caution { background: var(--yolk-soft); color: #8b6a00; }
.evidence-row strong, .evidence-row span { display: block; }
.evidence-row strong { font-size: 12px; }.evidence-row span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.evidence-row b { color: var(--ink-soft); font-size: 11px; }
.unknowns-panel { background: #fffdfa; }
.unknown-row { display: grid; gap: 7px; border-left: 2px solid var(--yolk); border-radius: 0 9px 9px 0; background: var(--yolk-soft); padding: 10px 11px; }
.unknown-row > span { width: max-content; border-radius: 99px; background: rgba(244, 180, 0, .16); color: #765c0b; font-size: 9px; font-weight: 850; letter-spacing: .08em; padding: 2px 6px; text-transform: uppercase; }
.unknown-row strong, .unknown-row small { display: block; }.unknown-row strong { font-size: 12px; }.unknown-row small { margin-top: 3px; color: #7d704a; font-size: 10px; }

.decision-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid #cfe7d9; border-radius: var(--radius-lg); background: linear-gradient(100deg, #f1faf5, #fff); box-shadow: var(--shadow-card); padding: 19px 20px; }
.decision-copy { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.decision-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--green-soft); color: var(--green); }
.decision-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.decision-card h3 { margin: 0; font-size: 16px; }.decision-card p:not(.eyebrow) { margin: 5px 0 7px; color: var(--muted); font-size: 12px; }
.authority { color: var(--green); font-size: 10px; font-weight: 800; }
.decision-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.decision-actions form { display: flex; margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; gap: 7px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 800; padding: 9px 13px; }
.button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.button-primary { background: var(--ink); color: white; }.button-secondary { border-color: var(--line-strong); background: white; color: var(--ink-soft); }
.button:hover { transform: translateY(-1px); }.button[aria-disabled="true"] { cursor: not-allowed; }

.auth-page { max-width: 920px; }
.auth-grid { grid-template-columns: minmax(0, 1.45fr) minmax(250px, .8fr); }
.auth-copy { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-action { display: flex; margin-top: 20px; }

.assistant-form { display: grid; gap: 8px; margin-top: 18px; }
.assistant-form label { color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.assistant-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.assistant-input-row input { min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 10px 12px; }
.assistant-input-row input:focus { border-color: var(--blue); outline: 3px solid var(--blue-soft); }
.assistant-prompts { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.assistant-prompts code { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); padding: 4px 7px; }
.assistant-reply { margin-top: 16px; border-left: 3px solid var(--sky); border-radius: 0 11px 11px 0; background: var(--sky-soft); padding: 12px 14px; }
.assistant-reply p { margin: 4px 0; }
.assistant-reply small { color: var(--muted); font-size: 9px; }
.assistant-panel .decision-actions { margin-top: 14px; }
.microcopy { margin-top: 8px; color: var(--muted); font-size: 9px; }
.logout-form { display: inline-flex; margin: 0; }
.logout-button { min-height: 40px; padding: 9px 14px; white-space: nowrap; }
.auth-login-form { align-items: stretch; flex-direction: column; gap: 10px; }
.auth-login-form label { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.auth-login-form label span { font-weight: 500; }
.auth-login-form input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
}
.auth-login-form input:focus { border-color: var(--blue); outline: 3px solid var(--blue-soft); }
.auth-alert { display: grid; gap: 3px; margin-bottom: 18px; border-left: 3px solid var(--yolk); border-radius: 0 10px 10px 0; background: var(--yolk-soft); color: #765c0b; padding: 11px 13px; }
.auth-alert strong { font-size: 12px; }.auth-alert span { font-size: 11px; }
.auth-alert-success { border-left-color: var(--green); background: var(--green-soft); color: #116f46; }
.auth-evidence { margin-bottom: 18px; }
.auth-role-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.auth-role-row > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.boundary-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.boundary-list li { position: relative; border-radius: 9px; background: rgba(244, 180, 0, .09); color: var(--ink-soft); font-size: 11px; font-weight: 700; padding: 10px 10px 10px 29px; }
.boundary-list li::before { position: absolute; top: 9px; left: 10px; color: #8b6a00; content: "—"; font-weight: 850; }
.boundary-note { margin: 14px 0 0; color: #7d704a; font-size: 10px; line-height: 1.55; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; width: max-content; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .035em; padding: 4px 7px; text-transform: uppercase; }
.tag-sky { border-color: #cce5f7; background: var(--sky-soft); color: var(--sky-deep); }
.tag-yolk { border-color: #f1dda1; background: var(--yolk-soft); color: #765c0b; }
.tag-green { border-color: #cae9d7; background: var(--green-soft); color: var(--green); }
.tag-red { border-color: #f3cec5; background: var(--red-soft); color: var(--red); }
.tag-violet { border-color: #ded5ef; background: var(--violet-soft); color: var(--violet); }

.work-list { display: grid; gap: 8px; }
.work-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(105px, .55fr) minmax(105px, .55fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 12px 13px; }
.work-row.is-highlighted { border-color: #bbddf3; background: #f7fbfe; box-shadow: 0 6px 18px rgba(47, 127, 196, .07); }
.work-primary { min-width: 0; }
.work-primary strong, .work-primary span, .work-cell strong, .work-cell span { display: block; }
.work-primary strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.work-primary span, .work-cell span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.work-cell strong { color: var(--ink-soft); font-size: 11px; }

.pipeline { display: grid; grid-template-columns: repeat(var(--pipeline-columns, 4), minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.pipeline-stage { position: relative; min-width: 0; padding-right: 12px; }
.pipeline-stage:not(:last-child)::before { content: ""; position: absolute; z-index: 0; top: 7px; left: 14px; width: calc(100% - 5px); height: 2px; background: var(--line); }
.pipeline-marker { position: relative; z-index: 1; display: block; width: 16px; height: 16px; border: 4px solid var(--surface); border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong); }
.pipeline-stage div { margin-top: 8px; }
.pipeline-stage strong, .pipeline-stage small { display: block; }
.pipeline-stage strong { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-stage small { margin-top: 2px; color: var(--muted-light); font-size: 9px; }
.pipeline-stage.is-complete .pipeline-marker { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.pipeline-stage.is-current .pipeline-marker { background: var(--sky); box-shadow: 0 0 0 4px var(--sky-soft); }
.pipeline-stage.is-blocked .pipeline-marker { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.pipeline-stage.is-unknown .pipeline-marker { background: var(--yolk); box-shadow: 0 0 0 4px var(--yolk-soft); }

.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.record { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); padding: 10px 11px; }
.record dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.record dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.record dd.is-unknown { color: #856600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
.data-table th { background: var(--surface-muted); color: var(--muted); font-size: 9px; letter-spacing: .06em; padding: 9px 11px; text-transform: uppercase; }
.data-table td { border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; padding: 10px 11px; vertical-align: middle; }
.data-table td strong, .data-table td span { display: block; }
.data-table td span { margin-top: 2px; color: var(--muted); }

.bar-list { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--surface-muted); }
.bar-track span { display: block; width: var(--bar-value); height: 100%; border-radius: inherit; background: var(--bar-color, var(--sky)); }
.bar-row b { min-width: 32px; color: var(--ink-soft); font-size: 10px; text-align: right; }

.graph-canvas { position: relative; min-height: 280px; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background-color: var(--surface-soft); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; padding: 24px; }
.graph-flow { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); align-items: center; gap: 34px; height: 100%; }
.graph-node { position: relative; z-index: 1; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); padding: 13px; }
.graph-node:not(:last-child)::after { content: ""; position: absolute; top: 50%; left: calc(100% + 1px); width: 35px; border-top: 2px solid var(--sky); }
.graph-node strong, .graph-node small { display: block; }.graph-node strong { margin-top: 7px; font-size: 11px; }.graph-node small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.graph-node.is-error { border-color: #edaa9b; background: #fffafa; }

.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.health-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); padding: 11px; }
.health-card > span { display: block; color: var(--muted); font-size: 9px; font-weight: 750; }.health-card > strong { display: block; margin-top: 5px; font-size: 13px; }.health-card > small { display: block; margin-top: 3px; color: var(--muted-light); font-size: 9px; }

.note { border-left: 3px solid var(--sky); border-radius: 0 10px 10px 0; background: var(--sky-soft); color: var(--ink-soft); font-size: 11px; padding: 10px 12px; }
.note-caution { border-left-color: var(--yolk); background: var(--yolk-soft); }.note-danger { border-left-color: var(--red); background: var(--red-soft); }

.preview-toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; transform: translateY(18px); opacity: 0; border: 1px solid #354453; border-radius: 11px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; padding: 12px 15px; transition: opacity .18s ease, transform .18s ease; }
.preview-toast.is-visible { transform: translateY(0); opacity: 1; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 900px) {
  .controlled-demo-split { grid-template-columns: 1fr; }
  .controlled-browser { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .decision-card { align-items: flex-start; flex-direction: column; }
  .work-row { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(90px, .5fr)); }
  .work-row > :last-child { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 820px) {
  .auth-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .experience-shell { width: 100%; min-height: 100vh; margin: 0; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 230px; transform: translateX(-105%); align-items: stretch; border-right: 1px solid var(--line-strong); box-shadow: var(--shadow); transition: transform .2s ease; }
  .nav-is-open .rail { transform: translateX(0); }
  .brand-mark { margin-left: 6px; }
  .rail-nav { margin-top: 24px; }
  .rail-link { display: flex; justify-content: flex-start; gap: 12px; padding: 0 13px; }
  .rail-link > span { position: static; opacity: 1; transform: none; background: transparent; color: inherit; padding: 0; pointer-events: auto; }
  .rail-link.is-current::before { left: -10px; }
  .mobile-nav-toggle { display: inline-flex; }
  .command-button { min-width: 38px; width: 38px; justify-content: center; }
  .command-button span, .command-button kbd, .operator > span:last-child { display: none; }
  .topbar { padding-inline: 14px; }
  .experience-status { align-items: flex-start; flex-wrap: wrap; padding-inline: 16px; }
  main { padding: 18px 14px 30px; }
  .hero-panel { flex-direction: column; }
  .work-row { grid-template-columns: 1fr 1fr; }
  .work-primary { grid-column: 1 / -1; }
  .pipeline { overflow-x: auto; grid-template-columns: repeat(var(--pipeline-columns, 4), minmax(120px, 1fr)); padding: 4px; }
  .record-grid, .health-grid { grid-template-columns: 1fr; }
  .graph-flow { grid-template-columns: 1fr; gap: 28px; }
  .graph-node:not(:last-child)::after { top: calc(100% + 1px); left: 50%; width: 0; height: 29px; border-top: 0; border-left: 2px solid var(--sky); }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .decision-actions { width: 100%; flex-direction: column-reverse; }
  .decision-actions form { width: 100%; }
  .button { width: 100%; }
  .experience-status span:last-child { flex-basis: 100%; padding-left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .controlled-cursor, [data-outbound-view].is-controlled-focus::after { display: none !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #a8b4bd; --line-strong: #7c8993; }
  .status-pill, .unknown-row, .experience-status { border: 1px solid currentColor; }
}
