:root {
  --ink: #172b3f;
  --ink-soft: #4f6374;
  --teal: #315b7c;
  --teal-dark: #163653;
  --blue: #6ea9dc;
  --blue-soft: #e2f2fb;
  --blue-hover: #b9def4;
  --paper: #ffffff;
  --warm: #fff1b8;
  --accent: #d97966;
  --hero-sky: #9fc8e2;
  --hero-light: #d9ebf5;
  --hero-mid: #b8d8eb;
  --hero-deep: #6ea6ce;
  --best: #f4d6d2;
  --second: #dcecf7;
  --line: rgba(31, 47, 52, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: Charter, Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid #163653;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff1b8;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 16px;
  left: 16px;
  padding: 8px 12px;
  color: #ffffff;
  background: var(--teal-dark);
  transform: translateY(-160%);
}

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

.nav-bar {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  display: none;
  width: 100%;
  padding: 8px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-link {
  display: inline-block;
  margin: 4px 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active-link {
  color: #0b63ce;
  text-decoration: underline;
}

.header-wrapper {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(244, 250, 253, 0.58) 0 11%, transparent 34%),
    linear-gradient(108deg, var(--hero-light) 0%, var(--hero-mid) 48%, var(--hero-deep) 100%);
}

.header-wrapper::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 42%),
    repeating-linear-gradient(0deg, rgba(22, 54, 83, 0.025) 0 1px, transparent 1px 5px);
  content: "";
  pointer-events: none;
}

.header-container {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  color: var(--teal);
  text-align: center;
}

.header-content {
  position: relative;
  z-index: 2;
  color: var(--teal-dark);
  text-align: left;
}

.header-content h1,
.header-content h2,
h1,
h2,
h3,
p {
  margin-top: 0;
}

.header-content h1 {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 48px;
  line-height: 1.05;
}

.header-content h2 {
  margin-bottom: 24px;
  color: #234d6d;
  font-size: 24px;
  line-height: 1.2;
}

.header-content strong {
  color: #8f4d46;
}

.icon-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.icon-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  color: #23435d;
  line-height: 1.45;
}

.icon-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--teal-dark);
}

.icon-mark svg {
  width: 34px;
  height: 34px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.button-container .button {
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 9px 17px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--teal-dark);
  background: rgba(255, 241, 184, 0.86);
  border: 1.5px solid rgba(148, 116, 28, 0.42);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}

.button-container .button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-container .button:hover:not(:disabled) {
  color: #ffffff;
  background: #eab682;
  transform: translateY(-1px);
}

.button-container .button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.header-image {
  position: relative;
  z-index: 1;
  max-width: 90%;
  margin: 24px auto 0;
}

.teaser-image {
  display: block;
  margin: 0 auto;
}

main {
  contain: none;
  position: relative;
  display: block;
}

.appendix-section {
  display: block;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  background: #ffffff;
}

.byline {
  margin-bottom: 20px;
  padding: 0 24px 28px;
  background: #f8fbfd;
  border-top: 1px solid rgba(22, 54, 83, 0.12);
  border-bottom: 1px solid rgba(22, 54, 83, 0.14);
}

.byline-container {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 34px;
  text-align: center;
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0 auto 22px;
}

.author-link {
  color: #152f46;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.45;
  white-space: nowrap;
}

.author-link sup {
  color: #45677f;
  font-size: 0.68em;
  font-weight: 700;
}

.affiliation-list {
  display: flex;
  flex-wrap: wrap;
  max-width: 840px;
  margin: 0 auto 18px;
  justify-content: center;
  gap: 9px 24px;
  color: #35556d;
  font-size: 15px;
  line-height: 1.45;
}

.affiliation-list span {
  white-space: nowrap;
}

.affiliation-list sup {
  margin-right: 3px;
  color: #8f4d46;
  font-size: 0.72em;
  font-weight: 800;
}

.author-note {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin: 0;
  padding: 13px 26px 0;
  color: #607587;
  border-top: 1px solid rgba(49, 91, 124, 0.22);
  font-size: 13px;
  line-height: 1.5;
}

@media (min-width: 1180px) {
  .author-list {
    display: grid;
    grid-template-columns: repeat(7, max-content);
    column-gap: 24px;
    row-gap: 9px;
  }
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 20px 16px;
  line-height: 1rem;
}

.icon-link {
  display: flex;
  flex: 1 1 128px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  margin: 8px;
  padding: 12px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  background: var(--blue-soft);
  border: 3px solid var(--blue);
  border-radius: 10px;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}

