/* CREATIVEMKT 2.0: sistema visual "horizonte".
   La firma es la luz del atardecer del paisaje original, convertida en un horizonte difuso detrás de cada cabecera
   con los dos o tres tonos de su zona. Todo lo demás es sobrio: superficies planas, una línea fina, sin brillos en cada borde.
   Se carga después de style.css y workspace.css: redefine tokens y piezas sin tocar el marcado viejo.
   Una sola familia (Archivo, variable): el eje de ancho es la voz. Títulos anchos, texto normal, datos levemente condensados. */

:root {
  /* Tipografía */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-display: clamp(2.7rem, 5.4vw, 4.6rem);
  --t-h1: clamp(1.95rem, 3.1vw, 2.7rem);
  --t-h2: 1.32rem;
  --t-h3: 1.02rem;
  --t-body: .95rem;
  --t-meta: .82rem;
  --t-label: .74rem;
  --w-display: 125;
  --w-head: 116;
  --w-data: 96;

  /* Espaciado (múltiplos de 4) y radios por jerarquía: más grande cuanto más protagonista */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;

  /* Elevación: tres niveles, nada más */
  --e1: 0 1px 0 rgba(16, 21, 51, .04), 0 1px 2px rgba(16, 21, 51, .06);
  --e2: 0 2px 4px rgba(16, 21, 51, .06), 0 18px 36px -22px rgba(36, 82, 154, .45);
  --e3: 0 40px 80px -30px rgba(6, 9, 32, .55);
  --hi: rgba(255, 255, 255, .7);   /* reflejo superior de las superficies */

  /* Movimiento */
  --d-fast: 140ms; --d-panel: 240ms; --d-nav: 220ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);

  /* Barra lateral */
  --rail-w: 72px; --rail-open: 248px;

  /* Paleta de origen (la de siempre) + el azul crepúsculo del paisaje */
  --dusk: #24529A;

  /* Horizonte por defecto (Actuar): cobalto, violeta y brasa, el atardecer original */
  --hz-1: #2F3BFF; --hz-2: #7B3CFF; --hz-3: #FF5B1F;
  --hz-strength: .55;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --e1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 1px 2px rgba(0, 0, 0, .4);
    --e2: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 22px 44px -24px rgba(0, 0, 0, .8);
    --hi: rgba(255, 255, 255, .045);
    --hz-strength: .8;
  }
}
:root[data-theme="dark"] {
  --e1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 1px 2px rgba(0, 0, 0, .4);
  --e2: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 22px 44px -24px rgba(0, 0, 0, .8);
  --hi: rgba(255, 255, 255, .045);
  --hz-strength: .8;
}

