/* ============================================================
   FORGELY — "THE FORGE" DESIGN SYSTEM
   Molten ember + cooled steel. Editorial serif + grotesk + mono.
   Authored intentionally; see DESIGN.md for the why.
   ============================================================ */

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

:root {
  /* — surfaces: warm iron, not blue-black — */
  --bg:        #100e11;
  --bg-2:      #141117;
  --surface:   #1a161b;
  --surface-2: #211c23;
  --surface-3: #2a242d;

  /* — hairlines (blueprint) — */
  --line:    rgba(245,238,232,0.08);
  --line-2:  rgba(245,238,232,0.14);
  --line-3:  rgba(245,238,232,0.22);

  /* — text (warm whites, WCAG-checked) — */
  --t1: #f4ece4;
  --t2: rgba(244,236,228,0.66);
  --t3: rgba(244,236,228,0.42);
  --t4: rgba(244,236,228,0.28);

  /* — molten ember (primary / heat / forging) — */
  --ember:      #ff6a2c;
  --ember-hot:  #ffa24d;
  --ember-deep: #d6431a;
  --ember-soft: rgba(255,106,44,0.13);
  --ember-mid:  rgba(255,106,44,0.22);
  --ember-line: rgba(255,106,44,0.34);
  --ember-text: #ff8c54;   /* lighter ember for text on dark (passes AA) */

  /* — cooled mint-steel (live / deployed / success) — */
  --mint:      #6fe0b8;
  --mint-soft: rgba(111,224,184,0.11);
  --mint-line: rgba(111,224,184,0.28);

  /* — type — */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* — geometry — */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --max:  1200px;
  --gut:  clamp(20px, 4.5vw, 72px);

  /* — motion — */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* film grain — material depth without flat gradients */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }

::selection { background: var(--ember-mid); color: #fff; }

/* unified line-icon family */
.ic { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ic--fill { fill: currentColor; stroke: none; }
svg.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── shared type primitives ── */
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance; }
em { font-style: italic; }
a { color: inherit; }

.serif-em { font-family: var(--display); font-style: italic; color: var(--ember-text); }

.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--t3);
}
.label .tick { color: var(--ember); }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }

/* generic section heading (left-aligned, asymmetric) */
.sec {
  padding: clamp(72px, 11vw, 140px) 0;
  border-top: 1px solid var(--line);
}
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head .label { margin-bottom: 22px; }
.sec-head h2 {
  font-size: clamp(34px, 5.2vw, 60px);
  color: var(--t1);
}
.sec-head h2 .serif-em { color: var(--t2); }
.sec-head p { color: var(--t2); font-size: clamp(16px, 2vw, 19px); max-width: 60ch; margin-top: 20px; text-wrap: pretty; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--b);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--t1);
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }

.btn--primary {
  background: var(--ember);
  color: #1a0e06;
  border-color: var(--ember);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 10px 30px -12px var(--ember-deep);
}
.btn--primary:hover { background: var(--ember-hot); box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 14px 40px -12px var(--ember-deep); }

.btn--ghost { color: var(--t2); }
.btn--ghost:hover { color: var(--t1); border-color: var(--line-3); background: var(--surface); }

.btn--lg { padding: 15px 28px; font-size: 16px; border-radius: var(--r-md); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: 66px;
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(16,14,17,0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: 100%; max-width: var(--max);
  margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--t1);
  font-family: var(--display);
  font-size: 23px; letter-spacing: -0.02em;
}
.brand .anvil { width: 22px; height: 22px; color: var(--ember); }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
  font-size: 14.5px; color: var(--t2); text-decoration: none;
  font-weight: 500; transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--t1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .btn { padding: 9px 18px; font-size: 14px; }
.nav-login { font-size: 14.5px; font-weight: 500; color: var(--t2); text-decoration: none; transition: color .2s; }
.nav-login:hover { color: var(--t1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(120px, 16vh, 180px) 0 clamp(60px, 8vw, 96px);
  overflow: hidden;
}
.hero-ember {
  position: absolute; z-index: 0;
  top: -10%; right: -6%;
  width: 720px; height: 720px;
  background: radial-gradient(circle at 60% 40%, var(--ember-soft) 0%, transparent 62%);
  pointer-events: none; filter: blur(6px);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-lead { max-width: 600px; }
.hero-lead .label { margin-bottom: 26px; }
.hero-title {
  font-size: clamp(46px, 6.6vw, 88px);
  line-height: 0.98;
  color: var(--t1);
  margin-bottom: 26px;
}
.hero-title .serif-em { display: inline; color: var(--ember-text); }
.hero-sub {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--t2);
  max-width: 50ch;
  margin-bottom: 36px;
  text-wrap: pretty;
}
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }
.hero-meta {
  margin-top: 38px;
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 12.5px; color: var(--t3);
  letter-spacing: 0.02em;
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--t4); }
.hero-meta b { color: var(--t1); font-weight: 600; }

