/* Research brief pages. Shares design-tokens.css with the portfolio; main.css and extend.css are not loaded here. */
:root {
  --ink: var(--color-primary);
  --paper: #ffffff;
  --panel: var(--color-surface);
  --muted: var(--color-muted);
  --accent: var(--color-accent);
  --rule: #d6dcd0;
  --track: #e4e9dd;
  --on-dark: #c9d1c1;
  --measure: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01";
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 16px; top: 12px; }

/* Masthead */
.masthead { background: var(--ink); color: #fff; padding: 0 16px 56px; }
.masthead-bar {
  max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 18px 0; border-bottom: 1px solid #ffffff26; font-size: 12px; letter-spacing: .06em;
}
.masthead-bar a { text-decoration: none; }
.masthead-bar a:hover { text-decoration: underline; }
.wordmark { font-weight: 800; }
.masthead-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.masthead-inner { max-width: 1080px; margin: 0 auto; padding-top: 64px; }
.kicker { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; margin: 0 0 22px; }
.masthead h1 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(46px, 9vw, 112px);
  line-height: .95; letter-spacing: -.045em; margin: 0; max-width: 11ch;
}
.masthead h1 span { color: transparent; -webkit-text-stroke: 1.5px #fff; }
.deck { color: var(--on-dark); font-size: clamp(17px, 2.1vw, 21px); line-height: 1.55; max-width: 44ch; margin: 30px 0 0; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 34px; font-size: 13px; color: var(--on-dark); }
.byline strong { color: #fff; font-weight: 700; }

/* Body */
main { padding: 0 16px; }
.article { max-width: var(--measure); margin: 0 auto; padding: 56px 0 40px; }
.premise {
  font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.3;
  letter-spacing: -.03em; font-weight: 700; margin: 0 0 40px;
}
mark { background: linear-gradient(transparent 56%, var(--accent) 56%); color: inherit; padding: 0 1px; }

.takeaways { background: var(--panel); border-radius: var(--radius-md); padding: 26px 26px 24px; margin: 0 0 56px; }
.takeaways h2 { font-size: 12px; letter-spacing: .12em; margin: 0 0 14px; font-weight: 800; }
.takeaways ol { margin: 0; padding-left: 20px; }
.takeaways li { margin: 0 0 10px; font-size: 16px; line-height: 1.55; }
.takeaways li:last-child { margin-bottom: 0; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: var(--radius-sm); padding: 1px 6px; margin-right: 6px;
  color: var(--muted); vertical-align: 1px; line-height: 1.5;
}
.tag.measured { color: var(--ink); }

section.part { padding-top: 8px; margin-bottom: 52px; }
.part-index { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.part h2 { font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 800; }
.part p { margin: 0 0 18px; }
.part h3 { font-size: 15px; letter-spacing: .02em; margin: 28px 0 10px; font-weight: 800; }
.part ol, .part ul { margin: 0 0 18px; padding-left: 22px; }
.part li { margin-bottom: 8px; }
.cite { font-size: .8em; vertical-align: .35em; line-height: 0; color: var(--muted); text-decoration: none; }
.cite:hover { text-decoration: underline; }
.point {
  border-left: 2px solid var(--ink); padding: 2px 0 2px 16px; margin: 26px 0 0; font-weight: 600; font-size: 16px;
}
.point b { display: block; font-size: 11px; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin-bottom: 2px; }

/* Table */
.table-wrap { overflow-x: auto; margin: 6px 0 12px; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 10px; }
th, td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); }
thead th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
tbody th { font-weight: 700; width: 22%; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 22px; }

/* Charts */
figure { margin: 30px 0 30px; }
figcaption .fig-title { font-weight: 800; font-size: 15px; display: block; }
figcaption .fig-sub { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.dv { display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 14px; row-gap: 0; margin-top: 18px; }
.dv-label { font-size: 14px; line-height: 1.3; align-self: center; padding: 6px 0; }
.dv-label b { display: block; font-weight: 700; }
.dv-label span { font-variant-numeric: tabular-nums; color: var(--ink); }
.dv-track {
  position: relative; height: 48px;
  background:
    linear-gradient(to right, transparent calc(10% - .5px), var(--rule) calc(10% - .5px), var(--rule) calc(10% + .5px), transparent calc(10% + .5px)),
    linear-gradient(to right, transparent calc(35% - .5px), var(--rule) calc(35% - .5px), var(--rule) calc(35% + .5px), transparent calc(35% + .5px)),
    linear-gradient(to right, transparent calc(85% - .5px), var(--rule) calc(85% - .5px), var(--rule) calc(85% + .5px), transparent calc(85% + .5px)),
    linear-gradient(to right, transparent calc(60% - .5px), var(--ink) calc(60% - .5px), var(--ink) calc(60% + .5px), transparent calc(60% + .5px));
}
.dv-bar { position: absolute; top: 14px; height: 20px; background: var(--ink); }
.dv-bar.pos { left: 60%; border-radius: 0 4px 4px 0; }
.dv-bar.neg { right: 40%; border-radius: 4px 0 0 4px; }
.dv-axis { position: relative; height: 18px; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dv-axis span { position: absolute; transform: translateX(-50%); }
.dv-key { grid-column: 2; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.fig-source { font-size: 12px; color: var(--muted); margin-top: 12px; }

.cost { background: var(--panel); border-radius: var(--radius-md); padding: 22px 22px 20px; }
.cost-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cost-stat strong { display: block; font-family: var(--font-display); font-size: clamp(34px, 5vw, 46px); line-height: 1.05; letter-spacing: -.03em; margin: 8px 0 6px; font-weight: 800; }
.cost-stat span.desc { font-size: 13px; line-height: 1.45; display: block; color: var(--ink); }
.meter { height: 12px; background: #d9dfd2; border-radius: var(--radius-sm); margin: 20px 0 8px; position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 10.35%; background: var(--ink); border-radius: 2px 4px 4px 2px; }
.meter-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Closing blocks */
.limits { border-top: 1px solid var(--ink); padding-top: 22px; margin-top: 8px; }
.limits h2, .about h2, .sources h2 { font-size: 12px; letter-spacing: .12em; font-weight: 800; margin: 0 0 12px; }
.limits ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.limits li { margin-bottom: 6px; }
.about { margin-top: 36px; font-size: 15px; line-height: 1.6; }
.about p { margin: 0 0 12px; }
.sources { margin-top: 36px; }
.sources ol { margin: 0; padding-left: 26px; font-size: 13px; line-height: 1.55; color: #3c4239; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }

.site-foot { background: var(--accent); padding: 36px 16px; margin-top: 24px; }
.site-foot div { max-width: var(--measure); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .masthead { padding-bottom: 44px; }
  .masthead-bar .bar-original { display: none; }
  .masthead-inner { padding-top: 44px; }
  .masthead h1 span { -webkit-text-stroke-width: 1.2px; }
  .article { padding-top: 40px; }
  .takeaways { padding: 20px 18px; }
  .dv { grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; }
  .cost-stats { grid-template-columns: 1fr; }
  .dv-key { flex-direction: column; gap: 2px; }
  /* The rules table stacks into one block per rule */
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table, tbody, tr, tbody th, td { display: block; width: auto; }
  tbody tr { border-bottom: 1px solid var(--rule); padding: 12px 0 10px; }
  tbody th { border: 0; padding: 0 0 6px; width: auto; font-size: 15px; }
  td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 1px; }
  caption { display: block; width: auto; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

@media print {
  @page { size: A4; margin: 12mm 14mm 12mm; }
  body { font-size: 9pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .skip-link, .masthead-links, .site-foot { display: none !important; }
  .masthead { padding: 0 0 14px; }
  .masthead-bar { padding: 7px 9mm; font-size: 7pt; max-width: none; }
  .masthead-inner { padding: 12px 9mm 0; max-width: none; }
  .kicker { margin-bottom: 6px; font-size: 7pt; }
  .masthead h1 { font-size: 30pt; max-width: none; }
  .masthead h1 span { -webkit-text-stroke-width: 1px; }
  .deck { font-size: 9.6pt; margin-top: 8px; max-width: 110ch; }
  .byline { margin-top: 8px; font-size: 7.4pt; }
  main { padding: 0; }
  .article { max-width: none; padding: 12px 0 0; }
  .premise { font-size: 13pt; margin-bottom: 10px; }
  .takeaways { padding: 9px 12px; margin-bottom: 12px; }
  .takeaways h2 { margin-bottom: 6px; font-size: 7pt; }
  .takeaways li { font-size: 8.6pt; margin-bottom: 3px; line-height: 1.42; }
  .tag { font-size: 6.4pt; padding: 0 4px; }
  section.part { margin-bottom: 10px; padding-top: 0; }
  .part-index { font-size: 7pt; margin-bottom: 3px; }
  .part h2 { font-size: 14pt; margin-bottom: 6px; }
  .part h3 { font-size: 9pt; margin: 8px 0 4px; }
  .part p { margin-bottom: 6px; }
  .part ol, .part ul { margin-bottom: 6px; }
  .part li { margin-bottom: 2px; }
  .point { margin-top: 6px; font-size: 8.8pt; padding-left: 10px; }
  .point b { font-size: 6.6pt; }
  figure { margin: 8px 0; break-inside: avoid; }
  figcaption .fig-title { font-size: 9pt; }
  figcaption .fig-sub, .fig-source, .note, caption { font-size: 7.4pt; }
  .note { margin-bottom: 8px; }
  .table-wrap { overflow: visible; margin: 2px 0 4px; }
  table { min-width: 0; font-size: 7.8pt; line-height: 1.35; }
  caption { padding-bottom: 4px; }
  th, td { padding: 3px 8px 3px 0; }
  thead th { font-size: 6.6pt; }
  .dv { margin-top: 6px; grid-template-columns: 96px minmax(0, 1fr); }
  .dv-label { font-size: 8pt; padding: 2px 0; }
  .dv-track { height: 26px; }
  .dv-bar { top: 6px; height: 14px; }
  .dv-axis { font-size: 7pt; height: 12px; margin-top: 2px; }
  .dv-key { font-size: 7pt; margin-top: 2px; }
  .fig-source { margin-top: 4px; }
  .cost { padding: 9px 12px; }
  .cost-stat strong { font-size: 18pt; margin: 3px 0 2px; }
  .cost-stat span.desc { font-size: 7.8pt; }
  .meter { height: 8px; margin: 8px 0 4px; }
  .meter-scale { font-size: 7pt; }
  .closing { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9mm; break-inside: avoid; }
  .limits { margin-top: 0; padding-top: 8px; grid-column: 1 / -1; }
  .limits h2, .about h2, .sources h2 { font-size: 7pt; margin-bottom: 4px; }
  .limits ul { font-size: 7.8pt; columns: 2; column-gap: 9mm; }
  .limits li { margin-bottom: 2px; break-inside: avoid; }
  .about, .sources { margin-top: 8px; font-size: 7.8pt; line-height: 1.45; }
  .about p { margin-bottom: 4px; }
  .sources ol { font-size: 7pt; line-height: 1.4; padding-left: 18px; }
  .sources li { margin-bottom: 2px; }
  .point, .table-wrap, .takeaways { break-inside: avoid; }
  .part-index, .part h2, .part h3 { break-after: avoid; }
  a { text-decoration: none; }
}
