/* web/styles.css */
:root {
  color-scheme: dark;
  --hue: 252;
  --bg: oklch(12.5% 0.008 var(--hue));
  --bg-panel: oklch(16% 0.009 var(--hue));
  --bg-raised: oklch(21% 0.011 var(--hue));
  --bg-hover: oklch(25% 0.012 var(--hue));
  --bg-row: oklch(18.5% 0.01 var(--hue));
  --bg-input: oklch(10.5% 0.008 var(--hue));
  --bg-stage: oklch(7.5% 0.007 var(--hue));
  --backdrop: oklch(6% 0.01 var(--hue) / 0.74);
  --line: oklch(26.5% 0.011 var(--hue));
  --line-strong: oklch(36% 0.014 var(--hue));
  --fg: oklch(95.5% 0.005 var(--hue));
  --fg-muted: oklch(77% 0.012 var(--hue));
  --fg-faint: oklch(66% 0.014 var(--hue));
  --red: oklch(54% 0.215 26);
  --red-hover: oklch(59% 0.215 26);
  --red-active: oklch(48% 0.2 26);
  --red-soft: oklch(23% 0.06 26);
  --red-line: oklch(45% 0.15 26);
  --red-text: oklch(80% 0.15 26);
  --red-glow: oklch(54% 0.215 26 / 0.35);
  --on-red: oklch(98.5% 0.01 26);
  --lit: oklch(96% 0.006 var(--hue));
  --lit-glow: oklch(96% 0.006 var(--hue) / 0.32);
  --focus: oklch(92% 0.02 var(--hue));
  --radius: 4px;
  --radius-lg: 8px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-base: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5rem;
  --t-2xl: 1.875rem;
  --font:
    "Segoe UI Variable Text",
    "Segoe UI",
    "Helvetica Neue",
    Helvetica,
    "Noto Sans",
    Ubuntu,
    Cantarell,
    sans-serif;
  --font-display:
    "Segoe UI Variable Display",
    "Segoe UI",
    "Helvetica Neue",
    Helvetica,
    "Noto Sans",
    Ubuntu,
    sans-serif;
  --mono:
    "Cascadia Mono",
    "Consolas",
    "SF Mono",
    "DejaVu Sans Mono",
    ui-monospace,
    monospace;
  --shadow: 0 14px 36px -14px oklch(0% 0 0 / 0.75), 0 2px 6px oklch(0% 0 0 / 0.45);
  --shadow-menu: 0 18px 40px -16px oklch(0% 0 0 / 0.85), 0 3px 8px oklch(0% 0 0 / 0.5);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 180ms;
  --dur-slow: 320ms;
  --rail-w: 252px;
  --dock-w: clamp(360px, 30vw, 520px);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  caret-color: var(--red-hover);
  accent-color: var(--red);
  overflow-wrap: anywhere;
}
::selection {
  background: var(--red);
  color: var(--on-red);
}
* {
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
  border: 2px solid var(--bg);
}
*::-webkit-scrollbar-track {
  background: transparent;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: -0.012em;
}
h1 {
  font-size: var(--t-xl);
}
h2 {
  font-size: var(--t-lg);
}
h3 {
  font-size: var(--t-md);
}
p {
  margin: 0;
}
a {
  color: var(--fg);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--red-text);
}
code,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}
kbd {
  font-family: var(--font);
  font-size: var(--t-xs);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
img,
svg {
  display: block;
}
table {
  border-collapse: collapse;
  width: 100%;
}
[hidden] {
  display: none !important;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--s4);
  z-index: 100;
  padding: var(--s2) var(--s3);
  background: var(--red);
  color: var(--on-red);
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus {
  top: var(--s4);
  color: var(--on-red);
}
.noscript {
  padding: var(--s5);
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  min-width: 0;
}
.mark__tile {
  width: 14px;
  height: 14px;
  background: var(--red);
  flex: none;
  box-shadow: 0 0 0 1px oklch(0% 0 0 / 0.3);
}
.mark__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.22em;
  line-height: 1;
  white-space: nowrap;
  flex: none;
}
.mark__sub {
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
  font-size: var(--t-sm);
  margin-left: -2px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mark--boot {
  gap: 14px;
}
.mark--boot .mark__tile {
  width: 20px;
  height: 20px;
}
.mark--boot .mark__word {
  font-size: 1.5rem;
}
.mark--auth {
  gap: 14px;
  margin-bottom: var(--s6);
}
.mark--auth .mark__tile {
  width: 18px;
  height: 18px;
}
.mark--auth .mark__word {
  font-size: 1.375rem;
}
.mark--auth .mark__sub {
  font-size: var(--t-base);
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: var(--s4);
  padding: var(--s6);
}
.boot__text {
  color: var(--fg-muted);
}
.boot--error .boot__text {
  color: var(--red-text);
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}
.auth__brand {
  padding: clamp(var(--s6), 5vw, var(--s8));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(
      1200px 600px at -10% 110%,
      oklch(22% 0.06 26 / 0.55),
      transparent 60%),
    var(--bg-panel);
  border-top: 3px solid var(--red);
  border-right: 1px solid var(--line);
}
.auth__lede {
  max-width: 42ch;
  color: var(--fg-muted);
  font-size: var(--t-md);
  line-height: 1.55;
}
.auth__lede strong {
  color: var(--fg);
  font-weight: 600;
}
.auth__foot {
  color: var(--fg-faint);
  font-size: var(--t-sm);
}
.auth__form {
  display: grid;
  place-content: center;
  padding: clamp(var(--s6), 5vw, var(--s8));
}
.auth__form .form {
  width: min(100%, 420px);
}
.auth__form h1 {
  margin-bottom: var(--s2);
}
.auth__form .form__intro {
  color: var(--fg-muted);
  margin-bottom: var(--s5);
  max-width: 46ch;
}
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
}
.rail::before {
  content: "";
  height: 3px;
  background: var(--red);
  flex: none;
}
.rail__head {
  padding: var(--s4) var(--s4) var(--s3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-width: 0;
}
.rail__head .mark {
  flex: 1 1 auto;
  min-width: 0;
}
.rail__connect {
  padding: var(--s1) var(--s3) var(--s3);
}
.rail__connect .btn {
  width: 100%;
  justify-content: center;
}
.rail__nav {
  padding: 0 var(--s2);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rail__group {
  padding: var(--s4) var(--s3) var(--s1);
  color: var(--fg-faint);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.rail__group:first-of-type {
  padding-top: var(--s2);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 8px var(--s3);
  border-radius: var(--radius);
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--t-sm);
  position: relative;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.nav-link svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--fg-faint);
  transition: color var(--dur) var(--ease-out);
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--fg);
}
.nav-link:hover svg {
  color: var(--fg);
}
.nav-link[aria-current=page] {
  background: var(--bg-raised);
  color: var(--fg);
}
.nav-link[aria-current=page] svg {
  color: var(--red-text);
}
.nav-link[aria-current=page]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: var(--red);
  border-radius: 0 2px 2px 0;
}
.rail__spacer {
  flex: 1;
}
.rail__user {
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
}
.rail__user-name {
  font-weight: 600;
  font-size: var(--t-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail__user-role {
  color: var(--fg-faint);
  font-size: var(--t-xs);
}
.rail .rail__toggle {
  display: none;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.page {
  padding: var(--s5) clamp(var(--s4), 2.5vw, var(--s7)) var(--s8);
  max-width: 2200px;
  width: 100%;
  animation: page-in var(--dur) var(--ease-out);
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s4);
}
.page__head h1 {
  font-size: var(--t-xl);
}
.page__lede {
  color: var(--fg-muted);
  margin-top: 2px;
  max-width: 70ch;
  font-size: var(--t-sm);
}
.page__actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  align-items: center;
}
.section {
  margin-top: var(--s6);
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s3);
}
.section__head p {
  color: var(--fg-muted);
  font-size: var(--t-sm);
}
.statusline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  align-items: center;
  padding: var(--s2) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s4);
  font-size: var(--t-sm);
  color: var(--fg-muted);
}
.statusline dl {
  display: contents;
}
.statusline div {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin: 0;
}
.statusline dt {
  color: var(--fg-faint);
}
.statusline dd {
  margin: 0;
  color: var(--fg);
  font-weight: 600;
  font-size: var(--t-base);
}
.statusline__sep {
  flex: 1;
}
.statusline .state {
  font-size: var(--t-sm);
}
.statusline .tag {
  font-size: var(--t-xs);
}
.toolbar {
  display: flex;
  gap: var(--s3);
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: var(--s4);
}
.toolbar .field {
  margin: 0;
}
.toolbar .field--grow {
  flex: 1 1 260px;
  max-width: 520px;
}
.toolbar__count {
  margin-left: auto;
  color: var(--fg-muted);
  font-size: var(--t-sm);
  padding-bottom: 9px;
  white-space: nowrap;
}
.toolbar__group {
  display: flex;
  gap: var(--s2);
  align-items: end;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--fg);
  font-weight: 500;
  font-size: var(--t-sm);
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.btn:hover {
  background: var(--bg-hover);
  border-color: var(--fg-faint);
  color: var(--fg);
}
.btn:active {
  background: var(--bg-raised);
}
.btn:disabled,
.btn[aria-disabled=true] {
  opacity: 0.5;
  background: var(--bg-raised);
  border-color: var(--line);
}
.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-red);
  font-weight: 600;
}
.btn--primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: var(--on-red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.btn--primary:active {
  background: var(--red-active);
  box-shadow: none;
}
.btn--primary:disabled {
  background: var(--red);
  border-color: var(--red);
  box-shadow: none;
}
.btn--danger {
  background: transparent;
  border-color: var(--red-line);
  color: var(--red-text);
}
.btn--danger:hover {
  background: var(--red-soft);
  border-color: var(--red-text);
  color: var(--red-text);
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--fg-muted);
}
.btn--ghost:hover {
  background: var(--bg-hover);
  border-color: transparent;
  color: var(--fg);
}
.btn--sm {
  padding: 5px 10px;
  font-size: var(--t-xs);
}
.btn--lg {
  padding: 11px 18px;
  font-size: var(--t-base);
}
.btn--icon {
  padding: 7px;
}
.btn--sm.btn--icon {
  padding: 5px;
}
.btn[aria-haspopup=menu][aria-expanded=true] {
  background: var(--bg-hover);
  color: var(--fg);
}
.btn[data-busy=true] {
  position: relative;
  color: transparent;
}
.btn[data-busy=true]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--fg);
  animation: spin 0.8s linear infinite;
}
.btn--primary[data-busy=true]::after {
  color: var(--on-red);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: clip;
  align-self: end;
  margin-bottom: 1px;
  background: var(--bg-raised);
}
.seg__btn {
  border: 0;
  border-radius: 0;
  min-width: 38px;
}
.seg__btn + .seg__btn {
  border-left: 1px solid var(--line-strong);
}
.seg__btn[aria-pressed=true] {
  background: var(--bg-hover);
  color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--red);
}
.form {
  display: grid;
  gap: var(--s4);
}
.form--inline {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}
.page--settings .form--inline {
  align-items: start;
}
.form--inline .form__actions {
  grid-column: 1 / -1;
}
.field {
  display: grid;
  gap: 5px;
  margin: 0;
}
.field__label {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field__label .req {
  color: var(--red-text);
  margin-left: 2px;
}
.field__hint {
  font-size: var(--t-xs);
  color: var(--fg-faint);
}
.field__error {
  font-size: var(--t-sm);
  color: var(--red-text);
}
.input,
.select,
.textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--fg);
  min-height: 36px;
  transition:
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.input::placeholder {
  color: var(--fg-faint);
}
.input:hover,
.select:hover {
  border-color: var(--fg-faint);
}
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--focus);
}
.input[aria-invalid=true],
.select[aria-invalid=true] {
  border-color: var(--red-text);
}
.input:disabled,
.select:disabled {
  opacity: 0.55;
}
.input--code {
  font-family: var(--mono);
  font-size: 1.375rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 12px 14px;
  min-height: 52px;
}
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23aab0bf' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select--sm {
  min-height: 30px;
  padding-block: 2px;
  font-size: var(--t-sm);
}
.input-wrap {
  position: relative;
}
.input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-faint);
  pointer-events: none;
}
.input-wrap .input {
  padding-left: 36px;
}
.form__actions {
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}
.form__actions .form__note {
  color: var(--fg-faint);
  font-size: var(--t-sm);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  font-size: var(--t-sm);
  color: var(--fg);
  cursor: pointer;
}
.check input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  flex: none;
}
.check--inline {
  align-items: center;
}
.check__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s2) var(--s4);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 220px;
  overflow: auto;
}
.check__list:empty {
  display: none;
}
.fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 6px;
}
.fieldset legend {
  padding: 0;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  cursor: pointer;
  font-size: var(--t-sm);
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch__track {
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: var(--line-strong);
  position: relative;
  transition: background var(--dur) var(--ease-out);
  flex: none;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--fg);
  transition: transform var(--dur) var(--ease-out);
}
.switch input:checked + .switch__track {
  background: var(--red);
}
.switch input:checked + .switch__track::after {
  transform: translateX(14px);
  background: var(--on-red);
}
.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.switch input:disabled + .switch__track {
  opacity: 0.5;
}
.alert {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  font-size: var(--t-sm);
}
.alert svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}
.alert--error {
  background: var(--red-soft);
  border-color: var(--red-line);
  color: var(--fg);
}
.alert--error svg {
  color: var(--red-text);
}
.alert--info svg {
  color: var(--fg-muted);
}
.alert strong {
  font-weight: 600;
}
.alert__body {
  display: grid;
  gap: 2px;
}
.alert[hidden] {
  display: none;
}
.empty {
  padding: var(--s6) var(--s5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  display: grid;
  gap: var(--s2);
  justify-items: start;
  max-width: 64ch;
}
.empty h3 {
  font-size: var(--t-md);
}
.empty p {
  color: var(--fg-muted);
  font-size: var(--t-sm);
}
.empty .btn {
  margin-top: var(--s2);
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: var(--t-sm);
}
.state__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  border: 1.5px solid var(--fg-faint);
  background: transparent;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.state--on .state__dot {
  background: var(--lit);
  border-color: var(--lit);
  box-shadow: 0 0 0 3px var(--lit-glow);
}
.state--on {
  color: var(--fg);
  font-weight: 500;
}
.state--off {
  color: var(--fg-muted);
}
.state--none {
  color: var(--fg-faint);
}
.state--none .state__dot {
  border-style: dashed;
}
.state--warn {
  color: var(--red-text);
}
.state--warn .state__dot {
  border-color: var(--red-text);
  background: var(--red-soft);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--t-xs);
  color: var(--fg-muted);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
}
.tag svg {
  width: 12px;
  height: 12px;
}
.tag--red {
  border-color: var(--red-line);
  color: var(--red-text);
}
.tag--lit {
  border-color: var(--fg-muted);
  color: var(--fg);
}
.tag--solid {
  background: var(--bg-raised);
}
.menu {
  position: fixed;
  z-index: 95;
  min-width: 232px;
  max-width: min(92vw, 360px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s1);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-menu);
  animation: menu-in 140ms var(--ease-expo);
  transform-origin: top left;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.menu__item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  text-align: left;
  font-size: var(--t-sm);
}
.menu__item svg,
.menu__icon-gap {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--fg-muted);
}
.menu__item:hover,
.menu__item:focus-visible {
  background: var(--bg-hover);
  outline: none;
}
.menu__item:focus-visible {
  box-shadow: inset 0 0 0 1px var(--focus);
}
.menu__item[aria-disabled=true] {
  color: var(--fg-faint);
  cursor: not-allowed;
}
.menu__item[aria-disabled=true] svg {
  color: var(--fg-faint);
}
.menu__item--danger {
  color: var(--red-text);
}
.menu__item--danger svg {
  color: var(--red-text);
}
.menu__label {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.menu__hint {
  font-size: var(--t-xs);
  color: var(--fg-faint);
  white-space: normal;
}
.menu__key {
  margin-left: auto;
  color: var(--fg-faint);
  font-size: var(--t-xs);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.menu__sep {
  height: 1px;
  background: var(--line);
  margin: var(--s1) var(--s2);
}
.menu__heading {
  padding: 6px 10px 2px;
  font-size: var(--t-xs);
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  background: var(--bg-panel);
}
.table th,
.table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  font-weight: 600;
  background: var(--bg);
  white-space: nowrap;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover > td {
  background: var(--bg-row);
}
.table tbody tr[data-busy=true] > td {
  opacity: 0.6;
}
.table tbody tr[data-selected=true] > td {
  background: var(--bg-raised);
  box-shadow: inset 3px 0 0 var(--red);
}
.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table th.num {
  text-align: right;
}
.table .cell-strong {
  font-weight: 600;
  color: var(--fg);
}
.table .cell-sub {
  display: block;
  color: var(--fg-faint);
  font-size: var(--t-xs);
  margin-top: 2px;
}
.table .cell-actions {
  text-align: right;
  white-space: nowrap;
}
.table .cell-actions .btn + .btn {
  margin-left: 6px;
}
.table .cell-mono {
  font-family: var(--mono);
  font-size: var(--t-sm);
  letter-spacing: 0.04em;
}
.table .row-expand > td {
  background: var(--bg-raised);
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--red-line);
}
.table .muted {
  color: var(--fg-muted);
}
.table .row-disabled > td {
  color: var(--fg-faint);
}
.table .cell-message {
  max-width: 44ch;
  white-space: normal;
}
.table--dense th,
.table--dense td {
  padding: 6px 10px;
  font-size: var(--t-sm);
}
.table--dense .cell-strong {
  font-weight: 500;
}
.skeleton {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skeleton__row {
  height: 46px;
  background: var(--bg-panel);
  position: relative;
  overflow: hidden;
}
.skeleton__row::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      transparent,
      var(--bg-hover),
      transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s var(--ease-out) infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
.skeleton--tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: var(--s4);
  background: transparent;
  border: 0;
}
.skeleton--tiles .skeleton__row {
  aspect-ratio: 16 / 10;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  padding: var(--s4) var(--s5);
}
.panel + .panel {
  margin-top: var(--s4);
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  margin-bottom: var(--s3);
  flex-wrap: wrap;
}
.panel__head h2 {
  font-size: var(--t-md);
}
.panel__head p {
  color: var(--fg-muted);
  font-size: var(--t-sm);
}
.panel__head a.small {
  color: var(--fg-muted);
}
.panel--danger {
  border-color: var(--red-line);
}
.panel--chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px var(--s4);
  margin: 0;
  font-size: var(--t-sm);
}
.kv dt {
  color: var(--fg-faint);
}
.kv dd {
  margin: 0;
  color: var(--fg);
  min-width: 0;
}
.kv--inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
}
.kv--inline > div {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}
.token-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s3);
  align-items: center;
  padding: var(--s3) var(--s4);
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.token-box code {
  font-size: 1rem;
  letter-spacing: 0.06em;
  word-break: break-all;
}
.expand {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}
.dialog {
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  color: var(--fg);
  width: min(92vw, 520px);
  box-shadow: var(--shadow);
}
.dialog::backdrop {
  background: var(--backdrop);
}
.dialog[open] {
  animation: dialog-in var(--dur) var(--ease-expo);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s5) var(--s5) 0;
}
.dialog__head p {
  color: var(--fg-muted);
  font-size: var(--t-sm);
  margin-top: var(--s1);
}
.dialog__body {
  padding: var(--s5);
  display: grid;
  gap: var(--s4);
}
.dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line);
  background: var(--bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.dialog__body .alert[hidden] {
  display: none;
}
.form--dialog {
  padding: var(--s5);
}
.form--dialog .field + .field {
  margin-top: var(--s3);
}
.dialog--confirm .dialog__head {
  padding-bottom: var(--s5);
}
.form--dialog > .dialog__foot {
  margin: var(--s2) calc(-1 * var(--s5)) calc(-1 * var(--s5));
}
.dialog--wide {
  width: min(92vw, 720px);
}
.dialog--wide > .kv,
.dialog--wide > .textarea {
  margin: var(--s4) var(--s5) 0;
}
.dialog--wide > .textarea {
  width: calc(100% - 2 * var(--s5));
  margin-bottom: var(--s4);
}
.dialog--rdp {
  width: min(92vw, 600px);
}
.rdp__options {
  display: grid;
  gap: var(--s3);
}
.rdp__option {
  display: grid;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.rdp__option[data-available=false] {
  color: var(--fg-muted);
  border-style: dashed;
}
.rdp__option-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.rdp__option-body {
  font-size: var(--t-sm);
  color: var(--fg-muted);
}
.rdp__option-actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
.rdp__port {
  width: 9ch;
}
.dialog--rdp .row {
  align-items: start;
}
.dialog--rdp .row > .field {
  flex: 1 1 200px;
}
.dialog--rdp .row > .field:has(> .rdp__port) {
  flex: 0 1 180px;
}
.toasts {
  position: fixed;
  right: var(--s5);
  bottom: var(--s5);
  z-index: 90;
  display: grid;
  gap: var(--s2);
  width: min(92vw, 380px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) var(--s4);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: var(--t-sm);
  animation: toast-in var(--dur) var(--ease-expo);
}
.toast--error {
  border-color: var(--red-line);
  background: var(--red-soft);
}
.toast svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
}
.toast--error svg {
  color: var(--red-text);
}
.toast__text {
  flex: 1;
}
.toast .btn--icon {
  margin: -4px -6px -4px 0;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.nav-link__text {
  flex: 1;
  min-width: 0;
}
.nav-link__badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--red);
  color: var(--on-red);
  font-size: var(--t-xs);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.nav-link[aria-current=page] .nav-link__badge {
  background: var(--red-hover);
}
.toolbar--tabs {
  align-items: center;
}
.tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  flex: 1 1 auto;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: -1px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  font-weight: 500;
  font-size: var(--t-sm);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.tab:hover {
  color: var(--fg);
  background: var(--bg-hover);
}
.tab[aria-selected=true] {
  color: var(--fg);
  border-bottom-color: var(--red);
}
.tab__count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--fg-muted);
  line-height: 16px;
  text-align: center;
}
.tab[aria-selected=true] .tab__count {
  color: var(--fg);
}
.connect__scope {
  color: var(--fg-muted);
  font-size: var(--t-sm);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.connect__scope strong {
  color: var(--fg);
}
.input--pin {
  text-align: center;
  letter-spacing: 0.42em;
  font-size: 1.75rem;
  min-height: 64px;
}
.input--pin::placeholder {
  letter-spacing: 0.42em;
  color: var(--line-strong);
}
.textarea {
  resize: vertical;
  line-height: 1.45;
  font-family: var(--font);
}
.chat {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: var(--s3);
  min-height: 0;
}
.chat__log {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
  min-height: 240px;
  max-height: min(60vh, 640px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.chat--compact .chat__log {
  min-height: 160px;
  max-height: none;
  flex: 1;
}
.chat__empty {
  margin: auto 0;
  color: var(--fg-muted);
  display: grid;
  gap: 4px;
  font-size: var(--t-sm);
}
.chat__empty p:first-child {
  color: var(--fg);
  font-weight: 500;
}
.msg {
  max-width: min(78%, 60ch);
  display: grid;
  gap: 3px;
}
.msg--customer {
  align-self: flex-start;
}
.msg--agent {
  align-self: flex-end;
  text-align: right;
}
.msg__meta {
  display: flex;
  gap: var(--s2);
  font-size: var(--t-xs);
  color: var(--fg-faint);
}
.msg--agent .msg__meta {
  justify-content: flex-end;
}
.msg__who {
  font-weight: 600;
  color: var(--fg-muted);
}
.msg__body {
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  font-size: var(--t-sm);
  line-height: 1.45;
  white-space: pre-wrap;
  text-align: left;
}
.msg--customer .msg__body {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-top-left-radius: var(--radius);
}
.msg--agent .msg__body {
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-top-right-radius: var(--radius);
}
.msg--mine .msg__body {
  border-color: var(--red-line);
}
.chat__compose {
  display: grid;
  gap: 6px;
}
.chat__compose-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2);
  align-items: end;
}
.chat__compose-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
}
.chat__status:empty {
  display: none;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.list__item {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
  align-items: flex-start;
  flex-wrap: wrap;
}
.list__item:first-child {
  border-top: 0;
  padding-top: 0;
}
.list__main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 240px;
}
.list__main p {
  white-space: pre-wrap;
}
.list--checks .list__item--tight {
  padding: 6px 0;
}
.row--tight {
  gap: 6px;
}
.notif__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: var(--s5);
  align-items: start;
}
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  overflow: clip;
}
.feed__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s3);
  align-items: start;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}
