:root {
  color-scheme: dark;
  --page: #151618;
  --rail: #101113;
  --surface: #1b1d20;
  --field: #222428;
  --hover: #2a2d31;
  --stroke: #36393e;
  --muted: #a9abb0;
  --text: #ededee;
  --strong: #f7f7f7;
  --accent: #a2b2ec;
  --accent-ink: #1e2642;
  --accent-field: #292d3c;
  --good: #85cba3;
  --warning: #d6ac75;
  --danger: #f0a8a9;
  --top: 60px;
  --rail-width: 232px;
  --edge: clamp(20px,3.2vw,40px);
  --ease: cubic-bezier(.2,.8,.2,1);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f8f8f7;
  --rail: #efefef;
  --surface: #fff;
  --field: #f6f6f6;
  --hover: #e9e9e9;
  --stroke: #dbdcdd;
  --muted: #52555a;
  --text: #262729;
  --strong: #171819;
  --accent: #344888;
  --accent-ink: #fff;
  --accent-field: #e6eaf7;
  --good: #236749;
  --warning: #885500;
  --danger: #a22c4a;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-variant-numeric: tabular-nums; background: var(--page); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--strong); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .52; }
h1, h2, h3, p { margin: 0; }
h1 { color: var(--strong); font-size: clamp(27px,3.6vw,38px); font-weight: 560; line-height: 1.12; letter-spacing: -.027em; }
h2 { color: var(--strong); font-size: 19px; font-weight: 570; letter-spacing: -.025em; }
h3 { font-size: 14px; font-weight: 580; }
code, kbd, pre, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
code { overflow-wrap: anywhere; }
.eyelabel { color: var(--muted); font-size: 12px; font-weight: 530; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.skip { position: fixed; left: 8px; top: 8px; transform: translateY(-150%); z-index: 10; }
.skip:focus-visible { transform: none; padding: 8px; border-radius: 6px; background: var(--page); }
.topbar { position: sticky; top: 0; z-index: 3; height: var(--top); display: flex; align-items: center; gap: 22px; padding: 0 20px; background: var(--rail); border-bottom: 1px solid var(--stroke); }
.brand { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 590; white-space: nowrap; }
.brand-mark { display: block; width: 28px; height: 28px; flex: 0 0 auto; }
.top-actions { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: 13px; white-space: nowrap; }
.top-actions > a { color: var(--muted); }
.top-actions > a:hover { color: var(--strong); }
#project-switch { min-width: 0; padding-left: 22px; border-left: 1px solid var(--stroke); }
#project-switch:empty, #account-menu:empty { display: none; }
.menu { position: relative; }
.menu > summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-items { z-index: 4; position: absolute; top: calc(100% + 10px); left: 0; min-width: 252px; max-width: min(360px,85vw); padding: 7px; background: var(--surface); border: 1px solid var(--stroke); border-radius: 12px; box-shadow: 0 8px 22px #08090b44; }
.menu-right .menu-items { left: auto; right: 0; }
.menu-items > * { margin: 0; text-align: left; width: 100%; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--accent-field); border: 1px solid var(--stroke); color: var(--accent); font-weight: 700; border-radius: 50%; }
#shell { display: flex; min-height: calc(100dvh - var(--top)); }
#sidebar { align-self: flex-start; position: sticky; top: var(--top); flex: 0 0 var(--rail-width); width: var(--rail-width); height: calc(100dvh - var(--top)); overflow-y: auto; border-right: 1px solid var(--stroke); background: var(--rail); padding: 16px 12px 12px; display: flex; flex-direction: column; }
#sidebar nav { display: grid; }
.nav-group + .nav-group { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--stroke); }
.nav-group > .eyelabel { padding: 0 11px 5px; }
.nav-link, .nav-search, .menu-item { width: 100%; display: flex; gap: 10px; align-items: center; min-height: 36px; padding: 6px 10px; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 7px; white-space: nowrap; font-size: 13px; }
.nav-link:hover, .nav-search:hover, .menu-item:hover { background: var(--hover); color: var(--strong); }
.nav-link[aria-current="page"] { color: var(--accent); background: var(--accent-field); border-left: 2px solid var(--accent); padding-left: 9px; font-weight: 575; }
.nav-search { margin-bottom: 16px; background: var(--field); border-color: var(--stroke); }
kbd { margin-left: auto; font-size: 11px; letter-spacing: .02em; color: var(--muted); }
.rail-bottom { margin-top: auto; padding-top: 20px; }
.icon { width: 16px; height: 16px; display: block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.rail-small { --rail-width: 60px; }
.rail-small #sidebar { padding-inline: 7px; }
.rail-small .nav-link, .rail-small .nav-search { justify-content: center; padding-inline: 0; }
.rail-small #sidebar .nav-label, .rail-small #sidebar .eyelabel, .rail-small #sidebar kbd { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#main { width: 100%; min-width: 0; padding: 32px var(--edge) 48px; outline: none; }
.page-head { display: grid; gap: 8px; margin-bottom: 24px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.subtitle { color: var(--muted); max-width: 64ch; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.toolbar .search { width: min(100%, 345px); }
.search { position: relative; }
.search .icon { position: absolute; inset: 10px auto auto 10px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 34px; width: 100%; }
input, select, textarea { color: var(--text); background: var(--field); border: 1px solid var(--stroke); padding: 8px 11px; border-radius: 7px; min-height: 37px; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="checkbox"] { accent-color: var(--accent); min-height: 0; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--stroke); border-radius: 7px; background: var(--field); color: var(--text); font-size: 13px; font-weight: 575; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--hover); color: var(--strong); }
.button.primary { background: var(--strong); border-color: var(--strong); color: var(--page); }
.button.primary:hover:not(:disabled) { filter: brightness(1.1); }
.button.danger { color: var(--danger); }
.button.ghost { background: transparent; border-color: transparent; }
.button.icon-button { width: 36px; padding-inline: 4px; }
.badge { min-width: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--stroke); padding: 3px 8px; border-radius: 100px; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.running, .ready, .current { color: var(--good); }
.starting, .parking, .pending, .building { color: var(--warning); }
.failed, .unavailable, .error { color: var(--danger); }
.panel, .table-frame, .empty { background: var(--surface); border: 1px solid var(--stroke); border-radius: 11px; }
.panel { padding: 17px; display: grid; gap: 10px; min-width: 0; }
.stack { display: grid; gap: 14px; }
.empty { min-height: 210px; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; padding: 24px 15px; }
.empty.compact { min-height: 125px; }
.empty > .icon { width: 31px; height: 31px; color: var(--accent); margin-bottom: 4px; }
.empty .muted { max-width: 58ch; }
.table-frame { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 550; background: var(--field); }
th, td { padding: 12px 16px; }
td { border-top: 1px solid var(--stroke); }
tbody tr:hover { background: var(--field); }
td:last-child, th:last-child { padding-right: 16px; }
td .button { min-height: 30px; }
table .machine-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 590; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tabs { display: flex; gap: 14px; align-items: center; overflow-x: auto; border-bottom: 1px solid var(--stroke); margin-bottom: 14px; scrollbar-width: thin; }
.tab { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); padding: 9px 2px; white-space: nowrap; font-size: 13px; font-weight: 560; }
.tab[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.tab:hover { color: var(--strong); }
dl { display: grid; grid-template-columns: minmax(70px,auto) 1fr; column-gap: 20px; row-gap: 8px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
pre { margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(210px,100%),1fr)); gap: 13px; }
.metric-value { font-size: clamp(19px,2.4vw,29px); color: var(--strong); font-weight: 595; }
.notice { padding: 10px 12px; border: 1px solid var(--stroke); border-left: 3px solid currentColor; border-radius: 7px; background: var(--field); }
.wrap { overflow-wrap: anywhere; }
.text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.initial { padding-top: 20px; color: var(--muted); }
/* Sign-in surface. Documented shape rule: actions inside the auth card are
   pills (the Yandex ID brand button leads), everything else keeps panel radii. */
.auth { width: min(100%, 412px); margin-inline: auto; min-height: calc(100dvh - var(--top) - 80px);
  display: grid; place-content: center; gap: 14px; }
.auth-card { gap: 12px; padding: 26px 24px 18px; border-radius: 14px;
  box-shadow: 0 18px 48px #08090b40; }
:root[data-theme="light"] .auth-card { box-shadow: 0 16px 40px #262a351f; }
.auth-brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
.auth-mark { display: inline-grid; place-items: center; }
.auth-mark svg { display: block; }
.auth-brand h1 { font-size: clamp(23px, 3vw, 27px); font-weight: 620; letter-spacing: -.031em; }
.auth-subtitle { color: var(--muted); max-width: 36ch; }
.auth-feedback, .auth-note { padding: 10px 12px; border: 1px solid var(--stroke); border-radius: 9px;
  background: var(--field); font-size: 13px; line-height: 1.45; }
.auth-feedback.bad { color: var(--danger); border-left: 3px solid var(--danger); }
.auth-feedback.good { color: var(--good); border-left: 3px solid var(--good); }
.auth-note { color: var(--muted); border-left: 3px solid var(--warning); }
.auth-actions { display: grid; gap: 10px; }
.auth-actions .button { width: 100%; }
.yandex-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 46px; padding: 0 18px; border: 1px solid var(--stroke); border-radius: 999px;
  background: #000; color: #fff; font-size: 14px; font-weight: 575; }
.yandex-button:hover:not(:disabled) { background: #1c1d20; color: #fff; }
.yandex-button:active:not(:disabled) { transform: translateY(1px); }
.yandex-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto;
  border-radius: 50%; background: #FC3F1D; color: #fff; font-size: 14.5px; font-weight: 700; }
.yandex-label { white-space: nowrap; }
.auth-secondary { min-height: 46px; border-radius: 999px; background: transparent;
  color: var(--strong); font-size: 14px; font-weight: 575; }
.auth-secondary:hover:not(:disabled) { background: var(--hover); }
.auth-invite { display: grid; justify-items: center; gap: 4px; padding-top: 12px;
  border-top: 1px solid var(--stroke); }
.auth-note-label { color: var(--muted); font-size: 12px; }
.auth-invite .button { min-height: 36px; padding-inline: 14px; border-color: transparent;
  background: none; color: var(--muted); }
.auth-invite .button:hover:not(:disabled) { background: none; color: var(--strong); }
.auth-back { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.auth-back .button { border-radius: 999px; }
.auth-card form { gap: 12px; }
.auth-card .form-footer { justify-content: stretch; }
.auth-card .form-footer .button, .auth-card .form-footer .yandex-button { width: 100%; }
.auth-card button[aria-busy="true"]::after { content: ""; width: 13px; height: 13px; flex: 0 0 auto;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: working .7s linear infinite; }
.auth-compatibility { display: grid; justify-items: center; gap: 10px; padding: 0 6px;
  color: var(--muted); text-align: center; }
.auth-compatibility summary { cursor: pointer; }
.auth-compatibility[open] { gap: 12px; }
.auth-compatibility-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.auth-compatibility-actions .button { border-radius: 999px; min-height: 36px; }
.auth-compatibility .text-link { font-size: 12px; }
.auth-brand, .auth-card, .auth-compatibility { animation: auth-enter 420ms var(--ease) both; }
.auth-card { animation-delay: 70ms; }
.auth-compatibility { animation-delay: 140ms; }
@keyframes auth-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (max-width: 750px) {
  .auth { min-height: calc(100dvh - var(--top) - 70px); }
  .auth-card { padding: 22px 18px 16px; }
  .yandex-button, .auth-secondary { min-height: 48px; }
}
dialog { border: 1px solid var(--stroke); border-radius: 13px; background: var(--surface); color: var(--text); width: min(650px,calc(100% - 26px)); max-height: calc(100dvh - 26px); padding: 0; overflow: auto; box-shadow: 0 24px 74px #08090b80; }
dialog::backdrop { background: #08090bc4; }
.dialog-head { position: sticky; top: 0; z-index: 1; padding: 12px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--stroke); }
.dialog-head h2 { overflow-wrap: anywhere; min-width: 0; }
.dialog-content { padding: 17px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-weight: 570; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-footer { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; }
.choice { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-dialog { width: min(1150px,calc(100% - 26px)); }
.detail-split { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: 15px; }
.terminal { background: var(--page); border: 1px solid var(--stroke); padding: 13px; border-radius: 8px; display: grid; gap: 10px; align-content: start; min-height: 250px; }
.terminal pre { max-height: 320px; }
.terminal textarea { width: 100%; }
#notification { position: fixed; z-index: 6; bottom: 18px; right: 18px; max-width: min(440px,calc(100% - 36px)); }
#notification:not(:empty) { background: var(--surface); border: 1px solid var(--stroke); border-radius: 9px; padding: 10px 14px; box-shadow: 0 8px 30px #08090b40; }
@media (max-width: 750px) {
  :root { --top: 54px; --rail-width: 53px; --edge: 13px; }
  .topbar { gap: 10px; padding-inline: 11px; }
  .top-actions { gap: 9px; }
  #project-switch { padding-left: 7px; }
  #sidebar { padding: 10px 5px; }
  #sidebar .nav-link, #sidebar .nav-search { padding-inline: 0; justify-content: center; }
  #sidebar .nav-label, #sidebar .eyelabel, #sidebar kbd { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #rail-collapse { display: none; }
  #main { padding-top: 22px; }
  .detail-split, .form-grid { grid-template-columns: 1fr; }
  .nav-group + .nav-group { margin-top: 7px; padding-top: 6px; }
  .toolbar .search { width: 100%; }
  .menu-items { position: fixed; top: calc(var(--top) + 3px); left: 10px; }
  .menu-right .menu-items { right: 10px; }
}
@media (max-width: 430px) {
  .brand > span:last-child .tech { display: none; }
  #project-switch .project-name { max-width: 108px; }
  .button { padding-inline: 9px; }
}
.project-name { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

.operation { display: inline-flex; gap: 8px; align-items: center; width: fit-content; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.operation::before { content: ""; width: 8px; height: 8px; border: 1px solid var(--muted); border-radius: 50%; }
.operation[aria-busy="true"]::before { border-color: var(--accent); border-right-color: transparent; animation: working .8s linear infinite; }
.mono-id { font-size: 12px; font-variant-numeric: tabular-nums; }
.section-enter { animation: arrive 180ms var(--ease) both; }
dialog[open], .menu[open] .menu-items { animation: panel-in 200ms var(--ease) both; }
dialog[open]::backdrop { animation: backdrop-in 160ms var(--ease) both; }
.nav-link, .nav-search, .tab, .menu-item, .button { transition: color 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease); }
.button:active:not(:disabled) { transform: translateY(1px); }
.nav-link[aria-current="page"] .icon { animation: select-nav 200ms var(--ease) both; }
.status-changed .status-dot { animation: signal 280ms var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panel-in { from { opacity: .3; transform: translateY(5px) scale(.993); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes select-nav { from { transform: translateX(-3px); } to { transform: translateX(0); } }
@keyframes signal { from { transform: scale(.5); opacity: .5; } to { transform: scale(1); opacity: 1; } }
@keyframes working { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.row-link { display: inline-flex; align-items: center; background: none; color: var(--text); border: none; border-radius: 4px; padding: 0; font: inherit; text-align: left; }
.row-link:hover { color: var(--accent); }
fieldset.panel { margin: 0; border: 1px solid var(--stroke); padding: 8px 12px 12px; }
.stack { grid-template-columns: minmax(0,1fr); }
.table-frame { max-width: 100%; min-width: 0; }
@media (max-width: 750px) {
  .machines-list th:nth-child(n+3), .machines-list td:nth-child(n+3) { display: none; }
  .machines-list td:first-child { width: 100%; }
  .machines-list .machine-name { overflow-wrap: anywhere; white-space: normal; }
  .toolbar .actions { justify-content: space-between; width: 100%; }
  .detail-dialog dl { column-gap: 12px; }
}

.meta-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.machine-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
table .machine-name { font-weight: 560; }
.machines-list td:last-child { white-space: nowrap; }
.terminal { display: grid; grid-template-rows: auto minmax(180px,1fr) auto auto; gap: 12px; }
.terminal .terminal-output { display: block; max-height: 385px; min-height: 180px; overflow: auto; margin: 0;
  color: var(--text); padding: 12px 0; border-block: 1px solid var(--stroke); }
.terminal .form-footer { justify-content: end; }
.terminal.attached-console { min-height: min(490px,58vh); }
.terminal > h3 { display: flex; align-items: center; gap: 8px; }
.terminal .field > span { font-weight: 520; font-size: 12px; color: var(--muted); }
.detail-dialog { min-height: min(650px,calc(100dvh - 26px)); }
.detail-split > * { min-width: 0; }
.detail-content { display: grid; gap: 12px; align-content: start; padding: 8px 0; }
.machine-desktop { display: block; max-width: 100%; height: auto; border: 1px solid var(--stroke); border-radius: 6px; }
@media (max-width: 750px) {
  .detail-dialog { min-height: 0; }
  .terminal.attached-console { min-height: 0; }
  .terminal .terminal-output { min-height: 112px; max-height: 220px; }
  .terminal { grid-template-rows: auto minmax(112px,1fr) auto auto; }
}

.menu-head { display: grid; gap: 3px; padding: 8px 10px 9px; }
.menu-head-title { color: var(--strong); font-size: 14px; font-weight: 590; overflow-wrap: anywhere; }
.menu-head-id { display: flex; align-items: center; gap: 5px; min-width: 0; }
.menu-head-id code { font-size: 12px; }
.menu-head-id .icon-button, .id-copy .icon-button { width: 28px; min-height: 28px; padding-inline: 3px; }
.menu-divider { height: 1px; margin: 7px 4px; background: var(--stroke); }
.menu-section { display: grid; gap: 6px; padding: 5px 10px 8px; }
.menu-items .menu-item { padding-block: 8px; }
.menu-danger { color: var(--danger); }
.menu-danger:hover { color: var(--danger); }
.menu-caret { display: inline-block; color: var(--muted); font-size: 10px; transition: transform 150ms var(--ease); }
.menu[open] .menu-caret { transform: rotate(180deg); }
.seg-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; background: var(--field); border: 1px solid var(--stroke); border-radius: 7px; }
.seg { min-height: 26px; padding: 2px 4px; border: 0; border-radius: 5px; background: none; color: var(--muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
.seg:hover { color: var(--strong); }
.seg[aria-pressed="true"] { background: var(--hover); color: var(--strong); font-weight: 580; }

.profile { max-width: min(100%, 760px); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 15px 22px; }
.info-cell { display: grid; gap: 5px; align-content: start; min-width: 0; }
.info-value { color: var(--strong); font-weight: 550; overflow-wrap: anywhere; }
.id-copy { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.scope-list { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-foot { border-top: 1px solid var(--stroke); margin-top: 5px; padding-top: 12px; font-size: 13px; }
.id-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.id-row .badge { padding: 5px 10px; gap: 7px; font-size: 12.5px; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.danger-text { display: grid; gap: 3px; }
.danger-text p { max-width: 52ch; }

/* Usage: one shared ledger surface for the headline metrics, quota columns
   grouped by meaning, and a quiet coverage table that lives in the panel itself. */
.usage-page { gap: 16px; }
.usage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.usage-head .page-head { margin-bottom: 0; }
.usage-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.usage-stamp { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.usage-ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--stroke); border-radius: 11px; }
.usage-metric { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 22px 22px 20px; }
.usage-metric + .usage-metric { border-left: 1px solid var(--stroke); }
.usage-metric-label { color: var(--muted); font-size: 12px; font-weight: 530; }
.usage-metric-figure { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.usage-metric-number { color: var(--strong); font-size: clamp(30px, 3.2vw, 42px); font-weight: 550; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.usage-metric-number.muted { color: var(--muted); font-weight: 400; }
.usage-metric-unit { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.usage-metric-note { color: var(--muted); font-size: 12px; line-height: 1.4; }
.usage-split { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.6fr); gap: 14px; align-items: start; }
.usage-net { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 26px; }
.usage-net-row { display: grid; gap: 4px; }
.usage-net-label { color: var(--muted); font-size: 12px; }
.usage-net-value { color: var(--strong); font-size: clamp(19px, 1.9vw, 24px); font-weight: 550; line-height: 1.2; letter-spacing: -.02em; }
.usage-net-value.muted { color: var(--muted); font-weight: 400; }
.usage-quotas { display: grid; grid-template-columns: 1.15fr .9fr 1fr; }
.usage-quota-group { display: grid; align-content: start; gap: 10px; min-width: 0; padding-inline: 22px; }
.usage-quota-group:first-child { padding-left: 0; }
.usage-quota-group:last-child { padding-right: 0; }
.usage-quota-group + .usage-quota-group { border-left: 1px solid var(--stroke); }
.usage-quota-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.usage-quota-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.usage-quota-row dt { color: var(--muted); font-size: 13px; }
.usage-quota-row dd { color: var(--strong); font-weight: 560; font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage-quota-row dd.muted { color: var(--muted); font-weight: 480; }
.usage-quota-unit { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 480; }
.usage-coverage { display: grid; gap: 10px; }
.usage-coverage .table-frame { background: none; border: 0; border-radius: 0; }
.usage-coverage th { padding: 8px 14px; background: none; border-bottom: 1px solid var(--stroke); font-weight: 520; }
.usage-coverage td { padding: 9px 14px; font-size: 13px; }
.usage-coverage th:first-child, .usage-coverage td:first-child { padding-left: 0; }
.usage-coverage th:last-child, .usage-coverage td:last-child { padding-right: 0; }
.usage-coverage tbody tr:hover { background: none; }
.usage-gaps { color: var(--muted); font-variant-numeric: tabular-nums; }
.usage-gaps.has-gaps { color: var(--warning); font-weight: 550; }
.usage-source-date { display: none; }
@media (max-width: 1220px) {
  .usage-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .usage-quotas { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .usage-quota-group { padding: 0; }
  .usage-quota-group + .usage-quota-group { border-left: 0; border-top: 1px solid var(--stroke); padding-top: 16px; }
}
@media (max-width: 900px) {
  .usage-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-metric:nth-child(odd) { border-left: 0; }
  .usage-metric:nth-child(n+3) { border-top: 1px solid var(--stroke); }
  .usage-coverage th, .usage-coverage td { padding-inline: 10px; }
  .usage-coverage th:first-child, .usage-coverage td:first-child { padding-left: 0; }
  .usage-coverage th:last-child, .usage-coverage td:last-child { padding-right: 0; }
  .usage-coverage th:nth-child(3), .usage-coverage td:nth-child(3) { display: none; }
  .usage-coverage td:first-child { white-space: normal; }
  .usage-coverage .badge { padding: 2px 7px; font-size: 11.5px; }
  .usage-source-date { display: block; color: var(--muted); font-size: 11.5px; }
}
@media (max-width: 750px) {
  .usage-metric { padding: 18px 18px 17px; }
  .usage-tools { width: 100%; justify-content: space-between; }
  .usage-tools .button { margin-left: auto; }
}
@media (max-width: 520px) {
  .usage-ledger { grid-template-columns: minmax(0, 1fr); }
  .usage-metric, .usage-metric + .usage-metric { border-left: 0; border-top: 1px solid var(--stroke); }
  .usage-metric:first-child { border-top: 0; }
}
