:root {
  --background: #13110f;
  --surface: #1b1916;
  --surface-2: #241f1a;
  --surface-3: #2a251f;
  --border: #3b342f;
  --text: #efe4d5;
  --text-soft: #b6a798;
  --text-on-dark: #f8f1e6;
  --primary: #e8ddd0;
  --primary-soft: #7a6b5f;
  --accent: #b45309;
  --accent-soft: #fdba74;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --input-background: #1a1612;
  --focus-ring: #726a5e;
  --button-text: #19130f;
  --button-hover: #f7f0e6;
  --secondary-button-background: #2d2720;
  --secondary-button-hover: #372f27;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  --radius: 10px;
  --radius-sm: 8px;
}

body.app-authenticated,
body.app-guest {
  min-height: 100vh;
}

body.app-authenticated {
  --background: #08131d;
  --surface: rgba(10, 18, 28, 0.86);
  --surface-2: rgba(17, 28, 40, 0.92);
  --surface-3: rgba(28, 44, 61, 0.96);
  --border: rgba(132, 159, 187, 0.18);
  --text: #e9f1fb;
  --text-soft: #93a6bb;
  --text-on-dark: #f8fbff;
  --primary: #f1c46e;
  --primary-soft: #9a7a35;
  --accent: #fb923c;
  --accent-soft: #ffd68e;
  --input-background: #101c2a;
  --focus-ring: #f1c46e;
  --button-text: #1d160d;
  --button-hover: #f7d992;
  --secondary-button-background: rgba(28, 44, 61, 0.96);
  --secondary-button-hover: rgba(38, 58, 78, 0.98);
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at top left, rgba(61, 106, 154, 0.28), transparent 26%),
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.16), transparent 24%),
    linear-gradient(180deg, #08131d 0%, #091722 48%, #071018 100%);
}

body.app-authenticated.theme-light {
  --background: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: rgba(249, 251, 255, 0.96);
  --surface-3: #eef3f8;
  --border: rgba(76, 96, 122, 0.22);
  --text: #172233;
  --text-soft: #596779;
  --text-on-dark: #f8fbff;
  --primary: #22486b;
  --primary-soft: #d7e7f4;
  --accent: #b45309;
  --accent-soft: #8a4a08;
  --input-background: #ffffff;
  --focus-ring: #22486b;
  --button-text: #f8fbff;
  --button-hover: #315c84;
  --secondary-button-background: #f1f5f9;
  --secondary-button-hover: #e3ebf3;
  --shadow: 0 20px 48px rgba(22, 34, 51, 0.14);
  background:
    radial-gradient(circle at top left, rgba(49, 92, 132, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #edf3f8 100%);
}

body.app-authenticated::before,
body.app-guest::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
  z-index: 0;
}

body.app-authenticated.theme-light::before {
  background-image:
    linear-gradient(rgba(49, 92, 132, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 92, 132, 0.08) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 80%);
}

body.app-guest {
  --background: #0c1218;
  --surface: rgba(15, 23, 34, 0.88);
  --surface-2: rgba(22, 32, 45, 0.94);
  --surface-3: #203145;
  --border: rgba(135, 160, 186, 0.16);
  --text: #ebf3fb;
  --text-soft: #9aaabc;
  --text-on-dark: #f8fbff;
  --primary: #f1c46e;
  --primary-soft: #a17d2c;
  --accent: #fb923c;
  --accent-soft: #ffd68e;
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 20% 0%, rgba(54, 91, 130, 0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(251, 146, 60, 0.16), transparent 24%),
    linear-gradient(180deg, #0b1117 0%, #111a24 100%);
}

body.app-authenticated > *,
body.app-guest > * {
  position: relative;
  z-index: 1;
}

.app-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.app-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 20px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(9, 18, 28, 0.94), rgba(15, 25, 37, 0.88));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

body.app-authenticated.theme-light .app-sidebar {
  background: linear-gradient(180deg, rgba(23, 34, 51, 0.96), rgba(34, 72, 107, 0.9));
  border-color: rgba(23, 34, 51, 0.18);
}

.sidebar-brand__link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-on-dark);
  text-decoration: none;
}

.sidebar-brand__link strong,
.sidebar-brand__link small {
  display: block;
}

.sidebar-brand__link small {
  color: var(--text-soft);
  margin-top: 2px;
}

.sidebar-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(241, 196, 110, 0.92), rgba(251, 146, 60, 0.86));
  color: #1d160d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section__label,
.section-kicker,
.page-kicker,
.top-nav__eyebrow,
.metric-label {
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 0;
  color: var(--text);
  text-decoration: none;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
  border: 1px solid transparent;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link.is-active {
  background: linear-gradient(180deg, rgba(32, 49, 69, 0.95), rgba(22, 36, 50, 0.92));
  border-color: rgba(241, 196, 110, 0.22);
  transform: translateX(2px);
}

.sidebar-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sidebar-link.is-active .sidebar-link__icon {
  background: linear-gradient(135deg, rgba(241, 196, 110, 0.92), rgba(251, 146, 60, 0.78));
  color: #1d160d;
}

.sidebar-link__badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 146, 60, 0.16);
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-help {
  margin-top: auto;
  padding: 18px;
}

.sidebar-help h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.sidebar-help__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.app-main {
  min-width: 0;
}

.app-main .top-nav,
.shell-hero,
.guest-nav,
.guest-hero,
.card {
  backdrop-filter: blur(18px);
}

.app-authenticated .top-nav {
  padding: 16px 18px;
  margin-bottom: 18px;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 20, 31, 0.94), rgba(13, 24, 37, 0.9));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-nav__meta,
.top-nav__actions,
.shell-hero__actions,
.metric-inline,
.list-row__aside,
.spotlight-card__grid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-nav__meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.top-nav__title {
  color: var(--text-on-dark);
  font-weight: 600;
}

.top-nav__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.top-nav__chip.is-attention {
  border-color: rgba(251, 146, 60, 0.22);
  background: rgba(251, 146, 60, 0.08);
}

.top-nav__chip-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.shell-hero,
.guest-hero {
  padding: 24px 26px;
  margin-bottom: 20px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(12, 21, 32, 0.96), rgba(18, 32, 47, 0.9));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.shell-hero__copy {
  max-width: 760px;
}

.shell-hero__copy h1,
.guest-hero h1 {
  font-size: clamp(2rem, 2.8vw, 3.1rem);
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.shell-hero__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 240px;
}

.content-stack,
.guest-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 28px;
}

.guest-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
}

.guest-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 21, 31, 0.94), rgba(15, 25, 37, 0.9));
}

.guest-content {
  max-width: 760px;
}

.app-authenticated .card,
.app-guest .card {
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.92), rgba(14, 24, 36, 0.88));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 6px;
}

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

.metric-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 21, 31, 0.9), rgba(17, 30, 44, 0.86));
  box-shadow: var(--shadow);
}

.metric-card--accent {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(23, 39, 56, 0.94), rgba(18, 28, 41, 0.92));
}

