/* ═══════════════════════════════════════════════════════════════════
   LEMO AI — Design System 5.0  ·  "Ivory"

   One product, one surface. Lemo Studio was built on a warm ivory ground
   with a single muted gold accent and nothing else — no gradients, no
   glows, no coloured shadows, no second accent — and clicking from Studio
   into the dashboard used to feel like leaving the app for a different
   website: cold blue-white, vivid gold gradients, ice-blue secondary,
   glowing buttons. This file moves the whole site onto Studio's palette.

   The rules, in order of how often they get broken:

   1. ONE accent. Gold. Anything interactive is gold or it is neutral.
      The old ice-blue is gone; its tokens survive ONLY as warm-neutral
      aliases so pages that name them inline keep working.
   2. NO gradients. Not on buttons, not on text, not on the background,
      not as a 4px bar down the side of a stat tile.
   3. Depth comes from a 1px border, not a shadow. Shadows are for things
      that genuinely float above the page — a modal, a toast, a dropdown.
   4. Hover changes colour, never position. A card that jumps 3px when the
      pointer crosses it reads as a toy.

   Class names are unchanged from 4.0 on purpose: every view keeps working
   and the diff stays in one file.
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Surfaces — warm ivory, one shade off white. Straight from studio.css. */
  --bg: #fbfaf4;
  --card: #ffffff;
  --card-2: #fdfcf7;
  --line: #ebe6d6;
  --line-2: #ded7c2;

  /* Text */
  --text: #23201a;
  --ink: #2b2721;
  --muted: #6f6857;
  --faint: #a39c88;

  /* The one accent. --gold is the button fill, --gold-deep is the accent
     TEXT colour — the fill is far too light to read type on a white page. */
  --gold: #f5c518;
  --gold-hot: #e0ad00;
  --gold-deep: #8a6a12;
  --gold-soft: #fdf6dd;
  --gold-line: #edd9a0;
  --gold-ink: #2b2200;            /* text on a gold fill */

  /* Neutral interaction surfaces */
  --hover: #f2eee1;
  --active: #e9e3d0;

  /* Ice is retired. These are warm neutrals now, kept under the old names
     because a handful of pages name them in inline styles. Nothing on the
     site is blue any more. */
  --ice: #b6ae97;
  --ice-deep: #6f6857;
  --ice-soft: #f2efe4;
  --ice-line: #e2ddcb;
  --lime-soft: #f2efe4;
  --lime-line: #e2ddcb;

  /* States — desaturated to sit on ivory without shouting */
  --ok: #2f7d4f;
  --ok-soft: #eaf4ed;
  --ok-line: #bcdcc7;
  --bad: #b4342a;
  --bad-soft: #fbeceb;
  --bad-line: #f0c5c0;

  /* Shape */
  --r: 14px;
  --r-lg: 18px;
  /* Two shadows, both for things that float. Nothing that sits ON the page
     gets one — that is what --line is for. */
  --sh-1: 0 1px 2px rgba(43, 39, 33, .05);
  --sh-2: 0 18px 50px rgba(43, 39, 33, .16);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-disp: 'Space Grotesk', 'Inter', sans-serif;
  --f-mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;

  /* Legacy aliases — page JS still emits these names inline. */
  --border: var(--line);
  --border-strong: var(--line-2);
  --card-hover: var(--card-2);
  --accent: var(--gold-deep);
  --accent-dark: var(--gold-hot);
  --accent-soft: var(--gold-soft);
  --accent-border: var(--gold-line);
  --success: var(--ok);
  --success-bg: var(--ok-soft);
  --danger: var(--bad);
  --danger-bg: var(--bad-soft);
  --warning-bg: var(--gold-soft);
  --text-muted: var(--muted);
  /* Was a gradient used with background-clip:text. It is a flat colour now,
     and still resolves so the two pages that name it inline keep rendering —
     they just get solid gold text instead of a gradient. */
  --gold-text: var(--gold-deep);
  --gold-grad: var(--gold);
  --ice-grad: var(--ice-soft);
  --sh-gold: var(--sh-1);
}

/* ── Base ──────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The corner glows are gone. Three blurred radial gradients behind every
   page were the single biggest reason the site read as a 2021 landing page
   while Studio read as an app. One flat ground. */
