/* ee-studio.css — EE White wears the INTERNAL Emotion Engine's design language (owner, 2026-10-04:
 * "it should be like the internal emotion engine even with css but simple and stripped down").
 *
 * NOT INVENTED: every value below is lifted from public/emotion-engine-app.html — its :root
 * palette (--bg-body, --bg-sidebar, --accent, --text-*, --glass-border) and its step tab bar
 * (.tab-btn, .ee-step-num). Copied, because the two pages are separate Pages deploys and cannot
 * load each other's files (the same reason scriptless-scene.js is a byte copy).
 *
 * WHY A FILE AND NOT A <style> BLOCK: scripts/sync-ee-editor-mirror.mjs copies EVERY <style> block
 * of public-white/index.html into the operator Edit page (public/js/white-editor/editor.css). A
 * palette override there would repaint the operator's own page. A linked file is not mirrored.
 *
 * LINKED AFTER the page's inline <style> in <head>, so equal-specificity rules here win. */

/* ── The internal EE palette, mapped onto White's own token names ─────────────────────────── */
:root {
  --bg: #08080d;                    /* --bg-body */
  --panel: #0e0e16;                 /* --bg-sidebar */
  --inset: rgba(255,255,255,0.03);  /* --bg-input */
  --line: rgba(255,255,255,0.06);   /* --border / --glass-border */
  --ink: #e4e4ec;                   /* --text-primary */
  --acc: #6c5ce7;                   /* --accent */
  --acc-lt: #a29bfe;                /* active tab ink */
  --acc-br: #8b5cf6;                /* --accent-light */
  --ok: #00d2a0;                    /* --success */
}
body { background: var(--bg); }
.card { background: rgba(255,255,255,0.03); border-color: var(--line); }
button.secondary { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
/* Primary buttons already paint var(--acc), so the palette above restyles them; no blanket button
   rule here — the Editor's own button classes must keep winning. */

/* ── The step tab bar — internal EE .tab-btn / .ee-step-num, verbatim values ─────────────── */
#eeTabs { display: flex; gap: 2px; padding: 0 4px; margin: 6px 0 14px; overflow-x: auto;
  background: rgba(14,14,22,0.95); border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.tab-btn { flex: 1; padding: 8px 6px; text-align: center; cursor: pointer; border: none; background: transparent;
  color: #6b6b80; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; border-bottom: 2px solid transparent;
  font-family: inherit; border-radius: 0; white-space: nowrap; }
.tab-btn:hover { color: #e4e4ec; background: rgba(255,255,255,0.02); }
.tab-btn.active { color: #a29bfe; border-bottom-color: #6c5ce7; background: rgba(108,92,231,0.05); }
.ee-step-num { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: rgba(108,92,231,0.2);
  color: #a29bfe; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; margin-right: 5px; }
.tab-btn.active .ee-step-num { background: rgba(108,92,231,0.5); color: #fff; }

/* ── Start from scratch ───────────────────────────────────────────────────────────────────── */
.scratch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.scratch-grid label, .scratch-wide { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.scratch-wide { margin-top: 10px; }
.scratch-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.scratch-row { display: grid; grid-template-columns: minmax(0,1fr) 150px minmax(0,2fr) auto; gap: 8px; align-items: center; }
.scratch-row select, .scratch-grid select { background: var(--inset); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; font: inherit; }
@media (max-width: 640px) { .scratch-row { grid-template-columns: 1fr; } }

/* ── The signed terms, read-only ──────────────────────────────────────────────────────────── */
.terms-view { width: min(860px, 94vw); max-height: 90vh; padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--ink); }
.terms-view::backdrop { background: rgba(2,2,8,0.8); }
.terms-view-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.terms-view iframe { display: block; width: 100%; height: 72vh; border: 0; background: #fff; }
.hdr-portal { text-decoration: none; display: inline-flex; align-items: center; }