.metric-value {
  margin: 10px 0 8px;
  font-size: clamp(1.7rem, 2.2vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-meta,
.table-secondary {
  color: var(--text-soft);
  font-size: 13px;
}

.metric-inline {
  justify-content: flex-start;
  margin: 12px 0 16px;
}

.metric-inline__label {
  color: var(--text-soft);
}

.panel-grid {
  display: grid;
  gap: 20px;
}

.panel-grid--details {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.spotlight-card__grid {
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
}

.spotlight-card__panel {
  flex: 1 1 200px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.action-card .list-row,
.spotlight-card .list-row {
  background: rgba(255, 255, 255, 0.03);
}

.list-row {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(16, 27, 40, 0.82), rgba(13, 22, 34, 0.78));
}

.list-row__stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-row__aside {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.list-row--static {
  cursor: default;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 4px;
  border-radius: 18px;
}

table,
.table-clickable,
.fm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(9, 16, 24, 0.55);
}

table thead,
.table-clickable thead,
.fm-table thead {
  background: rgba(255, 255, 255, 0.03);
}

table th,
table td,
.table-clickable th,
.table-clickable td,
.fm-table th,
.fm-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table tbody tr:last-child td,
.table-clickable tbody tr:last-child td,
.fm-table tbody tr:last-child td {
  border-bottom: none;
}

table tbody tr:hover,
.table-clickable tbody tr:hover,
.fm-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-action-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 118px;
}

.table-action-stack form,
.table-action-stack button {
  width: 100%;
}

.backup-table-actions-column {
  min-width: 260px;
}

.backup-table-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.backup-table-actions form {
  display: inline-flex;
  margin: 0;
}

.backup-table-actions button,
.backup-table-actions [role="button"] {
  white-space: nowrap;
}

.table-primary {
  font-weight: 600;
  color: var(--text-on-dark);
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  background: transparent;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-sort-button::after {
  content: "sort";
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.table-sort-button[data-sort-direction="asc"]::after {
  content: "asc";
  color: var(--accent);
}

.table-sort-button[data-sort-direction="desc"]::after {
  content: "desc";
  color: var(--accent);
}

.detail-grid--cards {
  gap: 14px;
}

.detail-grid--cards > div {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(16, 27, 40, 0.82), rgba(13, 22, 34, 0.76));
}

.swarm_host-summary {
  padding: 20px;
}

.swarm_host-detail-list {
  margin-top: 0;
  gap: 0;
}

.swarm_host-detail-row {
  padding: 14px 0;
}

.swarm_host-detail-row:first-of-type {
  padding-top: 0;
}

.swarm_host-detail-row:last-of-type {
  padding-bottom: 0;
}

.empty-state {
  color: var(--text-soft);
}

.launch-swarm_host-list {
  gap: 12px;
}

.launch-swarm_host-pill,
.launch-game-card,
.launch-selected-game__poster {
  border-radius: 18px;
}

.launch-game-card {
  background: linear-gradient(180deg, rgba(12, 20, 30, 0.9), rgba(16, 27, 40, 0.86));
}

.launch-grid {
  gap: 16px;
}

.launch-grid-toolbar {
  margin-bottom: 20px;
}

.status-indicator,
.reachability-badge {
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.flash-messages article {
  border-radius: 18px;
  padding: 12px 14px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    min-height: 0;
  }

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

@media (max-width: 760px) {
  .app-shell,
  .guest-shell {
    padding: 14px;
    gap: 16px;
  }

  .app-authenticated .top-nav,
  .shell-hero,
  .guest-nav,
  .guest-hero,
  .app-authenticated .card,
  .app-guest .card,
  .metric-card {
    padding: 16px;
    border-radius: 20px;
  }

  .app-authenticated .top-nav,
  .guest-nav,
  .shell-hero,
  .section-heading,
  .top-nav__actions,
  .shell-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav__actions,
  .shell-hero__actions {
    justify-content: flex-start;
  }

  .metric-grid,
  .panel-grid--details {
    grid-template-columns: 1fr;
  }

  table th,
  table td,
  .table-clickable th,
  .table-clickable td,
  .fm-table th,
  .fm-table td {
    padding: 12px;
  }

  .detail-grid--cards > div {
    padding: 14px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: "Avenir Next", "Lato", "Noto Sans", "Fira Sans", "system-ui", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--text-soft);
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: var(--text-on-dark);
}

code,
pre,
kbd {
  font-family: "IBM Plex Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;
}

main.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px;
}

main.container > :first-child {
  margin-top: 0;
}

.hero,
.page-header,
.fm-header,
.fm-modal-header {
  margin-bottom: 16px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  min-height: 46px;
}

.nav-brand a {
  text-decoration: none;
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  padding: 6px 2px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-on-dark);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.subtitle {
  color: var(--text-soft);
  margin: 4px 0 0;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 8px;
  line-height: 1.25;
  color: var(--text-on-dark);
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 10px;
}

small,
.small {
  font-size: 12px;
  color: var(--text-soft);
}

section {
  margin: 0 0 16px;
}

.card,
.fm-modal-card,
.stat-card,
.fm-list,
.fm-resource-summary,
.fm-move-list,
.fm-logs-pre,
.fm-code-editor,
.fm-editor-gutter,
.profile-token,
.profile-command,
.fm-move-empty,
.fm-upload,
.file-manager-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card {
  padding: 18px;
}

.card + .card {
  margin-top: 14px;
}

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.stat-card {
  padding: 14px;
}

.stat-label {
  color: var(--text-soft);
  text-transform: none;
  margin: 0 0 8px;
  font-size: 12px;
}

.stat-foot {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.list-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
}

.list-row:hover,
.list-row:focus-visible,
.table-clickable tbody tr:hover,
.swarm_host-row:hover,
.deployment-row:hover,
.fm-row-active,
.dropdown-link:hover,
.dropdown-link:focus-visible {
  background: #2c251f;
}

.page-header,
.fm-header,
.swarm_host-compact,
.page-actions,
.action-grid,
.fm-toolbar,
.fm-form-row,
.fm-inline-form,
.fm-actions-inline,
.fm-modal-actions,
.fm-move-toolbar,
.fm-move-rename,
.fm-layout,
.fm-editor-actions,
.fm-resource-row,
.fm-download-ready {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header,
.fm-header {
  justify-content: space-between;
  align-items: flex-start;
}

.page-actions,
.action-grid {
  align-items: flex-start;
}

.table-clickable,
.fm-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.swarm_host-deployments-table-wrap {
  overflow-x: auto;
  margin-top: 6px;
}

.swarm_host-deployments-table {
  min-width: 1120px;
}

.table-clickable th,
.table-clickable td,
.fm-table th,
.fm-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-break: break-word;
}

.table-clickable thead,
.fm-table thead {
  background: var(--surface-2);
}

.table-clickable th,
.fm-table th {
  font-weight: 600;
  color: var(--text-soft);
  font-size: 12px;
  text-transform: none;
}

.table-clickable code,
.fm-table code {
  white-space: nowrap;
}

.table-clickable tbody tr:last-child td,
.fm-table tbody tr:last-child td {
  border-bottom: none;
}

.table-clickable tbody tr,
.deployment-row,
.swarm_host-row {
  cursor: pointer;
}

.table-clickable a,
.table-clickable button,
.fm-table a,
.fm-table button {
  cursor: pointer;
}

.swarm_host-row:hover,
.deployment-row:hover {
  border-left: 3px solid var(--accent-soft);
}

.fm-form-grid,
.swarm_host-kv,
.fm-resource-summary,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.fm-form-row {
  align-items: center;
}

.detail-grid {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
select,
textarea,
button,
[role="button"],
[type="submit"] {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  background: var(--input-background);
  color: var(--text);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--accent);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.fm-label:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

button,
[role="button"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: var(--primary);
  color: var(--button-text);
  text-decoration: none;
  min-height: 36px;
  width: auto;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

button:hover,
button:focus-visible,
[role="button"]:hover,
[role="button"]:focus-visible {
  background: #f7f0e6;
  background: var(--button-hover);
}

button:disabled,
[disabled],
.fm-label:disabled,
.dropdown-link:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

button.secondary,
a.secondary[role="button"],
button.secondary[type="button"],
button.secondary[type="submit"] {
  background: var(--secondary-button-background);
  border-color: var(--border);
  color: var(--text);
}

button.secondary:hover,
button.secondary:focus-visible,
button.contrast:hover,
button.contrast:focus-visible {
  background: var(--secondary-button-hover);
}

button.contrast,
#action-delete,
button.danger {
  background: #4c272c;
  border-color: #6a2d33;
  color: #fec0bb;
}

button.contrast:hover,
button.contrast:focus-visible {
  background: #5d2e34;
}

pre {
  margin: 8px 0;
  background: #0f131a;
  color: #e6ddd1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow: auto;
}

code {
  background: #0f1520;
  color: #ece2d5;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 4px;
}

.warning {
  color: var(--warning);
}

.warning a,
.fm-muted {
  color: var(--text-soft);
}

.flash-messages {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.flash-messages article {
  margin: 0;
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.flash-messages .success {
  border-left-color: #16a34a;
  background: #122018;
}

.flash-messages .error,
.flash-messages .danger {
  border-left-color: #991b1b;
  background: #271216;
}

.flash-messages .warning,
.flash-messages .info {
  border-left-color: #854d0e;
  background: #291f0f;
}

.status-indicator,
.reachability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.2;
  text-transform: none;
  color: var(--text-soft);
}

.status-indicator.status-online {
  border-color: #5c7a58;
  color: #bcd5bb;
  background: #1f2f24;
}

.status-indicator.status-offline {
  border-color: #6b3c3c;
  color: #fec0bb;
  background: #362321;
}

.status-indicator.status-stale {
  border-color: #6e5d2f;
  color: #fde68a;
  background: #3e341f;
}

.reachability-badge {
  background: #181d28;
}

.reachability-badge.is-reachable,
.reachability-badge.status-online,
.reachability-badge.online {
  border-color: #5c7a58;
  color: #bcd5bb;
  background: #1f2f24;
}

.reachability-badge.is-unreachable,
.reachability-badge.status-offline,
.reachability-badge.offline {
  border-color: #6b3c3c;
  color: #fec0bb;
  background: #362321;
}

.reachability-badge.is-unknown,
.reachability-badge.is-pending,
.reachability-badge.unknown,
.reachability-badge.pending,
.reachability-badge.n/a,
.reachability-badge.pending {
  border-color: #675019;
  color: #fde68a;
  background: #3e341f;
}

.reachability-icon {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: inherit;
  background: transparent;
}

.help-link {
  color: var(--text-soft);
  text-decoration: underline;
}

.stats-link,
.stats-link:hover {
  color: var(--accent);
}

.dropdown {
  position: relative;
}

.dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: #312a23;
  border: 1px solid var(--border);
  color: var(--text);
  margin: 0;
  width: fit-content;
}

.dropdown > summary::-webkit-details-marker,
.dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown[open] > summary {
  background: #3a332b;
}

.dropdown.dropdown--locked > summary,
.dropdown > summary[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
}

.dropdown > ul {
  position: absolute;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  min-width: 205px;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #2b2520;
  box-shadow: var(--shadow);
}

.dropdown > ul li {
  margin: 0;
}

.dropdown-form {
  margin: 0;
  width: 100%;
}

.dropdown-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  box-shadow: none;
  appearance: none;
}

.dropdown-link--subitem {
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-soft);
}

.dropdown-link.is-active,
.dropdown-link:hover,
.dropdown-link:focus-visible {
  background: #302921;
}

.dropdown-link:disabled {
  opacity: 0.6;
}

.file-manager-shell {
  background: var(--surface-2);
  padding: 18px;
}

.fm-header {
  align-items: flex-start;
}

.fm-subtitle {
  margin-top: 4px;
}

.fm-meta {
  text-align: right;
  color: var(--text-soft);
  font-size: 12px;
}

.resource-monitor-meta {
  margin-left: auto;
}

.fm-toolbar {
  align-items: center;
  margin: 8px 0 12px;
}

.fm-sync-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #4a4438;
  color: #f7e8cc;
  background: #262117;
}

.fm-sync-banner[data-state="success"] {
  border-color: #335a43;
  color: #dcf5e6;
  background: #1a2a20;
}

.fm-sync-banner[data-state="success"] .fm-spinner {
  animation: none;
  border-color: #335a43;
  border-top-color: #335a43;
  position: relative;
}

.fm-sync-banner[data-state="success"] .fm-spinner::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  width: 7px;
  height: 13px;
  border-right: 3px solid #8ee0ac;
  border-bottom: 3px solid #8ee0ac;
  transform: rotate(45deg);
}

.fm-sync-banner[data-state="error"] {
  border-color: #70423f;
  color: #ffd9d6;
  background: #2c1b1a;
}

.fm-list {
  padding: 8px;
}

.fm-empty {
  padding: 12px;
  color: var(--text-soft);
}

.fm-table {
  margin-bottom: 0;
}

.fm-table td:first-child,
.fm-table th:first-child {
  width: 38px;
}

.fm-label {
  font-weight: 600;
}

.fm-label.fm-dir-link,
.fm-label.fm-file-link {
  border: 0;
  background: transparent;
  color: var(--accent-soft);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.fm-label.fm-dir-link:hover,
.fm-label.fm-file-link:hover {
  color: #d3a35c;
}

.fm-dir-link,
.fm-file-link {
  text-decoration-thickness: 1px;
}

.fm-actions,
.fm-modal-actions-inline,
.fm-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fm-resource-summary {
  padding: 10px;
}

.fm-resource-row {
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  align-items: center;
}

.fm-resource-row strong,
.fm-resource-row span {
  margin: 0;
}

.fm-warning {
  color: #d48b15;
  font-size: 12px;
}

.fm-move-browser {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.fm-move-list {
  max-height: 215px;
  overflow-y: auto;
  padding: 8px;
}

.fm-move-item {
  width: 100%;
  text-align: left;
  background: #25201a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

.fm-folder-icon {
  width: 16px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  background: #a79d92;
  position: relative;
  flex: 0 0 16px;
}

.fm-folder-icon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 2px;
  width: 8px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #c5bcb0;
}

.fm-move-empty {
  color: var(--text-soft);
  font-size: 12px;
  padding: 8px;
}

.fm-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fm-modal.is-open {
  display: flex;
}

.fm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 16, 0.72);
}

.fm-modal-card {
  position: relative;
  width: min(900px, 96vw);
  max-height: 88vh;
  overflow: auto;
  padding: 14px;
  background: var(--surface);
}

.fm-modal-card--wide {
  width: min(1180px, 96vw);
}

.fm-modal-header {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.fm-modal-actions {
  margin-top: 10px;
}

.fm-inline-form {
  align-items: flex-end;
  margin-top: 10px;
}

.fm-inline-form input[type="text"] {
  max-width: 120px;
}

.fm-modal-actions--end {
  justify-content: flex-end;
}

.fm-modal-section + .fm-modal-section {
  margin-top: 20px;
}

.fm-editor-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fm-editor-gutter {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--border);
  border-radius: 0;
  color: #a59582;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 7px;
  text-align: right;
  user-select: none;
  background: #1a1612;
  white-space: pre;
  overflow: hidden;
}

.fm-code-editor {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  min-height: 320px;
  resize: vertical;
  line-height: 1.45;
  color: var(--text);
  background: #1a1612;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.fm-logs-pre {
  min-height: 240px;
  max-height: 420px;
  padding: 12px;
  margin: 0;
  overflow: auto;
  line-height: 1.45;
  white-space: pre-wrap;
  font-size: 12px;
}

.deployment-log-shell {
  display: grid;
  gap: 12px;
}

.deployment-log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.deployment-log-search {
  flex: 1 1 320px;
  min-width: min(100%, 280px);
}

.deployment-log-search,
.deployment-log-filter {
  display: grid;
  gap: 6px;
}

.deployment-log-search input,
.deployment-log-filter select {
  width: 100%;
}

.deployment-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.deployment-log-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deployment-log-status__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.deployment-log-output {
  min-height: 320px;
  max-height: min(72vh, 900px);
  background: rgba(9, 15, 22, 0.92);
}

.deployment-log-output mark {
  padding: 0 1px;
  color: #0c1520;
  background: var(--primary);
}

#logs-action-status[data-state="error"] {
  color: #ffb4af;
}