::selection { background: var(--gold-soft); color: var(--text); }
h1, h2, h3 { font-family: var(--f-disp); letter-spacing: -.02em; }
a { color: var(--gold-deep); text-decoration: none; transition: color .15s; }
a:hover { color: #6b510a; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #ddd7c5; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #cbc4ad; }
::-webkit-scrollbar-track { background: transparent; }

.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.text-accent { color: var(--gold-deep); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .42s var(--ease) both; }
.reveal.d1 { animation-delay: .04s; } .reveal.d2 { animation-delay: .08s; }
.reveal.d3 { animation-delay: .12s; } .reveal.d4 { animation-delay: .16s; }
.reveal.d5 { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }

/* ── Eyebrow / section labels ──────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: var(--faint);
}
.eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--gold-line); }

/* ── Buttons ───────────────────────────────────────────────────────────
   Four shapes, and only one of them is coloured. The old set had a gold
   gradient, an ice gradient, a blueprint gradient and a Discord blurple all
   fighting on the same hero. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px;
  font-family: var(--f-body); font-size: .9rem; font-weight: 650;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.985); }
.btn:disabled { cursor: not-allowed; opacity: .45; }

/* The only filled button on the site. */
.btn-primary { background: var(--gold); border-color: var(--gold-hot); color: var(--gold-ink); }
.btn-primary:hover { background: #ecb800; color: var(--gold-ink); }

.btn-secondary { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover { background: var(--hover); border-color: #cfc7ae; color: var(--text); }

/* Studio's own button. It used to be a deep-blue gradient with a glow so it
   would match the gold gradient beside it; with no gradients left, matching
   means being the same quiet outline shape. It keeps its BETA pill, which is
   the only thing that needs to stand out. */
.btn-blueprint { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn-blueprint:hover { background: var(--hover); border-color: #cfc7ae; color: var(--text); }
.btn-blueprint .bp-beta {
  font-size: .58rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  background: var(--gold-soft); color: var(--gold-deep); border: 1px solid var(--gold-line);
  padding: 2px 6px; border-radius: 999px; margin-left: 2px;
}

/* Kept so pages that ask for it keep working; it is the secondary button. */
.btn-ice { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn-ice:hover { background: var(--hover); color: var(--text); }

.btn-danger { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.btn-danger:hover { background: #f7dedb; color: var(--bad); }

/* Discord's blurple is the one colour on the site that is not ours to
   restyle — it is a brand mark people scan for. It stays flat, no glow. */
.btn-discord { background: #5865f2; border-color: #4a56e0; color: #fff; }
.btn-discord:hover { background: #4752e8; color: #fff; }

.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--hover); }

.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: 13px 26px; font-size: .98rem; border-radius: 13px; }

/* ── Chips & badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .73rem; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent;
}
.badge.active, .badge.available { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge.inactive, .badge.revoked { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge.redeemed { background: var(--hover); color: var(--muted); border-color: var(--line-2); }
.badge.owner { background: var(--gold-soft); color: var(--gold-deep); border-color: var(--gold-line); }
.badge.coming-soon { background: var(--hover); color: var(--muted); border-color: var(--line-2); }

/* Icon chip. Every variant used to be a different colour — gold, ice, lime,
   red — which turned any page with four sections into a paint chart. They
   are one warm chip now; red survives because it means something. */
.ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; font-size: 1.1rem; flex-shrink: 0;
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-deep);
}
.ico svg { width: 19px; height: 19px; }
.ico.gold { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-deep); }
.ico.ice, .ico.lime { background: var(--ice-soft); border-color: var(--ice-line); color: var(--muted); }
.ico.red { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }

/* ── Lemo logo mark ────────────────────────────────────────────────── */
.brand-mark {
  width: 1.45em; height: 1.45em; object-fit: contain;
  flex-shrink: 0; vertical-align: -.32em;
}
.ico .brand-mark { width: 25px; height: 25px; vertical-align: 0; }
.su-fallback .brand-mark { width: 26px; height: 26px; vertical-align: 0; }
.foot-brand .brand-mark { vertical-align: -.3em; }

/* ── Flash / banners ───────────────────────────────────────────────── */
.flash {
  padding: 11px 15px; border-radius: 11px; font-size: .89rem; font-weight: 600;
  margin-bottom: 18px; border: 1px solid transparent; animation: rise .28s var(--ease) both;
}
.flash.success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.flash.error { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }

.plan-banner {
  padding: 12px 15px; border-radius: 11px; font-size: .89rem;
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--text);
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}

/* ── Forms ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label, .field-label {
  display: block; font-size: .79rem; font-weight: 650; color: var(--muted); margin-bottom: 6px;
}
input[type="text"], input[type="number"], input[type="password"], textarea, select {
  width: 100%; padding: 10px 13px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 11px;
  color: var(--text); font-family: var(--f-body); font-size: .92rem;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold-hot);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, .18);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 44px; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath d='M1 1l5 5 5-5' stroke='%236f6857' stroke-width='2' fill='none' stroke-linecap='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
/* iOS zooms into any field rendering under 16px and, on a form near the
   bottom of the page, often never zooms back out. Same rule Studio uses. */
@media (pointer: coarse) {
  input[type="text"], input[type="number"], input[type="password"], textarea, select { font-size: 16px; }
}

/* ── Switch ────────────────────────────────────────────────────────── */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #d9d3c0; border-radius: 25px; transition: background .2s var(--ease); }
.slider:before {
  content: ''; position: absolute; height: 19px; width: 19px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s var(--ease);
  box-shadow: 0 1px 3px rgba(43, 39, 33, .28);
}
.switch input:checked + .slider { background: var(--gold-hot); }
.switch input:checked + .slider:before { transform: translateX(19px); }
.switch input:disabled + .slider { opacity: .4; cursor: not-allowed; }

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: border-color .16s, background .16s;
}
.card.hoverable:hover { border-color: var(--line-2); }
.card-title {
  font-family: var(--f-disp); font-size: 1rem; font-weight: 700; margin-bottom: 15px;
  display: flex; align-items: center; gap: 10px;
}
/* The coloured top edge is one more accent for no information. Both variants
   are the same hairline now; the class names stay so views keep working. */
.card.edge-gold, .card.edge-ice { border-top: 1px solid var(--line); }

.sec-head { display: flex; gap: 12px; align-items: center; margin-bottom: 17px; }
.sec-head h2 { font-size: 1.05rem; }
.sec-head p { font-size: .83rem; color: var(--muted); }

/* ── Bento stat tiles ──────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px;
}
/* Was a 4px gradient bar down the left of every tile, in three colours that
   never meant anything. The number is the thing to look at. */
.stat-k { font-size: .71rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stat-v { font-family: var(--f-disp); font-size: 1.8rem; font-weight: 700; line-height: 1.2; margin-top: 3px; }
.stat-v.gold { color: var(--gold-deep); }
.stat-s { font-size: .78rem; color: var(--muted); margin-top: 2px; }

/* ── Public navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: rgba(251, 250, 244, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.navbar-brand {
  font-family: var(--f-disp); font-size: 1.12rem; font-weight: 700; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
.navbar-brand:hover { color: var(--text); }
.navbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.navbar-links { display: flex; gap: 2px; }
.navbar-links a {
  color: var(--muted); font-size: .88rem; font-weight: 600; padding: 7px 12px; border-radius: 9px;
}
.navbar-links a:hover { color: var(--text); background: var(--hover); }

/* The signed-in chip that replaces "Log in" (public/nav.js). Shaped like the
   sidebar's user row so the same person is represented the same way on both
   sides of the login. */
.nav-me {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 5px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff;
  color: var(--text); font-size: .86rem; font-weight: 650;
  max-width: 210px; transition: background .15s, border-color .15s;
}
.nav-me:hover { background: var(--hover); border-color: #cfc7ae; color: var(--text); }
.nav-me img, .nav-me-fallback {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.nav-me-fallback {
  display: grid; place-items: center;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  color: var(--gold-deep); font-size: .78rem; font-weight: 700;
}
.nav-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On a narrow screen the avatar alone says it — the name is what wraps. */
@media (max-width: 520px) { .nav-me-name { display: none; } .nav-me { padding: 4px; } }
@media (max-width: 720px) { .navbar-links { display: none; } }

/* ── App shell ─────────────────────────────────────────────────────────
   The sidebar is Studio's sidebar: the same #f5f2e6 ground, the same
   hairline, and an active row that is a quiet warm surface rather than a
   glowing gold pill. Clicking between the dashboard and Studio should not
   feel like changing product. */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 258px; flex-shrink: 0; display: flex; flex-direction: column;
  padding: 16px 12px; background: #f5f2e6; border-right: 1px solid #eae4d2;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  font-family: var(--f-disp); font-size: 1.12rem; font-weight: 700; color: var(--text);
  padding: 6px 10px 16px; display: flex; align-items: center; gap: 9px;
}
.sidebar-section { display: flex; flex-direction: column; gap: 1px; margin-bottom: 14px; }
.sidebar-label {
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .11em;
  color: var(--faint); padding: 8px 10px 5px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--muted); font-size: .875rem; font-weight: 550; transition: background .14s, color .14s;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--text); background: var(--hover); }
.nav-link.active { color: var(--ink); background: var(--active); font-weight: 650; }
/* Holds a drawn SVG, sized once here so every row lines up on the same left
   edge — the thing emoji could never do, since each one arrives at whatever
   size and baseline its platform feels like. */
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; display: inline-flex; }
.nav-ico svg { width: 18px; height: 18px; opacity: .85; }
.nav-link.active .nav-ico svg { opacity: 1; }

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid #eae4d2; display: flex; flex-direction: column; gap: 9px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.sidebar-user img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); }
.su-fallback {
  width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft);
  border: 1px solid var(--gold-line); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold-deep);
}
.su-name { font-weight: 650; font-size: .87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { font-size: .73rem; color: var(--muted); }

.view-switch {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px;
  background: #ece7d7; padding: 3px; border-radius: 10px;
}
.view-switch button {
  padding: 6px 4px; font-size: .71rem; font-weight: 650; border: none; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; font-family: var(--f-body);
  transition: background .14s, color .14s;
}
.view-switch button:hover { color: var(--text); }
.view-switch button.active { background: #fff; color: var(--ink); }

.main-area { flex: 1; padding: 30px 34px 64px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.5rem; margin: 2px 0 4px; }
.page-head .sub { color: var(--muted); font-size: .92rem; }

.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }
.hamburger { background: #fff; border: 1px solid var(--line-2); color: var(--text); font-size: 1.05rem; border-radius: 9px; padding: 6px 11px; cursor: pointer; }
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 300; transform: translateX(-100%); transition: transform .26s var(--ease); box-shadow: var(--sh-2); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(43, 39, 33, .32); z-index: 250; opacity: 0; pointer-events: none; transition: opacity .22s; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .mobile-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--f-disp); font-weight: 700; }
  .main-area { padding: 18px 16px 56px; }
}

