/* EconoMonitor data pages, design system v2 (docs/design-system.md; reference wp/preview/bank-v2.html).
   Tokens come from the theme (assets/base.css); fallbacks keep the page readable without it. */
.em-page { --ink: var(--em-ink, #0F172A); --cobalt: var(--em-cobalt, #1E3A8A); --cobalt-9: var(--em-cobalt-9, #13255E);
  --aub: var(--em-aub, #581C87); --amber: var(--em-amber, #B45309); --slate: var(--em-slate, #475569);
  --rule: var(--em-rule, #E2E8F0); --mist: var(--em-mist, #F3F5F9);
  --serif: var(--em-serif, "Source Serif 4", Georgia, serif); --sans: var(--em-sans, "IBM Plex Sans", system-ui, Arial, sans-serif);
  margin-block-start: 0 !important; color: var(--ink); font: 400 17px/1.6 var(--sans); font-variant-numeric: tabular-nums lining-nums; }
.em-page *, .em-page *::before, .em-page *::after { box-sizing: border-box; }
.em-page a { color: var(--cobalt); text-decoration: none; }
.em-page a:hover { text-decoration: underline; }
.em-w { width: 100%; max-width: var(--em-max, 1760px); margin: 0 auto; padding: 0 var(--em-pad, clamp(16px, 3vw, 48px)); }

/* 12-column grid (Layout v2.1): prose 8 + sidebar 4, lead 8 + key figures 4, panels 12 or 6 + 6 */
.em-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 24px; align-items: start; }
.em-c8 { grid-column: span 8; min-width: 0; }
.em-c4 { grid-column: span 4; min-width: 0; }
.em-c6 { grid-column: span 6; min-width: 0; }
.em-c12 { grid-column: 1 / -1; min-width: 0; }
.em-leadrow { margin: 36px 0 28px; }
.em-leadrow .em-lead { margin: 0 !important; }
.em-box { border: 1px solid var(--rule); border-radius: 10px; padding: 20px 22px; background: #fff; margin: 0 0 20px; }
.em-box:last-child { margin-bottom: 0; }
.em-box-h { font: 600 15px var(--sans); margin: 0 0 10px; color: var(--ink); }
.em-box p { font-size: 15px; margin: 0 0 8px; }
.em-facts { margin: 0; }
.em-fact { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.em-fact:last-child { border-bottom: 0; padding-bottom: 0; }
.em-fact dt { font-size: 14px; color: var(--slate); }
.em-fact dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.em-fact dd .em-fs { display: block; font-size: 12.5px; font-weight: 400; color: var(--slate); white-space: normal; }
.em-side-links { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.em-side-links li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.em-side-links li:last-child { border-bottom: 0; }
.em-side-links .em-muted { display: block; font-size: 13px; }
.em-side .em-photo { margin-bottom: 20px; }
.em-page p { margin: 0 0 16px; }

/* Masthead: the one dark band */
.em-mast { background: var(--cobalt-9); color: #fff; padding: 36px 0 40px; }
.em-mast-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; row-gap: 24px; align-items: end; min-height: 230px; }
.em-mast-in > div { grid-column: span 8; }
.em-mast-in > .em-ver { grid-column: span 4; }
.em-crumb { font-size: 14px; color: #B9C6EC; margin: 0 0 18px; }
.em-crumb a, .em-page .em-crumb a { color: #DCE3F7; }
.em-mast h1 { font: 600 clamp(2.75rem, 3.6vw, 3.375rem)/1.08 var(--serif); margin: 0 0 14px; letter-spacing: -.01em; color: #fff; }
.em-sub { font-size: 17px; color: #DCE3F7; margin: 0; max-width: 60ch; }
.em-mast .em-notice { margin-top: 14px; font-size: 15px; color: #fff; border-left: 3px solid var(--amber); padding: 4px 0 4px 12px; max-width: 60ch; }
.em-ver { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 16px 18px; font-size: 14px; }
.em-ver-h { font: 600 15px var(--sans); margin: 0 0 10px; color: #fff; }
.em-ver dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; }
.em-ver dt { color: #B9C6EC; }
.em-ver dd { margin: 0; color: #fff; }
.em-ok::before, .em-warn::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.em-ok::before { background: #8EE0B5; } /* the only green on the site: the status dot */
.em-warn::before { background: #F0B46A; }

/* Lead and KPI strip */
.em-lead { font: 400 1.25rem/1.6 var(--serif); max-width: 72ch; margin: 36px 0 28px !important; }
.em-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.em-strip.em-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.em-strip.em-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.em-strip.em-n1 { grid-template-columns: minmax(0, 1fr); }
.em-tile { padding: 20px 22px; border-left: 1px solid var(--rule); min-width: 0; }
.em-tile:first-child { border-left: 0; }
.em-tlab { font-size: 14px; font-weight: 600; color: var(--slate); }
.em-tv { font: 600 2rem/1.15 var(--serif); margin: 6px 0 2px; overflow-wrap: anywhere; }
.em-tc { font-size: 14px; color: var(--slate); margin: 0 0 10px; }
.em-tn { font-size: 13px; color: var(--amber); margin-top: 6px; }
.em-page .spark { width: 100%; height: 38px; display: block; margin-bottom: 12px; }
.em-track { position: relative; height: 6px; background: var(--mist); border-radius: 3px; border: 1px solid var(--rule); }
.em-track span { position: absolute; top: -4px; width: 4px; height: 12px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); }
.em-rk { font-size: 13.5px; margin: 7px 0 0; font-weight: 500; }
.em-rk > span:last-child { color: var(--slate); font-weight: 400; margin-left: 4px; }

/* Sticky section nav */
.em-snav { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--rule); margin-top: 48px; }
.em-snav .em-w { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.em-snav a { color: var(--slate) !important; font-size: 15px; font-weight: 500; padding: 14px 12px; white-space: nowrap; border-bottom: 2px solid transparent; }
.em-snav a:first-child { color: var(--ink) !important; border-color: var(--cobalt); }
.em-snav a:hover { text-decoration: none !important; color: var(--ink) !important; }
.admin-bar .em-snav { top: 32px; }

/* Sections */
.em-page section { padding: 56px 0 0; scroll-margin-top: 56px; }
.em-page h2.em-s { font: 600 1.75rem/1.2 var(--serif); margin: 0 0 6px; }
.em-sd { color: var(--slate); margin: 0 0 22px !important; max-width: 70ch; }
.em-prose p { max-width: 72ch; }
.em-page h3 { font: 600 1.15rem/1.3 var(--sans); margin: 28px 0 8px; }
.em-prose > h2 + h3 { margin-top: 18px; }
.em-page figure { margin: 0; }
.em-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; display: block; background: var(--mist); }
.em-photo.em-mono img { object-fit: contain; padding: 18%; border: 1px solid var(--rule); }
.em-photo figcaption { font-size: 13px; color: var(--slate); margin-top: 10px; line-height: 1.5; }

/* Panels and charts */
.em-panel { border: 1px solid var(--rule); border-radius: 10px; padding: 24px; background: #fff; min-width: 0; }
.em-row + .em-panel, .em-row + .em-grid2, .em-panel + .em-grid2, .em-tw + .em-row { margin-top: 24px; }
.em-panel h3 { font: 600 1.1rem var(--sans); margin: 0 0 2px; }
.em-u { font-size: 14px; color: var(--slate); margin: 0 0 8px; }
.em-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.em-prose + .em-grid2, .em-prose + .em-panel, .em-row + .em-tw { margin-top: 24px; }
.em-page .chart { width: 100%; height: auto; display: block; }
.em-page .chart .g { stroke: var(--rule); }
.em-page .chart .z { stroke: var(--slate); stroke-width: 1; }
.em-page .chart .ax { font: 12.5px var(--sans); fill: var(--slate); }
.em-page .chart .ev { stroke: var(--amber); stroke-dasharray: 3 4; stroke-width: 1.2; }
.em-page .chart .evl { font: 500 12.5px var(--sans); fill: var(--amber); }
.em-page .chart .el { font: 600 13px var(--sans); }
.em-page .chart .ev2 { font: 500 13px var(--sans); }
.em-page .chart-s, .em-page .chart-key { display: none; }
.chart-key { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13.5px; }
.chart-key li { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.chart-key li span { color: var(--slate); }
.em-panel .em-src, .em-page .em-src { font-size: 13px; color: var(--slate); margin: 10px 0 0; }

/* Tables: rounded bordered frame, scroll inside it */
.em-tw { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; -webkit-overflow-scrolling: touch; background: #fff; }
.em-tw.em-flat { border: 0; border-radius: 0; }
.em-page table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0; }
.em-page th, .em-page td { padding: 11px 16px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; line-height: 1.45; height: 44px; }
.em-page td { white-space: nowrap; } /* dates and numbers never wrap; the table scrolls inside its frame */
.em-page tbody th { min-width: 13em; }
.em-page abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--slate); cursor: help; }
.em-page thead th { background: var(--mist); font-size: 13.5px; font-weight: 600; color: var(--slate); white-space: nowrap; }
.em-page tbody th { font-weight: 500; }
.em-page tbody tr:last-child > * { border-bottom: 0; }
.em-page .n { text-align: right; white-space: nowrap; }
.em-page tr.em-me > * { background: #F2F5FD; }
.em-page td.em-bar { width: 30%; padding-right: 0; vertical-align: middle; }
.em-page td.em-bar span { display: block; height: 8px; background: #C9D4F2; border-radius: 2px; }
.em-page tr.em-me td.em-bar span { background: var(--cobalt); }
.em-muted { color: var(--slate); }
.em-up::before { content: "\25B2\00A0"; color: var(--cobalt); font-size: .8em; }
.em-down::before { content: "\25BC\00A0"; color: var(--amber); font-size: .8em; }

/* Timeline, identifiers, FAQ, lists */
.em-tl { list-style: none; padding: 0; margin: 0 0 8px; border-left: 2px solid var(--rule); }
.em-tl li { position: relative; padding: 0 0 22px 22px; max-width: 70ch; }
.em-tl li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--amber); }
.em-tl time { font-weight: 600; }
.em-ids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 10px; margin: 0; overflow: hidden; }
.em-ids div { padding: 14px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0 -1px -1px 0; min-width: 0; }
.em-ids dt { font-size: 13.5px; color: var(--slate); }
.em-ids dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.em-faqs { margin-top: 12px; }
.em-faq { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.em-faq summary { font-weight: 600; cursor: pointer; }
.em-faq p { margin: 8px 0 0 !important; max-width: 68ch; }
.em-defs, .em-notes { padding-left: 20px; max-width: 70ch; }
.em-defs li, .em-notes li { margin-bottom: 6px; }
.em-links { columns: 2 260px; padding-left: 20px; }
.em-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; font-size: 14px; }
.em-pager a, .em-pager span { border: 1px solid var(--rule); padding: 5px 10px; border-radius: 6px; background: #fff; }
.em-pager span[aria-current] { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.em-disclaimer { margin-top: 32px !important; }

@media (max-width: 980px) {
  .em-row, .em-mast-in { grid-template-columns: minmax(0, 1fr); } /* one column: no 11 column gaps to fit */
  .em-c8, .em-c4, .em-c6 { grid-column: 1 / -1; }
  .em-mast-in > div, .em-mast-in > .em-ver { grid-column: 1 / -1; }
  .em-mast-in { min-height: 0; }
  .em-strip, .em-strip.em-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-tile:nth-child(3) { border-left: 0; }
  .em-tile:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .em-grid2 { grid-template-columns: minmax(0, 1fr); }
  .em-ids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-photo { max-width: 480px; }
}
@media (max-width: 560px) {
  .em-w { padding: 0 16px; }
  .em-strip, .em-strip.em-n3, .em-strip.em-n2 { grid-template-columns: minmax(0, 1fr); }
  .em-tile { border-left: 0; border-top: 1px solid var(--rule); }
  .em-tile:first-child { border-top: 0; }
  .em-ids { grid-template-columns: minmax(0, 1fr); }
  .em-photo img { aspect-ratio: 16 / 10; }
  .em-page td.em-bar { display: none; }
  .em-panel { padding: 16px 14px 12px; }
  .em-page .chart-l { display: none; }
  .em-page .chart-s { display: block; }
  .em-page .chart-key { display: block; }
  .em-page .chart .ax { font-size: 12px; }
  .em-page th, .em-page td { padding: 9px 12px; }
  .em-lead { font-size: 1.15rem; }
  .em-mast { padding: 28px 0 32px; }
}
.em-gap { margin-top: 24px; }
.em-box .em-tight th, .em-box .em-tight td { padding: 8px 0; height: auto; }
.em-box .em-tight td { text-align: right; padding-left: 12px; }
.em-box .em-tight tbody th { min-width: 0; font-weight: 400; font-size: 14px; white-space: normal; }
.em-box .em-photo, .em-side .em-photo { margin: 0 0 20px; }
.em-fact dd, .em-fact dd .em-num, .em-fact dd a { font-size: 15px; }
.em-fact dt a { font-weight: 400; }
.em-changed { margin: 22px 0 0; border-left: 3px solid var(--amber); padding: 4px 0 4px 16px; }
.em-changed-h { font: 600 15px var(--sans); margin: 0 0 6px; }
.em-changed ul { margin: 0; padding-left: 18px; font-size: 15.5px; }
.em-changed li { margin: 3px 0; }