.fm-editor-loading {
  position: absolute;
  inset: 0 0 0 56px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  color: var(--text-soft);
  font-weight: 500;
  background: rgba(26, 22, 18, 0.92);
}

.fm-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #3a332b;
  border-top-color: #e4d9ca;
  border-radius: 50%;
  animation: fm-spin 0.9s linear infinite;
}

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

@media (max-width: 760px) {
  .deployment-log-toolbar,
  .deployment-log-status {
    align-items: stretch;
  }

  .deployment-log-actions {
    margin-left: 0;
  }
}

.fm-crumb-link,
.fm-crumb-sep,
.fm-crumbs-text {
  color: var(--text-soft);
}

.fm-crumb-link {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.fm-breadcrumbs {
  flex: 1;
}

.fm-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.fm-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.fm-panel summary {
  cursor: pointer;
  font-weight: 600;
}

.profile-token,
.profile-command {
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
}

.profile-command pre {
  margin-top: 8px;
}

.profile-command pre code {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-download-actions,
.agent-command-output__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-download-actions {
  margin: 12px 0;
}

.agent-command-builder {
  display: grid;
  gap: 14px;
}

.agent-command-builder .section-header {
  margin-bottom: 0;
}

.agent-command-builder__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.agent-command-output {
  display: grid;
  gap: 8px;
}

.agent-command-builder__status {
  margin: -4px 0 0;
}

.agent-command-output__header {
  justify-content: space-between;
}

.agent-command-output__header label {
  margin: 0;
}

.agent-command-output pre {
  margin: 0;
}

.info {
  border: 1px solid var(--border);
  background: #28231d;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.faq,
.small,
.fm-muted,
.subtitle,
.help-link,
.stats-summary,
.swarm_host-kv-label,
.fm-subtitle,
.fm-meta,
.fm-code-editor {
  color: var(--text-soft);
}

.swarm_host-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.swarm_host-status-line .stats-link {
  display: inline-flex;
  align-items: center;
}

.swarm_host-detail-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.swarm_host-detail-section {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.swarm_host-detail-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.swarm_host-detail-row {
  display: grid;
  grid-template-columns: minmax(132px, 170px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.swarm_host-detail-row:first-of-type {
  border-top: none;
}

.swarm_host-detail-label {
  color: var(--text-soft);
}

.swarm_host-detail-value {
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.swarm_host-detail-value-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.swarm_host-detail-value-stack .reachability-badge {
  width: fit-content;
}

.swarm_host-utilization-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.swarm_host-utilization-meta {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.swarm_host-utilization-card {
  --utilization: 0;
  --utilization-accent: rgba(251, 146, 60, 0.95);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 52%),
    linear-gradient(180deg, rgba(16, 27, 40, 0.92), rgba(11, 18, 27, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.swarm_host-utilization-card--cpu {
  --utilization-accent: rgba(96, 165, 250, 0.96);
}

.swarm_host-utilization-card--ram {
  --utilization-accent: rgba(52, 211, 153, 0.96);
}

.swarm_host-utilization-card--disk {
  --utilization-accent: rgba(251, 191, 36, 0.96);
}

.swarm_host-utilization-card.is-empty {
  --utilization-accent: rgba(148, 163, 184, 0.32);
}

.swarm_host-utilization-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.swarm_host-utilization-card__label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.swarm_host-utilization-card__summary {
  font-size: 0.95rem;
  color: var(--text);
  text-align: right;
}

.swarm_host-utilization-gauge {
  width: min(100%, 164px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(10, 17, 25, 0.96) 0 58%, transparent 59%),
    conic-gradient(var(--utilization-accent) calc(var(--utilization) * 1%), rgba(255, 255, 255, 0.08) 0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 32px rgba(0, 0, 0, 0.24);
}

.swarm_host-utilization-gauge__inner {
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px;
  text-align: center;
  background: rgba(8, 14, 21, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.swarm_host-utilization-gauge__value {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-on-dark);
}

.swarm_host-utilization-gauge__caption {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.swarm_host-utilization-card__detail {
  margin: 0;
  color: var(--text-soft);
  text-align: center;
  overflow-wrap: anywhere;
}

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

.swarm_host-utilization-progress {
  --utilization: 0;
  --utilization-accent: rgba(251, 146, 60, 0.95);
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 27, 40, 0.86), rgba(11, 18, 27, 0.84));
}

.swarm_host-utilization-progress--cpu {
  --utilization-accent: rgba(96, 165, 250, 0.96);
}

.swarm_host-utilization-progress--ram {
  --utilization-accent: rgba(52, 211, 153, 0.96);
}

.swarm_host-utilization-progress.is-empty {
  --utilization-accent: rgba(148, 163, 184, 0.6);
}

.swarm_host-utilization-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.swarm_host-utilization-progress__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.swarm_host-utilization-progress__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-on-dark);
}

.swarm_host-utilization-progress__summary {
  font-size: 0.86rem;
  line-height: 1.2;
  color: var(--text);
}

.swarm_host-utilization-progress__bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.swarm_host-utilization-progress__fill {
  display: block;
  height: 100%;
  width: calc(var(--utilization) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), var(--utilization-accent));
  transition: width 220ms ease;
}

.swarm_host-utilization-progress__detail {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.25;
}

.danger-zone-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  cursor: pointer;
}

.inline-check input {
  flex: 0 0 auto;
  margin: 0;
}

.inline-check span {
  color: var(--text);
}

.profile-preferences-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.profile-preferences-form > button[type="submit"] {
  min-height: 40px;
  padding-inline: 16px;
}

.segmented-fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.segmented-fieldset legend {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.segmented-options {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-option {
  margin: 0;
  cursor: pointer;
}

.segmented-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.segmented-option input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--button-text);
}

.segmented-option input:focus-visible + span {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.swarm_host-compact {
  align-items: flex-start;
}

.share-result-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  justify-content: space-between;
  display: flex;
  align-items: center;
}

.share-results,
.fm-resource-summary,
.fm-form-grid {
  margin-top: 10px;
}

.swarm_host-row,
.deployment-row {
  transition: background-color 120ms ease;
}

.deployment-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.deployment-overview-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.deployment-overview-art {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.deployment-overview-art__poster {
  width: min(100%, 320px);
  max-width: 320px;
  min-height: 0;
}

.deployment-overview-art__poster img {
  aspect-ratio: 4 / 3;
  max-height: 240px;
  object-fit: cover;
}

@media (max-width: 820px) {
  .deployment-overview-grid .swarm_host-detail-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

.stats-chart {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #19150f;
}

.stats-chart h3 {
  margin: 0 0 8px;
}

.stats-chart-canvas-wrap {
  position: relative;
  height: clamp(220px, 32vw, 360px);
}

.stats-chart canvas {
  display: block;
  width: 100%;
  height: 100% !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #18140f;
}

.launch-section-label {
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.launch-swarm_host-strip {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.launch-swarm_host-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.launch-swarm_host-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
}

.launch-swarm_host-pill:hover,
.launch-swarm_host-pill:focus-visible {
  background: #2c251f;
  border-color: var(--accent-soft);
}

.launch-swarm_host-pill__name {
  font-weight: 600;
  color: var(--text-on-dark);
}

.launch-swarm_host-pill__host {
  color: var(--text-soft);
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.launch-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.launch-search {
  flex: 1 1 280px;
  max-width: 360px;
}

.launch-search input {
  width: 100%;
}

.launch-search .small {
  margin-top: 8px;
}

.launch-game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.launch-game-card:hover,
.launch-game-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  background: #231f1a;
}

.launch-game-card.is-filtered-out {
  display: none;
}

.launch-game-card__poster {
  aspect-ratio: 4 / 3;
  background: #16120e;
  border-bottom: 1px solid var(--border);
}

.launch-game-card__poster img,
.launch-selected-game__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-game-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.launch-game-card__body h3 {
  margin: 0;
}

.launch-game-card__body p,
.launch-selected-game__copy p:last-child {
  margin: 0;
  color: var(--text-soft);
}

.launch-selected-game {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0 22px;
}

.launch-selected-game__poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #16120e;
  min-height: 180px;
}

.launch-selected-game__poster img {
  aspect-ratio: 4 / 3;
}

.launch-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.launch-form-grid,
.launch-custom-config-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.launch-form-section {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.launch-form-section .page-header {
  margin-bottom: 12px;
}

.game-config-field {
  display: flex;
  flex-direction: column;
}

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

.launch-form > button[type="submit"] {
  align-self: flex-start;
}

.launch-empty {
  margin: 18px 0 0;
  color: var(--text-soft);
}

@media (max-width: 940px) {
  .launch-grid-toolbar {
    align-items: stretch;
  }

  .launch-search {
    max-width: none;
  }

  .launch-selected-game {
    grid-template-columns: 1fr;
  }

  .launch-custom-config-row {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 13px;
    line-height: 1.4;
  }

  main.container {
    padding: 12px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  .card,
  .fm-move-item,
  .fm-modal-card,
  .file-manager-shell,
  .fm-list,
  .fm-editor-loading,
  .fm-header,
  .fm-toolbar {
    padding: 12px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-label,
  .stat-foot {
    font-size: 11px;
  }

  .table-clickable th,
  .table-clickable td,
  .fm-table th,
  .fm-table td {
    padding: 8px 10px;
  }

  .list-row,
  .share-result-row,
  .fm-move-empty {
    padding: 8px 10px;
  }

  .fm-resource-row {
    padding: 6px;
  }

  .swarm_host-detail-label,
  .swarm_host-detail-value,
  .fm-meta,
  .fm-subtitle,
  .fm-code-editor {
    font-size: 12px;
  }

  input,
  select,
  textarea,
  button,
  [role="button"],
  button[type="submit"] {
    min-height: 32px;
    padding: 6px 10px;
  }

  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 12px;
    min-height: 0;
  }

  .nav-links {
    gap: 8px;
    order: 3;
  }

  .nav-links a {
    padding: 4px 0;
    font-size: 13px;
  }

  .user-chip {
    margin-left: auto;
    order: 2;
    font-size: 12px;
  }

  .hero {
    gap: 0;
    margin-bottom: 8px;
  }

  .hero,
  .hero .subtitle {
    flex-direction: column;
    gap: 4px;
  }

  .fm-header,
  .page-header,
  .page-actions,
  .action-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-chart canvas {
    height: 100% !important;
  }

  .stats-chart-canvas-wrap {
    height: 220px;
  }

  .fm-resource-row,
  .swarm_host-detail-row {
    grid-template-columns: 1fr;
  }

  .swarm_host-detail-row {
    padding: 8px 0;
  }

  .swarm_host-detail-value {
    text-align: left;
  }

  .swarm_host-deployments-table {
    min-width: 980px;
  }

  .fm-meta {
    text-align: left;
  }

  .fm-editor-gutter,
  .fm-code-editor {
    font-size: 11px;
  }

  .fm-toolbar {
    gap: 6px;
  }

  .flash-messages article {
    padding: 8px 10px;
  }
}

/* Uncodixified app shell */
body {
  font-family: "IBM Plex Sans", "Avenir Next", "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body.app-authenticated,
body.app-guest {
  --background: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #202020;
  --surface-3: #262626;
  --border: #2d2d2d;
  --text: #f5f5f5;
  --text-soft: #a1a1a1;
  --text-on-dark: #f5f5f5;
  --primary: #f1c46e;
  --primary-soft: #9a7a35;
  --accent: #fb923c;
  --accent-soft: #ffd68e;
  --success: #22a06b;
  --warning: #d0a46b;
  --danger: #d06b8f;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  background: #0f0f0f;
  color: var(--text);
}

body.app-authenticated::before,
body.app-guest::before {
  display: none;
}

body.app-authenticated > *,
body.app-guest > * {
  position: static;
}

a {
  color: var(--primary);
}

a:hover,
a:focus-visible {
  color: #33e0be;
}

.app-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  transition: grid-template-columns 160ms ease;
}

.app-sidebar {
  position: static;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  overflow: hidden auto;
  padding: 16px 14px;
  gap: 14px;
  border-radius: 0;
  border-right: 1px solid var(--border);
  background: #1a1a1a;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateX(0);
  transition: padding 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

body.sidebar-collapsed .app-layout {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.sidebar-collapsed .app-sidebar {
  padding-left: 0;
  padding-right: 0;
  border-right-color: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.app-sidebar-backdrop {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}

.sidebar-brand__link {
  display: inline-block;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-link {
  display: block;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--text-soft);
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: #202020;
  border-color: var(--border);
  color: var(--text);
  transform: none;
}

.sidebar-link.is-active {
  background: #202020;
  border-color: #2f4c45;
  color: var(--text);
}

.sidebar-link__icon,
.sidebar-link__badge {
  display: none;
}

.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: -1px 0 6px 18px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.sidebar-sublink {
  display: block;
  padding: 5px 8px;
  border-radius: 0;
  color: var(--text-soft);
  font-size: 13px;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.sidebar-sublink:hover,
.sidebar-sublink:focus-visible {
  background: #202020;
  color: var(--text);
}

.sidebar-sublink.is-active {
  background: #202020;
  color: var(--text);
}

.sidebar-nav-meta {
  padding: 10px 10px 6px;
}

.sidebar-account {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding: 8px 0 0;
  border-top: 1px solid var(--border);
}

.sidebar-nav-meta-line {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.sidebar-nav-meta-line--primary {
  color: var(--text);
  margin-bottom: 2px;
}

.sidebar-link--account-action {
  color: var(--text);
}

.app-main {
  min-width: 0;
  background: #0f0f0f;
}

.top-nav__meta,
.top-nav__title,
.top-nav__eyebrow,
.top-nav__chip,
.top-nav__chip-count,
.shell-hero,
.guest-hero,
.sidebar-help,
.metric-grid,
.metric-card,
.spotlight-card,
.spotlight-card__grid,
.spotlight-card__panel,
.metric-inline,
.metric-inline__label,
.section-kicker,
.page-kicker,
.launch-section-label {
  display: none !important;
}

.top-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}

.top-nav__actions a {
  color: var(--text-soft);
  text-decoration: none;
}

.top-nav__actions a:hover,
.top-nav__actions a:focus-visible {
  color: var(--text);
}

.page-shell {
  max-width: none;
  padding: 16px 20px 20px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page-header-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.page-heading h1,
h1 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.page-description,
.subtitle,
.empty-state,
.table-secondary,
.small,
.fm-muted,
.help-link {
  color: var(--text-soft);
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-section,
.profile-subsection {
  scroll-margin-top: 24px;
}

.profile-section + .profile-section {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.profile-account-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-width: 640px;
  margin: 12px 0 0;
}

.profile-account-details div {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.profile-account-details dt {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.profile-account-details dd {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.profile-subsection + .profile-subsection {
  margin-top: 24px;
}

.plan-banner,
.marketing-pricing-banner {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(241, 196, 110, 0.32);
  border-radius: 4px;
  background: rgba(241, 196, 110, 0.1);
  color: var(--text);
}

.plan-banner p,
.marketing-pricing-banner span {
  margin: 0;
  color: var(--text-soft);
}

.plan-summary-grid,
.plan-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.plan-summary-grid article,
.plan-upgrade-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.plan-summary-grid span,
.plan-upgrade-card p {
  color: var(--text-soft);
}

.plan-summary-grid strong,
.plan-upgrade-card strong {
  color: var(--text);
  font-size: 18px;
}

.plan-usage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}

.plan-usage-list div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.plan-usage-list dt {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.plan-usage-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.plan-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-feature-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(21, 128, 61, 0.34);
  border-radius: 999px;
  background: rgba(21, 128, 61, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.plan-feature-pill.is-disabled {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.plan-upgrade-card h4,
.plan-upgrade-card p {
  margin: 0;
}

.plan-upgrade-card.is-recommended {
  border-color: rgba(241, 196, 110, 0.34);
}

.card,
.fm-modal-card,
.stat-card,
.fm-list,
.fm-resource-summary,
.fm-move-list,
.fm-logs-pre,
.fm-code-editor,
.fm-editor-gutter,
.profile-token,
.profile-command,
.fm-move-empty,
.fm-upload,
.file-manager-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: none;
  backdrop-filter: none;
}

.card {
  padding: 14px;
}

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

.section-header h2,
.section-header h3 {
  margin: 0;
}

.task-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-filter-tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface);
  text-decoration: none;
}

.task-filter-tab:hover,
.task-filter-tab:focus-visible,
.task-filter-tab.is-active {
  border-color: var(--primary);
  color: var(--text);
  background: rgba(0, 212, 170, 0.10);
}

.section-header--stack {
  align-items: flex-start;
}

.summary-strip {
  padding: 0;
}

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

.summary-list > div {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

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

.summary-list dt {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.summary-list dd {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.summary-list p,
.detail-list div {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

.detail-list dt {
  color: var(--text-soft);
  margin-bottom: 4px;
}

.detail-list dd {
  margin: 0;
}

.content-grid {
  display: grid;
  gap: 16px;
}

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

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.list-row:hover,
.list-row:focus-visible,
.table-clickable tbody tr:hover,
.swarm_host-row:hover,
.deployment-row:hover,
.fm-row-active,
.dropdown-link:hover,
.dropdown-link:focus-visible {
  background: #242424;
}

.list-row__stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-row__aside {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

button,
[role="button"],
button[type="submit"] {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #0f0f0f;
  box-shadow: none;
}

button:hover,
button:focus-visible,
[role="button"]:hover,
[role="button"]:focus-visible {
  background: #f7d992;
  border-color: #f7d992;
}

button.secondary,
a.secondary[role="button"],
button.secondary[type="button"],
button.secondary[type="submit"] {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

button.secondary:hover,
button.secondary:focus-visible,
a.secondary[role="button"]:hover,
a.secondary[role="button"]:focus-visible {
  background: var(--surface-2);
  border-color: #3a3a3a;
}

.dropdown button.dropdown-link,
.dropdown button.dropdown-link[type="button"],
.dropdown button.dropdown-link[type="submit"] {
  min-height: 0;
  width: 100%;
  justify-content: flex-start;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.dropdown button.dropdown-link:hover,
.dropdown button.dropdown-link:focus-visible,
.dropdown button.dropdown-link[type="button"]:hover,
.dropdown button.dropdown-link[type="button"]:focus-visible,
.dropdown button.dropdown-link[type="submit"]:hover,
.dropdown button.dropdown-link[type="submit"]:focus-visible {
  background: #242424;
  border-color: transparent;
}

.dropdown button.dropdown-link:disabled,
.dropdown button.dropdown-link[type="button"]:disabled,
.dropdown button.dropdown-link[type="submit"]:disabled {
  background: transparent;
  border-color: transparent;
}

.sidebar-toggle,
.sidebar-peek-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.sidebar-peek-toggle:hover,
.sidebar-peek-toggle:focus-visible {
  background: var(--surface);
  border-color: #3a3a3a;
}

.sidebar-toggle__icon,
.sidebar-peek-toggle__icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
}

.sidebar-peek-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 45;
  display: none;
}

body.sidebar-collapsed .sidebar-peek-toggle {
  display: inline-flex;
}

body.sidebar-collapsed .app-main {
  padding-top: 56px;
}

.app-sidebar-backdrop,
.app-sidebar-backdrop:hover,
.app-sidebar-backdrop:focus-visible {
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  color: transparent;
  box-shadow: none;
}

input,
select,
textarea {
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  background: #141414;
  color: var(--text);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.fm-label:focus-visible {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
}

table,
.table-clickable,
.fm-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

table thead,
.table-clickable thead,
.fm-table thead {
  background: var(--surface-2);
}

table th,
table td,
.table-clickable th,
.table-clickable td,
.fm-table th,
.fm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

table th,
.table-clickable th,
.fm-table th {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
}

.table-primary {
  color: var(--text);
  font-weight: 600;
}

.table-wrap,
.swarm_host-deployments-table-wrap {
  overflow-x: auto;
}

.status-indicator,
.reachability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface-2);
}

.status-indicator.status-online,
.reachability-badge.is-reachable,
.reachability-badge.status-online,
.reachability-badge.online {
  border-color: #245548;
  background: rgba(0, 212, 170, 0.12);
  color: #9ae9d8;
}

.status-indicator.status-offline,
.reachability-badge.is-unreachable,
.reachability-badge.status-offline,
.reachability-badge.offline {
  border-color: #5a3342;
  background: rgba(255, 107, 157, 0.1);
  color: #ffc1d6;
}

.status-indicator.status-stale,
.reachability-badge.is-unknown,
.reachability-badge.is-pending,
.reachability-badge.unknown,
.reachability-badge.pending,
.reachability-badge.n\/a {
  border-color: #4a4232;
  background: rgba(208, 164, 107, 0.1);
  color: #e8c99b;
}

.status-indicator.status-running {
  border-color: #4a4232;
  background: rgba(208, 164, 107, 0.1);
  color: #e8c99b;
}

.status-indicator.status-complete {
  border-color: #245548;
  background: rgba(0, 212, 170, 0.12);
  color: #9ae9d8;
}

.status-indicator.status-failed {
  border-color: #5a3342;
  background: rgba(255, 107, 157, 0.1);
  color: #ffc1d6;
}

.reachability-icon {
  display: none;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.launch-grid--game-cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 320px));
  align-items: start;
  justify-content: start;
}

.launch-grid--fixed-cards {
  grid-template-columns: repeat(auto-fill, minmax(228px, 228px));
  justify-content: start;
}

.launch-grid--relay-cards {
  grid-template-columns: repeat(auto-fill, minmax(320px, 360px));
  justify-content: start;
}

.launch-game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  transform: none;
}

.launch-game-card:hover,
.launch-game-card:focus-visible {
  background: #202020;
  border-color: #3a3a3a;
}

.launch-game-card__poster {
  aspect-ratio: 4 / 3;
  background: #141414;
  border-bottom: 1px solid var(--border);
}

.launch-game-card__body {
  padding: 14px;
}

.launch-game-card__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swarm_host-card__poster img {
  object-fit: contain;
  padding: 8px;
  background: #141414;
}

.card-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.card-heading-row h3 {
  margin: 0;
}

.card-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 12px 0 0;
}

.card-meta-list > div {
  min-width: 0;
}

.card-meta-list dt {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.card-meta-list dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}

.card-meta-list__wide {
  grid-column: 1 / -1;
}

.launch-selected-game {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.launch-selected-game__poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #141414;
}

.launch-search {
  width: 100%;
  max-width: 320px;
}

.launch-empty {
  margin: 16px 0 0;
  color: var(--text-soft);
}

.detail-grid--cards {
  gap: 12px;
}

.detail-grid--cards > div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
}

.swarm_host-detail-list {
  gap: 0;
}

.swarm_host-detail-row {
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 10px 0;
}

.flash-messages {
  margin: 12px 20px 0;
}

.flash-messages article {
  border-radius: 4px;
  padding: 10px 12px;
}

.guest-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.guest-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  margin: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.guest-content {
  max-width: 520px;
}

@media (max-width: 960px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: 236px;
    min-height: 100vh;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    opacity: 1;
    pointer-events: none;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
    pointer-events: auto;
  }

  .app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.45);
    border: 0;
    padding: 0;
  }

  body.sidebar-open .app-sidebar-backdrop {
    display: block;
  }

  .sidebar-peek-toggle {
    display: inline-flex;
  }

  body.sidebar-open .sidebar-peek-toggle {
    display: none;
  }

  .app-main {
    padding-top: 56px;
  }

  .page-shell {
    padding: 14px 16px 18px;
  }

  .flash-messages {
    margin: 12px 16px 0;
  }

  .content-grid--split,
  .detail-list,
  .launch-selected-game,
  .launch-grid--relay-cards,
  .card-meta-list {
    grid-template-columns: 1fr;
  }

  .swarm_host-utilization-grid:not(.swarm_host-utilization-grid--compact) {
    grid-template-columns: 1fr;
  }

  .swarm_host-utilization-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .summary-list > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .summary-list > div:nth-child(2n) {
    border-left: 1px solid var(--border);
  }

  .summary-list > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .swarm_host-utilization-card {
    padding: 16px;
  }

  .swarm_host-utilization-grid--compact {
    grid-template-columns: 1fr;
  }

  .swarm_host-utilization-progress {
    padding: 10px;
  }

  .swarm_host-utilization-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .swarm_host-utilization-card__summary {
    text-align: left;
  }

  .swarm_host-utilization-gauge {
    width: min(100%, 148px);
  }
}

@media (max-width: 640px) {
  .page-header,
  .page-actions,
  .action-grid,
  .section-header,
  .guest-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-main {
    align-items: flex-start;
  }

  .summary-list {
    grid-template-columns: 1fr;
  }

  .summary-list > div:nth-child(2n) {
    border-left: 0;
  }

  .summary-list > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .summary-list > div:last-child {
    border-bottom: 0;
  }

  .swarm_host-detail-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .launch-grid--fixed-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Swarm asset first pass */
body.app-authenticated,
body.app-guest {
  --primary: #f1c46e;
  --primary-soft: #9a7a35;
  --accent: #fb923c;
  --accent-soft: #ffd68e;
  --success: #4caf50;
  --warning: #ffc107;
  --danger: #f44336;
  --border: rgba(132, 159, 187, 0.22);
  --surface: rgba(10, 18, 28, 0.88);
  --surface-2: rgba(17, 28, 40, 0.92);
  --surface-3: rgba(42, 47, 58, 0.96);
  --text: #e9f1fb;
  --text-soft: #93a6bb;
  --text-on-dark: #ffffff;
  background:
    linear-gradient(180deg, #08131d 0%, #091722 50%, #071018 100%);
}

body.app-authenticated::after,
body.app-guest::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(18vw, 170px);
  pointer-events: none;
  background: url("swarm-assets/decor-tentacle-footer.png") left bottom / auto 100% no-repeat;
  opacity: 0.18;
  z-index: 0;
}

.app-sidebar {
  background:
    linear-gradient(180deg, rgba(9, 18, 28, 0.98), rgba(10, 16, 24, 0.98));
  border-right-color: rgba(132, 159, 187, 0.24);
}

.sidebar-brand__link,
.nav-brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-brand__logo {
  display: block;
  width: min(138px, 100%);
  height: 48px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 12px rgba(241, 196, 110, 0.22));
}

.nav-brand__logo {
  display: block;
  width: 150px;
  height: 46px;
  object-fit: contain;
  object-position: left center;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link.is-active {
  border-color: rgba(241, 196, 110, 0.32);
  background:
    linear-gradient(90deg, rgba(34, 72, 107, 0.34), rgba(251, 146, 60, 0.1));
  color: var(--text-on-dark);
}

.sidebar-link__icon {
  display: block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 0 8px rgba(241, 196, 110, 0.24));
}

.sidebar-link__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-link__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 6px;
  border: 1px solid rgba(251, 146, 60, 0.42);
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.14);
  color: #ffd68e;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-toggle,
.sidebar-peek-toggle {
  border-color: rgba(132, 159, 187, 0.35);
  background: rgba(15, 15, 20, 0.72);
}

.sidebar-toggle__icon,
.sidebar-peek-toggle__icon {
  width: 26px;
  height: 26px;
}

.launch-game-card {
  border-color: rgba(132, 159, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(12, 20, 30, 0.94), rgba(9, 16, 24, 0.94));
}

.launch-game-card:hover,
.launch-game-card:focus-visible {
  border-color: rgba(241, 196, 110, 0.42);
  background:
    linear-gradient(180deg, rgba(17, 28, 40, 0.96), rgba(11, 20, 31, 0.96));
}

.swarm_host-card__poster {
  background:
    radial-gradient(circle at center, rgba(241, 196, 110, 0.22), transparent 58%),
    #101820;
}

.swarm_host-card__poster img.swarm-mark-poster {
  padding: 16px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 0 18px rgba(241, 196, 110, 0.24));
}

.swarm-art-empty {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  max-width: 760px;
  padding: 20px;
  border: 1px solid rgba(132, 159, 187, 0.24);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(34, 72, 107, 0.22), rgba(251, 146, 60, 0.06)),
    rgba(9, 16, 24, 0.9);
}

.swarm-art-empty__image {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(241, 196, 110, 0.2));
}

.swarm-art-empty__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.swarm-art-empty h2,
.swarm-art-empty p {
  margin: 0;
}

.swarm-art-empty h2 {
  color: var(--text);
  font-size: 22px;
}

.swarm-art-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.swarm-art-button {
  position: relative;
  overflow: hidden;
  border-color: rgba(241, 196, 110, 0.46);
  background:
    linear-gradient(180deg, rgba(241, 196, 110, 0.94), rgba(180, 83, 9, 0.86));
  color: #1d160d;
  box-shadow: 0 0 18px rgba(241, 196, 110, 0.16);
}

.swarm-art-button:hover,
.swarm-art-button:focus-visible {
  border-color: rgba(251, 146, 60, 0.65);
  background:
    linear-gradient(180deg, rgba(247, 217, 146, 0.96), rgba(251, 146, 60, 0.88));
  color: #1d160d;
}

.swarm-art-button::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  background: url("swarm-assets/icon-deploy.png") center / contain no-repeat;
}

.swarm-art-button--infect::before {
  background-image: url("swarm-assets/icon-servers.png");
}

.fm-spinner {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: url("swarm-assets/loading-spinner.png") center / contain no-repeat;
  animation: fm-spin 1.1s linear infinite;
}

.fm-sync-banner[data-state="success"] .fm-spinner {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid #335a43;
  background: rgba(76, 175, 80, 0.12);
  animation: none;
}

.fm-sync-banner[data-state="success"] .fm-spinner::after {
  left: 7px;
  top: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .fm-spinner {
    animation: none;
  }
}

@media (max-width: 640px) {
  body.app-authenticated::after,
  body.app-guest::after {
    opacity: 0.1;
  }

  .nav-brand__logo {
    width: 132px;
  }

  .swarm-art-empty {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .swarm-art-empty__image {
    max-height: 190px;
  }
}

.swarm-error-page {
  max-width: 760px;
  min-height: 380px;
  align-items: center;
}

.swarm-error-page__image {
  width: min(180px, 42vw);
  max-height: 180px;
  justify-self: center;
}

.swarm-error-page__code {
  margin: 0;
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.swarm-error-page h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1;
}

.swarm-error-page .secondary {
  min-height: 40px;
  border-color: rgba(160, 118, 255, 0.32);
  color: var(--text);
}

.admin-users-action-note {
  margin: 6px 0 10px;
}

.admin-users-browser {
  align-items: end;
  gap: 16px;
}

.admin-users-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, auto);
  align-items: end;
  gap: 10px;
  min-width: min(520px, 100%);
}

.admin-users-filter-grid .table-secondary {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-users-table-wrap {
  margin-top: 0;
  border-radius: 4px;
}

.admin-users-table th,
.admin-users-table td {
  padding: 8px 12px;
  vertical-align: middle;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child {
  width: 1%;
  min-width: 430px;
}

.admin-users-nowrap {
  white-space: nowrap;
}

.admin-users-token {
  min-width: 210px;
}

.admin-users-inline-note {
  display: block;
  margin-top: 2px;
  line-height: 1.2;
}

.admin-users-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.admin-users-actions form {
  display: inline-flex;
  margin: 0;
}

.admin-users-actions button {
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .admin-users-table th,
  .admin-users-table td {
    padding: 8px;
  }

  .admin-users-table th:last-child,
  .admin-users-table td:last-child {
    min-width: 260px;
  }

  .admin-users-actions {
    flex-wrap: wrap;
    white-space: normal;
  }

  .admin-users-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Light theme: keep the Swarm purple identity while using bright, readable surfaces. */
body.app-authenticated.theme-light,
body.app-authenticated.theme-light .top-nav__meta,
body.app-authenticated.theme-light .top-nav__title,
body.app-authenticated.theme-light .top-nav__eyebrow,
body.app-authenticated.theme-light .top-nav__chip,
body.app-authenticated.theme-light .top-nav__chip-count,
body.app-authenticated.theme-light .shell-hero,
body.app-authenticated.theme-light .guest-hero,
body.app-authenticated.theme-light .sidebar-help,
body.app-authenticated.theme-light .metric-grid,
body.app-authenticated.theme-light .metric-card,
body.app-authenticated.theme-light .spotlight-card,
body.app-authenticated.theme-light .spotlight-card__grid,
body.app-authenticated.theme-light .spotlight-card__panel,
body.app-authenticated.theme-light .metric-inline,
body.app-authenticated.theme-light .metric-inline__label,
body.app-authenticated.theme-light .section-kicker,
body.app-authenticated.theme-light .page-kicker,
body.app-authenticated.theme-light .launch-section-label {
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --surface-3: #dce8f2;
  --border: #c9d6e4;
  --text: #172233;
  --text-soft: #596779;
  --text-on-dark: #ffffff;
  --primary: #22486b;
  --primary-soft: #d7e7f4;
  --accent: #b45309;
  --accent-soft: #8a4a08;
  --success: #22a06b;
  --warning: #d97706;
  --danger: #dc2626;
  --input-background: #ffffff;
  --focus-ring: #22486b;
  --button-text: #ffffff;
  --button-hover: #315c84;
  --secondary-button-background: #ffffff;
  --secondary-button-hover: #e7eef6;
  --shadow: 0 8px 24px rgba(22, 34, 51, 0.12);
  background: #f5f7fb;
  color: var(--text);
}

body.app-authenticated.theme-light::before {
  display: block;
  background-image:
    linear-gradient(rgba(49, 92, 132, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 92, 132, 0.08) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 76%);
}

body.app-authenticated.theme-light::after {
  opacity: 0.11;
  mix-blend-mode: multiply;
}

body.app-authenticated.theme-light a {
  color: var(--primary);
}

body.app-authenticated.theme-light a:hover,
body.app-authenticated.theme-light a:focus-visible {
  color: var(--color-primary-hover, #315c84);
}

body.app-authenticated.theme-light .app-main {
  background: transparent;
}

body.app-authenticated.theme-light .page-shell {
  background: transparent;
}

body.app-authenticated.theme-light .app-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(231, 238, 246, 0.9)),
    #e7eef6;
  border-right-color: var(--border);
  box-shadow: 6px 0 24px rgba(22, 34, 51, 0.08);
}

body.app-authenticated.theme-light .sidebar-brand__logo {
  filter: drop-shadow(0 0 10px rgba(34, 72, 107, 0.16));
}

body.app-authenticated.theme-light .sidebar-link,
body.app-authenticated.theme-light .sidebar-sublink,
body.app-authenticated.theme-light .sidebar-nav-meta-line {
  color: var(--text-soft);
}

body.app-authenticated.theme-light .sidebar-nav-meta-line--primary,
body.app-authenticated.theme-light .sidebar-link--account-action,
body.app-authenticated.theme-light .page-heading h1,
body.app-authenticated.theme-light h1,
body.app-authenticated.theme-light h2,
body.app-authenticated.theme-light h3 {
  color: var(--text);
}

body.app-authenticated.theme-light .sidebar-link:hover,
body.app-authenticated.theme-light .sidebar-link:focus-visible,
body.app-authenticated.theme-light .sidebar-link.is-active,
body.app-authenticated.theme-light .sidebar-sublink:hover,
body.app-authenticated.theme-light .sidebar-sublink:focus-visible,
body.app-authenticated.theme-light .sidebar-sublink.is-active {
  background:
    linear-gradient(90deg, rgba(34, 72, 107, 0.14), rgba(180, 83, 9, 0.07));
  border-color: #b8c9d9;
  color: var(--text);
}

body.app-authenticated.theme-light .sidebar-link__icon {
  filter: drop-shadow(0 0 7px rgba(34, 72, 107, 0.16));
}

body.app-authenticated.theme-light .sidebar-link__badge {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(180, 83, 9, 0.1);
  color: #8a4a08;
}

body.app-authenticated.theme-light .sidebar-toggle,
body.app-authenticated.theme-light .sidebar-peek-toggle {
  background: #ffffff;
  border-color: var(--border);
}

body.app-authenticated.theme-light .sidebar-toggle:hover,
body.app-authenticated.theme-light .sidebar-toggle:focus-visible,
body.app-authenticated.theme-light .sidebar-peek-toggle:hover,
body.app-authenticated.theme-light .sidebar-peek-toggle:focus-visible {
  background: var(--surface-2);
  border-color: #b8c9d9;
}

body.app-authenticated.theme-light .card,
body.app-authenticated.theme-light .fm-modal-card,
body.app-authenticated.theme-light .stat-card,
body.app-authenticated.theme-light .fm-list,
body.app-authenticated.theme-light .fm-resource-summary,
body.app-authenticated.theme-light .fm-move-list,
body.app-authenticated.theme-light .fm-logs-pre,
body.app-authenticated.theme-light .fm-code-editor,
body.app-authenticated.theme-light .fm-editor-gutter,
body.app-authenticated.theme-light .profile-token,
body.app-authenticated.theme-light .profile-command,
body.app-authenticated.theme-light .fm-move-empty,
body.app-authenticated.theme-light .fm-upload,
body.app-authenticated.theme-light .file-manager-shell,
body.app-authenticated.theme-light .list-row,
body.app-authenticated.theme-light .launch-game-card,
body.app-authenticated.theme-light .launch-selected-game,
body.app-authenticated.theme-light .launch-form-section,
body.app-authenticated.theme-light .swarm-art-empty,
body.app-authenticated.theme-light .swarm_host-utilization-card,
body.app-authenticated.theme-light .swarm_host-utilization-progress {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
}

body.app-authenticated.theme-light .profile-section,
body.app-authenticated.theme-light .profile-subsection {
  color: var(--text);
}

body.app-authenticated.theme-light input,
body.app-authenticated.theme-light select,
body.app-authenticated.theme-light textarea {
  background: var(--input-background);
  border-color: var(--border);
  color: var(--text);
}

body.app-authenticated.theme-light input:read-only {
  background: #f8fafc;
}

body.app-authenticated.theme-light button,
body.app-authenticated.theme-light [role="button"],
body.app-authenticated.theme-light button[type="submit"],
body.app-authenticated.theme-light .swarm-art-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(34, 72, 107, 0.16);
}

body.app-authenticated.theme-light button:hover,
body.app-authenticated.theme-light button:focus-visible,
body.app-authenticated.theme-light [role="button"]:hover,
body.app-authenticated.theme-light [role="button"]:focus-visible,
body.app-authenticated.theme-light .swarm-art-button:hover,
body.app-authenticated.theme-light .swarm-art-button:focus-visible {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: #ffffff;
}

body.app-authenticated.theme-light .table-sort-button,
body.app-authenticated.theme-light .table-sort-button:hover,
body.app-authenticated.theme-light .table-sort-button:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
}

body.app-authenticated.theme-light button.secondary,
body.app-authenticated.theme-light a.secondary[role="button"],
body.app-authenticated.theme-light button.secondary[type="button"],
body.app-authenticated.theme-light button.secondary[type="submit"] {
  background: var(--secondary-button-background);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

body.app-authenticated.theme-light button.secondary:hover,
body.app-authenticated.theme-light button.secondary:focus-visible,
body.app-authenticated.theme-light a.secondary[role="button"]:hover,
body.app-authenticated.theme-light a.secondary[role="button"]:focus-visible {
  background: var(--secondary-button-hover);
  border-color: #b8c9d9;
  color: var(--text);
}

body.app-authenticated.theme-light .segmented-fieldset {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.app-authenticated.theme-light .segmented-option span {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-soft);
}

body.app-authenticated.theme-light .segmented-option input:checked + span {
  background: var(--primary);
  color: #ffffff;
}

body.app-authenticated.theme-light .flash-messages article {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

body.app-authenticated.theme-light .flash-messages .success {
  background: #ecfdf5;
  border-left-color: var(--success);
}

body.app-authenticated.theme-light .flash-messages .error,
body.app-authenticated.theme-light .flash-messages .danger {
  background: #fef2f2;
  border-left-color: var(--danger);
}

body.app-authenticated.theme-light .flash-messages .warning,
body.app-authenticated.theme-light .flash-messages .info {
  background: #fff7ed;
  border-left-color: var(--warning);
}

body.app-authenticated.theme-light table,
body.app-authenticated.theme-light .table-clickable,
body.app-authenticated.theme-light .fm-table,
body.app-authenticated.theme-light .table-wrap,
body.app-authenticated.theme-light .swarm_host-deployments-table-wrap,
body.app-authenticated.theme-light .admin-users-table-wrap {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

body.app-authenticated.theme-light table thead,
body.app-authenticated.theme-light .table-clickable thead,
body.app-authenticated.theme-light .fm-table thead {
  background: #e7eef6;
}

body.app-authenticated.theme-light table th,
body.app-authenticated.theme-light table td,
body.app-authenticated.theme-light .table-clickable th,
body.app-authenticated.theme-light .table-clickable td,
body.app-authenticated.theme-light .fm-table th,
body.app-authenticated.theme-light .fm-table td {
  border-color: var(--border);
}

body.app-authenticated.theme-light .list-row:hover,
body.app-authenticated.theme-light .list-row:focus-visible,
body.app-authenticated.theme-light .table-clickable tbody tr:hover,
body.app-authenticated.theme-light .swarm_host-row:hover,
body.app-authenticated.theme-light .deployment-row:hover,
body.app-authenticated.theme-light .fm-row-active,
body.app-authenticated.theme-light .dropdown-link:hover,
body.app-authenticated.theme-light .dropdown-link:focus-visible,
body.app-authenticated.theme-light .dropdown button.dropdown-link:hover,
body.app-authenticated.theme-light .dropdown button.dropdown-link:focus-visible {
  background: #e7eef6;
  color: var(--text);
}

body.app-authenticated.theme-light .launch-game-card:hover,
body.app-authenticated.theme-light .launch-game-card:focus-visible {
  background: #f8fafc;
  border-color: #b8c9d9;
  box-shadow: 0 8px 24px rgba(22, 34, 51, 0.14), 0 0 18px rgba(34, 72, 107, 0.12);
}

body.app-authenticated.theme-light .swarm_host-card__poster {
  background:
    radial-gradient(circle at center, rgba(34, 72, 107, 0.16), transparent 58%),
    #e7eef6;
}

body.app-authenticated.theme-light .swarm-art-empty {
  background:
    linear-gradient(135deg, rgba(34, 72, 107, 0.08), rgba(180, 83, 9, 0.05)),
    #ffffff;
}

body.app-authenticated.theme-light .fm-sync-banner[data-state="success"],
body.app-authenticated.theme-light .badge.success,
body.app-authenticated.theme-light .reachability-badge.is-online {
  background: #ecfdf5;
  border-color: rgba(34, 160, 107, 0.28);
  color: #166b49;
}

body.app-authenticated.theme-light .badge.danger,
body.app-authenticated.theme-light .reachability-badge.is-offline {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.28);
  color: #991b1b;
}

body.app-authenticated.theme-light .badge.warning,
body.app-authenticated.theme-light .reachability-badge.is-warning {
  background: #fff7ed;
  border-color: rgba(217, 119, 6, 0.28);
  color: #9a4d00;
}

/* Public marketing home */
.guest-shell.marketing-shell {
  width: 100%;
  max-width: none;
  padding: 18px 0 0;
  overflow-x: hidden;
}

.marketing-shell .guest-nav {
  width: min(1180px, calc(100% - 32px));
  max-width: none;
  margin: 0 auto 14px;
  border-radius: 8px;
  background: rgba(8, 14, 20, 0.86);
}

.guest-content.marketing-content {
  width: 100%;
  max-width: none;
  gap: 0;
  padding-bottom: 0;
}

.marketing-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(500px, calc(100svh - 184px), 640px);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #080d11;
}

.marketing-hero__media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0;
  opacity: 0.74;
}

.marketing-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 15, 0.96) 0%, rgba(5, 10, 15, 0.78) 46%, rgba(5, 10, 15, 0.28) 100%),
    linear-gradient(180deg, rgba(5, 10, 15, 0.16), rgba(5, 10, 15, 0.52));
}

.marketing-hero__media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}

.marketing-hero__image--wide {
  grid-row: 1 / 3;
}

.marketing-hero__copy {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 70px;
}

.marketing-kicker {
  margin: 0 0 10px;
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.marketing-hero h1 {
  margin: 0;
  max-width: 760px;
  color: #ffffff;
  font-size: 64px;
  line-height: 0.98;
  letter-spacing: 0;
}

.marketing-hero__lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: #d8e2ee;
  font-size: 22px;
  line-height: 1.35;
}

.marketing-hero__signals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: #eef5f0;
  font-weight: 800;
}

.marketing-hero__signals li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.marketing-hero__signals li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.16);
}

.marketing-hero__actions,
.marketing-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.marketing-hero__actions {
  margin-top: 28px;
}

.marketing-button,
.marketing-button[role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  white-space: normal;
}

.marketing-button--primary,
.marketing-button--primary[role="button"] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--button-text);
}

