/* ============================================================================
   Faden v2 · Recommended direction (base C) · styles-04.css
   Screen 04 «Inicio» for the head teacher. Loads after tokens.css and styles.css and
   adds only new classes or modifiers: greeting row, one-line proposal notice, the
   three-column task strip, the dates caption, the coverage bar and the module cards.
   No colour literal: tokens only (the forced-colors block uses system colours, as
   styles.css does). Panels stack with @container (F16); the only viewport query is
   the 44 px target block: the shared 1023 px drawer switch or a coarse pointer.
   ============================================================================ */

/* ---- Greeting row: H1 24/30 and the role line, wrapping on narrow screens ---- */
.fd-home-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.fd-home-head h1 { font: 600 var(--fd-text-h1) var(--fd-font); }
.fd-home-head__role { font: var(--fd-text-meta) var(--fd-font); color: var(--fd-text-muted); }

/* ---- Proposal notice (VIS2-D16, owner 18-10-2026): a muted line at the foot of «Tus tareas», presentation only ---- */
.fd-notice {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 10px var(--fd-card-pad);
  border-top: 1px solid var(--fd-border-hairline);
  font: var(--fd-text-floor) var(--fd-font); color: var(--fd-text-muted);
}
.fd-notice__tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.fd-notice__text { flex: 1 1 240px; min-width: 0; }

/* ---- «Tus tareas»: six figures in three columns; two per row from 560 to 599 px of card, one below 560 ---- */
/* Same specificity as the shared strip and loaded later, so the shared steps are restated. One column on a phone
   (owner, 27-10-2026): two columns at 390 wrapped the titles onto three lines and made the cards tall and uneven. */
.fd-figure-strip--tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container card (max-width: 599px) { .fd-figure-strip--tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container card (max-width: 559px) { .fd-figure-strip--tasks { grid-template-columns: minmax(0, 1fr); } }

/* ---- Próximos vencimientos: the requirement named once above the dates ---- */
.fd-home-caption { font: var(--fd-text-meta) var(--fd-font); color: var(--fd-text-muted); }
.fd-home-caption strong { color: var(--fd-text); font-weight: 600; }

/* ---- Family interview coverage: figure printed as n/N, bar filled in primary-600 ---- */
.fd-coverage-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.fd-coverage-figure__value { font: 700 var(--fd-text-figure) var(--fd-font); color: var(--fd-figure); font-variant-numeric: tabular-nums; }
.fd-coverage-figure__label { font: var(--fd-text-meta) var(--fd-font); color: var(--fd-text-muted); }
/* Same bar as screen 03 (.c03-bar): hairline track, pill radius, primary-600 fill. */
.fd-coverage { height: 8px; overflow: hidden; border-radius: var(--fd-radius-pill); background: var(--fd-border-hairline); }
/* The fill width comes from the count on the element (--cov-n of --cov-d); never coloured by value. */
.fd-coverage__fill { display: block; width: calc(var(--cov-n) / var(--cov-d) * 100%); height: 100%; border-radius: inherit; background: var(--fd-primary-600); }
.fd-coverage__link { align-self: flex-start; font: 600 var(--fd-text-meta) var(--fd-font); }

/* ---- Module cards: tile + title + one meta line; four, two or one per row (one below 560 px, as the tasks) ---- */
.fd-modules { container: modules / inline-size; }
.fd-modules__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@container modules (max-width: 639px) { .fd-modules__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container modules (max-width: 559px) { .fd-modules__list { grid-template-columns: minmax(0, 1fr); } }
.fd-module {
  display: flex; align-items: center; gap: 10px; height: 100%; min-height: 60px; padding: 10px 12px;
  background: var(--fd-surface); border: 1px solid var(--fd-border-hairline); border-radius: var(--fd-radius-card);
  color: var(--fd-text); text-decoration: none;
}
.fd-module:hover { border-color: var(--fd-secondary); color: var(--fd-text); }
.fd-module__text { display: flex; flex-direction: column; min-width: 0; }
.fd-module__title { font: 600 var(--fd-text-body) var(--fd-font); color: var(--fd-link); }
.fd-module:hover .fd-module__title { color: var(--fd-link-hover); text-decoration: underline; }
.fd-module__meta { font: var(--fd-text-meta) var(--fd-font); color: var(--fd-text-muted); }

/* ---- Below 1024 px (Filament lg) and under coarse pointers: 44 px targets for the links this
   screen adds (F16, ADVERSARIAL_REVIEW §9.11) ---- */
@media (max-width: 1023px), (pointer: coarse) {
  .fd-coverage__link, .fd-home-dates a { display: inline-flex; align-items: center; min-height: var(--fd-target); }
}

/* ---- Motion: hover only, 150 ms, behind the reduced-motion guard ---- */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion='reduced']) .fd-module { transition: border-color var(--fd-motion-fast) var(--fd-ease); }
}

/* ---- Forced colours (F23): the notice, the cards and the bar keep a visible edge ---- */
@media (forced-colors: active) {
  .fd-notice, .fd-module { border-color: CanvasText; }
  .fd-coverage { forced-color-adjust: none; background: Canvas; border: 1px solid CanvasText; }
  .fd-coverage__fill { background: Highlight; }
}
