/*
 * REUNO v2 · hoja de estilo unica.
 *
 * Mundo visual: cartel deportivo mexicano en su staging de "hoja de programa".
 * Dos tintas sobre papel: la tinta (casi negro) y la segunda tinta del estudio
 * (`--accent`, rosa cartel por omision; cada tenant la sustituye en tiempo de
 * ejecucion, ORG-002 / UX-007). Archivo variable: el eje de ancho da el tipo
 * madera condensado del cartel Y la sans de trabajo de la UI con una sola familia.
 *
 * Reglas que no se negocian:
 *   UX-002 / UX-012 movil primero; area de toque >= 44px.
 *   UX-013 contraste AA, foco visible, `prefers-reduced-motion`, encabezados reales.
 *   Operate: los controles son familiares y consistentes; el cartel vive en el
 *   contenido (barras de fecha, horas, conteos, sellos), no en los formularios.
 */

/* Archivo variable auto-hospedada (latin, ejes wdth 62..125 / wght 100..900). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* papel y tintas */
  --bg: #f2f1ec;
  --surface: #ffffff;
  --surface-2: #e9e7e0;
  --line: #dad7ce;
  --line-strong: #a9a49a;
  --ink: #171511;
  --ink-2: #514d45;
  --ink-3: #6b665d;

  /* la banda y las barras de fecha son tinta SIEMPRE, en claro y oscuro: es la marca */
  --band: #171511;
  --on-band: #f4f2ec;

  /* segunda tinta: rosa cartel. El estudio la sustituye via applyBranding(), que tambien
     recalcula --on-accent y --accent-text (la version del acento que aguanta AA como texto). */
  --accent: #c40055;
  --on-accent: #ffffff;
  --accent-text: #c40055;

  --brand: #171511;
  --on-brand: #f4f2ec;

  --ok: #166b41;
  --warn: #8a5a00;
  --danger: #b3261e;

  /* el cartel se imprime con esquinas vivas; 3px evita el filo hostil en pantalla */
  --r-sm: 3px;
  --r: 4px;
  --r-lg: 10px;

  --sp: 16px;
  --tap: 44px;
  --header-h: 56px;

  --font: 'Archivo', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* tipo madera: Archivo condensado pesado. Un solo par de variables para toda la casa. */
  --wood-stretch: 66%;
  --wood-weight: 800;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1d1b18;
    --surface-2: #26231f;
    --line: #35322c;
    --line-strong: #57534a;
    --ink: #f2efe8;
    --ink-2: #c9c4ba;
    --ink-3: #9b958a;
    --band: #0d0c0a;
    --on-band: #f2efe8;
    --accent: #ff5c9d;
    --on-accent: #1a0009;
    --accent-text: #ff5c9d;
    --brand: #f2efe8;
    --on-brand: #171511;
    --ok: #57c98a;
    --warn: #e0a53e;
    --danger: #ff7a70;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Los iconos son SVG sin `width`: sin esto se estiran al ancho del contenedor. */
svg {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: var(--wood-weight);
  font-stretch: var(--wood-stretch);
  text-transform: uppercase;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75em; }
a { color: inherit; }

/* --- accesibilidad --------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 2px;
}
/* El foco programatico del titular (render() lo enfoca para lectores de pantalla)
   no debe dibujar contorno: no es un control. */
[tabindex='-1']:focus-visible,
[tabindex='-1']:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.skip-link:focus {
  left: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- arranque -------------------------------------------------------------- */

.boot {
  min-height: 70vh;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  color: var(--ink-3);
}
.boot-mark {
  font-stretch: var(--wood-stretch);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

/* --- estructura ------------------------------------------------------------ */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

/*
 * La banda: cabecera de tinta constante. Es el lomo del cartel; no cambia con el
 * tema porque es identidad, no superficie.
 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--sp);
  background: var(--band);
  color: var(--on-band);
  border-bottom: 3px solid var(--accent);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: var(--tap);
  flex: 1;
  min-width: 0;
  font-stretch: var(--wood-stretch);
  font-weight: var(--wood-weight);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 17px;
}
.topbar .brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--on-band);
}
.topbar .brand .dot {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  flex: none;
}
.topbar .brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Los botones que viven sobre la banda se dibujan con la tinta de la banda. */
.topbar .btn.ghost {
  color: var(--on-band);
  border-color: color-mix(in srgb, var(--on-band) 45%, transparent);
  background: transparent;
}
.topbar .btn.quiet { color: var(--on-band); }

main {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: var(--sp);
  padding-bottom: 96px;
}
main.wide { max-width: 1080px; }

.stack { display: grid; gap: var(--sp); }
.stack-sm { display: grid; gap: 8px; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.grid-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Los indicadores van de dos en dos incluso en movil: caben y evitan un scroll inutil. */
.grid-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 780px) {
  .grid-stats { grid-template-columns: repeat(4, 1fr); }
}
.grid-stats .stat .value { font-size: 26px; }

/* --- navegacion inferior (movil) ------------------------------------------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-auto-flow: column;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  position: relative;
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.02em;
  padding: 6px 4px;
}
.tabbar a[aria-current='page'] { color: var(--ink); }
/* El indicador es un taco corto centrado, no un filete a sangre: se sostiene igual en
   movil y en escritorio. */
.tabbar a[aria-current='page']::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 3px;
  background: var(--accent);
}
.tabbar svg { width: 21px; height: 21px; }

/* --- tarjetas (paneles de programa) ---------------------------------------- */

/* Elevacion por borde, no por sombra: el cartel es plano. */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
}
.card.flat { border-color: var(--line); }

