:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --surface: #fffefa;
  --surface-raised: #ffffff;
  --ink: #10263a;
  --ink-soft: #4d5e6b;
  --muted: #71808a;
  --line: #d7ddd9;
  --line-strong: #b7c4c1;
  --navy: #173b58;
  --navy-deep: #0d2a40;
  --teal: #0f766e;
  --teal-bright: #77d9cf;
  --teal-soft: #e0f3ef;
  --amber: #bc651d;
  --amber-soft: #fff0dd;
  --blue: #3e7eae;
  --blue-soft: #e2eef6;
  --green: #5f8f46;
  --green-soft: #e7f0e1;
  --danger: #a53e3e;
  --danger-soft: #fae7e7;
  --shadow: 0 18px 55px rgb(23 48 65 / 10%);
  --shadow-small: 0 7px 24px rgb(23 48 65 / 8%);
  --radius: 18px;
  --radius-small: 11px;
  --content: 1240px;
  --prose: 800px;
  --header-height: 70px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c1720;
  --surface: #13232f;
  --surface-raised: #182b38;
  --ink: #edf5f6;
  --ink-soft: #c1ced2;
  --muted: #93a5ac;
  --line: #2d414c;
  --line-strong: #425a66;
  --navy: #91c5e7;
  --navy-deep: #07141d;
  --teal: #67d4c7;
  --teal-bright: #8ee3d9;
  --teal-soft: #153a3a;
  --amber: #f2ad6c;
  --amber-soft: #402c1f;
  --blue: #8bbce0;
  --blue-soft: #173449;
  --green: #92c87c;
  --green-soft: #223a29;
  --danger: #ef9a9a;
  --danger-soft: #472628;
  --shadow: 0 20px 65px rgb(0 0 0 / 30%);
  --shadow-small: 0 8px 28px rgb(0 0 0 / 23%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 92% 0%, rgb(15 118 110 / 8%), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

a {
  color: var(--teal);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--amber);
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1100;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  z-index: 1100;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal-bright), var(--amber));
  transition: width 80ms linear;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  background: rgb(13 42 64 / 95%);
  color: white;
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(calc(100% - 36px), var(--content));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: white;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 11px;
  background: linear-gradient(145deg, rgb(103 212 199 / 38%), rgb(255 255 255 / 7%));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.brand-copy small {
  margin-top: 4px;
  color: #b8cedb;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}

.site-nav a {
  padding: 8px 9px;
  border-radius: 8px;
  color: #dce8ef;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgb(255 255 255 / 12%);
  color: white;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 10px;
  background: rgb(255 255 255 / 8%);
  color: white;
  cursor: pointer;
}

.menu-button {
  width: auto;
  display: none;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: white;
  background: var(--navy-deep);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(118deg, rgb(13 42 64 / 95%), rgb(15 118 110 / 86%)),
    linear-gradient(rgb(255 255 255 / 17%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 17%) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
}

.hero-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.hero-grid {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 36px), var(--content));
  min-height: 600px;
  margin: 0 auto;
  padding: clamp(68px, 8vw, 108px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.62fr);
  align-items: center;
  gap: clamp(42px, 7vw, 90px);
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9ce6dd;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  color: white;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(48px, 6.4vw, 82px);
  font-weight: 650;
  line-height: 1.01;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero h1 em {
  color: #a9d3ee;
  font-style: normal;
}

.lede {
  max-width: 790px;
  margin: 28px 0;
  color: #e2eef1;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 46px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--teal);
  color: white;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--shadow-small);
}

.button:hover {
  background: var(--amber);
  color: white;
}

.button.primary {
  background: white;
  color: #10263a;
}

.button.ghost {
  border-color: rgb(255 255 255 / 36%);
  background: transparent;
  color: white;
  box-shadow: none;
}

.evidence-tags {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-tags span {
  padding: 6px 10px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  background: rgb(255 255 255 / 7%);
  color: #e5f1f3;
  font-size: 11px;
  font-weight: 700;
}

.evidence-card {
  padding: 29px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 9%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.evidence-card > p {
  margin: 0 0 8px;
  color: #a9d3ee;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.evidence-card > strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 6vw, 76px);
  line-height: 1;
}

.evidence-card > span {
  color: rgb(255 255 255 / 72%);
}

.evidence-card dl {
  margin: 28px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgb(255 255 255 / 18%);
}

.evidence-card dl div {
  padding: 13px;
  border: 1px solid rgb(255 255 255 / 9%);
}

.evidence-card dt {
  color: rgb(255 255 255 / 58%);
  font-size: 10px;
}

.evidence-card dd {
  margin: 5px 0 0;
  font-size: 16px;
  font-weight: 800;
}

.evidence-card small {
  color: rgb(255 255 255 / 65%);
  line-height: 1.5;
}

.publication {
  width: min(calc(100% - 36px), var(--content));
  margin: 0 auto;
  padding: 42px 0 90px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 44px;
}

.metric {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.metric-kicker,
.figure-card > span,
.lane > span,
.model-title > span,
.threat-grid article > span,
.equation-grid article > span,
.chart-head > div:first-child > span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric > strong {
  min-height: 52px;
  margin: 12px 0 9px;
  display: block;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.08;
}

.metric p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.article-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 66px);
}

.page-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow: auto;
  padding: 16px 0 18px;
  border-top: 3px solid var(--teal);
}