.marketing-button--primary:hover,
.marketing-button--primary:focus-visible {
  border-color: var(--button-hover);
  background: var(--button-hover);
  color: var(--button-text);
}

.marketing-button--secondary,
.marketing-button--secondary[role="button"] {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(8, 16, 24, 0.72);
  color: #ffffff;
}

.marketing-button--secondary:hover,
.marketing-button--secondary:focus-visible {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(20, 34, 48, 0.92);
  color: #ffffff;
}

.marketing-section,
.marketing-cta {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.marketing-section {
  padding: 56px 0;
}

.marketing-section + .marketing-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.marketing-section__header {
  max-width: 760px;
  margin-bottom: 26px;
}

.marketing-section h2,
.marketing-cta h2 {
  margin: 0;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.marketing-section__header h2 + p,
.marketing-cta p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.55;
}

.marketing-feature-grid,
.marketing-path,
.marketing-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.marketing-feature,
.marketing-path article,
.marketing-ops-panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.72);
  padding: 18px;
}

.marketing-feature img,
.marketing-ops-panel img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 14px;
}

.marketing-feature h3,
.marketing-path h3,
.marketing-ops-panel h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0;
}

.marketing-feature p,
.marketing-path p,
.marketing-ops-panel p {
  margin: 0;
  color: var(--text-soft);
}

