/* The home page's "For you" carousel (site/homeFeed.js; owner's design
   2026-11-14): one card per screen on a phone with the next one peeking in,
   two on a tablet, three on a computer. Native scroll snapping, so a finger
   swipes it like any list; it never moves on its own. Widths never assume
   English: French text wraps inside the cards. */

.hf {
  --hf-gap: 12px;
  --hf-per: 1;
  --hf-peek: 32px;
  max-width: 1100px;
  margin: 8px auto 28px;
  padding: 0 16px;
  min-width: 0;
}
.hf[hidden] { display: none; }
@media (min-width: 700px) {
  .hf { --hf-per: 2; --hf-peek: 40px; }
}
@media (min-width: 1100px) {
  .hf { --hf-per: 3; --hf-peek: 0px; }
}

.hf-head { margin: 0 0 12px; }
.hf-greeting {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}
[data-theme="light"] .hf-greeting { color: var(--brand-navy); }
.hf-sub { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }

.hf-shell { position: relative; min-width: 0; }

.hf-track {
  display: flex;
  gap: var(--hf-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* Same as the side padding, so the first card snaps to the very start. */
  scroll-padding-inline: 2px;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hf-track::-webkit-scrollbar { display: none; }
.hf-track:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; border-radius: var(--radius-lg, 14px); }
.hf-track.is-hinting { scroll-snap-type: none; }

.hf-card {
  flex: 0 0 calc((100% - var(--hf-peek) - (var(--hf-per) - 1) * var(--hf-gap)) / var(--hf-per));
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  color: var(--text);
  overflow-wrap: anywhere;
}
/* Loading: an outlined card with shimmering lines where its words and
   button will be (the lines carry style.css's .dt-skeleton shimmer). */
.hf-card--skeleton { min-height: 220px; pointer-events: none; }
.hf-sk { display: block; border-radius: 6px; }
.hf-sk--eyebrow { width: 32%; height: 0.75rem; }
.hf-sk--title { width: 78%; height: 1.15rem; margin-top: 4px; }
.hf-sk--line { width: 92%; height: 0.85rem; }
.hf-sk--short { width: 60%; }
.hf-sk--button { width: 46%; height: 40px; border-radius: 999px; margin-top: auto; }

.hf-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}
.hf-loading .dt-section-spinner { padding: 0; }
.hf-loading .dt-section-spinner::after { width: 20px; height: 20px; }

.hf-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 16px 18px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg, 14px);
  background: var(--warning-bg);
}
.hf-error-text { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hf-error .hf-btn { font: inherit; font-weight: 700; cursor: pointer; background: var(--surface); }
.hf-card--nextUp { border-color: var(--info-border); background: linear-gradient(160deg, var(--info-bg), var(--surface) 70%); }
.hf-card--rate { border-color: var(--warning-border); }

.hf-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.hf-title { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.3; }
.hf-body { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.hf-body:empty { display: none; }
.hf-note { margin: 0; font-size: 0.86rem; color: var(--muted); }
.hf-note--points { color: var(--warning-text); font-weight: 700; }
.hf-muted { color: var(--muted); font-size: 0.82rem; flex: 0 0 auto; }

.hf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
  max-width: 100%;
  font-family: inherit;
  cursor: pointer;
}
.hf-btn:hover { background: var(--control-hover-bg); }
.hf-btn--primary { background: var(--action-bg); border-color: var(--action-border); color: var(--on-accent); }
.hf-btn--primary:hover { background: var(--action-hover); }
.hf-btn--address { gap: 7px; }
.hf-btn-icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; }
.hf-btn-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hf-btn--address.is-copied { color: var(--success-text); border-color: var(--success-border); background: var(--success-bg); }
.hf-btn:focus-visible, .hf-list-link:focus-visible, .hf-tutor:focus-visible, .hf-chip:focus-visible, .hf-news-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.hf-list { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 6px; }
.hf-list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.hf-list-link > span:first-child { min-width: 0; }
.hf-list-link:hover { background: var(--control-hover-bg); }
.hf-pill {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  font-weight: 800;
  font-size: 0.8rem;
}

.hf-meter { height: 8px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.hf-meter-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-blue), var(--accent)); }

.hf-tutors { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.hf-tutor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
}
.hf-tutor:hover { background: var(--control-hover-bg); }
.hf-tutor-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  font-weight: 800;
}
.hf-tutor-photo img { width: 100%; height: 100%; object-fit: cover; }
.hf-tutor-name { font-weight: 700; font-size: 0.86rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-tutor-meta { font-size: 0.74rem; color: var(--muted); line-height: 1.2; }
.hf-tag {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--info-bg);
  color: var(--info-text);
  font-size: 0.7rem;
  font-weight: 800;
}
.hf-tag--new { margin: 0 0 0 6px; background: var(--warning-bg); color: var(--warning-text); vertical-align: 1px; }

/* The tutor's coming sessions (agendaCard): a heading per group, two-line
   rows whose second line is cut short with "…", so a long course name or
   French text never widens or overflows the card. */
.hf-agenda-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.hf-agenda-group + .hf-agenda-group { margin-top: 6px; }
.hf-agenda-heading { font-size: 0.75rem; }
.hf-agenda { margin: 0; grid-template-columns: minmax(0, 1fr); }
.hf-agenda > li { min-width: 0; }
.hf-agenda-row { flex-direction: column; align-items: stretch; justify-content: center; gap: 1px; min-width: 0; }
.hf-agenda-when { font-weight: 800; font-variant-numeric: tabular-nums; }
.hf-agenda-what {
  min-width: 0;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--info-border);
  background: var(--info-bg);
  color: var(--text);
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  max-width: 100%;
}

.hf-news { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hf-news-item { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.hf-news-img { flex: 0 0 64px; width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-alt); }
.hf-news-text { min-width: 0; }
.hf-news-title { margin: 0; font-weight: 800; font-size: 0.93rem; }
.hf-news-body {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hf-news-link { font-size: 0.84rem; font-weight: 700; color: var(--link); }

.hf-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}
.hf-controls[hidden] { display: none; }
.hf-arrow {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.hf-arrow:hover:not(:disabled) { background: var(--control-hover-bg); }
.hf-arrow:disabled { opacity: 0.35; cursor: default; }
.hf-arrow:focus-visible, .hf-dot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (min-width: 700px) {
  .hf-arrow { display: inline-flex; }
}
.hf-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hf-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
}
.hf-dot[hidden] { display: none; }
.hf-dot[aria-current="true"] { background: var(--accent); width: 20px; border-radius: 999px; }
.hf-counter { margin: 0; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: center; }
@media (min-width: 700px) {
  .hf-counter { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hf-track { scroll-behavior: auto; }
}
