/* Base de ORQUEST2: el mismo mundo que ORQUEST (grafito, tinta cálida y un único violeta de acción), con Inter servida
   desde la propia app. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  --ground: #0d0e12;
  --ground-lift: #1d1e23;
  --panel: #202125;
  --hairline: rgba(255, 255, 255, .14);
  --ink: #efedf0;
  --muted: #c3bec7;
  --placeholder: #9a95a0;
  --violet: #7a5af8;
  --violet-hover: #6a49ea;
  --violet-soft: #cfc4ff;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  /* Superficies y tonos del espacio de trabajo: el tema claro los redefine. */
  --fg-rgb: 255, 255, 255;
  --line: rgba(255, 255, 255, .08);
  --raised: #16171b;
  --sunken: #0a0b0e;
  --field: rgba(14, 14, 17, .78);
  --composer: #131418;
  --pop: #1a1b20;
  --panel-hover: #26272c;
  --bubble-mine: #2b2740;
  --overlay: rgba(13, 14, 18, .88);
  --danger-bg: rgba(44, 28, 31, .9);
  --danger-line: #6b3a3f;
  --danger-ink: #f6d2cc;
  --danger-soft: #f6a7a0;
  --ok-ink: #8fe0b5;
  --warn-ink: #f2cf80;
  --gutter: #5d5965;
  --console-ink: #cfcbd6;
  --check-a: #15161a;
  --check-b: #1b1c21;
  --folder: #c9b37a;
  --tok-comment: #7f7a88;
  --tok-string: #a6dba0;
  --tok-number: #f2b880;
  --tok-keyword: #c6b4ff;
  --tok-type: #82c8f2;
  --tok-tag: #f29fb0;
  color-scheme: dark;
}

/* Tema claro del espacio de trabajo. El acceso conserva su diseño oscuro. */
:root[data-theme="light"] {
  --ground: #f6f5f8;
  --ground-lift: #ffffff;
  --panel: #ffffff;
  --hairline: rgba(28, 24, 38, .14);
  --ink: #1d1b22;
  --muted: #57525f;
  --placeholder: #86818e;
  --violet-soft: #5a3dd8;
  --fg-rgb: 28, 24, 38;
  --line: rgba(28, 24, 38, .09);
  --raised: #fbfbfc;
  --sunken: #f1f0f4;
  --field: #ffffff;
  --composer: #ffffff;
  --pop: #ffffff;
  --panel-hover: #f3f1f7;
  --bubble-mine: #ebe5ff;
  --overlay: rgba(246, 245, 248, .9);
  --danger-bg: #fdeeee;
  --danger-line: #e7b3b3;
  --danger-ink: #962b2b;
  --danger-soft: #b33a3a;
  --ok-ink: #1d7a4b;
  --warn-ink: #8a5a00;
  --gutter: #a7a2ae;
  --console-ink: #2b2832;
  --check-a: #ececf0;
  --check-b: #f7f7f9;
  --folder: #a8862e;
  --tok-comment: #8a8592;
  --tok-string: #2f7d32;
  --tok-number: #b35c00;
  --tok-keyword: #6a3fd6;
  --tok-type: #0b6aa8;
  --tok-tag: #b4235a;
  color-scheme: light;
}
/* El acceso siempre en oscuro, aunque el espacio de trabajo esté en claro. */
:root[data-theme="light"] .auth-gate {
  --ground: #0d0e12; --ground-lift: #1d1e23; --panel: #202125; --hairline: rgba(255, 255, 255, .14);
  --ink: #efedf0; --muted: #c3bec7; --placeholder: #9a95a0; --violet-soft: #cfc4ff; --fg-rgb: 255, 255, 255;
  color-scheme: dark;
}
:root[data-theme="light"] body:has(.auth-gate:not([hidden])) { background: #0d0e12; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(122, 90, 248, .45); color: #fff; }