.marketing-ops-grid {
  grid-template-columns: 1.25fr 1fr 1fr;
}

.marketing-ops-panel {
  background:
    linear-gradient(180deg, rgba(12, 24, 32, 0.88), rgba(12, 19, 27, 0.76));
}

.marketing-ops-panel--primary {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    linear-gradient(145deg, rgba(35, 62, 46, 0.92), rgba(14, 25, 33, 0.86));
}

.marketing-ops-panel--primary span {
  color: #c7d7cb;
}

.marketing-ops-panel--primary strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 24px;
  letter-spacing: 0;
}

.marketing-ops-list {
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.marketing-ops-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-left: 3px solid rgba(241, 196, 110, 0.78);
  background: rgba(5, 10, 15, 0.24);
}

.marketing-ops-list strong {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.marketing-path article span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 900;
}

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

.marketing-game-strip figure {
  position: relative;
  min-width: 0;
  height: 250px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #0a121c;
}

.marketing-game-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.marketing-game-strip figure:hover img {
  transform: scale(1.03);
}

.marketing-game-strip figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(4, 10, 16, 0.76);
  color: #ffffff;
  font-weight: 800;
}

.marketing-cta {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.78);
}

.marketing-cta > div {
  max-width: 720px;
}

@media (max-width: 860px) {
  .marketing-hero {
    min-height: auto;
  }

  .marketing-hero__media {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, minmax(150px, 1fr));
  }

  .marketing-hero__media::after {
    background: rgba(4, 10, 16, 0.76);
  }

  .marketing-hero__copy {
    padding: 82px 0 52px;
  }

  .marketing-hero__image--wide {
    grid-row: auto;
  }

  .marketing-hero__signals {
    gap: 10px 14px;
  }

  .marketing-feature-grid,
  .marketing-path,
  .marketing-ops-grid,
  .marketing-game-strip {
    grid-template-columns: 1fr;
  }

  .marketing-game-strip figure {
    height: 210px;
  }
}