.icon-link:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.icon {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 800;
}

.click-hint {
  width: min(85%, 780px);
  margin: 0 auto 24px;
  color: var(--ink-soft);
  text-align: center;
}

hr {
  max-width: 920px;
  margin: 0 auto 32px;
  border: 0;
  border-top: 1px solid var(--line);
}

.sub-section {
  width: min(100% - 32px, 980px);
  margin: 0 auto 56px;
}

.paper-section {
  margin-bottom: 72px;
}

.sub-section h1.text {
  margin-bottom: 16px;
  color: var(--teal-dark);
  font-size: 32px;
  line-height: 1.16;
}

.text {
  font-size: 18px;
}

.section-subtitle {
  margin: 30px 0 14px;
  color: var(--teal-dark);
  font-size: 24px;
  line-height: 1.2;
}

.alignment-levels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 16px;
}

.alignment-levels article {
  padding: 16px 18px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
}

.alignment-levels h3 {
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 19px;
}

.alignment-levels p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
}

.paper-subsection {
  margin-top: 40px;
}

.paper-subsection > h2 {
  margin-bottom: 12px;
  color: var(--teal-dark);
  font-size: 26px;
  line-height: 1.2;
}

.paper-subsection > h3 {
  margin: 32px 0 10px;
  color: var(--teal-dark);
  font-size: 21px;
  line-height: 1.25;
}

.compact-paper-figure {
  margin: 28px auto 20px;
}

.rollout-budget-figure {
  width: min(82%, 720px);
  margin: 28px auto 20px;
}

.target-hit-figure {
  width: min(58%, 400px);
}

.training-response-figure {
  width: min(78%, 600px);
}

figure {
  display: block;
  margin: 0;
}

.figure-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: zoom-in;
}

.figure-button img {
  width: 100%;
}

