/* sources.html: layout of the components on this page only. Colours, type and spacing come from site.css tokens; nothing here is a new component. */

/* ============================================================ shared guide rules (gd-) */
/* ---- hero: the answer on the left, a drawn figure on the right ---- */
.gd-hero .sb-hero__copy { display: grid; gap: var(--sp-6) var(--col-gap); }
.gd-hero__head, .gd-hero__answer { min-width: 0; }
.gd-hero .sb-answer { margin-top: 0; }
.gd-fig { margin: 0; min-width: 0; }
@media (min-width: 64em) {
  .gd-hero .sb-hero__copy { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; row-gap: var(--sp-5); padding-bottom: var(--sp-8); }
  .gd-hero__head { grid-column: 1 / -1; grid-row: 1; }
  .gd-hero__answer { grid-column: 1 / span 7; grid-row: 2; }
  .gd-fig { grid-column: 8 / span 5; grid-row: 2; align-self: stretch; }
}
.gd-glyph { flex: none; }

/* ---- the opening paragraphs, with the guide's own sections beside them ---- */
.gd-intro { padding-block: var(--sp-8); }
.gd-intro .sb-split__a > .sb-eyebrow { margin: 0 0 var(--sp-3); font-size: var(--fs-caption); line-height: 1.4; color: var(--text-soft); }
.gd-tools { max-width: 28rem; }
.gd-lead { font-size: var(--fs-lede); line-height: 1.45; color: var(--navy); max-width: 36rem; }
.gd-intro .sb-split__b > p + p { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--rule); }

/* ---- full-width sections (tables and sheets need the room) ---- */
.gd-full .sb-head { margin-bottom: var(--sp-6); }
.gd-full .sb-head p { font-size: 1.25rem; line-height: 1.5; }
@media (min-width: 64em) { .gd-full .sb-head { align-items: start; } }
.gd-full > .wrap > * + * { margin-top: var(--sp-5); }
.gd-full > .wrap > .sb-head { margin-top: 0; }
.gd-full > .wrap > p { max-width: var(--measure); }
.gd-full > .wrap > .sb-source { margin-top: var(--sp-3); }
.gd-full > .wrap > .sb-source + p { margin-top: var(--sp-6); }
.gd-full > .wrap > .sb-source + .sb-source { margin-top: var(--sp-3); }
.gd-full h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--trk-h3); }
/* split sections: question headings are long, so they run a size smaller than a pillar's */
.gd-split .sb-split__a h2 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.5rem); }
.gd-split .sb-split__a > p { font-size: 1.1875rem; line-height: 1.5; max-width: 34rem; }
.gd-split .sb-split__b > p + .sb-source { margin-top: var(--sp-3); }
.gd-split .sb-split__b > .sb-source + p { margin-top: var(--sp-5); }

/* ---- the market band: the market name is the link ---- */
.gd-markets .sb-market h3 a { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; color: var(--text-on-dark); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--rule-on-dark); text-underline-offset: .22em; }
.gd-markets .sb-market h3 a:visited { color: var(--text-on-dark); }
.gd-markets .sb-market h3 a:hover { text-decoration-color: var(--text-on-dark); text-decoration-thickness: 2px; }
.gd-markets .sb-market h3 a svg { flex: none; width: 22px; height: 22px; color: var(--gold); transition: transform var(--t-micro) var(--ease); }
.gd-markets .sb-market h3 a:hover svg, .gd-markets .sb-market h3 a:focus-visible svg { transform: translateX(4px); }
.gd-markets .sb-market h3 { margin-bottom: var(--sp-3); }
.gd-markets .sb-head p { font-size: 1.25rem; line-height: 1.5; }
@media (min-width: 64em) { .gd-markets .sb-head { align-items: start; } }
.sb-links--foot { margin-top: 0; padding-top: 0; border-top: 0; }
.gd-markets .sb-ledger__foot { margin-top: var(--sp-6); display: grid; gap: var(--sp-4) var(--sp-6); }
@media (min-width: 64em) { .gd-markets .gd-foot--src { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } .gd-markets .sb-ledger__foot:not(.gd-foot--src) { grid-template-columns: none; } .gd-markets .gd-foot--src .sb-links { justify-content: flex-end; } }