@media (max-width: 560px) {
  .guest-shell.marketing-shell {
    padding-top: 14px;
  }

  .marketing-shell .guest-nav {
    width: min(100% - 24px, 1180px);
    gap: 10px;
    padding: 12px;
  }

  .marketing-shell .nav-links {
    gap: 8px;
  }

  .marketing-hero__copy,
  .marketing-section,
  .marketing-cta {
    width: min(100% - 24px, 1180px);
  }

  .marketing-hero__copy {
    padding: 64px 0 44px;
  }

  .marketing-hero h1 {
    font-size: 44px;
  }

  .marketing-section {
    padding: 40px 0;
  }

  .marketing-section h2,
  .marketing-cta h2 {
    font-size: 28px;
  }

  .marketing-button,
  .marketing-button[role="button"] {
    width: 100%;
  }

  .marketing-ops-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .marketing-ops-list strong {
    white-space: normal;
  }
}

.local-monitor {
  display: grid;
  gap: 18px;
}

.local-monitor-toolbar {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}

.local-monitor-status {
  align-items: center;
  color: #cbd5e1;
  display: flex;
  font-size: 14px;
  gap: 9px;
  min-width: 0;
}

.local-monitor-status__dot {
  background: #f59e0b;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.local-monitor-status__dot[data-state="ok"] {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.local-monitor-status__dot[data-state="error"] {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.local-monitor-controls {
  align-items: center;
  display: flex;
  gap: 10px;
}