.page-toc > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-toc > a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.page-toc > a:hover,
.page-toc > a.is-visible {
  border-left-color: var(--teal);
  background: var(--teal-soft);
  color: var(--ink);
}

.toc-note {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.toc-note span {
  color: var(--amber);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-note p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.article {
  min-width: 0;
}

.report-section {
  margin: 0 0 26px;
  padding: clamp(28px, 4vw, 48px);
  scroll-margin-top: calc(var(--header-height) + 18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.section-heading {
  margin-bottom: 35px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr);
  align-items: end;
  gap: clamp(28px, 5vw, 60px);
}

.section-heading h2,
.download-section h2 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(34px, 4.5vw, 53px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

h3 {
  margin: 42px 0 19px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.2;
}

.metric-tabs,
.filter-row {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-tabs button,
.filter-row button {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
}

.metric-tabs button:hover,
.filter-row button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.metric-tabs button.active,
.filter-row button.active {
  border-color: var(--navy-deep);
  background: var(--navy-deep);
  color: white;
}

.filter-row button span {
  margin-left: 6px;
  opacity: 0.68;
  font-size: 10px;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  box-shadow: var(--shadow-small);
}

.chart-head {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.chart-head > div:first-child {
  display: grid;
}

.chart-head > div:first-child > strong {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.chart-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.legend-dot,
.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.dot {
  margin-right: 9px;
}

.legend-dot.lucene,
.dot.lucene,
.bar-fill.lucene {
  background: var(--green);
}

.legend-dot.rag,
.dot.rag,
.bar-fill.rag {
  background: var(--blue);
}

.legend-dot.reranked,
.dot.reranked,
.bar-fill.reranked {
  background: var(--amber);
}

.bar-chart {
  padding: 22px;
}

.bar-row {
  margin: 12px 0;
  display: grid;
  grid-template-columns: minmax(125px, 185px) 1fr 88px;
  align-items: center;
  gap: 14px;
}

.bar-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.bar-track {
  height: 20px;
  overflow: hidden;
  border-radius: 3px;
  background: color-mix(in srgb, var(--line) 76%, transparent);
}

.bar-fill {
  height: 100%;
  display: block;
  transform-origin: left;
  animation: grow 560ms ease both;
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.bar-row > strong {
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.table-wrap {
  margin: 34px 0 42px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

caption {
  padding: 13px 15px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

thead th {
  background: var(--navy-deep);
  color: white;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

thead th:first-child,
tbody th {
  text-align: left;
}

tbody th {
  min-width: 270px;
  color: var(--ink);
  font-weight: 700;
}

tbody th small {
  margin: 3px 0 0 18px;
  display: block;
  color: var(--muted);
  font-size: 9px;
}

tbody td {
  color: var(--ink-soft);
}

tbody tr:hover {
  background: var(--teal-soft);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.contrast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contrast-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

.contrast-grid article > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contrast-grid article > strong {
  margin: 8px 0 20px;
  display: block;
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.2;
}

.contrast-grid dl {
  margin: 0;
}

.contrast-grid dl div {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.contrast-grid dt {
  color: var(--muted);
  font-size: 11px;
}

.contrast-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.callout {
  max-width: 900px;
  margin: 26px 0 0;
  padding: 19px 21px;
  border-left: 5px solid var(--teal);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--teal-soft);
}

.callout.warning {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.callout strong {
  color: var(--navy);
}

.callout p {
  margin: 5px 0 0;
  color: var(--ink-soft);
}

.methods-section {
  color: white;
  border-color: rgb(255 255 255 / 11%);
  background:
    linear-gradient(142deg, rgb(13 42 64 / 99%), rgb(16 67 76 / 98%)),
    var(--navy-deep);
}

.methods-section .eyebrow {
  color: var(--teal-bright);
}

.methods-section .section-heading h2,
.methods-section h3 {
  color: white;
}

.methods-section .section-heading > p {
  color: rgb(255 255 255 / 68%);
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lane {
  padding: 28px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--radius-small);
}

.lane > span {
  color: var(--teal-bright);
}

.lane h3 {
  margin: 7px 0 17px;
  font-size: 36px;
}

.lane ol {
  margin: 0;
  padding-left: 22px;
  color: rgb(255 255 255 / 84%);
  font-size: 14px;
  line-height: 1.85;
}

.lane p {
  margin: 22px 0 0;
  padding-top: 19px;
  border-top: 1px solid rgb(255 255 255 / 15%);
  color: rgb(255 255 255 / 66%);
  font-size: 13px;
  line-height: 1.55;
}

.rag-lane {
  background: rgb(62 126 174 / 14%);
}

.lucene-lane {
  background: rgb(95 143 70 / 13%);
}

.figure-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.publication-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  box-shadow: var(--shadow-small);
}

.methods-section .publication-figure {
  border-color: rgb(255 255 255 / 17%);
}

.publication-figure.wide {
  grid-column: 1 / -1;
}

.publication-figure > button {
  width: 100%;
  min-height: 250px;
  padding: 12px;
  display: grid;
  place-items: center;
  border: 0;
  background: white;
  cursor: zoom-in;
}

.publication-figure img {
  width: 100%;
  max-height: 590px;
  display: block;
  object-fit: contain;
}

.publication-figure figcaption {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.methods-section .publication-figure figcaption {
  border-color: rgb(255 255 255 / 15%);
  background: rgb(255 255 255 / 7%);
}

.publication-figure figcaption strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.methods-section .publication-figure figcaption strong {
  color: white;
}

.publication-figure figcaption span {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.methods-section .publication-figure figcaption span {
  color: rgb(255 255 255 / 62%);
}

.equation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.equation-grid article {
  min-height: 210px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

.equation-grid article > strong {
  min-height: 62px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-family: "Cambria Math", Cambria, Georgia, serif;
  font-size: 19px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.equation-grid article > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.52;
}

.model-section {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--blue-soft) 68%, var(--surface)), var(--surface));
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.model-grid > article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

.model-title {
  padding: 27px;
  background: linear-gradient(135deg, #286d9f, #174663);
  color: white;
}

.model-title.orange {
  background: linear-gradient(135deg, #c26821, #8a4016);
}

.model-title > span {
  color: rgb(255 255 255 / 72%);
}

.model-title h3 {
  margin: 7px 0;
  color: white;
  font-size: 30px;
}

.model-title p {
  margin: 0;
  color: rgb(255 255 255 / 73%);
  font-size: 13px;
}

.model-list article {
  padding: 18px 21px;
  border-bottom: 1px solid var(--line);
}

.model-list article:last-child {
  border-bottom: 0;
}

.model-list article div {
  display: grid;
  gap: 5px;
}

.model-list article span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-list article strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.model-list article p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.48;
}

.model-figures {
  margin-top: 17px;
}

.threat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.threat-grid article {
  min-height: 225px;
  padding: 23px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 76%, transparent);
}

.threat-grid article > p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.threat-grid article > strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.filter-summary {
  margin: -5px 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.figure-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
  cursor: zoom-in;
}

.figure-card.featured {
  grid-column: 1 / -1;
}

.figure-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  border-bottom: 1px solid var(--line);
  background: white;
  transition: transform 240ms ease;
}

.figure-card:hover img {
  transform: scale(1.024);
}

.figure-card > span {
  margin: 14px 16px 5px;
  display: block;
}

.figure-card > strong {
  margin: 0 16px 17px;
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(30px, 5vw, 58px);
  color: white;
  border-color: rgb(255 255 255 / 12%);
  background:
    linear-gradient(135deg, rgb(13 42 64 / 99%), rgb(15 74 79 / 98%)),
    var(--navy-deep);
}

.download-section .eyebrow {
  color: var(--teal-bright);
}

.download-section h2 {
  color: white;
}

.download-section > div > p:not(.eyebrow) {
  color: rgb(255 255 255 / 67%);
  font-size: 14px;
}

.download-grid {
  display: grid;
  gap: 10px;
}

.download-grid a {
  padding: 19px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgb(255 255 255 / 19%);
  border-radius: var(--radius-small);
  color: white;
  text-decoration: none;
}

.download-grid a:hover {
  border-color: rgb(255 255 255 / 38%);
  background: rgb(255 255 255 / 7%);
  color: white;
}

.download-grid span {
  color: rgb(255 255 255 / 66%);
  font-size: 12px;
}

.download-grid strong {
  font-size: 12px;
  text-align: right;
}

.download-grid i {
  font-size: 18px;
  font-style: normal;
}

.report-footer {
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--amber-soft) 60%, var(--surface));
}

.report-footer p {
  max-width: 900px;
  margin: 0 0 17px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.48;
}

.report-footer > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  width: min(calc(100% - 36px), var(--content));
  margin: 0 auto;
  padding: 36px 0 46px;
  display: grid;
  grid-template-columns: 1.5fr 0.75fr 0.75fr;
  gap: 32px;
  color: var(--ink-soft);
  font-size: 13px;
}

.footer-inner > div {
  display: grid;
  align-content: start;
  gap: 5px;
}

.footer-inner strong {
  color: var(--ink);
}

.footer-inner p {
  margin: 4px 0 0;
}

.back-to-top {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 160ms ease;
}

.back-to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: 3vh 3vw;
  display: grid;
  place-items: center;
  background: rgb(4 12 18 / 82%);
  backdrop-filter: blur(7px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-panel {
  width: min(95vw, 1500px);
  max-height: 94vh;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 100px rgb(0 0 0 / 48%);
}

.lightbox-toolbar {
  min-height: 56px;
  padding: 9px 12px 9px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.lightbox-toolbar strong {
  color: var(--ink);
  font-size: 13px;
}

.lightbox-toolbar button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.lightbox-panel > img {
  width: 100%;
  max-height: calc(94vh - 56px);
  display: block;
  padding: 15px;
  object-fit: contain;
  background: white;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

@media (max-width: 1120px) {
  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 18px;
    left: 18px;
    display: none;
    padding: 12px;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 14px;
    background: var(--navy-deep);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: grid;
  }

  .site-nav a {
    padding: 11px 12px;
  }

  .menu-button {
    margin-left: auto;
    display: inline-grid;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .evidence-card {
    max-width: 650px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .page-toc {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-toc > strong,
  .toc-note {
    grid-column: 1 / -1;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .section-heading,
  .download-section {
    grid-template-columns: 1fr;
  }

  .contrast-grid,
  .equation-grid,
  .threat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-grid,
  .lane-grid {
    grid-template-columns: 1fr;
  }

  .chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .nav-wrap,
  .hero-grid,
  .publication,
  .footer-inner {
    width: min(calc(100% - 24px), var(--content));
  }

  .brand-copy small {
    display: none;
  }

  .hero-grid {
    min-height: auto;
    padding: 62px 0;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .metric-grid,
  .contrast-grid,
  .equation-grid,
  .threat-grid,
  .gallery,
  .figure-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .page-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-section {
    padding: 24px 18px;
  }

  .section-heading h2,
  .download-section h2 {
    font-size: 36px;
  }

  .bar-chart {
    padding: 15px;
  }

  .bar-row {
    grid-template-columns: 96px 1fr 68px;
    gap: 8px;
  }

  .bar-label {
    font-size: 9px;
  }

  .bar-row > strong {
    font-size: 10px;
  }

  .figure-card.featured,
  .publication-figure.wide {
    grid-column: auto;
  }

  .download-grid a {
    grid-template-columns: 1fr auto;
  }

  .download-grid a strong {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  :root {
    --paper: white;
    --surface: white;
    --surface-raised: white;
    --ink: black;
    --ink-soft: #222;
    --muted: #555;
    --line: #bbb;
  }

  body {
    background: white;
    font-size: 10.5pt;
  }

  .site-header,
  .page-toc,
  .hero-actions,
  .metric-tabs,
  .filter-row,
  .filter-summary,
  .back-to-top,
  .reading-progress,
  .site-footer {
    display: none !important;
  }

  .hero {
    border: 0;
    background: white;
    color: black;
  }

  .hero::before,
  .hero-art {
    display: none;
  }

  .hero-grid {
    min-height: 0;
    padding: 20px 0;
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero h1 em,
  .hero .eyebrow,
  .lede {
    color: black;
  }

  .evidence-tags span {
    border-color: #999;
    color: black;
  }

  .evidence-card {
    border-color: #999;
    background: white;
    color: black;
    box-shadow: none;
  }

  .evidence-card > p,
  .evidence-card > span,
  .evidence-card dt,
  .evidence-card small {
    color: #333;
  }

  .publication {
    width: 100%;
    padding: 0;
  }

  .article-grid {
    display: block;
  }

  .report-section,
  .metric,
  .chart-card,
  .contrast-grid article,
  .model-grid > article,
  .publication-figure,
  .report-footer {
    break-inside: avoid;
    box-shadow: none;
  }

  .methods-section,
  .download-section {
    border-color: #999;
    background: white;
    color: black;
  }

  .methods-section .section-heading h2,
  .methods-section h3,
  .methods-section .section-heading > p,
  .methods-section .lane p,
  .methods-section .lane ol,
  .download-section h2,
  .download-section > div > p:not(.eyebrow) {
    color: black;
  }

  .download-grid a {
    border-color: #999;
    color: black;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* Portable publication: content remains visible even when JavaScript or
   IntersectionObserver is unavailable on the destination host. */
[data-reveal] {
  opacity: 1;
  transform: none;
}