/* Cabecera de seccion del programa: caps condensadas + filete grueso. */
.card-title {
  font-size: 13px;
  text-transform: uppercase;
  font-stretch: var(--wood-stretch);
  font-weight: var(--wood-weight);
  letter-spacing: 0.05em;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 10px;
}

/*
 * Fila de sesion: la unidad de informacion mas importante del producto.
 * Es una linea del programa: hora en tipo madera, funcion, sello de estado.
 * Dentro de un grupo de dia las filas comparten filetes finos y forman un bloque.
 */
.session {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  min-height: var(--tap);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.session:hover { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.session:active { background: var(--surface-2); }
.session[disabled] { cursor: default; opacity: 0.55; }
.session .time {
  font-stretch: var(--wood-stretch);
  font-weight: var(--wood-weight);
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  line-height: 1;
}
.session .time small {
  display: block;
  font-stretch: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.03em;
  margin-top: 3px;
}
.session .name {
  font-stretch: var(--wood-stretch);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 15.5px;
}
.session .meta { color: var(--ink-2); font-size: 13px; }

/*
 * Barra de fecha: el elemento firma. Tinta plena, caps condensadas, taco de acento.
 * Dentro del grupo, las filas se pegan y comparten filete: leen como un solo cartel.
 */
.daygroup.stack-sm, .daygroup { gap: 0; }
.daygroup > h2 {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--band);
  color: var(--on-band);
  font-size: 14px;
  letter-spacing: 0.06em;
  padding: 9px 12px;
  border-radius: var(--r) var(--r) 0 0;
}
.daygroup > h2::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  flex: none;
}
.daygroup .session {
  border-radius: 0;
  border-top: 0;
}
.daygroup .session:last-of-type {
  border-radius: 0 0 var(--r) var(--r);
}

/* --- sellos de estado ------------------------------------------------------- */

/* El sello: rectangulo entintado, caps, como el sello de goma sobre el cartel. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--line-strong);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.ok { color: var(--ok); border-color: var(--ok); }
.tag.warn { color: var(--warn); border-color: var(--warn); }
.tag.danger { color: var(--danger); border-color: var(--danger); }
.tag.solid { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.tag.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* --- botones y formularios ------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: color-mix(in srgb, var(--brand) 88%, var(--accent)); }
.btn:active { transform: scale(0.985); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.ghost:hover { background: var(--surface-2); }
.btn.quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn.quiet:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 85%, var(--ink)); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.accent:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 14px; }
.btn.block { width: 100%; }

/* UX-002 · en pantalla tactil ningun control primario baja de 44px. */
@media (pointer: coarse) {
  .btn.sm, .pill-nav a { min-height: var(--tap); }
}

label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.err { font-size: 13px; color: var(--danger); margin-top: 5px; font-weight: 600; }

input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='number'],
input[type='date'],
input[type='time'],
input[type='search'],
input[type='color'],
select,
textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-offset: 0;
}
textarea { min-height: 88px; resize: vertical; }
input:disabled, select:disabled { background: var(--surface-2); color: var(--ink-3); }

.switch { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.switch label { margin: 0; font-weight: 500; color: var(--ink); }

/* --- tablas y listas ------------------------------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  font-weight: 750;
  border-bottom: 2px solid var(--ink);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.roster-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.roster-item:last-child { border-bottom: 0; }
.roster-item .who { flex: 1; min-width: 0; }
.roster-item .who strong { display: block; font-weight: 650; }
.roster-item .who span { font-size: 12.5px; color: var(--ink-3); }

/* Cifra de programa: el numero grande en tipo madera, sentado sobre filete grueso
   (la misma gramatica que card-title y los encabezados de tabla). */
.stat { display: grid; gap: 3px; border-top: 3px solid var(--ink); padding-top: 8px; }
.stat .value {
  font-stretch: var(--wood-stretch);
  font-weight: var(--wood-weight);
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
}

.meter {
  height: 8px;
  border-radius: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.meter > i { display: block; height: 100%; background: var(--ink); }

/* --- avisos ---------------------------------------------------------------- */

.notice {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
}
.notice.info { border-color: var(--line-strong); background: var(--surface-2); }
.notice.ok {
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
}
.notice.warn {
  border-color: color-mix(in srgb, var(--warn) 50%, transparent);
  background: color-mix(in srgb, var(--warn) 9%, var(--surface));
}
.notice.danger {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--ink-3);
}

/* Invitacion del prospecto: una linea en la segunda tinta, sin robarle el viewport al programa. */
.trial-invite {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-height: var(--tap);
  align-content: center;
  padding: 10px 12px;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--surface);
  text-decoration: none;
  font-size: 14px;
}
.trial-invite strong { color: var(--accent-text); }
.trial-invite span { color: var(--ink-2); }
.trial-invite:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }

/* RES-006 · reglas plegadas: una linea que se abre, no un parrafo que empuja el programa. */
.policies {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13.5px;
}
.policies summary {
  cursor: pointer;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 650;
  color: var(--ink-2);
  list-style: none;
}
.policies summary::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--line-strong);
  transition: background-color 0.15s ease;
}
.policies[open] summary::before { background: var(--accent); }
.policies summary::-webkit-details-marker { display: none; }
.policies > div { padding: 0 12px 12px 30px; color: var(--ink-2); }

/* Tira de prueba del SaaS (ORG-009): visible en todo el admin sin estorbar. */
.trial-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13.5px;
}
.trial-strip .days {
  font-stretch: var(--wood-stretch);
  font-weight: var(--wood-weight);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}

/* --- toasts y hoja modal --------------------------------------------------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--band);
  color: var(--on-band);
  padding: 12px 15px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 600;
  animation: rise 0.18s ease-out;
  transition: opacity 0.25s ease;
}
/* El taco de acento, mismo gesto que la barra de fecha: estado sin decorado. */
.toast::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--accent);
}
.toast.danger::before { background: var(--danger); }
.toast.ok::before { background: var(--ok); }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}

.sheet {
  border: none;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  width: min(560px, 100%);
  max-height: 88dvh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin: auto auto 0;
}
@media (min-width: 640px) {
  .sheet { border-radius: var(--r-lg); border: 1px solid var(--line-strong); margin: auto; }
}
.sheet::backdrop { background: rgb(0 0 0 / 50%); }
.sheet-body { padding: 18px; overflow-y: auto; max-height: 84dvh; }
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.sheet-head h2 { font-size: 1.05rem; }

/* --- utilidades ------------------------------------------------------------ */

.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }
.hr.thick { height: 3px; background: var(--ink); }
.spread { display: flex; gap: 8px; flex-wrap: wrap; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* Secciones del admin: pestanas rectas, la activa entintada. */
.pill-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pill-nav::-webkit-scrollbar { display: none; }
.pill-nav a {
  flex: none;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-stretch: 80%;
  color: var(--ink-2);
}
.pill-nav a[aria-current='page'] {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

/* Portada: el unico momento de cartel a toda voz. */
.hero { padding: 34px 0 14px; }
.hero h1 {
  font-size: clamp(2.1rem, 9vw, 3.4rem);
  line-height: 0.95;
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-text);
}
.hero p {
  color: var(--ink-2);
  font-size: 1.02rem;
  max-width: 52ch;
  margin-top: 14px;
}
.hero .spread { margin-top: 6px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: var(--r-sm);
  height: 66px;
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* --- grafica de ocupacion (reportes) ---------------------------------------- */

/* Columna de reservas sobre el track de capacidad del dia. La serie viste el acento;
   todo texto viste tinta (regla de la casa: el color marca, el texto informa). */
.occ { margin: 0; }
.occ-plot {
  position: relative;
  height: 120px;
  margin-top: 18px;
}
.occ-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
  z-index: 0;
}
.occ-gridline.dashed { border-top-style: dashed; }
.occ-gridline span {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.occ-cols {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  z-index: 1;
}
.occ-col {
  position: relative;
  flex: 1;
  min-width: 4px;
  height: 100%;
  cursor: default;
  border-radius: 2px;
}
.occ-col:focus-visible { outline-offset: 4px; }
.occ-col i {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
}
.occ-track {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}
.occ-fill {
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}
.occ-col:hover .occ-fill, .occ-col:focus-visible .occ-fill {
  background: color-mix(in srgb, var(--accent) 82%, var(--ink));
}
.occ-x {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.occ-x span:nth-child(2) { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.occ-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 10;
  display: grid;
  gap: 1px;
  justify-items: center;
  background: var(--band);
  color: var(--on-band);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.occ-tip strong { font-weight: 750; }
.occ-tip[hidden] { display: none; }

/* --- impresion: el programa y los reportes como hoja limpia ----------------- */

@media print {
  .topbar, .tabbar, .pill-nav, .trial-strip, .toasts, .skip-link, .btn { display: none !important; }
  main { max-width: none; padding: 0; }
  body { background: #fff; }
  .card, .session { border-color: #000; break-inside: avoid; }
  .daygroup > h2 { position: static; }
}
