/* Collection pages only (site.mjs COLLECTIONS). Built, together with the
   collection blocks' block.css, into public/_assets/css/pseo-collections.<hash>.css,
   which loads after the core stylesheet. Rules here may refine shared
   blocks for collection pages without touching the /learn pages. */

/* Three-column fact tables (item / value / source) fit a phone screen, so
   let them wrap instead of scrolling: the Source column stays visible.
   Wider tables keep the shared sideways scroll. */
.data-table:not(:has(thead th:nth-child(4))) { min-width: 0; }
@media (max-width: 40em) {
  .data-table:not(:has(thead th:nth-child(4))) th,
  .data-table:not(:has(thead th:nth-child(4))) td { padding-inline: 0.75rem; }
  .data-table:not(:has(thead th:nth-child(4))) td { overflow-wrap: break-word; }
}

/* blocks/prose/block.css */
.prose-body { max-width: 46rem; margin-top: var(--space-4); color: var(--muted); font-size: var(--fs-lg); }
.prose-body > * + * { margin-top: var(--space-2); }
.prose-body ul { padding-left: 1.25rem; }
.prose-body li + li { margin-top: 0.5rem; }
.prose-body li::marker { color: var(--accent); }
.prose-sub { margin-top: var(--space-4); }
.prose-sub > * + * { margin-top: var(--space-2); }
.prose-sub h3 { color: var(--text); font-size: var(--fs-h3); letter-spacing: -0.01em; }
.block-prose .source-note { max-width: 46rem; margin-top: var(--space-3); }
.prose-links { display: grid; gap: 0.5rem; margin-top: var(--space-3); font-size: var(--fs-base); }
.prose-links a { color: var(--text); font-weight: 700; }
.prose-links span { color: var(--muted); font-size: var(--fs-sm); }

/* blocks/notice/block.css */
.notice-grid { display: grid; gap: 0.75rem; margin-top: var(--space-4); }
.notice-card {
  display: grid;
  align-content: start;
  gap: 0.625rem;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--tone, var(--border-strong));
  border-radius: calc(var(--radius) * 0.6);
  color: var(--muted);
}
.notice-card h3 { color: var(--text); font-size: var(--fs-h3); letter-spacing: -0.01em; }
.tone-official { --tone: #6fcf97; }
.tone-recall { --tone: var(--accent); }
.tone-reported { --tone: #8ab4f8; }
.tone-caution { --tone: #f2994a; }
/* Shared by notice, sources and year-nav: a small uppercase pill in the tone colour. */
.tone-badge {
  width: fit-content;
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--tone, var(--border-strong));
  border-radius: var(--radius-pill);
  color: var(--tone, var(--muted));
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 48em) { .notice-grid { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); } }

/* blocks/sources/block.css */
.source-list { display: grid; gap: 0.75rem; max-width: 52rem; margin-top: var(--space-4); }
.source-item {
  display: grid;
  gap: 0.375rem;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tone, var(--border-strong));
  border-radius: calc(var(--radius) * 0.5);
}
.source-title { font-weight: 700; overflow-wrap: anywhere; }
.source-title a { text-decoration-color: var(--border-strong); }
.source-meta { color: var(--muted); font-size: var(--fs-sm); }

/* blocks/download/block.css */
.download-grid { display: grid; gap: 0.75rem; margin-top: var(--space-4); }
.download-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.625rem;
  padding: var(--space-3);
  background:
    radial-gradient(120% 120% at 0% 0%, rgb(212 177 68 / 0.12), transparent 55%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.download-card.is-unavailable { background: var(--surface); border-color: var(--border); border-style: dashed; }
.download-card h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
.dl-format { color: var(--accent); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.dl-detail { color: var(--muted); }
.dl-action { display: grid; gap: 0.625rem; margin-top: var(--space-1); }
.btn-download {
  gap: 0.5rem;
  width: 100%;
  border: 0;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-ink);
}
/* Designed, but switched off: dimmed, not-allowed cursor, no hover change. */
.btn-download:disabled { opacity: 0.55; cursor: not-allowed; }
.dl-status { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: var(--fs-sm); }
.dl-dot { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.dl-status-unavailable .dl-dot { background: transparent; border: 2px solid var(--border-strong); }
@media (min-width: 40em) { .download-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .download-grid { grid-template-columns: repeat(3, 1fr); } }

/* blocks/year-nav/block.css */
.year-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: var(--space-4); }
.year-card {
  display: grid;
  gap: 0.125rem;
  height: 100%;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.6);
  text-decoration: none;
}
a.year-card:hover { border-color: var(--accent); color: inherit; }
.year-card.is-current { border-color: var(--accent); background: rgb(212 177 68 / 0.1); }
.year-card.is-pending { border-style: dashed; color: var(--muted); }
.year-label { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.year-exam { font-size: var(--fs-sm); font-weight: 500; }
.year-status { margin-top: 0.375rem; color: var(--muted); font-size: var(--fs-xs); }
a.year-card .year-status { color: var(--accent); }
.year-back { margin-top: var(--space-3); font-weight: 700; }
.year-back a { text-decoration: none; }
@media (min-width: 40em) { .year-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 60em) { .year-grid { grid-template-columns: repeat(4, 1fr); } }
.year-pager { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); font-weight: 700; }
.year-pager a { text-decoration: none; }
