/* ==========================================================================
   Lecture pages: hub, schedules, one lecture, the time-zone form, the
   calendar. Loaded by those pages only (the home page has home.css). Same
   rules as site.css: logical properties, colour tokens only, targets at
   least 44 px, no scripts.
   ========================================================================== */

/* Two columns of "next lecture" on wide screens, stacked on phones (never wider than the page). */
.lecture-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 32px;
  max-inline-size: 960px;
  margin-block: 32px;
}
.lecture-next__title { margin-block: 0 8px; color: var(--brand); font-size: 24px; }
.lecture-next__label { margin-block: 0 8px; color: var(--muted); font-size: 16px; }
.lecture-next { display: flex; flex-direction: column; min-inline-size: 0; }
.lecture-next__all { margin-block: auto 0; padding-block-start: 16px; }
/* The Resources section after the Speakers row: set apart from the buttons above it. */
.lecture-resources { max-inline-size: var(--measure); margin-block: 40px 0; }
.lecture-resources h2 { margin-block: 0 8px; color: var(--brand); font-size: 24px; }
.lecture-resources p { margin-block: 0 16px; }

.lecture-heading { margin-block: 40px 16px; color: var(--brand); font-size: 26px; }
.lecture-list {
  display: grid;
  gap: 16px;
  max-inline-size: 880px;
}

/* A lecture: a card with the lecture marker on its start edge, as in the timetable. */
.lecture-card {
  position: relative; /* anchors the title link's full-card target */
  min-inline-size: 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--marker);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow-wrap: anywhere;
}
.lecture-card__time { margin-block: 0 4px; color: var(--muted); font-size: 15px; }
.lecture-card__title { margin-block: 0 4px; font-size: 22px; }
.lecture-card__title a {
  color: var(--ink);
  text-decoration: none;
}
/* The whole card is the title link's target. */
.lecture-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.lecture-card__title a:hover { color: var(--brand); text-decoration: underline; }
.lecture-card__meta { margin-block: 0; color: var(--body); font-size: 16px; }

/* One lecture: the deep band (back link, title, the other language's title, whom it is for and
   the start as a large time), then the "Joining" box as the page's aside (.page-grid, site.css). */
.lecture-band { padding-block: 40px 48px; }
.lecture-band__back { margin-block: 0 8px; }
.lecture-band__title { max-inline-size: 24em; margin-block: 0 8px; }
.lecture-band__title::after { display: none; }
.lecture-band__other { margin-block: 0 12px; color: var(--on-deep-gold); font-size: 17px; font-weight: 600; }
.lecture-band__meta { margin-block: 0 16px; color: var(--on-deep-muted); }
.lecture-band__when { margin: 0; color: var(--on-deep); }
.lecture-band__date { font-weight: 600; } /* Montserrat, Plex for Arabic words: .lecture-time */
.lecture-band__time {
  color: var(--on-deep);
  font-family: var(--font-latin);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}
.lecture-band__zone { color: var(--on-deep-muted); font-size: 16px; }
.lecture__meta { margin-block: 0 12px; color: var(--muted); }
.lecture-note { max-inline-size: var(--measure); margin-block: 24px; color: var(--body); font-size: 18px; }
/* The speakers' panel and the summary in the main column. */
.page-main > .next-lecture__speakers { margin-block-end: 32px; }
.page-main > .prose > :first-child { margin-block-start: 0; }

/* The "Joining" box: a tinted block with a gold start edge; one next step, the calendar, the zone. */
.join-box {
  padding: 20px 24px;
  background: var(--tint);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}
.join-box__title { margin-block: 0 12px; color: var(--brand); font-size: 22px; }
.join-box .lecture-note { margin-block: 0 16px; font-size: 17px; }
.join-box .button-row { margin-block: 0 16px; }
.join-box .member-step { margin-block-end: 16px; }

/* The time-zone form, folded into one quiet line ("Times in Damascus time. Change"): a <details>,
   no script. Open, a label, a drop-down and a button, wrapping on phones. */
