/* ==========================================================================
   Preparation strategy page (/law-optional-preparation-strategy)
   Page head, byline, sticky jump bar, TOC, path cards, video facade,
   long-form steps, callouts, compare table, accordion (tips + FAQ),
   path list, contact strip. Requires tokens.css + base.css.
   Mobile-first (360), enhanced at 640 / 960.
   (.page-head, .crumbs, .pills, .faq-style accordion and .contact-strip mirror
   notes.css / prev-papers.css: see pages/prep-strategy/SHARED_REQUESTS.md)
   ========================================================================== */

/* Page head ------------------------------------------------------------ */
.page-head { padding-block: var(--s-3) var(--s-4); }
.page-head__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.page-head__text { display: grid; gap: var(--s-2); min-width: 0; }
.page-head__kicker {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red-text);
}
.page-head__title { font-size: var(--fs-h1); }
.page-head__intro { max-width: 66ch; color: var(--c-text-muted); }
.page-head__actions { min-width: 0; }
.byline { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); font-family: var(--ff-serif); font-size: var(--fs-sm); color: var(--c-text-muted); }

/* 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; }

@media (min-width: 960px) {
  .page-head { padding-block: var(--s-4) var(--s-5); }
  .page-head__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "crumbs crumbs" "text actions";
    column-gap: var(--s-6);
    row-gap: var(--s-3);
  }
  .page-head__inner > .crumbs { grid-area: crumbs; }
  .page-head__text { grid-area: text; }
  .page-head__actions { grid-area: actions; align-self: start; justify-self: end; width: 280px; padding-top: var(--s-1); }
  .page-head__actions .btn-row { flex-direction: column; }
  .page-head__actions .btn { width: 100%; }
}

/* Sticky jump bar: one row of pills that scrolls inside its own box -------- */
.jump-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--c-white);
  border-block: 1px solid var(--c-line);
}
.pills-wrap { min-width: 0; margin-inline: calc(-1 * var(--gutter)); }
.pills {
  display: flex;
  gap: var(--s-1);
  overflow-x: auto;
  padding-inline: var(--gutter);
  padding-block: var(--s-1);
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--s-2);
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--c-slate);
  background: var(--c-white);
  border: 1px solid var(--c-slate);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.pill:hover { background: var(--c-slate); color: var(--c-white); }
/* desktop: the row wraps instead of scrolling */
@media (min-width: 960px) {
  .pills { flex-wrap: wrap; overflow: visible; }
}
/* anchors land below the sticky bar */
.section[id], .step[id], .acc__item[id], .common-card[id] { scroll-margin-top: 72px; }

