:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-raised: #f7f8fa;
  --panel-soft: #f1f2f5;
  --ink: #20232b;
  --ink-soft: #454a56;
  --muted: #696f7b;
  --faint: #696f7b;
  --line: #e7e9ee;
  --line-strong: #d4d7df;
  --accent: #6260df;
  --accent-wash: #f1f0fd;
  --warm: #6260df;
  --warm-wash: #f7f8fa;
  --danger: #b74343;
  --danger-wash: #fdf3f2;
  --success: #3b7c64;
  --success-wash: #eff8f3;
  --warning: #8b6a32;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body { min-width: 0; min-height: 100vh; margin: 0; color: var(--ink); background: var(--bg); }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button { color: inherit; }
.button { white-space: nowrap; flex-shrink: 0; }
a { color: inherit; }
::selection { background: #e5e4fa; }

.admin-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 0;
  width: 224px;
  height: 100vh;
  min-height: 0;
  padding: 20px 12px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #f7f8fa;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 7px; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--ink); filter: brightness(0); }
.brand-mark svg, svg.brand-mark { display: block; width: 32px; height: 32px; }
.brand span:last-child { display: grid; min-width: 0; gap: 2px; }
.brand strong { font-size: 15px; font-weight: 650; line-height: 1.2; }
.brand small { color: var(--muted); font-size: 13px; line-height: 1.2; }
.workspace-label { margin: 28px 8px 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.nav-group-label { margin: 20px 9px 7px; color: var(--faint); font-size: 13px; font-weight: 550; }
#admin-nav { display: grid; gap: 2px; min-width: 0; }
.nav-group { display: grid; gap: 2px; }
.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.nav-icon, .nav-item .icon { display: block; width: 18px; height: 18px; color: #747b88; }
.nav-label { min-width: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.nav-item small { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.nav-item:hover { color: var(--ink); background: #eceef2; }
.nav-item.active, .nav-item[aria-current="page"] { color: var(--ink); background: #e9eaf0; font-weight: 600; }
.nav-item.active .nav-icon, .nav-item[aria-current="page"] .nav-icon { color: var(--accent); }
.admin-identity { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: auto; padding: 16px 8px 10px; border-top: 1px solid var(--line); }
.admin-identity > div { display: grid; min-width: 0; gap: 3px; }
.admin-identity .admin-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #5553ad; background: #e9e8fa; font-size: 14px; font-weight: 650; }
.admin-identity span, .admin-identity small { color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.admin-identity strong { font-size: 14px; font-weight: 600; }
.rail-foot { display: grid; gap: 4px; padding: 5px 8px 0; color: var(--faint); font-size: 13px; overflow-wrap: anywhere; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  min-height: 64px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.sync { color: var(--muted); font-size: 13px; line-height: 1.4; }
.sync.ok { color: var(--success); }
.sync.error { color: var(--danger); }

main { grid-column: 2; grid-row: 2; width: 100%; max-width: 1600px; min-width: 0; margin: 0; padding: 32px 36px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 0 0 25px; }
.page-head > div:first-child { min-width: 0; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 550; }
#section-eyebrow { display: none; }
h1 { margin: 0; font-size: 28px; font-weight: 650; line-height: 1.25; }
h2, h3, p { letter-spacing: 0; }
.page-head p:last-child { max-width: 760px; margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.page-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.section-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-top: 4px; padding: 5px 9px; border-radius: 4px; color: var(--muted); background: #f4f5f7; font-size: 13px; line-height: 1.35; }
.section-state strong { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.section-body { min-width: 0; }

.notice { margin: 0 0 20px; padding: 12px 14px; border-left: 3px solid #b4a169; color: var(--ink-soft); background: #faf8f1; font-size: 14px; line-height: 1.55; }
.notice.error { border-left-color: var(--danger); color: #943737; background: var(--danger-wash); }
.empty { padding: 28px 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.loading { margin-top: 8px; }
.gate { max-width: 620px; margin: 10vh auto; padding: 0; }
.gate h1 { margin-bottom: 14px; }
.gate p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 8px; padding: 18px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-item { min-width: 0; min-height: 70px; padding: 0 20px; border-left: 1px solid var(--line); }
.summary-item:first-child { padding-left: 0; border-left: 0; }
.summary-item span, .summary-item small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.summary-item strong { display: block; margin: 7px 0 5px; color: var(--ink); font-size: 22px; font-weight: 650; line-height: 1.2; }
.summary-grid.compact-summary { margin: 0 0 16px; }
.summary-grid.source-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.band { min-width: 0; margin: 0; padding: 26px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.band-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.band-head > div:first-child { min-width: 0; }
.band-head h2 { margin: 0; color: var(--ink); font-size: 17px; font-weight: 650; line-height: 1.35; }
.band-head p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.band-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.band > p { color: var(--ink-soft); line-height: 1.6; }
.band > small { color: var(--muted); font-size: 13px; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 13px; }
th, td { height: 52px; padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; line-height: 1.45; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { height: 42px; color: var(--muted); background: #ffffff; font-size: 13px; font-weight: 550; white-space: nowrap; }
td { color: var(--ink-soft); overflow-wrap: anywhere; }
tbody tr:hover { background: #fafafb; }
.mono { color: var(--muted); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.cell-title { display: grid; gap: 4px; min-width: 140px; }
.cell-title strong { color: var(--ink); font-weight: 600; }
.cell-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.chip { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border: 0; border-radius: 4px; color: var(--muted); background: #f2f3f5; font-size: 13px; line-height: 1.35; white-space: nowrap; }
.chip.ready, .chip.connected, .chip.completed, .chip.published, .chip.known { color: var(--success); background: var(--success-wash); }
.chip.attention, .chip.partial, .chip.waiting, .chip.waiting-approval, .chip.building { color: #7b673e; background: #f8f6ef; }
.chip.failed, .chip.fault { color: var(--danger); background: var(--danger-wash); }
.chip.unknown, .chip.disabled, .chip.revoked, .chip.unavailable { color: var(--muted); background: #f2f3f5; }
.chip.manual, .chip.ai { color: #5a58b7; background: var(--accent-wash); }

.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { border-color: #bfc3ce; color: var(--ink); background: #f8f8fa; }
.button.primary { border-color: var(--accent); color: #ffffff; background: var(--accent); }
.button.primary:hover { border-color: #514fc9; background: #514fc9; }
.button.danger { border-color: #edd0ce; color: var(--danger); background: #ffffff; }
.button.danger:hover { background: var(--danger-wash); }
.button.compact { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.button.quiet { border-color: transparent; background: transparent; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
.icon { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; color: currentColor; }

input, textarea, select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: #ffffff; font-size: 14px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #6e7480; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
label { display: grid; gap: 7px; min-width: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.check-line { display: flex; align-items: center; gap: 9px; min-height: 36px; }
.check-line input { width: 16px; min-height: 16px; accent-color: var(--accent); }
.inline-controls { display: flex; align-items: center; gap: 7px; min-width: 0; }
.inline-controls select { width: auto; min-width: 100px; flex: 1 1 110px; }
.inline-controls input { width: auto; min-width: 120px; flex: 1 1 150px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 14px; }
.toolbar .muted { font-size: 13px; line-height: 1.5; }

.model-tabs { display: flex; align-items: stretch; max-width: 100%; overflow-x: auto; border-bottom: 1px solid var(--line); }
.model-tabs > div { display: flex; flex: 0 0 auto; gap: 24px; }
.model-tabs button { position: relative; flex: 0 0 auto; min-height: 48px; padding: 0 1px; border: 0; color: var(--muted); background: transparent; font-size: 14px; font-weight: 550; cursor: pointer; }
.model-tabs button span { margin-left: 6px; color: var(--faint); font-size: 13px; }
.model-tabs button:hover { color: var(--ink); }
.model-tabs button.active, .model-tabs button[aria-selected="true"] { color: var(--ink); }
.model-tabs button.active::after, .model-tabs button[aria-selected="true"]::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--accent); content: ""; }
.model-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 17px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.model-overview strong { margin-left: 5px; color: var(--ink); font-size: 14px; font-weight: 600; }
.allocation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; min-width: 0; padding-top: 24px; }
.allocation-main { min-width: 0; }
.allocation-head { margin-bottom: 14px; }
.allocation-head h2, .editor-heading h2, .editor-heading h3 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.35; }
.allocation-head p, .editor-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.allocation-columns, .allocation-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 90px; align-items: center; gap: 14px; min-width: 0; }
.allocation-columns { min-height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.allocation-list { min-width: 0; }
button.allocation-row, .allocation-row { position: relative; width: 100%; min-height: 54px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #ffffff; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer; }
.allocation-row:hover { background: #f8f8fb; }
.allocation-row.active, .allocation-row[aria-selected="true"] { background: #f3f2fd; box-shadow: inset 3px 0 0 var(--accent); }
.scene-label, .allocated-model { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.scene-label .icon { color: #777e8b; }
.allocated-model { color: var(--ink-soft); font-size: 13px; }
.allocation-source { color: var(--muted); font-size: 13px; line-height: 1.4; }
.allocation-source.fault { color: var(--danger); }
.allocation-note, .editor-footnote { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.model-avatar { display: inline-flex; flex: 0 0 22px; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.model-avatar img { display: block; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.model-avatar.neutral { color: var(--muted); background: #eef0f3; }
.model-avatar.neutral .icon { width: 14px; height: 14px; }
.model-vendor { display: flex; align-items: center; gap: 9px; min-width: 0; }
.model-vendor > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.model-catalog-table td { height: 56px; }
.assignment-editor { scroll-margin-top: 80px; position: sticky; top: 88px; align-self: start; width: 100%; min-width: 0; padding: 0 0 0 24px; border-left: 1px solid var(--line); }
.editor-heading { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.editor-heading > span { color: var(--muted); font-size: 13px; }
.editor-heading h2, .editor-heading h3 { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.editor-recommendation { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.editor-recommendation > div { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.editor-recommendation > div .icon { width: 16px; height: 16px; color: var(--accent); }
.editor-recommendation strong { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--ink); font-size: 14px; }
.editor-recommendation p { margin: 7px 0 0; color: var(--muted); }
.assignment-effective { display: grid; gap: 5px; min-width: 0; padding: 12px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.assignment-effective > span:first-child { color: var(--muted); }
.assignment-effective strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.assignment-effective .chip { justify-self: start; }
.assignment-editor .assignment-effective:has(.unavailable) { display: none; }
.assignment-fields { display: grid; gap: 14px; min-width: 0; margin-top: 16px; }
.assignment-fields select, .assignment-fields textarea, .assignment-fields input { width: 100%; }
.assignment-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 15px; }
.assignment-actions .button { width: 100%; min-height: 44px; }
.assignment-cost { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.assignment-evidence { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.assignment-evidence summary { color: var(--ink-soft); cursor: pointer; }
.assignment-evidence p { margin: 9px 0 0; }
.model-policy { display: grid; grid-template-columns: minmax(130px, 180px) minmax(130px, 160px) minmax(180px, 1fr) auto; align-items: end; gap: 14px; }
.model-policy .policy-state { align-self: center; color: var(--muted); font-size: 13px; line-height: 1.55; }
.model-policy .policy-state strong { display: block; color: var(--ink); font-size: 13px; }
.model-policy .policy-state span { display: block; }
.assignment-list { display: grid; gap: 0; margin-top: 15px; border-top: 1px solid var(--line); }
.assignment { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) minmax(220px, 1.35fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.assignment-title { display: grid; gap: 5px; min-width: 0; }
.assignment-title strong { font-size: 14px; }
.assignment-title small { color: var(--muted); font-size: 13px; }
.assignment-reason { grid-column: 1 / -1; margin: 0; }
.assignment select, .assignment input { min-height: 40px; }

.observer-sync { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 0 0 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.observer-sync-copy { min-width: 0; }
.observer-sync-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
.observer-sync-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.observer-sync-times { display: grid; grid-template-columns: repeat(3, minmax(112px, auto)); gap: 15px; margin: 0; }
.observer-sync-times dt { color: var(--muted); font-size: 13px; }
.observer-sync-times dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.memory-layout { display: grid; grid-template-columns: minmax(290px, .82fr) minmax(0, 1.4fr); gap: 28px; }
.memory-editor { position: sticky; top: 88px; align-self: start; }
.memory-list, .list-stack { display: grid; gap: 0; }
.memory-row { min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.memory-row header, .memory-row footer { display: flex; justify-content: space-between; gap: 12px; }
.memory-row h3 { margin: 0; font-size: 14px; }
.memory-row p { color: var(--ink-soft); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-row footer, .memory-row small { color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.search-results { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.task-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.task-filters input, .task-filters select { width: auto; min-width: 145px; }
.account-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.stack-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stack-row > div { min-width: 0; }
.stack-row strong { display: block; color: var(--ink); font-size: 14px; }
.stack-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }

.governance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.governance-card { display: grid; align-content: start; gap: 8px; min-width: 0; min-height: 100px; padding: 14px 16px; border-left: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; }
.governance-card:first-child { padding-left: 0; border-left: 0; }
a.governance-card:hover { color: var(--accent); background: #fafafb; }
.governance-card span, .governance-card small { color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.governance-card strong { color: var(--ink); font-size: 18px; }
.runtime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.runtime-card { min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.runtime-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.runtime-card header strong { color: var(--ink); font-size: 14px; }
.runtime-card p { margin: 10px 0 6px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.runtime-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.runtime-card > a { display: inline-block; margin-top: 12px; color: var(--accent); font-size: 13px; }
.source-grid .runtime-card { padding: 0 20px; border-left: 1px solid var(--line); border-bottom: 0; }
.metric-line { display: flex; flex-wrap: wrap; gap: 5px 11px; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.notice-inline { margin-top: 10px; padding: 8px 10px; border-left: 2px solid #c4ae7a; color: var(--ink-soft); background: #faf8f2; font-size: 13px; line-height: 1.5; }
.diagnostic-result, .meeting-detail pre, .detail-drawer pre { max-width: 100%; max-height: 420px; overflow: auto; margin: 12px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); background: #f7f8fa; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-drawer { margin-top: 12px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.detail-drawer summary, .assignment-evidence summary { cursor: pointer; }
.credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 20px; margin-top: 10px; }
.credential-grid > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.meeting-detail h3 { margin: 0 0 8px; font-size: 14px; }
.meeting-detail > p { color: var(--ink-soft); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

.audit-list { display: grid; border-top: 1px solid var(--line); }
.audit-row { display: grid; grid-template-columns: 110px minmax(150px, .55fr) minmax(180px, 1fr) minmax(180px, 1fr); align-items: start; gap: 12px; min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.audit-row time { color: var(--muted); }
.audit-row strong { color: var(--ink); }
.audit-row code, .audit-detail { color: var(--muted); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: min(420px, calc(100% - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #ffffff; box-shadow: 0 8px 24px rgb(32 35 43 / 12%); font-size: 13px; line-height: 1.5; }

@media (max-width: 1100px) {
  .allocation-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .assignment-editor { padding-left: 20px; }
  .model-policy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-policy .policy-state { grid-column: 1 / -1; }
  .runtime-grid { grid-template-columns: 1fr; gap: 0; }
  .governance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-card:nth-child(odd) { padding-left: 0; border-left: 0; }
  .memory-layout, .account-columns { grid-template-columns: 1fr; gap: 0; }
  .memory-editor { position: static; }
}

@media (max-width: 900px) {
  .allocation-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .assignment-editor { position: static; padding: 22px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .assignment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .summary-item:nth-child(odd) { padding-left: 0; border-left: 0; }
}

@media (max-width: 720px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .rail { position: static; grid-column: 1; grid-row: 1; width: 100%; height: auto; padding: 14px 16px 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 0 12px; }
  .workspace-label, .nav-group-label, .admin-identity, .rail-foot { display: none; }
  #admin-nav { display: flex; gap: 5px; width: 100%; max-width: 100%; overflow-x: auto; }
  .nav-group { display: contents; }
  .nav-item { display: flex; flex: 0 0 auto; width: auto; min-height: 44px; padding: 9px 10px; white-space: nowrap; }
  .nav-label { white-space: nowrap; }
  .nav-item small { display: none; }
  .topbar { grid-column: 1; grid-row: 2; min-height: 60px; padding: 0 16px; }
  .top-actions { gap: 5px; }
  .top-actions .button { min-height: 44px; }
  .sync { display: none; }
  main { grid-column: 1; grid-row: 3; padding: 24px 16px 64px; }
  .page-head { flex-wrap: wrap; gap: 12px; padding-bottom: 20px; }
  .section-state { margin-top: 0; }
  .model-tabs > div { gap: 20px; }
  .model-tabs button { min-height: 48px; }
  .band { padding: 22px 0; }
  .band-head { flex-wrap: wrap; gap: 12px; }
  .band-actions { justify-content: flex-start; }
  .form-grid, .model-policy { grid-template-columns: minmax(0, 1fr); }
  .form-grid .wide, .model-policy .policy-state { grid-column: auto; }
  .button, button.button, .button.compact, input, select { min-height: 44px; }
  .check-line { min-height: 44px; }
  .check-line input { min-height: 16px; }
  .observer-sync { grid-template-columns: 1fr; gap: 12px; }
  .observer-sync-times { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .inline-controls { flex-wrap: wrap; }
  .audit-row { grid-template-columns: 100px minmax(0, 1fr); }
  .audit-detail { grid-column: 1 / -1; }
  .gate-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .allocation-columns, .allocation-row { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 10px; }
  .allocation-columns > :nth-child(3), .allocation-row .allocation-source { display: none; }
  .assignment-actions { grid-template-columns: minmax(0, 1fr); }
  .summary-item { padding-right: 10px; padding-left: 10px; }
  .model-overview { gap: 8px 18px; }
  .breadcrumb { font-size: 13px; }
  .topbar { gap: 8px; }
  .top-actions .button { padding-right: 8px; padding-left: 8px; }
  .governance-grid { grid-template-columns: minmax(0, 1fr); }
  .governance-card { min-height: 0; padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .observer-sync-times { grid-template-columns: minmax(0, 1fr); }
  .assignment { grid-template-columns: minmax(0, 1fr); }
  .assignment-reason { grid-column: auto; }
}
