/* PlanBridge resource articles: long-form layout, answer blocks, charts, calculators.
   Loaded after style.css. Colours and type come from tokens.css. */

.pb-article { padding-bottom: clamp(64px, 8vw, 112px); }

/* Breadcrumbs */
.pb-crumbs { padding-top: clamp(28px, 4vw, 44px); }
.pb-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: .875rem; color: var(--resource-muted); }
.pb-crumbs li { display: inline-flex; align-items: center; }
.pb-crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 10px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.pb-crumbs a { color: inherit; text-underline-offset: .2em; }
.pb-crumbs a:hover { color: var(--resource-focus); }

/* Head */
.pb-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: var(--resource-gap); padding-block: 20px 40px; border-bottom: 1px solid var(--resource-rule); }
.pb-head__topic { display: inline-flex; padding: 6px 12px; border-radius: 8px; background: var(--resource-blue); color: var(--resource-focus); font-size: .8125rem; font-weight: 600; text-decoration: none; }
.pb-head__topic:hover { background: var(--resource-mint); }
.pb-head h1 { max-width: 20ch; margin: 18px 0 16px; font-size: clamp(2.5rem, 5.2vw, 4.5rem); }
.pb-head__dek { max-width: 50ch; color: var(--resource-muted); font-size: 1.1875rem; line-height: 1.55; }
.pb-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; padding: 0; list-style: none; font-size: .875rem; color: var(--resource-muted); }
.pb-meta li { display: inline-flex; align-items: center; gap: 8px; }
.pb-meta svg { width: 16px; height: 16px; flex: none; color: var(--resource-focus); }
.pb-meta strong { color: var(--resource-ink); font-weight: 600; }
.pb-cover img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--resource-radius); }
.pb-cover figcaption { margin-top: 8px; color: var(--resource-muted); font-size: .8125rem; }
.pb-cover a { color: inherit; text-underline-offset: .2em; }

/* Body layout */
.pb-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 6vw, 88px); align-items: start; padding-top: 48px; }
.pb-copy { min-width: 0; max-width: 72ch; font-size: 1.0625rem; }
.pb-copy > * + * { margin-top: 16px; }
.pb-copy p, .pb-copy li { line-height: 1.75; }
.pb-copy h2 { margin-top: 56px; font-size: clamp(1.75rem, 3.2vw, 2.375rem); scroll-margin-top: 24px; }
.pb-copy h3 { margin-top: 32px; font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -.03em; line-height: 1.2; scroll-margin-top: 24px; }
.pb-copy h2 + p, .pb-copy h3 + p { margin-top: 14px; }
.pb-copy :is(ul, ol):not([class]) { padding-left: 1.3rem; }
.pb-copy :is(ul, ol):not([class]) li + li { margin-top: 8px; }
.pb-copy a:not([class]) { color: var(--resource-focus); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.pb-copy a:not([class]):hover { text-decoration-thickness: 2px; }
.pb-copy strong { font-weight: 600; }
.pb-lead { font-size: 1.1875rem; }


/* Short answer (featured-snippet target): a run-in heading set at statement size */
.pb-answer { margin-top: 0; font-size: clamp(1.1875rem, 2vw, 1.375rem); line-height: 1.5; letter-spacing: -.01em; }
.pb-answer h2 { display: inline; margin: 0; font-size: inherit; line-height: inherit; letter-spacing: inherit; font-weight: 600; color: var(--resource-focus); }
.pb-answer h2::after { content: ". "; }
.pb-answer p { display: inline; font-size: inherit; line-height: inherit; }

/* Key takeaways */
.pb-takeaways { margin-top: 32px; padding: clamp(22px, 4vw, 32px); background: var(--resource-field); }
.pb-takeaways h2 { margin: 0 0 14px; font-size: 1.375rem; letter-spacing: -.02em; }
.pb-takeaways ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pb-takeaways li { position: relative; padding-left: 26px; line-height: 1.6; }
.pb-takeaways li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; background: var(--resource-teal); }
.pb-check { display: grid; gap: 12px; padding: 0; list-style: none; }
.pb-check li { position: relative; padding-left: 34px; }
.pb-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; box-sizing: border-box; border: 2px solid var(--resource-ink); }

