/* ==========================================================================
   Previous year papers page — page head, year jump chips, year cards with
   paper rows, spoke links, how-to steps, FAQ accordion, next-step CTA,
   "also read" strip. Requires tokens.css + base.css.
   ========================================================================== */

/* 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__title { font-size: var(--fs-h1); }
.page-head__intro { max-width: 70ch; color: var(--c-text-muted); }
.page-head__text .btn-row { 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; }

/* Year jump: 20 chips that wrap (5 per row on phones, 10 from 640px). No horizontal scroll. */
.year-jump { display: grid; gap: var(--s-1); min-width: 0; }
.year-jump__label {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.year-jump__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-1);
}
.year-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 4px;
  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), border-color var(--ease);
}
.year-chip:hover { background: var(--c-slate); color: var(--c-white); }
.year-chip--latest { color: var(--c-red-text); border-color: var(--c-red-text); font-weight: 700; }
.year-chip--latest:hover { background: var(--c-red-text); border-color: var(--c-red-text); color: var(--c-white); }

@media (min-width: 640px) {
  .year-jump__list { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .page-head { padding-block: var(--s-4) var(--s-5); }
  .page-head__inner { gap: var(--s-4); }
}

/* Year cards ------------------------------------------------------------- */
.paper-card { scroll-margin-top: var(--s-3); }
/* "Latest" tag flows inline after the highlighted title, so the title never gets squeezed */
.paper-card__tag { vertical-align: middle; margin-left: 0.25em; }
.paper-list { display: grid; gap: var(--s-1); }

/* Paper row: the whole row is the link (PDF download, or the post for years without a PDF) */
.paper-link {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--tap-min);
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-slate);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.paper-link:hover { background: var(--c-slate); color: var(--c-white); }
.paper-link__name { flex: 1 1 auto; min-width: 0; }
.paper-link__meta { flex: 0 0 auto; font-size: var(--fs-sm); color: var(--c-text-muted); white-space: nowrap; }
.paper-link__icon { flex: 0 0 auto; width: 18px; height: 18px; color: var(--c-red-text); }
.paper-link:hover .paper-link__meta,
.paper-link:hover .paper-link__icon { color: inherit; }
.paper-link--post { background: var(--c-surface); border-color: var(--c-line); }
.paper-link--post .paper-link__icon { color: var(--c-text-muted); }
.paper-link--post:hover { background: var(--c-white); border-color: var(--c-slate); color: var(--c-text); }
.paper-link--post:hover .paper-link__icon { color: var(--c-red-text); }
.paper-link--post:hover .paper-link__meta { color: var(--c-text-muted); }

/* "More on these papers" spoke links under the tiles --------------------- */
.spokes {
  display: grid;
  gap: var(--s-1);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line);
}
.spokes__label { font-family: var(--ff-display); font-size: var(--fs-sm); letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-muted); }
.spokes__list { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.spokes__list .link-more { color: var(--c-link-text); }
.spokes__list .link-more:hover { color: var(--c-slate); }

/* How to use: numbered steps ---------------------------------------------- */
.steps { display: grid; gap: var(--s-2); }
.step {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  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__text { flex: 1 1 auto; min-width: 0; display: grid; gap: var(--s-1); }
.step__title { font-size: var(--fs-h3); }
.step__text p { color: var(--c-text-muted); }
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
}

/* 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: var(--tap-min);
  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); }

/* Next step --------------------------------------------------------------- */
.next-grid { max-width: 760px; margin-inline: auto; }
.next-actions { justify-content: center; margin-top: var(--s-4); }

/* Also read: bordered link rows, 1 → 2 → 3 columns ------------------------ */
.also__list { display: grid; gap: var(--s-1); }
.also__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1);
  min-height: var(--tap-min);
  padding: 0.5rem var(--s-2);
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--c-slate);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}
.also__link::after { content: "\2192"; color: var(--c-red-text); transition: transform var(--ease); }
.also__link:hover { border-color: var(--c-slate); color: var(--c-charcoal); }
.also__link:hover::after { transform: translateX(3px); }
@media (min-width: 640px) {
  .also__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
}
@media (min-width: 960px) {
  .also__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
