:root {
  color-scheme: dark;

  --bg: #121212;
  --panel: #181818;
  --raise: #1d1d1d;
  --well: #101010;
  --field: #202020;
  --line: #2a2a2a;
  --line-strong: #3a3a3a;

  --ink: #ededed;
  --muted: #9a9a9a;
  --dim: #6f6f6f;

  --gold: #ffffff;
  --gold-hover: #e4e4e4;
  --gold-ink: #121212;

  --ok: #5fa97f;
  --warn: #c9a227;

  --radius: 6px;
  --radius-sm: 4px;

  --sans: 'Archivo Variable', 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: var(--sans);

  --gutter: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
}

h3 {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: #3a3a3a;
  color: #fff;
}

/* ---------- primitives ---------- */

.shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

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

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

.quob-logo-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  user-select: none;
  flex: none;
}

.quob-logo-slot:hover {
  color: #fff;
}

.quob-logo-slot__img,
.quob-logo-slot img {
  height: 26px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.quob-logo-slot__text {
  display: none;
}

.quob-logo-slot.is-missing img {
  display: none;
}

.quob-logo-slot.is-missing .quob-logo-slot__text {
  display: inline;
}

.quob-logo-slot--md {
  font-size: 12px;
}

.quob-logo-slot--md img {
  height: 34px;
}

.quob-logo-slot--sm img {
  height: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

.btn--primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--gold-ink);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--line-strong);
  background: var(--panel);
  color: #fff;
}

.btn--quiet {
  color: var(--muted);
  padding: 0 10px;
}

.btn--quiet:hover {
  color: var(--ink);
  background: var(--raise);
}

.btn--danger {
  border-color: var(--line-strong);
  color: var(--muted);
}

.btn--danger:hover {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--ink);
}

.btn--discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}

.btn--discord:hover {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}

.btn--discord svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn--discord.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.verify {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.verify__status {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  text-align: center;
}

.verify__status[hidden] {
  display: none;
}

.verify__status svg {
  width: 14px;
  height: 14px;
}

.btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-busy='true'] {
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  background: var(--raise);
  border-color: var(--line);
  color: var(--ink);
}

.icon-btn--danger:hover {
  color: var(--muted);
  border-color: var(--line-strong);
  background: var(--panel);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- navigation ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-right: auto;
  font-size: 13px;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- landing ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 84px var(--gutter) 76px;
  border-bottom: 1px solid var(--line);
}