/* Table of contents -------------------------------------------------------- */
.toc { padding-block: var(--s-4) 0; }
.toc__box {
  padding: var(--s-3);
  background: var(--c-surface);
  border-left: 4px solid var(--c-red-text);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.toc__title {
  font-size: var(--fs-sm);
  font-family: var(--ff-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-slate);
  margin-bottom: var(--s-1);
}
.toc__list { list-style: decimal; padding-left: 1.5em; display: grid; gap: 2px; columns: auto; }
.toc__list li { padding-left: 0.25em; }
.toc__list a { display: inline-flex; align-items: center; min-height: 32px; color: var(--c-link-text); text-decoration: none; }
.toc__list a:hover { text-decoration: underline; color: var(--c-slate); }
.toc__list::marker, .toc__list li::marker { color: var(--c-text-muted); font-family: var(--ff-display); }
@media (min-width: 640px) {
  .toc__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px var(--s-4); }
}
@media (min-width: 960px) {
  .toc__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Long-form typography: readable measure, roomier leading from 640 ---------- */
.prose p { max-width: 68ch; }
@media (min-width: 640px) {
  .prose { font-size: 1.0625rem; line-height: 1.65; }
}

/* Choose your path ---------------------------------------------------------- */
.choose-grid { max-width: 900px; margin-inline: auto; }
.path-card { border-top: 4px solid var(--c-red-text); }
.path-card .card__body { color: var(--c-text); }
.choose__note {
  max-width: 68ch;
  margin: var(--s-4) auto 0;
  padding: var(--s-2) var(--s-3);
  color: var(--c-text-muted);
  background: var(--c-surface);
  border-radius: var(--radius);
  text-align: center;
  text-wrap: balance;
}

/* Video ------------------------------------------------------------------- */
.video__inner { display: grid; gap: var(--s-3); }
.video__title::after { margin-inline: 0; }
.video__text p { max-width: 60ch; color: var(--c-text-muted); }
.video__media { min-width: 0; }
.video-facade {
  position: relative; /* play badge over the thumbnail */
  aspect-ratio: 16 / 9;
  background: var(--c-charcoal);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.video-facade__btn { display: block; width: 100%; height: 100%; }
.video-facade__thumb { width: 100%; height: 100%; object-fit: cover; }
/* text poster used when no thumbnail file is set */
.video-facade__poster {
  display: grid;
  gap: var(--s-1);
  align-content: end;
  justify-items: start;
  width: 100%;
  height: 100%;
  padding: var(--s-3);
  text-align: left;
  color: var(--c-white);
  background: linear-gradient(160deg, var(--c-slate) 0%, var(--c-charcoal) 70%);
}
.video-facade__kicker { font-family: var(--ff-display); font-size: var(--fs-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-gold-light); }
.video-facade__name { font-family: var(--ff-display); font-size: var(--fs-h3); line-height: var(--lh-tight); max-width: 18ch; }
.video-facade__by { font-family: var(--ff-serif); font-size: var(--fs-sm); color: #D9DCD6; }
/* with the text poster the play badge sits at the right, clear of the title */
.video-facade--poster .video-facade__poster { padding-right: calc(72px + var(--s-5)); }
.video-facade--poster .video-facade__play { justify-content: flex-end; padding-right: var(--s-3); }
@media (min-width: 640px) { .video-facade__name { font-size: var(--fs-h2); } }
/* buttons on this page keep the 44px tap target even in the small size */
.page-prep .btn--sm { min-height: var(--tap-min); }
.video-facade__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.video-facade__play svg {
  width: 72px;
  height: 72px;
  padding: 18px;
  color: var(--c-white);
  background: var(--c-red-text);
  border-radius: 50%;
  box-shadow: var(--shadow-float);
  transition: transform var(--ease);
}
.video-facade__btn:hover .video-facade__play svg { transform: scale(1.06); }
.video-facade__btn:focus-visible { outline-offset: -3px; }
.video-facade__fallback { position: absolute; inset: auto var(--s-2) var(--s-2); color: var(--c-white); text-align: center; }
.video-facade__iframe { display: block; width: 100%; height: 100%; border: 0; }
.video__caption { margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--c-text-muted); }
@media (min-width: 960px) {
  .video__inner { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: var(--s-6); }
}

/* Path sections: group head + numbered steps ------------------------------- */
.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-1) var(--s-2);
  margin-bottom: var(--s-2);
  padding-bottom: var(--s-2);
  border-bottom: 3px solid var(--c-red);
}
.group-head__title { font-size: var(--fs-h2); }
.group-head__meta { color: var(--c-text-muted); font-size: var(--fs-sm); white-space: nowrap; }
.group-head__sub { color: var(--c-text-muted); margin-bottom: var(--s-3); }

.steps { display: grid; gap: var(--s-2); }
/* phone: number + title on one row, text full width below;
   640+: number in a left column, title and text beside it */
.step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: var(--s-2);
  row-gap: var(--s-2);
  align-items: center;
  padding: var(--s-3);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.step__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--ff-display);
  font-size: 1.125rem;
  color: var(--c-white);
  background: var(--c-red-text);
  border-radius: 50%;
}
.step__title { font-size: var(--fs-h3); color: var(--c-charcoal); min-width: 0; }
.step__body { grid-column: 1 / -1; min-width: 0; }
.step__body p { color: var(--c-text); }
.step__links, .tip__links { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); }
.step__links .link-more, .tip__links .link-more { color: var(--c-link-text); }
.step__links .link-more:hover, .tip__links .link-more:hover { color: var(--c-slate); }

.callout {
  padding: var(--s-2) var(--s-3);
  background: var(--c-surface);
  border-left: 4px solid var(--c-red-text);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 68ch;
}
.callout__label { font-family: var(--ff-display); font-weight: 400; color: var(--c-charcoal); }

@media (min-width: 640px) {
  .steps { gap: var(--s-3); position: relative; }
  /* left rail joining the step numbers */
  .steps::before {
    content: "";
    position: absolute; /* decorative line only */
    left: calc(var(--s-3) + 18px - 1px);
    top: var(--s-3);
    bottom: var(--s-3);
    width: 2px;
    background: var(--c-line);
  }
  .step { grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--s-3); align-items: start; position: relative; }
  .step__num { width: 40px; height: 40px; box-shadow: 0 0 0 4px var(--c-white); }
  .step__title { display: flex; align-items: center; min-height: 40px; }
  .step__body { grid-column: 2; }
}
.section--tint .step__num { box-shadow: 0 0 0 4px var(--c-white); }

/* Side by side: cards below 640, a real table from 640 ---------------------- */
.compare { width: 100%; border-collapse: collapse; max-width: 960px; margin-inline: auto; }
.compare th, .compare td { text-align: left; vertical-align: top; }
@media (max-width: 639px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare tr {
    padding: var(--s-2) var(--s-3);
    margin-bottom: var(--s-2);
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
  }
  .compare tr:last-child { margin-bottom: 0; }
  .compare th[scope="row"] {
    font-family: var(--ff-display);
    font-weight: 400;
    font-size: var(--fs-h3);
    color: var(--c-slate);
    padding-bottom: var(--s-1);
  }
  .compare td { padding-block: var(--s-1); }
  .compare td + td { border-top: 1px solid var(--c-line); }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--ff-display);
    font-size: var(--fs-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-red-text);
    margin-bottom: 2px;
  }
}
@media (min-width: 640px) {
  .compare { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
  .compare th, .compare td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--c-line); }
  .compare thead th { font-family: var(--ff-display); font-weight: 400; color: var(--c-white); background: var(--c-charcoal); border-bottom: 0; }
  .compare th[scope="row"] { font-family: var(--ff-display); font-weight: 400; color: var(--c-slate); width: 24%; background: var(--c-surface); }
  .compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
}

