/* ============================================================
   StreamForge design system — "industrial forge"
   Coal surfaces, ember accent, signal cyan for stream states.
   ============================================================ */
:root {
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #0b0c0f;
  --bg-2: #101217;
  --surface: #15181e;
  --surface-2: #1b1f27;
  --surface-3: #232833;
  --line: rgba(255,255,255,.075);
  --line-strong: rgba(255,255,255,.14);
  --text: #ecebe6;
  --text-2: #b9bcc6;
  --muted: #7f8592;
  --ember: #ff7a1a;
  --ember-2: #ffb347;
  --ember-soft: rgba(255,122,26,.14);
  --signal: #45e0ff;
  --signal-soft: rgba(69,224,255,.12);
  --ok: #3ddc97;
  --ok-soft: rgba(61,220,151,.13);
  --warn: #ffc857;
  --warn-soft: rgba(255,200,87,.14);
  --danger: #ff5c6c;
  --danger-soft: rgba(255,92,108,.14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -30px rgba(0,0,0,.8);
  --glow: 0 0 0 1px rgba(255,122,26,.35), 0 10px 40px -10px rgba(255,122,26,.55);
  --sidebar-w: 252px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #ece8df;
  --surface: #ffffff;
  --surface-2: #f7f5f0;
  --surface-3: #ece9e2;
  --line: rgba(20,18,12,.09);
  --line-strong: rgba(20,18,12,.18);
  --text: #16171b;
  --text-2: #3d4048;
  --muted: #6d717c;
  --ember: #e8620a;
  --ember-2: #f59a2b;
  --ember-soft: rgba(232,98,10,.12);
  --signal: #0891b2;
  --signal-soft: rgba(8,145,178,.12);
  --ok: #059669;
  --ok-soft: rgba(5,150,105,.12);
  --warn: #b45309;
  --warn-soft: rgba(180,83,9,.12);
  --danger: #dc2626;
  --danger-soft: rgba(220,38,38,.1);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -20px rgba(20,18,12,.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font-body); font-size: 14.5px; line-height: 1.55; color: var(--text);
  background: var(--bg); min-height: 100vh; min-width: 0; overflow-x: clip; -webkit-font-smoothing: antialiased;
}
body::before { /* grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--ember-2); text-decoration: none; }
a:hover { color: var(--ember); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.1; margin: 0; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--signal); }
::selection { background: var(--ember); color: #111; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { color: var(--signal); }
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.trunc { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline { display: inline; }
.text-ok { color: var(--ok); } .text-danger { color: var(--danger); } .text-warn { color: var(--warn); } .text-signal { color: var(--signal); } .text-ember { color: var(--ember-2); }
.gradient-text { background: linear-gradient(92deg, var(--ember) 0%, var(--ember-2) 60%, #ffd48a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- reveal animation ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.reveal > *:nth-child(1){animation-delay:.02s}.reveal > *:nth-child(2){animation-delay:.08s}.reveal > *:nth-child(3){animation-delay:.14s}.reveal > *:nth-child(4){animation-delay:.2s}.reveal > *:nth-child(5){animation-delay:.26s}.reveal > *:nth-child(6){animation-delay:.32s}.reveal > *:nth-child(7){animation-delay:.38s}.reveal > *:nth-child(8){animation-delay:.44s}.reveal > *:nth-child(9){animation-delay:.5s}
@media (prefers-reduced-motion: reduce) { .reveal > * { animation: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 13.5px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform .15s ease, box-shadow .2s ease, background .15s ease, border-color .15s ease; white-space: nowrap; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-ember { background: linear-gradient(135deg, var(--ember) 0%, var(--ember-2) 100%); color: #14110c; box-shadow: 0 8px 24px -10px rgba(255,122,26,.7); }
.btn-ember:hover { box-shadow: var(--glow); transform: translateY(-1px); color: #14110c; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--ember); color: var(--text); background: var(--ember-soft); }
.btn-soft { background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
.btn-soft:hover { background: var(--surface-3); color: var(--text); }
.btn-signal { background: var(--signal-soft); color: var(--signal); border-color: rgba(69,224,255,.3); }
.btn-signal:hover { background: rgba(69,224,255,.2); color: var(--signal); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255,92,108,.3); }
.btn-danger:hover { background: rgba(255,92,108,.22); color: var(--danger); }
.btn-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(61,220,151,.3); }
.btn-ok:hover { background: rgba(61,220,151,.22); color: var(--ok); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-xs { padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-copy { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.btn-copy:hover { border-color: var(--ember); color: var(--ember-2); }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: transparent; border: 1px solid var(--line); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--ember); color: var(--ember-2); }

/* ---------- fields ---------- */
.field { margin-bottom: 16px; }
.field label, label.lbl { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); letter-spacing: .01em; }
.field label .req { color: var(--ember); }
.field label .opt, .opt { color: var(--muted); font-weight: 400; font-size: 12px; }
.input, select.input, textarea.input { width: 100%; padding: 11px 13px; font-size: 14px; font-family: var(--font-body); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--signal); }
.input.sm { padding: 8px 10px; font-size: 13px; }
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.input[readonly] { color: var(--text-2); background: var(--surface-2); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type="file"].input { padding: 7px 10px; font-size: 12px; }
input[type="color"].input { width: 52px; height: 40px; padding: 3px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; color: var(--text-2); }
.check input { width: 16px; height: 16px; accent-color: var(--ember); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: relative; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-title { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-title i { color: var(--ember); font-size: 14px; }
.card.accent::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: linear-gradient(var(--ember), var(--ember-2)); }
.panel-soft { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.subsection { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; }
.subsection-head { font-weight: 600; font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.subsection-head i { color: var(--signal); }
.sub-row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; position: relative; }
.sub-row label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; display: block; }
.sub-grid { display: grid; grid-template-columns: 1fr 70px 2fr; gap: 8px; margin-bottom: 8px; padding-right: 22px; }
.sub-remove { position: absolute; top: 6px; right: 6px; background: none; border: none; color: var(--danger); cursor: pointer; font-size: 12px; }
@media (max-width: 560px) {
  .sub-grid { grid-template-columns: 1fr; padding-right: 0; padding-top: 18px; }
  .sub-remove { top: 8px; right: 8px; }
}

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(61,220,151,.3); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(255,200,87,.3); }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255,92,108,.3); }
.pill-signal { background: var(--signal-soft); color: var(--signal); border-color: rgba(69,224,255,.3); }
.pill-ember { background: var(--ember-soft); color: var(--ember-2); border-color: rgba(255,122,26,.35); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.5); } 70% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); margin: 2px 4px 2px 0; }