.local-monitor-controls select {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #e5e7eb;
  font: inherit;
  min-height: 38px;
  padding: 0 12px;
}

.local-monitor-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.local-monitor-summary__item {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 14px;
}

.local-monitor-summary__label {
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
}

.local-monitor-summary__item strong {
  color: #f8fafc;
  font-size: 22px;
  line-height: 1.1;
}

.local-monitor-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.local-monitor-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
}

.local-monitor-panel__header {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.local-monitor-panel__header h2 {
  color: #f8fafc;
  font-size: 17px;
  margin: 0;
}

.local-monitor-panel__header span {
  color: #94a3b8;
  font-size: 13px;
}

.local-monitor-chart {
  height: 280px;
  min-width: 0;
}

.local-monitor-chart canvas {
  height: 100%;
  width: 100%;
}

.local-monitor-events {
  color: #fca5a5;
  font-size: 14px;
  min-height: 20px;
}

body.app-authenticated.theme-light .local-monitor-toolbar,
body.app-authenticated.theme-light .local-monitor-summary__item,
body.app-authenticated.theme-light .local-monitor-panel {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.12);
}

body.app-authenticated.theme-light .local-monitor-status,
body.app-authenticated.theme-light .local-monitor-panel__header h2,
body.app-authenticated.theme-light .local-monitor-summary__item strong {
  color: #0f172a;
}

body.app-authenticated.theme-light .local-monitor-controls select {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

@media (max-width: 720px) {
  .local-monitor-toolbar,
  .local-monitor-panel__header {
    align-items: stretch;
    flex-direction: column;
  }

  .local-monitor-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .local-monitor-grid {
    grid-template-columns: 1fr;
  }

  .local-monitor-chart {
    height: 240px;
  }
}

/* Public marketing home refresh */
.guest-nav .nav-links__cta {
  padding: 8px 12px;
  border: 1px solid rgba(241, 196, 110, 0.42);
  border-radius: 6px;
  background: rgba(241, 196, 110, 0.14);
  color: #fff4d8;
  font-weight: 800;
}

.guest-nav .nav-links__cta:hover,
.guest-nav .nav-links__cta:focus-visible {
  border-color: rgba(241, 196, 110, 0.74);
  background: rgba(241, 196, 110, 0.22);
  color: #ffffff;
}

.guest-nav .nav-links__contact {
  color: #d8e2ee;
}

.guest-nav .nav-links__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d8e2ee;
  line-height: 0;
}

.guest-nav .nav-links__icon svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.guest-nav .nav-links__icon:hover,
.guest-nav .nav-links__icon:focus-visible {
  border-color: rgba(241, 196, 110, 0.5);
  background: rgba(241, 196, 110, 0.12);
  color: #ffffff;
}