.feed__item:last-child {
  border-bottom: 0;
}
.feed__item--unread {
  background: var(--bg-row);
  box-shadow: inset 3px 0 0 var(--red);
}
.feed__mark {
  color: var(--fg-faint);
  margin-top: 3px;
}
.feed__item--unread .feed__mark {
  color: var(--red-text);
}
.feed__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.feed__link {
  display: grid;
  gap: 2px;
  text-decoration: none;
  color: inherit;
}
.feed__link:hover .feed__title {
  color: var(--red-text);
}
.feed__title {
  font-weight: 600;
}
.feed__item:not(.feed__item--unread) .feed__title {
  font-weight: 500;
  color: var(--fg-muted);
}
.feed__body {
  color: var(--fg-muted);
  font-size: var(--t-sm);
  white-space: pre-wrap;
}
.feed__time {
  color: var(--fg-faint);
  font-size: var(--t-xs);
}
.ws__body {
  position: relative;
}
.ws-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  align-items: start;
}
.ws-grid__expand {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-top: 2px solid var(--red);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  padding: var(--s5);
  animation: page-in var(--dur) var(--ease-out);
}
.ws-tile {
  --ws-preview-w: clamp(240px, 13vw, 340px);
  position: relative;
  display: grid;
  grid-template-columns: calc(var(--ws-preview-w) + var(--s3)) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  min-width: 0;
  overflow: clip;
  transition:
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
  cursor: default;
}
.ws-tile:hover {
  border-color: var(--line-strong);
}
.ws-tile:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.ws-tile[data-selected=true] {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 0 5px var(--red-glow);
}
.ws-tile[data-presence=offline] .thumb__img,
.ws-tile[data-presence=unenrolled] .thumb__img {
  filter: grayscale(0.85) brightness(0.55);
}
.ws-tile__preview {
  grid-area: 1 / 1 / 3 / 2;
  position: relative;
  align-self: start;
  margin: var(--s3) 0 0 var(--s3);
  min-width: 0;
  border-radius: var(--radius);
  overflow: clip;
  background: var(--bg-stage);
}
.ws-tile__preview .thumb {
  gap: 0;
}
.ws-tile__preview .thumb__frame {
  min-height: 0;
}
.ws-tile__preview .thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ws-tile__preview .thumb__caption {
  display: none;
}
.ws-tile__chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s2);
  min-width: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: 1.4;
  background: oklch(10% 0.01 var(--hue) / 0.82);
  border: 1px solid oklch(40% 0.012 var(--hue) / 0.6);
  color: var(--fg);
  backdrop-filter: blur(6px);
}
.chip .state__dot {
  width: 8px;
  height: 8px;
}
.chip--on {
  color: var(--fg);
}
.chip--on .state__dot {
  background: var(--lit);
  border-color: var(--lit);
  box-shadow: 0 0 0 3px var(--lit-glow);
}
.chip--off {
  color: var(--fg-muted);
}
.chip--none {
  color: var(--fg-faint);
}
.chip--none .state__dot {
  border-style: dashed;
}
.chip--warn {
  color: var(--red-text);
  border-color: var(--red-line);
}
.chip--warn .state__dot {
  border-color: var(--red-text);
  background: var(--red-soft);
}
.chip--red {
  color: var(--red-text);
  border-color: var(--red-line);
}
.chip--lit {
  color: var(--fg);
  border-color: var(--fg-faint);
}
.chip svg {
  width: 12px;
  height: 12px;
}
.chip--help {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-red);
}
.ws-tile__quick {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: var(--s2);
  justify-content: flex-end;
  padding: var(--s2);
  background:
    linear-gradient(
      to top,
      oklch(8% 0.008 var(--hue) / 0.9),
      oklch(8% 0.008 var(--hue) / 0));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-expo);
}
.ws-tile:hover .ws-tile__quick,
.ws-tile:focus-within .ws-tile__quick,
.ws-tile[data-selected=true] .ws-tile__quick {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .ws-tile__quick {
    opacity: 1;
    transform: none;
  }
}
.ws-tile__head {
  grid-area: 1 / 2 / 2 / 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s1) var(--s3);
  align-items: start;
  padding: var(--s2) var(--s3) 0 0;
  min-width: 0;
}
.ws-tile__title {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.ws-tile__name {
  font-weight: 600;
  font-size: var(--t-base);
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.ws-tile__name:hover {
  color: var(--red-text);
  text-decoration: underline;
}
.ws-tile__sub {
  color: var(--fg-faint);
  font-size: var(--t-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-tile__sub .mono {
  letter-spacing: 0.04em;
}
.ws-tile__tools {
  display: flex;
  gap: 2px;
  align-items: center;
  margin: -4px -4px 0 0;
}
.ws-tile__facts {
  grid-area: 2 / 2 / 4 / 3;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px var(--s3);
  align-content: start;
  margin: 0;
  padding: var(--s2) var(--s3) var(--s3) 0;
  font-size: var(--t-sm);
  line-height: 1.3;
  animation: facts-in var(--dur) var(--ease-out);
}
@keyframes facts-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ws-tile__facts div {
  display: contents;
}
.ws-tile__facts dt {
  color: var(--fg-faint);
}
.ws-tile__facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ws-tile__facts .state {
  white-space: normal;
}
.ws-tile__actions {
  grid-area: 3 / 1 / 4 / 2;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  padding: var(--s2) 0 var(--s3) var(--s3);
}
.ws-tile__selected {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.ws-row {
  display: flex;
  gap: var(--s3);
  align-items: center;
  min-width: 0;
}
.ws-row > div {
  display: grid;
  min-width: 0;
}
.table--workstations td {
  vertical-align: top;
}
.table--workstations tbody tr {
  cursor: default;
}
.table--workstations .ws-row .thumb--row {
  width: 112px;
}
.thumb {
  margin: 0;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.thumb__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-stage);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
  display: grid;
  place-items: center;
}
.thumb__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--bg-stage);
  animation: frame-in var(--dur-slow) var(--ease-expo);
  transition: filter var(--dur-slow) var(--ease-out);
}
@keyframes frame-in {
  from {
    opacity: 0;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.thumb__label {
  font-size: var(--t-xs);
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  text-align: center;
}
.thumb__frame[data-state=off],
.thumb__frame[data-state=unauthorized],
.thumb__frame[data-state=none],
.thumb__frame[data-state=expired] {
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-stage) 0 7px,
      var(--bg-input) 7px 14px);
}
.thumb__frame[data-state=error] .thumb__label,
.thumb__frame[data-state=unauthorized] .thumb__label {
  color: var(--red-text);
}
.thumb__caption {
  font-size: var(--t-xs);
  color: var(--fg-faint);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.thumb--row {
  width: 112px;
  flex: none;
}
.thumb--row .thumb__caption {
  display: none;
}
.thumb--row .thumb__label {
  font-size: 0.55rem;
  padding: 2px 4px;
}
.thumb--large {
  width: 100%;
}
.thumb-preview {
  width: min(96vw, 2000px);
  max-height: 94dvh;
  overflow: hidden;
}
.thumb-preview[open] {
  display: flex;
  flex-direction: column;
}
.thumb-preview .dialog__head {
  padding-bottom: var(--s4);
  flex: none;
}
.thumb-preview .dialog__head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.thumb-preview .dialog__foot {
  flex-wrap: wrap;
  flex: none;
}
.thumb-preview__viewport {
  min-height: 0;
  height: min(70dvh, 1080px);
  overflow: auto;
  background: var(--bg-stage);
  border-top: 1px solid var(--line);
}
.thumb-preview__img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0 auto;
}
.thumb-preview__viewport[data-fit=true] {
  display: grid;
  place-items: center;
}
.thumb-preview__viewport[data-fit=true] .thumb-preview__img {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-muted);
  font-size: var(--t-sm);
  text-decoration: none;
  margin-bottom: var(--s2);
}
.crumb:hover {
  color: var(--fg);
}
.crumb svg {
  width: 14px;
  height: 14px;
}
.device__hero {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
  margin-bottom: var(--s5);
}
.device__preview {
  min-width: 0;
}
.device__preview .thumb__frame {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.device__preview .skeleton {
  aspect-ratio: 16 / 9;
}
.device__preview .skeleton__row {
  height: 100%;
}
.device__hero[data-presence=offline] .thumb__img,
.device__hero[data-presence=unenrolled] .thumb__img {
  filter: grayscale(0.85) brightness(0.55);
}
.device__identity {
  display: grid;
  gap: var(--s3);
  align-content: start;
  min-width: 0;
}
.device__identity h1 {
  font-size: var(--t-2xl);
}
.device__marks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
}
.device__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
  padding-top: var(--s2);
}
.device__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s3) var(--s4);
  margin: 0;
  padding: var(--s3) 0 0;
  border-top: 1px solid var(--line);
  font-size: var(--t-sm);
}
.device__facts > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.device__facts dt {
  color: var(--fg-faint);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.device__facts dd {
  margin: 0;
  min-width: 0;
}
.device__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: var(--s5);
  align-items: start;
}
.inv__layout {
  display: grid;
  gap: var(--s4);
}
.inv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--s4);
}
.inv__group {
  display: grid;
  gap: var(--s2);
  align-content: start;
  padding: var(--s3) var(--s4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.inv__group h3 {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
}
.bullets {
  margin: 6px 0 0;
  padding-left: 1.2em;
  display: grid;
  gap: 4px;
  color: var(--fg-muted);
}
.job__detail {
  max-height: 200px;
  overflow: auto;
  padding: var(--s2) var(--s3);
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  white-space: pre-wrap;
  margin: 4px 0 0;
}
.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
}
.disclosure + .disclosure {
  margin-top: var(--s3);
}
.disclosure__summary {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  align-items: center;
  padding: var(--s3) var(--s5);
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.disclosure__summary::-webkit-details-marker {
  display: none;
}
.disclosure__summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--fg-muted);
  border-bottom: 1.6px solid var(--fg-muted);
  transform: rotate(-45deg);
  margin-right: var(--s2);
  transition: transform var(--dur) var(--ease-out);
  flex: none;
}
.disclosure[open] > .disclosure__summary::before {
  transform: rotate(45deg);
}
.disclosure[open] > .disclosure__summary {
  border-bottom: 1px solid var(--line);
}
.disclosure__summary:hover {
  background: var(--bg-hover);
}
.disclosure__summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.disclosure__title {
  flex: 1;
}
.disclosure__meta {
  color: var(--fg-faint);
  font-weight: 400;
  font-size: var(--t-sm);
}
.disclosure__body {
  padding: var(--s4) var(--s5) var(--s5);
  display: grid;
  gap: var(--s4);
}
.disclosure--inline {
  border: 0;
  background: transparent;
}
.disclosure--inline > summary {
  cursor: pointer;
  color: var(--fg-muted);
}
.viewer {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg-stage);
  z-index: 50;
}
.viewer:fullscreen {
  background: var(--bg-stage);
}
.viewer__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
  min-height: 44px;
  flex-wrap: nowrap;
}
.viewer__id {
  display: flex;
  min-width: 0;
  flex: 1;
}
.viewer__id strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--t-sm);
}
.viewer__meta {
  display: flex;
  align-items: center;
  color: var(--fg-muted);
  font-size: var(--t-xs);
  flex: none;
  margin-right: var(--s2);
}
.viewer__meta .state {
  font-size: var(--t-xs);
}
.viewer__screen-controls {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: none;
}
.viewer__bar > .btn {
  flex: none;
}
.viewer__bar > .btn--danger {
  padding: 7px 10px;
}
.viewer__btn-text {
  display: inline;
}
.viewer__stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}
.viewer__stage[data-tool]:not([data-tool=""]) {
  grid-template-columns: minmax(0, 1fr) var(--dock-w);
}
.viewer__frame-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  position: relative;
}
.viewer__frame-pane:has(> .viewer__terminal) {
  grid-template-rows: auto minmax(0, 1fr);
}
.viewer__terminal {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  padding: var(--s2) var(--s4);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--red-line);
  font-size: var(--t-sm);
  animation: facts-in var(--dur) var(--ease-out);
}
.viewer__terminal > svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--red-text);
}
.viewer__terminal-text {
  flex: 1 1 320px;
  min-width: 0;
}
.viewer__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg-input);
}
.viewer__tools {
  min-width: 0;
  min-height: 0;
  display: grid;
  background: var(--bg-panel);
  border-left: 1px solid var(--line);
  animation: dock-in var(--dur) var(--ease-expo);
}
@keyframes dock-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.viewer__note {
  padding: var(--s6);
  display: grid;
  gap: var(--s3);
  justify-items: start;
  align-content: start;
}
.viewer__note p {
  color: var(--fg-muted);
  max-width: 60ch;
}
.viewer__info {
  position: absolute;
  left: var(--s3);
  right: var(--s3);
  bottom: var(--s3);
  z-index: 4;
  max-height: min(46%, 420px);
  display: flex;
  flex-direction: column;
  background: oklch(14% 0.01 var(--hue) / 0.96);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: facts-in var(--dur) var(--ease-out);
}
.viewer__info[hidden] {
  display: none;
}
.viewer__info-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3) var(--s2) var(--s4);
  border-bottom: 1px solid var(--line);
}
.viewer__info-title {
  font-size: var(--t-xs);
  color: var(--fg-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  outline: none;
}
.viewer__info-brief {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  color: var(--fg-muted);
  margin-left: auto;
  font-size: var(--t-xs);
  min-width: 0;
}
.viewer__info-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s3) var(--s5);
  padding: var(--s3) var(--s4) var(--s4);
  font-size: var(--t-sm);
  overflow: auto;
  min-height: 0;
}
.viewer__info-body > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.viewer__info-body dt {
  color: var(--fg-faint);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.viewer__info-body dd {
  margin: 0;
  min-width: 0;
}
.tool {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tool__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
}
.tool__head h2 {
  font-size: var(--t-base);
}
.tool__head p {
  margin-top: 2px;
  max-width: 40ch;
}
.tool__toolbar {
  display: flex;
  gap: var(--s2);
  align-items: center;
  padding: var(--s3) var(--s4) 0;
}
.tool__toolbar .input {
  flex: 1;
}
.tool__toolbar--meta {
  justify-content: space-between;
  padding-top: var(--s2);
}
.tool__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: var(--s3) var(--s4) var(--s4);
}
.tool__body .table-wrap {
  border-radius: var(--radius);
}
.tool__body--chat {
  display: grid;
  padding-top: var(--s4);
}
.tool__body--chat .chat {
  height: 100%;
}
.tool__body--cmd {
  display: grid;
  align-content: start;
  gap: var(--s3);
}
.cmd-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s3);
}
.cmd-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  animation: facts-in var(--dur) var(--ease-out);
}
.cmd-entry[data-state=error] {
  border-color: var(--red-line);
}
.cmd-entry__head {
  display: flex;
  gap: var(--s3);
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--fg-faint);
  background: var(--bg-panel);
}
.cmd-entry__shell {
  color: var(--fg-muted);
}
.cmd-entry__state {
  margin-left: auto;
  color: var(--fg-muted);
}
.cmd-entry[data-state=running] .cmd-entry__state {
  color: var(--fg);
}
.cmd-entry[data-state=error] .cmd-entry__state {
  color: var(--red-text);
}
.cmd-entry pre {
  margin: 0;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: var(--t-sm);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 40vh;
  overflow: auto;
}
.cmd-entry__cmd {
  color: var(--fg);
}
.cmd-entry__cmd::before {
  content: "\203a  ";
  color: var(--red-text);
}
.cmd-entry__out {
  border-top: 1px dashed var(--line);
  color: var(--fg-muted);
  background: var(--bg-input);
}
.cmd-entry .alert {
  margin: 8px 10px 10px;
}
.cmd-entry__note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0;
  padding: 6px 10px;
  border-top: 1px dashed var(--line);
  font-size: var(--t-xs);
  color: var(--red-text);
  background: var(--bg-panel);
}
.cmd-entry__note svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}
.cmd-form {
  display: grid;
  gap: var(--s3);
  padding: var(--s3) var(--s4) var(--s4);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.cmd-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.cmd-input {
  font-family: var(--mono);
  font-size: var(--t-sm);
}
.screens {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  background: var(--bg-stage);
}
.screens__menu-btn {
  border-color: transparent;
}
.screens__menu-btn[aria-expanded=true] {
  background: var(--bg-raised);
  color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--red);
}
.screens__status {
  color: var(--fg-muted);
}
.screens__status:empty {
  display: none;
}
.screens__control[aria-pressed=true] {
  box-shadow: 0 0 0 1px var(--red-hover), 0 0 0 4px var(--red-glow);
}
.screens__control[data-state=pending] {
  color: var(--fg-muted);
  border-style: dashed;
}
.screens__stage {
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  display: grid;
}
.screens__note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--s6);
  z-index: 2;
  background: var(--bg-stage);
}
.screens__note[hidden] {
  display: none;
}
.screens__wait {
  display: grid;
  gap: var(--s3);
  justify-items: center;
  text-align: center;
  max-width: 48ch;
}
.screens__wait p {
  margin: 0;
}
.screens__wait .state--none .state__dot {
  animation: pulse 1.6s var(--ease-out) infinite;
}
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--lit-glow);
  }
  50% {
    box-shadow: 0 0 0 5px transparent;
  }
}
.screens__grid {
  display: grid;
  gap: var(--s2);
  padding: var(--s2);
  min-height: 0;
  min-width: 0;
  align-content: start;
}
.screens__grid[data-fit=true] {
  grid-auto-rows: minmax(0, 1fr);
  height: 100%;
  align-content: stretch;
}
.screens__grid[data-count="2"],
.screens__grid[data-count="3"],
.screens__grid[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.screens__grid[data-count="5"],
.screens__grid[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  animation: frame-in var(--dur-slow) var(--ease-expo);
}
.screen__label {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: 3px 10px;
  font-size: var(--t-xs);
  color: var(--fg-muted);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
}
.screens__grid[data-count="1"] {
  padding: 0;
  gap: 0;
}
.screens__grid[data-count="1"] > .screen {
  position: relative;
  grid-template-rows: minmax(0, 1fr);
  border: 0;
  border-radius: 0;
}
.screens__grid[data-count="1"] .screen__label {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 1;
  border: 1px solid var(--line);
  pointer-events: none;
}
.screens__grid[data-count="1"] .screen[data-frame=ready] .screen__label {
  display: none;
}
.screen__surface {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  outline: none;
  background: var(--bg-stage);
  cursor: default;
  transition: box-shadow var(--dur) var(--ease-out);
}
.screen__surface:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus);
}
.screens[data-control=on] .screen__surface:focus {
  box-shadow: inset 0 0 0 2px var(--red);
}
.screens__grid[data-fit=true] .screen__canvas {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.screens__grid[data-fit=false] .screen__surface {
  overflow: auto;
  place-items: start;
}
.screens__grid[data-fit=false] .screen__canvas {
  width: auto;
  height: auto;
}
.screen--ended .screen__canvas {
  filter: grayscale(1) brightness(.5);
  transition: filter var(--dur-slow) var(--ease-out);
}
.screen__canvas {
  display: block;
  background: var(--bg-stage);
  image-rendering: auto;
}
.screens[data-link=recovering] .screen__canvas,
.screen--stale .screen__canvas {
  filter: saturate(0.6) brightness(0.7);
  transition: filter var(--dur-slow) var(--ease-out);
}
.screen--stale .screen__label {
  color: var(--red-text);
}
.screens__recover {
  position: absolute;
  left: 50%;
  top: var(--s4);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(92%, 60ch);
  padding: var(--s2) var(--s4);
  background: oklch(14% 0.01 var(--hue) / 0.92);
  border: 1px solid var(--red-line);
  border-radius: var(--radius-lg);
  color: var(--fg);
  font-size: var(--t-sm);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  animation: toast-in var(--dur) var(--ease-expo);
}
.screens__recover p {
  margin: 0;
  color: var(--fg-muted);
}
.screens__recover .state--warn .state__dot {
  animation: pulse 1.2s var(--ease-out) infinite;
}
.screens__recover[hidden] {
  display: none;
}
.screens__recover-time {
  font-variant-numeric: tabular-nums;
  color: var(--red-text);
  font-weight: 600;
}
.screens__denied {
  position: absolute;
  left: 50%;
  top: var(--s4);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  max-width: min(92%, 64ch);
  padding: var(--s2) var(--s3) var(--s2) var(--s4);
  background: oklch(14% 0.01 var(--hue) / 0.95);
  border: 1px solid var(--red-line);
  border-radius: var(--radius-lg);
  font-size: var(--t-sm);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  animation: toast-in var(--dur) var(--ease-expo);
}
.screens__denied[hidden] {
  display: none;
}
.screens__denied > svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--red-text);
}
.screens__denied-body {
  min-width: 0;
  flex: 1 1 auto;
}
.screens__denied-text {
  margin: 0;
  color: var(--fg-muted);
}
.screens__access {
  position: absolute;
  left: 50%;
  bottom: var(--s4);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--s2);
  max-width: min(92%, 72ch);
  margin: 0;
  padding: var(--s1) var(--s2) var(--s1) var(--s3);
  background: oklch(14% 0.01 var(--hue) / 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--fg-muted);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.screens__access[hidden] {
  display: none;
}
.screens__access > svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--fg-faint);
}
.screens__clip-dialog .textarea {
  min-height: 160px;
}
.screens__clip-dialog .textarea,
.screens__clip-dialog p {
  margin: var(--s3) var(--s5) 0;
  width: calc(100% - 2 * var(--s5));
}
.screens__clip-dialog .dialog__foot {
  margin-top: var(--s4);
}
.screens__clip-error {
  color: var(--red-text);
  font-size: var(--t-sm);
}
.screens__clip-error:empty {
  display: none;
}
.files {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}
.files__path {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: var(--s2);
  padding: var(--s3) var(--s4) 0;
  align-items: center;
}
.input--mono {
  font-family: var(--mono);
  font-size: var(--t-sm);
}
.files__upload {
  display: flex;
  gap: var(--s3);
  align-items: center;
  padding: var(--s2) var(--s4) 0;
  flex-wrap: wrap;
}
.files__where {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 160px;
  font-family: var(--mono);
}
.files__body {
  min-height: 0;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.link-btn:hover {
  color: var(--red-text);
}
.link-btn svg,
.files__file svg {
  color: var(--fg-muted);
  flex: none;
}
.files__file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.table--files td {
  vertical-align: middle;
}
.transfers {
  list-style: none;
  margin: 0;
  padding: var(--s2) var(--s4) var(--s3);
  display: grid;
  gap: var(--s2);
  border-top: 1px solid var(--line);
  background: var(--bg);
  max-height: 40vh;
  overflow: auto;
}
.transfer {
  display: flex;
  gap: var(--s3);
  align-items: center;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}
.transfer[data-state=error] {
  border-color: var(--red-line);
}
.transfer[data-state=done] {
  border-color: var(--line-strong);
}
.transfer__main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.transfer__main .cell-strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transfer__state {
  color: var(--fg-muted);
}
.transfer[data-state=error] .transfer__state {
  color: var(--red-text);
}
.progress {
  height: 4px;
  background: var(--bg-raised);
  border-radius: 2px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width var(--dur) var(--ease-out);
}
.transfer[data-state=done] .progress__fill {
  background: var(--lit);
  width: 100% !important;
}
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--s4);
  align-items: start;
}
.dl-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  overflow: clip;
}
.dl-card__head {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--red);
}
.dl-card__head p {
  margin-top: 4px;
  max-width: 52ch;
}
.dl {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dl__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--line);
}
.dl__row:last-child {
  border-bottom: 0;
}
.dl__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.dl__status {
  color: var(--fg-muted);
}
.boot--setup {
  max-width: 56ch;
  text-align: left;
  align-items: stretch;
}
.boot--setup code {
  font-family: var(--mono);
  font-size: var(--t-sm);
  background: var(--bg-raised);
  padding: 1px 5px;
  border-radius: var(--radius);
}
.stack {
  display: grid;
  gap: var(--s4);
}
.stack--tight {
  gap: 4px;
}
.row {
  display: flex;
  gap: var(--s3);
  align-items: center;
  flex-wrap: wrap;
}
.row--between {
  justify-content: space-between;
}
.grow {
  flex: 1;
}
.muted {
  color: var(--fg-muted);
}
.faint {
  color: var(--fg-faint);
}
.red-text {
  color: var(--red-text);
}
.small {
  font-size: var(--t-sm);
}
.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: var(--s5);
  align-items: start;
}
.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s5) 0;
}
.hr--tight {
  margin: var(--s3) 0;
}
.ips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ips code {
  font-size: var(--t-xs);
  color: var(--fg-muted);
}
.kbd-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--s3);
  align-items: center;
  color: var(--fg-faint);
  font-size: var(--t-xs);
}
.kbd-hint__group {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}
.kbd-hint kbd {
  flex: none;
  white-space: nowrap;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--bg-raised);
  line-height: 1.5;
}
.mt-2 {
  margin-top: var(--s2);
}
.mt-3 {
  margin-top: var(--s3);
}
.mt-4 {
  margin-top: var(--s4);
}
.mb-2 {
  margin-bottom: var(--s2);
}
.mb-4 {
  margin-bottom: var(--s4);
}
@media (max-width: 1999px) {
  .ws-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1400px) {
  .device__grid,
  .notif__grid {
    grid-template-columns: 1fr;
  }
  .device__hero {
    grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
  }
  .ws-tile {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .ws-tile__preview {
    grid-area: auto;
    margin: 0;
    border-radius: 0;
  }
  .ws-tile__preview .thumb__frame {
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .ws-tile__head {
    grid-area: auto;
    padding: var(--s3) var(--s3) 0 var(--s4);
  }
  .ws-tile__facts {
    grid-area: auto;
    padding: var(--s2) var(--s4) var(--s3);
  }
  .ws-tile__actions {
    grid-area: auto;
    align-self: auto;
    padding: var(--s2) var(--s4) var(--s3);
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 1100px) {
  :root {
    --rail-w: 220px;
  }
  .expand {
    grid-template-columns: 1fr;
  }
  .device__hero {
    grid-template-columns: 1fr;
  }
  .device__hero .thumb--large {
    max-width: 640px;
  }
}
@media (max-width: 1000px) {
  .viewer__btn-text,
  .viewer__tools-menu > span,
  .screens__control > span,
  .screens__menu-btn span {
    display: none;
  }
  .viewer__stage[data-tool]:not([data-tool=""]) {
    grid-template-columns: minmax(0, 1fr);
  }
  .viewer__stage[data-tool]:not([data-tool=""]) .viewer__frame-pane {
    visibility: hidden;
    position: absolute;
    inset: 0;
  }
  .viewer__tools {
    border-left: 0;
  }
  .tool__head p {
    display: none;
  }
  .inv__layout {
    grid-template-columns: 1fr;
  }
  .screens__grid[data-count="2"],
  .screens__grid[data-count="3"],
  .screens__grid[data-count="4"],
  .screens__grid[data-count="5"],
  .screens__grid[data-count="6"] {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .rail {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 40;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail__head {
    padding: var(--s3) var(--s4);
  }
  .rail .rail__toggle {
    display: inline-flex;
    flex: none;
  }
  .rail__connect,
  .rail__nav,
  .rail__group,
  .rail__spacer,
  .rail__user {
    display: none;
  }
  .rail[data-open=true] .rail__connect,
  .rail[data-open=true] .rail__nav,
  .rail[data-open=true] .rail__group,
  .rail[data-open=true] .rail__user {
    display: flex;
  }
  .rail[data-open=true] .rail__nav {
    flex-direction: column;
  }
  .rail[data-open=true] .rail__connect {
    display: block;
  }
  .rail[data-open=true] .rail__user {
    display: grid;
  }
  .page {
    padding: var(--s4) var(--s4) var(--s7);
  }
  .page__head h1 {
    font-size: var(--t-xl);
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth__brand {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: var(--s5);
  }
  .auth__lede {
    font-size: var(--t-base);
  }
  .device__identity h1 {
    font-size: var(--t-xl);
  }
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
  }
  .table tr {
    border-bottom: 1px solid var(--line);
    padding: var(--s3) var(--s4);
  }
  .table tbody tr:last-child {
    border-bottom: 0;
  }
  .table td {
    border: 0;
    padding: 4px 0;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: var(--s3);
    align-items: start;
  }
  .table td::before {
    content: attr(data-label);
    color: var(--fg-faint);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 3px;
  }
  .table td:not([data-label]) {
    grid-template-columns: 1fr;
  }
  .table td.num {
    text-align: left;
  }
  .table .cell-actions {
    text-align: left;
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: var(--s2);
  }
  .table .cell-actions::before {
    display: none;
  }
  .table .cell-actions .btn + .btn {
    margin-left: 0;
  }
  .table .row-expand {
    padding: 0;
  }
  .table .row-expand > td {
    display: block;
    padding: var(--s4);
  }
  .table tbody tr:hover > td {
    background: transparent;
  }
  .table tbody tr[data-selected=true] > td {
    box-shadow: none;
    background: transparent;
  }
  .table tbody tr[data-selected=true] {
    box-shadow: inset 3px 0 0 var(--red);
  }
  .toasts {
    right: var(--s3);
    bottom: var(--s3);
    left: var(--s3);
    width: auto;
  }
}
@media (max-width: 700px) {
  .viewer__btn-text,
  .viewer__tools-menu > span,
  .screens__control > span {
    display: none;
  }
  .viewer__bar {
    gap: 3px;
    padding-inline: 4px;
  }
  .viewer__bar .btn {
    padding: 7px;
  }
  .viewer__meta {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 84px;
    overflow: hidden;
    margin-right: 0;
  }
  .viewer__meta .state {
    min-width: 0;
    max-width: 100%;
  }
  .viewer__state-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .viewer__info-brief {
    display: none;
  }
  .screens__menu-btn span {
    display: none;
  }
  .screens__menu-btn {
    padding: 7px 9px;
  }
  .input--pin {
    font-size: 1.5rem;
    letter-spacing: 0.34em;
  }
  .msg {
    max-width: 92%;
  }
  .chat__compose-row {
    grid-template-columns: 1fr;
  }
  .chat__compose-row .btn {
    justify-content: center;
  }
  .dl-grid {
    grid-template-columns: 1fr;
  }
  .dl__row {
    flex-wrap: wrap;
  }
  .list__item > .row {
    width: 100%;
  }
  .feed__item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .feed__item > .btn {
    grid-column: 2;
    justify-self: start;
  }
  .tabs {
    gap: 0;
  }
  .tab {
    padding: 8px 9px;
  }
  .files__path {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .files__path .btn[type=submit],
  .files__path .btn:last-child {
    grid-column: span 1;
  }
  .transfer {
    flex-wrap: wrap;
  }
  .ws-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .table td {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar .field--grow {
    flex: 0 0 auto;
    max-width: none;
  }
  .toolbar__count {
    margin-left: 0;
    padding: 0;
  }
  .toolbar__group {
    justify-content: space-between;
  }
  .statusline {
    gap: var(--s2) var(--s4);
  }
  .dialog__foot {
    flex-direction: column-reverse;
  }
  .dialog__foot .btn {
    width: 100%;
    justify-content: center;
  }
  .seg {
    align-self: start;
  }
  .ws-tile__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton__row::after {
    animation: none;
  }
  .screens__wait .state--none .state__dot,
  .screens__recover .state--warn .state__dot {
    animation: none;
  }
  .btn[data-busy=true]::after {
    animation-duration: 1.6s;
  }
}
