/* ==========================================================================
   ALPS enclave note — report page layer
   Additive only. Scoped under body.note-page. Does not modify styles.css
   or insights.css. Built on the existing cream/ink/gold tokens.
   ========================================================================== */

/* --- page frame ---------------------------------------------------------- */

.note-page {
  background: var(--cream);
}

.note-wrap {
  padding: calc(96px + 6vh) 0 0;
}

.note-section {
  padding: clamp(44px, 6vw, 72px) 0 0;
}

.note-section--rule {
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--rule);
}

/* Reading measure. Matches .ins-container (720px) so the prose sits at the
   same measure as every other long-form page on the site. */
.note-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.note-container-wide {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* --- typography ---------------------------------------------------------- */

.note-page .note-h1 {
  font-family: var(--display);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
  margin: 14px 0 0;
}

.note-page .note-h1 em {
  font-style: italic;
  color: var(--gold-deep);
  font-weight: 300;
}

.note-page .note-h2 {
  font-family: var(--display);
  font-weight: 420;
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 6px;
}

.note-page .note-h2 em {
  font-style: italic;
  color: var(--gold-deep);
  font-weight: 300;
}

.note-page .note-h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink);
  margin: 34px 0 12px;
}

.note-page .note-dek {
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
  margin: 16px 0 0;
  max-width: 32ch;
}

.note-page .note-body p,
.note-page .note-body li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 22px;
  overflow-wrap: break-word;
}

.note-page .note-body ol,
.note-page .note-body ul {
  padding-left: 22px;
  margin: 0 0 22px;
}

.note-page .note-body li {
  margin-bottom: 12px;
}

.note-page .note-body strong { font-weight: 600; color: var(--ink); }
.note-page .note-body em { font-style: italic; }

.note-page .note-body a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Micro-label, mono. Same convention as .eyebrow. */
.note-page .note-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin: 0 0 10px;
}

/* Masthead meta. Deliberately --muted, not --muted-light: these lines are
   compliance-bearing and must clear AA. */
.note-page .note-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.note-page .note-meta span { display: block; }

/* --- takeaway / callout -------------------------------------------------- */

.note-callout {
  background: var(--cream-soft);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold);
  padding: 24px 26px 4px;
  margin: 0 0 26px;
}

.note-callout .note-callout-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: block;
  margin: 0 0 12px;
}

.note-takeaway {
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(19px, 2.3vw, 23px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  margin: 4px 0 0;
}

.note-takeaway em { font-style: italic; color: var(--gold-deep); }

/* The question prompts, Q1 / Q2 / Q3 */
.note-question {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold);
  background: transparent;
  padding: 22px 26px;
  margin: 0 0 26px;
}

.note-question .q-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 8px;
}

.note-question p:last-child { margin-bottom: 0; }

.note-question .q-ask {
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 12px;
}

/* --- tables -------------------------------------------------------------- */

.note-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 14px;
}

.note-page table.note-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 15px;
}

.note-page table.note-table th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: bottom;
}

.note-page table.note-table td {
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-soft);
  line-height: 1.5;
  vertical-align: top;
}

.note-page table.note-table td:last-child,
.note-page table.note-table th:last-child { padding-right: 0; }

.note-page table.note-table tr.is-emphasis td {
  color: var(--ink);
  font-weight: 600;
}

/* Value column: figures set in mono so a token reads as a token. */
.note-page table.note-table td.val,
.note-page table.note-table td.num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}

