:root {
  --brand-navy: #1B3A6B;
  --brand-blue: #2D5293;
  --color-page-bg: #F4F2EC;
  --color-card-bg: #FFFDF9;
  --color-card-bg-soft: #F8F6F0;
  --color-text-primary: #14181F;
  --color-text-secondary: #4C5562;
  --color-text-tertiary: #666D7A;
  --color-border: rgba(60,45,20,0.12);
  --color-warning-bg: #FAEEDA;
  --color-warning-text: #7A4A10;
  --link: var(--brand-blue);
  --tag-monitor: #2D5293;
  --tag-longform: #0F6E56;
  --rule-strong: #1B3A6B;
  --spark: #2D5293;
  --shadow: 0 1px 2px rgba(60,45,20,0.04), 0 6px 20px -10px rgba(60,45,20,0.12);
  --shadow-raised: 0 2px 4px rgba(60,45,20,0.05), 0 14px 30px -12px rgba(60,45,20,0.18);
  --radius: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-page-bg: #0E1218;
    --color-card-bg: #161B24;
    --color-card-bg-soft: #1A1F29;
    --color-text-primary: #ECEDEF;
    --color-text-secondary: #A6ADBA;
    --color-text-tertiary: #8A92A0;
    --color-border: rgba(255,255,255,0.12);
    --color-warning-bg: #4B2D0A;
    --color-warning-text: #F5C98A;
    --link: #8FB3E8;
    --tag-monitor: #8FB3E8;
    --tag-longform: #5DCAA5;
    --rule-strong: #8FB3E8;
    --spark: #8FB3E8;
    --shadow: none;
    --shadow-raised: 0 0 0 1px rgba(255,255,255,0.18);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-page-bg); color: var(--color-text-primary); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
p, li, dd, figcaption { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* avoid a single word alone on the last line */

/* Page frame: wide on desktop; text keeps a comfortable line length inside it */
.wrap { max-width: var(--tl-page-max); margin: 0 auto; padding: 44px var(--tl-gutter) 8px; }
.page-intro { max-width: 760px; margin-bottom: 28px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--link); margin: 0 0 10px; }
h1 { font-family: var(--font-serif); font-size: 40px; line-height: 1.18; font-weight: 700; margin: 0 0 14px; text-wrap: balance; }
.standfirst { font-size: 19px; line-height: 1.55; color: var(--color-text-secondary); margin: 0; text-wrap: pretty; }
.meta { font-size: 14px; color: var(--color-text-tertiary); margin: 14px 0 0; }
.draft-banner { background: var(--color-warning-bg); color: var(--color-warning-text); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 24px; }