/* ---- closing, note, sources ---- */
.sb-closing h2 + .gd-close-lede { margin: calc(-1 * var(--sp-3)) 0 var(--sp-5); max-width: 30rem; color: var(--text-soft); }
.gd-notewrap { padding-top: var(--sp-7); }
.gd-sources { padding-top: var(--sp-7); }
.gd-sources__lede { margin-top: var(--sp-3); color: var(--text-soft); max-width: 40rem; }
.gd-sources li { padding-block: 14px; line-height: 1.6; }
.gd-sources li::before { top: 14px; }
/* the linked document title of each source is a chip: bordered, underlined. It flows with the sentence (inline, the border repeats on each line it wraps to), so the full stop after it never lands alone on a line and the link is an in-sentence link. */
.gd-sources a.gd-chip { display: inline; min-height: 0; margin: 0; padding: 1px 6px; line-height: inherit; font-size: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (min-width: 64em) {
  .gd-sources ol { max-width: none; column-count: 2; column-gap: var(--sp-8); }
  .gd-sources li { break-inside: avoid; }
}

/* ---- rules this page carries itself so it does not depend on other pages ---- */
/* breadcrumb: the slash follows each earlier item, so a trail that wraps never starts a line with one */
.sb-breadcrumb li + li::before { content: none; }
.sb-breadcrumb li:not(:last-child)::after { content: "/"; color: var(--text-soft); }
/* the last word of a text link and its arrow never part (see nbArrows in tools/w2b2-lib.mjs) */
/* nowrap only while the text is at its normal size on a phone (375 px is 23 em); at 150 or 200 percent a word and its arrow may wrap, so nothing is wider than the screen */
@media (min-width: 23em) { .gx-nb { white-space: nowrap; } }
/* a short hyphenated compound in a heading or table head ("made-up") never breaks at its hyphen */
.gx-hy { white-space: nowrap; }
/* headings: only a very long word is hyphenated, so no short word is cut in two and none can overflow at 200% text size */
h1, h2, h3, h4 { hyphens: auto; hyphenate-limit-chars: 12 5 5; overflow-wrap: anywhere; }
/* a link inside a sentence or a table cell flows with the text (the system draws it as an inline block, which leaves holes in a wrapped line) */
p:not(.sb-p-links) > a.sb-link, li > a.sb-link, td > a.sb-link:not(.sb-cell-link), dd > a.sb-link { display: inline; padding-block: 0; }
sup { font-size: max(.875rem, .7em); }   /* a superscript is still 14 px or more */
.gd-split .sb-split__b, .sb-split__a { min-width: 0; }
/* jump bar: a focused item scrolls clear of the edge; below 64em the sections are a wrapped row of chips in the page, nothing pinned, nothing half hidden */
.sb-jump ul { scroll-padding-inline: 32px; }
@media (max-width: 63.99em) {
  .sb-jump { position: static; }
  .sb-jump ul { flex-wrap: wrap; overflow: visible; gap: 8px; padding: 12px 0 14px; }
  .sb-jump a { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); background: var(--surface); white-space: normal; }
  .sb-jump li:first-child a { padding-left: 14px; }
  .sb-jump a:focus-visible { outline-offset: 2px; }
}
@media (min-width: 48em) and (max-width: 63.99em) and (min-height: 30em) { html:has(.sb-jump) { --sticky-top: var(--h-header); } }
@media (max-width: 47.99em) { html:has(.sb-jump) { --sticky-top: 0px; } }

