/* ============================================================
   Guides (/guides/{slug})

   Only the article shell and the section components live here. Anything an article shares with the
   rest of the app — the jersey, the player label, the .fdr difficulty chip, the breadcrumb — is
   drawn by the component's own rules in redesign.css, so a guide looks like the app rather than
   like a blog bolted onto it, and a change to a shared component reaches this page for free.

   Every colour is a token: the dark theme is a token swap in redesign.css, and a raw hex here would
   survive it and be unreadable on one of the two themes.
   ============================================================ */

.guide { max-width: 760px; margin: 0 auto; }

/* The 760px cap is on the header as well as on the body it heads: on the index the article shell
   does not wrap it, so without one the headline spans the full 1360px page while every entry under
   it stops at 760. */
.guide-head { max-width: 760px; margin: 0 auto 24px; padding: 8px 0 20px;
  border-bottom: 1px solid var(--border); }
.guide-head h1 { font-size: 34px; line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 12px; }
.guide-standfirst { font-size: 17px; line-height: 1.55; color: var(--text-2); margin: 0 0 14px; }
.guide-byline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3); margin: 0; }

.article-body { display: flex; flex-direction: column; gap: 28px; }
.article-section { margin: 0; }
.article-section h2 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; }
.article-section h3 { font-size: 16px; line-height: 1.35; margin: 0 0 6px; }
.article-prose { font-size: 16px; line-height: 1.65; color: var(--text); margin: 0; }
.article-prose a { color: var(--green-deep); font-weight: 600; }

/* ---- tables ----
   The wrapper is what keeps the page itself from scrolling sideways at 375px. An article is the
   most-linked surface on the site and cannot afford a horizontal scrollbar on the body, and both
   the planner and the players work shipped page-widening bugs from unconstrained table content. */
.article-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.article-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.article-table caption { text-align: left; font-size: 22px; font-weight: 700; line-height: 1.25;
  color: var(--text); padding: 16px 16px 10px; }
.article-table th, .article-table td { padding: 10px 14px; text-align: left; white-space: nowrap; }
.article-table thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); }
.article-table tbody tr + tr th, .article-table tbody tr + tr td { border-top: 1px solid var(--border-2); }
.article-table tbody th { font-weight: 600; color: var(--text); }
.article-table__player { min-width: 160px; }
.article-table__why { white-space: normal; min-width: 240px; color: var(--text-2); }
.article-table__fdr { display: flex; gap: 6px; }
.article-table__team { white-space: nowrap; }
.article-table__team .kit { vertical-align: middle; margin-right: 6px; }
.article-player { color: inherit; text-decoration: none; }
.article-player:hover { color: var(--green-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ---- stat callouts ---- */
.article-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.article-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.article-stat__label { font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-3); }
.article-stat__value { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--text); }
.article-stat__note { font-size: 12.5px; color: var(--text-3); }

/* ---- FAQ and links ---- */
.article-faq__item + .article-faq__item { margin-top: 18px; }
.article-faq p { font-size: 15.5px; line-height: 1.6; color: var(--text-2); margin: 0; }
.article-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.article-links a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.article-links a:hover { text-decoration: underline; text-underline-offset: 2px; }
.article-links span { display: block; font-size: 13px; color: var(--text-3); }

/* ---- the index (/guides, /guides/gameweek/{n}) ----
   One column of entries rather than a card grid: every one of these is a headline and a sentence,
   and a grid would set the sentence in a column too narrow to read at 375px. */
.guide-index { list-style: none; margin: 0 auto; padding: 0; max-width: 760px;
  display: flex; flex-direction: column; }
.guide-index li { padding: 20px 0; border-top: 1px solid var(--border); }
.guide-index li:first-child { border-top: none; padding-top: 0; }
.guide-index__title { display: block; font-size: 20px; font-weight: 700; line-height: 1.3;
  color: var(--text); text-decoration: none; }
.guide-index__title:hover { color: var(--green-deep); text-decoration: underline;
  text-underline-offset: 2px; }
.guide-index__standfirst { font-size: 15px; line-height: 1.55; color: var(--text-2); margin: 6px 0 0;
  /* A long headline or an unbroken slug must wrap rather than widen the page. */
  overflow-wrap: anywhere; }
.guide-index__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3); margin: 8px 0 0; }
/* Underlined rather than merely bold: the site's base rule is `a { color: inherit; text-decoration:
   none }`, so a link in muted meta text beside a date is otherwise indistinguishable from it. */
.guide-index__meta a { color: var(--text-3); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; }
.guide-index__meta a:hover { color: var(--green-deep); }

.guide-index__empty { max-width: 760px; margin: 0 auto; font-size: 15px; color: var(--text-3); }

.guide-pager { max-width: 760px; margin: 24px auto 0; padding-top: 20px;
  border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap; font-size: 14px; }
.guide-pager a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.guide-pager a:hover { text-decoration: underline; text-underline-offset: 2px; }
.guide-pager__count { color: var(--text-3); }

@media (max-width: 640px) {
  .guide-head h1 { font-size: 27px; }
  .guide-standfirst { font-size: 15.5px; }
  .article-table caption { font-size: 19px; }
  .guide-index__title { font-size: 18px; }
}