/* ── the FORGE (signature animated panel) ── */
.forge {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: 0 40px 90px -50px #000, 0 0 0 1px rgba(255,255,255,.02) inset;
}
.forge__win {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 6px 14px;
}
.forge__win i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-3); }
.forge__win i:first-child { background: rgba(255,106,44,.6); }
.forge__win span { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--t3); letter-spacing: .06em; }

.forge__prompt {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 13px 15px;
  font-family: var(--mono); font-size: 13.5px;
  color: var(--t1); line-height: 1.5;
  min-height: 76px;
}
.forge__prompt .chev { color: var(--ember); flex-shrink: 0; align-self: flex-start; margin-top: 2px; font-weight: 700; }
.forge__type { flex: 1; }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--ember); vertical-align: text-bottom; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.forge__pipe { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 4px; }
.pstep {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-sm);
  opacity: 0.4;
  transition: opacity .4s var(--ease), background .4s var(--ease);
}
.pstep.on { opacity: 1; background: var(--ember-soft); }
.pstep.done { opacity: 1; }
.pstep__ic {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--t3);
  transition: all .4s var(--ease);
}
.pstep.on .pstep__ic { color: var(--ember); border-color: var(--ember-line); background: var(--ember-soft); }
.pstep.done .pstep__ic { color: var(--mint); border-color: var(--mint-line); background: var(--mint-soft); }
.pstep__ic svg { width: 13px; height: 13px; }
.pstep__t { font-size: 14px; font-weight: 500; color: var(--t2); }
.pstep.on .pstep__t, .pstep.done .pstep__t { color: var(--t1); }
.pstep__s { font-family: var(--mono); font-size: 11px; color: var(--t3); letter-spacing: .04em; }
.pstep.done .pstep__s { color: var(--mint); }

.forge__result {
  margin-top: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg);
  overflow: hidden;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  max-height: 0;
}
.forge__result.show { opacity: 1; transform: none; max-height: 260px; }
.embed {
  display: flex; gap: 12px; padding: 14px;
  border-left: 3px solid var(--mint);
}
.embed__av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--ember), var(--ember-deep)); flex-shrink: 0; display: grid; place-items: center; color: #1a0e06; }
.embed__av svg { width: 19px; height: 19px; }
.embed__name { font-size: 14px; font-weight: 700; color: var(--t1); display: flex; align-items: center; gap: 7px; }
.embed__tag { font-family: var(--mono); font-size: 9.5px; background: var(--ember); color: #1a0e06; padding: 1px 6px; border-radius: 4px; letter-spacing: .04em; font-weight: 600; }
.embed__body { font-size: 13px; color: var(--t2); margin-top: 3px; }
.embed__fields { display: flex; gap: 22px; margin-top: 9px; }
.embed__f span { display: block; font-family: var(--mono); font-size: 10px; color: var(--t3); text-transform: uppercase; letter-spacing: .08em; }
.embed__f b { font-size: 14px; color: var(--t1); font-weight: 600; }
.forge__earn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--t3);
}
.forge__earn b { color: var(--mint); font-size: 14px; }

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust { border-top: 1px solid var(--line); padding: 30px 0; }
.trust-inner { display: flex; align-items: center; gap: clamp(24px, 5vw, 60px); flex-wrap: wrap; }
.trust-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); white-space: nowrap; }
.trust-logos { display: flex; align-items: center; gap: clamp(24px, 4vw, 48px); flex-wrap: wrap; }
.tlogo { display: inline-flex; align-items: center; gap: 9px; color: var(--t2); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; transition: color .2s; }
.tlogo:hover { color: var(--t1); }
.tlogo svg { width: 19px; height: 19px; opacity: .8; }

/* ============================================================
   IDE (types itself on scroll)
   ============================================================ */