/* ============================================================ the ledger sheet: a table on paper with a navy head (shared by the guides' data tables) */
.gd-sheet { background: var(--paper); border: 1px solid var(--navy); min-width: 0; }
.gd-scroll { overflow-x: auto; }
.gd-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.gd-sheet .sb-table { margin-top: 0; font-size: var(--fs-ui); }
.gd-sheet .sb-table caption { padding: 16px 20px; border-bottom: 1px solid var(--rule); max-width: none; color: var(--text-soft); }
.gd-sheet .sb-table thead th { vertical-align: middle; padding: 14px 20px 10px; }
.gd-sheet .sb-table tbody th, .gd-sheet .sb-table tbody td { padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.gd-sheet .sb-table tbody tr:last-child > * { border-bottom: 0; }
.gd-sheet .sb-table td:last-child, .gd-sheet .sb-table th:last-child { padding-right: 20px; }
@media (max-width: 47.99em) {
  .gd-sheet .sb-table caption { padding: 14px 16px; }
  .gd-sheet .sb-table--stack tbody tr { padding: 16px; border-bottom: 1px solid var(--rule); }
  .gd-sheet .sb-table--stack tbody tr:last-child { border-bottom: 0; }
  .gd-sheet .sb-table--stack tbody th, .gd-sheet .sb-table--stack tbody td { padding: 3px 0; border-bottom: 0; }
  .gd-sheet .sb-table--stack tbody td:last-child { padding-right: 0; }
}
/* a table of four or more columns stacks up to 64em, because four narrow columns break words at tablet width (the same rules as the site's phone stack) */
@media (min-width: 48em) and (max-width: 63.99em) {
  .gd-wide.sb-table--stack thead { display: none; }
  .gd-wide.sb-table--stack, .gd-wide.sb-table--stack tbody, .gd-wide.sb-table--stack tr, .gd-wide.sb-table--stack th, .gd-wide.sb-table--stack td { display: block; width: 100%; }
  .gd-wide.sb-table--stack tbody tr { padding: 18px 20px; border-bottom: 1px solid var(--rule); }
  .gd-wide.sb-table--stack tbody tr:last-child { border-bottom: 0; }
  .gd-sheet .gd-wide.sb-table--stack tbody th, .gd-sheet .gd-wide.sb-table--stack tbody td { padding: 3px 0; border: 0; }
  .gd-wide.sb-table--stack tbody th { font-size: 1.0625rem; padding-bottom: 6px; }
  .gd-wide.sb-table--stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-caption); font-weight: 600; color: var(--text-soft); }
  .gd-sheet .gd-wide.sb-table--stack tbody td:last-child { padding-right: 0; }
  .gd-wide.sb-table--stack caption { display: block; }
}

/* a guide row's one-line description never runs past 32 rem, so a single-column list at tablet width stays inside the 85-character line */
.gd-related .sb-guide__d { max-width: 32rem; }
/* tablet: a single-column list of guides stops at 36 em so a row never runs wider than the reading measure */
@media (min-width: 48em) and (max-width: 63.99em) { .gd-related .sb-guide-list, .so-m__list { max-width: 36em; } }
/* a link that is the whole text of a table cell, or the document in a ledger row: a 44 px hit area drawn from the row's own padding (the site rule, with a floor so one line reaches 44) */
.sb-table a.sb-cell-link { box-sizing: border-box; min-height: 44px; }

/* the answer box matches the height of the figure beside it; its source line sits at the foot of the box, under a rule, so the extra height reads as a footer and not as a gap */
@media (min-width: 64em) {
  .gd-hero__answer { display: flex; flex-direction: column; }
  .gd-hero__answer > .sb-source { margin-top: auto; }
}


/* ============================================================ this page */
/* ---- hero: the answer, and the documents by market as a count module ---- */
.so-counts { background: var(--paper); border: 1px solid var(--navy); padding: var(--sp-5); display: flex; flex-direction: column; margin: 0; }
.so-counts__total { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-bottom: var(--sp-5); border-bottom: 2px solid var(--navy); }   /* the figure's text box (72 px type) must end above the rule, or a contrast sampler reads the rule under the digits */
.so-counts__total b { font-size: var(--fs-stat); line-height: 1; font-weight: 600; letter-spacing: -.04em; color: var(--brand); }
.so-counts__total span { font-size: var(--fs-ui); font-weight: 600; color: var(--navy); }
.so-counts__list { list-style: none; margin: 0; padding: 0; }
.so-counts__list li { border-bottom: 1px solid var(--rule); }
.so-counts__list li:last-child { border-bottom: 0; }
.so-counts__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l n" "bar bar"; align-items: center; column-gap: 12px; min-height: 44px; padding: 12px 0 12px; color: var(--navy); text-decoration: none; }
.so-counts__list a:visited { color: var(--navy); }
.so-c__l { grid-area: l; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--line-strong); }
.so-counts__list a:hover .so-c__l, .so-counts__list a:focus-visible .so-c__l { text-decoration-color: var(--navy); text-decoration-thickness: 2px; }
.so-c__n { grid-area: n; font-size: 1.5rem; line-height: 1; font-weight: 600; letter-spacing: -.02em; color: var(--brand); }
.so-c__bar { grid-area: bar; display: block; height: 10px; margin-top: 8px; background: var(--surface-2); }
.so-c__bar i { display: block; height: 100%; width: var(--v); background: var(--navy); }
@media (min-width: 64em) { .so-hero .gd-fig { justify-content: center; } }

