/* =====================================================================
   Film Fest Monitor — estilos
   ===================================================================== */

:root {
  --bg: #ffffff;
  --soft: #f4f4f6;
  --soft-2: #eaeaee;
  --ink: #0b0b0d;
  --ink-2: #3a3a40;
  --muted: #6e6e76;
  --line: #e7e7eb;
  --open: #12a150;
  --open-ink: #ffffff;
  --open-tint: #e7f6ee;
  --soon: #ffc21a;
  --soon-ink: #2a2000;
  --soon-tint: #fff6db;
  --closed: #e3342f;
  --closed-ink: #ffffff;
  --closed-tint: #fdeceb;
  --live: #18b45c;
  --brand: #18b45c;          /* verde del logo: hilo conductor de la marca */
  --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --soon-strong: #e8a200;    /* amarillo anaranjado legible sobre blanco para cifras grandes */
  --shadow: 0 12px 40px rgba(10, 10, 20, .12), 0 2px 6px rgba(10, 10, 20, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header: 58px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0c0e;
  --soft: #17171a;
  --soft-2: #232327;
  --ink: #f2f2f4;
  --ink-2: #cfcfd5;
  --muted: #9b9ba4;
  --line: #27272c;
  --open: #22c06c;
  --open-ink: #03150a;
  --open-tint: #0f251a;
  --soon-tint: #2a2208;
  --soon-strong: #ffc21a;
  --brand-soft: color-mix(in srgb, var(--brand) 20%, transparent);
  --closed: #f0524d;
  --closed-ink: #1c0303;
  --closed-tint: #2a1110;
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header) + 72px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Archivo, system-ui, sans-serif; font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.display { font-stretch: 62%; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; line-height: .92; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--ink); color: var(--bg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

/* Vistas: portada / listado completo */
body.is-todas .home-only { display: none !important; }
body:not(.is-todas) .todas-only { display: none !important; }

/* ---------- Botones genéricos ---------- */
/* Regla base de todos los botones: contenido centrado en los dos ejes con flex,
   separación fija entre icono y texto, y altura fija (el texto no la empuja). */
.btn, .pill-btn, .chip-link, .opt, .ptipo, .chip-x, .status, .seg button, .fab {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; vertical-align: middle; line-height: 1;
}
.btn {
  gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); background: var(--bg); cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background-color .15s, transform .15s, box-shadow .2s;
}
.btn > svg, .pill-btn > svg, .chip-link > svg, .fab > svg { display: block; flex: none; }
.btn:hover { border-color: var(--ink); }
.btn:active, .pill-btn:active, .icon-btn:active { transform: scale(.96); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.big { height: 46px; padding: 0 24px; font-size: 14px; font-weight: 700; }
.btn.big svg { transition: transform .25s var(--ease); }
.btn.big:hover svg { transform: translateX(4px); }
.btn.block { width: 100%; height: 46px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn {
  width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); cursor: pointer; color: var(--ink-2);
  transition: border-color .15s, background-color .15s, color .15s, transform .15s, box-shadow .25s ease;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: var(--soft); }
.icon-btn svg { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.link:hover { color: var(--ink); }
.link.small { font-size: 12px; }
.danger { color: var(--closed); }

/* ---------- Cabecera ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
/* Logo «F que reproduce»: la F toma el color del texto (negra de día, blanca de noche) y el play es verde */
.brand-logo { width: 34px; height: 34px; flex: none; color: var(--ink); overflow: visible; }
.brand-logo .bl-play { transform-box: fill-box; transform-origin: center; transition: transform .4s var(--ease); }
/* Al pasar el ratón, el play avanza y crece un poco, como si arrancara la película (en unidades del dibujo de 64) */
.brand:hover .bl-play, .brand:focus-visible .bl-play { transform: translateX(6px) scale(1.12); }
.brand-name { font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; font-size: 16px; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 8px; }
.nav { display: flex; gap: 2px; margin-right: 6px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 500; padding: 7px 11px; border-radius: 999px; transition: color .15s, background-color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
.menu-btn { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 13px; line-height: 1; border: 0; cursor: pointer; text-decoration: none; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.theme-ico-sun { display: none; }
:root[data-theme="dark"] .theme-ico-sun { display: block; }
:root[data-theme="dark"] .theme-ico-moon { display: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Portada ---------- */
.hero { position: relative; padding: 56px 0 40px; text-align: center; transition: padding .3s var(--ease); }
/* Foco de luz suave desde arriba: da profundidad sin añadir color */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 55% 60% at 50% 0%, color-mix(in srgb, var(--open) 13%, transparent), transparent 70%); }
body.is-todas .hero::before { display: none; }
body.is-todas .hero { padding: 24px 0 0; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin-bottom: 28px; letter-spacing: .02em; padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--bg) 80%, transparent); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 2.4s ease-in-out infinite; }
/* Los tres números en una tarjeta con relieve, cada uno con su mini gráfico.
   overflow:hidden contiene cualquier brillo dentro de las esquinas redondeadas. */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; max-width: 940px; margin: 0 auto 48px; padding: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 26px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 60px -36px rgba(10, 10, 20, .35); }
:root[data-theme="dark"] .stats { background: var(--soft); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8); }
/* Cada columna: número, etiqueta y gráfico apilados y centrados en los dos ejes */

/* El número: caja recortada a la altura real de las cifras para que el centrado sea exacto */