/* Zonas: cada grupo del menú tiene su luz. Las operativas, más tenue. */
.zone-seguir     { --hz-1: #7B3CFF; --hz-2: #E5484D; --hz-3: #FF5B1F; }
.zone-evaluar    { --hz-1: #24529A; --hz-2: #2F3BFF; --hz-3: #0E9F6E; }
.zone-descubrir  { --hz-1: #FF5B1F; --hz-2: #F2B654; --hz-3: #2F3BFF; }
.zone-resultados { --hz-1: #0E9F6E; --hz-2: #24529A; --hz-3: #2F3BFF; }
.zone-sistema    { --hz-1: #24529A; --hz-2: #4A5175; --hz-3: #24529A; --hz-strength: .3; }
.zone-agencias   { --hz-1: #0E9F6E; --hz-2: #24529A; --hz-3: #7B3CFF; }

/* ---------- Base ---------- */
body { font-family: var(--font); font-size: var(--t-body); line-height: 1.55; }
body::before { /* el horizonte: luz difusa al pie de la cabecera, con grano fino para que no haga bandas */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 460px; z-index: -1; pointer-events: none; filter: none;
  background:
    radial-gradient(40% 52% at 16% 44%, color-mix(in srgb, var(--hz-1) calc(var(--hz-strength) * 100%), transparent), transparent 70%),
    radial-gradient(36% 46% at 50% 56%, color-mix(in srgb, var(--hz-2) calc(var(--hz-strength) * 85%), transparent), transparent 70%),
    radial-gradient(32% 44% at 86% 46%, color-mix(in srgb, var(--hz-3) calc(var(--hz-strength) * 70%), transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
  opacity: .62; height: 400px;
}
body::after { /* grano sobre el horizonte */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 460px; z-index: -1; pointer-events: none;
  background-image: var(--noise); background-size: 200px; mix-blend-mode: overlay; opacity: .18;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

main { max-width: 1280px; padding: 8px 40px 96px; margin: 0 auto; }
h1, h2, h3 { font-variation-settings: "wdth" var(--w-head); }
h1 { font-size: var(--t-h1); font-weight: 780; line-height: 1.04; letter-spacing: -.03em; margin: 30px 0 10px; }
main > h1:first-child, main > .alert + h1, main > .toast + h1, main > p:first-child + h1 { margin-top: 34px; }
main > h1 + p.muted, main > h1 + .muted, .sec-head h1 + p { font-size: 1rem; line-height: 1.5; max-width: 64ch; color: var(--ink-2); margin: 0 0 var(--s5); }
h2 { font-size: var(--t-h2); font-weight: 720; letter-spacing: -.015em; }
h3 { font-size: var(--t-h3); font-weight: 680; letter-spacing: -.005em; }
.muted { color: var(--ink-2); }
small, .small { font-size: var(--t-meta); }
.num, td.num, .kpi strong, .ledger b { font-variant-numeric: tabular-nums; }

/* ---------- Barra lateral ---------- */
body.has-rail { padding-left: var(--rail-w); }
:root[data-rail="open"] body.has-rail { padding-left: var(--rail-open); }
.rail {
  position: fixed; z-index: 140; left: 0; top: 0; bottom: 0; width: var(--rail-w); display: flex; flex-direction: column;
  padding: 14px 12px; gap: 10px; background: var(--paper); border-right: 1px solid var(--line-2);
  transition: width var(--d-nav) var(--ease-out), box-shadow var(--d-nav) var(--ease-out);
  overflow: hidden;
}
:root[data-rail="open"] .rail, .rail:hover, .rail:focus-within { width: var(--rail-open); }
:root:not([data-rail="open"]) .rail:hover, :root:not([data-rail="open"]) .rail:focus-within { box-shadow: var(--e3); }
.rail-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.rail-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; flex: 1; }
.rail-mark {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  font-weight: 820; font-size: 1.15rem; font-variation-settings: "wdth" var(--w-display);
  background: radial-gradient(120% 120% at 20% 110%, #FF5B1F 0, transparent 55%), linear-gradient(150deg, #2F3BFF, #7B3CFF);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.rail-word { white-space: nowrap; font-weight: 800; font-variation-settings: "wdth" var(--w-display); letter-spacing: -.02em; font-size: .98rem; line-height: 1.1; }
.rail-word small { display: block; font-weight: 550; font-variation-settings: "wdth" 100; letter-spacing: 0; color: var(--ink-3); font-size: .74rem; }
.rail-pin {
  flex: none; width: 32px; height: 32px; padding: 0; border-radius: 10px; background: transparent; color: var(--ink-3); box-shadow: none;
  transition: transform var(--d-panel) var(--ease-out), color var(--d-fast);
}
.rail-pin svg { width: 18px; height: 18px; }
.rail-pin:hover { background: var(--row-hover); color: var(--ink); transform: none; box-shadow: none; }
:root:not([data-rail="open"]) .rail-pin { transform: rotate(180deg); }
:root:not([data-rail="open"]) .rail-pin:hover { transform: rotate(180deg); }
.rail-nav { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-group { padding: 6px 0; }
.rail-group + .rail-group { border-top: 1px solid var(--line-2); }
.rail-label { margin: 6px 12px 4px; font-size: var(--t-label); font-weight: 650; color: var(--ink-3); white-space: nowrap; opacity: 0; height: 0; overflow: hidden; transition: opacity var(--d-fast); }
:root[data-rail="open"] .rail-label, .rail:hover .rail-label, .rail:focus-within .rail-label { opacity: 1; height: auto; }
.rail a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; margin: 1px 0; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 560; font-size: .9rem; white-space: nowrap;
  transition: background-color var(--d-fast), color var(--d-fast);
}
.rail a .ico { flex: none; width: 20px; height: 20px; }
.rail-text { opacity: 0; transition: opacity var(--d-fast); }
:root[data-rail="open"] .rail-text, .rail:hover .rail-text, .rail:focus-within .rail-text { opacity: 1; }
.rail a:hover { background: var(--row-hover); color: var(--ink); }
.rail a.on { color: var(--ink); background: var(--tint-cobalt); }
.rail a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--hz-1), var(--hz-2)); }
.rail a.on .ico { color: var(--cobalt); }
.rail-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font-size: .7rem; font-weight: 700; color: var(--ink); background: var(--line-2); font-variant-numeric: tabular-nums;
}
:root:not([data-rail="open"]) .rail:not(:hover):not(:focus-within) .rail-badge {
  position: absolute; top: 4px; left: 28px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--ember);
}
.rail-group.is-system a { height: 34px; font-size: .84rem; }
.rail-out { color: var(--ink-3) !important; }
/* Etiqueta flotante en modo compacto (teclado incluido) */
:root:not([data-rail="open"]) .rail:not(:hover) a:focus-visible::after {
  content: attr(data-tip); position: fixed; left: calc(var(--rail-w) + 8px); padding: 6px 10px; border-radius: 8px;
  background: var(--ink); color: var(--ice); font-size: .8rem; font-weight: 600; pointer-events: none;
}
.rail-scrim { position: fixed; inset: 0; z-index: 130; background: rgba(6, 9, 32, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rail-open { display: none; }

/* ---------- Barra superior ---------- */
.top {
  gap: 14px; padding: 12px 40px; background: color-mix(in srgb, var(--ice) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
}
.top.hidden { transform: translateY(-100%); }
.crumb { margin: 0 auto 0 0; display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.crumb span { font-size: var(--t-meta); color: var(--ink-3); font-weight: 560; }
.crumb span::after { content: "/"; margin-left: 8px; color: var(--line); }
.crumb b { font-weight: 720; font-variation-settings: "wdth" var(--w-head); letter-spacing: -.01em; font-size: 1rem; }
.gsearch { width: min(420px, 38vw); }
.gsearch input { background-color: var(--paper); border-color: var(--line-2); padding-right: 38px; height: 40px; }
.gsearch-key {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 .72rem var(--font); color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; pointer-events: none;
}
.gsearch input:focus + .gsearch-key { opacity: 0; }
.gsearch-list { box-shadow: var(--e3); border-color: var(--line-2); border-radius: var(--r-md); }
.quick-open { height: 40px; }
.theme-toggle { width: 40px; height: 40px; border-color: var(--line-2); }

/* ---------- Botones ---------- */
button, .btn {
  border-radius: 999px; font-weight: 640; letter-spacing: -.005em;
  transition: background-position .32s var(--ease-out), transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast) var(--ease-out), color var(--d-fast);
}
button:hover, .btn:hover { transform: translateY(-1px); }
button:active, .btn:active { transform: scale(.97); transition-duration: 80ms; }
button.is-loading, .btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
button.is-loading::after, .btn.is-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
button.secondary.is-loading::after, .btn.secondary.is-loading::after { border-color: var(--line); border-top-color: var(--cobalt); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pestañas: control segmentado ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 999px; flex-wrap: wrap; }
.tabs a { border: 0; background: transparent; padding: 7px 14px; font-weight: 600; font-size: .88rem; transition: background-color var(--d-fast), color var(--d-fast), box-shadow var(--d-fast); }
.tabs a:hover { color: var(--ink); background: var(--row-hover); }
.tabs a.on { background: var(--paper); color: var(--ink); box-shadow: var(--e1), 0 0 0 1px var(--line-2); }
.tabs a.on b { background: var(--tint-cobalt); color: var(--cobalt); }

/* ---------- Superficies ---------- */
.card, .op-card, .kpi, .tablewrap {
  border-color: var(--line-2); box-shadow: var(--e1);
  background-image: linear-gradient(180deg, var(--hi), transparent 120px);
}
.op-card { border-radius: var(--r-md); padding: 18px 18px 16px 20px; transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast) var(--ease-out), border-color var(--d-fast); }
.op-card::before { left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; }
.op-card:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.op-title { font-size: 1.04rem; font-weight: 680; font-variation-settings: "wdth" 108; letter-spacing: -.01em; }
.op-sub, .op-top .when, .op-facts dt { font-variation-settings: "wdth" var(--w-data); }
.chip { font-weight: 600; letter-spacing: 0; }
.sec-head { margin: 44px 0 14px; }
.sec-head h2 { font-size: var(--t-h2); }
.sec-head p { font-size: .9rem; }
.kpi::after { display: none; }
.kpi strong { font-variation-settings: "wdth" 112; font-weight: 760; }

/* ---------- Sugerencias de la IA: identidad propia, sobria (violeta, sin insignias brillantes) ---------- */
.insight {
  position: relative; border-radius: var(--r-md); padding: 18px 18px 16px; border: 1px solid color-mix(in srgb, var(--violet) 26%, var(--line-2));
  background:
    radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--violet) 9%, transparent), transparent 70%),
    var(--paper);
  display: flex; flex-direction: column; gap: 8px;
}
.insight::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px; background: linear-gradient(90deg, var(--violet), transparent); }
.insight-by { display: flex; align-items: center; gap: 8px; font-size: var(--t-meta); font-weight: 650; color: var(--violet); }
.insight-by::before { content: ""; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--violet); }
.insight-by.rules { color: var(--cobalt); }
.insight-by.rules::before { background: transparent; border: 1.5px solid var(--cobalt); border-radius: 50%; transform: none; width: 6px; height: 6px; }
.insight.rules { border-color: var(--line-2); background: var(--paper); }
.insight.rules::before { background: linear-gradient(90deg, var(--cobalt), transparent); opacity: .6; }
.insight .when { margin-left: auto; color: var(--ink-3); font-weight: 500; }
.insight h3 { margin: 0; font-size: 1.02rem; font-weight: 680; line-height: 1.3; }
.insight p { margin: 0; }

/* ---------- Línea de tiempo con indicador de canal ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 16px 34px; }
.timeline .tl-dot {
  position: absolute; left: 4px; top: 3px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line);
}
.timeline .tl-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.timeline .ch-linkedin { --c: #2F7BFF; } .timeline .ch-email { --c: var(--violet); } .timeline .ch-telefono { --c: var(--mint); }
.timeline .ch-reunion { --c: var(--ember); } .timeline .ch-whatsapp { --c: #22B35E; }
.timeline .tl-dot.in { box-shadow: 0 0 0 1.5px var(--c, var(--line)); }
.tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: .9rem; }
.tl-head b { font-weight: 640; }
.tl-head time { margin-left: auto; font-size: var(--t-meta); color: var(--ink-3); white-space: nowrap; font-variation-settings: "wdth" var(--w-data); }
.tl-kind { font-size: var(--t-meta); color: var(--ink-2); }
.tl-text { margin: 2px 0 0; font-size: .86rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Libro de métricas (sin cajas) ---------- */
.ledger { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.ledger li { padding: 0 28px 0 0; margin: 0 28px 0 0; border-right: 1px solid var(--line); }
.ledger li:last-child { border-right: 0; margin-right: 0; }
.ledger b { display: block; font-size: 2.2rem; line-height: 1; font-weight: 760; font-variation-settings: "wdth" 112; letter-spacing: -.03em; }
.ledger span { display: block; margin-top: 6px; font-size: var(--t-meta); color: var(--ink-2); }
.ledger a { color: inherit; text-decoration: none; }
.ledger a:hover b { color: var(--cobalt); }

/* ---------- Antigüedad ---------- */
.age { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-meta); color: var(--ink-2); font-variation-settings: "wdth" var(--w-data); white-space: nowrap; }
.age::before {
  content: ""; width: 48px; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--age-c, var(--mint)) calc(var(--a, 0) * 100%), var(--line-2) 0);
}
.age.mid { --age-c: var(--amber); } .age.old { --age-c: var(--ember); }
.new-signal { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-meta); font-weight: 650; color: var(--ember); }
.new-signal::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 22%, transparent); }