/* ---- jump bar: the markets, with the copy's own label from 48em; chips in the page below 64em (the base rules) ---- */
.so-jump__label { display: none; margin: 0; font-size: var(--fs-caption); font-weight: 600; color: var(--text-soft); white-space: nowrap; }
@media (min-width: 48em) { .so-jump__in { display: flex; align-items: center; gap: var(--sp-5); } .so-jump__label { display: block; } }

/* ---- opening paragraphs ---- */
.so-intro { padding-block: var(--sp-8); }
.so-intro .gd-lead { max-width: 46rem; }
.so-intro__b { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--rule); max-width: var(--measure); }

/* ---- how do you read a row ---- */
.so-read .sb-split__b > * + * { margin-top: var(--sp-5); }
.so-specimen { background: var(--paper); border: 1px solid var(--navy); padding: var(--sp-5); }
.so-specimen__lab { margin: 0 0 var(--sp-4); font-size: var(--fs-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.so-specimen__row { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--navy); }
.so-specimen__row li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: var(--fs-ui); line-height: 1.4; }
.so-specimen__row li b { grid-column: 2; font-size: var(--fs-caption); font-weight: 600; color: var(--text-soft); }
.so-specimen__row li > span:last-child { grid-column: 2; color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.so-specimen__n { grid-row: 1 / span 2; display: grid; place-items: center; width: 26px; height: 26px; background: var(--navy); color: var(--paper); font-size: var(--fs-caption); font-weight: 600; line-height: 1; }
.so-specimen__row li > .so-specimen__n + b { grid-row: 1; }
@media (min-width: 64em) {
  .so-specimen { padding: var(--sp-6); }
  .so-specimen__row { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--sp-5); border-top: 0; }
  .so-specimen__row li { display: block; padding: var(--sp-3) 0 0; border-top: 2px solid var(--navy); border-bottom: 0; }
  .so-specimen__n { margin-bottom: 8px; }
  .so-specimen__row li b { display: block; }
}