/* Halo al pasar el ratón: ocupa toda la columna y está centrado en ella (no en la cifra).
   «closest-side» hace que el círculo toque justo los bordes de arriba y abajo: nunca se corta. */

/* Mini gráficos bajo cada número */

/* Medidor: qué parte del catálogo está en ese estado. Escala a cualquier número de convocatorias. */

@keyframes aparece { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes latidoVerde { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--open) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

@keyframes crece { from { transform: scaleX(0); } to { transform: none; } }

/* Buscador */
.search { position: relative; max-width: 1000px; margin: 0 auto; text-align: left; }
.search-box { position: relative; }
.search-box > svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 50px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--bg); font-size: 16px; padding: 0 60px 0 52px;
  --ring: transparent;
  box-shadow: 0 0 0 5px var(--ring), 0 14px 34px -24px rgba(10, 10, 20, .45);
  -webkit-appearance: none; appearance: none; transition: box-shadow .3s ease, border-color .3s ease, height .3s var(--ease), font-size .3s var(--ease);
}
body.is-todas .search input { height: 44px; font-size: 15px; }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
/* Un único efecto, en la caja entera (no en el input), así el icono o la tecla «/» no lo cortan */
.search-box:hover input { --ring: var(--soft); }
.search input:focus, .search-box:hover input:focus { outline: none; --ring: var(--brand-soft); }
.search kbd { pointer-events: none; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 600 11px/1.5 Archivo, sans-serif; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 7px; }
.search-clear { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.search-clear:active { transform: translateY(-50%) scale(.96); }
.search.has-text kbd { display: none; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 25;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 6px; list-style: none; margin: 0; max-height: min(440px, 60vh); overflow: auto;
  transform-origin: top center; animation: drop .22s var(--ease);
}
.suggest .sg-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 12px 4px; }
.suggest .sg-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.suggest .sg-item[aria-selected="true"], .suggest .sg-item:hover { background: var(--soft); }
.suggest .sg-item b { font-weight: 600; display: block; }
.suggest .sg-item small { color: var(--muted); font-size: 12px; }
.suggest .sg-all { display: block; text-align: center; padding: 10px; font-size: 14px; color: var(--muted); cursor: pointer; border-radius: 12px; }
.suggest .sg-all:hover { background: var(--soft); color: var(--ink); }
.suggest .sg-empty { padding: 16px 12px; color: var(--muted); font-size: 14px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.tools { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 16px; }
.quick { display: flex; gap: 2px; }
.fab { display: none; }
.tools-sep { width: 1px; height: 18px; background: var(--line); margin: 0 8px; flex: none; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; }
.chip-link:hover { background: var(--soft); color: var(--ink); }
.chip-link span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; transition: border-color .15s, background-color .15s, color .15s, transform .15s, box-shadow .25s ease;
}
.pill-btn:hover { border-color: var(--ink); }
.pill-btn[aria-pressed="true"], .pill-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill-btn .n { font-size: 11px; line-height: 18px; height: 18px; background: var(--soft-2); color: var(--ink); border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.pill-btn svg { width: 14px; height: 14px; flex: none; }
.pill-btn .caret { transition: transform .3s var(--ease); }
.pill-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* Paneles que se despliegan: animan la altura con grid (barato, sin medir con JS) */
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.collapse > .collapse-in { overflow: hidden; min-height: 0; opacity: 0; transform: translateY(-6px); transition: opacity .28s ease, transform .4s var(--ease); }
.collapse.is-open { grid-template-rows: 1fr; }
.collapse.is-open > .collapse-in { opacity: 1; transform: none; }

/* ---------- Listado ---------- */
.listing { padding: 16px 0 72px; outline: none; }
body.is-todas .listing { padding-top: 32px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); padding-bottom: 12px; }
.list-head h2 { margin: 0; font-size: clamp(30px, 4.6vw, 44px); }
.list-head p { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.list-head p:empty { display: none; }

.toolbar {
  position: sticky; top: var(--header); z-index: 15; background: var(--bg);
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; height: 34px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1; color: var(--muted); transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.select { position: relative; display: inline-flex; }
.select select {
  -webkit-appearance: none; appearance: none; height: 34px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); padding: 0 36px 0 14px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.select select:hover { border-color: var(--ink); }
.select::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg);
}

.filters-card { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }

.fgroup h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.help { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.help:hover { color: var(--ink); border-color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; height: 30px; padding: 0 12px; font-size: 12.5px; line-height: 1; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ffoot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.active { display: flex; flex-wrap: wrap; gap: 6px; }

.chip-x { display: inline-flex; align-items: center; gap: 6px; height: 28px; background: var(--soft); border: 0; border-radius: 999px; padding: 0 12px; font-size: 13px; line-height: 1; cursor: pointer; animation: fadein .2s ease; }
.chip-x::after { content: "×"; font-size: 16px; color: var(--muted); }
.chip-x:hover { background: var(--soft-2); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.group-title { display: flex; align-items: center; gap: 10px; margin: 32px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.group-title .n { font-weight: 600; background: var(--soft); color: var(--ink); border-radius: 999px; padding: 0 8px; letter-spacing: 0; }

ul.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); transition: border-color .2s; animation: rowin .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes rowin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.row-top { display: grid; grid-template-columns: 1fr auto; align-items: center; border-radius: 14px; transition: background-color .2s; }
.row-top:hover { background: var(--soft); }
/* La fila resaltada es una pastilla redondeada: se apagan su línea de abajo y la de la fila anterior
   para que ninguna línea recta corte las esquinas redondas */

.row-head {
  display: grid; grid-template-columns: 104px 1fr 124px 18px; align-items: center; gap: 18px;
  width: 100%; padding: 14px 4px 14px 12px; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 14px;
}
.status { display: inline-flex; align-items: center; justify-content: center; height: 22px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; padding: 0 10px; letter-spacing: .01em; white-space: nowrap; font-style: normal; justify-self: start; }
.s-open { background: var(--open); color: var(--open-ink); }
.s-soon { background: var(--soon); color: var(--soon-ink); }
.s-closed { background: var(--closed); color: var(--closed-ink); }
/* Sin publicar: mismo rojo, pero solo contorno y punteado = «en espera», no «terminado» */
.s-pending { background: transparent; color: var(--closed); box-shadow: inset 0 0 0 1.5px var(--closed); }
.s-pending::before { content: ""; width: 5px; height: 5px; border-radius: 50%; border: 1.5px solid currentColor; margin-right: 5px; }
.row-title { display: block; font-size: 15.5px; font-weight: 620; line-height: 1.3; }
.row-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row-why { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.row-why svg { width: 14px; height: 14px; color: var(--open); flex: none; }
.row-date { text-align: right; }
.row-date b { display: block; font-size: 22px; }
.row-date small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.row-date.urgent small { color: var(--closed); font-weight: 700; }
.chev { width: 18px; height: 18px; transition: transform .35s var(--ease); color: var(--muted); }
.row.open .chev { transform: rotate(180deg); }
.star { width: 36px; height: 36px; margin-right: 6px; border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); display: grid; place-items: center; border-radius: 50%; transition: color .15s, background-color .15s; }
.star:hover { color: var(--ink); background: var(--soft-2); }
.star svg { width: 17px; height: 17px; }
.star[aria-pressed="true"] { color: var(--ink); }
.star[aria-pressed="true"] svg { fill: currentColor; animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.3); } }

/* Panel de la ficha abierta: fondo gris redondeado, distinto de las líneas que separan convocatorias */
.row-body-in { margin: 10px 12px 40px 134px; padding: 18px; display: grid; gap: 14px; background: var(--soft); border-radius: 18px; }
/* Plazos (izquierda) y datos (derecha) empiezan a la misma altura */
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items: stretch; }
.dcard { background: var(--bg); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.dcard-h { margin: 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.dcard .verified { margin: auto 0 0; padding-top: 6px; }
.actions-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
.btn.strong { border: 1.5px solid var(--ink); font-weight: 650; }
.btn.strong:hover { background: var(--bg); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; line-height: 18px; border-radius: 999px; padding: 0 9px; color: var(--muted); background: var(--soft); }
.facts { margin: 0; display: grid; gap: 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1px; }
.facts dd { margin: 0; color: var(--ink-2); }
.estimate { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
ol.plazos { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
ol.plazos li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; color: var(--ink-2); }
ol.plazos li + li { border-top: 1px dashed var(--line); }
ol.plazos li.past { color: var(--muted); text-decoration: line-through; }
ol.plazos li.next { font-weight: 700; color: var(--ink); }
ol.plazos time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ext { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 8px; }
.ext svg { width: 14px; height: 14px; }
.ext:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.verified { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.verified svg { width: 14px; height: 14px; color: var(--open); flex: none; }

.notify { margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 14px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.notify > svg { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
.notify p { margin: 0; flex: 1; color: var(--ink-2); line-height: 1.35; }
.notify.on { background: var(--open-tint); }
.notify.on > svg { color: var(--open); }

.more { display: flex; justify-content: center; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* Vista por meses */
.month { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); animation: rowin .45s var(--ease) both; }
.month h3 { margin: 0; font-size: 28px; }
.month h3 small { display: block; font-size: 13px; color: var(--muted); font-stretch: 100%; font-weight: 500; text-transform: none; letter-spacing: 0; margin-top: 6px; }
.month ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.month li button { width: 100%; display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.month li button:hover { background: var(--soft); }
.month .day { font-size: 24px; text-align: center; }
.month .what { font-size: 14px; font-weight: 600; }
.month .what small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* ---------- Secciones de la portada ---------- */

.para-ti { padding: 0 0 72px; }
.para-ti .list-head { border-bottom-width: 1px; border-color: var(--line); }
.para-ti h2 { font-size: clamp(28px, 5vw, 40px); }

.tipos { padding: 64px 0; border-top: 1px solid var(--line); }
.tipos h2, .how h2 { margin: 0 0 28px; font-size: clamp(30px, 4.6vw, 44px); }
.tipos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tipo-card { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); transition: border-color .25s, transform .35s var(--ease); }
/* Sombra precalculada en una capa que solo cambia de opacidad: no hay que repintarla en cada fotograma */
.tipo-card::after { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none; box-shadow: var(--shadow); opacity: 0; transition: opacity .35s var(--ease); }
.tipos-grid { isolation: isolate; }
.tipo-card:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.tipo-card:hover::after { opacity: 1; }
.tc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.tipo-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; flex: none; }
.tipo-ico svg { width: 19px; height: 19px; }
.tipo-card .when { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); background: var(--soft); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.tipo-card h3 { margin: 0 0 10px; font-size: 28px; }
.tipo-card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.tc-gets { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.tc-label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.gets li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.gets li svg { width: 15px; height: 15px; color: var(--open); flex: none; }
.tc-link { margin-top: auto; padding-top: 28px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 650; text-decoration: none; }
.tc-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.tipo-card:hover .tc-link svg { transform: translateX(4px); }
.tc-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.tc-cta { background: var(--soft); border-color: transparent; justify-content: center; gap: 14px; }
.tc-cta:hover { border-color: transparent; transform: none; }
.tc-cta::after, .tipos-list .tipo-card::after { display: none; }
.tc-cta h3 { font-size: 30px; margin: 0; }
.tc-cta .btn { align-self: flex-start; margin-top: 8px; }
.tipo-card .ej { font-size: 12px; color: var(--muted); margin-top: 8px; }
.tipos-list { display: grid; gap: 4px; margin-top: 16px; }
.tipos-list .tipo-card { flex-direction: row; align-items: flex-start; gap: 14px; padding: 14px; border: 0; border-radius: 14px; }
.tipos-list .tipo-card:hover { transform: none; background: var(--soft); }
.tipos-list .tipo-card h3 { font-size: 22px; margin: 0 0 4px; }
.tipos-list .tipo-card p { margin: 6px 0 10px; font-size: 13.5px; }
.tipos-list .tipo-card .when { display: inline-block; margin-bottom: 8px; }
.tipos-list .gets { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tipos-list .gets li { font-size: 13px; gap: 6px; }
.tipos-list .tipo-card .tipo-ico { flex: none; }

.how { background: var(--soft); padding: 64px 0; }
.how h2 { margin-bottom: 24px; }
/* Mismo lenguaje que las tarjetas de colores: tarjeta blanca sobre fondo gris */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.step { background: var(--bg); border-radius: 14px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.step-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.step-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; }
.step-ico svg { width: 18px; height: 18px; }
.steps b { display: block; font-size: 28px; line-height: 1; color: var(--line); }
:root[data-theme="dark"] .steps b { color: var(--soft-2); }
.steps h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.3; }
.steps p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.legend-title { margin: 40px 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.legend-card { position: relative; background: var(--bg); border-radius: 14px; padding: 16px; display: grid; gap: 10px; grid-template-rows: auto 1fr auto; justify-items: start;
  color: inherit; text-decoration: none; transition: transform .3s var(--ease); }
.legend-card p { margin: 0; font-size: 13px; color: var(--muted); }
/* Al pasar el ratón: un contorno y un brillo verdes muy suaves que aparecen solo con opacidad */
.legend-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 55%, transparent), 0 10px 30px -14px color-mix(in srgb, var(--brand) 55%, transparent);
  opacity: 0; transition: opacity .3s ease; }
.legend-card:hover::after, .legend-card:focus-visible::after { opacity: 1; }
.lc-go { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); transition: color .2s; }
.lc-go svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }

.legend-card:hover .lc-go svg { transform: translateX(4px); }

.newsletter .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.newsletter h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); }
.newsletter p { margin: 0; color: var(--muted); font-size: 14px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); padding: 0 18px; font-size: 15px; }
.inline-form input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.inline-form .btn { height: 44px; }
.fine { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* Aparición al hacer scroll (solo si hay JavaScript y no se ha pedido reducir el movimiento) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Perfil ---------- */
.profile { padding: 40px 0 80px; }
.p-head { display: flex; align-items: center; gap: 18px; }
.p-head h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); }
.p-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 4px; margin: 24px 0 0; border-bottom: 1.5px solid var(--ink); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; border: 0; background: none; height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 4px; border-radius: 4px 4px 0 0; background: var(--brand); }
.tab .n { font-size: 12px; line-height: 20px; height: 20px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--ink); text-align: center; }
.tab-panel { padding-top: 8px; animation: fadein .3s ease; }
.tab-intro { color: var(--muted); font-size: 14px; margin: 16px 0 8px; }
.interests { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.toggles { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 16px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; font-size: 14px; background: var(--bg); cursor: pointer; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle span b { display: block; font-weight: 600; }
.toggle span small { color: var(--muted); font-size: 13px; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--soft-2); position: relative; cursor: pointer; flex: none; transition: background-color .25s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch:checked { background: var(--open); }
.switch:checked::after { transform: translateX(18px); }
.kv { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 16px; margin-top: 16px; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.account-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.demo-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: var(--soft); border-radius: 12px; padding: 10px 12px; margin-top: 16px; }
.demo-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ---------- Diálogos ---------- */
dialog {
  border: 0; padding: 0; border-radius: 24px; background: var(--bg); color: var(--ink); overflow: hidden;
  width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow);
}
/* Ventanas de lectura (requisitos, diferencias): casi el doble de grandes, con más aire */
dialog.wide, dialog.big { width: min(880px, calc(100% - 32px)); }
dialog.big .dlg { min-height: min(560px, calc(100dvh - 32px)); display: flex; flex-direction: column; }
dialog[open] { animation: dlgin .3s var(--ease); }
dialog::backdrop { background: rgba(8, 8, 12, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadein .25s ease; }
@keyframes dlgin { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
dialog.sheet { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(360px, 88vw); border-radius: 24px 0 0 24px; }
dialog.sheet[open] { animation: sheetin .35s var(--ease); }
@keyframes sheetin { from { transform: translateX(100%); } to { transform: none; } }
/* El contenido es el que hace scroll (no la ventana), así la barra queda dentro de las esquinas redondeadas */
.dlg { padding: 28px; position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
dialog.wide .dlg, dialog.big .dlg { padding: 44px 48px; }
dialog.sheet .dlg { max-height: 100dvh; }
.dlg h2 { margin: 0 0 6px; font-size: 30px; padding-right: 40px; }
.dlg > form > p, .dlg > p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.dlg .close { position: absolute; top: 14px; right: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; }
.opt-label { color: var(--muted); font-weight: 400; }
.field input { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 16px; font-size: 16px; }
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.dlg .opts { margin-bottom: 18px; }
.group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 0 0 8px !important; }
.prose { font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.prose p { margin: 0 0 10px; }
.menu-links { display: grid; gap: 2px; margin-top: 36px; }
.menu-links a { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1; text-decoration: none; padding: 10px 0; }
.menu-links a:hover { color: var(--muted); }
#menu-account { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Pie ---------- */
footer { padding: 40px 0 48px; font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-note { margin: 14px 0 0; max-width: 460px; }
.foot-links { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; align-content: flex-start; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Avisos flotantes ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .25s, transform .25s var(--ease); pointer-events: none; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.to-top { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Pantallas medianas y móvil ---------- */
@media (max-width: 960px) {
  .legend { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .tipos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .brand-logo { width: 29px; height: 29px; }
  .brand-name { font-size: 14px; letter-spacing: .08em; }
  .top-right { gap: 6px; }
  .top-right .btn-login span { display: none; }
  .top-right .btn-login { width: 36px; padding: 0; }
  .hero { padding-top: 36px; }
  
  .search input, body.is-todas .search input { height: 46px; font-size: 16px; padding-left: 44px; padding-right: 46px; }
  .stats { border-radius: 20px; margin-bottom: 36px; }
  
  
  .search-box > svg { left: 18px; }
  .search kbd { display: none; }
  .toolbar { gap: 8px; position: static; }
  /* Accesos rápidos: una sola fila que se desliza con el dedo, con borde difuminado */
  .tools { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 0; padding: 0 16px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
  .tools::-webkit-scrollbar { display: none; }
  .tools .pill-btn, .tools .chip-link { flex: none; }
  .fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 22; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; box-shadow: var(--shadow); cursor: pointer;
  }
  .fab svg { width: 16px; height: 16px; }
  .fab .n { font-size: 11px; line-height: 18px; height: 18px; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--ink); text-align: center; }
  body:not(.is-todas) .fab { display: none; }
  body.is-todas .listing { padding-bottom: 110px; }
  .toolbar .pill-btn { padding: 0 12px; font-size: 13px; gap: 6px; }
  .toolbar-group:last-child { width: 100%; }
  .toolbar-group:last-child .select { flex: 1; }
  .toolbar-group:last-child .select select { width: 100%; }
  .row-head { grid-template-columns: 1fr auto; grid-template-areas: "status date" "main main"; gap: 8px 12px; padding: 14px 0 14px 8px; }
  .row-head .status { grid-area: status; }
  .row-head .row-main { grid-area: main; }
  .row-head .row-date { grid-area: date; display: flex; align-items: baseline; gap: 8px; }
  .row-date b { font-size: 18px; display: inline; }
  .row-date small { display: inline; margin: 0; }
  .row-head .chev { display: none; }
  .row-top { align-items: start; }
  .star { margin-top: 8px; }
  .row-body-in { margin: 6px 0 32px; padding: 12px; gap: 12px; border-radius: 16px; }
  .detail-grid { grid-template-columns: 1fr; gap: 10px; }
  .dcard { padding: 14px; }
  .actions { gap: 6px; }
  .actions .btn { padding: 0 12px; }
  .btn.strong svg { display: none; }
  .tipos-grid { grid-template-columns: 1fr; }
  .tipos-grid { gap: 12px; }
  .tipo-card { padding: 22px; border-radius: 18px; }
  .tc-top { margin-bottom: 20px; }
  .tipo-card h3 { font-size: 26px; }
  .tc-gets { margin-top: 20px; padding-top: 16px; }
  .tc-link { padding-top: 22px; }
  .steps, .legend { grid-template-columns: 1fr; gap: 16px; }
  .legend { grid-template-columns: 1fr 1fr; gap: 8px; }
  .legend-card { padding: 14px; }
  .steps { gap: 10px; }
  .newsletter .wrap { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
  .month { grid-template-columns: 1fr; gap: 8px; }
  .p-head .avatar.lg { width: 52px; height: 52px; font-size: 18px; }
  .tab { padding: 0 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@media print {
  .top, .hero, .toolbar, .filters, .tipos, .how, .newsletter, footer, .star, .actions, .notify, .to-top, .toast { display: none !important; }
  .collapse { grid-template-rows: 1fr !important; }
  .collapse > .collapse-in { opacity: 1 !important; transform: none !important; }
  body { color: #000; background: #fff; }
}

/* Campana de avisos junto a «Inscribirse» */
.bell.on { color: var(--open); border-color: color-mix(in srgb, var(--open) 45%, transparent); background: var(--open-tint); }
.bell.on:hover { border-color: var(--open); color: var(--open); }
.bell.on svg { fill: currentColor; fill-opacity: .18; animation: ring .6s var(--ease); }
.bell.off { color: var(--closed); border-color: color-mix(in srgb, var(--closed) 35%, transparent); }
.bell.off:hover { border-color: var(--closed); background: var(--closed-tint); color: var(--closed); }
@keyframes ring { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }

/* Campana general (cabecera) y su panel */
.bell-wrap { position: relative; }
#global-bell.on { color: var(--open); border-color: color-mix(in srgb, var(--open) 45%, transparent); background: var(--open-tint); }
#global-bell.on svg { fill: currentColor; fill-opacity: .18; }
#global-bell.off { color: var(--closed); border-color: color-mix(in srgb, var(--closed) 35%, transparent); }
.pop {
  position: absolute; right: -8px; top: calc(100% + 10px); z-index: 40; width: min(560px, calc(100vw - 24px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 20px; text-align: left; animation: drop .22s var(--ease); transform-origin: top right;
}
.pop h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.pop p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.pop p b { color: var(--ink); font-weight: 600; }
.pop .fine { margin: 12px 0 0; }
.pop-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-radius: 999px; padding: 4px 10px 4px 8px; margin-bottom: 12px; }
.pop-state svg { width: 14px; height: 14px; }
.pop-state.on { color: var(--open); background: var(--open-tint); }
.pop-state.off { color: var(--closed); background: var(--closed-tint); }
@media (max-width: 760px) {
  .bell-wrap { position: static; }
  .pop { right: 12px; top: calc(var(--header) - 4px); position: fixed; }
}
/* Tipos dentro de los avisos generales: activado = verde con ✓; desactivado = gris y tachado */
.pop-tipos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; transition: opacity .2s; }
.pop-tipos.is-off { opacity: .55; }
.ptipo { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.ptipo[aria-pressed="true"] { background: var(--open-tint); color: var(--open); border: 1px solid color-mix(in srgb, var(--open) 40%, transparent); }
.ptipo[aria-pressed="true"] svg { width: 12px; height: 12px; flex: none; }
.ptipo[aria-pressed="false"] { background: transparent; color: var(--muted); border: 1px dashed var(--line); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.ptipo:hover { border-style: solid; border-color: var(--ink); }

/* Ventana de requisitos */
.req-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 32px; }
.req-h { margin: 0 0 10px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.req-text { margin: 0 0 32px; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); max-width: 68ch; }
.req-actions { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); }
.req-actions .btn { height: 44px; padding: 0 22px; font-size: 14px; }
#req-title { font-size: clamp(30px, 4.4vw, 44px); padding-right: 56px; }
dialog.big .close, dialog.wide .close { top: 20px; right: 20px; }

/* Dentro del panel gris, las etiquetas van en blanco para que se lean */
.row-body-in .tag { background: var(--bg); }

/* Fecha clave en grande dentro de «Plazos»: llena la tarjeta con lo importante */
.key-date { display: flex; align-items: center; gap: 16px; }
.key-date b { font-size: 46px; line-height: .9; white-space: nowrap; }
.key-date span { display: grid; gap: 3px; min-width: 0; }
.key-date strong { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.key-date small { font-size: 12.5px; color: var(--muted); }
.key-date.urgent small { color: var(--closed); font-weight: 700; }
.dcard > .key-date:last-child { margin: auto 0; }   /* si es lo único, queda centrada en la tarjeta */
.key-date + ol.plazos, .key-date + .estimate { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
@media (max-width: 760px) { .key-date b { font-size: 38px; } .dcard > .key-date:last-child { margin: 4px 0; } }

/* Al cargar más filas, las que ya estaban no vuelven a animarse */
.no-anim .row, .no-anim .month { animation: none; }

/* =====================================================================
   Barras de scroll de la casa: finas, carril transparente y pulgar verde oscuro.
   El margen del carril las separa de las esquinas redondeadas.
   ===================================================================== */
.dlg, .pop, .suggest { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--brand) 55%, var(--ink)) transparent; }
.dlg::-webkit-scrollbar, .pop::-webkit-scrollbar, .suggest::-webkit-scrollbar { width: 10px; }
.dlg::-webkit-scrollbar-track, .pop::-webkit-scrollbar-track, .suggest::-webkit-scrollbar-track { background: transparent; margin: 18px 0; }
.dlg::-webkit-scrollbar-thumb, .pop::-webkit-scrollbar-thumb, .suggest::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand) 55%, var(--ink)); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
.dlg::-webkit-scrollbar-thumb:hover, .pop::-webkit-scrollbar-thumb:hover, .suggest::-webkit-scrollbar-thumb:hover { background-color: var(--brand); }

/* =====================================================================
   Cambio de modo día/noche: un fundido de la página entera hecho por el navegador
   (View Transitions) y, mientras dura, ninguna otra transición, para que no se
   animen a la vez cientos de colores.
   ===================================================================== */
.cambiando-tema *, .cambiando-tema *::before, .cambiando-tema *::after { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: ease; }

/* Toques verdes de la marca */
.top.scrolled { box-shadow: 0 1px 0 0 var(--brand-soft); }
.pill-btn:hover, .opt:hover, .select select:hover, .btn:not(.primary):hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--ink)); }
.chip-link:hover { background: var(--brand-soft); }
.suggest .sg-item[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--brand); }
@media (max-width: 760px) {
  dialog.wide .dlg, dialog.big .dlg { padding: 28px 22px; }
  
  .req-text { font-size: 15.5px; }
}
/* Móviles muy estrechos: que la cabecera quepa sin desplazamiento lateral */
@media (max-width: 380px) {
  .brand { gap: 8px; }
  .brand-name { font-size: 12px; letter-spacing: .04em; }
  .top-right { gap: 4px; }
  .top-right .icon-btn, .top-right .btn-login, .avatar { width: 34px; height: 34px; }
}

/* =====================================================================
   Brillo al pasar el ratón, con sentido:
   - Botones claros (fondo blanco, solo borde): halo verde de la marca.
   - Botones rellenos (fondo negro, o blanco en modo noche): sin halo; ya destacan solos.
   - Campana de avisos desactivados (roja): halo rojizo. Activados (verde): halo verde.
   El color del botón nunca cambia; solo aparece el halo debajo.
   ===================================================================== */
.btn, .pill-btn, .icon-btn { --halo: var(--brand); }
.btn:not(.primary):hover,
.pill-btn:not([aria-pressed="true"]):not([aria-expanded="true"]):hover,
.icon-btn:not(.ghost):hover {
  border-color: color-mix(in srgb, var(--halo) 60%, var(--ink));
  box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--halo) 85%, transparent), 0 0 0 1px color-mix(in srgb, var(--halo) 22%, transparent);
}
.btn.primary:hover, .pill-btn[aria-pressed="true"]:hover, .pill-btn[aria-expanded="true"]:hover, .fab:hover, .avatar:hover { box-shadow: none; }
.icon-btn.bell.off, #global-bell.off { --halo: var(--closed); }
.icon-btn.bell.on, #global-bell.on { --halo: var(--open); }
.icon-btn.bell.off:hover, #global-bell.off:hover { border-color: var(--closed); }
.icon-btn.bell.on:hover, #global-bell.on:hover { border-color: var(--open); }
.avatar { transition: box-shadow .25s ease; }
.fab { transition: box-shadow .25s ease; }

/* Centrado óptico de botones con icono delante: el icono pesa menos que el texto
   (en «Requisitos» son tres puntitos), así que se quita un poco de aire a la izquierda. */
.btn:has(> svg:first-child) { padding-left: 13px; padding-right: 18px; }

/* Leyenda: cada tarjeta brilla con el color de su etiqueta */
.legend-card:has(.s-open) { --lc: var(--open); }
.legend-card:has(.s-soon) { --lc: var(--soon); --lc-text: var(--soon-strong); }
.legend-card:has(.s-closed), .legend-card:has(.s-pending) { --lc: var(--closed); }
.legend-card::after {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lc, var(--brand)) 55%, transparent), 0 10px 30px -14px color-mix(in srgb, var(--lc, var(--brand)) 60%, transparent);
}
.legend-card:hover .lc-go { color: var(--lc-text, var(--lc, var(--brand))); }

/* Las tres columnas comparten filas (subgrid): las cifras, las etiquetas y los medidores
   quedan alineados entre sí aunque una etiqueta ocupe dos líneas, y el conjunto sigue centrado. */
.stats { grid-template-rows: auto auto auto; }

/* =====================================================================
   Ventana de requisitos: el cuerpo ocupa todo el alto disponible y la barra
   de acciones queda siempre abajo (bases a la izquierda, botón a la derecha),
   aunque el texto sea corto. En pantalla ancha, texto + ficha lateral.
   ===================================================================== */
#req-body { flex: 1; display: flex; flex-direction: column; }
.req-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; margin-bottom: 32px; }
.req-main .req-text { margin: 0; }
.req-side { display: grid; gap: 0; background: var(--soft); border-radius: 16px; padding: 6px 20px; }
.req-fact { padding: 16px 0; display: grid; gap: 4px; }
.req-fact + .req-fact { border-top: 1px solid var(--line); }
.req-fact .req-h { margin: 0 0 2px; }
.req-fact b { font-size: 34px; line-height: .95; }
.req-fact small { font-size: 12.5px; color: var(--muted); }
.req-fact p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.req-actions { justify-content: space-between; margin-top: auto; }
.req-actions .ext { padding-left: 0; }
.req-actions .btn svg { transition: transform .25s var(--ease); }
.req-actions .btn:hover svg { transform: translateX(3px); }
@media (max-width: 760px) {
  .req-grid { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
  .req-actions { flex-direction: column-reverse; align-items: stretch; }
  .req-actions .btn { width: 100%; }
  .req-actions .ext { justify-content: center; }
}

/* =====================================================================
   Ritmo vertical de los listados (portada, «Todas», calendario, perfil):
   una sola escala de espacios (8 · 16 · 24 · 40) y solo las líneas que
   aportan algo: la gruesa bajo el título y la fina de la barra de herramientas.
   Los encabezados de grupo ya no llevan línea propia: son una etiqueta con aire.
   ===================================================================== */
.list-head { padding-bottom: 16px; }
.toolbar { padding: 16px 0; gap: 12px; }
.toolbar-group { gap: 10px; }
.filters-card { margin-top: 16px; padding: 24px; }
.fgroup + .fgroup { margin-top: 20px; }
.active:not(:empty) { margin-top: 16px; gap: 8px; }
.group-title { margin: 44px 0 8px; padding: 0 0 0 2px; border-bottom: 0; gap: 10px; }
.group-title:first-child { margin-top: 32px; }

/* La primera fila de cada grupo lleva línea arriba, así el grupo queda «enmarcado» */
.group-title + ul.rows > .row:first-child, .group-title + .group-note + ul.rows > .row:first-child { border-top: 1px solid var(--line); }
/* Listado sin grupos (búsquedas, favoritas): mismo aire bajo la barra */
#results > ul.rows:first-child { margin-top: 24px; border-top: 1px solid var(--line); }
#results > .month:first-child { margin-top: 16px; }
.month { padding: 32px 0; }
.more:not(:empty) { margin-top: 40px; }
@media (max-width: 760px) {
  .toolbar { padding: 12px 0; }
  .group-title { margin-top: 36px; }
  .group-title:first-child { margin-top: 24px; }
  .filters-card { padding: 18px; }
}

/* Requisitos ampliados: la columna de texto ocupa la misma altura que la ficha lateral */
.req-grid { align-items: stretch; }
.req-main { display: flex; flex-direction: column; min-width: 0; }

.req-list { margin: 0; display: grid; border-top: 1px solid var(--line); }
.req-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.req-list dt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-top: 3px; }
.req-list dd { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.req-past { color: var(--muted); text-decoration: line-through; }
.req-note { margin: auto 0 0; padding-top: 20px; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--muted); }
.req-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.req-side { align-content: space-between; padding: 6px 22px; }
@media (max-width: 760px) {
  .req-list > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 400px) {
  .seg button { padding: 0 10px; }
  .select select { padding-right: 30px; }
  .select::after { right: 12px; }
}