/* ---------- Panel lateral (drawer) ---------- */
dialog.side {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(520px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; border-left: 1px solid var(--line-2); background: var(--paper); color: var(--ink); box-shadow: var(--e3);
}
dialog.side[open] { animation: side-in var(--d-panel) var(--ease-out); }
dialog.side::backdrop { background: rgba(6, 9, 32, .38); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes side-in { from { transform: translateX(32px); opacity: 0; } }
.side-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; background: var(--paper); border-bottom: 1px solid var(--line-2); }
.side-head h2 { margin: 0; font-size: 1.3rem; }
.side-head p { margin: 2px 0 0; color: var(--ink-2); font-size: .88rem; }
.side-head > div { flex: 1; min-width: 0; }
.side-body { padding: 18px 22px 40px; }
.side-body h3 { font-size: .92rem; margin: 22px 0 10px; color: var(--ink-2); }
.side-loading { padding: 40px 22px; display: grid; gap: 12px; }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), var(--paper-2), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.w40 { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Avisos de confirmación ---------- */
.toast {
  position: fixed; z-index: 300; right: 24px; bottom: 24px; max-width: min(440px, calc(100vw - 32px)); display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--ice); box-shadow: var(--e3); font-weight: 550; font-size: .92rem;
  animation: toast-in var(--d-panel) var(--ease-out);
}
.toast::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--mint); }
.toast.error::before { background: var(--rose); } .toast.warn::before { background: var(--amber); }
.toast span { flex: 1; }
.toast-x { flex: none; width: 26px; height: 26px; padding: 0; border-radius: 8px; background: transparent; color: inherit; box-shadow: none; font-size: 1.1rem; opacity: .7; }
.toast-x:hover { opacity: 1; background: rgba(255, 255, 255, .12); transform: none; box-shadow: none; }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity var(--d-panel), transform var(--d-panel); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Tooltips simples (title enriquecido con data-tip fuera de la barra) ---------- */
[data-hint] { position: relative; }
[data-hint]:hover::after, [data-hint]:focus-visible::after {
  content: attr(data-hint); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; z-index: 50;
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--ice); font-size: .78rem; font-weight: 600; pointer-events: none;
  animation: toast-in var(--d-fast) var(--ease-out);
}

