:root {
  color-scheme: light;
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-muted: #eef0ec;
  --ink: #202421;
  --muted: #66706a;
  --line: #d8dcd7;
  --line-strong: #bdc4bd;
  --sidebar: #202421;
  --sidebar-muted: #aeb7b0;
  --teal: #087f73;
  --teal-dark: #05665d;
  --teal-soft: #e2f3ef;
  --green: #247a45;
  --green-soft: #e5f3e9;
  --amber: #9a6200;
  --amber-soft: #fff0c7;
  --red: #b42318;
  --red-soft: #fde9e7;
  --blue: #285f9e;
  --blue-soft: #e7f0fa;
  --shadow: 0 12px 32px rgb(20 28 23 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; letter-spacing: 0; }
button, input, select, textarea { color: inherit; font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 420px);
  align-content: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 20px;
  background: var(--bg);
}
.login-brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.login-brand h1 { margin: 0; font-size: 25px; line-height: 1.2; }
.login-brand p { margin: 4px 0 0; color: var(--muted); }
.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 6px;
  background: var(--teal);
  color: white;
  font-size: 19px;
  font-weight: 750;
}
.login-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 7px; }
.field > label { color: #4e5751; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.field-hint { color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 8px 10px;
  outline: none;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(8 127 115 / 14%); }
