/* =========================================================================
   webinars — live + on-demand member education library (BRIEF §14 Batch B)

   Owns every .web-* class used by js/features/webinars.js and nothing else.
   All colour comes from the shell tokens in css/app.css, so light and dark
   both follow the app; the only per-theme values are the five status-pill
   tints, redefined in BOTH dark blocks below
   (system dark and the pinned data-theme="dark" that js/theme.js sets).
   ========================================================================= */

:root {
  --web-live-bg: #fdeaea;
  --web-live-ink: #a51f1f;
  --web-live-line: #f2c2c2;

  --web-up-bg: #e6eefa;
  --web-up-ink: #1f4f8f;
  --web-up-line: #c6d8f1;

  --web-reg-bg: #e4f2ea;
  --web-reg-ink: #12694a;
  --web-reg-line: #bcdfcd;

  --web-od-bg: #eef1f7;
  --web-od-ink: #3b4661;
  --web-od-line: #d8deea;

  --web-done-bg: #ece9fb;
  --web-done-ink: #4a3d9b;
  --web-done-line: #d4cdf3;

  --web-ceu-bg: #fff4d9;
  --web-ceu-ink: #7a4d05;
  --web-ceu-line: #e8c479;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --web-live-bg: #3a1618;
    --web-live-ink: #f09a9a;
    --web-live-line: #5c2427;

    --web-up-bg: #16263e;
    --web-up-ink: #8fb8ea;
    --web-up-line: #24395a;

    --web-reg-bg: #122c25;
    --web-reg-ink: #62c9a2;
    --web-reg-line: #1d4438;

    --web-od-bg: #1c2436;
    --web-od-ink: #a9b4cd;
    --web-od-line: #2b3650;

    --web-done-bg: #221f3d;
    --web-done-ink: #b0a5f0;
    --web-done-line: #332e57;

    --web-ceu-bg: #33290f;
    --web-ceu-ink: #f0cb7d;
    --web-ceu-line: #56431a;
  }
}

:root[data-theme="dark"] {
  --web-live-bg: #3a1618;
  --web-live-ink: #f09a9a;
  --web-live-line: #5c2427;

  --web-up-bg: #16263e;
  --web-up-ink: #8fb8ea;
  --web-up-line: #24395a;

  --web-reg-bg: #122c25;
  --web-reg-ink: #62c9a2;
  --web-reg-line: #1d4438;

  --web-od-bg: #1c2436;
  --web-od-ink: #a9b4cd;
  --web-od-line: #2b3650;

  --web-done-bg: #221f3d;
  --web-done-ink: #b0a5f0;
  --web-done-line: #332e57;

  --web-ceu-bg: #33290f;
  --web-ceu-ink: #f0cb7d;
  --web-ceu-line: #56431a;
}

/* ----------------------------------------------------------------- intro */

.web-intro .btn-row { margin-top: var(--s-3); }

/* ------------------------------------------------------------- CEU strip */

.web-ceu-card { background: var(--surface); }

.web-ceu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.web-ceu-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.web-ceu-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  min-width: 0;
}

.web-ceu-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  /* --primary flips to a deep navy in dark mode, which would vanish against
     --surface-2. --accent is the one brand blue that reads on both. */
  color: var(--accent);
}

.web-ceu-lab {
  font-size: .74rem;
  line-height: 1.3;
  color: var(--muted);
}

/* -------------------------------------------------------------- controls */

.web-controls {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin: var(--s-4) 0 var(--s-3);
}

/* The chip rows scroll sideways on a phone rather than wrapping into four
   lines; the page itself never scrolls sideways. */
.web-views-slot .chip-row,
.web-topics-slot .chip-row {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.web-views-slot .chip-row::-webkit-scrollbar,
.web-topics-slot .chip-row::-webkit-scrollbar { display: none; }

.web-views-slot .chip,
.web-topics-slot .chip { flex: 0 0 auto; scroll-snap-align: start; }

.web-search { width: 100%; }

/* ------------------------------------------------------------- the lists */

.web-list-slot { display: block; }

.web-list-slot .section-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: var(--s-5) 0 var(--s-3);
}

.web-list-slot .section-head:first-child { margin-top: var(--s-2); }

.web-count {
  font-size: .74rem;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface-3);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}

.web-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}

@media (min-width: 720px) {
  .web-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ card */

.web-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: var(--s-4);
  cursor: pointer;
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}