/* ---------- alerts / toast ---------- */
.alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; margin-bottom: 14px; border: 1px solid; animation: rise .4s both; }
.alert-success { background: var(--ok-soft); border-color: rgba(61,220,151,.3); color: var(--ok); }
.alert-error { background: var(--danger-soft); border-color: rgba(255,92,108,.3); color: var(--danger); }
.alert-warning, .alert-info { background: var(--warn-soft); border-color: rgba(255,200,87,.3); color: var(--warn); }
#toast { position: fixed; bottom: 22px; right: 22px; background: var(--surface-3); color: var(--text); padding: 11px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; display: none; z-index: 1000; border: 1px solid var(--line-strong); box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); }
#toast i { color: var(--ok); margin-right: 7px; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13.5px; }
.table th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: var(--surface); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface); }
.table.compact th, .table.compact td { padding: 8px 10px; font-size: 12.5px; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions > * { margin-left: 4px; }
.cell-title { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.host-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; flex-shrink: 0; overflow: hidden; }
.host-icon img { width: 18px; height: 18px; }
.url-code { font-family: var(--font-mono); font-size: 11.5px; color: var(--signal); background: var(--surface); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.pagination a:hover { border-color: var(--ember); color: var(--ember-2); }
.pagination .current { background: var(--ember); color: #14110c; border-color: var(--ember); font-weight: 700; }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 1000px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--ember-soft), transparent 70%); pointer-events: none; }
.stat.signal::after { background: radial-gradient(circle, var(--signal-soft), transparent 70%); }
.stat.ok::after { background: radial-gradient(circle, var(--ok-soft), transparent 70%); }
.stat-label { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 7px; }
.stat-value { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; line-height: 1; }
.stat-value small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.progress { height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ember), var(--ember-2)); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.progress.signal > span { background: linear-gradient(90deg, var(--signal), #9af0ff); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: url(#emberGrad); transition: opacity .15s; }
.chart .bar:hover { opacity: .75; }
.chart .area { fill: url(#areaGrad); }
.chart .line { fill: none; stroke: var(--ember-2); stroke-width: 2; stroke-linejoin: round; }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: var(--font-mono); }
.bars-h { display: flex; flex-direction: column; gap: 8px; }
.bars-h .item { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 12.5px; }
.bars-h .item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bars-h .item .val { text-align: right; font-family: var(--font-mono); color: var(--muted); font-size: 11.5px; }

/* ---------- outputs ---------- */
.output { margin-bottom: 12px; }
.output-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.output-label { font-size: 12px; font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.output-input { width: 100%; padding: 10px 12px; font-family: var(--font-mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--signal); }
.output-block { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-top: 14px; }
.output-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 6px; font-weight: 700; font-size: 13px; }
.output-block-head i { color: var(--ember); }
.output-block.ok { border-color: rgba(61,220,151,.35); }
.output-block.warn { border-style: dashed; border-color: rgba(255,200,87,.45); }
.output-block.danger { border-color: rgba(255,92,108,.4); }
.code-block { background: #0a0b0e; color: #d8dbe3; font-family: var(--font-mono); font-size: 12px; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; margin-top: 12px; line-height: 1.65; border: 1px solid var(--line); }
[data-theme="light"] .code-block { background: #1b1e26; }
.preview-wrap { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; background: #000; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); margin-bottom: 18px; }
.preview-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); background: var(--bg-2); }
.empty .empty-icon { font-size: 34px; color: var(--ember); margin-bottom: 12px; opacity: .8; }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 13px; }
.tabs { display: inline-flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 10px; border: 1px solid var(--line); }
.tabs a, .tabs button { padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.tabs .active { background: var(--surface-3); color: var(--text); }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-2); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .t-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ember); margin-top: 5px; box-shadow: 0 0 0 3px var(--ember-soft); }
.timeline .t-meta { color: var(--muted); font-size: 11.5px; font-family: var(--font-mono); }

/* ============================================================
   SITE (marketing) layout
   ============================================================ */
.site-nav { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.site-nav-inner { max-width: 1240px; margin: 0 auto; padding: 0 22px; height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, var(--ember), var(--ember-2)); display: inline-flex; align-items: center; justify-content: center; color: #14110c; box-shadow: 0 6px 18px -6px rgba(255,122,26,.8); position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 50%); }
.brand-mark svg { width: 18px; height: 18px; position: relative; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-name span { color: var(--ember-2); }
.site-links { display: flex; align-items: center; gap: 2px; }
.site-links a { padding: 8px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.site-links a:hover, .site-links a.active { color: var(--text); background: var(--surface-2); }
.site-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .site-links { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px; }
  .site-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .site-nav-inner { padding-inline: 14px; gap: 10px; }
  .brand-name { display: none; }
  .site-actions { gap: 6px; }
}
@media (max-width: 350px) {
  .site-actions > .btn-ghost { display: none; }
}
.site-main { position: relative; z-index: 1; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ember-2); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--ember); }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.section-head p { color: var(--text-2); font-size: 16px; }

/* hero */
.hero { position: relative; padding: 84px 0 56px; overflow: hidden; }
.hero-glow { position: absolute; left: 50%; top: -220px; width: 900px; height: 600px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(255,122,26,.28), rgba(255,122,26,.06) 40%, transparent 70%); filter: blur(10px); pointer-events: none; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%); pointer-events: none; opacity: .7; }
.hero-wave { position: absolute; left: 0; right: 0; top: 46%; height: 120px; pointer-events: none; opacity: .5; }
.hero-wave path { fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 6 10; animation: dash 6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -320; } }
.hero-inner { position: relative; max-width: 900px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin-bottom: 20px; }
.hero h1 .accent { display: inline-block; position: relative; }
.hero h1 .accent::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px; background: var(--ember-soft); z-index: -1; border-radius: 3px; }
.hero p.lead { font-size: 17.5px; color: var(--text-2); max-width: 640px; margin: 0 auto 30px; }
.console { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 10px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,122,26,.08); text-align: left; }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.console-bar .led { width: 9px; height: 9px; border-radius: 50%; }
.console-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.console-form .input { padding: 14px 16px; font-size: 14.5px; border-radius: 12px; }
@media (max-width: 640px) { .console-form { grid-template-columns: 1fr; } }
.console-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 10px 4px; font-size: 12px; color: var(--muted); }
.console-foot span { display: inline-flex; align-items: center; gap: 5px; }
.console-foot i { color: var(--ok); }
.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.hero-stat { text-align: center; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.hero-stat span { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* marquee */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.marquee-item img { width: 18px; height: 18px; border-radius: 5px; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.bento .card { padding: 24px; overflow: hidden; }
.bento .span-2 { grid-column: span 2; } .bento .span-3 { grid-column: span 3; } .bento .span-4 { grid-column: span 4; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .bento .span-2, .bento .span-3, .bento .span-4 { grid-column: span 2; } }
.feat-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 16px; background: var(--ember-soft); color: var(--ember-2); }
.feat-icon.signal { background: var(--signal-soft); color: var(--signal); }
.feat-icon.ok { background: var(--ok-soft); color: var(--ok); }
.feat-icon.warn { background: var(--warn-soft); color: var(--warn); }
.bento h3 { font-size: 18px; margin-bottom: 8px; }
.bento p { color: var(--text-2); font-size: 13.5px; }
.bento .big-num { position: absolute; right: 18px; top: 10px; font-family: var(--font-display); font-size: 84px; font-weight: 800; color: var(--surface-3); letter-spacing: -.05em; line-height: 1; pointer-events: none; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-mono); font-size: 12px; color: var(--ember-2); letter-spacing: .12em; display: block; margin-bottom: 14px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 13.5px; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; position: relative; transition: transform .2s, border-color .2s; }
.plan:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.plan.highlight { border-color: rgba(255,122,26,.5); box-shadow: 0 0 0 1px rgba(255,122,26,.25), 0 40px 80px -40px rgba(255,122,26,.5); }
.plan.highlight::before { content: "Más popular"; position: absolute; top: -12px; left: 24px; background: linear-gradient(135deg, var(--ember), var(--ember-2)); color: #14110c; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; }
.plan .plan-desc { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.plan .price { font-family: var(--font-display); font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan .price-alt { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan li { display: flex; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.plan li i { color: var(--ok); margin-top: 3px; font-size: 12px; }
.period-toggle { display: inline-flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.period-toggle button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.period-toggle button.active { background: var(--surface-3); color: var(--text); }
.period-toggle .save { font-size: 11px; color: var(--ok); font-weight: 700; padding-right: 10px; }

/* cta + footer */
.cta { border: 1px solid rgba(255,122,26,.35); border-radius: 22px; padding: 46px; text-align: center; background: radial-gradient(ellipse at 50% 120%, rgba(255,122,26,.25), transparent 60%), var(--surface); }
.cta h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 10px; }
.cta p { color: var(--text-2); margin-bottom: 22px; }
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }
.footer-grid h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-2); font-size: 13.5px; padding: 3px 0; }
.footer-grid a:hover { color: var(--ember-2); }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ad-slot { border: 1px dashed var(--line); border-radius: var(--radius-sm); min-height: 90px; display: none; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.ad-slot.active { display: flex; }

/* generator page */
.gen-layout { display: grid; grid-template-columns: 440px 1fr; gap: 22px; align-items: start; padding: 32px 0 60px; }
@media (max-width: 960px) { .gen-layout { grid-template-columns: 1fr; } }
.page-title { padding: 40px 0 8px; }
.page-title h1 { font-size: clamp(28px, 4vw, 40px); }
.page-title p { color: var(--text-2); margin-top: 8px; font-size: 15px; }

/* ============================================================
   APP (panel + admin) layout
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app > div { min-width: 0; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; z-index: 40; }
.sidebar .brand { padding: 4px 8px 18px; }
.nav-group { margin-top: 10px; }
.nav-group-title { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13.5px; text-decoration: none; position: relative; transition: background .12s, color .12s; }
.nav-item i { width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--ember-soft); color: var(--text); }
.nav-item.active i { color: var(--ember-2); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--ember); }
.nav-item .count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; background: var(--surface-3); padding: 1px 7px; border-radius: 999px; color: var(--text-2); }
.nav-item .count.hot { background: var(--ember); color: #14110c; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.plan-card .plan-name { font-family: var(--font-display); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.plan-card .plan-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.plan-card .progress { margin-top: 10px; }
.topbar { position: sticky; top: 0; z-index: 30; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 26px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.topbar h1 .crumb { color: var(--muted); font-weight: 500; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--ember), var(--ember-2)); color: #14110c; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 12px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.content { padding: 26px; max-width: 1360px; width: 100%; min-width: 0; }
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.content-grid.even { grid-template-columns: 1fr 1fr; }
.content-grid > *, .grid-2 > *, .grid-3 > *, .stats > *, .gen-layout > *, .bento > *, .pricing > * { min-width: 0; }
@media (max-width: 1100px) { .content-grid, .content-grid.even { grid-template-columns: 1fr; } }
.sidebar-toggle { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 16px; }
}
@media (max-width: 640px) {
  .topbar { height: 58px; padding-inline: 14px; gap: 8px; }
  .topbar h1 { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
  .topbar h1 .crumb { display: none; }
  .topbar-actions { gap: 6px; flex-shrink: 0; }
  .topbar-actions > .btn { padding: 9px 11px; }
  .topbar-new-label, .user-name { display: none; }
  .user-chip { padding: 4px; }
  .card { padding: 16px; }
  .stat { padding: 16px; }
  .cta { padding: 30px 20px; }
  .section { padding: 52px 0; }
  .container { padding-inline: 16px; }
  .filters .input { min-width: 0; max-width: 100%; }
  .tabs { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .hero { padding-top: 58px; }
  .hero h1 { font-size: clamp(34px, 11vw, 42px); }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .period-toggle { width: 100%; justify-content: center; }
  .period-toggle button { padding-inline: 11px; }
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { font-size: 24px; }
.page-head p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 200px; }
.checkout-summary { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.checkout-summary .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.checkout-summary .line.total { border: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; padding-top: 12px; }
.gateway { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 8px; background: var(--surface); }
.gateway:has(input:checked) { border-color: var(--ember); background: var(--ember-soft); }
.gateway input { accent-color: var(--ember); }
.gateway .g-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); }
.settings-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-tabs a { padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.settings-tabs a.active { color: var(--text); border-bottom-color: var(--ember); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.check-list li:last-child { border: 0; }
.check-list .ok-i { color: var(--ok); } .check-list .bad-i { color: var(--danger); }
.legal-body { max-width: 820px; line-height: 1.75; color: var(--text-2); }
.legal-body h3 { color: var(--text); margin: 26px 0 8px; font-size: 18px; }
.changelog-entry { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .changelog-entry { grid-template-columns: 1fr; } }
.changelog-entry .ver { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.changelog-entry .date { font-family: var(--font-mono); color: var(--muted); font-size: 12px; margin-top: 4px; }
.changelog-entry ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.changelog-entry li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side { position: relative; overflow: hidden; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
.auth-side .hero-glow { top: auto; bottom: -300px; }
.auth-side h2 { font-size: 34px; margin-top: 30px; max-width: 420px; }
.auth-side p { color: var(--text-2); margin-top: 12px; max-width: 420px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 22px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