/* Text column with a side panel of tools (contents, download, share, cite) */
.layout { display: grid; grid-template-columns: minmax(0, 700px) minmax(260px, 320px); justify-content: space-between; gap: 32px 64px; align-items: start; }
.rail { position: sticky; top: 100px; display: grid; gap: 16px; }   /* clears the sticky header */
.panel { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.panel p { margin: 0; font-size: 14px; color: var(--color-text-secondary); }
.panel .panel-title { font-size: 15px; font-weight: 600; color: var(--color-text-primary); margin: 0 0 8px; }
.panel .btn { margin-top: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 4px 0; font-size: 14px; color: var(--color-text-secondary); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }

/* Long-form text */
.prose { font-size: 17px; line-height: 1.7; }
.prose p { margin: 0 0 18px; text-wrap: pretty; }
.prose h2 { font-family: var(--font-serif); font-size: 24px; line-height: 1.3; margin: 36px 0 12px; text-wrap: balance; scroll-margin-top: 100px; }
.prose > h2:first-child { margin-top: 0; }
figure { margin: 28px 0; }
figure img { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--color-border); background: #FFFFFF; }
figcaption { font-size: 14px; color: var(--color-text-tertiary); margin-top: 8px; }
.source { font-size: 14px; color: var(--color-text-tertiary); margin: 20px 0 0; }

.btn { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 21px; background: var(--brand-blue); color: #FFFFFF; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 0.15s; }
.btn:hover { background: var(--brand-navy); }
.btn-quiet { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-quiet:hover { background: rgba(45,82,147,0.08); }
.cta { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; margin: 48px 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.cta-text { flex: 1 1 320px; }
.cta-title { font-size: 17px; font-weight: 600; margin: 0 0 2px; }
.cta-sub { font-size: 15px; color: var(--color-text-secondary); margin: 0; }

/* Cards whose title is their only link: the whole card is the target */
.hub-item, .latest-card { position: relative; background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow 0.15s, transform 0.15s; }
.hub-item:hover, .latest-card:hover { box-shadow: var(--shadow-raised); transform: translateY(-1px); }
.card-link { color: var(--color-text-primary); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hub-item:hover .card-link, .latest-card:hover .card-link { color: var(--link); }
.card-link:focus-visible { outline: none; }
.hub-item:focus-within, .latest-card:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.hub-type { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--tag); margin: 0 0 8px; }
.hub-type::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tag); }
[data-type="monitor"] { --tag: var(--tag-monitor); }
[data-type="longform"] { --tag: var(--tag-longform); }

/* Analysis hub */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filter { font: inherit; font-size: 14px; font-weight: 600; color: var(--color-text-secondary); background: transparent; border: 1px solid var(--color-border); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--brand-navy); border-color: var(--brand-navy); color: #FFFFFF; }
.hub-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 18px; }
.hub-item { padding: 22px 24px; }
.hub-item h2 { font-family: var(--font-serif); font-size: 23px; line-height: 1.3; margin: 0 0 10px; text-wrap: balance; }
.hub-summary { margin: 0 0 10px; color: var(--color-text-secondary); font-size: 15.5px; }
.hub-foot { margin: 0; font-size: 14px; color: var(--color-text-tertiary); }

/* Homepage */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 72px; align-items: center; padding: 8px 0 12px; }
.home-hero h1 { font-size: 46px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.reading { padding: 26px 28px; }
.reading .reading-kicker { font-size: 14px; font-weight: 600; color: var(--link); margin-bottom: 14px; }
.reading .reading-label { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.reading .reading-value { font-size: 56px; line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; color: var(--color-text-primary); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.reading-status { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--tag-monitor); vertical-align: middle; margin-left: 6px; }
.reading .reading-context { font-size: 13.5px; color: var(--color-text-tertiary); margin-top: 8px; }
.reading-link { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 600; }
.promise-strip { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--color-border); }
.promise-heading { font-family: var(--font-serif); font-size: 22px; line-height: 1.3; margin: 0 0 18px; }
.promise { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px 40px; }
.promise li { padding-left: 34px; position: relative; }
.promise li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--rule-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.promise p { margin: 0; font-size: 15px; color: var(--color-text-secondary); }
.promise .promise-title { font-size: 16px; font-weight: 600; color: var(--color-text-primary); }
.home-section { margin-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; border-bottom: 1px solid var(--color-border); padding-bottom: 10px; margin-bottom: 20px; }
.section-head h2 { font-family: var(--font-serif); font-size: 28px; line-height: 1.25; margin: 0; }
.section-head a { font-weight: 600; font-size: 15px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; }
.product-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px 48px; }
.product-card-plain { grid-template-columns: minmax(0, 1fr); }
.product-card-plain .product-main { max-width: 760px; }
.product-card h3 { font-family: var(--font-serif); font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.product-card h3 a { color: inherit; text-decoration: none; }
.product-card h3 a:hover { color: var(--link); }
.product-card p { margin: 0; color: var(--color-text-secondary); font-size: 16px; }
.stat { display: grid; gap: 2px; }
.stat-value { font-size: 44px; line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; font-weight: 600; }
.stat-status { font-size: 14px; font-weight: 600; color: var(--tag-monitor); }
.stat-context { font-size: 14px; color: var(--color-text-tertiary); }
.spark { display: block; width: 100%; height: auto; aspect-ratio: 300 / 64; margin-top: 10px; overflow: visible; }
.spark-line { fill: none; stroke: var(--spark); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--spark); }
.spark-axis { font-size: 11px; fill: var(--color-text-tertiary); }
.product-links { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.product-links a:not(.btn) { font-weight: 600; font-size: 15px; }
.products-more { margin: 22px 0 0; color: var(--color-text-secondary); }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.latest-card { padding: 20px 22px; }
.latest-card h3 { font-family: var(--font-serif); font-size: 20px; line-height: 1.35; margin: 0 0 10px; }
.latest-date { margin: 0; font-size: 14px; color: var(--color-text-tertiary); }
.services { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px 28px; }
.services li { border-top: 2px solid var(--rule-strong); padding-top: 12px; font-weight: 600; }
.about { margin: 24px 0 0; color: var(--color-text-secondary); max-width: 760px; }

/* Data page */
.dl-facts { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; line-height: 1.6; color: var(--color-text-secondary); }
.columns { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; font-size: 15px; line-height: 1.55; }
.columns dt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; }
.columns dd { margin: 0; color: var(--color-text-secondary); }
.cite { margin: 0; background: var(--color-card-bg-soft); border: 1px solid var(--color-border); border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }

/* Share links */
.share { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.share a, .share button { font: inherit; font-size: 15px; font-weight: 600; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.share a:hover, .share button:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .hub-item, .latest-card, .btn { transition: none; }
  .hub-item:hover, .latest-card:hover { transform: none; }
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  /* One column: the intro, then any .rail-top panel (the download), then the text, then the other panels */
  .layout > .main, .rail { display: contents; }
  .layout .page-intro { order: -2; }
  .layout > .main > .page-intro { margin-bottom: 0; }
  .rail > * { order: 1; }
  .rail > .rail-top { order: -1; }
  .toc { display: none; }
  .home-hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding-top: 28px; }
  h1, .home-hero h1 { font-size: 30px; }
  .standfirst { font-size: 17px; }
  .reading { padding: 22px; }
  .reading .reading-value { font-size: 46px; }
  .promise-strip { margin-top: 36px; }
  .prose { font-size: 16.5px; }
  .home-section { margin-top: 44px; }
  .section-head h2 { font-size: 24px; }
  .product-card { grid-template-columns: 1fr; padding: 22px; }
  .product-links .btn { flex: 1 1 100%; justify-content: center; }
  .columns { grid-template-columns: 1fr; gap: 2px; }
  .columns dd { margin-bottom: 10px; }
}
