/* ============================================================
   Long-form guide pages — hero, jump-link contents, prose
   sections, spec tables, callouts, checklist, troubleshooting,
   FAQs and download CTA.
   Loads after components.css. Semantic tokens only.
   ============================================================ */

/* ---- Hero ---- */

.guide-hero {
  background: linear-gradient(165deg, var(--color-surface-alt), var(--color-surface));
  padding: var(--space-12) 0 var(--space-10);
}

.guide-hero__inner {
  max-width: 52rem;
  margin-inline: auto;
}

.guide-breadcrumb {
  margin-bottom: var(--space-5);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: var(--font-weight-medium);
}

.guide-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.guide-breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--color-border-neutral);
}

.guide-breadcrumb a { color: var(--color-text-muted); }
.guide-breadcrumb a:hover { color: var(--color-primary); }

.guide-hero__badge {
  display: inline-block;
  margin-bottom: var(--space-5);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-muted);
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guide-hero__title {
  margin-bottom: var(--space-5);
  color: var(--color-text);
  font-size: clamp(2.15rem, 6vw, 3.6rem);
  font-weight: var(--font-weight-black);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.guide-hero__title span { color: var(--color-primary); }

.guide-hero__lead {
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.75;
}

.guide-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding-top: var(--space-5);
  border-top: thin solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.84rem;
  font-weight: var(--font-weight-medium);
}

/* ---- Answer summary card (the short version) ---- */

.guide-summary {
  background: var(--color-surface);
  padding: var(--space-12) 0 0;
}

.guide-summary__card {
  max-width: 52rem;
  margin-inline: auto;
  padding: var(--space-8);
  background: var(--color-surface-alt);
  border: thin solid var(--color-border);
  border-radius: var(--radius-lg);
}

.guide-summary__title {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: 1.3rem;
  font-weight: var(--font-weight-extrabold);
}

.guide-summary__list {
  margin-left: var(--space-5);
  color: var(--color-text-muted);
  font-size: 0.97rem;
  line-height: 1.8;
}

.guide-summary__list strong { color: var(--color-text); }

/* ---- Table of contents ---- */

.guide-toc {
  background: var(--color-surface);
  padding: var(--space-10) 0;
}

.guide-toc__inner {
  max-width: 52rem;
  margin-inline: auto;
  padding: var(--space-6);
  border: thin solid var(--color-border-neutral);
  border-radius: var(--radius-md);
}