/* La portada/buscador es su propia capa (isolation) y, sin z-index, las filas del listado
   (que llevan animación y por eso crean capa) se pintaban encima de las sugerencias.
   La subimos por encima del listado y de su barra fija (15), pero por debajo de la cabecera (30). */
.hero { z-index: 20; }

/* Parpadeo al pasar el ratón por los accesos rápidos (Festivales, Laboratorios…).
   No cambia nada en la página: era el navegador repintando de golpe varias capas.
   1) El foco de luz verde ya no se mete bajo la cabecera (que difumina lo que tiene detrás):
      antes cada cambio de color en la portada obligaba a recalcular ese difuminado.
   2) La cabecera ya no usa el efecto de cristal esmerilado (backdrop-filter): en Chrome/Edge
      con Windows, según la tarjeta gráfica, hace parpadear la página entera. Ahora es sólida.
   3) Los accesos cambian a un color sólido ya calculado (no a una mezcla con transparencia). */
.chip-link { background-color: transparent; transition: background-color .2s ease, color .2s ease; }
.chip-link:hover { background-color: color-mix(in srgb, var(--brand) 10%, var(--bg)); color: var(--ink); }
.chip-link:hover span { color: var(--ink-2); }

/* =====================================================================
   Ventana de requisitos (todas: festivales, mercados, laboratorios…)
   - El texto de requisitos va en negrita: es lo que se viene a buscar.
   - Más aire entre el título y las etiquetas; la ventana es algo más alta
     y el contenido se reparte hacia abajo.
   - Mismo margen (48 px) por abajo, izquierda y derecha: los botones
     de abajo quedan a la misma distancia de los tres bordes.
   ===================================================================== */