/* ---- the market sections: a list of topics, then one ruled table per topic ---- */
.so-sec .sb-head { margin-bottom: var(--sp-5); }
.so-sec .sb-head p { font-size: 1.25rem; line-height: 1.5; }
@media (min-width: 64em) { .so-sec .sb-head { align-items: start; } }
.so-topics__l { margin: 0 0 var(--sp-3); }
.so-topics { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.so-topics li { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); border-bottom: 1px solid var(--rule); }
.so-topics a { display: flex; align-items: center; min-height: 48px; padding-block: 6px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.so-topics__n { flex: none; font-size: var(--fs-ui); font-weight: 600; color: var(--brand); }
@media (min-width: 64em) {
  .so-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-8); }
}
.so-block { margin-top: var(--sp-8); }
.so-block__h { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.so-block__h h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--trk-h3); }
.so-block__h p { max-width: 32em; color: var(--text-soft); }   /* 32 em keeps a lead under 75 characters a line at tablet width */
@media (min-width: 64em) {
  .so-block__h { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
  .so-block__h h3 { grid-column: 1 / span 5; }
  .so-block__h p { grid-column: 7 / span 6; }
}
.sb-table--sources { font-size: var(--fs-ui); line-height: 1.45; }
.sb-table--sources caption { max-width: 62rem; padding-bottom: 10px; }
.sb-table--sources thead th { padding-top: 10px; border-top: 2px solid var(--navy); }
.sb-table--sources tbody th { padding-right: 28px; font-weight: 600; }
.sb-table--sources tbody th a { font-weight: 600; }
/* the 44 px hit area of a document link borrows 10 px from the row; it sits above its neighbours so its focus ring is never covered */
.sb-table--sources a.sb-cell-link { position: relative; z-index: 1; }
.sb-table--sources td { padding-right: 20px; }
.sb-table--sources td:last-child { padding-right: 0; }
.sb-table--sources tbody tr > * { padding-block: 16px; }
.sb-doc-detail { display: block; margin-top: 4px; font-size: var(--fs-ui); font-weight: 400; line-height: 1.4; color: var(--text-soft); }
.sb-table--sources time { white-space: nowrap; }
@media (max-width: 63.99em) { .sb-table--sources time { white-space: normal; } }
@media (min-width: 64em) {
  .sb-table--sources thead th:nth-child(1) { width: 44%; }
  .sb-table--sources thead th:nth-child(2) { width: 24%; }
  .sb-table--sources thead th:nth-child(3) { width: 20%; }
  .sb-table--sources thead th:nth-child(4) { width: 12%; }
}
/* four columns stack up to 64em (the site stacks a table below 48em; four narrow columns break words at tablet width). The stacked row is a small grid. */
@media (max-width: 63.99em) {
  .sb-table--sources.sb-table--stack thead { display: none; }
  .sb-table--sources.sb-table--stack, .sb-table--sources.sb-table--stack tbody, .sb-table--sources.sb-table--stack th, .sb-table--sources.sb-table--stack td { display: block; width: 100%; }
  .sb-table--sources.sb-table--stack tbody tr { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; column-gap: 14px; row-gap: 8px; align-items: start; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .sb-table--sources.sb-table--stack tbody tr:last-child { border-bottom-color: var(--navy); }
  .sb-table--sources.sb-table--stack tbody th, .sb-table--sources.sb-table--stack tbody td { padding: 0; border: 0; width: auto; }
  .sb-table--sources.sb-table--stack tbody th { grid-column: 1 / -1; font-size: 1.0625rem; }
  .sb-table--sources.sb-table--stack td[data-label="Publisher"] { grid-column: 1; }
  .sb-table--sources.sb-table--stack td[data-label="Source date"] { grid-column: 2; }
  .sb-table--sources.sb-table--stack td[data-label="Checked"] { grid-column: 3; }
  .sb-table--sources.sb-table--stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-caption); font-weight: 600; color: var(--text-soft); }
  .sb-table--sources.sb-table--stack caption { display: block; }
}
/* tablet (48em to 64em): the document title takes the full row and its three facts sit in one row under it, as on the phone's wider rows. */
@media (min-width: 48em) and (max-width: 63.99em) {
  .sb-table--sources.sb-table--stack tbody tr { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; row-gap: 10px; }
}
@media (max-width: 47.99em) {
  .sb-table--sources.sb-table--stack tbody tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 6px; }
  .sb-table--sources.sb-table--stack td[data-label="Publisher"] { grid-column: 1; grid-row: 2 / span 2; }
  .sb-table--sources.sb-table--stack td[data-label="Source date"] { grid-column: 2; grid-row: 2; }
  .sb-table--sources.sb-table--stack td[data-label="Checked"] { grid-column: 2; grid-row: 3; }
}

/* ---- which guide shows how each market uses these documents ---- */
.so-m { display: flex; align-items: flex-start; gap: var(--sp-4); }   /* the market names line up across the two columns, whatever the length of the line beneath */
.so-m .sb-guide { flex: 1 1 auto; min-width: 0; }
.so-m .sb-guide__d { max-width: 30rem; }
.so-m__s { margin-top: 4px; }
.so-m__s { flex: none; width: 56px; }
.so-state { width: 56px; height: 56px; }
.so-state path.o { fill: var(--paper); stroke: var(--navy); stroke-width: 1.6; stroke-linejoin: round; }
.so-state circle { fill: var(--gold); stroke: var(--navy); stroke-width: 1.5; }
.so-markets .sb-head p { font-size: 1.25rem; line-height: 1.5; }
@media (min-width: 64em) { .so-markets .sb-head { align-items: start; } }

/* ---- changes ---- */
.so-changes .sb-split__a > p { font-size: 1.1875rem; line-height: 1.5; color: var(--text-soft); margin-top: var(--sp-4); }
.so-changes .sb-split__a h2 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.5rem); }
.so-changes .sb-split__b > p { max-width: var(--measure); }
