/* A special report's page (news/report.mjs), on the site's variables in styles.css and
   the News Room's mockup (D:\WWCWA\plan\layout-mockup.html, Aaron's rulings of
   2026-11-03): a section list down the left at every width, narrower on a phone; the
   back-to-top button at the bottom left, beside it. */

.report { width: min(1240px, 100%); margin-inline: auto; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 2.4rem; align-items: start; padding-right: 1.25rem; }
.report-page .news { padding-top: 0; }

/* The section list: under the site's sticky bar (66px and its 1px rule), the full
   height of the window, scrolling on its own if it is taller. */
.report__nav { position: sticky; top: 67px; max-height: calc(100vh - 67px); overflow-y: auto; padding: 1.4rem .75rem 1.4rem 1rem; border-right: 1px solid var(--line); }
.report__nav-title { margin: 0 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.report__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.report__nav a { display: flex; gap: .4rem; padding: .5rem .65rem; color: var(--navy); background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; text-decoration: none; font-size: .86rem; font-weight: 600; line-height: 1.25; box-shadow: 0 1px 2px rgba(22, 20, 60, .06); }
.report__nav a:hover, .report__nav a:focus-visible, .report__nav a[aria-current="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); border-left-color: var(--gold); }
.report__num { flex: 0 0 auto; min-width: 1em; color: var(--gold-2); font-weight: 800; }
.report__nav a:hover .report__num, .report__nav a:focus-visible .report__num, .report__nav a[aria-current="true"] .report__num { color: var(--gold); }

.report__main { min-width: 0; padding: clamp(1.5rem, 4vw, 2.6rem) 0 3rem; }
.report__main > * { max-width: 920px; }
.report__main p { max-width: 70ch; }
.report__head, .report__section, .report__map, .report__intro, .report__before { scroll-margin-top: 84px; }

.report__kicker { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.report__title { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.1; margin: 0 0 .7rem; text-wrap: balance; }
.report__dek { font-size: 1.15rem; color: var(--muted); margin: 0 0 .8rem; }
.report__byline { margin-bottom: 1.4rem; }
.report__head .news__figure { margin: 0 0 1.8rem; }

/* The opening's boxes: "Before you read", then "In this report". */
.report__before { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.4rem; margin: 0 0 2rem; }
.report__before h2, .report__map h2, .report__intro h2, .report__sources h3 { position: relative; padding-top: .6rem; margin: 0 0 .6rem; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.report__before h2::before, .report__intro h2::before { content: ""; position: absolute; left: 0; top: 0; width: 3.2rem; height: 4px; background: var(--gold); }
.report__before p:last-child { margin-bottom: 0; }
.report__intro { margin: 0 0 2rem; }
.report__map { border-top: 3px solid var(--navy); padding-top: 1rem; margin: 0 0 2.8rem; }
.report__map-item { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.report__map-item p { flex: 1 1 22rem; min-width: 0; margin: 0; }

/* Buttons: the side list's white, gold-edged look; "Go to section" in navy. */
.report__btn { display: inline-block; padding: .45rem .8rem; color: var(--navy); background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; text-decoration: none; font-size: .86rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.report__btn:hover, .report__btn:focus-visible { background: var(--navy); color: var(--white); border-color: var(--navy); border-left-color: var(--gold); }
.report__btn--go { background: var(--navy); color: var(--white); border-color: var(--navy); border-left-color: var(--gold); }
.report__btn--go:hover, .report__btn--go:focus-visible { background: var(--navy-2); }
.report__steps { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin: 1.4rem 0 0; max-width: none !important; }

/* Sections, under the site's gold rule. */
.report__section { margin: 0 0 3.4rem; }
.report__section-title { position: relative; padding-top: .7rem; margin: 0 0 1rem; font-size: clamp(1.4rem, 2.6vw, 1.75rem); text-wrap: balance; }
.report__section-title::before { content: ""; position: absolute; left: 0; top: 0; width: 3.2rem; height: 4px; background: var(--gold); }
.report__section-title .report__num { margin-right: .5rem; color: var(--indigo); }
.report__why { background: var(--lake-2); border-left: 4px solid var(--indigo); border-radius: 0 8px 8px 0; padding: .7rem 1rem; margin: 1rem 0; max-width: 70ch; }
.report__why p { margin: 0; }
.report__why strong:first-child { display: block; margin-bottom: .2rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.report__note { font-size: .9rem; color: var(--muted); font-style: italic; }

/* Tables: part of the article. Figures right-aligned and never broken. */
.report__table { margin: 1.4rem 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.report__table-title { margin: 0 0 .6rem; font-family: var(--font-head); font-weight: 700; color: var(--navy); line-height: 1.3; }
.report__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.report table { border-collapse: collapse; width: 100%; font-size: .88rem; line-height: 1.45; }
.report th, .report td { border: 1px solid var(--line); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.report th { background: var(--paper); font-family: var(--font-head); font-weight: 700; color: var(--navy); }
/* Figures never break; a figure column's heading, often a sentence, wraps like any other. */
.report td.n, .report th.n { text-align: right; font-variant-numeric: tabular-nums; }
.report td.n { white-space: nowrap; }
.report td strong { color: var(--navy); }
.report__table-note { margin: .6rem 0 0; font-size: .8rem; color: var(--muted); font-style: italic; line-height: 1.5; max-width: none !important; }
.report td a { word-break: break-word; }
.report__dl { white-space: nowrap; font-weight: 600; }
.report__sources { border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: .9rem; }
.report__sources table { font-size: .82rem; }
.report tr[id] { scroll-margin-top: 84px; }
.report tr:target td { background: #FFF8DC; }

/* All documents: closed until the reader opens it. */
.report__all { margin: 1rem 0 0; }
.report__all > summary { display: inline-block; cursor: pointer; padding: .45rem .8rem; color: var(--navy); background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; font-size: .86rem; font-weight: 600; }
.report__all > summary::-webkit-details-marker { display: none; }
.report__all > summary::before { content: "▸ "; color: var(--gold-2); }
.report__all[open] > summary::before { content: "▾ "; }
.report__all[open] > summary { margin-bottom: 1rem; }
.report__main .news__more-section, .report__main .news__share { max-width: 920px; }

/* Back to top: the news pages' button, at the bottom left, in the section list's own
   column so it never covers the article. */
.report-page .news__to-top { right: auto; left: calc((200px - 46px) / 2); }
.report__bar { display: none; }

/* Tables as figures (report.js): one shrunk to fit shows whole, like a picture, and a
   tap opens it full screen. */
.report__zoom { display: inline-flex; align-items: center; gap: .35rem; margin: .6rem 0 0; padding: .3rem .65rem; font: 600 .78rem var(--font-body); color: var(--navy); background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; cursor: pointer; }
.report__zoom::before { content: "⤢"; color: var(--gold-2); font-weight: 800; }
.report__zoom:hover, .report__zoom:focus-visible { background: var(--navy); color: var(--white); border-color: var(--navy); border-left-color: var(--gold); }
.report__zoom[hidden] { display: none; }
.report__table.is-fit .report__scroll { overflow: hidden; cursor: zoom-in; }
.report__table.is-fit table { transform-origin: 0 0; }
.report__table.is-fit .report__zoom { font-size: .82rem; }

.report__viewer { width: min(1180px, 100vw - 2rem); max-width: none; height: min(92vh, 100%); max-height: none; padding: 0; border: 0; border-radius: var(--radius); background: var(--white); color: var(--ink); box-shadow: 0 20px 60px rgba(22, 20, 60, .35); }
.report__viewer[open] { display: flex; flex-direction: column; }
.report__viewer::backdrop { background: rgba(22, 20, 60, .72); }
.report__viewer-bar { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.report__viewer-title { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: .95rem; line-height: 1.3; }
.report__viewer-tools { display: flex; gap: .3rem; flex: 0 0 auto; }
.report__viewer-tools button { min-width: 2.4rem; height: 2.4rem; padding: 0 .55rem; font: 700 1rem var(--font-body); color: var(--navy); background: var(--white); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.report__viewer-tools button:hover, .report__viewer-tools button:focus-visible { background: var(--navy); color: var(--white); border-color: var(--navy); }
.report__viewer-tools .report__viewer-close { background: var(--navy); color: var(--gold); border-color: var(--navy); font-size: 1.3rem; }
.report__viewer-body { flex: 1 1 auto; overflow: auto; padding: .8rem; -webkit-overflow-scrolling: touch; }
.report__viewer-size { position: relative; }
.report__viewer-size table { transform-origin: 0 0; position: absolute; top: 0; left: 0; }
.report__viewer-note { margin: 0; padding: .55rem .8rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); font-style: italic; max-height: 22vh; overflow: auto; }
.report__viewer table { border-collapse: collapse; font-size: .88rem; line-height: 1.45; }
.report__viewer th, .report__viewer td { border: 1px solid var(--line); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.report__viewer th { background: var(--paper); font-family: var(--font-head); font-weight: 700; color: var(--navy); }
.report__viewer td.n, .report__viewer th.n { text-align: right; font-variant-numeric: tabular-nums; }
.report__viewer td.n { white-space: nowrap; }

/* A phone (Aaron, 2026-11-03): the section list folds into a drawer under a bar at the
   top, the article takes the full width, and the way back to the top is on the bar. */
@media (max-width: 768px) {
  .report { display: block; padding: 0 1rem; }
  .report__nav { position: sticky; top: 67px; z-index: 40; max-height: none; overflow: visible; margin: 0 -1rem; padding: 0; border-right: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(22, 20, 60, .06); }
  .report:not([data-js]) .report__nav { position: static; padding: .8rem 1rem; }
  .report[data-js] .report__bar { display: flex; align-items: stretch; }
  .report[data-js] .report__nav-title { display: none; }
  .report[data-js] .report__nav ul { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: min(70vh, 34rem); overflow-y: auto; padding: .8rem 1rem 1rem; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(22, 20, 60, .18); }
  .report[data-js] .report__nav.is-open ul { display: grid; }
  .report__toggle { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border: 0; background: none; font: 700 .8rem var(--font-body); color: var(--navy); text-align: left; cursor: pointer; }
  .report__toggle-label { flex: 0 0 auto; letter-spacing: .06em; text-transform: uppercase; color: var(--indigo); font-size: .7rem; }
  .report__toggle-label::after { content: " ▾"; color: var(--gold-2); }
  .report__nav.is-open .report__toggle-label::after { content: " ▴"; }
  .report__toggle-now { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .report__top { flex: 0 0 auto; width: 48px; display: grid; place-items: center; border: 0; border-left: 1px solid var(--line); background: var(--navy); color: var(--gold); cursor: pointer; }
  .report__top svg { width: 22px; height: 22px; }
  .report-page .news__to-top { display: none !important; }
  .report__head, .report__section, .report__map, .report__intro, .report__before, .report tr[id] { scroll-margin-top: 128px; }
  .report__main { padding-top: 1.4rem; }
  .report__table { padding: .7rem .6rem; }
  .report__before { padding: .9rem 1rem; }
  .report__viewer { width: 100vw; height: 100%; max-height: 100dvh; border-radius: 0; }
  .report__viewer-title { font-size: .85rem; }
  .report__viewer-tools button { min-width: 2.2rem; height: 2.2rem; }
}