.note-page table.note-table td.cls {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.note-page table.note-table td.cls .cls-word {
  color: var(--ink);
  font-weight: 500;
}

/* Source + as-at line under every figure block. --muted at 13px, not
   --muted-light at 11px: these attributions are legally load-bearing. */
.note-source {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 30px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}

/* --- the redaction ------------------------------------------------------- */

.note-redaction-line {
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.35;
  color: var(--ink);
  margin: 8px 0 20px;
}

/* Literal U+2588 characters. Not an image, not a blur, nothing behind it. */
.redaction {
  font-family: var(--mono);
  letter-spacing: -0.04em;
  color: var(--ink);
  user-select: none;
  /* no animation, no hover, no shimmer — it is a redaction, not a tease */
}

.note-redaction-still {
  font-style: italic;
  color: var(--muted);
}

/* --- the gate ------------------------------------------------------------ */

.note-gate {
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold);
  background: var(--cream-soft);
  padding: clamp(28px, 4vw, 44px);
  margin: clamp(40px, 5vw, 60px) 0 0;
}

.note-gate .note-h2 { margin-bottom: 16px; }

.note-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

/* Secondary, quieter than the WhatsApp button on purpose: email is the
   fallback path, not the primary one. */
.note-gate-email {
  margin-top: 18px;
  max-width: 460px;
}

.note-gate-email label {
  display: block;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 10px;
}

.note-gate-email .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.note-gate-email input[type="email"] {
  flex: 1 1 200px;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  border-radius: 0;
  min-width: 0;
}

.note-gate-email button {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(14, 14, 14, 0.45);
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--t-med, 400ms) ease, color var(--t-med, 400ms) ease;
}

.note-gate-email button:hover { background: var(--ink); color: var(--cream); }

.note-gate-email [data-status] {
  font-family: var(--body);
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
  min-height: 1.4em;
}

.note-gate-consent {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.note-gate-consent strong { color: var(--ink-soft); font-weight: 600; }

/* The manifest. What is actually behind the gate, itemised, with the real
   counts already visible. A gate that says "the rest" is asking for a message
   in exchange for an unknown; this one names the six sections and the three
   charts and prints the figures that describe them. */
.note-gate-manifest {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.note-page .note-body .note-gate-manifest { padding-left: 0; margin-bottom: 0; }

.note-gate-manifest li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0 14px;
  align-items: baseline;
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid var(--rule-soft);
}

.note-page .note-body .note-gate-manifest li { margin-bottom: 0; font-size: 16px; }

.note-gate-manifest .m-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
}

.note-gate-manifest .m-what { color: var(--ink); font-weight: 500; }

.note-gate-manifest .m-detail {
  grid-column: 2;
  display: block;
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 4px;
}

.note-gate-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin: 18px 0 0;
}

/* --- the masked preview --------------------------------------------------- */
/* This is not a blur and it is not a mock-up. Every label and every count in
   it is real and comes from the same data block as the open charts. Only the
   figures are covered, and they are covered by a mask that spans the whole
   lane so that nothing about its size can be read as a value. */

.note-teaser {
  margin-top: clamp(36px, 5vw, 52px);
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.note-teaser .note-h2 { margin-bottom: 10px; }

.note-teaser .note-label { color: var(--muted); }

.note-teaser .note-teaser-lede {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.note-teaser .note-figure { background: var(--cream-soft); }

.note-teaser .note-figure figcaption { color: var(--muted); }

/* Literal U+2588 characters over a figure that exists. Same convention as the
   redacted differential above: no animation, no hover, no shimmer. */
.gate-mask {
  font-family: var(--mono);
  letter-spacing: -0.04em;
  color: var(--ink);
  user-select: none;
}

.note-page table.note-table td.masked {
  font-family: var(--mono);
  font-size: 14px;
  white-space: nowrap;
}

/* Locked and unlocked wording. A reader who has opened the note should not be
   told the note is closed, and a reader who has not should not be told it is
   open. Print unlocks everything, so the locked-only copy is dropped on paper. */
.gate-locked-only { display: none; }
.js-gate .note-page:not(.is-unlocked) .gate-locked-only { display: block; }
.js-gate .note-page:not(.is-unlocked) .gate-unlocked-only { display: none; }

/* Gate mechanics. The hiding rule only applies once JS has confirmed it can
   run (html.js-gate), so with JS off the whole note renders unlocked. */
.js-gate .note-page .is-gated { display: none; }
.js-gate .note-page.is-unlocked .is-gated { display: block; }
.js-gate .note-page.is-unlocked .note-gate,
.js-gate .note-page.is-unlocked .note-teaser { display: none; }
.note-page:not(.is-unlocked) .note-redaction-still { display: none; }

.note-unlocked-flag {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 10px;
}

.note-page.is-unlocked .note-unlocked-flag { display: block; }

/* --- buttons ------------------------------------------------------------- */

.note-page .btn-wa-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--t-med, 400ms) ease, border-color var(--t-med, 400ms) ease, transform var(--t-med, 400ms) ease;
}

