/* ======================================================================
   Editorial Theme — Alleato v2 (actividades_personal)
   Overrides de tokens para el 4to tema curado (serif claro).
   Inspiracion revistas impresas. Crema + terracota.
   Tipografia Source Serif 4 (display) + Commissioner (body) + JetBrains Mono (mono).
   Carga DESPUES de theme-base.css (cuando appSettings.theme === 'editorial')
   para que las rules [data-theme="editorial"] ganen sobre los defaults
   Linear heredados via [data-theme-curated].
   ====================================================================== */

:root[data-theme="editorial"] {
  /* Color — papel crema, tonos calidos */
  --ln-bg:            oklch(0.97 0.015 80);     /* crema */
  --ln-surface:       oklch(0.99 0.008 78);
  --ln-surface-2:     oklch(0.945 0.02 75);
  --ln-surface-3:     oklch(0.91 0.024 72);

  --ln-fg:            oklch(0.25 0.025 45);     /* marron oscuro */
  --ln-fg-muted:      oklch(0.45 0.022 40);
  --ln-fg-subtle:     oklch(0.6 0.02 40);
  --ln-fg-faint:      oklch(0.75 0.015 40);

  --ln-border:        oklch(0.87 0.022 70);
  --ln-border-strong: oklch(0.78 0.028 70);

  --ln-accent:        oklch(0.5 0.13 30);       /* terracota */
  --ln-accent-hover:  oklch(0.44 0.15 30);
  --ln-accent-soft:   oklch(0.94 0.035 30);
  --ln-accent-bg:     oklch(0.88 0.06 30);

  --ln-positive:      oklch(0.45 0.13 140);     /* verde bosque */
  --ln-positive-soft: oklch(0.94 0.03 140);
  --ln-negative:      oklch(0.5 0.18 25);       /* rojo teja */
  --ln-negative-soft: oklch(0.95 0.035 25);
  --ln-warning:       oklch(0.62 0.14 60);
  --ln-warning-soft:  oklch(0.95 0.04 70);

  /* Hover — gris calido + inverso editorial (marron sobre crema) para menus */
  --ln-hover-bg:        oklch(0.92 0.022 68);
  --ln-hover-fg:        var(--ln-fg);
  --ln-menu-hover-bg:   var(--ln-fg);
  --ln-menu-hover-fg:   oklch(0.97 0.015 80);
  --ln-overlay-bg:      oklch(0.97 0.015 80 / 0.78);
  --ln-drawer-backdrop: oklch(0.25 0.025 45 / 0.25);

  /* Type — primer tema que separa display (serif) de sans */
  --ln-font-sans:    "Commissioner", "Inter", "Segoe UI", system-ui, sans-serif;
  --ln-font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ln-font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Shadow — calidas, tinte marron */
  --ln-shadow-hover:    0 1px 2px oklch(0.3 0.04 40 / 0.06), 0 6px 16px oklch(0.3 0.04 40 / 0.05);
  --ln-shadow-drawer:   -10px 0 36px oklch(0.3 0.04 40 / 0.12);
  --ln-shadow-dropdown: 0 0 0 1px oklch(0.3 0.04 40 / 0.08), 0 10px 28px oklch(0.3 0.04 40 / 0.12);
  --ln-shadow-toast:    0 0 0 1px oklch(0.3 0.04 40 / 0.1), 0 14px 36px oklch(0.3 0.04 40 / 0.2);

  /* Chart palette — tonos calidos editoriales (mutes para papel) */
  --ln-chart-1: #b8452a;  /* terracota (acento) */
  --ln-chart-2: #5b7e4a;  /* olivo */
  --ln-chart-3: #c48f3f;  /* ocre */
  --ln-chart-4: #7d6b8f;  /* lavanda apagada */
  --ln-chart-5: #4a8e9e;  /* teal apagado */
  --ln-chart-6: #a65a6f;  /* rosa palo */
  --ln-chart-7: #6c5a40;  /* sepia */
  --ln-chart-8: #8d8a5e;  /* oliva claro */
}

/* Commissioner con tracking ligeramente abierto para respirar en pantalla.
   Sobre-ride el font-feature-settings "cv11","ss01" de [data-theme-curated] body
   (cv11 es feature de Geist, no aplica aqui). */
:root[data-theme="editorial"] body {
  font-feature-settings: "ss01", "tnum";
  letter-spacing: 0.005em;
  line-height: 1.55;
}

/* Titulares de pagina en serif — theme-base.css NO consume --ln-font-display en
   ningun selector; este tema lo aplica explicitamente al unico titular que
   existe en actividades_personal. El weight:400 en serif pesa mas que en
   sans — necesario para compensar el weight:300 de premium-ui.css. */
[data-theme="editorial"] .page-header-text h4 {
  font-family: var(--ln-font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
}

[data-theme="editorial"] .page-header-text small {
  font-family: var(--ln-font-sans);
  font-style: italic;
}

/* Form controls con fondo papel (crema) — sensacion editorial papel-sobre-papel.
   El !important es necesario porque Bootstrap define .form-control con
   background-color y especificidad similar. */
[data-theme="editorial"] .form-control,
[data-theme="editorial"] .form-select {
  background-color: var(--ln-bg) !important;
}

/* Navbar + sidebar calidos — desvio intencional de la regla del proyecto
   "navbar/sidebar SIEMPRE blancos". Limitado a [data-theme="editorial"].
   Si tras QA visual no convence, este bloque se revierte sin tocar el resto. */
[data-theme="editorial"] .top-navbar { background: var(--ln-surface) !important; }
[data-theme="editorial"] .sidebar    { background: var(--ln-surface); }

/* ======================================================================
   Fase 4 oleada 2 — hover rojo tuning terracota-tinted para paleta calida
   ====================================================================== */
:root[data-theme="editorial"] {
  --ln-negative-hover: oklch(0.47 0.18 30);
}
