/* Tema Goni: papel crema, verde bosque y oro viejo solo como acento.
   Misma dirección que eltarotdegoni.com (DESIGN.md del 26-nov-2026).
   Carga después de dist/styles.css y ritmo.css, así que gana sin !important. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.49fed20cf9e3.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.3ee9a16bc109.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght-normal.a87b95d73b0a.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --brand-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--brand-font-display);
  --font-body: var(--brand-font-body);

  /* Marca */
  --cream: #F2EEE4;
  --surface: #F9F6EF;
  --forest: #23473A;
  --forest-dark: #1A372C;
  --sage: #3E6450;
  --mint: #DCE7DA;
  --oro: #A07A2C;
  --oro-suave: #C9A55A;

  /* La escala "brand" pasa a verde bosque: todo lo que era coral o negro de acción. */
  --brand-50:  #EEF3ED;
  --brand-75:  #F3F6F1;
  --brand-100: #DCE7DA;
  --brand-200: #BFD3C2;
  --brand-300: #93B39C;
  --brand-400: #5E8A6E;
  --brand-500: #3E6450;
  --brand-600: #23473A;
  --brand-700: #1A372C;
  --brand-800: #132A21;
  --brand-900: #0E1F18;
  --brand-500-rgb: 62, 100, 80;
  --primary-tint-border: #BFD3C2;

  --brand-green-50:  #EAF2EC;
  --brand-green-100: #D7E8DC;
  --brand-green-200: #B5D3BE;
  --brand-green-500: #2F7A55;
  --brand-green-600: #256646;
  --brand-green-700: #1D5238;
  --success-500-rgb: 47, 122, 85;

  /* Neutros cálidos, teñidos de verde, sobre papel crema. */
  --neutral-950: #121A16;
  --neutral-900: #1D2722;
  --neutral-800: #2B3631;
  --neutral-700: #3B4741;
  --neutral-600: #4A5751;
  --neutral-500: #5B675F;
  --neutral-400: #98A199;
  --neutral-300: #CDCBBF;
  --neutral-200: #E1DCCF;
  --neutral-150: #E4DFD2;
  --neutral-125: #ECE7DC;
  --neutral-100: #EEEAE0;
  --neutral-75:  #F5F2EA;
  --neutral-50:  #F7F4EC;

  --surface-0: var(--surface);
  --surface-page: var(--cream);
  --surface-1: #F6F2E9;
  --surface-2: #EEEAE0;
  --surface-3: #E4DFD2;
  --surface-sunken: #F4F0E7;
  --border: #E2DCCE;
  --border-hover: #CDC6B5;
  --border-strong: #D6CFBF;
  --divider: #EAE5D9;
  --scrim-rgb: 29, 39, 34;

  --text-primary: #1D2722;
  --text-secondary: #4A5751;
  --text-tertiary: #5B675F;
  --text-ghost: #5B675F;
  --text-inverse: #FFFFFF;

  --cta: var(--forest);
  --cta-hover: var(--forest-dark);
  --ink: #1D2722;
  --selected-fill: var(--mint);
  --primary: var(--forest);
  --primary-hover: var(--forest-dark);
  --primary-ring: rgba(35, 71, 58, 0.35);

  /* Variables de ritmo.css */
  --ink-soft: #4A5751;
  --ink-faint: #5B675F;
  --line: #E2DCCE;
  --line-soft: #EAE5D9;
  --wash: #F4F0E7;

  /* Radios: tarjetas 1rem, botones y campos 0.75rem. */
  --radius-control: 0.75rem;
  --radius-lg: 0.625rem;
  --radius-xl: 1rem;
  --radius-tile: 0.75rem;
  --radius-2xl: 1rem;

  /* Una sola sombra para lo que flota de verdad; el resto va con borde. */
  --shadow-xs: none;
  --shadow-sm: 0 1px 2px rgba(29, 39, 34, 0.05);
  --shadow-md: 0 4px 14px rgba(29, 39, 34, 0.08);
  --shadow-lg: 0 12px 32px rgba(29, 39, 34, 0.12);
  --shadow-xl: 0 18px 44px rgba(29, 39, 34, 0.14);
  --shadow-primary: none;
  --shadow-card: 0 1px 2px rgba(29, 39, 34, 0.04), 0 10px 30px rgba(29, 39, 34, 0.07);

  --focus-ink: var(--forest);
  --focus-halo: rgba(35, 71, 58, 0.22);
}

body {
  font-family: var(--font-body);
  background: var(--surface-page);
}

/* ── Títulos en Fraunces ─────────────────────────────────────────── */
.page-title,
.st-title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50, "opsz" 72;
  color: var(--forest);
}
.section-title,
.card h2,
html .st-card h2,
.fp-title,
.wizard-title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.page-lede,
.st-lede { color: var(--sage); }

/* Etiqueta sobre el título: la estrella ✦ de oro hace de separador. */
html .st-eyebrow {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sage);
}
html .st-eyebrow::before {
  content: "✦";
  margin-right: 0.45em;
  color: var(--oro);
}

