/* Mockup: a report hosted on the site (next-report.html) */
.rp-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 70; height: 3px; pointer-events: none; }
.rp-bar i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

.rp-head { padding-top: clamp(1.75rem, 4vw, 3rem); padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem); border-bottom: 1px solid var(--rule); }
.rp-head > * { grid-column: 1 / 10; }
.rp-head .label { margin: 0 0 1rem; }
.rp-title { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1; letter-spacing: -0.02em; }
.rp-dek { margin: 1.25rem 0 0; font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.45; color: var(--ink2); max-width: 40em; }
.rp-by { margin: 1.25rem 0 0; font-family: var(--sans); font-weight: 600; font-size: .9375rem; }
.rp-by span { color: var(--muted); font-weight: 400; }
.rp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }
.rp-acts .button { cursor: pointer; }
.rp-acts .li { font-family: var(--sans); font-weight: 600; font-size: .875rem; }
.rp-mock { margin: 1.5rem 0 0; padding: .7rem .9rem; border-left: 3px solid var(--gold); background: var(--tint); font-family: var(--sans); font-size: .875rem; line-height: 1.45; }

.rp-body { padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: var(--sec); align-items: start; }
.rp-text { grid-column: 1 / 8; padding-right: .5rem; min-width: 0; font-size: 1.1875rem; line-height: 1.65; }
.rp-text > p { margin: 0 0 1.15em; max-width: 36em; }
.rp-text > h2 { margin: 2.2em 0 .8em; font-size: clamp(1.6rem, 2.4vw, 2rem); }
.rp-text > h2:first-child { margin-top: 0; }
.rp-text > p:first-of-type::first-letter { float: left; font-size: 4.1em; line-height: .82; margin: .06em .08em 0 0; font-weight: 500; color: var(--red-text); }
.rp-side { grid-column: 8 / 13; align-self: stretch; min-width: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: var(--cg); align-items: start; }
.rp-side .rp-notes { grid-column: 1; grid-row: 1; position: relative; align-self: stretch; }
.rp-side .rp-loc { grid-column: 2; grid-row: 1; }