/* ---------- Diálogo Crear ---------- */
dialog.quick { border-radius: var(--r-lg); border-color: var(--line-2); }
.qa { transition: background-color var(--d-fast), box-shadow var(--d-fast), transform var(--d-fast) var(--ease-out); }

/* ---------- Transición entre páginas (navegadores que la soportan) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ease-out); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { main { padding: 8px 28px 80px; } .top { padding: 12px 28px; } }
@media (max-width: 900px) {
  body.has-rail, :root[data-rail="open"] body.has-rail { padding-left: 0; }
  .rail { width: var(--rail-open); transform: translateX(-100%); transition: transform var(--d-panel) var(--ease-out); box-shadow: var(--e3); }
  .rail.open { transform: none; }
  .rail .rail-text, .rail .rail-label { opacity: 1; height: auto; }
  .rail .rail-badge { position: static !important; width: auto !important; min-width: 20px !important; height: 20px !important; font-size: .7rem !important; padding: 0 6px !important; background: var(--line-2) !important; }
  .rail-pin { display: none; }
  .rail-open { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
  .rail-open svg { width: 20px; height: 20px; }
  .rail-open:hover { transform: none; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .crumb span { display: none; }
  .gsearch { order: 10; width: 100%; }
  main { padding: 4px 16px 72px; }
  .ledger li { padding-right: 18px; margin-right: 18px; }
  .ledger b { font-size: 1.8rem; }
}
@media (max-width: 560px) {
  .ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .ledger li { border: 0; margin: 0; padding: 0; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}
.side-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.side-tasks li { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 2px; }
.side-tasks a { font-weight: 600; text-decoration: none; color: var(--ink); }
.side-links { margin-top: 18px; font-size: .9rem; }
.side-content .sheet-actions { margin: 14px 0 6px; }