.form-error { margin: -4px 0 0; color: var(--red); font-size: 13px; }
.login-button { width: 100%; justify-content: center; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sidebar);
  color: white;
}
.sidebar-brand { min-height: 72px; display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid rgb(255 255 255 / 9%); }
.brand-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { font-size: 14px; }
.brand-copy span { margin-top: 2px; color: var(--sidebar-muted); font-size: 11px; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; }
.sidebar-scope { min-width: 0; padding: 12px 18px 14px 63px; border-bottom: 1px solid rgb(255 255 255 / 9%); background: rgb(255 255 255 / 3%); }
.sidebar-scope > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-eyebrow { color: #819087; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.sidebar-scope strong { margin-top: 3px; font-size: 13px; line-height: 1.35; }
.scope-detail { margin-top: 2px; color: var(--sidebar-muted); font-size: 10px; }
.main-nav { display: grid; gap: 3px; padding: 16px 10px; }
.main-nav a {
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  border-radius: 4px;
  padding: 8px 12px;
  color: #cbd2cc;
  text-decoration: none;
  font-weight: 600;
}
.main-nav a > span:first-child { width: 24px; color: #98a59c; text-align: center; font-size: 16px; }
.main-nav a:hover { background: rgb(255 255 255 / 6%); color: white; }
.main-nav a.active { background: var(--teal); color: white; }
.main-nav a.active > span:first-child { color: white; }
.nav-alert-icon { width: 18px !important; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px !important; line-height: 16px; }
.nav-count { min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--red); color: white !important; font-size: 11px !important; line-height: 18px; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 18px 20px; border-top: 1px solid rgb(255 255 255 / 9%); color: var(--sidebar-muted); font-size: 12px; }
.source-dot { width: 8px; height: 8px; border-radius: 50%; background: #778079; }
.source-dot.ready { background: #57b77a; box-shadow: 0 0 0 3px rgb(87 183 122 / 13%); }
.menu-scrim { display: none; }

.workspace { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(10px);
}
.page-heading { min-width: 0; }
.page-heading h1 { margin: 0; font-size: 19px; line-height: 1.25; }
.page-heading p { overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
}
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-muted); }
.icon-button.close-menu, .icon-button.menu-button { display: none; }
.user-button { min-width: 154px; height: 42px; display: flex; align-items: center; gap: 9px; border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 8px 0 14px; text-align: left; }
.user-initials { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.user-meta { min-width: 0; display: grid; }
.user-meta strong { overflow: hidden; max-width: 110px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); text-transform: capitalize; }
.user-menu { position: absolute; top: 48px; right: 0; z-index: 40; width: 180px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.user-menu a, .user-menu button { width: 100%; display: block; border: 0; background: transparent; padding: 10px 12px; color: var(--ink); text-align: left; text-decoration: none; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-muted); }
.page-content { max-width: 1480px; min-height: calc(100vh - 72px); margin: 0 auto; padding: 24px 28px 48px; }

.page-toolbar { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.page-toolbar .toolbar-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.compact-select { width: auto; min-width: 138px; min-height: 36px; padding-block: 6px; }
.button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); padding: 7px 12px; color: var(--ink); font-weight: 700; text-decoration: none; }
.button:hover { background: var(--surface-muted); }
.button.primary { border-color: var(--teal); background: var(--teal); color: white; }
.button.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.button.danger { border-color: #efb7b2; color: var(--red); }
.button.danger:hover { background: var(--red-soft); }
.button.small { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.button-icon { font-size: 17px; font-weight: 500; line-height: 1; }

.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.summary-item { min-width: 0; padding: 15px 17px; border-right: 1px solid var(--line); }
.summary-item:last-child { border-right: 0; }
.summary-item span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.summary-item strong { display: block; overflow: hidden; margin-top: 4px; font-size: 22px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.summary-item small { display: block; margin-top: 3px; color: var(--muted); }

.table-section { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.section-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.section-header h2 { margin: 0; font-size: 14px; }
.section-header span { color: var(--muted); font-size: 12px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 38px; background: #fafbf9; color: #5c655f; font-size: 11px; text-align: left; text-transform: uppercase; }
th, td { padding: 9px 13px; border-bottom: 1px solid #e7e9e6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbf9; }
td { min-height: 48px; }
.cell-title { display: block; font-weight: 700; }
.cell-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.node-health { min-width: 160px; display: grid; justify-items: start; gap: 6px; }
.node-health-meta { display: grid; gap: 3px; }
.node-health-meta .cell-subtitle { margin-top: 0; }
.node-detail-button { border: 0; background: transparent; padding: 0; color: var(--teal-dark); font: inherit; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.node-detail-button:hover { color: var(--teal); }
.node-detail-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.node-condition-list { display: flex; flex-wrap: wrap; gap: 4px; }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.align-right { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; border-radius: 12px; padding: 2px 8px; background: var(--surface-muted); color: #4d5750; font-size: 11px; font-weight: 750; text-transform: capitalize; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status.ready, .status.approved, .status.resolved { background: var(--green-soft); color: var(--green); }
.status.pending, .status.provisioning, .status.warning, .status.quarantine { background: var(--amber-soft); color: var(--amber); }
.status.failed, .status.critical, .status.firing, .status.blocked { background: var(--red-soft); color: var(--red); }
.status.terminating, .status.terminated, .status.expired, .status.unknown { background: var(--surface-muted); color: var(--muted); }
.status.info { background: var(--blue-soft); color: var(--blue); }
.kind-label { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 3px; padding: 2px 7px; font-size: 11px; font-weight: 700; text-transform: capitalize; }

.progress { width: 100%; min-width: 92px; height: 7px; overflow: hidden; appearance: none; border: 0; border-radius: 4px; background: #e6e9e5; }
.progress::-webkit-progress-bar { border-radius: 4px; background: #e6e9e5; }
.progress::-webkit-progress-value { border-radius: 4px; background: var(--teal); }
.progress::-moz-progress-bar { border-radius: 4px; background: var(--teal); }
.progress.warning::-webkit-progress-value { background: var(--amber); }
.progress.warning::-moz-progress-bar { background: var(--amber); }
.progress.critical::-webkit-progress-value { background: var(--red); }
.progress.critical::-moz-progress-bar { background: var(--red); }
.usage-cell { min-width: 130px; display: grid; gap: 5px; }
.usage-cell small { color: var(--muted); font-variant-numeric: tabular-nums; }
.limiter-list { display: flex; flex-wrap: wrap; gap: 5px; }
.limiter { border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.limiter.active { border-color: #e5b44d; background: var(--amber-soft); color: #7c5100; font-weight: 700; }
.scan-summary { display: flex; gap: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scan-summary .high { color: var(--red); font-weight: 750; }
.scan-summary .medium { color: var(--amber); font-weight: 750; }

.empty-state, .error-state, .forbidden-state { min-height: 260px; display: grid; place-items: center; padding: 42px 24px; text-align: center; }
.state-content { max-width: 420px; }
.state-symbol { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 14px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 19px; font-weight: 750; }
.state-content h2 { margin: 0; font-size: 16px; }
.state-content p { margin: 7px 0 16px; color: var(--muted); }
.error-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; border: 1px solid #efb7b2; border-radius: 4px; background: var(--red-soft); padding: 10px 12px; color: #7f2119; }
.error-banner strong { display: block; font-size: 12px; }
.error-banner span { display: block; margin-top: 2px; font-size: 12px; }
.skeleton-stack { display: grid; gap: 14px; }
.skeleton { position: relative; overflow: hidden; border-radius: 4px; background: #e6e9e5; }
.skeleton::after { position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / 62%), transparent); animation: shimmer 1.25s infinite; content: ""; }
.skeleton.metrics { height: 84px; }
.skeleton.table { height: 320px; }
.skeleton.connection-loading { height: 96px; }
@keyframes shimmer { to { transform: translateX(100%); } }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 18px; }
.data-panel { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.data-panel > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.data-panel > header h2 { margin: 0; font-size: 14px; }
.data-panel-body { padding: 16px; }
.quantity-list { display: grid; gap: 18px; }
.quantity-row { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 12px; }
.quantity-row > span { color: var(--muted); }
.quantity-row strong { min-width: 100px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.definition-list { display: grid; gap: 0; }
.definition-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.definition-row:first-child { padding-top: 0; }
.definition-row:last-child { padding-bottom: 0; border-bottom: 0; }
.definition-row strong, .definition-row span { display: block; }
.definition-row span { margin-top: 2px; color: var(--muted); font-size: 12px; }

.modal { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 32px); border: 0; border-radius: 6px; padding: 0; background: var(--surface); box-shadow: 0 24px 70px rgb(0 0 0 / 26%); }
.modal.wide { width: min(760px, calc(100vw - 28px)); }
.modal::backdrop { background: rgb(20 24 21 / 54%); backdrop-filter: blur(2px); }
.modal-shell { display: flex; max-height: calc(100vh - 32px); flex-direction: column; }
.modal-header { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-header > div { min-width: 0; flex: 1; }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-header p { overflow: hidden; margin: 4px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { overflow-y: auto; padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); }
.modal-fields { display: grid; gap: 16px; }
.segmented-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-muted); }
.segmented-control label { position: relative; min-width: 0; cursor: pointer; }
.segmented-control label + label { border-left: 1px solid var(--line-strong); }
.segmented-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented-control span { min-height: 38px; display: grid; place-items: center; padding: 7px 10px; color: var(--muted); font-weight: 700; }
.segmented-control input:checked + span { background: var(--surface); color: var(--teal-dark); box-shadow: inset 0 -2px var(--teal); }
.segmented-control input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: -3px; }
.segmented-control input:disabled + span { cursor: not-allowed; opacity: .5; }
.upload-status { min-height: 66px; display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 4px; background: #fafbf9; padding: 11px 12px; }
.upload-status > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-status strong { font-size: 12px; }
.upload-status span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.upload-status .progress { min-width: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--line); }
.detail-item { min-width: 0; padding: 12px; background: var(--surface); }
.detail-item > span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.detail-item > strong { display: block; overflow-wrap: anywhere; margin-top: 4px; font-size: 13px; }
.detail-section { margin-top: 20px; }
.detail-section h3 { margin: 0 0 10px; font-size: 13px; }
.node-image-list { border-top: 1px solid var(--line); }
.node-image-header, .node-image-row { display: grid; grid-template-columns: 28px minmax(190px, 1.25fr) minmax(220px, 1fr) 72px; align-items: center; gap: 12px; }
.node-image-header { min-height: 32px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; text-transform: uppercase; }
.node-image-row { min-height: 62px; border-bottom: 1px solid var(--line); padding: 7px 0; }
.node-image-row > span { color: var(--muted); font-size: 11px; }
.node-image-row code { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.node-image-identity { min-width: 0; }
.node-image-identity strong, .node-image-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-image-identity strong { font-size: 12px; }
.node-image-identity span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.node-image-size { text-align: right; font-size: 11px; }
.connection-list { border-top: 1px solid var(--line); }
.connection-row { min-height: 48px; display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.connection-row strong { text-transform: uppercase; }
.connection-row span { color: var(--muted); font-size: 12px; }
.modal-error { margin: 0 0 16px; border: 1px solid #efb7b2; border-radius: 4px; background: var(--red-soft); padding: 9px 11px; color: #7f2119; }

.settings-list { display: grid; }
.settings-row { min-height: 54px; display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 10px 15px; }
.settings-row:last-child { border-bottom: 0; }
.settings-row > span { color: var(--muted); }
.settings-row > strong { overflow-wrap: anywhere; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 12px; }
.settings-definitions { margin-top: 18px; }
.definition-protocols { margin-top: 0; white-space: nowrap; }
.definition-toggle-cell { min-width: 112px; display: flex; justify-content: flex-end; }
.switch-control { min-height: 32px; display: inline-grid; grid-template-columns: 36px 58px; align-items: center; gap: 8px; cursor: pointer; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 36px; height: 20px; border: 1px solid var(--line-strong); border-radius: 10px; background: #dfe3de; transition: background 120ms ease, border-color 120ms ease; }
.switch-track::after { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(20 28 23 / 24%); transition: transform 120ms ease; content: ""; }
.switch-control input:checked + .switch-track { border-color: var(--teal); background: var(--teal); }
.switch-control input:checked + .switch-track::after { transform: translateX(16px); }
.switch-control input:focus-visible + .switch-track { outline: 2px solid var(--teal); outline-offset: 2px; }
.switch-control input:disabled + .switch-track { opacity: .55; }
.switch-label { color: var(--muted); font-size: 12px; font-weight: 700; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: min(360px, calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line-strong); border-left: 4px solid var(--teal); border-radius: 4px; background: var(--surface); padding: 11px 13px; box-shadow: var(--shadow); }
.toast.error { border-left-color: var(--red); }
.toast strong { display: block; font-size: 12px; }
.toast span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .split-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: min(280px, calc(100vw - 52px)); transition: transform 180ms ease; box-shadow: var(--shadow); }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .menu-scrim { position: fixed; inset: 0; z-index: 25; border: 0; background: rgb(20 24 21 / 52%); }
  .app-shell.menu-open .menu-scrim { display: block; }
  .icon-button.close-menu, .icon-button.menu-button { display: grid; }
  .close-menu { margin-left: auto; border-color: rgb(255 255 255 / 16%); background: transparent; color: white; }
  .topbar { min-height: 64px; gap: 10px; padding: 8px 14px; }
  .page-heading h1 { font-size: 17px; }
  .page-heading p { max-width: 42vw; }
  .user-button { min-width: 0; border-left: 0; padding: 0; }
  .user-meta { display: none; }
  .page-content { min-height: calc(100vh - 64px); padding: 18px 14px 36px; }
  .page-toolbar { align-items: stretch; }
  .filters { width: 100%; }
  .filters .compact-select { min-width: 0; flex: 1 1 130px; }
  .page-toolbar .toolbar-actions { width: 100%; margin-left: 0; }
  .page-toolbar .toolbar-actions .button { flex: 1; justify-content: center; }
  .table-section { border-right: 0; border-left: 0; border-radius: 0; margin-inline: -14px; }
  .section-header { padding-inline: 14px; }
  th, td { padding-inline: 11px; }
  .user-menu { top: 44px; }
}

@media (max-width: 520px) {
  .login-screen { align-content: start; padding-top: 72px; }
  .login-panel { padding: 22px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-item { padding: 12px; }
  .summary-item strong { font-size: 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .node-image-header { display: none; }
  .node-image-row { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; }
  .node-image-row code { grid-column: 2 / -1; }
  .node-image-size { grid-column: 3; grid-row: 1; }
  .connection-row { grid-template-columns: 68px 1fr; padding: 8px 0; }
  .connection-row .button { grid-column: 1 / -1; justify-content: center; }
  .quantity-row { grid-template-columns: 80px 1fr; }
  .quantity-row strong { grid-column: 1 / -1; text-align: left; }
  .settings-row { grid-template-columns: 1fr; gap: 3px; }
  .check-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