/* context bar (server picker etc.) */
.ctx-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 15px; margin-bottom: 20px;
}
.ctx-bar .field-label { margin: 0; white-space: nowrap; }
.ctx-bar select { width: auto; min-width: 220px; flex: 1; max-width: 420px; }

/* sticky save bar — this one genuinely floats over the page, so it keeps a
   shadow. */
.savebar {
  position: sticky; bottom: 14px; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2); border-radius: 13px;
  padding: 10px 13px; box-shadow: var(--sh-2); margin-top: 22px;
}
.savebar .hint { font-size: .82rem; color: var(--muted); margin-left: auto; }

/* ── Pill tabs ─────────────────────────────────────────────────────── */
.tabs {
  display: inline-flex; gap: 3px; background: #ece7d7;
  padding: 3px; border-radius: 11px; flex-wrap: wrap;
}
.tab {
  padding: 7px 15px; cursor: pointer; color: var(--muted); font-size: .87rem; font-weight: 600;
  border-radius: 9px; transition: background .14s, color .14s; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--ink); background: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise .26s var(--ease) both; }

/* ── Tables ────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; background: #fff; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--faint); font-weight: 700; font-size: .69rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; background: var(--card-2); }
tbody tr:hover { background: var(--card-2); }
tbody tr:last-child td { border-bottom: none; }
.code-cell { font-family: var(--f-mono); font-weight: 650; color: var(--gold-deep); letter-spacing: .04em; }

/* ── KV / rows ─────────────────────────────────────────────────────── */
.kv-list { display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: .89rem; }
.kv-k { color: var(--muted); }
.kv-v { font-weight: 650; }