/* Table of contents */
.pb-aside { position: sticky; top: 24px; display: grid; gap: 20px; max-height: calc(100vh - 48px); overflow: auto; overscroll-behavior: contain; }
.pb-toc h2 { margin: 0 0 10px; font-size: .9375rem; letter-spacing: 0; font-weight: 600; }
.pb-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--resource-rule); }
.pb-toc a { display: block; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--resource-muted); font-size: .875rem; line-height: 1.4; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.pb-toc a:hover { color: var(--resource-ink); }
.pb-toc a[aria-current="true"] { color: var(--resource-focus); border-left-color: var(--resource-teal); font-weight: 600; }
.pb-toc-mobile { display: none; }
.pb-aside__cta { padding: 22px; background: var(--resource-ink); color: var(--resource-white); }
.pb-aside__cta p:first-child { font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.pb-aside__cta p + p { margin-top: 6px; font-size: .875rem; color: #c8d0d1; line-height: 1.5; }
.pb-aside__cta a { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 44px; padding: 10px 16px; border-radius: 50px; background: var(--resource-mint); color: var(--resource-ink); font-weight: 600; font-size: .875rem; text-decoration: none; transition: background-color .2s ease; }
.pb-aside__cta a:hover { background: var(--resource-white); }
.pb-aside__cta svg { width: 18px; height: 18px; }


/* Figures: one flat field, a tone step below the page. No frame, square corners. */
.pb-fig { margin: 40px 0 0; padding: clamp(22px, 4vw, 36px); background: var(--resource-field); }
.pb-fig__title { max-width: 34ch; font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.pb-fig__sub { max-width: 60ch; margin-top: 8px; color: var(--resource-muted); font-size: 1rem; line-height: 1.5; }
.pb-fig__lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 26px; }
.pb-fig__lead b { font-size: clamp(2.75rem, 6vw, 4rem); font-weight: 600; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.pb-fig__lead span { max-width: 32ch; font-size: 1rem; line-height: 1.45; }
.pb-fig__body { margin-top: 30px; }
.pb-fig figcaption { max-width: 68ch; margin-top: 26px; color: var(--resource-muted); font-size: .875rem; line-height: 1.55; }
.pb-fig figcaption a { color: inherit; text-underline-offset: .2em; }
.pb-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .875rem; }
.pb-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pb-legend i { width: 12px; height: 12px; background: var(--sw, var(--resource-teal)); }
.pb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Horizontal bars and ranges: flat bars, labels on the data, no tracks or grid */
.pb-bars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pb-bars li, .pb-axis, .pb-refhead { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; }
.pb-bars__label { font-size: .9375rem; line-height: 1.35; }
.pb-bars__label small { display: block; color: var(--resource-muted); font-size: .8125rem; }
.pb-bars__track { position: relative; height: 30px; }
.pb-bars__bar { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c, var(--resource-teal)); transform-origin: left center; }
.pb-bars__bar.is-range { left: var(--x); }
.pb-bars__bar.is-cut { clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%); }
.pb-bars__value { min-width: 8ch; font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.pb-axis { margin-top: 10px; color: var(--resource-muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.pb-axis__ticks { display: flex; justify-content: space-between; }
.pb-axis__pad { min-width: 8ch; }
.pb-refline { position: absolute; z-index: 1; top: -6px; bottom: -6px; left: var(--x); width: 2px; margin-left: -1px; background: var(--resource-ink); }
.pb-refhead { margin-bottom: 6px; }
.pb-refhead__track { position: relative; height: 22px; }
.pb-refhead__track span { position: absolute; left: var(--x); bottom: 0; margin-left: -1px; padding: 0 0 4px 8px; border-left: 2px solid var(--resource-ink); font-size: .8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }

/* An itemised bill: each line carries its share of the total */
.pb-bill { width: 100%; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.pb-bill thead th { padding: 0 0 10px; color: var(--resource-muted); font-size: .8125rem; font-weight: 600; text-align: right; }
.pb-bill thead th:first-child { text-align: left; }
.pb-bill tbody th { padding: 14px 20px 14px 0; font-weight: 400; text-align: left; line-height: 1.4; }
.pb-bill tbody td, .pb-bill tfoot td { padding: 14px 0 14px 20px; text-align: right; vertical-align: top; white-space: nowrap; }
.pb-bill td:last-child { width: 4.5em; color: var(--resource-muted); }
.pb-bill tbody tr + tr > * { border-top: 1px solid var(--resource-field-deep); }
.pb-bill__bar { display: block; width: var(--w); height: 10px; margin-top: 10px; background: var(--resource-teal); transform-origin: left center; }
.pb-bill tfoot > tr > * { padding-top: 16px; border-top: 3px solid var(--resource-ink); font-size: 1.125rem; font-weight: 600; text-align: right; }
.pb-bill tfoot th { text-align: left; }

/* Paperwork set as a sheet: a quote, a policy statement */
.pb-sheet { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pb-sheet thead th { padding: 0 16px 10px 0; border-bottom: 2px solid var(--resource-ink); color: var(--resource-muted); font-size: .8125rem; font-weight: 600; text-align: left; }
.pb-sheet :is(tbody, tfoot) > tr > * { padding: 14px 16px 14px 0; text-align: left; vertical-align: top; line-height: 1.5; }
.pb-sheet tbody tr + tr > * { border-top: 1px solid var(--resource-field-deep); }
.pb-sheet tbody th { width: 24%; color: var(--resource-muted); font-weight: 400; }
.pb-sheet td:nth-child(2) { width: 30%; font-size: 1.0625rem; font-weight: 600; }
.pb-sheet.is-statement tbody th { width: 28%; color: var(--resource-ink); font-weight: 600; }
.pb-sheet.is-statement td:nth-child(2) { width: auto; color: var(--resource-muted); font-size: .9375rem; font-weight: 400; }
.pb-sheet.is-statement :is(td, th):last-child { padding-right: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pb-sheet.is-statement td:last-child { font-size: 1.0625rem; font-weight: 600; }
.pb-sheet tfoot > tr > * { padding-top: 16px; border-top: 3px solid var(--resource-ink); font-weight: 600; }
.pb-sheet.is-statement tfoot td:last-child { font-size: 1.5rem; letter-spacing: -.02em; }

/* Terms and what they mean */
.pb-defs { display: grid; gap: 18px; margin: 0; }
.pb-defs > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 24px; }
.pb-defs dt { font-size: 1.125rem; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.pb-defs dd { margin: 0; line-height: 1.6; }
.pb-defs--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; margin-top: 32px; }
.pb-defs--pair > div { grid-template-columns: minmax(0, 1fr); }

/* Stat row under a chart: numbers set large, no boxes */
.pb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 32px 0 0; }
.pb-stats dt { color: var(--resource-muted); font-size: .875rem; font-weight: 600; }
.pb-stats dd { margin: 4px 0 6px; font-size: clamp(1.5rem, 2.6vw, 1.875rem); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pb-stats span { display: block; color: var(--resource-muted); font-size: .8125rem; line-height: 1.45; }

/* Column chart: bars rise or fall from a zero line */
.pb-cols { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; height: 280px; }
.pb-cols::after { content: ""; position: absolute; left: 0; right: 0; bottom: var(--z); height: 2px; margin-bottom: -1px; background: var(--resource-ink); }
.pb-cols__col { position: relative; height: 100%; }
.pb-cols__bar { position: absolute; left: 0; bottom: var(--z); width: calc(50% - 2px); height: var(--h); background: var(--c); transform-origin: bottom center; }
.pb-cols__bar + .pb-cols__bar { left: auto; right: 0; }
.pb-cols__bar.is-neg { bottom: auto; top: calc(100% - var(--z)); transform-origin: top center; }
.pb-cols__bar b { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); font-size: .8125rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pb-cols__bar.is-neg b { bottom: auto; top: calc(100% + 6px); }
.pb-cols-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; margin-top: 10px; color: var(--resource-muted); font-size: .875rem; text-align: center; }

/* SVG charts */
.pb-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pb-svg.is-narrow { display: none; }
.pb-svg text { font-family: var(--resource-font); fill: var(--resource-muted); font-size: 14px; }
.pb-svg .t-ink { fill: var(--resource-ink); font-weight: 600; }
.pb-svg .t-teal { fill: var(--resource-focus); font-weight: 600; }
.pb-svg .base { stroke: var(--resource-ink); stroke-width: 2; }
.pb-svg .l-teal { fill: none; stroke: var(--resource-teal); stroke-width: 4; stroke-linejoin: round; }
.pb-svg .l-ink { fill: none; stroke: var(--resource-ink); stroke-width: 3; }
.pb-svg .l-grey { fill: none; stroke: var(--resource-quiet); stroke-width: 3; }
.pb-svg .a-mint { fill: var(--resource-mint); opacity: .8; }
.pb-svg .dot { fill: var(--resource-ink); }

/* Timeline: needs and policies over a lifetime */
.pb-life { display: grid; gap: 10px; }
.pb-life__row, .pb-life__axis { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); align-items: center; gap: 4px 16px; }
.pb-life__label { font-size: .9375rem; line-height: 1.35; }
.pb-life__label small { display: block; color: var(--resource-muted); font-size: .8125rem; }
.pb-life__track { position: relative; height: 34px; }
.pb-life__bar { position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); display: flex; align-items: center; padding-inline: 12px; overflow: hidden; background: var(--c); color: var(--tc, var(--resource-ink)); font-size: .8125rem; font-weight: 600; white-space: nowrap; transform-origin: left center; }
.pb-life__bar.is-open { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); }
.pb-life__sep { height: 14px; }
.pb-life__axis { margin-top: 6px; color: var(--resource-muted); font-size: .8125rem; }
.pb-life__axis div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

/* Timing: when, then what happens. Order shown by time, not by counters. */
.pb-steps { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.pb-steps > li { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 4px 24px; }
.pb-steps__when { color: var(--resource-focus); font-size: 1rem; font-weight: 600; line-height: 1.5; }
.pb-steps .pb-steps__t { display: block; font-size: 1.0625rem; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.pb-steps > li.is-plain { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); }
.pb-steps > li.is-plain .pb-steps__t { font-size: 1.125rem; }
.pb-steps p { margin: 2px 0 0; line-height: 1.65; }
.pb-steps > li.is-plain p { margin: 0; }

/* A window in time, drawn to its rough proportions */
.pb-window { display: grid; grid-template-columns: 1fr 1.25fr 1fr; }
.pb-window > div { position: relative; padding: 44px 16px 0 0; }
.pb-window > div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: var(--c, var(--resource-field-deep)); transform-origin: left center; }
.pb-window > div + div::after { content: ""; position: absolute; left: -1px; top: -6px; width: 3px; height: 34px; background: var(--resource-ink); }
.pb-window b { display: block; font-size: 1rem; line-height: 1.3; }
.pb-window span { display: block; margin-top: 6px; color: var(--resource-muted); font-size: .875rem; line-height: 1.5; }

/* Tables: real tables keep their lines */
.pb-table { margin-top: 28px; overflow-x: auto; }
.pb-table:focus-visible { outline: 2px solid var(--resource-focus); outline-offset: 4px; }
.pb-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9375rem; }
.pb-table caption { padding: 0 0 12px; caption-side: top; font-size: 1.125rem; font-weight: 600; text-align: left; letter-spacing: -.01em; }
.pb-table th, .pb-table td { padding: 13px 16px 13px 0; text-align: left; vertical-align: top; line-height: 1.5; }
.pb-table thead th { padding-top: 0; border-bottom: 2px solid var(--resource-ink); color: var(--resource-muted); font-size: .8125rem; font-weight: 600; }
.pb-table tbody tr + tr :is(th, td) { border-top: 1px solid var(--resource-rule); }
.pb-table tbody th { width: 26%; font-weight: 600; }