.note-page .btn-wa-note:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  transform: translateY(-3px);
}

.note-page .btn-quiet-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  border: 1px solid rgba(14, 14, 14, 0.45);
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-med, 400ms) ease, color var(--t-med, 400ms) ease;
}

.note-page .btn-quiet-note:hover {
  background: var(--ink);
  color: var(--cream);
}

.note-page .btn-print-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 20px;
}

.note-page .btn-print-note:hover { color: var(--ink); }

/* Focus. styles.css has only two :focus-visible rules; match their treatment. */
.note-page a:focus-visible,
.note-page button:focus-visible,
.note-page input:focus-visible,
.note-page summary:focus-visible {
  outline: 1px solid var(--gold-deep);
  outline-offset: 2px;
}

/* --- charts -------------------------------------------------------------- */

.note-figure {
  margin: 0 0 30px;
  border: 1px solid var(--rule);
  background: #FBF7EC;
  padding: 20px 20px 16px;
}

.note-figure .chart-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  display: block;
  margin: 0 0 4px;
}

.chart-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-scroll svg {
  display: block;
  width: 100%;
  min-width: 320px;
  max-width: 100%;
  height: auto;
  color: var(--ink);
}

/* Meaning is carried by weight, dash and direct label — never hue. */
.chart-scroll svg text {
  font-family: var(--mono);
  font-size: 11px;
  fill: currentColor;
}

.chart-scroll svg .axis-line,
.chart-scroll svg .tick { stroke: currentColor; stroke-opacity: 0.35; }
.chart-scroll svg .tick-label { fill: currentColor; fill-opacity: 0.62; }
.chart-scroll svg .series-primary { stroke: currentColor; stroke-width: 3; fill: none; }
.chart-scroll svg .series-secondary { stroke: currentColor; stroke-width: 1.5; fill: none; stroke-dasharray: 6 4; }
.chart-scroll svg .block-iqr { fill: currentColor; fill-opacity: 0.16; }
.chart-scroll svg .rule-median { stroke: currentColor; stroke-width: 3; }
.chart-scroll svg .whisker { stroke: currentColor; stroke-width: 1.25; }
.chart-scroll svg .obs-tick { stroke: currentColor; stroke-opacity: 0.25; stroke-width: 1; }
.chart-scroll svg .point { fill: currentColor; fill-opacity: 0.45; }
.chart-scroll svg .fit-line { stroke: currentColor; stroke-width: 1.75; stroke-dasharray: 5 3; fill: none; }
.chart-scroll svg .band-overlay { fill: currentColor; fill-opacity: 0.1; stroke: currentColor; stroke-opacity: 0.5; stroke-dasharray: 3 3; }
.chart-scroll svg .label-direct { font-weight: 500; fill: currentColor; }
.chart-scroll svg .label-caps { letter-spacing: 0.12em; }

/* Bars and columns. One fill for every plotted bar: a bar that is lighter or
   darker than its neighbour would be encoding something, and nothing here is
   encoded by tone. Difference is carried by fill PATTERN (hatched = partial
   period, or present-but-not-plotted) and by the direct label on the bar. */
.chart-scroll svg .bar {
  fill: currentColor;
  fill-opacity: 0.18;
  stroke: currentColor;
  stroke-opacity: 0.75;
  stroke-width: 1;
}

