/* LeedAB Group: the Company, Trade and Research pages, plus the homepage group band.
   Builds on the site.css tokens. Coverage tiers use a mint ordinal ramp
   (#63BF98, #2E8F6B, #175A45) validated against the #FDFDFB paper: one hue,
   monotone lightness, and a light end that clears 2:1. */

:root {
  --tier-1: #63BF98;
  --tier-2: #2E8F6B;
  --tier-3: #175A45;
  --land: #E3E8E4;
  --px-line: #2E8F6B;
  --rule: #dce2dd;
  --rule-2: #cad5c8;
  --panel: #fbfcfa;
  --panel-2: #f3f5f1;
}

/* author display rules (grid, flex) would otherwise beat the hidden attribute */
[hidden] { display: none !important; }

.gp main { overflow: clip; }

/* ---- Page head: the dark band the nav sits over ---- */
.gp .page-head { position: relative; overflow: hidden; isolation: isolate; text-align: left; }
.gp-head-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #051310f7 0%, #051310e0 48%, #0513107a 100%), var(--art) center / cover no-repeat;
}
.gp-head-inner { max-width: 1168px; margin: 0 auto; }
.gp-kicker {
  margin-bottom: 26px;
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint-2);
}
.gp .page-head .d2 {
  max-width: 32ch;
  margin: 0;
  font-size: clamp(1.875rem, 3.8vw, 3.125rem);
  line-height: 1.06;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
@media (max-width: 600px) {
  .gp .page-head .d2 {
    font-size: clamp(1.625rem, 7.7vw, 1.875rem);
    line-height: 1.1;
    letter-spacing: -0.016em;
  }
}
.gp .page-head .d2 em { font-style: normal; color: #afd2ab; }
.gp .page-head .sub { margin: 24px 0 0; max-width: 52ch; text-wrap: pretty; }
.gp-head-actions { margin-top: 34px; }
.gp .page-head .btn--outline { color: var(--lt); border-color: #8faba1; background: #05131055; }
.gp .page-head .btn--outline:hover { border-color: var(--lt-2); }

/* ---- Sections ---- */
.gp-section { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 8vw, 100px) 36px; }
.gp-rule { border-top: 1px solid var(--rule); }
.gp-eyebrow {
  margin-bottom: 22px;
  font: 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.gp-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 44px;
}
.gp-heading h2 {
  font: 400 clamp(1.75rem, 3.7vw, 3rem) / 1.08 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.gp-heading h2 em { font-style: normal; color: var(--ink-3); }
.gp-heading > p { max-width: 46ch; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.gp-note { margin-top: 14px; max-width: 86ch; font-size: 0.75rem; line-height: 1.55; color: var(--ink-3); text-wrap: pretty; }

/* ---- Divisions: homepage band and company page ---- */
.gp-divisions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gp-division {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 28px;
  background: #edf1e8;
  border-top: 3px solid var(--tier-2);
  transition: background 0.25s ease;
}
a.gp-division:hover { background: #e4ece2; }
.gp-division-n { font: 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #5d6d62; }
.gp-division h3 { margin-top: 44px; font: 400 1.875rem / 1.08 var(--serif); letter-spacing: -0.02em; }
.gp-division p { margin-top: 14px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.gp-division-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid #c3cfc4;
  font-size: 0.8125rem;
}
.gp-division > p:last-of-type { margin-bottom: 26px; }
.gp-division--flagship { background: var(--deep); color: var(--lt); border-top-color: var(--mint); }
a.gp-division--flagship:hover { background: var(--deep-2); }
.gp-division--flagship .gp-division-n { color: var(--lt-2); }
.gp-division--flagship p { color: var(--lt-2); }
.gp-division--flagship .gp-division-link { border-top-color: var(--line-lt); }

/* ---- Numbered steps ---- */
.gp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.gp-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gp-steps li { padding: 26px 24px 8px 0; }
.gp-steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.gp-steps b { display: block; margin-bottom: 30px; font: 10px var(--mono); letter-spacing: 0.1em; color: var(--tier-2); }
.gp-steps h3 { font-size: 1rem; font-weight: 500; letter-spacing: -0.015em; }
.gp-steps p { margin-top: 10px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

/* ---- Principle and offer grids ---- */
.gp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #d5ddd5;
  border: 1px solid #d5ddd5;
}
.gp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gp-grid article { padding: 30px; background: var(--white); }
.gp-grid h3 { font: 400 1.5rem / 1.15 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.gp-grid p { margin-top: 12px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.gp-grid .gp-division-n { display: block; margin-bottom: 18px; }
.gp-grid .text-link { font-size: 0.875rem; line-height: 1.6; gap: 8px; padding: 8px 0; }

/* ---- People ---- */
.gp-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; }
.gp-person { padding-top: 22px; border-top: 1px solid var(--rule-2); }
.gp-person h3 { font: 400 1.75rem / 1.1 var(--serif); letter-spacing: -0.015em; }
.gp-role { margin-top: 8px; font: 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.gp-person p:not(.gp-role) { margin-top: 16px; max-width: 48ch; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); }

/* ---- Closing band ---- */
.gp-closing { padding: 90px 24px 110px; text-align: center; background: #edf1e8; }
.gp-closing h2 {
  max-width: 20ch;
  margin: 0 auto;
  font: 400 clamp(1.75rem, 3.7vw, 3rem) / 1.1 var(--serif);
  letter-spacing: -0.016em;
  text-wrap: balance;
}
.gp-closing p { max-width: 46ch; margin: 18px auto 0; color: var(--ink-2); text-wrap: pretty; }
.gp-closing .gp-grid { max-width: 1120px; margin: 40px auto 0; text-align: left; }
.gp-closing .btn { margin-top: 32px; }

/* ---- Segmented control: filters sit in one row above the chart ---- */
.gp-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid #d4dcd5; background: var(--panel-2); }
.gp-seg button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: 0.8125rem var(--sans);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.gp-seg button:hover { color: var(--ink); background: #e7ece6; }
.gp-seg button[aria-pressed="true"] { color: var(--lt); background: var(--deep); }

/* ---- Coverage map ---- */
.cov { border: 1px solid #d4dcd5; background: var(--panel); }
.cov-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}
.cov-caption { font: 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.cov-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.75rem; color: var(--ink-2); }
.cov-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cov-key { display: inline-block; flex: 0 0 auto; width: 12px; height: 12px; border-radius: 2px; background: var(--land); }
.cov-key[data-tier="1"] { background: var(--tier-1); }
.cov-key[data-tier="2"] { background: var(--tier-2); }
.cov-key[data-tier="3"] { background: var(--tier-3); }
.cov-stage { position: relative; aspect-ratio: 960 / 450; margin: 12px 14px; }
.cov-svg { display: block; width: 100%; height: auto; }
.cov-graticule { fill: none; stroke: rgba(11, 16, 14, 0.07); stroke-width: 0.5; }
.cov-country { fill: var(--land); stroke: var(--panel); stroke-width: 0.5; transition: fill 0.45s ease, opacity 0.2s ease; }
.cov-country[data-tier="1"] { fill: var(--tier-1); }
.cov-country[data-tier="2"] { fill: var(--tier-2); }
.cov-country[data-tier="3"] { fill: var(--tier-3); }
.cov-svg.is-hovering .cov-country:not(.is-active) { opacity: 0.4; }
.cov-country.is-active { stroke: var(--ink); stroke-width: 0.8; }
.cov-country[data-origin] { fill: var(--tier-2); }
.cov-list,
.cov-list li { display: inline; }
.cov-list li + li::before { content: ', '; }
.cov-stage.is-failed::after {
  content: 'The map could not load. The list below has the same coverage.';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
/* one column per group, however many groups the list has */
.cov-table { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; border-top: 1px solid var(--rule); }
.cov-table > div { padding: 18px; }
.cov-table > div + div { border-left: 1px solid var(--rule); }
.cov-table dt { display: flex; align-items: center; gap: 8px; font: 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.cov-table dd { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.6; }

/* ---- Tooltips shared by both charts ---- */
.cov-tip,
.px-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 8px 11px;
  border-radius: 4px;
  background: var(--deep);
  color: var(--lt);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 10px 30px #05131033;
  pointer-events: none;
}
.cov-tip strong,
.px-tip strong { display: block; font-size: 0.8125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.cov-tip span,
.px-tip span { color: var(--lt-2); }
.px-tip small { margin-left: 2px; font-size: 0.6875rem; font-weight: 400; color: var(--lt-2); }

/* ---- Sample price brief ---- */
.px { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 1px solid #d4dcd5; background: var(--panel); }
.px-main { min-width: 0; padding: 22px 22px 14px; }
.px-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.px-label { font: 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.px-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 8px; }
.px-figure strong { font: 400 2.75rem / 1 var(--serif); letter-spacing: -0.02em; }
.px-figure small { font-size: 0.875rem; color: var(--ink-3); }
.px-change { font-size: 0.8125rem; color: var(--ink-2); }
.px-change b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.px-stage { position: relative; min-height: 230px; cursor: crosshair; touch-action: pan-y; }
.px-svg { display: block; overflow: visible; }
.px-grid { stroke: #e3e8e3; stroke-width: 1; }
.px-base { stroke: var(--ink-4); stroke-width: 1; }
.px-tick { font: 10.5px var(--mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.px-line { fill: none; stroke: url(#px-fade); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.px-area { fill: url(#px-wash); transition: opacity 0.6s ease 0.5s; }
.px-svg.is-drawing .px-area { opacity: 0; transition: none; }
.px-event { fill: var(--panel); stroke: var(--ink); stroke-width: 2; }
.px-event-n { font: 10px var(--mono); fill: var(--ink); }
.px-end { font: 500 12px var(--sans); fill: var(--ink); font-variant-numeric: tabular-nums; }
.px-cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.px-dot { fill: var(--px-line); stroke: var(--panel); stroke-width: 2; opacity: 0; }
.px-svg.is-hovering .px-cross,
.px-svg.is-hovering .px-dot { opacity: 1; }
.px-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--lt);
  font: 10.5px var(--mono);
  white-space: nowrap;
  pointer-events: none;
}
.px-side { display: flex; flex-direction: column; gap: 20px; padding: 22px; border-left: 1px solid var(--rule); background: var(--panel-2); }
.px-side h3 { font: 400 1.375rem / 1.15 var(--serif); letter-spacing: -0.01em; }
.px-events { display: grid; gap: 14px; }
.px-events li { display: grid; grid-template-columns: 22px 1fr; gap: 3px 10px; font-size: 0.8125rem; line-height: 1.45; }
.px-events b {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font: 10px var(--mono);
}
.px-events span { grid-column: 2; font: 10.5px var(--mono); color: var(--ink-3); }
.px-side .gp-note { margin-top: auto; }
.px-data summary { font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.px-data-wrap { max-height: 220px; margin-top: 10px; overflow: auto; }
.px-data table { width: 100%; border-collapse: collapse; font-size: 0.78125rem; font-variant-numeric: tabular-nums; }
.px-data th,
.px-data td { padding: 6px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
.px-data th { font: 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.px-data :is(th, td):last-child { text-align: right; }

/* ---- Dark theme (Research): neutral black, mint stays the only accent.
   Ink tokens are swapped inside main so the nav and head keep their own. ---- */
.gp--dark {
  --bg: #0A0A0A;
  --panel: #111111;
  --panel-2: #161616;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.13);
  --px-line: #3FBF8F;
  background: var(--bg);
  color: var(--lt);
}
.gp--dark main {
  --ink: #F5F5F5;
  --ink-2: #A3A3A3;
  --ink-3: #7A7A7A;
  --ink-4: #3A3A3A;
  --white: #111111;
}
.gp--dark .page-head { background: var(--bg); }
/* progressive blur: the engraving softens and melts into the page instead of
   stopping at a hard edge. Sits above the art, below the copy. */
.gp--dark .page-head::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 65%);
  mask-image: linear-gradient(to bottom, transparent, #000 65%);
  pointer-events: none;
}
.gp--dark .gp-head-art {
  background: linear-gradient(90deg, #0a0a0af7 0%, #0a0a0ae0 48%, #0a0a0a7a 100%), var(--art) center / cover no-repeat;
  filter: grayscale(1);
  /* the engraving is gone before the edge, so the blur has no bright pixels
     to smear into a seam line */
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
}
.gp--dark .page-head .btn--outline { border-color: rgba(255, 255, 255, 0.4); background: #0a0a0a55; }
.gp--dark .nav.is-stuck { background: rgba(10, 10, 10, 0.86); border-bottom-color: var(--rule-2); color: var(--lt); }
.gp--dark .nav.is-stuck .brand-logo { filter: none; }
@media (max-width: 900px) {
  .gp--dark .nav.is-open { background: var(--bg); color: var(--lt); border-bottom-color: var(--rule-2); }
  .gp--dark .nav.is-open .brand-logo { filter: none; }
  .gp--dark .nav-drawer { background: var(--bg); }
  .gp--dark .nav-drawer .btn { border-top-color: var(--rule-2); }
  .gp--dark .nav-drawer small { color: var(--lt-3); }
}
.gp--dark main .btn:hover { background: var(--mint-2); border-color: var(--mint-2); color: var(--bg); }
.gp--dark .gp-seg { border-color: var(--rule-2); background: var(--panel-2); }
.gp--dark .gp-seg button:hover { background: #222222; }
.gp--dark .gp-seg button[aria-pressed="true"] { background: var(--lt); color: var(--bg); }
.gp--dark .gp-grid { background: var(--rule-2); border-color: var(--rule-2); }
.gp--dark .gp-steps b { color: var(--mint); }
/* one continuous black page: no section rules, closing band on the same ground */
.gp--dark .gp-rule { border-top: 0; }
.gp--dark .gp-closing { background: var(--bg); }
.gp--dark .px { border-color: var(--rule-2); }
.gp--dark .px-grid { stroke: rgba(255, 255, 255, 0.07); }
.gp--dark :is(.px-tip, .px-pill) { background: var(--lt); color: var(--bg); box-shadow: 0 10px 30px #00000080; }
.gp--dark .px-tip :is(span, small) { color: #555555; }
.gp--dark .foot { background: var(--bg); }
/* ---- Quant brief (Research). Diverging ramps validated on the #111 panel:
   heatmap gains #1E5A44 → #328862, losses #7A3B27 → #A85A3A, neutral midpoint gray.
   The five-year reference series is gray and dashed: a benchmark, not a
   second category, and named in the legend. ---- */
.qb {
  --pos: #3FBF8F;
  --neg: #E07A45;
  --ref: #8C8C8C;
  /* heatmap steps are kept quiet so fifty cells never shout; each arm still
     clears 2:1 on the panel with visible gaps between steps */
  --d-n3: #A85A3A;
  --d-n2: #904A30;
  --d-n1: #7A3B27;
  --d-z: #222222;
  --d-p1: #1E5A44;
  --d-p2: #27704F;
  --d-p3: #328862;
  display: grid;
  gap: 20px;
}
.qb .px { background: var(--panel); }
.qb-mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--rule-2);
  background: var(--panel);
}
.qb-mast > div { padding: 26px 26px 24px; }
.qb-mast h3 {
  max-width: none;
  margin-top: 12px;
  font: 400 clamp(1.375rem, 2.4vw, 1.75rem) / 1.2 var(--serif);
  letter-spacing: -0.012em;
  /* fill the line like the bullets below, rather than balancing short */
  text-wrap: pretty;
}
/* the argument in four points, read top to bottom like a report */
.qb-points { display: grid; gap: 12px; margin-top: 22px; }
.qb-points li { position: relative; padding-left: 20px; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.qb-points li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.qb-points li:last-child::before { background: var(--mint); }
.qb-points strong { font-weight: 500; color: var(--ink); }
.qb-points li:last-child strong { color: var(--mint-2); }
.qb-risk-read p:first-child { font: 400 1.25rem / 1.4 var(--serif); letter-spacing: -0.01em; color: var(--ink); text-wrap: pretty; }
.qb-risk-read p + p { margin-top: 14px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.qb-takeaways { display: grid; gap: 10px; margin-top: 22px; counter-reset: take; }
.qb-takeaways li {
  position: relative;
  padding-left: 30px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-2);
  counter-increment: take;
  text-wrap: pretty;
}
.qb-takeaways li::before {
  content: counter(take, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font: 10.5px var(--mono);
  color: var(--mint);
}
.qb-view { padding: 26px 24px; border-left: 1px solid var(--rule-2); background: var(--panel-2); }
.qb-view dl { display: grid; gap: 16px; margin: 16px 0 0; }
.qb-view dt { font-size: 0.75rem; color: var(--ink-3); }
.qb-view dd { margin: 3px 0 0; font-size: 0.9375rem; color: var(--ink); }

.qb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--rule-2); border: 1px solid var(--rule-2); }
.qb-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qb-kpis > div { padding: 18px; background: var(--panel); }
.qb-kpis dt { font: 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.qb-kpis dd { margin: 10px 0 0; font-size: 1.625rem; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.qb-kpis small { display: block; margin-top: 6px; font-size: 0.75rem; line-height: 1.4; color: var(--ink-2); }
.qb-kpis sup, .qb-method sup, .qb-points sup { font-size: 0.625rem; color: var(--ink-3); }
/* a source marker never wraps onto a line of its own */
.qb sup { white-space: nowrap; }
/* a heading with no side note takes the full row */
.gp-heading--solo { grid-template-columns: minmax(0, 1fr); }
/* the number behind each claim, set a step brighter than the sentence around it */
.qb-kpis small b, .qb-points b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

.qb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.qb-panel { display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--rule-2); background: var(--panel); }
.qb-panel header h3 { margin-top: 8px; font: 400 1.375rem / 1.2 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.qb-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.qb-stage { position: relative; margin: 20px 0 16px; }
/* the attribution sits beside the taller radar: centre it in the spare height */
[data-attrib] .qb-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.qb-method { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.8125rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.qb-method b { font-weight: 500; color: var(--ink); }

.qb-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  max-width: 260px;
  padding: 9px 12px;
  border-radius: 4px;
  background: var(--lt);
  color: var(--bg);
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: 0 10px 30px #00000080;
  pointer-events: none;
}
.qb-tip strong { display: block; font-size: 0.8125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.qb-tip span { display: block; margin-top: 2px; color: #555555; }

.qb-svg { display: block; overflow: visible; }
.qb-svg text { font-variant-numeric: tabular-nums; }

/* attribution bars */
.qb-zero { stroke: var(--rule-2); stroke-width: 1; }
.qb-hit { fill: transparent; }
.qb-label { font: 13px var(--sans); fill: var(--ink-2); }
.qb-value { font: 12px var(--mono); fill: var(--ink); }
.qb-total-rule { stroke: var(--rule-2); stroke-width: 1; }
.qb-label.is-total, .qb-value.is-total { fill: var(--ink); font-weight: 500; }
.qb-bar.is-pos { fill: var(--pos); }
.qb-bar.is-neg { fill: var(--neg); }
.qb-bar.is-residual { fill: var(--ref); }
.qb-row { transition: opacity 0.2s ease; }
.qb-svg.is-hovering .qb-row:not(.is-active) { opacity: 0.3; }

/* radar */
.qb-ring { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.qb-ring-label { font: 9.5px var(--mono); fill: var(--ink-3); }
.qb-spoke { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; transition: stroke 0.2s ease; }
.qb-spoke.is-active { stroke: rgba(255, 255, 255, 0.45); }
.qb-radar-label { font: 12px var(--sans); fill: var(--ink-2); transition: fill 0.2s ease; }
.qb-radar-label.is-active { fill: var(--ink); }
.qb-radar-now { fill: rgba(63, 191, 143, 0.14); stroke: var(--pos); stroke-width: 2; stroke-linejoin: round; }
.qb-radar-avg { fill: none; stroke: var(--ref); stroke-width: 1.5; stroke-dasharray: 4 3; }
.qb-radar-dot { fill: var(--pos); stroke: var(--panel); stroke-width: 2; }
.qb-radar-dot.is-avg { fill: var(--ref); }
.qb-radar-dot.is-active { r: 6; }
.qb-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 0.75rem; color: var(--ink-2); }
.qb-legend span { display: inline-flex; align-items: center; gap: 8px; }
.qb-key { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--pos); }
.qb-key.is-avg { border-top: 2px dashed var(--ref); }

/* heatmap */
.qb-axis { font: 10.5px var(--mono); fill: var(--ink-3); }
.qb-axis.is-now { fill: var(--ink); font-weight: 500; }
.qb-cell { transition: opacity 0.2s ease; }
.qb-cell[data-bin="n3"], .qb-scale i[data-bin="n3"] { fill: var(--d-n3); background: var(--d-n3); }
.qb-cell[data-bin="n2"], .qb-scale i[data-bin="n2"] { fill: var(--d-n2); background: var(--d-n2); }
.qb-cell[data-bin="n1"], .qb-scale i[data-bin="n1"] { fill: var(--d-n1); background: var(--d-n1); }
.qb-cell[data-bin="z"], .qb-scale i[data-bin="z"] { fill: var(--d-z); background: var(--d-z); }
.qb-cell[data-bin="p1"], .qb-scale i[data-bin="p1"] { fill: var(--d-p1); background: var(--d-p1); }
.qb-cell[data-bin="p2"], .qb-scale i[data-bin="p2"] { fill: var(--d-p2); background: var(--d-p2); }
.qb-cell[data-bin="p3"], .qb-scale i[data-bin="p3"] { fill: var(--d-p3); background: var(--d-p3); }
.qb-svg.is-hovering .qb-cell:not(.is-active) { opacity: 0.3; }
.qb-heat-now { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1; pointer-events: none; }
.qb-cell-label { font: 10.5px var(--mono); fill: var(--ink); pointer-events: none; }
.qb-scale { display: flex; align-items: center; gap: 3px; font: 10.5px var(--mono); color: var(--ink-3); }
.qb-scale i { display: inline-block; width: 16px; height: 12px; border-radius: 2px; }
.qb-scale span:first-child { margin-right: 6px; }
.qb-scale span:last-child { margin-left: 6px; }

/* risk */
.qb-risk { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; margin: 20px 0 16px; align-items: start; }
.qb-table-wrap { overflow-x: auto; }
.qb-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.qb-table th, .qb-table td { padding: 10px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; vertical-align: top; }
.qb-table thead th { font: 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.qb-table tbody th { color: var(--ink); padding-right: 12px; }
.qb-table td { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qb-table :is(th, td):not(:first-child) { text-align: right; padding-left: 12px; }
.qb-table td small { display: block; font-size: 0.6875rem; color: var(--ink-3); }
.qb-table td.is-gain, .qb-table td.is-loss { color: var(--ink); }
.qb-table td.is-gain::before, .qb-table td.is-loss::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.qb-table td.is-gain::before { background: var(--pos); }
.qb-table td.is-loss::before { background: var(--neg); }

/* so what */
/* the recommendations read like the masthead bullets above: same padding,
   same dots, same type, straight under the headline */
.qb-sowhat { padding: 26px 26px 24px; }
.qb-steps { display: grid; gap: 12px; margin-top: 22px; }
.qb-steps li { position: relative; padding-left: 20px; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.qb-steps li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.qb-steps strong { font-weight: 500; color: var(--ink); }
.qb-steps sup { font-size: 0.625rem; color: var(--ink-3); }
.qb-steps b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }.qb-watch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; margin: 20px 0 16px; }
.qb-watch ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.qb-watch li { font-size: 0.8125rem; color: var(--ink-2); }
.qb-watch li b { margin-right: 8px; font: 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mint); }
.qb-watch sup { font-size: 0.625rem; color: var(--ink-3); }

/* sources */
.qb-sources { padding: 22px; border: 1px solid var(--rule-2); background: var(--panel); }
.qb-sources ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; margin-top: 14px; padding-left: 22px; list-style: decimal; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-2); }
.qb-sources li::marker { font: 11px var(--mono); color: var(--ink-3); }
.qb-sources .gp-note { margin-top: 18px; }

@media (max-width: 1000px) {
  .qb-kpis:not(.qb-kpis--3) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .qb-mast, .qb-grid, .qb-risk { grid-template-columns: 1fr; }
  .qb-view { border-left: 0; border-top: 1px solid var(--rule-2); }
}
@media (max-width: 600px) {
  .qb-kpis:not(.qb-kpis--3) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-kpis:not(.qb-kpis--3) > div,
  .qb-kpis:not(.qb-kpis--3) > div:nth-child(n + 4) { grid-column: auto; }
  .qb-kpis:not(.qb-kpis--3) > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .qb-kpis--3 { grid-template-columns: 1fr; }
  .qb-mast > div, .qb-view, .qb-panel, .qb-sources { padding: 18px 16px; }
  .qb-sources ol { grid-template-columns: 1fr; }
  .qb-head-row .qb-scale { width: 100%; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .gp-heading { grid-template-columns: 1fr; gap: 16px; }
  .gp-divisions { grid-template-columns: 1fr; }
  .gp-division { min-height: 0; }
  .gp-division h3 { margin-top: 28px; }
  .gp-grid--3 { grid-template-columns: 1fr; }
  .gp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .gp-steps li:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .px { grid-template-columns: 1fr; }
  .px-side { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (min-width: 601px) and (max-width: 900px) {
  .gp-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gp-steps--3 li:nth-child(3) { padding-left: 24px; border-left: 1px solid var(--rule); border-top: 0; }
}
@media (max-width: 600px) {
  .gp-section { padding: 60px 22px; }
  .gp-steps,
  .gp-grid,
  .gp-people,
  .cov-table { grid-template-columns: 1fr; }
  .gp-steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .cov-table { grid-auto-flow: row; }
  .cov-table > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .cov-stage { margin: 8px 6px; }
  .gp-closing { padding: 70px 22px; }
  .px-main { padding: 18px 14px 10px; }
  .px-figure strong { font-size: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cov-country,
  .px-area,
  .gp-division { transition: none; }
}

/* ---- Trade commodity carousel: a scroll-snap row under the origins map ---- */
.cm { margin-top: 28px; }
.cm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 0 16px;
}
.cm-nav { display: flex; align-items: center; gap: 6px; }
.cm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-right: 6px;
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  background: #fff;
  color: var(--ink-3);
  transition: border-color 0.2s;
}
.cm-search:focus-within { border-color: #438d63; }
.cm-search svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.cm-search input {
  width: 180px;
  border: 0;
  outline: 0;
  background: transparent;
  font: 0.8125rem var(--sans);
  color: var(--ink);
}
.cm-search input::placeholder { color: var(--ink-3); }
.cm-empty { padding: 34px 22px; font-size: 0.875rem; color: var(--ink-2); }
.cm-empty a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.cm-defs { position: absolute; }
.cm-track {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cm-track::-webkit-scrollbar { display: none; }
/* Fade the row out at both edges so cards drift in and out instead of being cut off. */
.cm-track {
  --cm-fade: 40px;
  -webkit-mask-image: linear-gradient(90deg, #0003, #000 var(--cm-fade), #000 calc(100% - var(--cm-fade)), #0003);
  mask-image: linear-gradient(90deg, #0003, #000 var(--cm-fade), #000 calc(100% - var(--cm-fade)), #0003);
  padding-inline: var(--cm-fade);
}
@media (max-width: 600px) { .cm-track { --cm-fade: 20px; } }
.cm-track:focus-visible { outline: 2px solid #438d63; outline-offset: -2px; }
.cm-card {
  flex: 0 0 calc((100% - 36px) / 4);
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 22px 24px;
  border: 1px solid #d4dcd5;
  background: var(--panel);
}
.cm-icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--tier-2);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.cm-card h3 { margin-top: 22px; font: 400 1.375rem / 1.15 var(--serif); letter-spacing: -0.015em; }
.cm-card p { margin-top: 10px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.cm-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}
.cm-more { font-size: 0.75rem; color: var(--ink-2); opacity: 0; transition: opacity 0.2s; }
.cm-card:hover .cm-more, .cm-card:focus-within .cm-more { opacity: 1; }
.cm-card { position: relative; cursor: pointer; transition: background 0.2s; }
.cm-card:hover { background: var(--panel-2); }
.cm-open { all: unset; cursor: pointer; }
.cm-open::after { content: ''; position: absolute; inset: 0; }
.cm-open:focus-visible { outline: none; }
.cm-card:has(.cm-open:focus-visible) { outline: 2px solid #438d63; outline-offset: -2px; }
@media (hover: none) { .cm-more { opacity: 1; } }
.cm-tags {
  font: 10px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
@media (max-width: 900px) { .cm-card { flex-basis: 40%; } }
@media (max-width: 600px) {
  .cm-bar { gap: 12px; padding: 0 0 14px; }
  .cm-bar .cov-caption { flex: 0 1 auto; font-size: 10px; letter-spacing: 0.06em; }
  .cm-nav { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
  .cm-search { flex: 1 1 auto; min-width: 0; max-width: 200px; margin-right: 0; padding: 0 10px; }
  .cm-search input { width: 100%; }
  .cm-card { flex-basis: 78%; padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { .cm-track { scroll-behavior: auto; } }
.gp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* ---- Commodity spec sheet dialog ---- */
.cm-dialog {
  width: min(820px, calc(100% - 28px));
  max-height: 88svh;
  margin: auto;
  padding: 44px 44px 36px;
  border: 1px solid #c8d7c7;
  background: #fafbf6;
  color: var(--ink);
  box-shadow: 0 30px 100px #0003;
}
.cm-dialog::backdrop { background: #071b13aa; backdrop-filter: blur(6px); }
.cm-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 1rem;
  cursor: pointer;
}
.cm-close:hover { color: var(--ink); }
.cm-sheet-head { display: flex; align-items: center; gap: 14px; }
.cm-sheet-head .cm-icon { width: 30px; height: 30px; }
.cm-dialog h2 { margin-top: 18px; font: 400 clamp(1.75rem, 3.4vw, 2.375rem) / 1.08 var(--serif); letter-spacing: -0.022em; }
.cm-lede { margin-top: 14px; max-width: 60ch; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.cm-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 28px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule);
}
.cm-facts dt { font: 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.cm-facts dd { margin: 6px 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink); }
.cm-table-wrap { margin-top: 26px; overflow-x: auto; }
.cm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.cm-table th, .cm-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.cm-table thead th { font: 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; border-bottom-color: var(--rule-2); }
.cm-table tbody th { font-weight: 400; color: var(--ink-2); width: 45%; }
.cm-table td { color: var(--ink); }
.cm-note { margin-top: 16px; font-size: 0.75rem; line-height: 1.55; color: var(--ink-3); }
.cm-dialog .btn { margin-top: 24px; }
@media (max-width: 600px) {
  .cm-dialog { padding: 40px 22px 28px; }
  .cm-facts { grid-template-columns: 1fr; }
}