/* Common strategy cards ----------------------------------------------------- */
.common-card .card__body { color: var(--c-text); }
/* long card bodies: two columns until 1200, four from there */
@media (min-width: 960px) and (max-width: 1199px) {
  #common .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
}
.common-card .card__foot .link-more { color: var(--c-link-text); }
.common-card .card__foot .link-more--red { color: var(--c-red-text); }

/* Accordion (native details): used by the tips and the FAQ ------------------ */
.acc { display: grid; gap: var(--s-1); max-width: 860px; margin-inline: auto; }
.acc__item {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: border-color var(--ease);
}
.acc__item[open] { border-color: var(--c-slate); }
.acc__q {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap-min);
  padding: var(--s-2) var(--s-3);
  font-family: var(--ff-display);
  color: var(--c-slate);
  cursor: pointer;
  list-style: none;
}
.acc__q::-webkit-details-marker { display: none; }
.acc__q::after {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  margin-left: auto;
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
  color: var(--c-red-text);
}
.acc__item[open] .acc__q::after { content: "\2212"; }
.acc__q:hover { color: var(--c-charcoal); }
.acc__title, .tip__title { font-size: 1.0625rem; line-height: var(--lh-snug); color: inherit; text-wrap: pretty; }
.acc__a { padding: 0 var(--s-3) var(--s-3); }
.acc__a p { max-width: 68ch; }
.acc__a a { color: var(--c-link-text); }

/* Tips: numbered summaries, author's aside, PDF list */
.acc--tips { max-width: 900px; }
.tip__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--c-white);
  background: var(--c-charcoal);
  border-radius: 50%;
}
.acc__item[open] .tip__num { background: var(--c-red-text); }
.tip .acc__a { padding-left: calc(var(--s-3) + 32px + var(--s-2)); }
.tip__aside {
  padding-left: var(--s-2);
  border-left: 3px solid var(--c-red-text);
  font-family: var(--ff-serif);
  color: var(--c-text);
}
.tip__files { display: grid; gap: 2px; }
.tip__files a { display: inline-flex; align-items: center; min-height: 36px; color: var(--c-link-text); }
@media (max-width: 639px) {
  .tip .acc__a { padding-left: var(--s-3); }
}

/* Just-starting path list --------------------------------------------------- */
.path-list { display: grid; gap: var(--s-1); max-width: 760px; margin-inline: auto; }
.path-list__item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.path-list__item.is-current { border-color: var(--c-red-text); background: var(--c-surface); }
.path-list__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: var(--s-2);
  font-family: var(--ff-display);
  color: var(--c-white);
  background: var(--c-navy);
  border-radius: 50%;
}
.path-list__item.is-current .path-list__num { background: var(--c-red-text); }
.path-list__link, .path-list__text {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: var(--s-1) var(--s-2) var(--s-1) 0;
  align-content: center;
  text-decoration: none;
  color: var(--c-text);
}
.path-list__title { font-family: var(--ff-display); color: var(--c-navy); }
.path-list__link:hover .path-list__title { text-decoration: underline; }
.path-list__blurb { font-size: var(--fs-sm); color: var(--c-text-muted); }
.path-list__link::after {
  content: "\2192";
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--c-navy);
  font-family: var(--ff-display);
}
.path-list__link { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-2); }
@media (min-width: 640px) {
  .path-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); max-width: none; }
  .path-list__item { height: 100%; }
}
@media (min-width: 960px) {
  .path-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Contact strip (one enquiry path, inside the guidance section) ------------- */
.contact-strip {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-4);
  padding: var(--s-3);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.contact-strip__title { font-size: var(--fs-h3); color: var(--c-charcoal); }
.contact-strip__sub { color: var(--c-text-muted); margin-top: var(--s-1); }
.contact-strip__sub a { color: var(--c-link-text); }
.btn--whatsapp { background: #1DA851; border-color: #1DA851; color: var(--c-white); }
.btn--whatsapp:hover { background: #178A42; border-color: #178A42; color: var(--c-white); }
.btn__icon { width: 20px; height: 20px; flex: 0 0 auto; }
@media (min-width: 960px) {
  .contact-strip { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-6); padding: var(--s-4); margin-top: var(--s-5); }
  .contact-strip__actions { justify-content: flex-end; }
}