/* A hatched bar is a real measured value drawn on a PARTIAL period. The fill
   is the pattern, so the outline carries the value and the texture carries
   the caveat. Both survive greyscale and a mono laser printer. */
.chart-scroll svg .bar-pattern { fill-opacity: 1; }

/* A true zero. Drawn, not omitted: an empty bin is a finding. */
.chart-scroll svg .bar-zero { fill-opacity: 0.5; }

/* Present, deliberately not plotted. Spans the whole lane so that no width
   and no height can be read as a value. */
.chart-scroll svg .bar-suppressed,
.chart-scroll svg .bar-masked {
  stroke: currentColor;
  stroke-opacity: 0.35;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-scroll svg .hatch-line { stroke: currentColor; stroke-opacity: 0.3; stroke-width: 1; }

/* --- chart motion -------------------------------------------------------- */
/* The resting state of every chart is its FINISHED state. Motion is added
   only under .is-live, which report.js sets when the figure scrolls into
   view. No JavaScript, no motion, no missing chart. Reduced motion, no
   motion, same finished frame. */

.note-figure.is-live .chart-scroll svg .bar-h {
  transform-box: fill-box;
  transform-origin: left center;
  animation: note-bar-grow-x 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.note-figure.is-live .chart-scroll svg .bar-v {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: note-bar-grow-y 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes note-bar-grow-x {
  from { transform: scaleX(0.004); }
  to   { transform: scaleX(1); }
}

@keyframes note-bar-grow-y {
  from { transform: scaleY(0.004); }
  to   { transform: scaleY(1); }
}

.note-figure.is-live .chart-scroll svg .series-draw {
  stroke-dasharray: 1400;
  stroke-dashoffset: 0;
  animation: note-line-draw 900ms cubic-bezier(0.33, 0.9, 0.4, 1) both;
}

@keyframes note-line-draw {
  from { stroke-dashoffset: 1400; }
  to   { stroke-dashoffset: 0; }
}

.note-page .note-figure figcaption {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--rule-soft);
}

.note-read {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

/* Every suppression is stated in words, never left as an empty box. */
.suppressed {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  border: 1px dashed var(--rule);
  padding: 16px 18px;
  margin: 0;
}

/* Accessibility / no-JS / print fallback for every chart. */
.note-page details.chart-numbers {
  margin-top: 14px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 12px;
}

.note-page details.chart-numbers summary {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.note-page details.chart-numbers[open] summary { color: var(--ink); margin-bottom: 14px; }

/* Chart 4 input. A drawing control, not a capture field. */
.position-control {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}

.position-control label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.position-control input[type="number"] {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  width: 180px;
  max-width: 100%;
  border-radius: 0;
}

.position-readout {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

.position-note {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-style: italic;
  margin: 14px 0 0;
}

/* --- streets ------------------------------------------------------------- */

/* The street list is a scope statement, not a finding. It sits with the
   compliance block at the foot, where a scope statement belongs, and it is
   never gated: a reader has to be able to check whether this note is about
   their street before deciding whether any of it applies to them. */
.note-scope {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.note-page .note-scope .note-h2 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0;
}

.street-list {
  font-size: 15.5px;
  line-height: 2;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.street-verification {
  font-family: var(--body);
  font-size: 14px;
  font-style: italic;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* --- position test resolution ------------------------------------------- */

.note-verdict {
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 26px;
  margin: 30px 0 0;
  text-wrap: pretty;
}

/* --- closing CTA (dark) -------------------------------------------------- */

.note-close {
  background: var(--ink-warm);
  color: var(--cream);
  margin-top: clamp(60px, 8vw, 96px);
  padding: clamp(56px, 8vw, 88px) 0;
}

.note-close .note-h2 { color: var(--cream); }

/* Specificity fix, and it matters more now than it used to. The closing
   section is no longer gated, so every reader lands on it, and
   `.note-page .note-body p` was outranking `.note-close p` and painting this
   copy in the dark ink colour on the dark ground. */
.note-page .note-close .note-body p,
.note-page .note-close .note-body li { color: rgba(242, 235, 220, 0.82); }
.note-page .note-close .note-body strong { color: var(--cream); }
/* Links, but not the button: the button carries its own ground colour and
   inherits ink for contrast against it. */
.note-page .note-close .note-body a:not(.btn-wa-note) { color: var(--gold-soft); }
.note-page .note-close .note-body a.btn-wa-note { text-decoration: none; }
.note-close .note-label { color: var(--gold-soft); }
.note-close p { color: rgba(242, 235, 220, 0.8); font-size: 17px; line-height: 1.75; margin: 0 0 22px; }
.note-close strong { color: var(--cream); }

.note-close .note-verdict {
  color: var(--cream);
  border-left-color: var(--gold);
}

.note-close .btn-wa-note {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.note-close .btn-wa-note:hover { background: var(--gold-soft); border-color: var(--gold-soft); }

/* --- compliance block ---------------------------------------------------- */

.note-compliance {
  margin-top: clamp(44px, 6vw, 72px);
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
}

.note-compliance .identifier {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.note-compliance p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 12px;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 800px) {
  .note-wrap { padding-top: calc(84px + 4vh); }
  .note-gate-actions { flex-direction: column; align-items: stretch; }
  .note-page .btn-wa-note,
  .note-page .btn-quiet-note { justify-content: center; }
}

@media (max-width: 600px) {
  .note-page .note-body p,
  .note-page .note-body li { font-size: 16.5px; }
  .note-figure { padding: 14px 12px 12px; }
  .position-control input[type="number"] { width: 100%; }
  .note-page table.note-table { font-size: 14px; }
  .note-page table.note-table td { padding: 10px 12px 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .note-page .btn-wa-note,
  .note-page .btn-quiet-note {
    transition: none !important;
    transform: none !important;
  }

  /* ALL motion collapses to the final state. Every animation on this page
     animates TOWARDS the resting frame, never away from it, so removing the
     animation leaves the finished chart rather than a half-drawn one. */
  .note-page *,
  .note-page *::before,
  .note-page *::after,
  .note-figure .chart-scroll svg * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .note-figure .chart-scroll svg .bar-h,
  .note-figure .chart-scroll svg .bar-v { transform: none !important; }
  .note-figure .chart-scroll svg .series-draw {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* --- print: the four-page document -------------------------------------- */
/* Ads 7-8 promise "four pages ... written to be printed and read properly".
   Print unlocks everything, drops chrome, and keeps every chart legible in
   greyscale — which they already are, because none of them uses hue. */

@media print {
  @page { size: A4; margin: 16mm 14mm; }

  html, body, .note-page { background: #fff !important; color: #000 !important; }

  .nav, .wa-float, .footer, .note-gate, .note-teaser,
  .btn-print-note, .note-gate-actions, .position-control,
  .gate-locked-only,
  .note-close .btn-wa-note { display: none !important; }

  /* Paper is always the whole note, so the unlocked wording is the true one. */
  .gate-unlocked-only { display: block !important; }

  /* Gate is irrelevant on paper: the printed note is the whole note. */
  .js-gate .note-page .is-gated,
  .note-page .is-gated { display: block !important; }

  .note-wrap { padding-top: 0; }

  .note-container, .note-container-wide { max-width: 100%; padding: 0; }

  .note-page .note-body p,
  .note-page .note-body li { font-size: 10.5pt; line-height: 1.5; color: #000; margin-bottom: 9pt; }

  .note-page .note-h1 { font-size: 24pt; }
  .note-page .note-h2 { font-size: 14pt; }
  .note-page .note-h3 { font-size: 11pt; }

  .note-figure { border: 1px solid #999; background: #fff; break-inside: avoid;
                 margin: 0 0 10pt; padding: 6pt; }
  .chart-scroll { overflow: visible; }
  .chart-scroll svg { color: #000; max-height: 58mm; }

  /* Paper is the final greyscale test. Nothing on these charts is carried by
     hue, so the only thing print has to do is stop the motion and keep the
     hatch printing. */
  .note-figure .chart-scroll svg * { animation: none !important; transform: none !important; }
  .note-figure .chart-scroll svg .series-draw {
    stroke-dasharray: none !important; stroke-dashoffset: 0 !important;
  }
  .chart-scroll svg .bar { fill: #000; fill-opacity: 0.14; stroke: #000; }
  .chart-scroll svg .bar-pattern { fill-opacity: 1; }
  .chart-scroll svg .bar-suppressed,
  .chart-scroll svg .bar-masked { stroke: #000; }
  .chart-scroll svg .hatch-line { stroke: #000; stroke-opacity: 0.45; }
  .chart-scroll svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Tighten to the printed four-page document the ads promise. */
  .note-section { padding-top: 10pt; }
  .note-section--rule { margin-top: 10pt; padding-top: 8pt; }
  .note-page .note-h2 { margin-bottom: 4pt; }
  .note-page .note-h3 { margin: 12pt 0 5pt; }
  .note-page .note-dek { margin-top: 6pt; }
  .note-meta { margin-top: 10pt; padding-top: 8pt; }
  .note-callout, .note-question { padding: 8pt 10pt; margin: 0 0 10pt; }
  .note-callout p, .note-question p { margin-bottom: 6pt; }
  .note-source { margin: 0 0 10pt; padding-top: 6pt; font-size: 8.5pt; }
  .note-page .note-figure figcaption { font-size: 8.5pt; padding-top: 6pt; margin-top: 6pt; }
  .note-takeaway { padding-top: 8pt; font-size: 12pt; }
  .note-verdict { margin-top: 10pt; font-size: 14pt; }
  .note-table-scroll { overflow: visible; margin-bottom: 8pt; }
  .note-page table.note-table { font-size: 9.5pt; }
  .note-page table.note-table td { padding: 5pt 10pt 5pt 0; }
  .note-page table.note-table th { padding: 0 10pt 5pt 0; }
  .street-list { font-size: 9.5pt; line-height: 1.6; margin-bottom: 8pt; }
  .street-verification, .note-compliance p { font-size: 8.5pt; line-height: 1.5; }
  .note-compliance { margin-top: 12pt; padding-top: 8pt; }
  .note-compliance .identifier { font-size: 9pt; margin-bottom: 8pt; }
  .position-readout, .position-note { margin-top: 6pt; font-size: 9.5pt; }

  .note-page details.chart-numbers { display: none; }

  .note-callout, .note-question, .note-verdict { break-inside: avoid; }

  .note-close { background: #fff !important; color: #000 !important; padding: 12pt 0 0; border-top: 1px solid #999; }
  .note-close .note-h2, .note-close p, .note-close strong { color: #000 !important; }
  .note-close .note-label { color: #000 !important; }

  .note-source, .note-compliance .identifier { color: #000; }

  /* Page breaks that produce the four-page document. */
  .page-break-before { break-before: page; page-break-before: always; }

  .print-only { display: block !important; }
}

.print-only { display: none; }

/* ==========================================================================
   THE PENDING STATE
   --------------------------------------------------------------------------
   Every figure on this note arrives as a {{TOKEN}} the emitter fills from the
   URA transaction record. Until it does, the figure is PENDING — and pending
   is a designed state here, not a failure state.

   Three rules govern the look:

   1. Pending is calm, not alarming. No red, no warning triangle, no error
      chrome. Nothing has broken; a figure simply has not been measured in yet,
      and the note's whole argument is that it would rather show you that than
      show you an approximation.
   2. Pending never implies a value. The slot is a slot. It carries no digit,
      no dash that could be read as zero, no "—" that could be read as nil.
   3. Pending survives greyscale and paper. The mark is a hatch and a hairline
      and the word "pending" — all four of which reproduce identically in
      black-and-white and in a fax of a photocopy.
   ========================================================================== */

/* --- the veil ------------------------------------------------------------ */
/* Held only while JS resolves the tokens, released by report.js and, failing
   that, by a 1200ms timer in the page head. Never applies without JS. */
html.tok-veil .note-wrap { visibility: hidden; }

/* --- the inline figure slot ---------------------------------------------- */

/* Specificity carries the .note-meta span { display:block } rule above, which
   would otherwise turn a pending slot into its own paragraph. */
.note-page span.tok-pending,
.tok-pending {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  vertical-align: baseline;
}

/* The hatched swatch reads as "a slot with nothing in it". Hatch rather than
   a flat tint so it is unmistakably empty rather than merely pale, and so it
   holds up when the page is printed on a mono laser printer. */
.tok-pending-slot {
  display: inline-block;
  width: 22px;
  height: 0.86em;
  border: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(28, 26, 23, 0.16) 0,
    rgba(28, 26, 23, 0.16) 1px,
    transparent 1px,
    transparent 5px
  );
  transform: translateY(0.06em);
}

.tok-pending-word {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* In a figure cell the slot is the whole content of the cell, so it is given
   the same monospaced rhythm the real figures will have — the table's
   structure and column widths do not jump when the figures arrive. */
.note-page table.note-table td.is-pending {
  color: var(--muted);
}

.note-page table.note-table td.is-pending .tok-pending-slot {
  width: 34px;
}

/* A table that is entirely pending still has to communicate its structure:
   the row headings, the column headings and the shape of the answer are the
   point. Only the value column is greyed. */
.note-page table.note-table.has-pending th {
  color: var(--muted);
}

/* --- the standing notice ------------------------------------------------- */

.note-pending-banner {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold);
  background: var(--cream-soft);
  padding: 22px 24px;
  margin: 0 0 8px;
}

.note-pending-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

.note-pending-banner .note-pending-lede {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 12px;
}

.note-pending-banner p {
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.note-pending-banner p:last-child { margin-bottom: 0; }

/* --- the pending chart --------------------------------------------------- */

.chart-pending-svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
}

.chart-pending-svg .pending-axis {
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-pending-svg .pending-hatch-line {
  stroke: rgba(28, 26, 23, 0.14);
  stroke-width: 1;
}

.chart-pending-svg .pending-hatch {
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-pending-svg .label-caps {
  letter-spacing: 0.22em;
  fill: var(--muted);
}

.chart-pending-note {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-soft);
  margin: 12px 0 0;
  padding-top: 12px;
}

/* --- pending on paper ---------------------------------------------------- */

@media print {
  .tok-pending-slot {
    border: 1px solid #000;
    background-image: repeating-linear-gradient(
      45deg, #000 0, #000 0.5pt, transparent 0.5pt, transparent 3pt
    );
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .tok-pending-word { color: #000; font-size: 7.5pt; }

  .note-pending-banner {
    border: 1px solid #000;
    border-left: 2px solid #000;
    background: #fff !important;
    padding: 8pt 10pt;
    break-inside: avoid;
  }

  .note-pending-banner .note-pending-lede { font-size: 12pt; color: #000; }
  .note-pending-banner p { font-size: 9.5pt; color: #000; }
  .note-pending-label { color: #000; }

  .chart-pending-svg { max-height: 50mm; }
  .chart-pending-svg .pending-axis,
  .chart-pending-svg .pending-hatch { stroke: #000; }
  .chart-pending-svg .pending-hatch-line { stroke: #000; }
  .chart-pending-svg .label-caps { fill: #000; }
  .chart-pending-note { font-size: 9pt; color: #000; }
}

/* The close-block WhatsApp button lost to the generic .note-page .note-body a
   rule and rendered gold-on-gold at 1.34:1. This pass moved the close in
   front of every reader, so it must win. */
.note-page .note-close .note-body a.btn-wa-note,
.note-page .note-close a.btn-wa-note { color: var(--ink); text-decoration: none; }
