/* Parity build, leg inicio: rules start from its own class prefix (tests/test_leg_css_scope.py). Tokens from
   style.css only. The glance header, the three first steps, «Sesión de hoy hecha» and the <details> groups. */

/* At a glance: the ring (or the week's big number) beside one sentence and up to three numbers */
.hy-glance { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: var(--s4); align-items: center; padding: var(--s4); }
.hy-glance-ring { display: grid; justify-items: center; }
.hy-glance-ring .ch-ring-svg { width: 4.75rem; height: 4.75rem; }
.hy-glance-ring .ch-cap { display: none; }
.hy-glance-ring .ch-arc { stroke: var(--teal); }
.hy-glance-ring .ch-cap { max-width: 11rem; }
.hy-glance-big { margin: 0; display: grid; justify-items: center; text-align: center; max-width: 7rem; color: var(--gris); font-size: var(--t-caption); }
.hy-glance-big b { font: 700 2.75rem/1 var(--sans); color: var(--titulo); }
.hy-glance-body { min-width: 0; display: grid; gap: var(--s2); }
.hy-glance-body { gap: var(--s1); }
.hy-glance-body .label { margin: 0; }
.hy-glance-title { margin: 0; font: 600 1rem/1.3 var(--sans); color: var(--titulo); }
.hy-stats { list-style: none; margin: var(--s1) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.hy-stat { display: flex; align-items: baseline; gap: .3rem; }
.hy-stat b { font: 700 1.0625rem/1.1 var(--sans); color: var(--titulo); font-variant-numeric: tabular-nums; }
.hy-stat span { font-size: var(--t-caption); line-height: 1.3; color: var(--gris); }
.hy-glance-note { margin: 0; }
.hy-label-week { display: none; }   /* phones: the week's sentence says it; the estimate keeps «no oficial» */
.hy-glance-big b { font-size: 2rem; }

/* The three first steps: a numbered track; the done ones ticked, the next one raised */
.hy-steps { display: grid; gap: var(--s4); border-color: var(--regla-2); }
.hy-steps-head .label { margin: 0 0 var(--s2); }
.hy-steps-head .h-big { margin: 0 0 var(--s1); }
.hy-steps-count { margin: 0; color: var(--gris); font-weight: 600; }
.hy-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); counter-reset: none; }
.hy-step { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--s3); padding: var(--s4); border: 1px solid var(--regla); border-radius: var(--rad); background: var(--papel); }
.hy-step-mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 2px solid var(--regla-2); font: 700 1rem/1 var(--sans); color: var(--gris); }
.hy-step-mark svg { width: 1.25rem; height: 1.25rem; }
.hy-step-title { margin: .3rem 0 var(--s1); font: 600 1.0625rem/1.3 var(--sans); color: var(--titulo); }
.hy-step-text { margin: 0; color: var(--gris); }
.hy-step-act { margin: var(--s3) 0 0; }
.hy-step-act .btn { width: 100%; }
.hy-step-next { border-color: var(--teal-line); background: var(--teal-soft); }
.hy-step-next .hy-step-mark { border-color: var(--teal); background: var(--teal); color: var(--on-teal); }
.hy-step-done .hy-step-mark { border-color: var(--teal); color: var(--teal-strong); }
.hy-step-done .hy-step-title { color: var(--grafito); }

/* «Sesión de hoy hecha» */
.hy-done { border-color: var(--teal-line); }
.hy-done-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; }
.hy-done-head .label { margin: 0 0 var(--s2); }
.hy-done-head .h-big { margin: 0 0 var(--s2); }
.hy-done-mark { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal-strong); }
.hy-done-mark svg { width: 1.75rem; height: 1.75rem; }
.hy-done-more { margin: 0; flex: 1 1 100%; display: flex; }
.hy-done-more .btn { flex: 1 1 100%; }
.hy-done-actions .btn-ghost { flex: 1 1 100%; }

/* The groups after the session card: a summary line that opens the cards */
.hy-group { border-top: 1px solid var(--regla); padding-top: var(--s2); }
.hy-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t chev" "m chev"; align-items: center; gap: .15rem var(--s3); padding: var(--s3) 0; cursor: pointer; list-style: none; }
.hy-sum::-webkit-details-marker { display: none; }
.hy-sum::after { content: ""; grid-area: chev; width: .6rem; height: .6rem; margin-right: .3rem; border-right: 2px solid var(--grafito); border-bottom: 2px solid var(--grafito); transform: rotate(45deg); transition: transform .15s var(--ease); }
.hy-group[open] > .hy-sum::after { transform: rotate(-135deg); }
.hy-sum-t { grid-area: t; font: 600 1.1875rem/1.3 var(--sans); color: var(--titulo); }
.hy-sum-m { grid-area: m; font-size: var(--t-caption); color: var(--gris); }
.hy-sum:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-radius: var(--rad-sm); }
.hy-group-body { display: grid; gap: var(--s4); padding: var(--s2) 0 var(--s3); }
.hy-group-body > * { min-width: 0; margin: 0; }
.hy-entered { margin: var(--s3) 0 0; }

@media (min-width: 48rem) {
  .hy-glance { grid-template-columns: auto minmax(0, 1fr); gap: var(--s6); padding: var(--s5); }
  .hy-glance-ring .ch-ring-svg { width: 9rem; height: 9rem; }
  .hy-glance-ring .ch-cap { display: grid; }
  .hy-label-week { display: block; }
  .hy-glance-big b { font-size: 2.75rem; }
  .hy-glance-body { gap: var(--s2); }
  .hy-glance-title { font-size: 1.5rem; }
  .hy-stats { gap: var(--s2) var(--s6); }
  .hy-stat { display: grid; gap: .1rem; min-width: 5.5rem; }
  .hy-stat b { font-size: 1.5rem; }
  .hy-step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hy-step { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .hy-step-act .btn { width: auto; }
}
@media (min-width: 60rem) {
  .hy-glance { padding: var(--s5) var(--s6); }
  .hy-stat b { font-size: 1.875rem; }
  .hy-done { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s7); align-items: end; }
  .hy-done-more, .hy-done-more .btn, .hy-done-actions .btn-ghost { flex: 0 0 auto; }
  .hy-group-body { gap: var(--s5); }
}
@media (min-width: 80rem) {
  .hy-group-kx { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .hy-group-kx > * { grid-column: 1 / -1; }
  .hy-group-kx > .kardex { grid-column: 1 / span 8; }
  .hy-group-kx > .hoy-stack { grid-column: span 4; grid-template-columns: minmax(0, 1fr); }
}