.hero__copy {
  max-width: 640px;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.hero__brand .mono {
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero__mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.4rem);
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.hero__lede {
  margin-top: 26px;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.section {
  padding: 68px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 40px;
}

.section__head p {
  max-width: 46ch;
  color: var(--muted);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
}

.index-row {
  display: grid;
  grid-template-columns: 20px 118px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.index-row:last-child {
  border-bottom: 1px solid var(--line);
}

.index-row svg {
  width: 14px;
  height: 14px;
  color: var(--dim);
  align-self: center;
}

.index-row dt {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

.index-row dd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.step {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step__number {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.step h3 {
  margin-top: 14px;
  font-size: 1.15rem;
}

.step p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 34ch;
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin: 76px 0;
  padding: 36px 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cta h2 {
  max-width: 22ch;
}

.cta p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 48ch;
}

.cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cta__domain {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.site-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.site-foot__links {
  display: flex;
  gap: 18px;
}

.site-foot__links a:hover {
  color: var(--ink);
}

/* ---------- auth ---------- */

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 20px;
}

.auth__panel {
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
}

.auth__panel .quob-logo-slot {
  align-self: flex-start;
  margin-bottom: 40px;
}

.auth__panel h1 {
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.auth__sub {
  margin-top: 12px;
  color: var(--muted);
  max-width: 36ch;
}

.form {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span:first-child {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  height: 42px;
  padding: 0 12px;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.field textarea {
  height: auto;
  padding: 10px 12px;
  min-height: 84px;
  resize: vertical;
}

.field input::placeholder {
  color: var(--dim);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 1px;
}

.field__hint {
  font-size: 12.5px;
  color: var(--muted);
}

.form__error {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
}

.form__error[hidden] {
  display: none;
}

.auth__foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.auth__foot a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.auth__foot a:hover {
  border-color: var(--gold);
}

.auth__foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 22px;
}

.auth__foot-row .auth__foot {
  margin-top: 0;
}

.auth__links {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

.user-settings {
  max-width: 1120px;
}

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

.settings-grid .panel + .panel {
  margin-top: 0;
}

.settings-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.settings-note + .settings-note {
  margin-top: 4px;
}

.settings-note strong {
  color: var(--ink);
  font-weight: 500;
}

.settings-actions {
  margin-top: 16px;
}

.settings-form {
  margin-top: 0;
}

.auth__links a:hover {
  color: var(--ink);
}

/* ---------- app chrome ---------- */

.app-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 57px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-bar__divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  flex: none;
}

.app-bar__title {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

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

.app-bar__project {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-bar__project h1 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 32vw;
}

.app-bar__project .pill {
  flex: none;
}

.account {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.account__name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- dashboard ---------- */

.dash {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.panel + .panel {
  margin-top: 16px;
}

.panel__title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--dim);
  margin-bottom: 14px;
}

.kv {
  display: grid;
  gap: 10px;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.kv dt {
  font-size: 12.5px;
  color: var(--muted);
}

.kv dd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.dash__main {
  min-width: 0;
}

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

.section-bar h1 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section-bar__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  margin-left: 10px;
}

.project-list {
  display: grid;
  gap: 8px;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.project-row:hover {
  border-color: var(--line-strong);
}

.project-row__main {
  min-width: 0;
}

.project-row__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row__name svg {
  width: 14px;
  height: 14px;
  color: var(--dim);
  flex: none;
}

.project-row__meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
}

.project-row__meta span {
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.project-row__meta span:last-child {
  border-right: 0;
  padding-right: 0;
}

.project-row__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-row__actions .btn {
  height: 30px;
  font-size: 12px;
  padding: 0 10px;
}

.empty {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 34px 24px;
  background: var(--panel);
}

.empty h2 {
  font-size: 1.05rem;
}

.empty p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 46ch;
}

.console-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.console-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.console-panel__title {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.console-panel__head .icon-btn,
.console-panel__head .btn {
  margin-left: auto;
}

.console-panel__head .btn + .icon-btn {
  margin-left: 0;
}

.console {
  margin: 0;
  padding: 12px 14px;
  height: 232px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #000 #0b0b0b;
  background: var(--well);
  border: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.72;
  color: #c9c9c9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.console::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.console::-webkit-scrollbar-track {
  background: #0b0b0b;
}

.console::-webkit-scrollbar-thumb {
  border: 1px solid #333;
  border-radius: 999px;
  background: #000;
}

.log-line {
  display: block;
}

.log-line time {
  color: var(--dim);
  margin-right: 10px;
}

.log-line[data-stream='err'] {
  color: #c9c9c9;
}

.log-line[data-stream='sys'] {
  color: var(--dim);
}

/* ---------- builder ---------- */

.builder {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 372px;
  height: calc(100vh - 58px);
}

.palette {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #141414;
}

.palette__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 8px 9px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  flex: none;
}

.palette__scroll {
  overflow-y: auto;
  padding: 12px 10px 28px;
}

.pal-group + .pal-group {
  margin-top: 16px;
}

.pal-group__title {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 6px 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.pal-group__title svg {
  width: 12px;
  height: 12px;
}

.pal-group__items {
  display: grid;
  gap: 3px;
}

.pal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px 6px 11px;
  border: 1px solid #282828;
  border-radius: var(--radius-sm);
  background: #171717;
  color: var(--ink);
  font-size: 12.5px;
  text-align: left;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.pal-item:hover {
  background: #1d1d1d;
  border-color: var(--line-strong);
}

.pal-item:active {
  cursor: grabbing;
}

.pal-item__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pal-item__kind {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  flex: none;
}

.canvas-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
}

.canvas-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.canvas-bar .mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.canvas-bar .mode-btn img {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
}

.canvas-bar .mode-btn.is-active {
  background: #262626;
  border-color: var(--line-strong);
  color: var(--ink);
}

.palette-toggle {
  display: none;
}

.canvas {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #151515;
}

.canvas__events {
  display: grid;
  gap: 16px;
  align-content: start;
  max-width: 720px;
  margin: 0 auto;
}

.canvas__events--empty {
  align-content: center;
  min-height: 60vh;
}

.canvas-add-event {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 720px;
  margin: 14px auto 0;
  padding: 15px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.canvas-add-event:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.canvas-add-event svg {
  width: 17px;
  height: 17px;
}

.event {
  border: 1px solid #2b2b2b;
  border-radius: var(--radius-sm);
  background: #171717;
  overflow: hidden;
}

.event__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 13px;
  border-bottom: 1px solid #262626;
  background: #1c1c1c;
}

.event__title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.event__remove {
  margin-left: auto;
}

.event__body {
  padding: 10px 10px 11px 12px;
}

.stack {
  min-width: 0;
}

.stack:empty {
  min-height: 2px;
}

.block {
  border: 1px solid #2b2b2b;
  border-radius: var(--radius-sm);
  background: #1b1b1b;
}

.block + .block {
  margin-top: 6px;
}

.block__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  min-height: 34px;
}

.block__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.block__trail {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.block__tools {
  display: flex;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
}

.block:hover > .block__row .block__tools,
.block:focus-within > .block__row .block__tools {
  opacity: 1;
}

.block__body {
  margin: 0 0 8px 14px;
  padding: 6px 0 0 10px;
  border-left: 1px solid var(--line);
}

.block__else {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.block__label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}

.mini svg {
  width: 12px;
  height: 12px;
}

.mini:hover {
  color: var(--ink);
  border-color: var(--line);
  background: #242424;
}

.mini--danger:hover {
  color: var(--muted);
  border-color: var(--line-strong);
}

.stack__add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}

.stack__add:hover {
  color: var(--ink);
  border-color: var(--blk);
}

.stack__add svg {
  width: 15px;
  height: 15px;
}

.vblock {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 5px 2px 8px;
  border: 1px solid #303030;
  border-radius: var(--radius-sm);
  background: #121212;
  font-size: 12px;
  line-height: 1.4;
}

.vblock__title {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

.slot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.slot--empty {
  padding: 2px 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.slot--empty:hover {
  color: var(--ink);
  border-color: var(--gold);
}

.slot__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.slot__x:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #262626;
}

.blk-field {
  height: 26px;
  max-width: 190px;
  padding: 3px 6px;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  background: var(--field);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}

.blk-field:focus {
  border-color: var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 0;
}

.blk-field--mono {
  font-family: var(--mono);
}

.blk-fieldwrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blk-fieldwrap--items {
  flex-wrap: wrap;
}

.blk-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.blk-affix {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.is-drop {
  outline: 1px dashed var(--gold) !important;
  outline-offset: 2px;
  background-color: #1f1b12 !important;
}

.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 6px 10px;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-sm);
  background: var(--raise);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  pointer-events: none;
}

body.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.canvas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 44px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
}

.canvas-empty svg {
  width: 26px;
  height: 26px;
  color: var(--dim);
}

.canvas-empty h2 {
  font-size: 15px;
}

.canvas-empty p {
  max-width: 34ch;
  color: var(--muted);
  font-size: 12.5px;
}

.canvas-empty .btn {
  margin-top: 6px;
}

.editor-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--bg);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.tab {
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.tabs__spacer {
  margin-left: auto;
}

.editor-side__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pane[hidden] {
  display: none;
}

.pane__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.pane__bar--console {
  justify-content: flex-end;
  padding: 5px 8px;
}

.pane__bar .btn {
  margin-left: auto;
}

.code-view {
  min-height: 0;
  border-top: 0;
  font-size: 12.5px;
}

.editor-console,
.code-preview {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  background: var(--well);
  border: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: #c9c9c9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.problems {
  max-height: 40%;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex: none;
}

.problems__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.problems__head svg {
  width: 14px;
  height: 14px;
}

.problems__head .icon-btn {
  margin-left: auto;
}

.problems ul {
  padding: 10px 12px;
}

.problems li {
  padding: 3px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.palette-backdrop {
  display: none;
}

/* ---------- dialogs, picker, toasts ---------- */

dialog {
  width: min(92vw, 430px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog__head h2 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.dialog__body {
  padding: 18px;
}

.dialog__body p {
  color: var(--muted);
  font-size: 13px;
}

.dialog__body .form {
  margin-top: 0;
}

.dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.dialog--wide {
  width: min(94vw, 680px);
}

.picker-dialog__body {
  display: grid;
  gap: 14px;
}

.picker {
  display: grid;
  gap: 14px;
  max-height: 46vh;
  overflow: auto;
}

.picker__group h3 {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--dim);
}

.picker__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #282828;
  border-radius: var(--radius-sm);
  background: #171717;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.picker__item + .picker__item {
  margin-top: 3px;
}

.picker__item small {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.picker__item:hover {
  background: #202020;
  border-color: var(--line-strong);
}

.picker__empty {
  color: var(--muted);
  font-size: 12px;
}

.problem-list {
  margin-top: 12px;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.problem-list li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.problem-list svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--dim);
}

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 12.5px;
  color: var(--ink);
  animation: toast-in 140ms ease-out;
}

.toast[data-kind='error'] {
  border-left-color: var(--line-strong);
}

.toast svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--muted);
  flex: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- legal ---------- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.legal__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.legal__meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.legal h2 {
  margin-top: 34px;
  font-size: 1.1rem;
}

.legal p,
.legal li {
  margin-top: 10px;
  max-width: 66ch;
  color: #c2c2c2;
  font-size: 15px;
  line-height: 1.7;
}

.legal ul {
  list-style: disc;
  padding-left: 20px;
}

.legal__back {
  display: flex;
  gap: 10px;
  margin-top: 40px;
}

/* ---------- not found ---------- */

.notice-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: 48px;
  max-width: 620px;
  margin: 0 auto;
}

.notice-page p {
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .builder {
    grid-template-columns: 200px minmax(0, 1fr) 320px;
  }

  .app-bar {
    gap: 11px;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding: 56px var(--gutter) 52px;
  }

  .section {
    padding: 52px var(--gutter);
  }

  .section__head {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

}

@media (max-width: 900px) {
  .builder {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    height: auto;
  }

  .palette {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(84vw, 310px);
    border-right: 1px solid var(--line-strong);
    transform: translateX(-102%);
    transition: transform 160ms ease;
  }

  .palette.is-open {
    transform: none;
  }

  .palette__head {
    height: 57px;
    padding-left: 18px;
  }

  .palette-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    background: rgba(0, 0, 0, 0.62);
  }

  .palette-toggle {
    display: inline-flex;
  }

  .canvas-wrap {
    min-height: 58vh;
  }

  .canvas-bar {
    display: flex;
  }

  .canvas {
    padding: 14px;
  }

  .editor-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .editor-console,
  .code-preview {
    flex: none;
    height: 240px;
  }

  .pane {
    min-height: 0;
  }

  .hero__lede {
    font-size: 1.06rem;
  }

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

  .cta {
    grid-template-columns: minmax(0, 1fr);
    padding: 26px;
    margin: 56px 0;
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .dash {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 14px 48px;
  }

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

  .panel + .panel {
    margin-top: 0;
  }

  .auth {
    min-height: 100vh;
    padding: 32px 20px;
  }
}

@media (max-width: 720px) {
  .app-bar {
    flex-wrap: wrap;
    height: auto;
    min-height: 57px;
    gap: 8px;
    padding: 8px 12px;
    overflow: visible;
  }

  .app-bar__title {
    display: none;
  }

  .app-bar__right {
    width: 100%;
    margin-left: 0;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-bar__project {
    min-width: 0;
    flex: 1;
  }

  .app-bar__project h1 {
    max-width: 40vw;
  }

  .app-bar__divider {
    display: none;
  }

  .builder {
    min-height: calc(100vh - 110px);
  }

  .account__name {
    display: none;
  }

  .project-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }

  .project-row__status {
    justify-self: end;
  }

  .project-row__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

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

  .site-foot__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 44px var(--gutter) 40px;
  }

  .hero__mark {
    width: 26px;
    height: 26px;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }

  .index-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .index-row dd {
    grid-column: 2;
  }

  .cta__actions .btn {
    flex: 1 1 auto;
  }

  .canvas__events {
    gap: 12px;
  }

  .block__tools {
    opacity: 1;
  }

  .blk-field {
    max-width: 132px;
  }

  .toasts {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- hosting panel ---------- */

.host {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 22px var(--gutter) 40px;
  min-height: calc(100vh - 58px);
}

.host__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.host__identity h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.host__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.host__env {
  font-size: 13px;
  color: var(--muted);
}

.host__renew {
  font-size: 13px;
  color: var(--muted);
}

.host__renew[data-warn='true'] {
  color: var(--ink);
}

.host__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.host__actions .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.host__spacer {
  margin-left: auto;
}

.host-note,
.host-entry {
  font-size: 12.5px;
  color: var(--muted);
}

.host-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.host-entry select {
  height: 32px;
  min-width: 140px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
}

.empty--host {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 48px 24px;
}

.server {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.tabs--host {
  height: 46px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}

.tab.is-active,
.tab[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.host-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.host-pane[hidden] {
  display: none;
}

.host-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.host-bar--wrap {
  flex-wrap: wrap;
}

.host-metric {
  font-size: 12.5px;
  color: var(--muted);
}

.console--host {
  flex: 1;
  min-height: 320px;
  max-height: 62vh;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  background: var(--well);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.files {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 420px;
  flex: 1;
}

.files__tree {
  overflow: auto;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  background: #141414;
}

.files__tree .tree-folder summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.files__tree .tree-folder summary svg {
  width: 14px;
  height: 14px;
}

.tree-file {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.tree-file svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.tree-file:hover {
  background: #1e1e1e;
}

.tree-file.is-active {
  background: #262626;
}

.tree-empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 13px;
}

.files__editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.files__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.files__editor textarea {
  flex: 1;
  min-height: 320px;
  padding: 14px;
  border: 0;
  background: var(--well);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  resize: none;
  white-space: pre;
}

.files__editor textarea:disabled {
  color: var(--dim);
}

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

.settings .panel {
  padding: 16px;
}

.panel--wide {
  grid-column: 1 / -1;
}

.panel__note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.panel--danger {
  border-color: var(--line-strong);
}

.dep-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.dep-form .field {
  flex: 1 1 180px;
}

.dep-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.dep-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-sm);
  background: var(--field);
  font-size: 13px;
}

.dep-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dep-version {
  color: var(--muted);
}

.dep-remove {
  flex: none;
  padding: 2px 8px;
  font-size: 12px;
}

.stack-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.stack-form .field {
  flex: 1 1 220px;
}

@media (max-width: 900px) {
  .files {
    grid-template-columns: minmax(0, 1fr);
  }

  .files__tree {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .host {
    padding: 16px;
  }
}

@media (max-width: 900px) {
  .app-bar {
    flex-wrap: nowrap;
    height: 58px;
    padding: 0 14px;
    gap: 12px;
  }

  .quob-logo-slot__text {
    display: inline;
  }

  .app-bar__title {
    display: inline;
  }

  .account {
    border-left: 0;
    padding-left: 0;
  }
}

/* ---------- server list + big tabs ---------- */

.panel__title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.kv dt {
  font-size: 14px;
}

.kv dd {
  font-family: var(--sans);
  font-size: 14px;
}

.panel__note {
  font-size: 14px;
}

.host__count {
  font-size: 14px;
  color: var(--muted);
}

.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.server-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.server-card:hover {
  border-color: var(--line-strong);
}

.server-card.is-active {
  border-color: #4a4a4a;
  background: #1d1d1d;
}

.server-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.server-card__name {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card__meta {
  font-size: 13px;
  color: var(--muted);
}

.server-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.server-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.server-head__env {
  font-size: 14px;
  color: var(--muted);
}

.server-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.server-tab {
  flex: 1;
  height: 52px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.server-tab:hover {
  color: var(--ink);
  background: #1e1e1e;
}

.server-tab.is-active {
  background: #262626;
  border-color: var(--line-strong);
  color: var(--ink);
}

.server-panel {
  display: flex;
  flex-direction: column;
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.server-panel .host-pane {
  flex: 1;
}

.host {
  gap: 14px;
}

.dep-row {
  font-size: 14px;
}

/* ---------- servers list + server page ---------- */

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

.server-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #242424;
  border-radius: var(--radius);
  background: #151515;
  color: var(--ink);
  text-decoration: none;
}

.server-row:hover,
.server-row:focus-visible {
  background: #0b0b0b;
  border-color: #303030;
}

.server-row .pill {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
}

.server-row__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
}

.server-row__meta {
  font-size: 14px;
  color: var(--muted);
}

.server-row__open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
}

.server-row:hover .server-row__open {
  color: var(--ink);
}

.server-row__open svg {
  width: 15px;
  height: 15px;
}

.srv {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}

.srv-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.srv-head h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.srv-tabs {
  display: flex;
  gap: 6px;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #151515;
}

.srv-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.srv-tab svg {
  width: 16px;
  height: 16px;
}

.srv-tab:hover {
  background: #1d1d1d;
  color: var(--ink);
}

.srv-tab.is-active {
  background: #262626;
  border-color: #3a3a3a;
  color: var(--ink);
}

.srv-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #151515;
  overflow: hidden;
}

.srv-frame[hidden] {
  display: none;
}

.srv-console {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.srv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #171717;
  flex: none;
}

.srv-bar--wrap {
  flex-wrap: wrap;
}

.srv-env {
  font-size: 13px;
  color: var(--muted);
}

.usage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  flex: none;
}

.usage__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #262626;
  border-radius: var(--radius-sm);
  background: #121212;
}

.usage__label {
  font-size: 12.5px;
  color: var(--muted);
}

.usage__value {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#usage-uptime-days {
  font-size: 27px;
  line-height: 1.15;
}

.usage__bar {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: #262626;
  overflow: hidden;
}

.usage__bar i {
  display: block;
  width: 0;
  height: 100%;
  background: #e6e6e6;
  transition: width 220ms ease;
}

.usage__note {
  font-size: 12px;
  color: var(--dim);
}

.srv-console .console--host {
  border: 0;
  border-top: 1px solid var(--line);
  flex: 1 1 auto;
  min-height: 232px;
  max-height: min(520px, 60vh);
  overflow-y: auto;
}

.srv-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.srv-entry input {
  width: 160px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
}

.srv .files {
  min-height: 400px;
}

.srv .settings {
  padding: 14px;
}

@media (max-width: 700px) {
  .usage {
    grid-template-columns: minmax(0, 1fr);
  }

  .server-row {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .server-row__name {
    flex-basis: 100%;
  }

  .server-row__open {
    margin-left: auto;
  }
}

@media (min-width: 561px) and (max-width: 700px) {
  .usage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- files table + file view ---------- */

.files {
  display: block;
  min-height: 400px;
}

.files__list {
  overflow: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.file-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.file-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #222;
  vertical-align: middle;
}

.file-table tbody tr:hover td {
  background: #1a1a1a;
}

.file-table__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-table__name svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex: none;
}

.file-table__size {
  color: var(--muted);
  white-space: nowrap;
  width: 90px;
}

.file-table__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.files__view {
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.files__view[hidden] {
  display: none;
}

.srv-files.is-viewing .srv-bar {
  display: none;
}

.files__view .files__bar {
  border-bottom: 1px solid var(--line);
}

.files__view textarea {
  flex: 1;
  min-height: 380px;
  padding: 14px;
  border: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  resize: none;
  white-space: pre;
}

.usage--bottom {
  border-top: 1px solid var(--line);
}

.srv-entry--settings {
  margin-top: 14px;
}

.srv-entry--settings .btn {
  flex: none;
}

/* ---------- console polish + file badges ---------- */

.srv-label {
  font-size: 14px;
  color: var(--muted);
}

.console--host {
  font-size: 13.5px;
  line-height: 1.75;
}

.file-table__name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-table__name svg {
  width: 15px;
  height: 15px;
}

.file-table__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-icon {
  flex: none;
  display: inline-block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.file-icon--json,
.file-icon--yml,
.file-icon--yaml {
  color: #d9b37a;
}

.file-icon--env {
  color: #c9c96a;
}

.file-icon--md,
.file-icon--txt {
  color: #a8a8a8;
}

.file-icon--ts,
.file-icon--tsx {
  color: #6fa8dc;
}

.file-icon--sh {
  color: #9ecb8a;
}

.file-table td {
  height: 52px;
}

/* ---------- files breadcrumbs ---------- */

.files__crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.files__crumbs i {
  width: 15px;
  height: 15px;
  color: #b9a26b;
}

.crumb {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.crumb:hover {
  color: var(--ink);
}

.files__crumbs .crumb:last-of-type {
  color: var(--ink);
}

.crumb-sep {
  color: var(--dim);
}

.file-icon--folder {
  color: #b9a26b;
}

/* ---------- settings layout + autosave ---------- */

.settings .panel--danger {
  grid-column: 1 / -1;
}

.srv-entry--settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.srv-entry--settings span {
  min-width: 70px;
  font-size: 13px;
  color: var(--muted);
}

.srv-entry--settings input {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  max-width: none;
}

/* ---------- clickable file rows ---------- */

.file-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.file-link:hover .file-table__label {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-link .file-icon {
  width: 17px;
  height: 17px;
}

/* ---------- file context menu ---------- */

.file-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #202020;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.file-menu[hidden] {
  display: none;
}

.file-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.file-menu button:hover {
  background: #2d2d2d;
}

.file-menu button[data-danger] {
  color: #e39a9a;
}

.file-menu button[data-danger]:hover {
  background: #352222;
}

.file-menu svg {
  width: 14px;
  height: 14px;
  color: currentColor;
}

.archive-banner {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #4a3838;
  border-radius: var(--radius-sm);
  background: #241b1b;
  color: #e3b4b4;
  font-size: 13px;
}

.pill[data-status='archived'] {
  color: #e3b4b4;
  border-color: #4a3838;
  background: #241b1b;
}

/* ---------- admin ---------- */

.admin {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px var(--gutter) 64px;
}

.admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.admin-head h1 {
  font-size: 2.4rem;
}

.admin-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.admin-stat {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.admin-stat span {
  color: var(--muted);
  font-size: 12px;
}

.admin-stat strong {
  font-size: 1.5rem;
  font-weight: 600;
}

.admin-panel {
  overflow: hidden;
}

.admin-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.admin-panel__head .panel__title {
  margin: 0;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.admin-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #222;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover td {
  background: #1a1a1a;
}

.admin-name {
  color: var(--ink);
  font-weight: 500;
}

.admin-muted {
  color: var(--muted);
}

.admin-subline {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.admin-badge {
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.admin-actions-cell {
  text-align: right;
}

.admin-actions-cell .btn + .btn {
  margin-left: 5px;
}

.admin-danger {
  color: #e39a9a;
}

@media (max-width: 760px) {
  .admin-head {
    align-items: start;
    flex-direction: column;
  }

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