/* Callouts: a field for a note, ink for a warning */
.pb-note { padding: 20px 24px; background: var(--resource-field); font-size: 1rem; line-height: 1.65; }
.pb-note.is-warn { background: var(--resource-ink); color: var(--resource-white); }
.pb-note b:first-child { display: block; margin-bottom: 2px; }

/* Decision helper: one field, two columns */
.pb-decide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; padding: clamp(22px, 4vw, 32px); background: var(--resource-field); }
.pb-decide h3 { margin: 0 0 10px; font-size: 1.25rem; }
.pb-decide ul { margin: 0; padding-left: 1.1rem; font-size: 1rem; }
.pb-decide li + li { margin-top: 6px; }

/* Calculators */
.pb-calc { margin-top: 40px; background: var(--resource-ink); color: var(--resource-white); }
.pb-calc__head { padding: clamp(22px, 4vw, 32px) clamp(18px, 4vw, 32px) 0; }
.pb-calc__head h3 { margin: 0; color: var(--resource-white); font-size: clamp(1.5rem, 2.6vw, 1.875rem); letter-spacing: -.03em; }
.pb-calc__head p { max-width: 62ch; margin-top: 8px; color: #c8d0d1; font-size: 1rem; line-height: 1.55; }
.pb-calc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; padding: 24px clamp(18px, 4vw, 32px); }
.pb-calc__grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-field { display: grid; gap: 6px; align-content: start; }
.pb-field label, .pb-field legend { color: #e7ecec; font-size: .875rem; font-weight: 600; line-height: 1.35; }
.pb-field small { color: #aab5b6; font-size: .8125rem; line-height: 1.4; }
.pb-input { display: flex; align-items: center; min-height: 48px; background: #22282c; border: 1px solid #3f484c; transition: border-color .2s ease; }
.pb-input:focus-within { border-color: var(--resource-mint); box-shadow: inset 0 0 0 1px var(--resource-mint); }
.pb-input span { padding: 0 0 0 12px; color: #aab5b6; font-size: .9375rem; }
.pb-input span.is-after { padding: 0 12px 0 0; }
.pb-input input, .pb-input select { width: 100%; min-width: 0; height: 46px; padding: 0 12px; border: 0; background: transparent; color: var(--resource-white); font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; }
.pb-input select { appearance: none; cursor: pointer; }
.pb-input select option { color: var(--resource-ink); }
.pb-input input:focus-visible, .pb-input select:focus-visible { outline: none; }
.pb-calc__sub { grid-column: 1 / -1; margin-top: 14px; color: var(--resource-white); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
.pb-calc__sub:first-child { margin-top: 0; }
.pb-calc__out { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; background: #1b2023; }
.pb-calc__out > div { padding: 22px clamp(18px, 4vw, 32px); }
.pb-calc__out dt { color: #c8d0d1; font-size: .875rem; line-height: 1.35; }
.pb-calc__out dd { margin: 8px 0 0; color: var(--resource-white); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.pb-calc__out .is-key { background: var(--resource-teal); }
.pb-calc__out .is-key dt { color: #dff7f0; }
.pb-calc__msg { padding: 0 clamp(18px, 4vw, 32px) 24px; background: #1b2023; color: #c8d0d1; font-size: .9375rem; line-height: 1.6; }
.pb-calc__msg:empty { display: none; }
.pb-calc__msg b { color: var(--resource-white); }
.pb-diff { color: var(--resource-mint); font-weight: 600; }
.pb-diff.is-off { color: #f6b98a; }
.pb-calc table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pb-calc__table { padding: 0 clamp(18px, 4vw, 32px) 20px; overflow-x: auto; }
.pb-calc__table th, .pb-calc__table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid #333b3f; }
.pb-calc__table th { color: #c8d0d1; font-weight: 600; font-size: .8125rem; }
.pb-calc__table td:first-child { color: #e7ecec; }
.pb-calc__table .pb-input { min-height: 42px; }
.pb-calc__table .pb-input input, .pb-calc__table .pb-input select { height: 40px; }

/* FAQ */
.pb-faq { display: grid; gap: 10px; }
.pb-faq details { background: var(--resource-field); }
.pb-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 18px; font-weight: 600; font-size: 1.0625rem; line-height: 1.4; cursor: pointer; list-style: none; }
.pb-faq summary::-webkit-details-marker { display: none; }
.pb-faq summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--resource-teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23086c65' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/16px no-repeat; transition: transform .25s ease; }
.pb-faq details[open] summary::after { transform: rotate(45deg); }
.pb-faq summary:focus-visible { outline: 2px solid var(--resource-focus); outline-offset: 2px; }
.pb-faq details > div { padding: 0 18px 18px; }
.pb-faq details p { line-height: 1.7; }

/* Next step, sources, about */
.pb-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 56px; padding: clamp(22px, 4vw, 32px); background: var(--resource-teal); color: var(--resource-white); }
.pb-next h2 { margin: 0; color: var(--resource-white); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.pb-next p { margin-top: 8px; color: #dff7f0; line-height: 1.6; }
.pb-next a { display: inline-flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 8px 8px 22px; border-radius: 50px; background: var(--resource-white); color: var(--resource-ink); font-weight: 600; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background-color .2s ease; }
.pb-next a:hover { background: var(--resource-mint); }
.pb-next a span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--resource-mint); }
.pb-next a svg { width: 18px; height: 18px; }
.pb-sources { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--resource-rule); }
.pb-sources h2 { margin: 0; font-size: 1.375rem; }
.pb-sources ol { margin: 12px 0 0; padding-left: 1.3rem; font-size: .9375rem; }
.pb-sources li + li { margin-top: 6px; }
.pb-sources li { line-height: 1.55; }
.pb-sources a { color: var(--resource-focus); text-underline-offset: .18em; }
.pb-about { margin-top: 24px; padding: 20px 24px; background: var(--resource-field); font-size: .875rem; line-height: 1.6; color: var(--resource-muted); }
.pb-about b { color: var(--resource-ink); }

/* Related */
.pb-related { margin-top: clamp(56px, 7vw, 88px); padding-top: 32px; border-top: 1px solid var(--resource-rule); }
.pb-related h2 { font-size: clamp(1.75rem, 3vw, 2.375rem); }
.pb-related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.pb-related a { display: grid; gap: 10px; height: 100%; padding: 20px; background: var(--resource-field); text-decoration: none; transition: background-color .2s ease, transform .2s ease; }
.pb-related a:hover { background: var(--resource-field-deep); transform: translateY(-2px); }
.pb-related span { color: var(--resource-focus); font-size: .8125rem; font-weight: 600; }
.pb-related b { font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }
.pb-related p { color: var(--resource-muted); font-size: .875rem; line-height: 1.5; }


/* Motion: only when JS is present, and only when the reader allows it */
@media (prefers-reduced-motion: no-preference) {
  .js .pb-anim :is(.pb-bars__bar, .pb-life__bar, .pb-bill__bar) { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js .pb-anim:not(.in) :is(.pb-bars__bar, .pb-life__bar, .pb-bill__bar) { transform: scaleX(0); }
  .js .pb-anim .pb-window > div::before { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .pb-anim:not(.in) .pb-window > div::before { transform: scaleX(0); }
  .js .pb-anim .pb-cols__bar { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js .pb-anim:not(.in) .pb-cols__bar { transform: scaleY(0); }
  .js .pb-anim .pb-fig__lead { transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js .pb-anim:not(.in) .pb-fig__lead { opacity: 0; transform: translateY(16px); }
  .js .pb-anim :is(.pb-bars li, .pb-life__row, .pb-window > div, .pb-cols__col, .pb-bill tbody tr):nth-child(2) * { transition-delay: .08s; }
  .js .pb-anim :is(.pb-bars li, .pb-life__row, .pb-window > div, .pb-cols__col, .pb-bill tbody tr):nth-child(3) * { transition-delay: .16s; }
  .js .pb-anim :is(.pb-bars li, .pb-life__row, .pb-window > div, .pb-cols__col, .pb-bill tbody tr):nth-child(4) * { transition-delay: .24s; }
  .js .pb-anim :is(.pb-bars li, .pb-life__row, .pb-window > div, .pb-cols__col, .pb-bill tbody tr):nth-child(n+5) * { transition-delay: .32s; }
  .js .pb-anim .pb-window > div:nth-child(2)::before { transition-delay: .4s; }
  .js .pb-anim .pb-window > div:nth-child(3)::before { transition-delay: .8s; }
  .js .pb-anim .draw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.3, .6, .2, 1); }
  .js .pb-anim:not(.in) .draw { stroke-dashoffset: 1; }
  .js .pb-anim .fade { transition: opacity .6s ease .9s; }
  .js .pb-anim:not(.in) .fade { opacity: 0; }
}

@media (max-width: 1023px) {
  .pb-body { grid-template-columns: minmax(0, 1fr); }
  .pb-aside { display: none; }
  .pb-toc-mobile { display: block; padding: 4px 20px; background: var(--resource-field); }
  .pb-toc-mobile summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
  .pb-toc-mobile ol { margin: 0 0 14px; padding-left: 1.2rem; }
  .pb-toc-mobile li + li { margin-top: 6px; }
  .pb-toc-mobile a { color: var(--resource-focus); text-underline-offset: .18em; }
  .pb-related ul { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .pb-head { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 28px; }
  .pb-head h1 { font-size: clamp(2.25rem, 10vw, 3rem); }
  .pb-head__dek { font-size: 1.0625rem; }
  .pb-cover img { aspect-ratio: 3 / 2; }
  .pb-body { padding-top: 32px; }
  .pb-copy { font-size: 1rem; }
  .pb-copy h2 { margin-top: 44px; }
  .pb-bars li, .pb-axis, .pb-refhead { grid-template-columns: minmax(0, 1fr) auto; }
  .pb-bars__label { grid-column: 1 / -1; }
  .pb-axis > :first-child, .pb-refhead > :first-child { display: none; }
  .pb-life__row, .pb-life__axis { grid-template-columns: minmax(0, 1fr); }
  .pb-life__axis > :first-child { display: none; }
  .pb-life__sep { height: 6px; }
  .pb-window { grid-template-columns: minmax(0, 1fr); }
  .pb-window > div { padding: 0 0 22px 36px; }
  .pb-window > div::before { left: 0; right: auto; top: 0; bottom: 0; width: 18px; height: auto; transform-origin: top center; }
  .pb-window > div + div::after { left: -6px; top: -1px; width: 30px; height: 3px; }
  .pb-steps > li, .pb-steps > li.is-plain, .pb-defs > div { grid-template-columns: minmax(0, 1fr); }
  .pb-defs--pair, .pb-decide { grid-template-columns: minmax(0, 1fr); }
  .pb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .pb-svg.is-wide { display: none; }
  .pb-svg.is-narrow { display: block; }
  .pb-cols { height: 220px; gap: 8px; }
  .pb-cols-x { gap: 8px; font-size: .8125rem; }
  .pb-cols__bar b { font-size: .6875rem; }
  .pb-bill td:last-child, .pb-bill thead th:last-child { display: none; }
  .pb-sheet thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pb-sheet, .pb-sheet tbody, .pb-sheet tfoot { display: block; }
  .pb-sheet tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; }
  .pb-sheet tbody tr + tr { border-top: 1px solid var(--resource-field-deep); }
  .pb-sheet tfoot tr { border-top: 3px solid var(--resource-ink); }
  .pb-sheet tr > * { width: auto !important; padding: 0 !important; border: 0 !important; }
  .pb-sheet td:nth-child(2) { text-align: right; }
  .pb-sheet td:last-child { grid-column: 1 / -1; }
  .pb-sheet.is-statement td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .pb-sheet.is-statement td:last-child { grid-column: 2; grid-row: 1; }
  .pb-calc__grid, .pb-calc__grid.is-3 { grid-template-columns: minmax(0, 1fr); }
  .pb-next { grid-template-columns: minmax(0, 1fr); }
  .pb-next a { justify-self: start; white-space: normal; max-width: 100%; letter-spacing: .04em; line-height: 1.3; }
  .pb-next a span { flex: none; }
  .pb-calc__table { padding-inline: 14px; }
  .pb-calc__table table, .pb-calc__table tbody { display: block; }
  .pb-calc__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pb-calc__table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid #333b3f; }
  .pb-calc__table td { padding: 0; border: 0; }
  .pb-calc__table td:first-child { grid-column: 1 / -1; font-size: .875rem; font-weight: 600; }
  .pb-calc__table td:nth-child(2)::before, .pb-calc__table td:nth-child(3)::before { display: block; margin-bottom: 4px; color: #aab5b6; font-size: .75rem; font-weight: 600; }
  .pb-calc__table td:nth-child(2)::before { content: "Quote A"; }
  .pb-calc__table td:nth-child(3)::before { content: "Quote B"; }
  .pb-calc__table .pb-input select { font-size: .875rem; padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .pb-toc a, .pb-related a, .pb-next a, .pb-aside__cta a, .pb-faq summary::after, .pb-input { transition: none; }
  .pb-related a:hover { transform: none; }
}

@media print {
  .pb-header, .pb-footer, .pb-aside, .pb-toc-mobile, .pb-next, .pb-related { display: none !important; }
  .pb-body { display: block; }
  .pb-calc { background: #fff; color: #000; border: 1px solid #999; }
}

/* Rounded corners: panels, inputs and the marks inside charts */
:is(.pb-fig, .pb-takeaways, .pb-note, .pb-decide, .pb-calc, .pb-faq details, .pb-about, .pb-related a, .pb-next, .pb-toc-mobile, .pb-aside__cta) { border-radius: var(--resource-round); }
.pb-calc { overflow: hidden; }
.pb-faq summary:focus-visible { border-radius: var(--resource-round); }
.pb-table:focus-visible { border-radius: var(--resource-round-sm); }
.pb-input { border-radius: var(--resource-round-sm); }
.pb-input:focus-within { box-shadow: 0 0 0 1px var(--resource-mint); }
.pb-bars__bar { border-radius: var(--resource-round-xs); }
.pb-bars__bar.is-cut { border-radius: var(--resource-round-xs) 0 0 var(--resource-round-xs); }
.pb-life__bar { border-radius: 8px; }
.pb-life__bar.is-open { border-radius: 8px 0 0 8px; }
.pb-window > div:first-child::before { border-radius: 11px 0 0 11px; }
.pb-window > div:last-child::before { border-radius: 0 11px 11px 0; }
.pb-cols__bar { border-radius: var(--resource-round-xs) var(--resource-round-xs) 0 0; }
.pb-cols__bar.is-neg { border-radius: 0 0 var(--resource-round-xs) var(--resource-round-xs); }
.pb-cols__bar.is-zero { border-radius: 0; }
.pb-bill__bar { border-radius: 999px; }
.pb-legend i { border-radius: 4px; }
.pb-takeaways li::before { border-radius: 50%; }
.pb-check li::before { border-radius: 5px; }
.pb-svg :is(.l-teal, .l-ink, .l-grey, .base) { stroke-linecap: round; }

/* Phones: more room around and inside every figure */
@media (max-width: 767px) {
  .pb-fig, .pb-calc { margin-top: 48px; }
  .pb-fig { padding: 30px 22px 28px; border-radius: 18px; }
  .pb-takeaways, .pb-decide { padding: 26px 22px; border-radius: 18px; }
  .pb-fig__sub { margin-top: 10px; }
  .pb-fig__lead { margin-top: 30px; gap: 10px 16px; }
  .pb-fig__lead span { max-width: none; }
  .pb-fig__body { margin-top: 36px; }
  .pb-fig figcaption { margin-top: 32px; line-height: 1.6; }
  .pb-legend { gap: 12px 22px; margin-top: 28px; }
  .pb-bars { gap: 22px; }
  .pb-bars li { gap: 8px 16px; }
  .pb-refhead { margin-bottom: 10px; }
  .pb-axis { margin-top: 14px; }
  .pb-life { gap: 20px; }
  .pb-life__row { gap: 8px; }
  .pb-life__sep { height: 10px; }
  .pb-life__axis { margin-top: 10px; }
  .pb-steps { gap: 30px; }
  .pb-steps > li { gap: 6px; }
  .pb-window > div { padding-bottom: 30px; }
  .pb-window span { margin-top: 8px; }
  .pb-stats { gap: 30px 20px; margin-top: 40px; }
  .pb-stats dd { margin: 6px 0 8px; }
  .pb-cols { height: 240px; gap: 10px; }
  .pb-cols-x { gap: 10px; margin-top: 14px; }
  .pb-svg { margin-block: 8px; }
  .pb-bill tbody th, .pb-bill tbody td { padding-block: 18px; }
  .pb-bill__bar { margin-top: 12px; }
  .pb-sheet tr { padding: 18px 0; gap: 6px 16px; }
  .pb-defs { gap: 24px; }
  .pb-defs > div { gap: 6px; }
  .pb-defs--pair { gap: 28px; margin-top: 36px; }
  .pb-calc__grid { gap: 20px; }
  .pb-calc__out > div { padding-block: 24px; }
  .pb-window > div:first-child::before { border-radius: 11px 11px 0 0; }
  .pb-window > div:last-child::before { border-radius: 0 0 11px 11px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  .js .pb-anim:not(.in) .pb-window > div::before { transform: scaleY(0); }
}

/* Country edition: says which country a guide covers, with a link to the other edition */
.pb-edition {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  max-width: 60ch; margin: 0 0 20px; padding: 12px 16px;
  border-radius: var(--resource-round-sm); background: var(--resource-field);
  font-size: .9375rem; line-height: 1.5; color: var(--resource-ink);
}
.pb-edition__tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.pb-edition__tag b {
  display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px;
  border-radius: var(--resource-round-xs); background: var(--resource-ink); color: #fff;
  font-size: .6875rem; letter-spacing: .05em;
}
.pb-edition__text { color: var(--resource-muted); }
.pb-edition__text a { color: var(--resource-ink); font-weight: 600; text-underline-offset: .18em; white-space: nowrap; }
@media (max-width: 767px) { .pb-edition { padding: 12px 14px; font-size: .875rem; } }

/* Inline links in the next-step text stay plain links, not pill buttons */
.pb-copy .pb-next p a, .pb-next p a { display: inline; min-height: 0; padding: 0; border-radius: 0; background: none; color: inherit; font-weight: 600; font-size: inherit; letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; white-space: normal; line-height: inherit; }
.pb-next p a:hover { background: none; text-decoration-thickness: 2px; }