.lb-row { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 10px; }
.lb-row:hover { background: var(--hover); }
.lb-name { font-weight: 650; font-size: .89rem; }

.server-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 9px; background: #fff; transition: border-color .16s, background .16s;
}
.server-row:hover { border-color: var(--line-2); background: var(--card-2); }
.server-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.server-row-name { font-weight: 650; font-size: .93rem; }
.server-row-meta { font-size: .8rem; color: var(--muted); }

/* toggle cards */
.toggle-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 15px 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .16s;
}
.toggle-card:hover { border-color: var(--line-2); }
.toggle-card.danger-zone { border-color: var(--bad-line); background: #fffbfb; }
.cost-note {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--bad-soft); border: 1px solid var(--bad-line);
  font-size: .8rem; color: #8a2a22; line-height: 1.5;
}
.ss-locked { font-size: .78rem; color: var(--bad); font-weight: 650; }

.channel-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; font-size: .82rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: background .14s, border-color .14s, color .14s; user-select: none;
}
.ch-chip:hover { background: var(--hover); color: var(--text); }
.ch-chip input { accent-color: var(--gold-hot); cursor: pointer; }
.ch-chip:has(input:checked) { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-deep); }

/* credit hero block */
.credit-hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border-radius: var(--r-lg); padding: 20px 22px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
}
.credit-hero .cv {
  font-family: var(--f-disp); font-size: 2.3rem; font-weight: 700; line-height: 1;
  color: var(--gold-deep);
}
.credit-hero.is-out { background: var(--bad-soft); border-color: var(--bad-line); }
.credit-hero.is-out .cv { color: var(--bad); }
.credit-hero .cl { color: var(--muted); font-size: .87rem; flex: 1; min-width: 200px; }

