/* Mark Defender dashboard. Graphite console, one signal accent. */

:root {
  color-scheme: dark;

  --bg: #0c0d0b;
  --surface: #131411;
  --surface-2: #1a1b17;
  --surface-3: #22241f;
  --line: #2a2c26;
  --line-soft: #1f211c;

  --text: #ecede6;
  --text-2: #b5b7ab;
  --text-3: #929487;

  --signal: #c4ec5a;
  --signal-ink: #141a04;
  --signal-soft: rgba(196, 236, 90, 0.1);
  --danger: #f0585c;
  --danger-soft: rgba(240, 88, 92, 0.1);
  --warn: #e8b54d;
  --warn-soft: rgba(232, 181, 77, 0.1);

  --font: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;

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

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-hover: ease;
  --z-nav: 20;
  --z-toast: 40;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Fine grain so the dark surface does not read as flat vector */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--signal-ink); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--signal);
  color: var(--signal-ink);
  border-radius: var(--r-sm);
  z-index: var(--z-toast);
}
.skip-link:focus { top: 12px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.hidden { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 24px; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(12, 13, 11, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; color: var(--signal); flex: none; }

.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.nav-links a { transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--text); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.user-chip img { width: 26px; height: 26px; border-radius: 8px; }

.demo-strip {
  background: var(--warn-soft);
  border-bottom: 1px solid rgba(232, 181, 77, 0.25);
  color: var(--warn);
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-signal { background: var(--signal); color: var(--signal-ink); }
.btn-signal:hover { background: #d3f57a; }

.btn-quiet { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-quiet:hover { background: var(--surface-3); }

.btn-danger { background: var(--danger-soft); border-color: rgba(240, 88, 92, 0.35); color: var(--danger); }
.btn-danger:hover { background: rgba(240, 88, 92, 0.18); }

.btn-text { height: auto; padding: 0; color: var(--text-2); }
.btn-text:hover { color: var(--text); }

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

/* ---------- Landing ---------- */

.hero { padding: 88px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 22px;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--signal); }

.hero h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--signal); }

.hero-lead { margin-top: 22px; max-width: 34em; font-size: 17px; color: var(--text-2); text-wrap: pretty; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }

.shot-label { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-bottom: 10px; }

/* Replica of the Components V2 log card the bot posts */
.discord-card {
  background: #1e1f1c;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(196, 236, 90, 0.03);
}
.dc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dc-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  display: grid; place-items: center;
  color: var(--signal);
  overflow: hidden;
  flex: none;
}
.dc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc-name { font-weight: 600; font-size: 15px; }
.dc-tag {
  font-size: 11px; font-weight: 600;
  background: #5865f2; color: #fff;
  border-radius: 4px; padding: 1px 5px; margin-left: 6px;
  vertical-align: 2px;
}
.dc-time { font-size: 12px; color: var(--text-3); margin-left: 6px; }

.dc-container {
  background: #262723;
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.dc-title { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.dc-sep { height: 1px; background: #3a3c36; }
.dc-text { font-size: 14px; color: #d6d8cf; }
.dc-text ul { padding-left: 18px; margin-top: 6px; }
.dc-mention { background: rgba(88, 101, 242, 0.25); color: #c9cdfb; border-radius: 3px; padding: 0 3px; }
.dc-foot { font-size: 12px; color: var(--text-3); }
.dc-buttons { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dc-btn { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 4px; background: #4e5058; color: #fff; }
.dc-btn.red { background: #da373c; }
.dc-btn.green { background: #248046; }

/* Live numbers strip */
.stats { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line-soft); }
.stat-label { font-size: 13px; color: var(--text-3); }
.stat-value { font-family: var(--mono); font-size: 30px; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Sections */
.section { padding: 104px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 16px; max-width: 36em; }

/* Threat meter */
.meter-board { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.weights { display: grid; gap: 2px; }
.weight {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.2s var(--ease);
  text-align: left;
  border: 0;
  width: 100%;
}
.weight:hover { background: var(--surface-2); }
.weight .pts { font-family: var(--mono); color: var(--signal); }

.meter { background: var(--surface); border-radius: var(--r-lg); padding: 26px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.meter-score { font-family: var(--mono); font-size: 44px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.meter-score small { font-size: 18px; color: var(--text-3); }
.meter-cells { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.meter-cell { height: 40px; border-radius: 4px; background: var(--surface-3); transition: background 0.25s var(--ease); }
.meter-cell.on { background: var(--warn); }
.meter.tripped .meter-cell.on { background: var(--danger); }
.meter-log { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--text-2); min-height: 66px; display: grid; gap: 4px; }
.meter-status { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); }
.meter.tripped .meter-status { background: var(--danger-soft); color: var(--danger); }

/* Capabilities: asymmetric, no card boxes */
.caps { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0 64px; }
.cap { padding: 26px 0; border-top: 1px solid var(--line-soft); }
.cap-lead { grid-row: span 4; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.cap h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.cap-lead h3 { font-size: 26px; letter-spacing: -0.02em; }
.cap p { color: var(--text-2); margin-top: 8px; max-width: 34em; }
.flag { font-family: var(--mono); font-size: 11px; color: var(--signal); border: 1px solid rgba(196, 236, 90, 0.3); border-radius: 3px; padding: 1px 6px; font-weight: 400; }

.timeline { margin-top: 26px; display: grid; gap: 0; font-family: var(--mono); font-size: 13px; }
.tl-row { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tl-row span:first-child { color: var(--text-3); }

/* Pricing */
.billing { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; margin-bottom: 28px; }
.billing button { border: 0; background: transparent; padding: 6px 14px; border-radius: 4px; font-size: 13px; color: var(--text-2); cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.billing button[aria-pressed='true'] { background: var(--surface-3); color: var(--text); }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan { background: var(--surface); border-radius: var(--r-lg); padding: 30px; display: flex; flex-direction: column; border: 1px solid var(--line-soft); }
.plan.premium { border-color: rgba(196, 236, 90, 0.35); background: linear-gradient(180deg, rgba(196, 236, 90, 0.06), var(--surface) 45%); }
.plan-name { font-size: 15px; font-weight: 500; color: var(--text-2); }
.plan-price { margin-top: 10px; font-size: 42px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 15px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.plan ul { list-style: none; margin: 24px 0 30px; display: grid; gap: 10px; color: var(--text-2); }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 1px; background: var(--text-3); }
.plan.premium li::before { background: var(--signal); }
.plan .btn { margin-top: auto; }

.footer { margin-top: auto; border-top: 1px solid var(--line-soft); padding: 26px 0; font-size: 13px; color: var(--text-3); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* ---------- App views ---------- */

.page { padding-block: 48px 80px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 32px; letter-spacing: -0.03em; font-weight: 600; line-height: 1.1; }
.page-head p { color: var(--text-2); margin-top: 6px; }

.input, .select {
  height: 38px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: border-color 0.2s var(--ease);
  width: 100%;
}
.input:hover, .select:hover { border-color: #3a3d34; }
.input:focus, .select:focus { outline: none; border-color: var(--signal); }
.input::placeholder { color: var(--text-3); }
.input.mono { font-size: 13px; }
.input[aria-invalid='true'] { border-color: var(--danger); }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .error { font-size: 12px; color: var(--danger); }

/* Server list */
.server-list { display: grid; gap: 2px; border-radius: var(--r-md); overflow: hidden; }
.server-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  transition: background 0.2s var(--ease);
}
.server-row:hover { background: var(--surface-2); }
.server-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; font-weight: 600; color: var(--text-2); overflow: hidden; }
.server-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-name { font-weight: 500; }
.server-meta { font-size: 13px; color: var(--text-3); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--mono); color: var(--text-3); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.status.on { color: var(--signal); }
.status.on::before { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.status.alert { color: var(--danger); }
.status.alert::before { background: var(--danger); }

.empty { padding: 56px 24px; text-align: center; background: var(--surface); border-radius: var(--r-md); color: var(--text-2); }
.empty h2, .empty h3 { color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* Workspace */
.ws-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ws-head .server-icon { width: 52px; height: 52px; border-radius: 14px; }
.ws-title { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.ws-sub { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.tier { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 3px; background: var(--surface-3); color: var(--text-2); }
.tier.premium { background: var(--signal-soft); color: var(--signal); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; cursor: pointer;
  padding: 10px 12px 12px;
  font-size: 14px; color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected='true'] { color: var(--text); border-bottom-color: var(--signal); }

.panel-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.box { background: var(--surface); border-radius: var(--r-md); padding: 22px; }
.box + .box { margin-top: 16px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.box-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.box-desc { color: var(--text-2); font-size: 14px; margin: -8px 0 18px; max-width: 46em; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; border-radius: var(--r-md); overflow: hidden; margin-bottom: 16px; }
.tile { background: var(--surface); padding: 18px 20px; }
.tile-label { font-size: 12px; color: var(--text-3); }
.tile-value { font-family: var(--mono); font-size: 24px; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.feed { font-family: var(--mono); font-size: 12.5px; display: grid; gap: 0; max-height: 340px; overflow-y: auto; }
.feed-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.feed-row .t { color: var(--text-3); }
.feed-row .s { color: var(--warn); }
.feed-row.hot .s { color: var(--danger); }
.feed-empty { color: var(--text-3); font-size: 13px; padding: 18px 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 160px; }
.save-state { font-family: var(--mono); font-size: 12px; color: var(--text-3); min-height: 18px; }
.save-state.ok { color: var(--signal); }
.save-state.err { color: var(--danger); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.switch:first-child { border-top: 0; padding-top: 0; }
.switch strong { font-weight: 500; display: block; }
.switch span { font-size: 13px; color: var(--text-3); }
.toggle { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; transition: background 0.2s var(--ease); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform 0.2s var(--ease), background 0.2s var(--ease); }
.toggle:checked { background: var(--signal); }
.toggle:checked::after { transform: translateX(16px); background: var(--signal-ink); }

.range { width: 100%; accent-color: var(--signal); }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .mono { font-size: 12.5px; }
.table-wrap { overflow-x: auto; position: relative; }
.chip { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 3px; background: var(--surface-3); color: var(--text-2); }
.pts-hot { color: var(--danger); font-family: var(--mono); }

.lock-box { border: 1px solid rgba(240, 88, 92, 0.25); background: linear-gradient(180deg, var(--danger-soft), var(--surface) 60%); }
.lock-box.engaged { border-color: var(--danger); }

.premium-lock { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-sm); background: var(--signal-soft); color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.premium-lock strong { color: var(--signal); display: block; font-weight: 600; }

.color-input { display: flex; gap: 8px; }
.color-input input[type='color'] { width: 42px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 3px; cursor: pointer; }

.code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--text); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  opacity: 0;
  z-index: var(--z-toast);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(240, 88, 92, 0.5); color: var(--danger); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-md); height: 74px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Motion ---------- */

/* Hero entrance (first paint, marketing) */
.rise { animation: rise 0.7s var(--ease) both; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.discord-card.rise { animation-name: card-in; animation-duration: 0.8s; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }

/* Alert lines arrive in sequence, like the bot posting them */
.dc-container > * { animation: rise 0.5s var(--ease) both; }
.dc-container > :nth-child(1) { animation-delay: 0.45s; }
.dc-container > :nth-child(2) { animation-delay: 0.5s; }
.dc-container > :nth-child(3) { animation-delay: 0.58s; }
.dc-container > :nth-child(4) { animation-delay: 0.7s; }
.dc-container > :nth-child(n + 5) { animation-delay: 0.78s; }
.dc-buttons { animation: rise 0.5s var(--ease) 0.9s both; }
#panel-branding .dc-container > * { animation: none; }
#pv-container { transition: border-color 0.2s var(--ease-hover); }

/* Scroll reveal: JS adds .in once; without JS everything stays visible */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Meter feedback */
.meter-cell { transform: scaleY(0.82); transition: background 0.2s var(--ease-hover), transform 0.32s var(--ease); }
.meter-cell.on { transform: none; }
.meter-score span { display: inline-block; transition: transform 0.16s var(--ease); }
.meter-score span.bump { transform: scale(1.12); }
.meter.tripped { animation: trip 0.42s var(--ease-in-out); }
@keyframes trip { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
.meter-log span { animation: line-in 0.28s var(--ease) both; }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } }
.weight:active { transform: scale(0.985); }
.weight { transition: background 0.2s var(--ease-hover), transform 0.12s var(--ease); }

/* Tabs: one indicator slides between tabs */
.tabs { position: relative; }
.tab[aria-selected='true'] { border-bottom-color: transparent; }
.tab-indicator { position: absolute; left: 0; bottom: -1px; height: 2px; width: 1px; background: var(--signal); transform-origin: left; transition: transform 0.28s var(--ease); pointer-events: none; }
.tab-panel { animation: panel-in 0.22s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* Live data */
.feed-row.new { animation: row-in 0.3s var(--ease) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(-8px); } }
.feed-row.hot.new { animation: row-in 0.3s var(--ease) both, row-flash 1.2s var(--ease) both; }
@keyframes row-flash { from { background: var(--danger-soft); } to { background: transparent; } }
.server-row, .faq-item { transition: background 0.2s var(--ease-hover), transform 0.2s var(--ease); }
.status.on::before { animation: pulse 2.4s var(--ease-in-out) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(196, 236, 90, 0); } }

@media (hover: hover) and (pointer: fine) {
  .btn-signal:hover { transform: translateY(-1px); }
  .plan:hover { transform: translateY(-2px); }
  .plan { transition: transform 0.25s var(--ease), border-color 0.2s var(--ease-hover); }
}

/* Reduced motion: keep fades that explain state, drop movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .discord-card.rise, .dc-container > *, .dc-buttons, .tab-panel, .feed-row.new, .meter-log span { animation-name: fade; }
  .meter.tripped, .status.on::before { animation: none; }
  .js .reveal { transform: none; }
  .meter-cell, .meter-cell.on, .meter-score span.bump { transform: none; }
  .tab-indicator { transition: none; }
  .btn-signal:hover, .plan:hover, .btn:active, .weight:active { transform: none; }
  .skeleton { animation: none; }
}
@keyframes fade { from { opacity: 0; } }

/* FAQ: side-by-side list instead of an accordion */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; border-radius: var(--r-lg); overflow: hidden; }
.faq-item { background: var(--surface); padding: 26px 28px; }
.faq-item h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.faq-item p { color: var(--text-2); margin-top: 8px; font-size: 14.5px; max-width: 40em; }
.faq-item a, .premium-lock a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.faq-item.wide { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: linear-gradient(90deg, var(--signal-soft), var(--surface) 70%); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid, .meter-board, .caps, .panel-grid { grid-template-columns: 1fr; }
  .cap-lead { grid-row: auto; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }
}

@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .plans, .form-grid, .faq { grid-template-columns: 1fr; }
  .js .reveal { transition-delay: 0s; }
  .server-row { grid-template-columns: 40px 1fr; row-gap: 10px; }
  .server-row > :nth-child(3) { grid-column: 2; }
  .server-row > :nth-child(4) { grid-column: 1 / -1; }
  .server-row > :nth-child(4) .btn { width: 100%; }
  .feed-row { grid-template-columns: 60px 1fr; }
  .feed-row .s { grid-column: 2; }
  .btn-hide-sm { display: none; }
}

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; padding-block: 56px 96px; flex: 1; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.03em; font-weight: 600; line-height: 1.08; margin-bottom: 18px; }
.legal h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 40px 0 12px; }
.legal h3 { font-size: 15px; font-weight: 600; margin: 22px 0 8px; color: var(--text); }
.legal p, .legal li { color: var(--text-2); max-width: 65ch; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; }
.legal li::marker { color: var(--signal); }
.legal strong { color: var(--text); font-weight: 500; }
.legal a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.legal-meta { font-family: var(--mono); font-size: 12px; color: var(--text-3) !important; margin-bottom: 14px; }
.legal-lead { font-size: 18px; color: var(--text) !important; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* Currency switch sits next to the billing switch */
.price-switches { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.price-switches .billing { margin-bottom: 0; }

/* Premium page */
.lic-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.lic-actions .select { width: auto; min-width: 180px; height: 32px; font-size: 13px; }
.chip.active { background: var(--signal-soft); color: var(--signal); }
.chip.expired, .chip.revoked { background: var(--danger-soft); color: var(--danger); }
.buy-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(90deg, var(--signal-soft), var(--surface) 70%); }
.buy-box p { color: var(--text-2); margin-top: 4px; max-width: 46em; }
.plan-note { margin-top: 12px; font-size: 13px; color: var(--text-3); }
#lic-body td { white-space: nowrap; }

/* ---------- Comparison tables ---------- */
.cmp-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cmp thead th { font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface-2); position: sticky; top: 0; }
.cmp thead th.us { color: var(--signal); }
.cmp tbody th { font-weight: 500; color: var(--text); width: 34%; }
.cmp tbody th small { display: block; font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.cmp td { color: var(--text-2); }
.cmp td.us { background: rgba(196, 236, 90, 0.035); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp-group th { font-family: var(--mono); font-size: 11px !important; letter-spacing: 0.06em; color: var(--text-3) !important; background: var(--bg); padding-top: 18px; }
.yes, .no, .paid, .maybe { display: inline-flex; align-items: flex-start; gap: 7px; }
.yes::before, .no::before, .paid::before, .maybe::before { content: ''; width: 8px; height: 8px; border-radius: 2px; flex: none; margin-top: 7px; }
.yes { color: var(--text); } .yes::before { background: var(--signal); }
.paid { color: var(--text); } .paid::before { background: var(--warn); }
.no { color: var(--text-3); } .no::before { background: var(--surface-3); }
.maybe { color: var(--text-3); } .maybe::before { border: 1px dashed var(--text-3); width: 6px; height: 6px; }
.cmp-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; margin: 14px 0 0; }
.cmp-note { font-size: 13px; color: var(--text-3); margin-top: 14px; max-width: 70ch; }
.cmp-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Content pages (trust, learn, policies) ---------- */
.doc { padding-block: 56px 96px; flex: 1; }
.doc-head { max-width: 760px; margin-bottom: 44px; }
.doc-head h1 { font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.035em; font-weight: 600; line-height: 1.04; text-wrap: balance; }
.doc-head p { color: var(--text-2); font-size: 17px; margin-top: 14px; max-width: 60ch; }

.doc-grid { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 84px; display: grid; gap: 2px; font-size: 14px; }
.toc a { padding: 6px 10px; border-radius: 4px; color: var(--text-3); transition: color 0.2s var(--ease-hover), background 0.2s var(--ease-hover); }
.toc a:hover { color: var(--text); background: var(--surface); }
.toc a.on { color: var(--text); background: var(--surface); box-shadow: inset 2px 0 0 var(--signal); }
.toc-label { font-family: var(--mono); font-size: 11px; color: var(--text-3); padding: 0 10px 8px; letter-spacing: 0.06em; }

.doc-body { max-width: 760px; }
.doc-body section { scroll-margin-top: 84px; padding-bottom: 12px; }
.doc-body h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 600; margin: 8px 0 14px; }
.doc-body h3 { font-size: 16px; font-weight: 600; margin: 26px 0 8px; }
.doc-body p, .doc-body li { color: var(--text-2); max-width: 68ch; }
.doc-body p + p { margin-top: 12px; }
.doc-body ul, .doc-body ol { padding-left: 22px; display: grid; gap: 8px; margin: 10px 0; }
.doc-body li::marker { color: var(--signal); }
.doc-body strong { color: var(--text); font-weight: 500; }
.doc-body a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.doc-body section + section { border-top: 1px solid var(--line-soft); padding-top: 36px; margin-top: 28px; }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; gap: 14px !important; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.steps li::before { content: counter(step); font-family: var(--mono); font-size: 12px; width: 26px; height: 26px; border-radius: 6px; background: var(--surface-2); color: var(--signal); display: grid; place-items: center; }
.callout { background: var(--signal-soft); border: 1px solid rgba(196, 236, 90, 0.18); border-radius: var(--r-sm); padding: 14px 16px; margin: 16px 0; color: var(--text-2); font-size: 14.5px; }
.callout.warn { background: var(--warn-soft); border-color: rgba(232, 181, 77, 0.25); }
.cmd { font-family: var(--mono); font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; margin: 10px 0; color: var(--text); overflow-x: auto; white-space: pre; }

/* Trust page */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 56px; }
.trust-item { background: var(--surface); padding: 24px; }
.trust-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: flex; gap: 10px; align-items: center; }
.trust-item p { font-size: 14px; color: var(--text-2); }
.trust-item .tag { font-family: var(--mono); font-size: 11px; color: var(--signal); }
.data-table td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }

/* Bigger footer */
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 40px 28px; }
.footer-cols h4 { font-size: 12px; font-family: var(--mono); color: var(--text-3); font-weight: 400; letter-spacing: 0.06em; margin-bottom: 12px; }
.footer-cols nav { display: grid; gap: 8px; font-size: 14px; }
.footer-cols nav a { color: var(--text-2); transition: color 0.2s var(--ease-hover); }
.footer-cols nav a:hover { color: var(--text); }
.footer-cols p { font-size: 13px; color: var(--text-3); max-width: 30ch; margin-top: 10px; }
.footer-base { border-top: 1px solid var(--line-soft); padding-block: 18px; font-size: 12.5px; color: var(--text-3); }

@media (max-width: 960px) {
  .doc-grid { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; grid-auto-flow: column; overflow-x: auto; grid-auto-columns: max-content; }
  .toc-label { display: none; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: var(--z-toast);
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}
.cookie-banner.show { opacity: 1; transform: none; }
.cookie-banner p { flex: 1 1 280px; font-size: 13.5px; color: var(--text-2); }
.cookie-banner a, .cookie-note a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-dialog {
  margin: auto; width: min(480px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
}
.cookie-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.cookie-dialog[open] { animation: panel-in 0.2s var(--ease) both; }
.cookie-dialog h2 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.cookie-note { font-size: 13px; color: var(--text-3); margin: 12px 0 18px; }
.cookie-dialog .cookie-actions { justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transform: none; } .cookie-dialog[open] { animation-name: fade; } }

/* ---------- Status page ---------- */
#overall[data-state='ok'] { color: var(--text); }
#overall[data-state='down'] { color: var(--danger); }
.status-list { display: grid; gap: 2px; border-radius: var(--r-lg); overflow: hidden; }
.status-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; padding: 18px 22px; background: var(--surface); }
.status-row strong { display: block; font-weight: 500; }
.status-row span:not(.status-pill):not(.status-ext) { display: block; font-size: 13px; color: var(--text-3); }
.status-row.link { transition: background 0.2s var(--ease-hover); }
.status-row.link:hover { background: var(--surface-2); }
.status-metrics { font-size: 12.5px; color: var(--text-3); text-align: right; }
.status-ext { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.status-pill { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: var(--surface-3); color: var(--text-2); transition: background 0.2s var(--ease-hover), color 0.2s var(--ease-hover); }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill[data-state='ok'] { background: var(--signal-soft); color: var(--signal); }
.status-pill[data-state='warn'] { background: var(--warn-soft); color: var(--warn); }
.status-pill[data-state='down'] { background: var(--danger-soft); color: var(--danger); }
.status-pill[data-state='checking']::before { animation: pulse-dot 1.2s var(--ease-in-out) infinite; }
@keyframes pulse-dot { 50% { opacity: 0.3; } }
.status-sub { font-size: 15px; font-weight: 600; margin: 40px 0 12px; color: var(--text-2); }
@media (max-width: 720px) { .status-row { grid-template-columns: 1fr auto; } .status-metrics { grid-column: 1; text-align: left; } }
@media (prefers-reduced-motion: reduce) { .status-pill[data-state='checking']::before { animation: none; } }

/* ---------- Blog ---------- */
.post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: var(--r-lg); overflow: hidden; }
.post-card { background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: background 0.2s var(--ease-hover); }
.post-card:hover { background: var(--surface-2); }
.post-card-lead { grid-column: 1 / -1; padding: 40px 36px; background: linear-gradient(120deg, var(--signal-soft), var(--surface) 55%); }
.post-card h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.post-card-lead h2 { font-size: clamp(26px, 3vw, 34px); }
.post-card p { color: var(--text-2); font-size: 14.5px; max-width: 60ch; }
.post-meta { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.post-more { margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--signal); }
.post { margin: 0 auto; }
.post h1 { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.035em; font-weight: 600; line-height: 1.06; margin: 10px 0 18px; text-wrap: balance; }
.post .post-meta { display: block; margin-top: 22px; }
.post-lead { font-size: 18px; color: var(--text) !important; margin-bottom: 28px; }
.post h2 { margin-top: 40px; }
.post-back { font-size: 14px; color: var(--text-2) !important; text-decoration: none !important; }
.post-back:hover { color: var(--text) !important; }
@media (max-width: 720px) { .post-list { grid-template-columns: 1fr; } .post-card-lead { padding: 28px; } }

/* ---------- Home v3: bigger, more visual ---------- */
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-ink { background: var(--bg); color: var(--signal); }
.btn-ink:hover { background: #1b1d18; }

.hero-xl { padding: 96px 0 40px; }
.hero-xl h1 { font-size: clamp(44px, 7vw, 96px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 700; max-width: 17ch; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-top: 30px; }
.hero-row .hero-lead { margin-top: 0; max-width: 40ch; font-size: 18px; }
.hero-row .hero-cta { margin-top: 0; }

/* Stage: replica Discord window */
.stage { position: relative; margin-top: 56px; transform-origin: 50% 0; will-change: transform; }
.dw {
  display: grid; grid-template-columns: 64px 220px 1fr; height: 470px;
  background: #1e1f22; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(196, 236, 90, 0.04), 0 -30px 120px -60px rgba(196, 236, 90, 0.25);
}
.dw-rail { background: #141516; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; }
.dw-server { width: 42px; height: 42px; border-radius: 50%; background: #2b2d31; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #dbdee1; }
.dw-server.on { border-radius: 14px; background: var(--signal); color: var(--signal-ink); }
.dw-rail-add { width: 42px; height: 42px; border-radius: 50%; background: #2b2d31; color: #23a55a; display: grid; place-items: center; font-size: 22px; }
.dw-side { background: #2b2d31; padding: 12px 8px; font-size: 14px; color: #949ba4; overflow: hidden; }
.dw-guild { color: #f2f3f5; font-weight: 600; padding: 4px 8px 14px; border-bottom: 1px solid #1f2023; margin-bottom: 10px; }
.dw-cat { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 14px 8px 4px; }
.dw-ch { padding: 5px 8px; border-radius: 4px; }
.dw-ch.active { background: #404249; color: #f2f3f5; }
.dw-main { background: #313338; display: flex; flex-direction: column; min-width: 0; }
.dw-top { height: 48px; border-bottom: 1px solid #26272b; display: flex; align-items: center; padding: 0 18px; color: #f2f3f5; font-weight: 600; font-size: 15px; flex: none; }
.dw-feed { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.dw-sys { font-size: 13.5px; color: #b5bac1; padding-left: 52px; position: relative; }
.dw-sys::before { content: ''; position: absolute; left: 22px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: #f23f43; }
.dw-sys b { color: #f2f3f5; font-weight: 600; }
.dw-sys.ok { color: #d6f5a3; }
.dw-sys.ok::before { background: var(--signal); }
.dw-pts { font-family: var(--mono); font-size: 12px; color: var(--warn); margin-left: 6px; }
.dw-pts.hot { color: #ff7b7e; }
.dw .dc-time, .dw .dc-foot { color: #b5bac1; }
.dw-msg { display: grid; grid-template-columns: 40px 1fr; gap: 12px; margin: 8px 0; }
.dw-body { display: grid; gap: 6px; min-width: 0; }
.dw-body .dc-container { background: #2b2d31; max-width: 520px; }
.stage-replay { position: absolute; right: 16px; bottom: 16px; }

/* Play sequence. Without JS (or with reduced motion) everything is simply visible. */
.js .stage [data-play^="l"], .js .stage [data-play="card"] { opacity: 0; }
.js .stage.play [data-play="l1"] { animation: dw-in 0.45s var(--ease) 0.6s forwards; }
.js .stage.play [data-play="l2"] { animation: dw-in 0.45s var(--ease) 1.2s forwards; }
.js .stage.play [data-play="l3"] { animation: dw-in 0.45s var(--ease) 1.8s forwards; }
.js .stage.play [data-play="l4"] { animation: dw-in 0.45s var(--ease) 2.4s forwards; }
.js .stage.play [data-play="card"] { animation: card-pop 0.6s var(--ease) 3s forwards; }
.js .stage.play [data-play="l5"] { animation: dw-in 0.5s var(--ease) 4.1s forwards; }
.js .stage.play [data-play="ch-ann"] { animation: ch-gone 4.6s linear 0.1s both; }
.js .stage.play [data-play="ch-rules"] { animation: ch-gone 3.8s linear 0.7s both; }
@keyframes dw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes card-pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ch-gone {
  0%, 10% { opacity: 1; text-decoration: none; color: #949ba4; }
  14%, 86% { opacity: 0.35; text-decoration: line-through; color: #f23f43; }
  92% { opacity: 1; text-decoration: none; color: var(--signal); }
  100% { opacity: 1; color: #949ba4; }
}

/* Product shots band */
.band { background: var(--surface); border-block: 1px solid var(--line-soft); }
.band .discord-card { background: #26282a; }
.shots { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.shot { margin: 0; display: grid; gap: 14px; align-content: start; }
.shot-lead { grid-row: span 2; }
.shot figcaption { color: var(--text-2); font-size: 14.5px; max-width: 46ch; }
.shot figcaption strong { color: var(--text); font-weight: 600; margin-right: 6px; }
.shot-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.shot-thumbs span {
  aspect-ratio: 4 / 5; border-radius: 6px; display: grid; place-items: end start; padding: 8px;
  font-size: 11px; font-weight: 600; color: #fff; text-decoration: line-through; text-decoration-color: #f23f43;
  background: linear-gradient(160deg, #3a1d6e, #0f3d2a); filter: saturate(0.7) brightness(0.8); opacity: 0.75;
}
.mini-caps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 48px; border-radius: var(--r-md); overflow: hidden; }
.mini-caps li { background: var(--bg); padding: 18px 20px; font-size: 13.5px; color: var(--text-3); }
.mini-caps strong { display: block; color: var(--text); font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }

/* Full lime band for contrast between sections */
.signal-band { background: var(--signal); color: var(--signal-ink); }
.signal-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-block: 64px; }
.signal-band h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.04em; font-weight: 700; max-width: 16ch; }
.signal-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.signal-cmd { font-size: 15px; padding: 12px 16px; border-radius: var(--r-sm); background: rgba(20, 26, 4, 0.1); border: 1px solid rgba(20, 26, 4, 0.2); }
.signal-band ::selection { background: var(--signal-ink); color: var(--signal); }

@media (max-width: 960px) {
  .dw { grid-template-columns: 56px 1fr; height: 440px; }
  .dw-side { display: none; }
  .shots { grid-template-columns: 1fr; }
  .shot-lead { grid-row: auto; }
  .mini-caps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hero-xl { padding-top: 56px; }
  .dw { grid-template-columns: 1fr; height: auto; min-height: 420px; }
  .dw-rail { display: none; }
  .dw-sys { padding-left: 22px; }
  .dw-sys::before { left: 4px; }
  .mini-caps { grid-template-columns: 1fr; }
  .stage-replay { position: static; margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .stage [data-play^="l"], .js .stage [data-play="card"] { opacity: 1; }
  .js .stage.play [data-play] { animation: none !important; }
  .stage { transform: none !important; }
}

/* ---------- Access + audit ---------- */
.warn-box { margin: 16px 0; padding: 14px 16px; border-radius: var(--r-sm); background: var(--danger-soft); border: 1px solid rgba(240, 88, 92, 0.3); color: var(--text-2); font-size: 14px; }
.warn-box strong { color: var(--danger); font-weight: 600; margin-right: 6px; }
#perm-warning { margin-top: 0; }
.link-out { display: flex; gap: 8px; margin-top: 14px; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; }
.role-pick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; font-size: 14px; transition: background 0.2s var(--ease-hover); }
.role-pick:hover { background: var(--surface-3); }
.role-pick input { accent-color: var(--signal); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- Tutorial tour ---------- */
.tour-welcome { margin: auto; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; position: relative; }
.tour-welcome::backdrop { background: rgba(0, 0, 0, 0.62); }
.tour-welcome[open] { animation: card-pop 0.24s var(--ease) both; }
.tour-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); font-size: 22px; cursor: pointer; transition: background 0.2s var(--ease-hover), color 0.2s var(--ease-hover); }
.tour-x:hover { background: var(--surface-2); color: var(--text); }
.tour-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-right: 32px; }
.tour-mark { color: var(--signal); flex: none; }
.tour-welcome h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.tour-welcome p { color: var(--text-2); font-size: 14.5px; }
.tour-welcome ul { margin: 12px 0 14px; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 14.5px; }
.tour-welcome li::marker { color: var(--signal); }
.tour-note { font-size: 13px !important; color: var(--text-3) !important; }
.tour-actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; }
.tour-welcome .tour-actions .btn-signal { flex: 1; }
.tour-mute { display: block; width: 100%; margin-top: 14px; border: 0; background: none; color: var(--text-3); font-size: 13px; cursor: pointer; }
.tour-mute:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.tour-layer { position: fixed; inset: 0; z-index: calc(var(--z-toast) - 1); pointer-events: auto; }
.tour-spot { position: fixed; left: 0; top: 0; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62), 0 0 0 2px var(--signal); transition: transform 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease); pointer-events: none; }
.tour-tip { position: fixed; left: 0; top: 0; z-index: var(--z-toast); width: min(340px, calc(100vw - 24px)); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); transition: transform 0.3s var(--ease); }
.tour-step { font-size: 11px; color: var(--signal); margin-bottom: 6px; }
.tour-tip h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.tour-tip p { font-size: 14px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-tip { transition: none; } .tour-welcome[open] { animation-name: fade; } }

/* ---------- Blog filter + changelog ---------- */
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; max-width: none; }
.blog-filter { margin-bottom: 22px; flex-wrap: wrap; }
.changelog { display: grid; gap: 0; }
.release { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 40px 0; border-top: 1px solid var(--line-soft); }
.release:first-child { border-top: 0; padding-top: 8px; }
.release-meta { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 84px; align-self: start; }
.release-v { font-size: 26px; letter-spacing: -0.02em; color: var(--text); }
.release-post { font-size: 14px; color: var(--signal); margin-top: 6px; }
.release-body h2 { margin-top: 0 !important; }
.release-body h3 { margin: 18px 0 6px; }
.tag-new, .tag-changed, .tag-fixed { font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 3px; }
.tag-new { background: var(--signal-soft); color: var(--signal); }
.tag-changed { background: var(--warn-soft); color: var(--warn); }
.tag-fixed { background: var(--surface-3); color: var(--text-2); }
@media (max-width: 720px) { .release { grid-template-columns: 1fr; gap: 14px; } .release-meta { position: static; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 12px; } }

/* ---------- Staff console ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field-error { font-size: 13px; color: var(--danger); min-height: 0; margin-top: 10px; }
.field-error:empty { display: none; }
.tab-count { font-size: 11px; margin-left: 4px; padding: 1px 6px; border-radius: 3px; background: var(--warn-soft); color: var(--warn); }
.tab-count:empty { display: none; }
.muted { color: var(--text-3); }
.table .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.table .id { font-size: 12px; color: var(--text-3); }
.table .reason { max-width: 42ch; color: var(--text-2); }
.table .link { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }

.glance { display: grid; gap: 0; }
.glance > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.glance > div:first-child { border-top: 0; padding-top: 0; }
.glance dt { font-size: 14px; color: var(--text-2); }
.glance dd { font-size: 15px; font-variant-numeric: tabular-nums; }
.glance-link { border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color 0.2s var(--ease-hover), text-decoration-color 0.2s var(--ease-hover); }
.glance-link:hover { color: var(--signal); text-decoration-color: currentColor; }

.issued { margin-top: 18px; padding: 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); animation: panel-in 0.22s var(--ease) both; }
.issued-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.issued-key { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 10px; }
.issued-key code { font-size: 15px; color: var(--signal); letter-spacing: 0.02em; overflow-wrap: anywhere; user-select: all; }
.issued p { font-size: 13px; color: var(--text-2); }

.dlg-body { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
#dlg .field { margin-bottom: 4px; }
#dlg .field-error { margin-bottom: 4px; }
#dlg .cookie-actions { margin-top: 18px; }
@media (prefers-reduced-motion: reduce) { .issued { animation-name: fade; } }

/* ---------- Custom dropdown (js/select.js) ---------- */
.dd { position: relative; width: 100%; }
.dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 38px; padding: 0 10px 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; text-align: left; cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.dd-btn:hover { border-color: #3a3d34; }
.dd.open .dd-btn, .dd-btn:focus-visible { outline: none; border-color: var(--signal); }
.dd-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chev { width: 16px; height: 16px; flex: none; color: var(--text-3); transition: transform 0.2s var(--ease); }
.dd.open .dd-chev { transform: rotate(180deg); color: var(--text); }
.dd-list {
  position: fixed; z-index: 60; max-width: calc(100vw - 16px);
  list-style: none; padding: 4px; max-height: 260px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top; pointer-events: none; visibility: hidden;
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease), visibility 0s linear 0.14s;
}
.dd-list:focus { outline: none; }
.dd-list.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s; }
.dd-list [role='option'] {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-radius: 4px; font-size: 14px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.dd-list [role='option'].is-active { background: var(--surface-3); color: var(--text); }
.dd-list [role='option'][aria-selected='true'] { color: var(--text); }
.dd-list [role='option'][aria-selected='true']::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); flex: none; }
.dd-list.up { transform-origin: bottom; transform: translateY(4px) scale(0.98); }
.dd-list.up.open { transform: none; }
.dd-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.lic-actions .dd { width: auto; min-width: 180px; }
.lic-actions .dd-btn { height: 32px; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .dd-list, .dd-list.open, .dd-list.up { transform: none; } .dd-chev { transition: none; } }

/* ---------- Overview insights (v2.4) ---------- */
.panel-grid.insights { margin-bottom: 16px; grid-template-columns: 1fr 1fr; }
.score-row { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.score-ring { position: relative; width: 104px; height: 104px; flex: none; }
.score-ring svg { width: 104px; height: 104px; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: var(--text-3); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 0.8s var(--ease), stroke 0.3s var(--ease); }
.score-ring[data-level='good'] .ring-fg { stroke: var(--signal); }
.score-ring[data-level='warn'] .ring-fg { stroke: var(--warn); }
.score-ring[data-level='bad'] .ring-fg { stroke: var(--danger); }
.score-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; letter-spacing: -0.02em; }
.checks { list-style: none; display: grid; gap: 0; }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.check:first-child { border-top: 0; }
.check strong { font-weight: 500; display: block; }
.check span:not(.mark):not(.sr-only) { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.check .mark { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--line); }
.check.ok .mark { background: var(--signal); border-color: var(--signal); }
.check.open .mark { border-color: var(--warn); }
.check.ok strong { color: var(--text-2); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; min-width: 0; background: var(--danger); border-radius: 2px 2px 0 0; opacity: 0.85; }
.bar[data-zero='true'] { background: var(--surface-3); opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 6px; }
.types { list-style: none; margin-top: 16px; display: grid; gap: 0; }
.types li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--text-2); }
.types li:first-child { border-top: 0; }
@media (max-width: 960px) { .panel-grid.insights { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ring-fg { transition: none; } }

/* ---------- Staff sales and announcements (v2.4) ---------- */
.tile-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.sales-bars { height: 160px; gap: 8px; }
.bar.stack { position: relative; background: var(--signal); opacity: 1; overflow: hidden; }
.bar.stack i { position: absolute; left: 0; right: 0; bottom: 0; background: #7fa33a; }
.textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.ann-preview { background: #313338; border-radius: var(--r-md); padding: 18px; }
.ann-meta { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #f2f3f5; }
.ann-av { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); color: var(--signal); display: grid; place-items: center; font-weight: 700; }
.ann-app { font-size: 11px; font-weight: 700; background: #5865f2; color: #fff; padding: 1px 5px; border-radius: 4px; }
.ann-card { margin: 10px 0 0 44px; background: #2b2d31; border: 1px solid #3f4147; border-radius: 8px; padding: 14px 16px; color: #dbdee1; }
.ann-card h3 { font-size: 16px; color: #f2f3f5; margin-bottom: 8px; overflow-wrap: anywhere; }
.ann-card p { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ann-card small { display: block; margin-top: 12px; font-size: 12px; color: #b5bac1; }

/* ---------- Mobile (v2.4) ---------- */
/* Grid children may shrink below their content, so wide tables and scrolling TOCs never widen the page */
.doc-grid > *, .panel-grid > *, .form-grid > *, .hero-grid > * { min-width: 0; }
.nav-menu-btn { display: none; }
.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-nav); background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: grid; }
.mobile-menu[hidden] { display: none; }
.mobile-menu-link { display: flex; align-items: center; min-height: 48px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font-size: 16px; color: var(--text); text-align: left; cursor: pointer; }
.mobile-menu-link:last-child { border-bottom: 0; }
.mobile-menu-link img { width: 26px; height: 26px; border-radius: 8px; margin-right: 10px; }
.mobile-menu-link .btn-hide-sm { display: inline !important; }
@media (max-width: 720px) {
  .nav { position: sticky; }
  .nav-menu-btn { display: inline-flex; }
  .nav-actions { gap: 8px; }
  .nav-actions > :not(.nav-primary):not(.user-chip) { display: none; }
  /* Touch targets: 44px minimum; inputs at 16px so iOS does not zoom on focus */
  .btn, .btn-sm { min-height: 44px; height: auto; }
  .btn-text { min-height: 44px; }
  .tab { padding: 13px 14px 14px; }
  .toc a { padding: 12px 12px; }
  .input, .select, .dd-btn { height: 46px; font-size: 16px; }
  .textarea { font-size: 16px; }
  .dd-list [role='option'] { min-height: 44px; }
  .glance-link { padding: 10px 14px; margin: -10px -14px; }
  .footer-cols nav a { padding: 8px 0; }
  .footer-cols nav { gap: 0; }
  .chip, .tag-new, .tag-changed, .tag-fixed, .toc-label, .cmp-group th { font-size: 12px !important; }
  .page-head h1 { font-size: 28px; }
  .page { padding-block: 32px 56px; }
  .doc { padding-block: 36px 64px; }
  .box { padding: 18px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .lic-actions .dd { min-width: 0; width: 100%; }
  .btn-text { white-space: normal; text-align: left; }
  .billing button, .blog-filter button { min-height: 44px; }
  .toggle { width: 50px; height: 30px; border-radius: 15px; }
  .toggle::after { width: 22px; height: 22px; top: 4px; left: 4px; }
  .toggle:checked::after { transform: translateX(20px); }
  .range { height: 44px; }
  .role-pick { min-height: 44px; }
}
