/* =========================================================
   ServerSmith — "The Forge" shared stylesheet
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;500;600;700;800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --iron-0: #0D0C0B;
  --iron-1: #16130F;
  --iron-2: #1D1914;
  --iron-3: #26211A;
  --iron-4: #322B22;
  --line: rgba(240, 214, 180, 0.08);
  --line-2: rgba(240, 214, 180, 0.14);
  --line-3: rgba(240, 214, 180, 0.24);

  --ember: #FF5A1F;
  --ember-deep: #D8400C;
  --ember-glow: rgba(255, 90, 31, 0.35);
  --hot: #FFB547;
  --brass: #B08D57;
  --brass-2: #D4B27A;
  --steel: #8A8F98;
  --steel-2: #B9BEC6;

  --text: #EEE6DA;
  --text-2: #C9BFB1;
  --muted: #8F8576;
  --dim: #645B4F;

  --ok: #6FCF8E;
  --warn: #FFB547;
  --bad: #FF5A5A;

  --blurple: #5865F2;

  --f-display: 'Unbounded', 'Bricolage Grotesque', ui-sans-serif, sans-serif;
  --f-body: 'Instrument Sans', ui-sans-serif, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;

  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--iron-0);
  color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ember); color: #160A04; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
code, kbd, .mono { font-family: var(--f-mono); font-size: 0.88em; }
code { background: var(--iron-3); padding: 0.1em 0.4em; border-radius: 4px; color: var(--hot); }

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.76rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden, [hidden] { display: none !important; }

.eyebrow {
  font: 500 0.72rem/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-2);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow--plain::before { display: none; }

/* ---------- Atmosphere: grain + blueprint grid ---------- */
.atmos { position: relative; isolation: isolate; }
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1000;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.blueprint {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(rgba(240, 214, 180, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 214, 180, 0.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(13, 12, 11, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.02rem/1 var(--f-display); letter-spacing: -0.02em; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--iron-3), var(--iron-1));
  border: 1px solid var(--line-2);
  color: var(--brass-2);
}
.brand__smith { color: var(--ember); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 0.93rem; transition: color .2s, background .2s; }
.nav a:hover, .nav a.is-active, .nav a[aria-current="page"] { color: var(--text); background: var(--iron-2); }
.head-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--iron-1); border-bottom: 1px solid var(--line); padding: 12px 24px 20px; margin: 0; }
  .nav.is-open { display: flex; }
  .nav-toggle { display: inline-grid; }
  .head-cta .btn--ghost { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--iron-3);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--text);
  font: 600 0.92rem/1 var(--f-body);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .25s, color .2s;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 0.84rem; border-radius: 8px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn--ghost:hover { border-color: var(--line-3); color: var(--text); background: var(--iron-2); }
