:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6977;
  --line: #d6dde5;
  --paper: #f3f6f9;
  --panel: #ffffff;
  --accent: #0b6e8f;
  --accent-dark: #084f68;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.topbar,
.hero,
.content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0;
}

.language-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.language-nav a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 11px;
  text-decoration: none;
  color: var(--ink);
  background: #ffffff;
}

.language-nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.hero {
  padding: 38px 0 34px;
}

.date {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-weight: 700;
}

h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.authors {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  padding: 9px 14px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.button.secondary {
  background: #ffffff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}

.content {
  padding: 28px 0 56px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  line-height: 1.25;
}

h3 {
  margin: 18px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.report-text {
  max-width: 900px;
}

.report-text p {
  margin: 0 0 14px;
  text-align: justify;
}

.article > h3 {
  margin-top: 28px;
  padding-top: 6px;
}

.report-text h3 + p {
  margin-top: 0;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.table-figure {
  margin: 22px 0;
}

.table-figure figcaption {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 400;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  background: #eaf2f6;
  font-weight: 700;
}

.references {
  padding-left: 1.4rem;
}

.references li {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

figure {
  margin: 0;
}

video {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #000000;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.report-viewer {
  display: grid;
  gap: 22px;
}

.figure-stack {
  display: grid;
  gap: 24px;
}

.figure-block {
  display: grid;
  gap: 12px;
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.figure-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-image {
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.figure-image img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-image figcaption {
  padding: 9px 12px;
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.report-page {
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.08);
}

.report-page img {
  display: block;
  width: 100%;
  height: auto;
}

.report-page figcaption {
  padding: 10px 14px;
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  padding: 20px 0;
}

.site-footer p {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 28px 0;
  }

  .panel {
    padding: 18px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .figure-row,
  .figure-grid,
  .figure-grid.compact {
    grid-template-columns: 1fr;
  }
}


.figure-title {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
}

.citation {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.citation:hover,
.back-to-text:hover {
  text-decoration: underline;
}

.back-to-text {
  color: var(--accent-dark);
  font-size: 0.9rem;
  margin-left: 6px;
}


/* Atami-style report refinements */
.content,
.hero,
.topbar,
.site-footer p {
  width: min(900px, calc(100% - 32px));
}

.panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 28px;
}

.article {
  max-width: 900px;
}

.figure-block {
  margin: 22px 0;
  text-align: center;
}

.figure-row,
.figure-grid {
  justify-content: center;
}

.figure-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 260px));
}

.figure-row {
  grid-template-columns: repeat(2, minmax(0, 360px));
}

.figure-grid {
  grid-template-columns: repeat(2, minmax(0, 360px));
}

.figure-image {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.figure-image figcaption {
  display: none;
}

.figure-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
}

.table-figure {
  margin: 24px auto;
  text-align: center;
}

.table-figure figcaption {
  font-weight: 400;
  text-align: center;
}

.table-wrap {
  display: inline-block;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  overflow-x: auto;
}

table {
  width: auto;
  margin: 0 auto;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #999999;
  padding: 6px 10px;
  text-align: center;
}

th {
  background: transparent;
}

@media (max-width: 760px) {
  .figure-row,
  .figure-grid,
  .figure-grid.compact {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    display: block;
  }
}