.guide-toc__title {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guide-toc__list {
  display: grid;
  gap: var(--space-2) var(--space-6);
  counter-reset: toc;
  list-style: none;
}

.guide-toc__list a {
  display: block;
  padding: var(--space-1) 0;
  color: var(--color-text);
  font-size: 0.94rem;
  font-weight: var(--font-weight-medium);
}

.guide-toc__list a::before {
  counter-increment: toc;
  content: counter(toc) ".";
  display: inline-block;
  min-width: 1.6rem;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.guide-toc__list a:hover { color: var(--color-primary); }

/* ---- Body sections ---- */

.guide-body { background: var(--color-surface); }

.guide-section {
  padding: var(--space-10) 0;
  scroll-margin-top: 5rem;
}

.guide-section--alt { background: var(--color-surface-alt); }

.guide-section__inner {
  max-width: 52rem;
  margin-inline: auto;
}

.guide-section__title {
  margin-bottom: var(--space-5);
  color: var(--color-text);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: var(--font-weight-black);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.guide-section__subtitle {
  margin: var(--space-8) 0 var(--space-4);
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: var(--font-weight-extrabold);
}

.guide-section p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.guide-section p strong { color: var(--color-text); }

.guide-section a { font-weight: var(--font-weight-semibold); }

.guide-list {
  margin: 0 0 var(--space-5) var(--space-5);
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.guide-list strong { color: var(--color-text); }
.guide-list li { margin-bottom: var(--space-1); }

.guide-section .guide-note {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.84rem;
  font-style: italic;
  line-height: 1.6;
}

/* ---- Audience chips ---- */

.guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  list-style: none;
}

.guide-chips li {
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: thin solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-size: 0.86rem;
  font-weight: var(--font-weight-semibold);
}

.guide-section--alt .guide-chips li { background: var(--color-surface); }

/* ---- Figures ---- */

.guide-figure { margin: var(--space-6) 0; }

.guide-figure__image {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-surface);
  border: thin solid var(--color-border);
  border-radius: var(--radius-md);
}

.guide-figure__image--photo {
  max-width: 27rem;
  margin-inline: auto;
}

.guide-figure figcaption {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  text-align: center;
}

/* ---- Spec tables ---- */

.guide-table-wrap {
  margin: var(--space-5) 0 var(--space-6);
  overflow-x: auto;
  border: thin solid var(--color-border);
  border-radius: var(--radius-md);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.guide-table th,
.guide-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: thin solid var(--color-border);
  vertical-align: top;
}

.guide-table thead th {
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

.guide-table tbody th {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

.guide-table td { color: var(--color-text-muted); line-height: 1.65; }
.guide-table tbody tr:last-child th,
.guide-table tbody tr:last-child td { border-bottom: 0; }

.guide-section--alt .guide-table-wrap { background: var(--color-surface); }

/* ---- Callouts ---- */

.guide-callout {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

.guide-callout--warn { border-left-color: var(--color-danger); }

.guide-section--alt .guide-callout { background: var(--color-surface); }

.guide-callout__label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-callout--warn .guide-callout__label { color: var(--color-danger); }

.guide-callout p:last-child { margin-bottom: 0; }

/* ---- Numbered steps ---- */

.guide-steps {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  list-style: none;
}

.guide-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface-alt);
  border: thin solid var(--color-border);
  border-radius: var(--radius-md);
}

.guide-section--alt .guide-step { background: var(--color-surface); }

.guide-step__number {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: var(--font-weight-black);
}

.guide-step__title {
  margin-bottom: var(--space-2);
  color: var(--color-text);
  font-size: 1.02rem;
  font-weight: var(--font-weight-extrabold);
}

.guide-step p { margin-bottom: 0; font-size: 0.95rem; }

/* ---- Match-day checklist ---- */

.guide-checklist {
  display: grid;
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.guide-checklist__group {
  padding: var(--space-6);
  background: var(--color-surface);
  border: thin solid var(--color-border);
  border-radius: var(--radius-md);
}

.guide-checklist__heading {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-checklist ul { list-style: none; }

.guide-checklist li {
  position: relative;
  padding: var(--space-2) 0 var(--space-2) var(--space-8);
  color: var(--color-text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.guide-checklist li::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 0;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

/* ---- Video ---- */

.guide-video {
  max-width: 52rem;
  margin: var(--space-6) auto 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-inverse);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.guide-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Related guides ---- */

.guide-related__grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.guide-related__card {
  display: block;
  padding: var(--space-6);
  background: var(--color-surface);
  border: thin solid var(--color-border);
  border-radius: var(--radius-md);
}

.guide-related__card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.guide-related__label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-related__name {
  margin-bottom: var(--space-2);
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: var(--font-weight-extrabold);
}

.guide-related__text {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ---- FAQs ---- */

.guide-faq__item { border-bottom: thin solid var(--color-border); }

.guide-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 3.5rem;
  padding: var(--space-4) 0;
  color: var(--color-text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  list-style: none;
}

.guide-faq__question::-webkit-details-marker { display: none; }

.guide-faq__question::after {
  content: "+";
  color: var(--color-primary);
  font-size: 1.4rem;
  font-weight: var(--font-weight-regular);
}

.guide-faq__item[open] .guide-faq__question::after { content: "\2212"; }

.guide-faq__answer {
  padding-bottom: var(--space-5);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.guide-faq__answer:last-child { margin-bottom: 0; }

/* ---- Download CTA ---- */

.guide-download { padding: var(--space-16) 0; background: var(--color-surface); }

.guide-download__panel {
  max-width: 52rem;
  margin-inline: auto;
  padding: var(--space-10) var(--space-6);
  background: var(--color-surface-alt);
  border: thin solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.guide-download__title {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: var(--font-weight-black);
  line-height: 1.15;
}

.guide-download__text {
  max-width: 38rem;
  margin: 0 auto var(--space-6);
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* ---- Breakpoints: md 640px · lg 768px ---- */

@media (min-width: 768px) {
  .guide-toc__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .guide-section { padding: var(--space-8) 0; }
  .guide-summary__card { padding: var(--space-6); }
  .guide-step { grid-template-columns: 1fr; padding: var(--space-5); }
  .guide-download__panel .btn-primary { display: block; width: 100%; }
}