.tz-details { margin-block: 16px 24px; color: var(--body); font-size: 16px; }
.join-box .tz-details { margin-block: 0; }
.tz-details > summary {
  display: flex;
  align-items: center;
  min-block-size: var(--target);
  cursor: pointer;
  list-style: none;
}
.tz-details > summary::-webkit-details-marker { display: none; }
.tz-details__change {
  margin-inline-start: 0.3em;
  color: var(--brand-2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tz-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-block: 8px 0;
}
.tz-form__label { color: var(--ink); font-weight: 600; }
.tz-form__select {
  min-block-size: var(--target);
  max-inline-size: 100%;
  padding: 10px 12px;
  border: 1px solid var(--muted);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

/* --- Calendar -------------------------------------------------------------
   One list of days. Wide screens lay it out as seven columns (Saturday first);
   phones show it as a plain list, leaving out the days without lectures.
   Audience colours come from the palette tokens; each audience also has its
   own text label, so colour is never the only signal.                        */
.cal-filters { margin-block: 8px 16px; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-block: 0 24px;
  padding: 0;
  list-style: none;
  color: var(--body);
}
.cal-key {
  display: inline-block;
  inline-size: 16px;
  block-size: 16px;
  margin-inline-end: 8px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  vertical-align: middle;
}
.cal-key--radiologists { background: var(--brand-2); }
.cal-key--radiographers { background: var(--gold); }
/* "Both audiences" shows the two audience colours together, distinct in light and dark. */
.cal-key--both { background-image: linear-gradient(135deg, var(--brand-2) 50%, var(--gold) 50%); }
.cal-key--conferences { background: var(--ink); }

.cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-block: 0 16px;
}
.cal-head__title { margin-block: 0; font-size: 26px; }

.cal-weekdays {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.cal-days {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cal-day {
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.cal-day--out { background: var(--ground); border-color: var(--ground); }
.cal-day--today { border: 2px solid var(--brand); }
.cal-day__date { display: block; margin-block-end: 4px; color: var(--ink); font-weight: 600; }
.cal-day__number { display: none; }
.cal-events { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cal-event {
  display: block;
  min-block-size: var(--target);
  padding: 6px 8px;
  background: var(--ground);
  border-inline-start: 6px solid var(--ink);
  border-radius: var(--radius-s);
  color: var(--ink);
  text-decoration: none;
}
.cal-event:hover .cal-event__title { text-decoration: underline; }
.cal-event--radiologists { border-inline-start: 6px solid var(--brand-2); }
.cal-event--radiographers { border-inline-start: 6px solid var(--gold); }
.cal-event--both { position: relative; border-inline-start: 6px solid transparent; }
.cal-event--both::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -6px;
  inline-size: 6px;
  border-start-start-radius: var(--radius-s);
  border-end-start-radius: var(--radius-s);
  background-image: linear-gradient(var(--brand-2) 50%, var(--gold) 50%);
}
.cal-event--conferences { border-inline-start: 6px dashed var(--ink); }
.cal-event__time { font-weight: 600; }
.cal-event__audience { display: block; color: var(--muted); font-size: 14px; }

/* Phones: only the days with lectures, as a list. */
@media (max-width: 759.98px) {
  .cal .cal-day:not(.cal-day--busy) { display: none; }
}

/* Wide screens: seven columns. */
@media (min-width: 760px) {
  .cal .cal-weekdays { display: grid; margin-block-end: 4px; }
  .cal .cal-days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal .cal-day { min-block-size: 112px; }
  /* The long date stays for screen readers; the digit is what sighted people see. */
  .cal .cal-day__long {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .cal .cal-day__number { display: inline; font-size: 18px; }
}

.cal-subscribe { max-inline-size: var(--measure); margin-block: 40px 0; }
.cal-subscribe__title { margin-block: 0 8px; font-size: 22px; }
.cal-subscribe__help { margin-block: 0 8px; color: var(--body); }
.cal-subscribe__address {
  margin-block: 0;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--ink);
  overflow-wrap: anywhere;
  user-select: all;
}

/* >>> The next-lecture card: lectures.css and home.css hold this block word for word. */
/* --- The next lecture (lectures hub, lecture page, home page) ---------------------------
   One featured card: the lecture on one side, a tinted panel for its speakers
   on the other (lectures/_next_lecture.html); stacked on phones.             */
.next-lecture__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 32px;
  margin-block-end: 20px;
}
.page .next-lecture { margin-block: 32px 8px; }
.next-lecture__all {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-weight: 600;
}
.next-lecture__card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  padding: clamp(18px, 14.5px + 0.9vw, 28px);
  background: var(--card);
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--gold);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.next-lecture__main {
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.next-lecture__labels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.next-lecture__when { margin: 0; color: var(--muted); font-size: 15px; }
.next-lecture__when time {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  margin-inline-end: 8px;
  color: var(--ink);
}
.next-lecture__clock { color: var(--brand); font-size: 26px; font-weight: 700; }
.next-lecture__date { font-size: 16px; font-weight: 600; }
.next-lecture__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 23.4px + 0.67vw, 32px);
  line-height: 1.45;
  text-wrap: balance;
}
html[lang="en"] .next-lecture__title { font-size: clamp(23px, 21.2px + 0.45vw, 27px); line-height: 1.3; }
/* The other language's title, beside a gold line at the page's start edge. */
.next-lecture__other {
  margin: 0;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--gold-line);
  color: var(--on-gold-tint);
  font-size: 15px;
  font-weight: 600;
}
.next-lecture__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 8px 0 0; }
.next-lecture__note { color: var(--muted); font-size: 14px; }
.next-lecture__speakers {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 12px;
  min-inline-size: 0;
  padding: 20px 22px;
  background: var(--tint);
  border-inline-start: 2px solid var(--gold-line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}
.next-lecture__speakers-label { margin: 0; color: var(--brand-2); font-size: 14px; font-weight: 600; }
.next-lecture__speakers .avatar {
  inline-size: 72px;
  block-size: 72px;
  border-width: 2px;
  background: var(--card);
  font-size: 24px;
}
.next-lecture__speakers--many .avatar { inline-size: 56px; block-size: 56px; font-size: 19px; }
.next-lecture__speakers .person__name { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.next-lecture__speakers .person__name:lang(en) { font-family: var(--font-latin); font-size: 18px; }
.next-lecture__speakers a.person__name { text-decoration: none; }
.next-lecture__speakers a.person__name:hover { text-decoration: underline; }
/* The speaker with the résumé is written twice and only one is displayed (display: none also
   hides the other from screen readers and the keyboard): open from 760 px, behind the name on a
   phone, so the card stays short there. No script. */
.next-lecture__wide { display: contents; }
.next-lecture__narrow { display: none; }
@media (max-width: 759.98px) {
  .next-lecture__wide { display: none; }
  .next-lecture__narrow { display: contents; }
}
@media (max-width: 479.98px) {
  .next-lecture__speakers { padding: 16px; }
  .next-lecture__speakers .avatar { inline-size: 56px; block-size: 56px; font-size: 19px; }
}
/* The zone after a time ("(Damascus time)"), in the card and on the lecture page. */
.lecture-zone { color: var(--muted); font-weight: 400; font-size: 16px; }
/* <<< The next-lecture card. */

/* One speaker's page: a round photo in a thin gold ring, or the initials. */
.speaker__photo {
  display: block;
  inline-size: 168px;
  block-size: 168px;
  padding: 4px;
  object-fit: cover;
  margin-block-end: 16px;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: var(--card);
}
.avatar--large { inline-size: 128px; block-size: 128px; margin-block-end: 16px; font-size: 40px; }

/* The name link in the speakers list is a block at least 44 px tall (a touch target). */
.speaker-card__link {
  display: block;
  min-block-size: var(--target);
  color: var(--ink);
}
.speaker-card__link:hover { color: var(--brand); text-decoration: underline; }

/* --- Recorded library ------------------------------------------------------
   Filters in a wrapping grid; each row's state list and watch button sit under
   the card text. The button is above the title link's full-card target.      */
.library-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 24px;
  align-items: end;
  max-inline-size: 960px;
  margin-block: 24px;
}
.library-filters__buttons { margin-block: 0 20px; }
.library-states { margin-block: 8px 0; padding: 0; list-style: none; }
.library-states a { display: inline-flex; align-items: center; min-block-size: var(--target); }
.library-watch { position: relative; display: inline-block; margin-block: 12px 0; }

/* --- Quiz -------------------------------------------------------------------
   Each question is a fieldset (the shared .field--group); only spacing here.  */
.quiz-question { margin-block-end: 28px; }
.quiz-review { max-inline-size: var(--measure); padding-inline-start: 24px; }
.quiz-review li { margin-block-end: 16px; }

/* The public certificate check: the result under the form. */
.certificate-result {
  max-inline-size: 40em;
  margin-block: 24px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.certificate-result h2 { margin-block: 0 8px; color: var(--brand); }
.certificate-facts { margin: 0; }
.certificate-facts dt { margin-block-start: 12px; color: var(--body); font-weight: 600; }
.certificate-facts dd { margin: 4px 0 0; color: var(--ink); font-size: 18px; }

/* The note under a certificate's download links: on its own line, not run into the links. */
.certificate-note {
  display: block;
  max-inline-size: var(--measure);
  margin-block-start: 8px;
  color: var(--body);
  font-size: 16px;
}

/* --- My learning ------------------------------------------------------------
   Three lists, each item a title, a line of facts and its links.              */
.learning-section { margin-block: 32px; }
.learning-list { margin: 0; padding: 0; list-style: none; }
.learning-item {
  max-inline-size: var(--measure);
  margin-block-end: 12px;
  padding: 12px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.learning-item p { margin-block: 4px; }
.learning-item__title { color: var(--ink); font-size: 18px; font-weight: 600; }
.learning-item__meta { color: var(--body); }
.learning-item__state { color: var(--ink); font-weight: 600; }
.learning-item a { display: inline-flex; align-items: center; min-block-size: var(--target); }

/* --- The member block of a lecture page: one next step. ---------------------- */
.member-step { margin-block: 8px; }

/* The heading of the next-lecture block on the lectures hub: Amiri/Montserrat in the brand colour. */
.home-section-title {
  margin: 0;
  color: var(--brand);
  font-size: clamp(26px, 21.37px + 1.2vw, 36px);
  font-weight: 700;
}
html[lang="en"] .home-section-title { font-size: clamp(24px, 21.37px + 0.674vw, 30px); }