/* the locator: a small globe that flies to the place each section is about */
.rp-loc { position: sticky; top: calc(var(--bar-h) + 1.25rem); z-index: 2; margin: 0; background: #1A1613; }
.rp-loc canvas { display: block; width: 100%; aspect-ratio: 1; }
.rp-loc p { margin: 0; padding: .55rem .8rem .65rem; font: 600 .6875rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #F7F5F0; border-top: 1px solid rgba(247, 245, 240, .15); }

/* figures that count up once they are read */
.rp-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin: 1.6em 0 1.9em; border-top: 2px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.rp-figs div { padding: 1rem 1rem 1.05rem 0; }
.rp-figs b { display: block; font: 500 clamp(2.4rem, 4.4vw, 3.4rem)/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; }
.rp-figs span { display: block; margin-top: .45rem; font: 400 .875rem/1.35 var(--sans); color: var(--muted); max-width: 14em; }

/* sources: notes in the margin on a computer, a tap on a phone */
.fn { all: unset; cursor: pointer; font: 600 .7em/1 var(--sans); color: var(--red-text); vertical-align: super; padding: 0 .15em; }
.fn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.rp-notes { list-style: none; margin: 0; padding: 0; }
.rp-notes li { position: absolute; left: 0; right: 0; padding-top: .45rem; border-top: 1px solid var(--rule); font: 400 .8125rem/1.45 var(--sans); color: var(--muted); transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.rp-notes li b { color: var(--red-text); margin-right: .35em; }
.rp-notes li.on { color: var(--fg); border-top-color: var(--red); }

.rp-next { display: grid; grid-template-columns: 1fr 1fr; gap: var(--cg); padding-top: 1.5rem; padding-bottom: var(--sec); border-top: 3px double var(--fg); }
.rp-next a { display: block; text-decoration: none; color: inherit; }
.rp-next .label { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.rp-next b { font: 500 1.35rem/1.2 var(--serif); }
.rp-next a:hover b { text-decoration: underline; text-decoration-color: var(--red); }
.rp-next .r { text-align: right; } .rp-next .r .label { justify-content: flex-end; }

/* the share card preview */
.sc-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; background: rgba(15, 14, 13, .72); }
.sc-wrap[hidden] { display: none; }
.sc-box { display: grid; gap: .9rem; justify-items: center; max-height: 100%; }
.sc-box img { display: block; height: min(70vh, 640px); width: auto; max-width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.sc-box .row { display: flex; gap: .75rem; }

/* phones: a reading dock within thumb reach (progress, share, next) and sources open with a tap */
.rp-dock { display: none; }
@media (max-width: 68.75rem) {
  .rp-head > *, .rp-text { grid-column: 1 / 13; }
  .rp-side { grid-column: 1 / 13; order: -1; }
  .rp-side { display: block; }
  .rp-loc { position: relative; top: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; }
  .rp-loc canvas { width: 6.5rem; }
  .rp-loc p { border-top: 0; }
  .rp-notes { display: none; }
}
@media (max-width: 47.5rem) {
  .rp-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .5rem; padding: .5rem var(--gutter) calc(.5rem + env(safe-area-inset-bottom)); background: var(--bar-bg); border-top: 1px solid var(--rule); backdrop-filter: blur(8px); transform: translateY(110%); transition: transform var(--t) var(--ease); }
  .rp-dock.show { transform: none; }
  .rp-dock .p { font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .rp-dock button, .rp-dock a { min-height: 2.75rem; padding: 0 .9rem; display: inline-flex; align-items: center; border: 1px solid var(--rule-strong); background: transparent; color: var(--fg); font: 600 .8125rem/1 var(--sans); text-decoration: none; }
  .rp-dock a { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
  .rp-next { grid-template-columns: 1fr; padding-bottom: 6rem; }
  .rp-next .r, .rp-next .r .label { text-align: left; justify-content: flex-start; }
}

/* ---------- The short report pages (report-<date>.html) ---------- */
.rp-head { padding-top: clamp(3rem, 6vw, 5.5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 0; }
.rp-head > * { grid-column: 1 / 11; }
.rp-title { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1.02; max-width: 16em; }
.rp-dek { margin-top: 1.75rem; max-width: 38em; }
.rp-by { margin-top: 1.75rem; }
.rp-acts { margin-top: 2.25rem; gap: 1rem; }
.rp-acts .button .ic { width: 1rem; height: 1rem; margin-left: .45rem; }
.rp-pic { margin: 0 auto; }
.rp-pic img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 45%; background: var(--slot); }
.rp-body { padding-top: clamp(3.5rem, 7vw, 6rem); }
.rp-text > h2 { margin: 0 0 1.75rem; padding-top: 1rem; border-top: 2px solid var(--rule-strong); }
.rp-text > h2 + .rp-term { margin-top: 0; }
.rp-text > h2:not(:first-child) { margin-top: clamp(3.5rem, 6vw, 5rem); }
.rp-term { padding: 0 0 2.25rem; margin: 0 0 2.25rem; border-bottom: 1px solid var(--rule); }
.rp-term:last-of-type { border-bottom: 0; margin-bottom: 0; }
.rp-term h3 { margin: 0 0 .75rem; font-size: clamp(1.4rem, 2vw, 1.65rem); line-height: 1.2; }
.rp-term h3 .full { display: block; margin-top: .3rem; font: 400 .9rem/1.4 var(--sans); color: var(--muted); }
.rp-term p { margin: 0; font-size: 1.1875rem; line-height: 1.65; max-width: 36em; }
.rp-term p.src { margin-top: .9rem; font: 400 .8125rem/1.45 var(--sans); color: var(--muted); }
.rp-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem .6rem; }
.rp-tags li { padding: .45rem .8rem; border: 1px solid var(--rule); font: 400 .9375rem/1.3 var(--sans); }
.rp-side:not(:has(.rp-notes)) { display: block; grid-column: 9 / 13; }
.rp-side:not(:has(.rp-notes)) .rp-loc { width: min(100%, 20rem); margin-left: auto; }
.rp-next { margin-top: var(--sec); padding-top: 2rem; }
@media (max-width: 68.75rem) {
  .rp-head > * { grid-column: 1 / 13; }
  .rp-side:not(:has(.rp-notes)) { grid-column: 1 / 13; }
  .rp-side:not(:has(.rp-notes)) .rp-loc { width: auto; margin: 0 0 2.5rem; }
  .rp-pic img { aspect-ratio: 16 / 9; }
}

/* ---------- Report summaries: key judgments, figures, brief, terms ---------- */
.rp-sec { margin: 0 0 clamp(3.5rem, 6vw, 5rem); }
.rp-sec > h2 { margin: 0 0 1.75rem; padding-top: 1rem; border-top: 2px solid var(--rule-strong); }
.rp-kj { list-style: none; counter-reset: kj; margin: 0; padding: 0; }
.rp-kj li { counter-increment: kj; position: relative; padding: 0 0 1.4rem 3.25rem; margin: 0 0 1.4rem; border-bottom: 1px solid var(--rule); font-size: 1.1875rem; line-height: 1.6; max-width: 38em; }
.rp-kj li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.rp-kj li::before { content: counter(kj, decimal-leading-zero); position: absolute; left: 0; top: .15em; font: 600 .8125rem/1 var(--sans); letter-spacing: .12em; color: var(--red-text); }
.rp-nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.rp-nums div { grid-column: span 2; }
.rp-nums.n4 div { grid-column: span 3; }
.rp-nums.n5 div:nth-child(n+4) { grid-column: span 3; }
.rp-nums div { padding: 1.4rem 1.3rem 1.5rem; background: var(--bg); }
.rp-nums b { display: block; font: 500 clamp(2rem, 3.4vw, 2.75rem)/1.05 var(--serif); letter-spacing: -.02em; font-variant-numeric: lining-nums; color: var(--fg); }
.rp-nums span { display: block; margin-top: .7rem; font: 400 .9375rem/1.4 var(--sans); color: var(--muted); }
.rp-brief p { margin: 0 0 1.2em; font-size: 1.1875rem; line-height: 1.65; max-width: 38em; }
.rp-terms { border-top: 1px solid var(--rule); }
details.rp-term { border-bottom: 1px solid var(--rule); padding: 0; margin: 0; }
details.rp-term summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; font: 500 1.25rem/1.3 var(--serif); }
details.rp-term summary::-webkit-details-marker { display: none; }
details.rp-term summary::after { content: "+"; position: absolute; right: .25rem; top: .9rem; font: 400 1.4rem/1 var(--sans); color: var(--muted); }
details.rp-term[open] summary::after { content: "\2212"; }
details.rp-term summary .full { display: block; margin-top: .25rem; font: 400 .875rem/1.4 var(--sans); color: var(--muted); }
details.rp-term p { margin: 0 0 1rem; font-size: 1.0625rem; line-height: 1.6; max-width: 38em; }
details.rp-term p.src { font: 400 .8125rem/1.45 var(--sans); color: var(--muted); }
.rp-cta { margin: 0; padding: 2rem 0 0; border-top: 3px double var(--fg); }
.rp-cta .button .ic, .rp-acts .button .ic { width: 1rem; height: 1rem; margin-left: .5rem; }
@media (max-width: 47.5rem) { .rp-kj li { padding-left: 2.5rem; font-size: 1.0625rem; } .rp-nums { grid-template-columns: 1fr 1fr; } .rp-nums div, .rp-nums.n4 div, .rp-nums.n5 div:nth-child(n+4) { grid-column: auto; } .rp-nums.n3 div:last-child, .rp-nums.n5 div:last-child { grid-column: 1 / -1; } .rp-nums div { padding: 1.1rem .9rem 1.2rem; } .rp-brief p { font-size: 1.0625rem; } }
.rp-nums b small { display: block; margin-bottom: .2rem; font: 600 .75rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
details.rp-term p.gl-go { margin: 0 0 1.25rem; }
details.rp-term p.gl-go a { display: inline-flex; align-items: center; gap: .4rem; font: 600 .875rem/1.3 var(--sans); color: var(--fg); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .2em; }
details.rp-term p.gl-go a .ic, .rp-all .ic { width: .95rem; height: .95rem; }
.rp-all { margin-top: 1.5rem; }
/* the photo leads, in black and white, as in a newspaper app; the headline follows */
.rp-lead { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.rp-lead + .rp-head { padding-top: clamp(2rem, 4vw, 3.25rem); }

/* ---------- Polish: one rhythm from the key judgments to the closing button ---------- */
/* the double rule above the next report spans the text measure, not the gutters */
.rp-next { border-top: 0; background:
  linear-gradient(var(--fg), var(--fg)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat,
  linear-gradient(var(--fg), var(--fg)) var(--gutter) 3px / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
/* the closing button and the next report sit one step apart, not two */
.rp-body { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.rp-next { margin-top: 0; padding-top: 2.25rem; }
/* figures: numbers on one line across a row, even when one carries a small qualifier above it */
.rp-nums:has(b small) b:not(:has(small)) { padding-top: calc(.75rem * 1.2 + .2rem); }
/* the grid lines and the glossary underline hold up on the night edition */
:root[data-theme="dark"] .rp-nums { background: rgba(247, 245, 240, .2); border-color: rgba(247, 245, 240, .2); }
details.rp-term p.gl-go a { text-decoration-color: var(--red-text); text-decoration-thickness: 1.5px; }
details.rp-term p.gl-go a:hover { color: var(--red-text); }
/* key terms: the row answers the pointer and the keyboard */
details.rp-term summary { transition: color var(--t-fast) var(--ease); }
details.rp-term summary:hover, details.rp-term summary:hover::after { color: var(--red-text); }
details.rp-term summary:focus-visible { outline-offset: 2px; }
details.rp-term[open] summary { padding-bottom: .75rem; }
@media (max-width: 47.5rem) {
  .rp-body { padding-top: 2.5rem; }
  .rp-nums b { font-size: 1.75rem; }
  .rp-next { padding-bottom: 6rem; }
}