/* status dot */
.status-indicator { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: .93rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.online { background: var(--ok); }
.status-dot.offline { background: var(--faint); }

/* ── Toast & modal ─────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 12px 18px; border-radius: 12px;
  font-size: .87rem; font-weight: 650; z-index: 999; opacity: 0; transform: translateY(10px);
  transition: opacity .26s var(--ease), transform .26s var(--ease); pointer-events: none;
  box-shadow: var(--sh-2); max-width: min(420px, 86vw);
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { background: #fff; border: 1px solid var(--ok-line); color: var(--ok); }
.toast.err { background: #fff; border: 1px solid var(--bad-line); color: var(--bad); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(43, 39, 33, .38);
  z-index: 400; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 22px;
  width: 390px; max-width: 95vw; display: flex; flex-direction: column; gap: 13px;
  animation: rise .24s var(--ease) both; box-shadow: var(--sh-2);
}
.modal h3 { font-size: 1.02rem; }
.modal label { font-size: .82rem; color: var(--muted); font-weight: 650; }
.modal-btns { display: flex; gap: 9px; justify-content: flex-end; margin-top: 2px; }

/* ── HOME: hero ────────────────────────────────────────────────────── */
.hero { position: relative; padding: 78px 24px 36px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  max-width: 1120px; margin: 0 auto;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.07; letter-spacing: -.03em; margin-bottom: 18px; }
/* Was gradient-clipped text. Solid gold reads better at every size and does
   not disappear when a browser declines background-clip. */
.hero h1 .grad { color: var(--gold-deep); }
.hero .lede { font-size: 1.06rem; color: var(--muted); max-width: 500px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }
.hero-link {
  display: inline-block; margin-top: 15px;
  font-size: .92rem; font-weight: 650; color: var(--gold-deep);
}
.hero-link:hover { color: #6b510a; }
.hero-points { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.hero-point { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.hero-point b { color: var(--ok); font-size: .98rem; }
@media (max-width: 640px) {
  /* 78px of sky above the headline is generous on a desktop and half a phone
     screen of nothing before the page says anything. */
  .hero { padding: 34px 24px 24px; }
  /* Two CTAs at their natural widths stack into a ragged left column. Full
     width is the shape every phone layout settles on. */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* chat mockup */
.chat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); overflow: hidden; max-width: 450px; margin-left: auto;
}
@media (max-width: 940px) { .chat { margin: 0 auto; } }
.chat-top {
  display: flex; align-items: center; gap: 8px; padding: 11px 15px;
  border-bottom: 1px solid var(--line); background: var(--card-2);
  font-size: .83rem; font-weight: 650; color: var(--muted);
}
.chat-top .dots { display: flex; gap: 5px; margin-right: 4px; }
.chat-top .dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.chat-body { padding: 15px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; animation: rise .5s var(--ease) both; }
.msg:nth-child(2) { animation-delay: .3s; }
.msg:nth-child(3) { animation-delay: .6s; }
.msg .av {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; color: #fff;
}
.msg .av.lemo-av {
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  overflow: hidden; padding: 2px;
}
.msg .av.lemo-av img { width: 100%; height: 100%; object-fit: contain; }
.msg .who { font-size: .79rem; font-weight: 700; margin-bottom: 2px; }
.msg .bubble {
  font-size: .855rem; color: var(--text); background: var(--card-2); border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 4px 13px 13px 13px; line-height: 1.45;
}
.msg.lemo .bubble { background: var(--gold-soft); border-color: var(--gold-line); }
.msg.lemo .who { color: var(--gold-deep); }
.msg.lemo .who .bot-tag {
  background: #5865f2; color: #fff; font-size: .58rem; font-weight: 800; letter-spacing: .04em;
  padding: 1.5px 5px; border-radius: 5px; vertical-align: 1px; margin-left: 5px;
}

/* ── HOME: bento features ──────────────────────────────────────────── */
.bento-feats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.bf {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; grid-column: span 2;
  transition: border-color .16s;
}
.bf:hover { border-color: var(--line-2); }
.bf.wide { grid-column: span 3; }
.bf h3 { font-size: 1.02rem; margin: 12px 0 6px; }
.bf p { color: var(--muted); font-size: .87rem; line-height: 1.55; }
/* The blurred corner glow is gone from every card. */
.bf .glow { display: none; }
@media (max-width: 940px) { .bf, .bf.wide { grid-column: span 3; } }
@media (max-width: 640px) { .bento-feats { grid-template-columns: 1fr; } .bf, .bf.wide { grid-column: span 1; } }

/* ── HOME: the Lemo Studio section ─────────────────────────────────────
   This was a two-column split with a CSS mock-up of the chat beside the copy.
   It is a real screenshot at full width now, for one reason: the mock-up had
   to be small to fit beside text, and small meant it could only show a plan
   card — which made Studio look like a Discord tool, which is exactly what it
   is not. A wide shot of the general chat answering a general question says
   that before anybody reads a word.

   The trade the mock-up avoided is real and accepted: a screenshot goes stale
   when the interface moves. Re-shoot it when Studio's chat changes. */
.studio-frame {
  max-width: 1000px; margin: 0 auto 40px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card-2); padding: 8px; overflow: hidden;
  box-shadow: var(--sh-1);
}
.studio-frame img {
  display: block; width: 100%; height: auto;
  border-radius: 12px; border: 1px solid var(--line);
}

.studio-points {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px;
  max-width: 1000px; margin: 0 auto 30px;
}
@media (max-width: 860px) { .studio-points { grid-template-columns: 1fr; gap: 22px; } }
.studio-points > div { display: flex; flex-direction: column; gap: 4px; }
.studio-points .ico { margin-bottom: 6px; }
.studio-points b { font-size: .95rem; }
.studio-points > div > span:last-child { color: var(--muted); font-size: .87rem; line-height: 1.6; }

.studio-cta {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap; font-size: .88rem;
}

/* The navbar is sticky, so an anchor jump parks the section's heading
   underneath it. This is the offset that fixes it, and it has to be on the
   section itself — the navbar cannot know what it is covering. */
.section[id] { scroll-margin-top: 72px; }
.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 38px; }
.section-title h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); font-weight: 700; margin: 8px 0 10px; letter-spacing: -.025em; }
.section-title p { color: var(--muted); font-size: .98rem; max-width: 560px; margin: 0 auto; }

