:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --surface-muted: #f9f9fb;
  --surface-strong: #eff1f4;
  --line: #dedfe3;
  --line-strong: #c8cad0;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #909096;
  --blue: #0066cc;
  --blue-soft: #e8f2ff;
  --green: #1d7f4e;
  --green-soft: #e8f6ee;
  --amber: #9a5b00;
  --amber-soft: #fff4df;
  --red: #c22d2d;
  --red-soft: #fcebec;
  --terminal: #17191d;
  --terminal-line: #2b2e34;
  --terminal-ink: #e6e8ec;
  --shadow-small: 0 1px 2px rgb(0 0 0 / 4%), 0 5px 18px rgb(0 0 0 / 4%);
  --shadow-large: 0 18px 60px rgb(0 0 0 / 12%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(0 102 204 / 24%);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background: var(--canvas);
}

.login-panel {
  width: min(100%, 370px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.product-mark,
.brand-mark {
  display: grid;
  color: white;
  background: var(--ink);
  place-items: center;
}

.product-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  border-radius: 8px;
}

.product-mark svg {
  width: 22px;
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel h1 {
  font-size: 26px;
  font-weight: 680;
  line-height: 32px;
}

.login-panel > p {
  margin-top: 4px;
  color: var(--muted);
}

.login-panel form {
  margin-top: 30px;
}

.login-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.password-field {
  position: relative;
}

.password-field svg {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 18px;
  color: var(--muted);
}

.password-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.primary-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  padding: 0 14px 0 16px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: var(--ink);
  font-weight: 620;
}

.primary-command:hover {
  background: #343437;
}

.primary-command svg {
  width: 18px;
}

.form-error {
  margin-top: 13px !important;
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
}

.app {
  min-height: 100vh;
}

.app-header {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 218px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.brand-mark svg {
  width: 18px;
}

.brand-copy {
  display: grid;
  margin-left: 10px;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 680;
  line-height: 17px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
}

.header-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.live-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.live-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.header-actions {
  display: flex;
  gap: 5px;
  margin-left: 16px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  place-items: center;
}

.icon-button:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-muted);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button.spinning svg {
  animation: spin 0.8s linear infinite;
}

.app-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
  padding-top: 60px;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 60px;
  bottom: 0;
  left: 0;
  display: flex;
  width: 218px;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fbfbfc;
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.sidebar nav button,
.mobile-nav button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.sidebar nav button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  text-align: left;
}

.sidebar nav button:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.sidebar nav button.active {
  color: var(--ink);
  background: #e8e9ed;
  font-weight: 620;
}

.sidebar nav svg {
  width: 17px;
  margin-right: 11px;
}

.sidebar-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 14px 11px 4px;
  color: var(--faint);
  font-size: 11px;
  line-height: 15px;
}

.mode-indicator {
  color: var(--blue);
  font-weight: 650;
}

.workspace {
  grid-column: 2;
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 0 auto;
  padding: 38px clamp(24px, 4vw, 64px) 80px;
}

.initial-loader {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 220px;
  color: var(--muted);
  justify-content: center;
}

