/* home.css: owned by leg home (round 1). Tokens from style.css only; local non-colour custom properties start with --l-. */
/* /inicio («Hoy»): one column on phones, in reading order (session, points, map, kárdex, next mock, lesson, the
   rest). From 60rem a 12-column grid: the session card, the points and the map full width; from 80rem the kárdex
   takes 8 columns and the next mock with the lesson the other 4. */

.hoy { --l-gap: var(--s4); display: grid; gap: var(--l-gap); }
.hoy > * { min-width: 0; margin: 0; }
.hoy-head { display: grid; gap: var(--s2); padding: var(--s1) 0 var(--s2); }
.hoy-head .label { margin: 0; line-height: 1.5; }
.hoy-head h1 { margin: 0; }
.hoy .card-head { margin-bottom: var(--s4); }
.hoy-line { margin: 0 0 var(--s2); }
.hoy-line:last-child { margin-bottom: 0; }
.hoy-act { margin: var(--s4) 0 0; }

/* Sesión de hoy: what to do now and the page's one primary button */
.sesion { display: grid; gap: var(--s4); border-color: var(--regla-2); }
.sesion-head .label { margin: 0 0 var(--s2); }
.sesion .h-big { margin: 0 0 var(--s2); }
.sesion-why { margin: 0; color: var(--gris); max-width: 42rem; }
.sesion-why .textlink { white-space: nowrap; }
.sesion .empty { margin: var(--s3) 0; padding: var(--s3) var(--s4); }
.sesion-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.sesion-actions .btn:not(.btn-quiet) { flex: 1 1 100%; }
.sesion-actions .btn-quiet { padding-inline: 0; }
.sesion-meta { flex: 1 1 100%; margin: 0; font-weight: 600; color: var(--grafito); }
.sesion-items { list-style: none; margin: 0; padding: var(--s4) 0 0; display: grid; gap: var(--s3); border-top: 1px solid var(--regla); }
.sesion-items li { position: relative; padding-left: var(--s5); line-height: 1.45; }
.sesion-items li::before { content: ""; position: absolute; left: .3rem; top: .55em; width: .4375rem; height: .4375rem; border-radius: 1px; background: var(--tinta); }
.sesion-items a { color: var(--tinta-2); }
.si-k { font-weight: 600; color: var(--grafito); }

/* Dónde están tus puntos: rank, area, weight, share with n and ±, points; one row each once the card is wide */
.puntos { container: puntos / inline-size; }
.puntos-list { list-style: none; margin: 0; padding: 0; }
.punto { display: grid; grid-template-columns: 1.25rem auto minmax(0, 1fr) auto; grid-template-areas: "rank area area pts" "rank weight stat stat"; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--regla); }
.punto:first-child { border-top: 0; padding-top: 0; }
.p-rank { grid-area: rank; font-weight: 600; color: var(--tinta); }
.p-area { grid-area: area; min-width: 0; }
.p-area b { font-weight: 600; color: var(--titulo); }
.p-area .clave { margin-right: .2rem; color: var(--tinta); }
.p-weight { grid-area: weight; display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-caption); color: var(--gris); }
.p-stat { grid-area: stat; justify-self: end; text-align: right; }
.p-stat .stat-n { justify-content: flex-end; gap: 0 .375rem; }
.p-stat .stat-n b { font-size: 1.0625rem; }
.p-short { font-size: var(--t-caption); color: var(--gris); }
.p-pts { grid-area: pts; justify-self: end; white-space: nowrap; font-size: var(--t-caption); color: var(--gris); }
.p-pts b { font: 600 1.25rem/1 var(--sans); color: var(--tinta); font-variant-numeric: tabular-nums; }
.punto.is-waiting .p-area b { color: var(--grafito); }
.punto.is-waiting .p-pts { color: var(--gris); }
.puntos .caption { margin: var(--s4) 0 0; }

/* Mapa de dominio; a long skill name («Complicación») hyphenates instead of breaking anywhere */
.hoy-mapa .mapa-frame { margin-top: var(--s2); }
.hoy-mapa .mapa thead th { overflow-wrap: normal; hyphens: auto; }
.hoy-rule { margin: var(--s3) 0 0; }

/* Kárdex: a real table; weight, answers and the diagnostic show once the card is wide (the share keeps its n) */
.kardex { container: kardex / inline-size; }
.kardex .table-scroll { margin: 0; }
.kx { font-size: .9375rem; }
.kx th, .kx td { padding: .625rem .5rem; vertical-align: middle; }
.kx thead th { padding-top: 0; white-space: nowrap; }
.kx th:first-child, .kx td:first-child { padding-left: 0; }
.kx tr > :last-child { padding-right: 0; }
.kx tbody th[scope="row"] { font-weight: 500; line-height: 1.3; }
.kx .clave { margin-right: .25rem; color: var(--tinta); }
.kx td.num { white-space: nowrap; }
.kx .stat-n { justify-content: flex-end; gap: 0 .375rem; }
.kx .stat-n b { font-size: 1rem; }
.kx .stat-n small { white-space: nowrap; }
.kx .hp { display: none; }
.kx-short { font-size: var(--t-caption); color: var(--gris); }
.kx tfoot .num { font-weight: 600; }
.kardex .caption { margin: var(--s3) 0 0; }

/* Próximo simulacro and lección sugerida */
.hoy-stack { display: grid; gap: var(--l-gap); align-content: start; }
.hoy-next .h-card, .hoy-lesson .h-card { font-size: 1.1875rem; line-height: 1.3; }
.hoy-lesson .caption { margin: 0; }
.hoy-lesson .caption .clave { color: var(--tinta); }

@container puntos (min-width: 46rem) {
  .punto { grid-template-columns: 1.5rem minmax(0, 1fr) 6.5rem 10.5rem 7.5rem; grid-template-areas: "rank area weight stat pts"; align-items: center; }
}
@container kardex (min-width: 38rem) {
  .kx .hp { display: table-cell; }
  .kx .kx-phone-n > span { display: none; }
  .kx-short { white-space: nowrap; }
}
@media (min-width: 48rem) {
  .hoy-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
  .hoy { --l-gap: var(--s5); grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .hoy > * { grid-column: 1 / -1; }
  .hoy .card { padding: var(--s5) var(--s6); }
  .sesion { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s7); align-items: end; }
  .sesion-items { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); column-gap: var(--s6); }
  .sesion-actions { flex-direction: column; align-items: flex-end; justify-content: flex-end; }
  .sesion-actions .btn:not(.btn-quiet) { flex: 0 0 auto; }
  .sesion-meta { flex: 0 1 auto; text-align: right; }
}
@media (min-width: 80rem) {
  .hoy > .kardex { grid-column: 1 / span 8; }
  .hoy > .hoy-stack { grid-column: span 4; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  .hoy-head .label { font-size: 1rem; letter-spacing: .02em; text-transform: none; }
}