.ide-wrap { padding: clamp(48px, 7vw, 88px) 0 clamp(72px, 10vw, 120px); }
.ide {
  background: #0c0a0d;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 50px 110px -50px #000, 0 0 120px -60px var(--ember-deep);
  display: flex; flex-direction: column;
  height: 540px;
}
.ide-bar {
  height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: #131015;
  border-bottom: 1px solid var(--line);
}
.ide-tabs { display: flex; gap: 4px; }
.tab {
  font-size: 13px; font-weight: 500; color: var(--t3);
  padding: 6px 13px; border-radius: var(--r-sm); cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: color .15s, background .15s;
}
.tab svg { width: 13px; height: 13px; }
.tab.active { color: var(--t1); background: var(--surface-2); }
.ide-deploy {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ember); color: #1a0e06;
  font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: var(--r-sm); border: none; cursor: pointer;
}
.ide-deploy svg { width: 14px; height: 14px; }
.ide-body { display: flex; flex: 1; overflow: hidden; }

.ide-files {
  width: 210px; flex-shrink: 0;
  background: #0e0b10;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.ide-files .cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--t4); padding: 0 8px 10px; }
.frow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t3); padding: 5px 8px; border-radius: 5px; cursor: default; }
.frow svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.frow.folder { color: var(--t2); font-weight: 500; }
.frow.file { padding-left: 22px; }
.frow.active { color: var(--ember-text); background: var(--ember-soft); }
.frow.active svg { opacity: 1; color: var(--ember); }

.ide-editor { flex: 1; display: flex; flex-direction: column; background: #0c0a0d; min-width: 0; }
.ide-editor-head { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--t3); }
.ide-editor-head svg { width: 12px; height: 12px; color: var(--ember); }
.code {
  flex: 1; padding: 16px 18px; overflow: hidden;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  color: rgba(244,236,228,.82);
}
.cl { display: flex; white-space: pre; }
.ln { width: 26px; color: var(--t4); text-align: right; margin-right: 18px; user-select: none; flex-shrink: 0; }
.kw { color: #ff8c6b; }
.st { color: #8fd6c0; }
.fn { color: var(--ember-hot); }
.vr { color: #e7c08a; }
.cm { color: var(--t4); font-style: italic; }

.ide-chat { width: 290px; flex-shrink: 0; background: #0e0b10; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.ide-chat-head { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--t2); }
.ide-chat-head .on { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--mint); font-weight: 500; }
.ide-chat-head .on i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.ide-chat-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.bub { padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; max-width: 92%; }
.bub.user { align-self: flex-end; background: var(--ember-soft); border: 1px solid var(--ember-line); color: var(--t1); border-bottom-right-radius: 4px; }
.bub.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-2); color: var(--t2); border-bottom-left-radius: 4px; }
.bub code { font-family: var(--mono); font-size: 11.5px; color: var(--ember-text); background: rgba(0,0,0,.3); padding: 1px 4px; border-radius: 4px; }
.cstat { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; padding: 8px 11px; border-radius: 8px; border: 1px solid; }
.cstat.run { color: var(--ember-hot); border-color: var(--ember-line); background: var(--ember-soft); }
.cstat.ok { color: var(--mint); border-color: var(--mint-line); background: var(--mint-soft); }
.cstat .spin { width: 11px; height: 11px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ide-chat-input { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.ide-chat-input input { flex: 1; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; color: var(--t1); font-family: var(--sans); }
.ide-chat-input input::placeholder { color: var(--t4); }
.ide-chat-input button { width: 36px; height: 36px; border: none; border-radius: 8px; background: var(--ember); color: #1a0e06; cursor: pointer; display: grid; place-items: center; }
.ide-chat-input button svg { width: 15px; height: 15px; }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--bg); padding: 30px 28px; }
.stat__n { font-family: var(--display); font-size: clamp(38px, 4.4vw, 56px); line-height: 1; color: var(--t1); letter-spacing: -0.02em; }
.stat__n .u { color: var(--ember-text); }
.stat__l { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); margin-top: 12px; }

/* ============================================================
   HOW IT WORKS (connected narrative, no oversized 1-2-3)
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stp { padding: 30px 26px 30px 0; border-top: 1px solid var(--line-2); position: relative; }
.stp::before { content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 2px; background: var(--ember); }
.stp__i { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.stp__n { font-family: var(--mono); font-size: 12px; color: var(--ember-text); letter-spacing: .1em; }
.stp__ic { width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 9px; display: grid; place-items: center; color: var(--t2); margin-bottom: 20px; }
.stp__ic svg { width: 17px; height: 17px; }
.stp__t { font-family: var(--display); font-size: 23px; color: var(--t1); margin-bottom: 10px; }
.stp__b { font-size: 14.5px; color: var(--t2); line-height: 1.6; text-wrap: pretty; }

/* ============================================================
   SHOWCASE (asymmetric alternating rows)
   ============================================================ */
.show-row { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 5vw, 80px); align-items: center; margin-bottom: clamp(64px, 9vw, 120px); }
.show-row:last-child { margin-bottom: 0; }
.show-row.flip { grid-template-columns: 1.15fr 0.85fr; }
.show-row.flip .show-text { order: 2; }
.show-text .label { margin-bottom: 18px; }
.show-text .label .n { color: var(--ember-text); }
.show-text h3 { font-size: clamp(26px, 3.2vw, 38px); color: var(--t1); margin-bottom: 16px; }
.show-text p { color: var(--t2); font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.show-text .feat-mini { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.show-text .feat-mini div { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--t2); }
.show-text .feat-mini svg { width: 16px; height: 16px; color: var(--mint); flex-shrink: 0; }

/* placeholder media slot — intentional, not broken */
.media {
  position: relative; aspect-ratio: 16/10;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,106,44,0.035) 11px 12px),
    var(--surface);
  overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 30px 70px -40px #000;
}
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media__tag {
  font-family: var(--mono); font-size: 12px; color: var(--t3);
  letter-spacing: .04em; padding: 9px 14px;
  border: 1px dashed var(--line-3); border-radius: var(--r-sm);
  background: rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 8px;
}
.media__tag svg { width: 14px; height: 14px; opacity: .6; }
.media__chip { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--t4); }