/* pricing */
.pricing-grid { display: grid; gap: 16px; }
.pricing-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 24px; text-align: center;
  transition: border-color .16s;
  display: flex; flex-direction: column; gap: 8px; position: relative;
}
.pricing-card:hover { border-color: var(--line-2); }
.pricing-card.featured { border-color: var(--gold-line); background: #fffdf6; }
.pricing-card.featured::before {
  content: 'MOST POPULAR'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--gold-ink); font-size: .65rem; font-weight: 800; letter-spacing: .07em;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.pricing-card h3 { font-size: 1.08rem; }
.pricing-price { font-family: var(--f-disp); font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.pricing-price small { font-size: 1rem; color: var(--faint); font-weight: 600; }
.pricing-credits { font-size: 1.2rem; font-weight: 700; color: var(--gold-deep); }
.pricing-desc { color: var(--muted); font-size: .86rem; flex: 1; }

/* auth / redeem / error */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 40px 34px; text-align: center;
  animation: rise .4s var(--ease) both;
}
.auth-emoji { font-size: 2.8rem; display: block; margin-bottom: 16px; }
.auth-mark { width: 76px; height: 76px; object-fit: contain; display: block; margin: 0 auto 16px; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 8px; }
.auth-card > p { color: var(--muted); font-size: .91rem; margin-bottom: 24px; }
.auth-fine-print { color: var(--faint); font-size: .78rem; margin-top: 18px; }

.code-input {
  text-align: center; font-family: var(--f-mono);
  font-size: 1.45rem !important; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  padding: 14px !important; color: var(--gold-deep) !important;
}

.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.error-page h1 {
  font-size: clamp(4.5rem, 13vw, 7rem); font-weight: 700; line-height: 1;
  color: var(--gold-deep); margin-bottom: 10px;
}
.error-page p { color: var(--muted); margin-bottom: 24px; font-size: 1rem; }

/* cmd list */
.commands-layout, .admin-layout {
  max-width: 900px; margin: 0 auto; padding: 40px 24px 72px;
  display: flex; flex-direction: column; gap: 18px;
}
.cmd-group-title {
  font-family: var(--f-disp); font-size: .96rem; font-weight: 700; margin-bottom: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cmd-list { display: flex; flex-direction: column; }
.cmd-row { display: flex; gap: 18px; padding: 9px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.cmd-row:last-child { border-bottom: none; }
.cmd-name {
  font-family: var(--f-mono); font-size: .83rem;
  color: var(--gold-deep); font-weight: 650; flex-shrink: 0; min-width: 190px;
}
.cmd-desc { color: var(--muted); font-size: .87rem; }
@media (max-width: 620px) { .cmd-row { flex-direction: column; gap: 3px; } .cmd-name { min-width: 0; } }
code.inline {
  background: var(--gold-soft); color: var(--gold-deep); padding: 1px 6px; border-radius: 5px;
  font-size: .84em; font-family: var(--f-mono); font-weight: 600;
}

.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.feat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 17px; display: flex; flex-direction: column; gap: 5px;
  transition: border-color .16s;
}
.feat:hover { border-color: var(--line-2); }
.feat b { font-size: .93rem; }
.feat span { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.feat code { background: var(--gold-soft); color: var(--gold-deep); padding: 1px 6px; border-radius: 5px; font-size: .82em; font-weight: 600; }

footer {
  border-top: 1px solid var(--line); padding: 34px 24px; text-align: center;
  color: var(--faint); font-size: .84rem; background: var(--card-2);
}
footer .foot-brand { font-family: var(--f-disp); font-weight: 700; color: var(--muted); display: block; margin-bottom: 4px; }
footer .foot-links { display: flex; gap: 18px; justify-content: center; margin: 10px 0 14px; flex-wrap: wrap; }
footer .foot-links a { color: var(--muted); font-weight: 600; font-size: .85rem; }
footer .foot-links a:hover { color: var(--gold-deep); }

/* ── Sync servers row ──────────────────────────────────────────────── */
.sync-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 16px; border: 1px dashed var(--line-2); border-radius: var(--r);
  background: var(--card-2); color: var(--muted); font-size: .89rem;
}
.sync-row > span { flex: 1; min-width: 220px; }
.sync-row .btn { white-space: nowrap; }
.sync-ico { display: inline-block; font-weight: 700; }
.sync-ico.spin { animation: sync-spin .9s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) {
  .sync-row { flex-direction: column; align-items: stretch; text-align: center; }
  .sync-row .btn { width: 100%; }
}