.btn--steel { background: linear-gradient(180deg, #2E2923, #211D18); border-color: var(--line-2); }
.btn--steel:hover { border-color: var(--brass); }
.btn--danger { background: rgba(255, 90, 90, 0.12); color: #FF8A8A; border-color: rgba(255, 90, 90, 0.3); }
.btn--danger:hover { background: rgba(255, 90, 90, 0.2); }
.btn--discord { background: var(--blurple); color: #fff; }
.btn--discord:hover { background: #4752C4; }
.btn--ember {
  background: linear-gradient(180deg, #FF6B33 0%, var(--ember) 45%, var(--ember-deep) 100%);
  color: #1A0A03;
  border-color: rgba(255, 181, 71, 0.45);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset, 0 1px 0 rgba(255, 220, 160, .45) inset, 0 8px 24px -8px var(--ember-glow);
}
.btn--ember:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset, 0 1px 0 rgba(255, 220, 160, .5) inset, 0 10px 34px -6px rgba(255, 90, 31, .6), 0 0 0 4px rgba(255, 90, 31, .12); }
/* Ember sparks on key CTAs */
.btn--sparks { overflow: visible; }
.btn--sparks::before, .btn--sparks::after {
  content: ''; position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--hot); box-shadow: 0 0 6px 2px rgba(255, 181, 71, .7);
  opacity: 0; pointer-events: none;
}
.btn--sparks::before { left: 22%; top: 30%; }
.btn--sparks::after { right: 18%; top: 50%; background: var(--ember); }
.btn--sparks:hover::before { animation: spark 0.9s ease-out infinite; }
.btn--sparks:hover::after { animation: spark 1.1s 0.25s ease-out infinite; }
@keyframes spark {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx, 10px), -26px) scale(.3); }
}
.btn--sparks::after { --sx: -12px; }
.btn.is-busy { color: transparent !important; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: var(--hot);
  border-radius: 50%; animation: spin .7s linear infinite; opacity: 1; box-shadow: none; background: none;
}
.btn--ember.is-busy::after { border-color: rgba(0,0,0,.2); border-top-color: #1A0A03; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--iron-3); color: var(--text); }
.icon-btn--danger:hover { color: var(--bad); background: rgba(255, 90, 90, .1); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .label { font: 600 0.82rem/1.2 var(--f-body); color: var(--text-2); letter-spacing: 0.01em; }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  background: var(--iron-0);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 0.94rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.16); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238F8576' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select option, .select optgroup { background: var(--iron-1); color: var(--text); }
.input[type=color] { padding: 4px; height: 42px; cursor: pointer; }
.input[type=number] { font-family: var(--f-mono); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  position: relative; width: 40px; height: 22px; flex: none;
  border-radius: 999px; background: var(--iron-4); border: 1px solid var(--line-2);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--steel-2); transition: transform .22s var(--ease), background .2s;
}
.switch input:checked + .switch__track { background: var(--ember); border-color: var(--hot); box-shadow: 0 0 14px -2px var(--ember-glow); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: #1A0A03; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--hot); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .45; }
.switch__text { display: flex; flex-direction: column; gap: 2px; }
.switch__text strong { font-weight: 600; font-size: 0.93rem; }
.switch__text span { font-size: 0.8rem; color: var(--muted); }

/* Checkbox chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--iron-1);
  font-size: 0.85rem; color: var(--text-2); cursor: pointer;
  transition: all .18s;
}
.chip-check input:checked + span { border-color: var(--ember); color: var(--text); background: rgba(255, 90, 31, .1); }
.chip-check input:focus-visible + span { outline: 2px solid var(--hot); outline-offset: 2px; }

/* ---------- Surfaces ---------- */
.panel {
  background: linear-gradient(180deg, var(--iron-1), rgba(22, 19, 15, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel--pad { padding: 24px; }
.rivets { position: relative; }
.rivets::before, .rivets::after {
  content: ''; position: absolute; top: 10px; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--brass-2), #5a4526 70%);
  box-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.rivets::before { left: 10px; }
.rivets::after { right: 10px; }

.tier {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px;
  font: 600 0.66rem/1.3 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--steel-2); background: var(--iron-2);
}
.tier--starter { color: var(--brass-2); border-color: rgba(176, 141, 87, .45); }
.tier--pro { color: var(--ember); border-color: rgba(255, 90, 31, .45); background: rgba(255, 90, 31, .08); }
.tier--elite { color: #1A0A03; background: linear-gradient(90deg, var(--hot), var(--ember)); border-color: transparent; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
  background: var(--iron-3); color: var(--text-2);
}
.badge--ok { background: rgba(111, 207, 142, .12); color: var(--ok); }
.badge--warn { background: rgba(255, 181, 71, .12); color: var(--hot); }
.badge--bad { background: rgba(255, 90, 90, .12); color: #FF8A8A; }
.badge--ember { background: rgba(255, 90, 31, .14); color: var(--ember); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot--pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 2000; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 12px 12px 14px; border-radius: var(--r);
  background: var(--iron-2); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-size: 0.9rem;
  animation: toastIn .28s var(--ease);
}
.toast .ic { margin-top: 2px; }
.toast span { flex: 1; }
.toast--success .ic:first-child { color: var(--ok); }
.toast--error { border-color: rgba(255, 90, 90, .35); }
.toast--error .ic:first-child { color: var(--bad); }
.toast--info .ic:first-child { color: var(--hot); }
.toast__x { background: none; border: 0; color: var(--muted); padding: 2px; }
.toast.is-leaving { animation: toastOut .22s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(6, 5, 4, 0.72);
  backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn .18s ease;
}
.modal-backdrop.is-leaving { animation: fadeOut .18s forwards; }
.modal {
  width: min(520px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: var(--iron-1); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4);
  animation: modalIn .24s var(--ease);
}
.modal--wide { width: min(760px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 0; }
.modal__head .eyebrow { margin-bottom: 10px; }
.modal__title { font-size: 1.15rem; }
.modal__body { padding: 18px 22px; overflow: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 22px; border-top: 1px solid var(--line); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.upgrade-modal { display: grid; gap: 12px; }
.upgrade-modal__mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: var(--ember); background: rgba(255, 90, 31, .1); border: 1px solid rgba(255, 90, 31, .3); box-shadow: 0 0 30px -6px var(--ember-glow); }

/* ---------- Skeleton / empty ---------- */
.skel-block { display: grid; gap: 10px; }
.skel {
  height: 14px; border-radius: 6px;
  background: linear-gradient(90deg, var(--iron-2) 0%, var(--iron-3) 40%, var(--iron-2) 80%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skel--box { height: auto; min-height: 120px; border-radius: var(--r-lg); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 44px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty__icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--iron-2); color: var(--brass-2); border: 1px solid var(--line); }
.empty h4 { font-size: 1rem; }
.empty p { max-width: 42ch; font-size: 0.9rem; }
.empty .btn { margin-top: 6px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font: 600 0.7rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: var(--iron-1); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255,255,255,.015); }

/* ---------- Plan cards ---------- */
.plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1180px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px 20px 20px;
  background: var(--iron-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .25s var(--ease), border-color .25s;
}
.plan:hover { transform: translateY(-3px); border-color: var(--line-3); }
.plan--hot {
  background: radial-gradient(120% 70% at 50% 0%, rgba(255, 90, 31, .16), transparent 60%), var(--iron-1);
  border-color: rgba(255, 90, 31, .55);
  box-shadow: 0 0 0 1px rgba(255, 90, 31, .2), 0 30px 60px -30px rgba(255, 90, 31, .45);
}
.plan--current { border-color: var(--brass); }
.plan--current::after { content: 'Current plan'; position: absolute; top: -10px; right: 16px; font: 600 0.66rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: var(--brass); color: #1A1206; padding: 5px 8px; border-radius: 4px; }
.plan--custom { background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(240, 214, 180, .025) 12px 13px), var(--iron-1); border-style: dashed; border-color: var(--line-3); }
.plan__flag { position: absolute; top: -11px; left: 18px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 5px; font: 600 0.66rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: var(--ember); color: #1A0A03; }
.plan__name { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.plan__price { display: flex; align-items: baseline; gap: 2px; margin: 10px 0 8px; }
.plan__cur { font: 500 1.1rem var(--f-display); color: var(--muted); }
.plan__amt { font: 700 2.4rem/1 var(--f-display); letter-spacing: -0.04em; }
.plan__amt--word { font-size: 1.6rem; line-height: 1.15; }
.plan__per { color: var(--muted); font-size: 0.86rem; margin-left: 3px; }
.plan--hot .plan__amt { color: var(--hot); }
.plan__tag { font-size: 0.84rem; color: var(--muted); min-height: 3.6em; }
.plan__limits { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.plan__limits div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 0.8rem; }
.plan__limits dt { color: var(--muted); }
.plan__limits dd { margin: 0; font-family: var(--f-mono); color: var(--text); }
.plan__feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.86rem; color: var(--text-2); flex: 1; }
.plan__feats li { display: flex; gap: 8px; align-items: flex-start; }
.plan__feats .ic { color: var(--ember); margin-top: 3px; }
.plan--custom .plan__feats .ic { color: var(--brass-2); }
.plan__cta { margin-top: auto; }

/* ---------- Discord sidebar tree (shared by landing demo & builder) ---------- */
.dtree {
  font: 500 0.88rem/1.25 var(--f-body);
  color: #949BA4;
  background: #2B2D31;
  border-radius: 12px;
  overflow: hidden;
}
.dtree__head { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 16px; color: #F2F3F5; font-weight: 700; box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 2px 0 rgba(0,0,0,.05); }
.dtree__body { padding: 10px 8px 14px; }
.dcat { margin-top: 14px; }
.dcat:first-child { margin-top: 2px; }
.dcat__name { display: flex; align-items: center; gap: 3px; padding: 0 6px 4px 2px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #949BA4; }
.dcat__name .ic { width: 12px; height: 12px; }
.dch { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; margin: 1px 0 1px 8px; border-radius: 5px; color: #949BA4; }
.dch:hover { background: rgba(78, 80, 88, .3); color: #DBDEE1; }
.dch .ic { color: #80848E; width: 19px; height: 19px; }
.dch__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dch__lock { width: 12px !important; height: 12px !important; opacity: .8; }
.dch--active { background: rgba(78, 80, 88, .6); color: #F2F3F5; }
.dch--voice-users { height: auto; }

.role-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  background: var(--iron-2); border: 1px solid var(--line-2);
  font-size: 0.82rem; color: var(--text-2);
}
.role-chip__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); box-shadow: 0 0 0 2px rgba(0,0,0,.25); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 120px; padding: 56px 0 40px; color: var(--muted); font-size: 0.9rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot-grid h5 { font: 600 0.72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.foot-grid a:hover { color: var(--text); }
.foot-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; font-family: var(--f-mono); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Marketing chrome: Beta banner, legal footer, mobile nav,
   "coming soon" plans. (Marketing pages use <body class="mkt">.)
   ========================================================= */
.beta-bar {
  position: relative; z-index: 60;
  background: linear-gradient(90deg, rgba(255, 90, 31, .16), rgba(255, 181, 71, .1) 60%, rgba(255, 90, 31, .08)), var(--iron-1);
  border-bottom: 1px solid rgba(255, 181, 71, .25);
  color: var(--text-2);
  font-size: 0.84rem; line-height: 1.45;
}
.beta-bar__inner { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; }
.beta-bar__text { flex: 1; min-width: 0; }
.beta-bar__x {
  flex: none; display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; border-radius: 8px; color: var(--muted);
}
.beta-bar__x:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.foot-legal {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 36px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--iron-1);
  font-size: 0.82rem; line-height: 1.55; color: var(--muted);
  overflow-wrap: anywhere;
}
.foot-legal > .ic { color: var(--brass-2); margin-top: 3px; }
.foot-legal--top { margin-top: 0; }
.foot-legal a { color: var(--hot); }

.nav__mobile { display: none; }
@media (max-width: 860px) {
  .nav .nav__mobile { display: block; }
  .nav a { padding: 12px; min-height: 44px; display: flex; align-items: center; font-size: 1rem; }
}

.plan__soon {
  display: flex; width: fit-content; align-items: center; gap: 6px;
  margin-bottom: 12px; padding: 5px 9px; border-radius: 5px;
  font: 600 0.64rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--hot); background: rgba(255, 181, 71, .1); border: 1px dashed rgba(255, 181, 71, .45);
}
.plan--soon .btn:disabled { opacity: .7; }

/* Marketing: phones and touch screens */
@media (max-width: 860px), (pointer: coarse) {
  .mkt .btn { min-height: 44px; }
  .mkt .btn--sm { height: 44px; padding: 0 14px; }
  .mkt .icon-btn { width: 44px; height: 44px; }
  .mkt .brand { min-height: 44px; }
  .mkt .chip-check span { min-height: 44px; }
  .mkt .site-foot ul a, .mkt .foot-base a { display: inline-flex; align-items: center; min-height: 44px; }
  .mkt .foot-grid ul { gap: 0; }
  .mkt .input, .mkt .select { min-height: 44px; }
}
@media (max-width: 520px) {
  .mkt .wrap { width: calc(100% - 32px); }
  .mkt .site-head .wrap { gap: 10px; }
  .mkt .head-cta { gap: 6px; }
  .mkt .head-cta__invite span { display: none; }
  .mkt .head-cta__invite { width: 44px; padding: 0; }
  .mkt .brand { font-size: 0.95rem; }
  .mkt .site-foot { margin-top: 80px; }
}
@media (max-width: 520px) {
  .beta-bar { font-size: 0.78rem; line-height: 1.4; }
}
/* Hamburger only below the nav breakpoint (.icon-btn's display rule otherwise wins) */
.site-head .nav-toggle { display: none; }
@media (max-width: 860px) { .site-head .nav-toggle { display: inline-grid; } }

/* ---------- Join a server box (landing + dashboard) ---------- */
.join-box { display: flex; gap: 10px; }
.join-box__field { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; }
.join-box__field > .ic { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.join-box__field .input { width: 100%; padding-left: 42px; }
.join-box__hint { margin-top: 10px; }
.join-out { display: grid; gap: 10px; margin-top: 14px; }
.join-out:empty { display: none; }
.join-hit { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--iron-2); border: 1px solid var(--line-2); animation: rise .35s var(--ease) both; }
.join-hit__icon { width: 48px; height: 48px; border-radius: 14px; flex: none; object-fit: cover; display: grid; place-items: center; background: var(--iron-3); font-weight: 700; color: var(--text-2); }
.join-hit__id { flex: 1; min-width: 0; display: grid; gap: 3px; }
.join-hit__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.join-hit__meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.join-hit__meta .ic { vertical-align: -2px; }
.join-hit__on { display: inline-flex; align-items: center; gap: 5px; }
.join-hit__on i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.join-miss { display: flex; align-items: center; gap: 8px; color: var(--text-2); padding: 12px 14px; border-radius: var(--r); background: var(--iron-2); border: 1px dashed var(--line-2); }
@media (max-width: 560px) { .join-box { flex-direction: column; } .join-hit { flex-wrap: wrap; } .join-hit .btn { width: 100%; justify-content: center; } }