.loader-ring {
  width: 19px;
  height: 19px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-header h1,
.page-header p {
  margin: 0;
}

.page-header h1 {
  font-size: 27px;
  font-weight: 680;
  line-height: 34px;
}

.page-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.header-stat {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}

.summary-cell,
.metric-cell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.summary-cell {
  min-height: 112px;
  padding: 18px;
}

.summary-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.summary-cell-top span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-cell-top svg {
  width: 17px;
  flex: 0 0 auto;
}

.summary-value {
  display: block;
  margin-top: 14px;
  font-size: 25px;
  font-weight: 680;
  line-height: 30px;
}

.summary-note {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.alert-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid #efcc91;
  border-radius: 6px;
  color: #714200;
  background: var(--amber-soft);
}

.alert-row.critical {
  border-color: #edb8bc;
  color: #8a2027;
  background: var(--red-soft);
}

.alert-row svg {
  width: 17px;
  margin-top: 1px;
}

.alert-row strong,
.alert-row span {
  display: block;
}

.alert-row strong {
  font-size: 13px;
}

.alert-row span {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.82;
}

.section-band {
  margin-top: 36px;
}

.section-band:first-of-type {
  margin-top: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.section-title h2,
.section-title p {
  margin: 0;
}

.section-title h2 {
  font-size: 17px;
  font-weight: 670;
  line-height: 22px;
}

.section-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.host-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.host-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  place-items: center;
}

.host-icon svg {
  width: 17px;
}

.host-copy {
  min-width: 0;
}

.host-copy h2,
.host-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge,
.risk-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.status-badge.online,
.status-badge.complete {
  border-color: #b9dfca;
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.offline,
.status-badge.critical {
  border-color: #edb8bc;
  color: var(--red);
  background: var(--red-soft);
}

.status-badge.waiting,
.status-badge.in-progress {
  border-color: #efcc91;
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-cell {
  min-height: 96px;
  padding: 14px;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.metric-label svg {
  width: 15px;
}

.metric-value {
  display: block;
  margin-top: 9px;
  font-size: 18px;
  font-weight: 670;
}

.progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 5px;
  margin-top: 11px;
  border-radius: 3px;
  background: var(--surface-strong);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 260ms ease;
}

.progress-fill.good { background: var(--green); }
.progress-fill.warn { background: #d17a00; }
.progress-fill.bad { background: var(--red); }

.data-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.data-table td {
  height: 52px;
  padding: 8px 13px;
  border-bottom: 1px solid #ececef;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fafafd;
}

.service-name {
  display: flex;
  align-items: center;
  min-width: 0;
}

.service-dot {
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--red);
}

.service-dot.active { background: var(--green); }

.service-copy {
  min-width: 0;
}

.service-copy strong,
.service-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-copy strong {
  font-weight: 620;
}

.service-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.row-action {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  place-items: center;
}

.row-action:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-muted);
}

.row-action svg {
  width: 16px;
}

.activity-list,
.workflow-list,
.migration-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.activity-row,
.workflow-row,
.migration-row {
  border-bottom: 1px solid #ececef;
}

.activity-row:last-child,
.workflow-row:last-child,
.migration-row:last-child {
  border-bottom: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 92px;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 12px 15px;
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row strong {
  font-size: 13px;
}

.activity-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.activity-progress span:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  display: grid;
  min-height: 116px;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  place-items: center;
  text-align: center;
}

.empty-state svg {
  width: 22px;
  margin-bottom: 8px;
  color: var(--faint);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.search-field {
  position: relative;
  width: min(100%, 360px);
}

.search-field svg {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 16px;
  color: var(--muted);
}

.search-field input,
.select-control {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.search-field input {
  width: 100%;
  padding: 0 12px 0 36px;
}

.select-control {
  min-width: 150px;
  padding: 0 32px 0 11px;
}

.workflow-group {
  margin-top: 30px;
}

.workflow-group:first-of-type {
  margin-top: 0;
}

.workflow-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 2fr) 120px 110px;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 11px 15px;
}

.workflow-name strong,
.workflow-name code,
.workflow-summary {
  display: block;
}

.workflow-name strong {
  font-size: 13px;
}

.workflow-name code,
.code-path {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.risk-badge.critical,
.risk-badge.destructive {
  border-color: #edb8bc;
  color: var(--red);
  background: var(--red-soft);
}

.risk-badge.writes,
.risk-badge.external-api,
.risk-badge.public-deploy {
  border-color: #efcc91;
  color: var(--amber);
  background: var(--amber-soft);
}

.risk-badge.read-only {
  border-color: #b9dfca;
  color: var(--green);
  background: var(--green-soft);
}

.log-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.log-toolbar .select-control {
  min-width: 200px;
}

.log-toolbar .icon-button {
  border-color: var(--line);
  background: var(--surface);
}

.follow-control {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.terminal {
  min-height: 500px;
  max-height: calc(100vh - 240px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #0d0f12;
  border-radius: 7px;
  color: var(--terminal-ink);
  background: var(--terminal);
  box-shadow: var(--shadow-small);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal.empty {
  display: grid;
  color: #8e939c;
  place-items: center;
  text-align: center;
}

.audit-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.audit-cell {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.audit-cell:last-child {
  border-right: 0;
}

.audit-cell strong,
.audit-cell span {
  display: block;
}

.audit-cell strong {
  font-size: 18px;
}

.audit-cell span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.code-item {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.code-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-item p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.migration-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 26px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.migration-summary h2,
.migration-summary p {
  margin: 0;
}

.migration-summary h2 {
  font-size: 16px;
}

.migration-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.migration-percent {
  text-align: right;
}

.migration-percent strong,
.migration-percent span {
  display: block;
}

.migration-percent strong {
  font-size: 24px;
}

.migration-percent span {
  color: var(--muted);
  font-size: 10px;
}

.migration-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 11px 14px;
}

.migration-icon {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-strong);
  place-items: center;
}

.migration-icon.complete {
  color: var(--green);
  background: var(--green-soft);
}

.migration-icon.in-progress,
.migration-icon.waiting {
  color: var(--amber);
  background: var(--amber-soft);
}

.migration-icon svg {
  width: 14px;
}

.migration-copy strong,
.migration-copy small {
  display: block;
}

.migration-copy strong {
  font-size: 13px;
}

.migration-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.mobile-nav {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
}

.toast {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-large);
  font-size: 12px;
}

.toast.error {
  border-color: #edb8bc;
  color: var(--red);
}

@media (max-width: 1100px) {
  .summary-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-row {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.6fr) 110px;
  }

  .workflow-row > :last-child {
    display: none;
  }

  .audit-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-cell:nth-child(3) {
    border-right: 0;
  }

  .audit-cell:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .app-header {
    height: 56px;
    padding: 0 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy small,
  .header-state span:last-child {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .header-state {
    margin-left: auto;
  }

  .header-actions {
    margin-left: 10px;
  }

  .app-layout {
    display: block;
    padding-top: 56px;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    width: 100%;
    padding: 24px 14px 94px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    min-height: 64px;
    padding: 5px 5px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgb(255 255 255 / 94%);
    backdrop-filter: saturate(180%) blur(20px);
  }

  .mobile-nav button {
    display: grid;
    min-width: 0;
    padding: 4px 2px;
    border-radius: 6px;
    place-items: center;
  }

  .mobile-nav button.active {
    color: var(--blue);
    background: var(--blue-soft);
  }

  .mobile-nav svg {
    width: 18px;
  }

  .mobile-nav span {
    margin-top: 2px;
    overflow: hidden;
    max-width: 100%;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-header {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .page-header h1 {
    font-size: 23px;
    line-height: 29px;
  }

  .header-stat {
    display: none;
  }

  .summary-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-cell {
    min-height: 98px;
    padding: 13px;
  }

  .summary-value {
    margin-top: 10px;
    font-size: 21px;
  }

  .metric-cell {
    min-height: 88px;
    padding: 12px;
  }

  .section-band {
    margin-top: 30px;
  }

  .activity-row {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 12px;
  }

  .activity-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .filter-toolbar,
  .log-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-field,
  .log-toolbar .select-control {
    width: 100%;
    min-width: 0;
  }

  .workflow-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    min-height: 78px;
  }

  .workflow-summary,
  .workflow-row > :last-child {
    display: none;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

  .audit-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-cell,
  .audit-cell:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .audit-cell:nth-child(even) {
    border-right: 0;
  }

  .audit-cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .migration-summary {
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 12px;
    padding: 15px;
  }

  .migration-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .migration-row > :last-child {
    display: none;
  }

  .terminal {
    min-height: 430px;
    max-height: none;
  }

  .login-panel {
    padding: 28px 24px;
  }
}

@media (max-width: 420px) {
  .summary-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .summary-cell {
    min-height: 88px;
  }

  .summary-value {
    margin-top: 7px;
  }

  .audit-strip {
    grid-template-columns: 1fr;
  }

  .audit-cell,
  .audit-cell:nth-child(3),
  .audit-cell:nth-child(even) {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .audit-cell:first-child {
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
+
/* Read-only operational contract UI */
.header-contract {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  margin-right: 18px;
}

.contract-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid #bfd9cc;
  border-radius: 999px;
  color: #14633f;
  background: #f0f8f4;
  font-size: 11px;
  font-weight: 680;
}

.contract-chip.muted {
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-muted);
}

.contract-chip svg {
  width: 13px;
}

.preview-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 22px;
  padding: 12px 15px;
  border: 1px solid #e1a840;
  border-radius: 9px;
  color: #6c4300;
  background: #fff8e7;
}

.preview-banner svg {
  width: 20px;
  flex: 0 0 auto;
}

.preview-banner div {
  display: grid;
  gap: 2px;
}

.preview-banner strong {
  font-size: 12px;
  letter-spacing: .04em;
}

.preview-banner span {
  font-size: 12px;
}

.authority-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.authority-strip > div {
  display: grid;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.authority-strip > div:last-child {
  border-right: 0;
}

.authority-strip span,
.authority-strip small {
  color: var(--muted);
  font-size: 10px;
}

.authority-strip span {
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.authority-strip strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-grid {
  margin-bottom: 16px;
}

.summary-card {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.summary-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: #a9abb2;
}

.summary-card.pass::before { background: var(--green); }
.summary-card.warn::before { background: var(--amber); }
.summary-card.fail::before { background: var(--red); }

.summary-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
}

.summary-label svg {
  width: 16px;
}

.summary-card > strong {
  display: block;
  margin-top: 13px;
  overflow: hidden;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 690;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-card > small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }

.panel,
.section-block,
.host-panel,
.source-card,
.log-shell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.panel {
  padding: 17px;
}

.panel-head,
.section-title,
.host-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.section-title h2,
.host-title h2,
.source-card h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 680;
  line-height: 22px;
}

.eyebrow {
  color: var(--faint);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #666970;
  background: #f6f6f8;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.pass {
  border-color: #bcdccb;
  color: #14633f;
  background: #edf8f2;
}

.status-pill.warn {
  border-color: #ead19f;
  color: #805000;
  background: #fff7e8;
}

.status-pill.fail {
  border-color: #ebbbbb;
  color: #a62424;
  background: #fff0f0;
}

.status-pill svg {
  width: 12px;
  height: 12px;
}

.alert-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 10px 11px;
  border-left: 3px solid #a9abb2;
  border-radius: 5px;
  background: var(--surface-muted);
}

.alert-item.warn { border-left-color: var(--amber); }
.alert-item.fail { border-left-color: var(--red); }

.alert-item > svg {
  width: 16px;
  margin-top: 1px;
  color: var(--muted);
  flex: 0 0 auto;
}

.alert-item.fail > svg { color: var(--red); }
.alert-item.warn > svg { color: var(--amber); }

.alert-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.alert-item strong {
  font-size: 12px;
  line-height: 16px;
}

.alert-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 118px;
  align-content: center;
  justify-items: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 24px;
  margin-bottom: 8px;
  color: var(--faint);
}

.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state span {
  max-width: 460px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 16px;
}

.source-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.source-meta > span:not(.status-pill) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stale-label {
  color: var(--amber);
  font-size: 9px;
  letter-spacing: .08em;
}

.run-list,
.schedule-list {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.run-row,
.schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.run-row {
  grid-template-columns: minmax(0, 1fr) minmax(100px, auto) minmax(110px, auto) auto;
}

.run-progress {
  display: grid;
}

.run-progress strong {
  font-size: 11px;
}

.run-progress small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.row-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.row-icon,
.host-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-strong);
  place-items: center;
  flex: 0 0 auto;
}

.row-icon svg,
.host-symbol svg {
  width: 16px;
}

.row-primary > div,
.row-time,
.schedule-next {
  display: grid;
  min-width: 0;
}

.row-primary strong,
.row-time strong,
.schedule-next strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-primary small,
.row-time small,
.schedule-next small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.panel-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 11px;
}

.panel-link button,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.panel-link svg {
  width: 13px;
}

.compact-table,
.system-table {
  width: 100%;
  margin-top: 13px;
  border-collapse: collapse;
  text-align: left;
}

.compact-table th,
.system-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-table td,
.system-table td {
  padding: 10px;
  border-bottom: 1px solid #ececef;
  font-size: 11px;
  vertical-align: middle;
}

.compact-table tr:last-child td,
.system-table tr:last-child td {
  border-bottom: 0;
}

.host-name,
.service-name {
  display: grid;
  min-width: 0;
}

.host-name strong,
.service-name strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-name small,
.service-name small,
.cell-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.cell-note {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unknown {
  color: var(--faint);
  font-size: 10px;
  font-weight: 550;
}

.muted-text {
  color: var(--muted);
  font-size: 10px;
}

.section-block,
.host-panel {
  margin-top: 14px;
  padding: 19px;
}

.notice-card,
.verification-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #c9dbea;
  border-radius: 8px;
  color: #34546d;
  background: #f3f8fb;
}

.notice-card.warning {
  border-color: #ead19f;
  color: #754b06;
  background: #fff9ed;
}

.notice-card > svg,
.verification-card > svg {
  width: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
}

.notice-card strong,
.verification-card strong {
  font-size: 12px;
}

.notice-card p,
.verification-card p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 16px;
}

.count-badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 10px;
  font-weight: 650;
}

.source-card {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(250px, 1.2fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.source-card .source-meta {
  justify-content: flex-end;
  margin: 0;
}

.source-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.source-facts span {
  display: grid;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.source-facts span:last-child {
  border-right: 0;
}

.source-facts strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 16px;
}

.incident-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.incident-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.incident-row {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-top: 3px solid #a9abb2;
  border-radius: 7px;
  background: var(--surface);
}

.incident-row.warn { border-top-color: var(--amber); }
.incident-row.fail { border-top-color: var(--red); }

.incident-head,
.incident-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.incident-head .mono {
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incident-row > strong {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  text-transform: capitalize;
}

.incident-row p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 45px;
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.incident-foot {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.resource-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.resource-metric > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.resource-metric span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.resource-metric svg {
  width: 13px;
}

.resource-metric strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-progress {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 10px;
  border: 0;
  overflow: hidden;
  appearance: none;
  border-radius: 999px;
  background: #e4e5e9;
}

.resource-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e4e5e9;
}

.resource-progress::-webkit-progress-value,
.resource-progress::-moz-progress-bar {
  border-radius: 999px;
  background: #565c66;
}

.host-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.host-identity h2,
.host-identity p {
  margin: 0;
}

.host-identity p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.host-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.host-facts span {
  display: grid;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
}

.host-facts span:last-child {
  border-right: 0;
}

.host-facts small {
  color: var(--faint);
  font-size: 9px;
}

.host-facts strong {
  margin-top: 3px;
  font-size: 11px;
}

.git-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.git-band > div {
  display: grid;
  justify-items: start;
  min-width: 0;
}

.git-band > div:last-child {
  justify-items: end;
  text-align: right;
}

.git-band strong {
  margin: 2px 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.git-band small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-action {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  place-items: center;
}

.icon-action:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.icon-action svg {
  width: 14px;
}

.process-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.process-details summary {
  padding: 11px 2px 2px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 8px;
}

.process-grid span {
  display: grid;
  min-width: 0;
  padding: 9px;
  border-radius: 6px;
  background: var(--surface-muted);
}

.process-grid strong,
.process-grid small {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-grid small {
  margin-top: 3px;
  color: var(--muted);
}

.log-shell {
  overflow: hidden;
}

.log-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--terminal-line);
  color: #c8ccd4;
  background: #21242a;
}

.log-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 10px;
  font-weight: 650;
}

.log-toolbar select {
  width: min(390px, 42vw);
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid #474b54;
  border-radius: 6px;
  color: #eef0f3;
  background: #2b2e35;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #4b505a;
  border-radius: 6px;
  color: #eef0f3;
  background: #30343c;
  font-size: 10px;
  font-weight: 650;
}

.secondary-button svg {
  width: 13px;
}

.log-contract {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #9ca2ad;
  font-size: 9px;
}

.log-contract svg {
  width: 13px;
}

.log-output {
  min-height: 520px;
  max-height: calc(100vh - 235px);
  margin: 0;
  overflow: auto;
  padding: 18px;
  color: var(--terminal-ink);
  background: var(--terminal);
  font: 11px/1.65 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.catalog-summary div {
  display: grid;
  padding: 13px;
  border-right: 1px solid var(--line);
}

.catalog-summary div:last-child {
  border-right: 0;
}

.catalog-summary span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.catalog-summary strong {
  margin-top: 4px;
  font-size: 13px;
  text-transform: capitalize;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.workflow-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.workflow-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.risk-label,
.frequency {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.risk-label.fail { color: var(--red); }
.risk-label.warn { color: var(--amber); }
.risk-label.pass { color: var(--green); }

.workflow-card h3 {
  margin: 9px 0 4px;
  font-size: 12px;
}

.workflow-card p {
  min-height: 45px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.workflow-card code,
.service-catalog code {
  display: block;
  overflow: hidden;
  color: #53565d;
  font: 9px/15px "SFMono-Regular", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-catalog {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

.service-catalog article {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.service-catalog article > div {
  display: grid;
}

.service-catalog strong {
  font-size: 11px;
}

.service-catalog small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.migration-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  padding: 23px;
  border: 1px solid var(--line);
  border-left: 4px solid #a9abb2;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.migration-hero.fail { border-left-color: var(--red); }
.migration-hero.warn { border-left-color: var(--amber); }
.migration-hero.pass { border-left-color: var(--green); }

.migration-hero h2 {
  margin: 3px 0 6px;
  font-size: 24px;
}

.migration-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.migration-authority {
  display: grid;
  min-width: 170px;
  align-content: center;
  justify-items: end;
}

.migration-authority > span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.migration-authority > strong {
  margin: 4px 0 8px;
  font-size: 18px;
  text-transform: capitalize;
}

.verification-card {
  margin-top: 10px;
  border-color: #ebbbbb;
  color: #6e2b2b;
  background: #fff5f5;
}

.verification-card > div {
  display: grid;
}

.verification-card small {
  margin-top: 4px;
  font-size: 9px;
}

.gate-list {
  display: grid;
  margin-top: 12px;
}

.gate-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.gate-row:last-child { border-bottom: 0; }

.gate-index {
  color: var(--faint);
  font: 10px "SFMono-Regular", Consolas, monospace;
}

.gate-row strong {
  font-size: 11px;
}

.gate-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
}

.access-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.access-lock {
  display: grid;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  place-items: center;
  flex: 0 0 auto;
}

.access-lock svg { width: 23px; }

.access-hero h2 {
  margin: 2px 0 3px;
  font-size: 20px;
}

.access-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.action-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.action-card > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.action-card svg { width: 14px; }
.action-card strong { font-size: 11px; }

.action-card > span {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-size: 9px;
}

.action-card p {
  min-height: 30px;
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.action-card button {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--faint);
  background: #eeeef1;
  font-size: 9px;
  font-weight: 650;
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 13px;
}

.requirement-grid span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 10px;
}

.requirement-grid svg {
  width: 14px;
  flex: 0 0 auto;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.more-grid button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.more-grid button:hover { background: var(--surface-muted); }

.more-grid button > svg:first-child {
  width: 18px;
  color: var(--blue);
}

.more-grid button > svg:last-child {
  width: 14px;
  color: var(--faint);
}

.more-grid span { display: grid; }
.more-grid strong { font-size: 12px; }
.more-grid small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.primary-inline {
  display: block;
  min-height: 38px;
  margin: 0 auto;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: var(--ink);
}

@media (max-width: 1080px) {
  .span-7,
  .span-5 { grid-column: 1 / -1; }

  .incident-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .requirement-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .header-contract { display: none; }
  .mobile-nav { grid-template-columns: repeat(4, 1fr); }
  .mobile-nav button { min-height: 52px; }
  .workspace { padding: 18px 12px 84px; }
  .page-header { margin-bottom: 16px; }
  .preview-banner { margin-top: 0; }

  .authority-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .authority-strip > div:nth-child(2) { border-right: 0; }
  .authority-strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { min-height: 98px; padding: 13px; }
  .summary-card > strong { font-size: 18px; }

  .overview-grid { display: block; }
  .panel { margin-top: 9px; padding: 14px; }
  .compact-table thead { display: none; }
  .compact-table,
  .compact-table tbody,
  .compact-table tr,
  .compact-table td { display: block; width: 100%; }
  .compact-table tr { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .compact-table td { padding: 0; border: 0; }
  .compact-table td:first-child { grid-column: 1 / -1; }

  .incident-grid,
  .incident-grid.wide { grid-template-columns: 1fr; }

  .run-row,
  .schedule-row { grid-template-columns: minmax(0, 1fr) auto; }
  .run-row .row-time,
  .schedule-row .schedule-next { grid-column: 1 / -1; grid-row: 2; padding-left: 44px; }

  .run-row .run-progress { grid-column: 1 / -1; grid-row: 3; padding-left: 44px; }

  .source-card { grid-template-columns: 1fr; }
  .source-card .source-meta { justify-content: flex-start; }
  .source-facts { grid-template-columns: 1fr; }
  .source-facts span { border-right: 0; border-bottom: 1px solid var(--line); }
  .source-facts span:last-child { border-bottom: 0; }

  .resource-grid,
  .host-facts { grid-template-columns: repeat(2, 1fr); }
  .host-facts span:nth-child(2) { border-right: 0; }
  .host-facts span:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .git-band { grid-template-columns: 1fr; }
  .git-band > div:last-child { justify-items: start; text-align: left; }

  .system-table thead { display: none; }
  .system-table,
  .system-table tbody,
  .system-table tr,
  .system-table td { display: block; width: 100%; }
  .system-table tr { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .system-table td { padding: 0; border: 0; }
  .system-table td:first-child { grid-column: 1 / -1; }
  .process-grid { grid-template-columns: 1fr; }

  .log-toolbar { position: sticky; top: 56px; flex-wrap: wrap; }
  .log-toolbar label { width: 100%; }
  .log-toolbar select { width: 100%; }
  .log-contract { margin-left: 0; }
  .log-output { min-height: calc(100vh - 260px); font-size: 10px; }

  .catalog-summary { grid-template-columns: repeat(2, 1fr); }
  .catalog-summary div:nth-child(2) { border-right: 0; }
  .catalog-summary div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .workflow-grid { grid-template-columns: 1fr; }
  .service-catalog article { grid-template-columns: minmax(0, 1fr) auto; }
  .service-catalog code { grid-column: 1 / -1; }

  .migration-hero { grid-template-columns: 1fr; padding: 18px; }
  .migration-authority { justify-items: start; }
  .gate-row { grid-template-columns: 28px minmax(0, 1fr); }
  .gate-row .status-pill { grid-column: 2; justify-self: start; }

  .action-grid,
  .more-grid { grid-template-columns: 1fr; }
  .requirement-grid { grid-template-columns: 1fr; }
}

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