figcaption {
  margin: 8px auto 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.benchmark-taxonomy-figure {
  margin-top: 24px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.stat-grid div {
  padding: 16px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-grid strong {
  display: block;
  color: var(--teal-dark);
  font-size: 28px;
  line-height: 1;
}

.stat-grid span {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

.diagnostic-grid article {
  padding: 20px;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.diagnostic-grid h2 {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 22px;
}

.scenario-explorer {
  margin: 24px 0;
  overflow: hidden;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scenario-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #edf7fc;
  border-bottom: 1px solid var(--line);
}

.scenario-tab {
  padding: 8px 12px;
  color: var(--teal-dark);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}

.scenario-tab:hover {
  background: var(--blue-soft);
}

.scenario-tab.active {
  color: #ffffff;
  background: var(--teal-dark);
}

.scenario-panel {
  padding: 20px;
}

.scenario-panel h2 {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 22px;
}

.scenario-panel ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.scenario-panel li {
  padding: 8px;
  color: var(--teal-dark);
  background: var(--paper);
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
}

.evidence-note {
  padding: 16px;
  background: var(--paper);
  border-left: 4px solid var(--accent);
}

.rollout-gallery {
  margin: 24px 0;
  overflow: hidden;
  background: #f6fbfe;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.rollout-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #e4f2fa;
  border-bottom: 1px solid var(--line);
}

.rollout-tab-groups,
.rollout-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rollout-tab-groups {
  align-items: center;
}

.rollout-tab-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.rollout-track-label {
  padding: 4px 7px;
  border-radius: 4px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.rollout-track-label.calibration {
  color: #274b68;
  background: #c9deec;
}

.rollout-track-label.coverage {
  color: #405a3b;
  background: #d5e2cf;
}

.rollout-tab,
.rollout-controls button {
  padding: 8px 12px;
  color: var(--teal-dark);
  background: #ffffff;
  border: 1px solid rgba(22, 54, 83, 0.22);
  border-radius: 6px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}

.rollout-tab:hover,
.rollout-controls button:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.rollout-tab.active,
.rollout-controls [data-rollout-play] {
  color: #ffffff;
  background: var(--teal-dark);
}

.rollout-controls [data-rollout-play]:hover {
  background: #0b63ce;
}

.rollout-scene-meta {
  padding: 18px 20px 16px;
}

.rollout-scene-code {
  margin-bottom: 2px;
  color: #8f4d46;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rollout-scene-meta h2 {
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 26px;
}

.rollout-scene-meta p {
  margin-bottom: 6px;
}

.rollout-boundary {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  color: var(--ink-soft);
  background: rgba(255, 241, 184, 0.55);
  border-radius: 4px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

.rollout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 16px 18px;
}

.rollout-card {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(22, 54, 83, 0.18);
  border-radius: 8px;
}

.rollout-card header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(22, 54, 83, 0.13);
}

.rollout-card header h3 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 16px;
  line-height: 1.2;
}

.rollout-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #10283e;
  object-fit: cover;
}

.table-container {
  width: 100%;
  margin: 12px 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.human-table .data-table {
  min-width: 560px;
}

.training-table .data-table {
  min-width: 720px;
}

.table-intro {
  margin-top: 24px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.table-intro p {
  margin-bottom: 8px;
}

.swipe-hint {
  display: none;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.data-table caption {
  margin-bottom: 8px;
  color: var(--ink-soft);
  caption-side: top;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #dce5e8;
}

.data-table tbody th:first-child,
.data-table thead tr:first-child > th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: #ffffff;
  box-shadow: 1px 0 0 #dce5e8;
}

.data-table thead th {
  color: var(--teal-dark);
  background: #ecf6fb;
  font-weight: 800;
}

.data-table thead tr:first-child > th:first-child {
  z-index: 3;
  background: #ecf6fb;
}

.data-table tbody tr:hover td {
  background: #f8fbfd;
}

.data-table tbody tr:hover td:first-child {
  background: #f8fbfd;
}

.data-table tbody tr:hover th:first-child {
  background: #f8fbfd;
}

.data-table .table-group-start > * {
  border-top: 2px solid #c6d9e5;
}

.condition-offset {
  display: inline-block;
  padding-left: 12px;
  font-weight: 600;
}

.tb-hdr {
  border-bottom: 2px solid var(--blue);
}

.cell-best {
  background: var(--best) !important;
  font-weight: 800;
}

.cell-second {
  background: var(--second) !important;
}

.table-divider td {
  height: 10px;
  padding: 0;
  background: #f3f6f7 !important;
}

.bibtex {
  padding: 16px;
  overflow-x: auto;
  color: #1a1a1a;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.copy-button,
.dialog-close {
  padding: 8px 12px;
  color: #fff;
  background: var(--teal-dark);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}

.copy-button:hover,
.dialog-close:hover {
  background: #0b63ce;
}

.image-dialog {
  width: min(96vw, 1280px);
  max-width: none;
  padding: 16px;
  border: 0;
  border-radius: 8px;
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
}

.image-dialog img {
  width: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.dialog-close {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 12px;
}

.dialog-image-wrap {
  max-height: 78vh;
  overflow: auto;
}

.dialog-image-wrap img {
  min-width: min(100%, 980px);
}

#dialog-caption {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

@media (min-width: 600px) {
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 48px;
  }

  .header-content {
    max-width: calc(50% - 24px);
    margin-right: 16px;
  }

  .header-content h1 {
    font-size: 56px;
  }

  .header-content h2 {
    margin-top: -12px;
    font-size: 32px;
  }

  .header-image {
    max-width: calc(50% - 24px);
    margin-top: 0;
  }

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

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

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

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

@media (min-width: 1100px) {
  .rollout-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .nav-bar {
    display: none !important;
  }

  .header-content h1 {
    font-size: 44px;
  }

  .header-content h2 {
    font-size: 24px;
  }

  .icon-item {
    align-items: flex-start;
  }

  .icon-link {
    flex-basis: 45%;
  }

  .button-container {
    display: grid;
    width: max-content;
    max-width: 100%;
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
  }

  .button-container .button {
    padding: 8px 13px;
    font-size: 14px;
  }

  .byline {
    padding-right: 16px;
    padding-left: 16px;
  }

  .byline-container {
    padding-top: 28px;
  }

  .author-list {
    gap: 7px 16px;
    margin-bottom: 18px;
  }

  .author-link {
    font-size: 16px;
  }

  .affiliation-list {
    gap: 7px 14px;
    font-size: 14px;
  }

  .author-note {
    padding-right: 8px;
    padding-left: 8px;
  }

  .sub-section h1.text {
    font-size: 28px;
  }

  .text {
    font-size: 17px;
  }

  .swipe-hint {
    display: block;
  }

  .rollout-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rollout-controls button {
    flex: 1;
  }

  .image-dialog {
    width: 100vw;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 12px;
    border-radius: 0;
  }

  .dialog-image-wrap {
    max-height: calc(100vh - 96px);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