/* ── Botones ─────────────────────────────────────────────────────── */
.btn-pill-primary,
.btn-pill-secondary { border-radius: var(--radius-control); font-weight: 600; }
.btn-pill-primary { background: var(--cta); box-shadow: none; }
.btn-pill-primary:hover { background: var(--cta-hover); }
.btn-pill-secondary {
  background: transparent;
  border: 1px solid var(--forest);
  color: var(--forest);
}
.btn-pill-secondary:hover { background: var(--mint); border-color: var(--forest); }
.btn-pill-primary:active,
.btn-pill-secondary:active { transform: translateY(1px); }
.btn-pill-primary:focus-visible,
.btn-pill-secondary:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.fb-toolbar .btn-pill-primary { background: var(--forest); border-color: var(--forest); }
.fb-toolbar .btn-pill-primary:hover:not(:disabled) { background: var(--forest-dark); border-color: var(--forest-dark); }
.fb-toolbar .btn-pill-secondary,
.fb-toolbar .fb-problems-button,
.fb-toolbar .fb-test-channel > button.btn-link { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.fb-toolbar .btn-pill-secondary:hover:not(:disabled),
.fb-toolbar .fb-problems-button:hover,
.fb-toolbar .fb-test-channel > button.btn-link:hover:not(:disabled) { background: var(--mint); border-color: var(--forest); color: var(--forest); }

/* ── Barra lateral ───────────────────────────────────────────────── */
aside.sidebar-initial,
.sidebar { background: var(--surface); }
.sidebar-nav-item.active {
  background: var(--mint);
  color: var(--forest);
}
.sidebar-nav-item:hover { background: rgba(35, 71, 58, 0.06); }
.sidebar-logo-mark {
  background: var(--forest);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--forest), inset 0 0 0 3px var(--oro-suave);
}
.sidebar-badge { background: var(--forest); }
.mobile-topbar { background: var(--surface); border-bottom-color: var(--border); }

/* ── Pestañas: lo activo se subraya en oro ───────────────────────── */
.tab.active,
.tab[aria-current="page"],
.tab[aria-selected="true"] {
  color: var(--forest);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--oro);
}
.tab:hover { color: var(--forest); }

/* ── Superficies ─────────────────────────────────────────────────── */
.card { background: var(--surface); border-color: var(--border); }
.tile-selected { border-color: var(--forest); }
.filter-pill[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

/* Bandeja: etiquetas de etapa y punto de no leído */
.ib-stage-attention { background: var(--forest); border-color: var(--forest); color: #fff; }
.ib-stage-follower { border-color: var(--sage); color: var(--forest); background: transparent; }
.ib-seg-btn[aria-selected="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }
.ib-dot { background: var(--forest); }

/* Interruptores y casillas en verde */
html .cc-switch:checked { background: var(--forest); }
input[type="checkbox"],
input[type="radio"] { accent-color: var(--forest); }

/* ── Estadísticas ────────────────────────────────────────────────── */
html .st-card { background: var(--surface); }
html .st-card:hover,
html .st-kpi:hover { transform: none; box-shadow: none; border-color: var(--border-hover); }
html .st-kpi { background: var(--surface); }
html .st-kpi-n { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; }
html .st-fig b { font-family: var(--font-display); font-weight: 500; }

/* El marco de carta de tarot: solo en la cifra principal (una por pantalla). */
html .st-kpi.is-main {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
  box-shadow: inset 0 0 0 5px var(--forest), inset 0 0 0 6px rgba(201, 165, 90, 0.75), var(--shadow-card);
}
html .st-kpi.is-main .st-kpi-label,
html .st-kpi.is-main .st-delta { color: var(--mint); }
html .st-kpi.is-main .st-kpi-hint { color: rgba(242, 238, 228, 0.82); }

html .st-track { background: var(--surface-2); }
html .st-track > span { background: var(--forest); }
html .st-flow { background: var(--surface-1); }
html .st-pill { background: var(--mint); color: var(--forest); }
html .st-l1 { background: #DCE7DA; }
html .st-l2 { background: #A9C2AF; }
html .st-l3 { background: var(--sage); color: #fff; }
html .st-l4 { background: var(--forest); color: #fff; }
html .st-periods { background: var(--surface-2); }
html .st-periods a[aria-current="page"] { color: var(--forest); box-shadow: inset 0 -2px 0 var(--oro), 0 1px 2px rgba(29, 39, 34, 0.06); }

/* Editor de flujos: el enlace flotante usa el verde de acción. */
html .fl-guided-link { background: var(--forest); }
html .fl-guided-link:hover { background: var(--forest-dark); }

/* ── Selector "Nuevo flujo" ──────────────────────────────────────── */
.bb-modal.fp { background: var(--surface); border-radius: 1rem; }
.fp-nav { background: var(--surface-1); }
.fp-card { background: var(--surface); border-radius: 1rem; }
.fp-card:hover { border-color: var(--forest); box-shadow: none; }
.fp-nav-item.is-active { background: var(--mint); color: var(--forest); border-color: transparent; box-shadow: none; }
.fp-row:hover { background: var(--surface-2); }
.fp-group { text-transform: none; letter-spacing: 0; font-size: 0.875rem; color: var(--sage); }

/* Móvil: el buscador de listas ocupa su propia fila en vez de quedarse en 4 letras. */
@media (max-width: 639px) {
  .list-toolbar > .search-field { flex: 1 1 100%; }
}

/* ── Acceso ──────────────────────────────────────────────────────── */
.auth-bg { background: var(--cream); background-image: none; }
.auth-card {
  background: var(--surface);
  box-shadow: inset 0 0 0 6px var(--surface), inset 0 0 0 7px rgba(160, 122, 44, 0.45), var(--shadow-card);
}

@media (prefers-reduced-motion: reduce) {
  html .st-track > span { animation: none; }
}
