/* ==========================================================================
   Law Optional Test Series page — page head with Quick Facts, benefit cards,
   "should you join" panel, checked-copy tiles, FAQ accordion, enquiry panel,
   related course cards, mobile sticky contact bar.
   Requires tokens.css + base.css. Mobile-first (360), enhanced at 640 / 960.
   (.page-head, .crumbs and .faq mirror prev-papers.css / notes.css: see
   pages/test-series/SHARED_REQUESTS.md)
   ========================================================================== */

/* Page head ------------------------------------------------------------ */
.page-head { padding-block: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-line); }
.page-head__inner { display: grid; gap: var(--s-3); }
.page-head__text { display: grid; gap: var(--s-2); justify-items: start; min-width: 0; }
.page-head__kicker {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--c-red-text);
}
.page-head__title { font-size: var(--fs-h1); }
.page-head__intro { max-width: 60ch; color: var(--c-text-muted); }
.page-head__batch { display: flex; }
.page-head__actions { width: 100%; margin-top: var(--s-1); }

/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); font-size: var(--fs-sm); color: var(--c-text-muted); }
.crumbs li + li::before { content: "\203A"; margin-right: var(--s-1); color: var(--c-text-muted); }
.crumbs a { color: var(--c-link-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.crumbs a:hover { text-decoration: underline; }

/* Icon inside a button (WhatsApp / Call) */
.btn__icon { flex: 0 0 auto; width: 18px; height: 18px; }

/* Quick Facts: a white card with a highlighted title and a two-column dl */
.facts { gap: var(--s-2); }
.facts__title { font-size: var(--fs-h3); }
.facts__list { display: grid; gap: 0; margin: 0; }
.facts__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px var(--s-2);
  padding-block: var(--s-1);
  border-top: 1px solid var(--c-line);
}
.facts__row dt {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.facts__row dd { margin: 0; color: var(--c-text); overflow-wrap: anywhere; }
.facts__row dd a { color: var(--c-link-text); text-decoration: none; font-weight: 700; }
.facts__row dd a:hover { text-decoration: underline; }

@media (min-width: 640px) {
  .facts__row { grid-template-columns: 11rem minmax(0, 1fr); align-items: baseline; }
}
@media (min-width: 960px) {
  .page-head { padding-block: var(--s-4) var(--s-5); }
  /* 960–1199: a narrower facts card (labels stacked) so the three buttons fit on one row */
  .ts-hero {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: "crumbs crumbs" "text facts";
    column-gap: var(--s-6);
    row-gap: var(--s-4);
    align-items: start;
  }
  .ts-hero > .crumbs { grid-area: crumbs; }
  .ts-hero > .page-head__text { grid-area: text; }
  .ts-hero > .facts { grid-area: facts; }
  .facts__row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1200px) {
  .ts-hero { grid-template-columns: minmax(0, 1fr) 420px; }
  .facts__row { grid-template-columns: 10.5rem minmax(0, 1fr); align-items: baseline; }
}

/* What you get: cards sit in a narrower centred grid when there are only two */
.ts-benefits { max-width: 860px; margin-inline: auto; }

/* Test structure table (rendered only once the test count is confirmed) ---- */
.ts-table-wrap { max-width: 560px; margin-inline: auto; }
.ts-table { width: 100%; border-collapse: collapse; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); }
.ts-table th, .ts-table td { padding: var(--s-2); border-top: 1px solid var(--c-line); text-align: left; }
.ts-table tr:first-child th, .ts-table tr:first-child td { border-top: 0; }
.ts-table th { font-family: var(--ff-display); font-weight: 400; color: var(--c-slate); }
.ts-table td { font-weight: 700; }

/* Should you join: prose beside a "when to join" check list ---------------- */
.ts-join {
  display: grid;
  gap: var(--s-3);
  max-width: 980px;
  margin-inline: auto;
  padding: var(--s-3);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.ts-join__text p { color: var(--c-text); }
.ts-join__text .lead { color: var(--c-slate); }
.ts-join__list {
  display: grid;
  gap: var(--s-2);
  align-content: start;
  padding: var(--s-3);
  background: var(--c-surface);
  border-radius: var(--radius);
}
.ts-join__caption { font-size: var(--fs-h3); }
.checks { display: grid; gap: var(--s-2); }
.checks li { display: flex; align-items: flex-start; gap: var(--s-1); color: var(--c-text); }
.checks__icon { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; color: var(--c-red-text); }
@media (min-width: 960px) {
  .ts-join { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4); }
}

/* Checked copy tiles: two tiles, centred -------------------------------- */
.ts-copies { max-width: 860px; margin-inline: auto; }

/* FAQ accordion (native details) ------------------------------------------ */
.faq { display: grid; gap: var(--s-1); max-width: 860px; margin-inline: auto; }
.faq__item {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: border-color var(--ease);
}
.faq__item[open] { border-color: var(--c-slate); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: 48px;
  padding: var(--s-2) var(--s-3);
  font-family: var(--ff-display);
  font-size: 1.0625rem;
  line-height: var(--lh-snug);
  color: var(--c-slate);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
  color: var(--c-red-text);
}
.faq__item[open] .faq__q::after { content: "\2212"; }
.faq__q:hover { color: var(--c-charcoal); }
.faq__a { padding: 0 var(--s-3) var(--s-3); }
.faq__a a { color: var(--c-link-text); }

/* Enquire panel ---------------------------------------------------------- */
.ts-enquire {
  gap: var(--s-3);
  max-width: 980px;
  margin-inline: auto;
  padding: var(--s-4) var(--s-3);
  border: 2px solid var(--c-charcoal);
}
.ts-enquire__text { display: grid; gap: var(--s-2); }
.ts-enquire__title { font-size: var(--fs-h2); }
.ts-enquire__body { color: var(--c-text-muted); max-width: 52ch; }
@media (min-width: 640px) {
  .ts-enquire__actions .btn { flex: 1 1 auto; }
}
@media (min-width: 960px) {
  .ts-enquire {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
    padding: var(--s-5) var(--s-6);
  }
  .ts-enquire__text { flex: 1 1 auto; min-width: 0; }
  .ts-enquire__actions { flex: 0 0 auto; flex-direction: column; width: 260px; }
  .ts-enquire__actions .btn { width: 100%; }
}

/* Mobile sticky contact bar: Call · WhatsApp · Enquire ------------------- */
/* one set of actions on phones: the shared FAB is hidden on this page */
.page-test-series .whatsapp-fab { display: none; }
.page-test-series { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
.ts-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--c-white);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -4px 16px rgba(20, 24, 28, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ts-sticky__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-1);
  padding-block: var(--s-1);
}
.ts-sticky__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 var(--s-1);
  font-family: var(--ff-display);
  font-size: 1rem;
  line-height: 1.2;
  color: var(--c-charcoal);
  background: var(--c-white);
  border: 2px solid var(--c-charcoal);
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.ts-sticky__btn svg { flex: 0 0 auto; width: 18px; height: 18px; }
.ts-sticky__btn:hover { background: var(--c-charcoal); color: var(--c-white); }
.ts-sticky__btn--red { color: var(--c-white); background: var(--c-red-text); border-color: var(--c-red-text); }
.ts-sticky__btn--red:hover { background: #B82323; border-color: #B82323; color: var(--c-white); }
@media (min-width: 960px) {
  .ts-sticky { display: none; }
  .page-test-series { padding-bottom: 0; }
}
