:root {
  --paper: #f6f5f1;
  --surface: #fcfbf8;
  --ink: #28352f;
  --muted: #71776e;
  --line: #dddfd6;
  --green: #377650;
  --blue: #416d9a;
  --amber: #996b24;
  --terracotta: #a55039;
  --teal: #287d8a;
  --copper: #94633f;
  --red: #a34c3a;
  --columns: minmax(0, 2.1fr) repeat(3, minmax(0, .85fr)) minmax(0, 1.35fr) minmax(0, 1fr);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; min-width: 320px; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
::selection { background: #dce5d9; }
.page-shell { width: min(1440px, 100%); margin: 0 auto; padding: 0 28px; }
.site-header { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); text-decoration: none; flex-shrink: 0; min-height: 44px; }
.brand-mark { display: block; width: 36px; height: 36px; flex-shrink: 0; }
.brand-word { display: block; font-size: 26px; line-height: 1; font-weight: 650; letter-spacing: -1.2px; padding-bottom: 2px; }
.brand-period { color: var(--green); }
.header-end { display: flex; align-items: center; gap: 15px; }
.add-node-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; background: none; border: 0; color: var(--green); border-radius: 50%; }
.add-node-button:hover { background: #dfe7da7a; }
.add-node-button svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.list-footer { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.updated { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 5px; margin: 0; font-size: 12px; color: var(--muted); }
.updated time, .server-version { font: 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; color: #52674e; white-space: nowrap; }
.server-version { margin-left: auto; color: var(--muted); }
.connection-dot { align-self: center; width: 5px; height: 5px; background: #bcbbb2; border-radius: 50%; margin-left: 3px; flex-shrink: 0; }
.connection-dot.connected { background: var(--green); }
.connection-dot.failed { background: var(--terracotta); }
.text-button { padding: 4px 0; background: none; border: 0; color: var(--green); font-size: 13px; line-height: 1.5; font-weight: 500; white-space: nowrap; }
.text-button:hover { color: var(--ink); }
.text-button.muted { color: var(--muted); }
#account-button { padding: 10px 0 10px 12px; }
main { padding: 8px 0 30px; }
.nodes-table, .nodes-table thead, .nodes-table tbody { display: block; width: 100%; }
.nodes-table { border-collapse: collapse; font-size: 14px; }
.nodes-table thead tr, .node-row { display: grid; grid-template-columns: var(--columns); align-items: center; column-gap: 14px; }
.nodes-table thead tr { min-height: 33px; border-bottom: 1px solid var(--line); }
.nodes-table th { min-width: 0; text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; padding: 2px 0 5px; white-space: nowrap; }
.nodes-table th:last-child { text-align: right; }
.sort-button { background: none; border: 0; color: inherit; padding: 4px 0; font-size: inherit; font-weight: inherit; line-height: 1.5; white-space: nowrap; }
.sort-button:hover, .sort-button[data-direction] { color: var(--green); }
.sort-arrow { display: inline-block; width: 9px; font-size: 11px; margin-left: 3px; }
.sort-arrow:empty { display: none; }
.network-column-heading { display: inline-grid; grid-template-columns: 22px auto 22px; align-items: center; gap: 2px; max-width: 100%; white-space: nowrap; }
.network-sort { display: inline-flex; align-items: center; justify-content: center; min-width: 0; font-size: 14px; }
.network-sort .sort-arrow { width: 5px; margin-left: 1px; font-size: 10px; }
.node-row { cursor: pointer; border-bottom: 1px solid var(--line); padding: 8px 0; min-height: 56px; transition: background-color 120ms ease; -webkit-tap-highlight-color: transparent; }
.node-row:hover { background: #e9ede54d; }
.node-row td { padding: 0; min-width: 0; }
.node-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.status-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: #a8afa1; }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 2px #37765012; }
.status-dot.pending { background: var(--terracotta); }
.node-name-group { display: block; min-width: 0; width: 100%; }
.node-toggle { display: flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 15px; line-height: 1.35; font-weight: 600; max-width: 100%; }
.node-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 5px; height: 5px; flex-shrink: 0; border-right: 1px solid #899783; border-bottom: 1px solid #899783; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; margin: 0 3px 0 2px; }
.expanded .chevron { transform: rotate(225deg) translate(-1px, -1px); }
.node-addresses { display: grid; justify-items: start; gap: 0; min-width: 0; }
.node-address { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; min-height: 24px; border: 0; border-radius: 4px; padding: 2px 3px; margin: 0 0 0 -3px; background: none; text-align: left; font: 12px/1.4 var(--mono); color: #527a83; user-select: text; }
.address-text { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.copy-icon { width: 12px; height: 12px; flex: 0 0 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .5; }
.copy-check { display: none; }
.node-address:hover, .node-address:focus-visible { color: var(--teal); background: #287d8a0a; }
.node-address:hover .copy-icon, .node-address:focus-visible .copy-icon { opacity: 1; }
.node-address[data-copied] { color: var(--green); }
.node-address[data-copied] .copy-icon { opacity: 1; }
.node-address[data-copied] .copy-glyph { display: none; }
.node-address[data-copied] .copy-check { display: block; }
.node-address-unknown { font-size: 12px; color: var(--muted); }
.clipboard-helper { position: fixed; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; font-size: 16px; pointer-events: none; }
.copy-status { position: fixed; z-index: 10; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 8px); max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 24px; background: var(--ink); color: var(--surface); box-shadow: 0 4px 20px #28352f1a; font-size: 13px; text-align: center; pointer-events: none; opacity: 0; transition: opacity .15s ease, transform .15s ease; }
.copy-status.visible { opacity: 1; transform: translate(-50%, 0); }
.node-note { font-size: 12px; color: var(--terracotta); margin: 3px 0 0; }
.cell-label { display: none; }
.resource-cell { color: var(--green); }
.memory-cell { color: var(--blue); }
.disk-cell { color: var(--copper); }
.resource-cell.warm { color: var(--amber); }
.resource-cell.hot { color: var(--terracotta); }
.meter-value { font: 500 14px/1.35 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.4px; white-space: nowrap; }
.meter-track { height: 2px; width: 64px; max-width: 85%; background: #dfe4da; margin-top: 5px; overflow: hidden; border-radius: 2px; }
.meter-fill { height: 100%; width: 0; background: currentColor; transition: width .35s ease; border-radius: inherit; }
.network-block { min-width: 0; }
.network-value { color: var(--teal); font: 12px/1.4 var(--mono); font-variant-numeric: tabular-nums; min-width: 0; }
.network-value.tx { color: var(--amber); }
.network-value + .network-value { margin-top: 2px; }
.network-reading { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.direction { font-weight: 600; }
.uptime-cell { text-align: right; }
.uptime-value { font-size: 13px; font-variant-numeric: tabular-nums; color: #57734d; white-space: nowrap; }
.node-row.offline .resource-cell, .node-row.offline .network-value, .node-row.offline .uptime-value { color: #7e8777; }
.node-row.offline .meter-fill { background: #abb4a3; }
/* Expansion adds a separate detail panel; all six summary columns stay put. */
.node-row.expanded { background: #e9ede58c; }
.resource-context { margin-top: 6px; font-size: 12px; line-height: 1.5; color: #51634f; }
.resource-context p { margin: 0; overflow-wrap: anywhere; }
.resource-note { color: var(--muted); margin-top: 2px !important; }
.node-detail { display: block; border-bottom: 1px solid var(--line); background: #eef0e64d; }
.node-detail > td { display: block; padding: 0; }
.detail-content { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(2, minmax(0, 1fr)); grid-template-areas: "system resources network"; gap: 16px; padding: 14px; animation: reveal .15s ease; }
.detail-content > section { min-width: 0; }
.detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.detail-heading h3 { margin: 0; font-size: 12px; line-height: 1.5; font-weight: 600; color: var(--ink); }
.detail-heading > span { font-size: 11px; color: var(--muted); }
.resources-detail { grid-area: resources; }
.resource-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resource-detail { min-width: 0; }
.resource-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 4px; }
.resource-heading > span:first-child { color: var(--muted); font-size: 12px; }
.resource-detail .meter-value { font-size: 18px; }
.resource-detail .meter-track { width: 100%; max-width: 100%; }
.disk-io-detail { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.disk-io-detail .detail-heading { margin-bottom: 4px; }
.disk-io-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.io-value { min-width: 0; }
.io-reading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--copper); }
.io-reading > span:first-child { font-size: 12px; }
.io-reading [data-rate] { font: 500 14px/1.5 var(--mono); overflow-wrap: anywhere; }
.io-total { display: block; color: var(--muted); font: 12px/1.5 var(--mono); overflow-wrap: anywhere; }
.network-detail { grid-area: network; border-left: 1px solid var(--line); padding-left: 16px; }
.network-detail .network-block { display: grid; gap: 4px; margin-bottom: 8px; }
.network-detail .network-value { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0 10px; margin: 0; }
.network-detail .network-reading { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.network-label { font: 12px/1.5 sans-serif; user-select: none; }
.network-detail [data-rate] { font: 500 14px/1.5 var(--mono); letter-spacing: -.3px; overflow-wrap: anywhere; white-space: normal; }
.network-total { display: block; font: 12px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.detail-offline .resource-cell, .detail-offline .network-value, .detail-offline .io-reading { color: #7e8777; }
.rx { color: var(--teal); }
.tx { color: var(--amber); }
.chart-area { display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: 8px; }
.chart-axis { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: var(--muted); padding: 5px 0; font: 10px/1.2 var(--mono); user-select: none; }
.chart-plot { grid-column: 2; grid-row: 1; position: relative; }
.network-chart { width: 100%; height: 80px; display: block; overflow: visible; }
.chart-grid { fill: none; stroke: #dce2d5; stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.network-line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.network-line.tx { stroke-dasharray: 5 3; }
.network-point { fill: currentColor; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.chart-time { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); line-height: 1.4; user-select: none; }
.system-detail { grid-area: system; padding-right: 16px; border-right: 1px solid var(--line); }
.system-identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 4px 14px; }
.system-fact { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 12px; line-height: 1.5; }
.system-label { color: var(--muted); flex: 0 0 36px; user-select: none; -webkit-user-select: none; }
.system-value { color: #4c6048; overflow-wrap: anywhere; min-width: 0; user-select: text; }
.fact-cpu_model .system-value, .fact-arch .system-value { color: var(--blue); }
.fact-hostname .system-value, .fact-kernel .system-value { color: #616957; }
.fact-name .system-value { color: var(--ink); font-weight: 600; }
.fact-ip { align-items: start; }
.fact-ip .system-label { padding-top: 3px; }
.fact-ip .node-addresses { flex: 1; grid-template-columns: minmax(0, 1fr); }
.system-wide { grid-column: 1 / -1; }
.detail-management { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 4px; font-size: 12px; margin-top: 2px; }
.detail-management .text-button { font-size: 12px; padding: 4px 0; }
.uninstall-button, .uninstall-status { color: var(--terracotta); }
.empty-state { padding: 72px 20px 84px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-state p { margin: 16px 0 0; }
.empty-mark { display: block; position: relative; width: 24px; height: 24px; margin: 0 auto; border: 1px solid #c4cabb; border-radius: 50%; }
.empty-mark::before, .empty-mark::after { content: ""; position: absolute; background: #b1bba6; }
.empty-mark::before { width: 8px; height: 1px; top: 11px; left: 7px; }
.empty-mark::after { width: 1px; height: 8px; top: 7px; left: 11px; }
.page-error { font-size: 12px; color: var(--terracotta); padding: 0 0 12px; margin: 0; }
.dialog { background: var(--surface); border: 1px solid #e1e3d7; color: var(--ink); width: min(420px, calc(100% - 28px)); padding: 24px; border-radius: 16px; box-shadow: 0 20px 80px rgba(39, 43, 33, .13); max-height: calc(100dvh - 36px); overflow-y: auto; overscroll-behavior: contain; }
.install-dialog { width: min(480px, calc(100% - 28px)); }
.dialog::backdrop { background: rgba(45, 49, 40, .19); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.dialog-description { margin: 0 0 24px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.eyebrow { color: var(--green); font-size: 11px; letter-spacing: 2px; margin: 0 0 6px; font-weight: 600; }
h2 { font-size: 22px; line-height: 1.5; font-weight: 550; margin: 0; }
.close-button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; margin: -6px -10px -6px 0; font-family: Arial, sans-serif; font-size: 26px; font-weight: 300; line-height: 1; color: #87917c; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.close-button:hover { color: var(--ink); background: #e9ede5; }
.field { margin: 0 0 15px; }
.field label, .install-result > label { display: block; margin-bottom: 8px; font-size: 13px; color: #5f6d56; }
.field input, .command { width: 100%; background: transparent; border: 1px solid #d4dccb; border-radius: 3px; padding: 10px 11px; color: var(--ink); font-size: 14px; line-height: 1.5; outline: 0; }
.field input:focus, .command:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(77, 121, 93, .07); }
.field input::placeholder { color: #939e87; font-size: 13px; }
.field input:read-only { color: var(--muted); background: #f2f3ec; }
.field-help { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; overflow-wrap: anywhere; }
.primary-button { width: 100%; background: var(--green); color: #fcfbf8; padding: 10px 18px; border: 1px solid transparent; border-radius: 3px; font-size: 14px; line-height: 1.5; transition: background .15s ease; }
.primary-button:hover { background: #3e674d; }
.form-error { color: var(--red); font-size: 12px; line-height: 1.6; margin: 10px 0 12px; overflow-wrap: anywhere; }
.toggle-field { position: relative; display: flex; align-items: center; gap: 15px; justify-content: space-between; font-size: 14px; cursor: pointer; }
.toggle-field input { position: absolute; right: 0; height: 25px; width: 41px; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { display: block; width: 37px; height: 21px; flex-shrink: 0; border-radius: 20px; background: #c3ccba; transition: background .15s ease; pointer-events: none; }
.switch-track::after { display: block; content: ""; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); margin: 3px; transition: transform .15s ease; }
.toggle-field input:checked + .switch-track { background: var(--green); }
.toggle-field input:checked + .switch-track::after { transform: translateX(16px); }
.toggle-field input:focus-visible + .switch-track { outline: 2px solid var(--green); outline-offset: 4px; }
.toggle-field input:disabled + .switch-track { opacity: .5; }
.manage-page { max-width: 1080px; margin: 0 auto; padding: 28px 0 60px; }
.manage-heading { margin-bottom: 34px; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.5; padding: 6px 0; }
.back-link:hover { color: var(--green); }
h1 { margin: 12px 0 0; font-size: 36px; line-height: 1.3; font-weight: 550; letter-spacing: -.8px; }
.settings-layout { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 44px; }
.settings-tabs { display: flex; flex-direction: column; align-self: start; gap: 9px; padding-right: 28px; border-right: 1px solid var(--line); }
.settings-tabs button { background: none; border: 0; padding: 10px 0; text-align: left; font-size: 15px; line-height: 1.5; color: var(--muted); }
.settings-tabs button[aria-selected="true"] { color: var(--green); font-weight: 600; }
.settings-tabs button:hover { color: var(--ink); }
.settings-content { min-width: 0; min-height: 250px; max-width: 680px; }
.settings-panel h3 { margin: 7px 0 30px; font-size: 23px; font-weight: 550; }
.settings-panel .field { margin-bottom: 24px; }
.settings-panel .field input { background: #fcfbf859; font-size: 16px; padding: 12px; }
.settings-panel .primary-button { width: auto; min-width: 180px; }
.settings-panel .toggle-field { padding: 18px 0; border-block: 1px solid var(--line); }
.settings-feedback { min-height: 20px; margin: 20px 0 0 204px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; font-size: 12px; }
.auth-page { max-width: 980px; margin: 0 auto; }
.auth-layout { min-height: calc(100dvh - 150px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 70px; padding: 60px 0 100px; }
.auth-welcome { align-self: center; }
.welcome-mark { display: block; width: 48px; height: 48px; margin: 0 0 22px -7px; }
.auth-context { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.auth-welcome h1 { font-size: clamp(28px, 3.5vw, 42px); letter-spacing: -1.2px; margin: 0; line-height: 1.45; }
.auth-welcome .back-link { margin-top: 25px; }
#auth-form { padding-left: 48px; border-left: 1px solid var(--line); }
#auth-form .field { margin-bottom: 24px; }
#auth-form .field label { font-size: 14px; }
#auth-form .field input { font-size: 16px; padding: 12px 0; border: 0; border-bottom: 1px solid #cbd3c5; border-radius: 0; }
#auth-form .field input:focus { border-bottom-color: var(--green); box-shadow: 0 1px 0 var(--green); }
#auth-submit { margin-top: 8px; padding-block: 12px; }
#settings-status { color: var(--muted); }
#settings-status[data-state="saved"] { color: var(--green); }
#settings-status[data-state="error"] { color: var(--terracotta); }
.settings-feedback .form-error { margin: 0; }
.settings-feedback .text-button { font-size: 12px; }
.account-name { margin: 0 0 15px; font-size: 18px; overflow-wrap: anywhere; }
.optional { color: var(--muted); margin-left: 5px; font-size: 12px; }
.install-result { margin-top: 21px; border-top: 1px solid var(--line); padding-top: 19px; }
.command { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; background: #f1f3eb; color: #49663e; font-size: 12px; line-height: 1.7; resize: vertical; }
.command-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.command-footer .field-help { margin: 0; font-size: 11px; }
.command-footer .text-button { min-height: 44px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 6px; }
.confirm-copy { font-size: 14px; line-height: 1.8; margin: 0 0 15px; color: #626e58; overflow-wrap: anywhere; }
.confirm-copy strong { font-weight: 600; color: var(--ink); }
.confirm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; margin-top: 25px; }
.confirm-actions .primary-button { width: auto; }
.danger-button { background: var(--terracotta); }
.danger-button:hover { background: #97513b; }
.noscript { text-align: center; padding: 30px; font-size: 14px; color: var(--terracotta); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1050px) {
  .page-shell { padding-inline: 20px; }
  .nodes-table thead tr, .node-row { column-gap: 10px; }
  .detail-content { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-areas: "system resources" "system network"; gap: 10px 16px; }
  .network-detail { border-left: 0; border-top: 1px solid var(--line); padding: 8px 0 0; }
  .system-detail { padding-right: 16px; }
  .system-fact { gap: 6px; }
  .auth-layout { gap: 35px; }
  #auth-form { padding-left: 30px; }
}
@media (max-width: 760px) {
  html { scrollbar-gutter: auto; }
  .page-shell { padding-inline: 14px; }
  .site-header { min-height: 54px; }
  .brand-word { font-size: 25px; }
  .brand-mark { width: 34px; height: 34px; }
  /* The heading and summary rows share all six columns at every width. */
  .nodes-table { --columns: minmax(54px, 1.4fr) repeat(3, minmax(35px, .8fr)) minmax(74px, 1.7fr) minmax(35px, .9fr); }
  .nodes-table thead tr, .node-row { column-gap: clamp(4px, 1vw, 8px); }
  .nodes-table thead tr { min-height: 48px; }
  .nodes-table th { padding-block: 0; }
  .nodes-table th:not(:first-child):not(:last-child), .node-row .resource-cell { text-align: center; }
  .sort-button { min-height: 44px; padding-block: 10px; }
  .sort-arrow { width: 6px; margin-left: 2px; font-size: 10px; }
  .desktop-only { display: none; }
  .node-row { min-height: 60px; padding-block: 10px; }
  .node-row .node-identity { align-items: center; gap: 4px; }
  .node-row .status-dot { margin-top: 0; }
  .node-row .node-toggle { min-height: 32px; gap: 3px; }
  .node-row .chevron { width: 4px; height: 4px; margin: 0 2px 0 1px; }
  .node-row .meter-track { margin-inline: auto; }
  .node-row .network-reading { gap: 2px; }
  .node-row [data-rate] { font-size: 12px; letter-spacing: -.3px; overflow-wrap: anywhere; white-space: normal; }
  .uptime-value { display: inline-block; vertical-align: top; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
  .resource-context { margin-top: 6px; font-size: 12px; }
  .detail-content { grid-template-columns: 1fr; grid-template-areas: "resources" "network" "system"; gap: 10px; padding: 12px 10px; }
  .resource-summary { gap: 12px; }
  .system-detail { border-right: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
  .network-chart { height: 76px; }
  .system-fact { font-size: 12px; }
  .fact-kernel { grid-column: 1 / -1; }
  .dialog { padding: 20px; }
  .manage-page { padding-top: 20px; }
  .manage-heading { margin-bottom: 24px; }
  .settings-layout { grid-template-columns: 120px minmax(0, 1fr); gap: 25px; }
  .settings-tabs { padding-right: 20px; }
  .settings-feedback { margin-left: 145px; }
}
@media (max-width: 540px) {
  .page-shell { padding-inline: 12px; }
  .header-end { gap: 10px; }
  .sort-arrow { margin-left: 1px; width: 5px; }
  .node-row .node-toggle { font-size: 13px; }
  .node-row .meter-value { font-size: 12px; }
  .node-row .meter-track { width: 28px; }
  .list-footer { gap: 5px 10px; }
  .server-version { font-size: 11px; }
  .chart-area { grid-template-columns: 64px minmax(0, 1fr); column-gap: 6px; }
  .disk-io-values { gap: 10px; }
  .resource-summary { gap: 8px; }
  .resource-detail .meter-value { font-size: 17px; }
  .settings-layout { grid-template-columns: 1fr; gap: 26px; }
  .settings-tabs { flex-direction: row; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 9px; gap: 15px; }
  .settings-tabs button { padding: 7px 0; }
  .settings-content { min-height: 180px; }
  .settings-panel h3 { margin: 0 0 24px; font-size: 22px; }
  .settings-feedback { margin-left: 0; }
  .field input { font-size: 16px; }
  .auth-page { max-width: 400px; }
  .auth-layout { display: block; min-height: 0; padding: 42px 8px 50px; }
  .auth-welcome h1 { font-size: 30px; }
  .welcome-mark { margin-bottom: 20px; }
  .auth-welcome .back-link { margin-top: 14px; }
  #auth-form { margin-top: 30px; padding-left: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