/* ============================================================
   FEATURES (bento — varied dimensions, line icons)
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.fcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.fcard:hover { border-color: var(--ember-line); background: var(--surface-2); transform: translateY(-2px); }
.fcard.wide { grid-column: span 3; }
.fcard.std { grid-column: span 2; }
.fcard.feature { grid-column: span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; padding: 36px; background: linear-gradient(120deg, var(--surface-2), var(--surface)); }
.fcard__ic { width: 42px; height: 42px; border: 1px solid var(--ember-line); background: var(--ember-soft); color: var(--ember); border-radius: 11px; display: grid; place-items: center; margin-bottom: 20px; }
.fcard__ic svg { width: 20px; height: 20px; }
.fcard__t { font-family: var(--display); font-size: 22px; color: var(--t1); margin-bottom: 9px; }
.fcard__b { font-size: 14.5px; color: var(--t2); line-height: 1.62; text-wrap: pretty; }
.fcard.feature .fcard__t { font-size: 28px; }
.fcard.feature .fcard__b { font-size: 16px; }
.fscore {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 20px;
}
.fscore__row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.fscore__row:last-child { border-bottom: none; }
.fscore__row span { color: var(--t2); }
.fscore__bar { width: 90px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.fscore__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember-deep), var(--ember-hot)); border-radius: 3px; }
.fscore__v { font-family: var(--mono); font-size: 12px; color: var(--ember-text); width: 38px; text-align: right; }

/* ============================================================
   BUILD TAGS
   ============================================================ */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 11px 16px; font-size: 14.5px; color: var(--t2);
  background: var(--surface);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
  cursor: default;
}
.tag:hover { border-color: var(--ember-line); color: var(--t1); background: var(--surface-2); transform: translateY(-2px); }
.tag svg { width: 16px; height: 16px; color: var(--t3); transition: color .2s; }
.tag:hover svg { color: var(--ember); }

/* ============================================================
   COMPARISON
   ============================================================ */