dialog.big .dlg { padding: 48px; min-height: min(660px, calc(100dvh - 32px)); }
#req-title { margin-bottom: 0; }
.req-tags { margin: 24px 0 40px; }
.req-main .req-text { font-weight: 650; color: var(--ink); font-size: 17px; line-height: 1.65; margin-bottom: 28px; }
.req-grid { margin-bottom: 40px; }
.req-actions { padding-top: 28px; }
.req-actions .ext { height: 44px; padding: 0; }
@media (max-width: 760px) {
  dialog.big .dlg { padding: 28px 22px; min-height: 0; }
  .req-tags { margin: 16px 0 28px; }
  .req-main .req-text { font-size: 16px; }
  .req-grid { margin-bottom: 28px; }
}

/* Título arriba y botones abajo quedan fijos; solo el contenido del medio se desplaza
   si no cabe. Así los botones están siempre a 48 px del borde inferior, izquierdo y derecho. */
dialog.big .dlg { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - 32px); }
dialog.big #req-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-right: -14px; padding-right: 14px;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--brand) 55%, var(--ink)) transparent; }
dialog.big #req-body::-webkit-scrollbar { width: 8px; }
dialog.big #req-body::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--brand) 55%, var(--ink)); border-radius: 999px; }
dialog.big #req-body .req-grid { margin-bottom: 8px; }
dialog.big .req-actions { flex: none; margin-top: 32px; }
/* La barra de botones es un <footer>: se anula el estilo del pie de la web (padding, letra pequeña gris) */
#req-foot { padding: 28px 0 0; font-size: inherit; color: inherit; }
/* En móvil toda la ventana se desplaza (si no, el título y los botones fijos dejan muy poco hueco)
   y la barra de botones se queda pegada abajo, con el mismo margen que a los lados (22 px). */
@media (max-width: 760px) {
  dialog.big .dlg { display: block; overflow-y: auto; padding-bottom: 0; }
  dialog.big #req-body { overflow: visible; margin-right: 0; padding-right: 0; }
  dialog.big .req-actions { position: sticky; bottom: 0; z-index: 2; margin-top: 8px; padding: 16px 0 22px; background: var(--bg); box-shadow: 0 -12px 16px -12px color-mix(in srgb, var(--ink) 18%, transparent); }
}
@media (max-width: 760px) {
  dialog.big .req-actions { padding-bottom: 16px; gap: 6px; }
  dialog.big .req-actions .ext { height: auto; padding: 6px 0; }
}
