:root {
  font: 15px/1.46667 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d1c1d;
  background: #fff;
  --shell: #fff;
  --sidebar: #f7f7f8;
  --line: #e5e5e5;
  --muted: #616061;
  --green: #007a5a;
  --radius: 8px;
  --surface-subtle: #f8f8f8;
  --space: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select, textarea { font: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; background: #fff; border: 1px solid #ccc; border-radius: 8px; min-height: 32px; padding: 6px 12px; color: inherit; font-size: 13px; }
button:hover { background: #f8f8f8; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .table-wrap:focus-visible { outline: 3px solid #1d9bd1; outline-offset: 2px; }
a { color: #1264a3; }
.top { height: 40px; display: flex; align-items: center; gap: 24px; padding: 0 16px; color: #454245; background: var(--shell); border-bottom: 1px solid var(--line); font-size: 12px; }
.brand { width: 280px; flex-shrink: 0; color: #1d1c1d; text-decoration: none; font-size: 22px; font-weight: 700; }
.brand span { color: #611f69; }
.brand b { font-size: 14px; margin-left: 7px; }
.workspace-path { flex: 1; max-width: 660px; padding: 4px 16px; background: #f7f7f8; border: 1px solid #e5e5e5; border-radius: 6px; }
.divider { margin: 0 10px; opacity: .5; }
.demo { margin-left: auto; color: #616061; white-space: nowrap; font-size: 10px; }
.layout { display: grid; grid-template-columns: 68px 254px minmax(0, 1fr) 310px; height: calc(100dvh - 40px); padding-right: 5px; padding-bottom: 5px; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 10px 6px 15px; color: #454245; background: #f3f1f4; border-right: 1px solid var(--line); }
.workspace-mark { display: grid; place-items: center; width: 36px; height: 36px; background: #f2edf3; color: #4a154b; border-radius: 8px; text-decoration: none; font-size: 23px; font-weight: 750; margin-bottom: 3px; }
.rail-button { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 54px; padding: 6px 4px; background: transparent; color: inherit; border: 0; font-size: 11px; }
.rail-button svg { width: 32px; height: 32px; padding: 5px; fill: none; stroke: currentColor; stroke-width: 1.7; border-radius: 9px; }
.rail-button:hover { background: #eae5ec; }
.rail-button.active svg { background: #e8dbed; color: #611f69; }
.rail-profile { margin-top: auto; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 8px; background: #e8dbed; color: #611f69; font-weight: 700; }
.nav { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 16px 8px; color: #454245; background: var(--sidebar); border-right: 1px solid var(--line); border-radius: 0; }
.workspace { display: flex; gap: 10px; align-items: center; padding: 0 10px 19px; color: #1d1c1d; }
.workspace strong { display: block; font-size: 19px; font-weight: 750; }
.workspace strong span { margin-left: 6px; font-size: 15px; }
.workspace small { display: block; margin-top: 3px; font-size: 11px; color: #616061; }
.logo { display: none; }
.workspace-note { border: 1px solid #e5e5e5; border-radius: 8px; padding: 11px 10px; background: #fff; margin-bottom: 18px; font-size: 13px; }
.eyebrow { font-size: 12px; color: var(--muted); margin: 16px 0 9px; }
.nav .eyebrow { color: #616061; padding: 0 8px; }
.eyebrow small { float: right; font-size: 10px; opacity: .8; }
.group { display: block; width: 100%; padding: 3px 12px; margin: 2px 0; min-height: 28px; background: transparent; border: 0; border-radius: 6px; text-align: left; color: #454245; font-size: 15px; }
.group:hover { background: #eaeaea; }
.group.selected { color: #3b173f; background: #f4e8f7; font-weight: 650; }
.nav-bottom { margin-top: auto; padding: 35px 8px 4px; font-size: 11px; color: #616061; }
.nav-bottom select { display: block; width: 100%; padding: 7px; margin: 7px 0; border: 1px solid #ccc; border-radius: 6px; background: #fff; color: #1d1c1d; font-size: 12px; }
.nav-bottom p { font-size: 10px; color: #616061; }
.nav-bottom a { color: #1264a3; text-underline-offset: 3px; font-size: 11px; }
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; overflow: hidden; }
.channel-header > div { min-width: 0; overflow-wrap: anywhere; }
.channel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px 12px; }
.channel-header .eyebrow { display: none; }
h1 { font-size: 20px; line-height: 1.3; margin: 0 0 5px; font-weight: 750; letter-spacing: -.3px; }
.channel-header p:last-child { margin: 0; font-size: 11px; color: var(--muted); }
.primary { background: var(--green); color: #fff; border-color: var(--green); font-weight: 650; }
.primary:hover { background: #006c50; }
#takeover { font-size: 12px; white-space: nowrap; }
.tabs { display: flex; align-items: center; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs button { height: 38px; padding: 8px 0; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs button.selected { color: #1d1c1d; border-bottom-color: #7b3989; border-radius: 8px 8px 0 0; font-weight: 700; }
.tabs button span { background: #f1f1f1; border-radius: 4px; padding: 1px 5px; margin-left: 3px; font-size: 10px; }
.tabs > span { margin-left: auto; font-size: 10px; color: #616061; }
#notice { padding: 0 20px; font-size: 12px; color: #974b00; }
#notice:not(:empty) { padding-top: 8px; padding-bottom: 8px; background: #fff9eb; }
#content { flex: 1; min-height: 130px; overflow-y: auto; padding: 22px 20px; }
.date { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; margin: 0 0 26px; text-align: center; }
.date::before, .date::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.message { display: flex; gap: 10px; padding: 8px 0; margin-bottom: 4px; }
.message-body { min-width: 0; }
.message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.avatar { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 7px; background: #e8d9ee; color: #5f296b; font-weight: 650; }
.message.customer .avatar { background: #dcece7; color: #246957; }
.message strong { font-size: 15px; }
.message small { font-size: 12px; color: var(--muted); }
.message p { margin: 3px 0 0; font-size: 15px; line-height: 1.46667; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.note { background: #fff9e9; border-left: 3px solid #e8bf67; border-radius: 3px; padding: 10px; }
.message.note .avatar { background: #f4e4b9; color: #79591b; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 4px; color: #5e356a; background: #f1e8f5; font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.chip--success { background: #e3f3eb; color: #176344; }
.chip--warning { background: #fff4d7; color: #794600; }
.muted { color: var(--muted); font-size: 12px; }
#composer { flex-shrink: 0; margin: 10px 20px 20px; border: 1px solid #a9a9a9; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 1px #00000008; }
#composer:focus-within { border-color: #616061; }
.composer-head, .composer-foot { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 11px; background: #f8f8f8; }
.composer-head { min-height: 38px; padding: 6px 12px; flex-wrap: wrap; }
.composer-head label { color: var(--muted); }
.composer-head select { border: 0; background: transparent; color: #454245; font-size: 12px; }
.composer-head strong { margin-left: auto; font-size: 11px; font-weight: 500; }
textarea { display: block; resize: vertical; width: 100%; border: 0; padding: 8px 12px; min-height: 60px; max-height: 220px; outline: none; background: #fff; color: #1d1c1d; }
.composer-foot { min-height: 40px; padding: 4px 8px; background: #fff; flex-wrap: wrap; }
.composer-foot > span { margin-right: auto; color: var(--muted); font-size: 10px; }
.composer-foot button { font-size: 12px; }
#save-draft { background: transparent; border-color: transparent; color: var(--muted); }
#save-draft:hover { background: #f3f3f3; }
#composer.internal { border-color: #bd9448; }
#composer.internal .composer-head { background: #fff4d7; }
.details { min-width: 0; min-height: 0; overflow-y: auto; border-left: 1px solid var(--line); background: #fff; border-radius: 0 7px 7px 0; }
.detail-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 49px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
.detail-header strong { font-size: 15px; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; padding: 0; border: 0; font-size: 24px; color: var(--muted); }
.detail-section { padding: var(--space); border-bottom: 1px solid var(--line); }
.detail-section > .eyebrow { margin: 0 0 8px; }
.details h2 { font-size: 18px; font-weight: 700; line-height: 1.46667; margin: 0 0 12px; overflow-wrap: anywhere; }
.details h3 { font-size: 13px; margin: 0 0 12px; }
.properties { display: grid; grid-template-columns: minmax(76px, .8fr) minmax(0, 1.2fr); gap: 12px; font-size: 13px; margin: 16px 0; }
.properties dt { color: var(--muted); }
.properties dd { margin: 0; overflow-wrap: anywhere; }
.task-complete { display: block; width: 100%; margin-top: 16px; min-height: 36px; font-size: 15px; font-weight: 700; }
.task-complete:disabled { opacity: 1; background: #f8f8f8; color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.detail-section > button:not(.task-complete) { margin-top: 12px; width: 100%; }
.disclosure { border-bottom: 1px solid var(--line); }
.disclosure summary { cursor: pointer; padding: 14px 16px; font-size: 13px; font-weight: 650; }
.disclosure summary:hover { background: var(--surface-subtle); }
.disclosure-body { display: grid; gap: 8px; padding: 0 16px 16px; }
.disclosure-body p { margin: 0 0 4px; }
.disclosure-body button { width: 100%; text-align: left; }
.audit { padding: 0 20px 12px 32px; margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.audit li { margin: 6px 0; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.list-heading h2 { font-size: 22px; line-height: 1.3; margin: 0 0 8px; }
.list-heading p { font-size: 13px; color: var(--muted); margin: 0; }
.count { display: inline-block; vertical-align: middle; border-radius: 4px; padding: 1px 6px; background: #f1f1f1; color: var(--muted); font-size: 12px; font-weight: 500; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.task-table { width: 100%; min-width: 410px; border-collapse: collapse; font-size: 13px; }
.task-table th { background: var(--surface-subtle); color: var(--muted); font-weight: 500; text-align: left; white-space: nowrap; }
.task-table th, .task-table td { height: 48px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.task-table tr:last-child td { border-bottom: 0; }
.task-table tbody tr:hover { background: #f8f8f8; }
.task-table td:first-child { min-width: 180px; }
.task-link { border: 0; background: transparent; padding: 0; text-align: left; font-weight: 600; overflow-wrap: anywhere; }
.task-link:hover { background: none; color: #1264a3; text-decoration: underline; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space); background: #fff; min-width: 0; overflow-wrap: anywhere; }
.card + .card { margin-top: 12px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.card-heading h3, .card h2 { font-size: 15px; font-weight: 700; margin: 0; }
.card p { font-size: 13px; line-height: 1.55; margin: 12px 0 0; white-space: pre-wrap; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-actions button { font-size: 12px; padding: 4px 8px; }
.card-grid { display: grid; gap: 16px; max-width: 760px; }
.card-grid > .muted { margin: -8px 0 0; }
.card-grid .card + .card { margin-top: 0; }
.details > .card { margin: 16px; }
.empty-state { padding: 24px 16px; color: var(--muted); text-align: center; font-size: 13px; }
.layout:has(.details[hidden]) { grid-template-columns: 68px 254px minmax(0, 1fr); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -60px; left: 15px; background: #fff; padding: 10px; z-index: 5; }
.skip-link:focus { top: 8px; }
@media (max-width: 1150px) {
  .layout { grid-template-columns: 60px 205px minmax(0, 1fr) 270px; }
  .layout:has(.details[hidden]) { grid-template-columns: 60px 205px minmax(0, 1fr); }
  .brand { width: 225px; }
  .tabs { gap: 12px; }
  .tabs > span { max-width: 100px; }
}
@media (max-width: 950px) {
  .layout { grid-template-columns: 60px 205px minmax(0, 1fr); height: auto; min-height: calc(100dvh - 40px); }
  .rail, .nav { grid-row: 1 / 3; }
  main { min-height: calc(100dvh - 45px); border-radius: 0 7px 0 0; }
  .details { grid-column: 3; border-top: 1px solid var(--line); border-radius: 0 0 7px 0; }
  #content { max-height: 60vh; }
  .demo { font-size: 9px; }
}
@media (max-width: 680px) {
  .top { gap: 10px; padding: 0 12px; }
  .brand { width: auto; }
  .brand b { font-size: 12px; }
  .workspace-path { display: none; }
  .demo { font-size: 9px; }
  .layout, .layout:has(.details[hidden]) { display: block; padding: 0; }
  .rail { flex-direction: row; gap: 12px; padding: 5px 12px; }
  .workspace-mark { width: 28px; height: 28px; font-size: 18px; margin: 0; }
  .rail-button { flex-direction: row; width: auto; padding: 0 5px; font-size: 11px; }
  .rail-button svg { width: 27px; height: 27px; }
  .rail-profile { display: none; }
  .nav { padding: 9px 12px; border-radius: 0; }
  .workspace, .workspace-note, .nav .eyebrow, .nav-bottom p { display: none; }
  #groups { display: flex; gap: 6px; }
  .group { font-size: 13px; padding: 6px 8px; }
  .nav-bottom { padding: 7px 0 0; display: flex; gap: 8px; align-items: center; font-size: 10px; }
  .nav-bottom select { width: 160px; margin: 0; padding: 5px; font-size: 11px; }
  .nav-bottom a { margin-left: auto; font-size: 9px; }
  main { min-height: 65vh; border-radius: 0; }
  .channel-header { padding: 16px 14px 12px; }
  h1 { font-size: 19px; }
  .tabs { padding: 0 14px; gap: 12px; flex-wrap: wrap; }
  .tabs > span { max-width: none; margin-left: 0; padding-bottom: 6px; flex-basis: 100%; }
  #content { padding: 20px 14px; max-height: 60vh; }
  #composer { margin: 8px 12px 16px; }
  .composer-head { flex-wrap: wrap; }
  .composer-head strong { flex-basis: 100%; margin: 0; }
  .composer-foot > span { display: none; }
  .composer-foot { justify-content: flex-end; }
  .details { border-left: 0; border-radius: 0; }
  .detail-header { position: static; }
  .nav-bottom { flex-wrap: wrap; }
  .composer-head select { max-width: 100%; }
  .properties { grid-template-columns: minmax(90px, .6fr) minmax(0, 1.4fr); }
}

/* Read-only workspace pages reuse the compact list and status components. */
input { font: inherit; color: inherit; }
input:focus-visible { outline: 3px solid #1d9bd1; outline-offset: 2px; }
.workspace-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 16px; font-size: 13px; }
.workspace-filter input, .workspace-filter select { min-width: 0; max-width: 100%; padding: 7px 10px; border: 1px solid #a9a9a9; border-radius: 8px; background: #fff; }
.workspace-filter input { width: 240px; }
.workspace-results > .muted { margin: 0 0 12px; }
.workspace-table { min-width: 540px; }
.workspace-table td { overflow-wrap: anywhere; }
.rail { gap: 12px; overflow-y: auto; }
#account-status { display: block; overflow-wrap: anywhere; margin-bottom: 8px; }
#logout { margin-bottom: 12px; }
@media (max-width: 680px) {
  .rail { overflow-x: auto; flex-wrap: nowrap; gap: 6px; }
  .rail-button, .workspace-mark { flex-shrink: 0; }
  .workspace-filter { align-items: stretch; }
  .workspace-filter input { width: 100%; }
  .workspace-filter label { flex-basis: 100%; }
  .workspace-filter select { flex: 1; }
  #account-status { margin: 0; }
  #logout { margin: 0; }
}

/* Source review and isolated simulation share the white workspace components. */
a.rail-button { text-decoration: none; text-align: center; }
a.rail-button.active { color: #3b173f; background: #f4e8f7; border-radius: 6px; }
.source-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-bottom: 20px; }
.source-summary .card { margin: 0; }
.test-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.test-field input, .test-field select { max-width: 100%; min-width: 0; }
.detail-section > button, .detail-section > .test-field { margin-top: 12px; }
.detail-section p, .card p { overflow-wrap: anywhere; white-space: pre-wrap; }
.simulation-nodes > h2 { font-size: 15px; margin: 20px 0 12px; }
.simulation-nodes .card { margin-bottom: 12px; }
.dependency-options { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 12px; }
.dependency-options .test-field { flex-direction: row-reverse; justify-content: flex-end; align-items: center; }
#context-list .group { width: 100%; text-align: left; overflow-wrap: anywhere; }
@media (max-width: 680px) { #context-list { display: flex; overflow-x: auto; gap: 6px; } #context-list .group { flex-shrink: 0; width: auto; } }

.content-reveal-secret { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 20rem; overflow: auto; padding: 12px; background: #f8f8f8; border: 1px solid #e5e5e5; font: inherit; }
.location-skeleton { margin:16px 20px; padding:16px; border-left:3px solid var(--line,#e5e5e5); color:var(--muted,#616061); font-size:13px; min-height:88px; background:var(--surface,#f8f8f8); }