.cmp-wrap { border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cmp th, .cmp td { padding: 18px 22px; text-align: left; border-bottom: 1px solid var(--line); }
.cmp thead th { background: var(--bg); font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); font-weight: 500; }
.cmp tbody td { color: var(--t3); }
.cmp .feat-name { color: var(--t1); font-weight: 500; }
.cmp tr:last-child td { border-bottom: none; }
.cmp .col-f { background: var(--ember-soft); border-left: 1px solid var(--ember-line); border-right: 1px solid var(--ember-line); color: var(--t1) !important; font-weight: 500; }
.cmp thead .col-f { background: var(--ember-mid); border-top: 1px solid var(--ember-line); color: var(--t1); font-family: var(--display); font-size: 18px; letter-spacing: -0.01em; text-transform: none; font-weight: 400; }
.cmp tr:last-child .col-f { border-bottom: 1px solid var(--ember-line); }
.yes { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); }
.yes svg { width: 16px; height: 16px; }
.no { display: inline-flex; align-items: center; gap: 8px; color: var(--t4); }
.no svg { width: 15px; height: 15px; }
.cmp .price-pop { display: inline-block; font-family: var(--mono); font-weight: 600; color: #1a0e06; background: var(--ember); padding: 4px 10px; border-radius: var(--r-sm); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; }
.quote.tall { grid-row: span 1; }
.quote__mark { font-family: var(--display); font-size: 48px; line-height: 0.6; color: var(--ember-line); margin-bottom: 14px; }
.quote__t { font-size: 16px; color: var(--t1); line-height: 1.55; text-wrap: pretty; flex: 1; }
.quote__t b { color: var(--ember-text); font-weight: 500; }
.quote__who { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote__av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--surface-3); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--t2); }
.quote__n { font-size: 14px; font-weight: 600; color: var(--t1); }
.quote__r { font-family: var(--mono); font-size: 11.5px; color: var(--t3); }

/* ============================================================
   PRICING
   ============================================================ */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 28px; display: flex; flex-direction: column; position: relative; }