.marketing-shell .guest-nav {
  width: min(1220px, calc(100% - 32px));
  margin-bottom: 16px;
}

.marketing-hero {
  display: block;
  min-height: auto;
  background:
    linear-gradient(180deg, rgba(8, 13, 17, 0.48), rgba(8, 13, 17, 0.92)),
    #080d11;
}

.marketing-hero__media {
  opacity: 0.44;
}

.marketing-hero__media::after {
  background:
    linear-gradient(90deg, rgba(5, 10, 15, 0.98) 0%, rgba(5, 10, 15, 0.78) 48%, rgba(5, 10, 15, 0.46) 100%),
    linear-gradient(180deg, rgba(5, 10, 15, 0.1), rgba(5, 10, 15, 0.72));
}

.marketing-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100svh - 130px);
  padding: 72px 0 86px;
}

.marketing-hero__copy {
  width: auto;
  max-width: 760px;
  margin: 0;
  padding: 0;
}

.marketing-hero h1 {
  max-width: 820px;
  font-size: 64px;
  line-height: 1;
}

.marketing-hero__lead {
  max-width: 720px;
  font-size: 22px;
}

.marketing-hero__signals {
  max-width: 760px;
}

.marketing-hero__model {
  max-width: 690px;
  margin: 18px 0 0;
  color: #b9cad9;
  font-size: 15px;
  line-height: 1.55;
}

.marketing-dashboard {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(241, 196, 110, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(15, 34, 30, 0.94), rgba(13, 21, 30, 0.92) 54%, rgba(34, 24, 15, 0.92));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

.marketing-dashboard__topline,
.marketing-dashboard__status,
.marketing-dashboard__actions,
.marketing-dashboard__metrics {
  display: flex;
  align-items: center;
}

.marketing-dashboard__topline {
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.marketing-dashboard__topline span {
  color: #dfe9ef;
  font-weight: 800;
}

.marketing-dashboard__topline strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  font-size: 13px;
}

.marketing-dashboard__status {
  gap: 9px;
  margin-top: 16px;
  color: #dbece1;
  font-weight: 800;
}

.marketing-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.marketing-dashboard__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.marketing-dashboard__metrics div {
  min-width: 0;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.marketing-dashboard__metrics span,
.marketing-dashboard__log span {
  display: block;
  color: #aebdcc;
  font-size: 13px;
}

.marketing-dashboard__metrics strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 22px;
}

.marketing-dashboard__actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.marketing-dashboard__actions span {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(241, 196, 110, 0.14);
  color: #fff4d8;
  font-size: 13px;
  font-weight: 800;
}

.marketing-dashboard__log {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 12px;
  border-left: 3px solid rgba(241, 196, 110, 0.72);
  background: rgba(5, 10, 15, 0.34);
}

.marketing-section,
.marketing-cta {
  width: min(1220px, calc(100% - 32px));
}

.marketing-section {
  padding: 64px 0;
}

.marketing-section__header {
  max-width: 820px;
}

.marketing-section h2,
.marketing-cta h2 {
  font-size: 36px;
}

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

.marketing-compare article,
.marketing-free,
.marketing-faq-grid article,
.marketing-price-card,
.marketing-feature,
.marketing-path article {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.74);
}

.marketing-compare article {
  padding: 22px;
}

.marketing-compare__with {
  background:
    linear-gradient(145deg, rgba(21, 73, 54, 0.78), rgba(10, 18, 28, 0.76));
  border-color: rgba(70, 180, 119, 0.24);
}

.marketing-compare h3,
.marketing-free h2,
.marketing-faq-grid h3,
.marketing-price-card h3 {
  margin: 0;
  color: #ffffff;
  letter-spacing: 0;
}

.marketing-compare h3,
.marketing-faq-grid h3,
.marketing-price-card h3 {
  font-size: 22px;
}

.marketing-compare ul,
.marketing-check-list,
.marketing-price-card ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.marketing-compare li,
.marketing-check-list li,
.marketing-price-card li {
  position: relative;
  padding-left: 22px;
  color: #c3d0dd;
  line-height: 1.45;
}

.marketing-compare li::before,
.marketing-check-list li::before,
.marketing-price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.14);
}

.marketing-compare__with li::before,
.marketing-check-list li::before {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.13);
}

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

.marketing-free {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px;
  background:
    linear-gradient(130deg, rgba(36, 76, 59, 0.78), rgba(11, 20, 30, 0.82) 58%, rgba(44, 32, 20, 0.72));
}

.marketing-free p {
  margin: 14px 0 0;
  color: #c5d4de;
  font-size: 17px;
  line-height: 1.55;
}

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

.marketing-feature,
.marketing-path article {
  background:
    linear-gradient(180deg, rgba(14, 28, 38, 0.82), rgba(10, 18, 28, 0.72));
}

.marketing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.marketing-price-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.marketing-price-card--accent {
  border-color: rgba(241, 196, 110, 0.3);
  background:
    linear-gradient(155deg, rgba(72, 53, 27, 0.8), rgba(11, 20, 30, 0.78));
}

.marketing-price-card__eyebrow {
  width: fit-content;
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(241, 196, 110, 0.14);
  color: #ffe7ad;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.marketing-price {
  display: block;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
}

.marketing-price--pending {
  font-size: 18px;
  line-height: 1.25;
}

.marketing-price-card p:not(.marketing-price-card__eyebrow),
.marketing-pricing-note {
  margin: 0;
  color: #b8c8d7;
  line-height: 1.5;
}

.marketing-price-card ul {
  margin: 0 0 4px;
}

.marketing-price-card .marketing-button {
  margin-top: auto;
}

.marketing-button--disabled,
.marketing-button--disabled:hover,
.marketing-button--disabled:focus-visible {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #aebdcc;
  cursor: default;
}

.marketing-pricing-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 3px solid rgba(241, 196, 110, 0.74);
  background: rgba(241, 196, 110, 0.08);
}

.marketing-game-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.7);
  color: #c3d0dd;
}

.marketing-game-links a {
  color: #ffe7ad;
  font-weight: 800;
  text-decoration: none;
}

.marketing-game-links a:hover,
.marketing-game-links a:focus-visible {
  color: #ffffff;
}

.marketing-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.marketing-contact p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #b8c8d7;
  font-size: 17px;
  line-height: 1.55;
}

.marketing-contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.marketing-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.marketing-faq-grid article {
  padding: 20px;
}

.marketing-faq-grid p {
  margin: 10px 0 0;
  color: #b8c8d7;
  line-height: 1.52;
}

.marketing-cta {
  align-items: center;
}

.marketing-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.marketing-legal-footer {
  width: min(1220px, calc(100% - 32px));
  margin: -18px auto 52px;
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #8ea0b2;
  font-size: 14px;
}

.marketing-legal-footer a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.marketing-legal-footer a:hover,
.marketing-legal-footer a:focus-visible {
  color: #ffe7ad;
}

/* Public changelog */
.guest-shell.changelog-shell {
  max-width: none;
  padding-bottom: 72px;
}

.guest-content.changelog-content {
  max-width: none;
}

.changelog-view {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 84px;
}

.changelog-header {
  max-width: 760px;
}

.changelog-header h1 {
  margin: 10px 0 0;
  color: #ffffff;
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: 0;
}

.changelog-header p:last-child {
  margin: 16px 0 0;
  color: #b8c8d7;
  font-size: 19px;
  line-height: 1.55;
}

.changelog-list {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 38, 48, 0.84), rgba(10, 18, 28, 0.76));
}

.changelog-entry time {
  color: #ffe7ad;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

.changelog-entry h2 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.changelog-entry ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.changelog-entry li {
  position: relative;
  padding-left: 22px;
  color: #c7d5e0;
  line-height: 1.5;
}

.changelog-entry li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.13);
}

/* Public legal pages */
.guest-shell.legal-shell {
  max-width: none;
  padding-bottom: 72px;
}

.guest-content.legal-content {
  max-width: none;
}

.legal-view {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 84px;
}

.legal-header {
  max-width: 760px;
}

.legal-header h1 {
  margin: 10px 0 0;
  color: #ffffff;
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: 0;
}

.legal-header p:last-child {
  margin: 16px 0 0;
  color: #b8c8d7;
  font-size: 18px;
  line-height: 1.55;
}

.legal-body {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.legal-body section {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 38, 48, 0.84), rgba(10, 18, 28, 0.76));
}

.legal-body h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.legal-body p {
  margin: 0;
  color: #c7d5e0;
  line-height: 1.62;
}

.legal-body p + p {
  margin-top: 12px;
}

.legal-body a {
  color: #ffe7ad;
}

@media (max-width: 980px) {
  .marketing-hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 72px 0 58px;
  }

  .marketing-dashboard {
    max-width: 680px;
  }

  .marketing-compare,
  .marketing-free,
  .marketing-pricing-grid,
  .marketing-faq-grid {
    grid-template-columns: 1fr;
  }

  .marketing-feature-grid,
  .marketing-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .marketing-hero__copy {
    padding: 0;
  }
}

@media (max-width: 700px) {
  .marketing-shell .guest-nav {
    align-items: stretch;
  }

  .marketing-shell .nav-links {
    justify-content: flex-start;
  }

  .marketing-hero h1 {
    font-size: 46px;
  }

  .marketing-hero__lead {
    font-size: 19px;
  }

  .marketing-feature-grid,
  .marketing-path,
  .marketing-game-strip {
    grid-template-columns: 1fr;
  }

  .marketing-game-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .marketing-contact {
    grid-template-columns: 1fr;
  }

  .marketing-contact__actions {
    justify-content: flex-start;
  }

  .changelog-entry {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .marketing-cta,
  .marketing-cta__actions {
    align-items: stretch;
  }

  .marketing-cta__actions {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .marketing-hero__inner,
  .marketing-section,
  .marketing-cta {
    width: min(100% - 24px, 1220px);
  }

  .marketing-hero__inner {
    padding: 58px 0 42px;
  }

  .marketing-hero h1 {
    font-size: 40px;
  }

  .marketing-section h2,
  .marketing-cta h2 {
    font-size: 28px;
  }

  .changelog-view {
    width: min(100% - 24px, 980px);
    padding: 46px 0 64px;
  }

  .changelog-header h1 {
    font-size: 38px;
  }

  .legal-view {
    width: min(100% - 24px, 920px);
    padding: 46px 0 64px;
  }

  .legal-header h1 {
    font-size: 36px;
  }

  .changelog-header p:last-child {
    font-size: 17px;
  }

  .legal-header p:last-child {
    font-size: 17px;
  }

  .marketing-dashboard,
  .marketing-free,
  .marketing-compare article,
  .marketing-price-card,
  .marketing-faq-grid article,
  .changelog-entry,
  .legal-body section {
    padding: 16px;
  }

  .marketing-dashboard__metrics {
    grid-template-columns: 1fr;
  }

  .marketing-dashboard__topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