.web-card:hover { box-shadow: var(--sh-2); border-color: var(--line-strong); }
.web-card:active { transform: translateY(1px); }

.web-card:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.web-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.web-card-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.32;
  font-weight: 700;
  color: var(--ink);
}

.web-card-sum {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.web-card-by {
  margin: 0;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 600;
}

.web-card-meta {
  margin: 0;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--muted);
}

.web-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: auto;
  padding-top: var(--s-1);
}

.web-card-go {
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
}

/* ----------------------------------------------------------------- pills */

.web-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 3px 9px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.web-pill.live { background: var(--web-live-bg); color: var(--web-live-ink); border-color: var(--web-live-line); }
.web-pill.up   { background: var(--web-up-bg);   color: var(--web-up-ink);   border-color: var(--web-up-line); }
.web-pill.reg  { background: var(--web-reg-bg);  color: var(--web-reg-ink);  border-color: var(--web-reg-line); }
.web-pill.od   { background: var(--web-od-bg);   color: var(--web-od-ink);   border-color: var(--web-od-line); }
.web-pill.done { background: var(--web-done-bg); color: var(--web-done-ink); border-color: var(--web-done-line); }

/* A quiet pulse, and only on the one pill that means "right now". Anyone who
   asked the OS to stop animations gets a static dot. */
.web-pill.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: web-live-pulse 1.6s ease-in-out infinite;
}

@keyframes web-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  .web-pill.live::before { animation: none; }
  .web-card { transition: none; }
}

.web-topic {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  white-space: nowrap;
}

.web-topic.ghost {
  background: none;
  border-style: dashed;
  color: var(--muted);
  font-weight: 600;
}

.web-ceu {
  font-size: .72rem;
  font-weight: 700;
  color: var(--web-ceu-ink);
  background: var(--web-ceu-bg);
  border: 1px solid var(--web-ceu-line);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  white-space: nowrap;
}

.web-ceu.none {
  color: var(--muted);
  background: none;
  border-color: var(--line);
  font-weight: 600;
}

/* ---------------------------------------------------------------- detail */

.web-back {
  display: inline-block;
  margin-bottom: var(--s-3);
  font-weight: 600;
}

.web-hero .web-card-head { margin-bottom: var(--s-3); }

.web-detail-title {
  margin: 0 0 var(--s-2);
  font-size: 1.3rem;
  line-height: 1.28;
  font-weight: 800;
  color: var(--ink);
}

.web-detail-sum {
  margin: 0 0 var(--s-2);
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.web-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.web-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin: var(--s-4) 0 var(--s-2);
}

@media (min-width: 640px) {
  .web-actions { flex-direction: row; flex-wrap: wrap; }
  .web-actions .btn.block { width: auto; flex: 1 1 200px; }
}

.web-status-note {
  margin: 0 0 var(--s-4);
  line-height: 1.45;
}

.web-status-note:empty { display: none; }

/* The four detail cards. They inherit .card from app.css; this is only the
   rhythm between the heading and its body, which .card does not set. */
.web-about,
.web-takeaways,
.web-people,
.web-facts { margin-top: var(--s-3); }

.web-about h3,
.web-takeaways h3,
.web-people h3,
.web-facts h3 {
  margin: 0 0 var(--s-3);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.web-ceu-slot:empty { display: none; }

.web-home-card .web-ceu-head { margin-bottom: var(--s-2); }

.web-prose p {
  margin: 0 0 var(--s-3);
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.web-prose p:last-child { margin-bottom: 0; }

.web-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.web-list li {
  font-size: .9rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.web-presenters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.web-presenter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.web-presenter-name { font-weight: 700; color: var(--ink); font-size: .92rem; }
.web-presenter-role { font-size: .8rem; color: var(--muted); line-height: 1.4; }

.web-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}

.web-fact:last-of-type { border-bottom: 0; }

.web-fact-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  flex: 0 0 auto;
}

.web-fact-value {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ foot */

.web-foot {
  margin: var(--s-6) 0 var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

/* ------------------------------------------- the Home card (upcomingCard) */

.web-home-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.web-home-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}

.web-home-row:last-child { border-bottom: 0; padding-bottom: 0; }

.web-home-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.web-home-title {
  text-align: left;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.35;
}

.web-home-meta {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.35;
}