.plan--feat { border-color: var(--ember-line); background: linear-gradient(180deg, var(--ember-soft), var(--surface)); box-shadow: 0 30px 70px -50px var(--ember-deep); }
.plan__badge { position: absolute; top: -11px; left: 28px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; background: var(--ember); color: #1a0e06; padding: 4px 11px; border-radius: var(--r-sm); font-weight: 600; }
.plan__tier { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); margin-bottom: 16px; }
.plan__price { display: flex; align-items: baseline; gap: 3px; font-family: var(--display); color: var(--t1); }
.plan__price .cur { font-size: 24px; align-self: flex-start; margin-top: 8px; }
.plan__price .amt { font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.plan__per { font-size: 13.5px; color: var(--t3); margin: 8px 0 24px; min-height: 20px; }
.plan__perks { list-style: none; display: flex; flex-direction: column; gap: 0; flex: 1; margin-bottom: 26px; }
.plan__perks li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--t2); padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan__perks li:last-child { border-bottom: none; }
.plan__perks svg { width: 15px; height: 15px; color: var(--ember); flex-shrink: 0; }
.plan .btn { width: 100%; justify-content: center; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-grid { max-width: 860px; }
.fitem { border-bottom: 1px solid var(--line-2); }
.fitem:first-child { border-top: 1px solid var(--line-2); }
.fq { width: 100%; background: none; border: none; cursor: pointer; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 4px; color: var(--t1); font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); letter-spacing: -0.01em; }
.fq__ic { width: 26px; height: 26px; flex-shrink: 0; border: 1px solid var(--line-2); border-radius: 7px; display: grid; place-items: center; color: var(--ember); transition: transform .3s var(--ease), background .3s, border-color .3s; }
.fq__ic svg { width: 14px; height: 14px; }
.fitem.open .fq__ic { transform: rotate(45deg); background: var(--ember-soft); border-color: var(--ember-line); }
.fa { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.fa p { color: var(--t2); font-size: 16px; line-height: 1.65; padding: 0 60px 26px 4px; text-wrap: pretty; }

/* ============================================================
   CTA
   ============================================================ */
.cta { position: relative; overflow: hidden; text-align: center; padding: clamp(90px, 13vw, 160px) 0; border-top: 1px solid var(--line); }
.cta-ember { position: absolute; bottom: -40%; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: radial-gradient(ellipse at 50% 80%, var(--ember-mid) 0%, transparent 60%); pointer-events: none; }
.cta-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cta h2 { font-size: clamp(38px, 6vw, 72px); color: var(--t1); margin-bottom: 22px; }
.cta p { font-size: clamp(16px, 2vw, 19px); color: var(--t2); margin-bottom: 38px; }
.cta .hero-meta { justify-content: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.foot-brand .brand { margin-bottom: 16px; }
.foot-brand p { font-size: 14px; color: var(--t3); max-width: 30ch; }
.foot-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--t4); margin-bottom: 18px; font-weight: 500; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.foot-col a { font-size: 14.5px; color: var(--t2); text-decoration: none; transition: color .2s; }
.foot-col a:hover { color: var(--ember-text); }
.foot-bot { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; flex-wrap: wrap; gap: 14px; }
.foot-bot span { font-family: var(--mono); font-size: 12px; color: var(--t4); }

/* ── Giant brand wordmark bleeding into an ember footer (landing page only) ── */
.brand-bleed {
  text-align: center;
  padding-top: clamp(48px, 7vw, 110px);
  overflow: hidden;                 /* clip the wordmark so nothing renders past the footer line */
}
.brand-bleed-word {
  display: block;
  margin: 0 0 -0.18em;              /* the clipped base sits flush against the ember footer */
  font-family: var(--display);
  font-weight: 500;
  color: var(--ember);
  font-size: clamp(96px, 27vw, 480px);
  line-height: 0.8;
  letter-spacing: -0.035em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

/* Scoped to pages with the wordmark (the landing page) so the shared stylesheet
   doesn't recolour other footers. The opaque ember footer rises over the lower
   half of the wordmark — that hard top edge is the "cut". */
body:has(.brand-bleed) .foot {
  position: relative;
  z-index: 1;
  border-top: none;
  background: linear-gradient(180deg, var(--ember) 0%, var(--ember-deep) 100%);
}
body:has(.brand-bleed) .foot,
body:has(.brand-bleed) .foot-brand .brand,
body:has(.brand-bleed) .foot-brand p { color: #fff; }
body:has(.brand-bleed) .foot-brand .brand .ic,
body:has(.brand-bleed) .foot-brand .brand svg { fill: #fff; color: #fff; }
body:has(.brand-bleed) .foot-top { border-bottom-color: rgba(255,255,255,0.22); }
body:has(.brand-bleed) .foot-col h4 { color: rgba(255,255,255,0.72); }
body:has(.brand-bleed) .foot-col a { color: rgba(255,255,255,0.88); }
body:has(.brand-bleed) .foot-col a:hover { color: #fff; }
body:has(.brand-bleed) .foot-bot span { color: rgba(255,255,255,0.72); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.rv.in { opacity: 1; transform: none; }
.rv-2 { transition-delay: .08s; }
.rv-3 { transition-delay: .16s; }
.rv-4 { transition-delay: .24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-lead { max-width: 640px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .fcard.wide { grid-column: span 2; }
  .fcard.std { grid-column: span 2; }
  .fcard.feature { grid-column: span 4; grid-template-columns: 1fr; gap: 24px; }
  .quotes { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-actions .nav-login { display: none; }
  .hero { padding-top: 110px; }
  .ide-files, .ide-chat { display: none; }
  .ide { height: auto; }
  .code { font-size: 12px; }
  .show-row, .show-row.flip { grid-template-columns: 1fr; gap: 28px; }
  .show-row.flip .show-text { order: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stp { padding-right: 0; }
  .bento { grid-template-columns: 1fr; }
  .fcard.wide, .fcard.std, .fcard.feature { grid-column: span 1; }
  .fcard.feature { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .cmp-wrap { overflow-x: auto; }
  .cmp { min-width: 640px; }
  .foot-top { grid-template-columns: 1fr; }
  .fa p { padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001s !important; animation: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* ============================================================
   SHOWCASE LIVE DEMOS
   ============================================================ */

/* ── 1. Template picker ── */
.mtpl {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  font-family: var(--sans); overflow: hidden;
}
.mtpl-bar {
  height: 36px; flex-shrink: 0;
  padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.mtpl-bar-title { font-size: 12px; font-weight: 600; color: var(--t2); }
.mtpl-bar-count { font-family: var(--mono); font-size: 10px; color: var(--t4); }
.mtpl-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  padding: 14px; align-content: start;
}
.mtpl-card {
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--r-md); padding: 13px 12px;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.mtpl-card.tpl-active {
  border-color: var(--ember-line);
  background: rgba(255,106,44,0.07);
  box-shadow: 0 0 0 1px var(--ember-line) inset;
}
.mtpl-badge {
  font-family: var(--mono); font-size: 9px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ember-text);
  background: var(--ember-soft); border: 1px solid var(--ember-line);
  border-radius: 50px; padding: 2px 8px; align-self: flex-start; margin-bottom: 2px;
}
.mtpl-name { font-size: 13px; font-weight: 600; color: var(--t1); font-family: var(--display); line-height: 1.2; }
.mtpl-desc { font-size: 11px; color: var(--t3); line-height: 1.4; flex: 1; }
.mtpl-btn {
  margin-top: 8px; width: 100%; padding: 7px 0;
  border-radius: 50px; border: 1px solid var(--line-2);
  background: var(--surface-3); color: var(--t2);
  font-size: 11px; font-family: var(--sans); font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  cursor: default; transition: background .25s, border-color .25s, color .25s;
}
.mtpl-card.tpl-active .mtpl-btn { background: var(--ember); border-color: var(--ember); color: #1a0e06; }
.mtpl-card.tpl-loading .mtpl-btn { background: var(--ember-soft); border-color: var(--ember-line); color: var(--ember-text); }
.mtpl-card.tpl-done   .mtpl-btn { background: var(--mint-soft);  border-color: var(--mint-line);  color: var(--mint); }
.mtpl-spin { width: 10px; height: 10px; border: 1.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* ── 2. Mini IDE (re-uses some existing .ide classes) ── */
.mide-wrap {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden; background: #100e11;
}
.mide-bar {
  height: 33px; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  padding: 0 10px; justify-content: space-between;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.mide-tabs { display: flex; gap: 3px; }
.mide-tab {
  height: 23px; padding: 0 9px;
  display: flex; align-items: center; gap: 4px;
  border-radius: 5px; font-family: var(--mono);
  font-size: 10px; color: var(--t3); border: 1px solid transparent;
}
.mide-tab.active { background: var(--surface-3); border-color: var(--line); color: var(--t1); }
.mide-tab svg { width: 10px; height: 10px; }
.mide-deploy-btn {
  height: 23px; padding: 0 10px;
  border-radius: 50px; border: none;
  background: var(--ember); color: #1a0e06;
  font-size: 10px; font-family: var(--mono); font-weight: 500;
  display: flex; align-items: center; gap: 4px; cursor: default;
}
.mide-deploy-btn svg { width: 10px; height: 10px; }
.mide-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.mide-files {
  width: 90px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 8px 0; overflow: hidden;
}
.mide-cap { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--t4); padding: 0 10px 8px; }
.mide-frow {
  display: flex; align-items: center; gap: 5px;
  padding: 3.5px 10px; font-family: var(--mono);
  font-size: 10px; color: var(--t3); overflow: hidden;
}
.mide-frow.folder { color: var(--t2); }
.mide-frow.file-active { background: var(--ember-soft); color: var(--ember-text); }
.mide-frow svg { width: 10px; height: 10px; flex-shrink: 0; }
.mide-editor {
  flex: 1; background: #0c0a0d;
  display: flex; flex-direction: column; min-width: 0;
}
.mide-editor-head {
  height: 28px; display: flex; align-items: center; gap: 6px;
  padding: 0 12px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; color: var(--t3); flex-shrink: 0;
}
.mide-editor-head svg { width: 10px; height: 10px; color: var(--ember); }
.mide-code {
  flex: 1; padding: 6px 0; overflow: hidden;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.6;
}
.mide-cl { display: flex; white-space: pre; }
.mide-ln { width: 22px; color: var(--t4); text-align: right; margin-right: 12px; flex-shrink: 0; }
.mide-kw { color: #ff8c6b; }
.mide-st { color: #8fd6c0; }
.mide-fn { color: var(--ember-hot); }
.mide-vr { color: #e7c08a; }
.mide-chat {
  width: 155px; flex-shrink: 0;
  background: #0e0b10; border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.mide-chat-head {
  height: 28px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; border-bottom: 1px solid var(--line);
  font-size: 10px; font-weight: 600; color: var(--t2); flex-shrink: 0;
}
.mide-online { display: flex; align-items: center; gap: 4px; color: var(--mint); font-family: var(--mono); font-size: 9px; }
.mide-online i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 5px var(--mint); }
.mide-chat-body { flex: 1; padding: 9px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
.mide-bub { padding: 6px 9px; border-radius: 8px; font-size: 10px; line-height: 1.45; max-width: 95%; }
.mide-bub.user { align-self: flex-end; background: var(--ember-soft); border: 1px solid var(--ember-line); color: var(--t1); border-bottom-right-radius: 2px; }
.mide-bub.ai   { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-2); color: var(--t2); border-bottom-left-radius: 2px; }
.mide-bub code { font-family: var(--mono); font-size: 9px; color: var(--ember-text); background: rgba(0,0,0,.3); padding: 1px 3px; border-radius: 3px; }
.mide-ok {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9px;
  color: var(--mint); background: var(--mint-soft);
  border: 1px solid var(--mint-line); border-radius: 5px; padding: 5px 7px;
}
.mide-ok svg { width: 9px; height: 9px; }

/* ── 3. Database table ── */
.mdb-wrap {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; overflow: hidden; font-family: var(--sans);
}
.mdb-bar {
  height: 33px; flex-shrink: 0;
  display: flex; align-items: center; gap: 3px;
  padding: 0 10px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.mdb-tab {
  height: 23px; padding: 0 9px;
  display: flex; align-items: center; gap: 5px;
  border-radius: 5px; font-family: var(--mono);
  font-size: 10px; color: var(--t3); border: 1px solid transparent;
}
.mdb-tab.active { background: var(--surface-3); border-color: var(--line); color: var(--t1); }
.mdb-tab svg { width: 10px; height: 10px; }
.mdb-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.mdb-sidebar {
  width: 110px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 8px 0;
}
.mdb-sidebar-cap { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--t4); padding: 0 10px 7px; }
.mdb-trow {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-family: var(--mono); font-size: 10px; color: var(--t3);
}
.mdb-trow.trow-active { background: var(--ember-soft); color: var(--ember-text); }
.mdb-trow svg { width: 9px; height: 9px; }
.mdb-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.mdb-thead {
  display: flex; align-items: center; height: 28px; flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--line-2);
}
.mdb-th {
  flex: 1; padding: 0 10px;
  font-family: var(--mono); font-size: 9.5px; color: var(--t4);
  text-transform: uppercase; letter-spacing: .07em;
  border-right: 1px solid var(--line);
}
.mdb-th:first-child { max-width: 42px; }
.mdb-th:last-child  { border-right: none; }
.mdb-rows { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.mdb-row {
  display: flex; align-items: center; height: 30px; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  transition: background .4s;
}
.mdb-row.row-new { background: rgba(111,224,184,0.06); animation: rowIn .5s ease; }
@keyframes rowIn { from { background: var(--mint-soft); } to { background: rgba(111,224,184,0.06); } }
.mdb-td {
  flex: 1; padding: 0 10px; font-family: var(--mono); font-size: 10.5px; color: var(--t2);
  border-right: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mdb-td:first-child { max-width: 42px; color: var(--t4); }
.mdb-td:last-child  { border-right: none; color: var(--t3); }
.mdb-pill {
  display: inline-flex; padding: 1px 7px; border-radius: 50px;
  font-size: 9.5px; font-family: var(--mono);
}
.mdb-pill.paid    { background: var(--mint-soft);  color: var(--mint);       border: 1px solid var(--mint-line); }
.mdb-pill.pending { background: var(--ember-soft); color: var(--ember-text); border: 1px solid var(--ember-line); }

/* ── 4. Discord embed ── */
.membed-wrap {
  width: 100%; height: 100%;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  overflow: hidden; font-family: var(--sans);
  background: #1e1f22; /* authentic Discord dark */
}
.membed-msg { display: flex; gap: 12px; align-items: flex-start; }
.membed-avatar {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  background: var(--ember); display: grid; place-items: center;
}
.membed-avatar svg { width: 19px; height: 19px; color: #1a0e06; }
.membed-body { flex: 1; min-width: 0; }
.membed-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.membed-name { font-size: 14px; font-weight: 700; color: #fff; }
.membed-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--ember); color: #1a0e06;
  padding: 2px 5px; border-radius: 3px;
}
.membed-ts { font-size: 11px; color: rgba(255,255,255,0.28); }
.membed-text { font-size: 13.5px; color: rgba(255,255,255,0.82); line-height: 1.4; margin-bottom: 8px; }
.membed-card {
  border-left: 4px solid var(--ember);
  background: rgba(255,255,255,0.04);
  border-radius: 0 4px 4px 0;
  padding: 11px 14px; max-width: 340px;
}
.membed-card-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.membed-card-desc  { font-size: 12.5px; color: rgba(255,255,255,0.6); margin-bottom: 10px; line-height: 1.4; }
.membed-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 10px; }
.membed-flabel { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.membed-fval   { font-size: 13px; color: rgba(255,255,255,0.65); }
.membed-footer { font-size: 11px; color: rgba(255,255,255,0.35); border-top: 1px solid rgba(255,255,255,0.07); padding-top: 7px; }
.membed-reactions { display: flex; gap: 5px; margin-top: 6px; }
.membed-react {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 4px; font-size: 12.5px;
  background: rgba(255,106,44,0.18); border: 1px solid rgba(255,106,44,0.35);
  color: var(--ember-text);
}
.membed-react-count { font-size: 12.5px; font-weight: 600; }
.membed-react-me {
  background: rgba(255,106,44,0.3); border-color: rgba(255,106,44,0.6);
}
