/* Same Science Tokyo palette and Hind typography as the original NRI page. */
:root {
  --navy: #1c3177;
  --blue: #0031d8;
  --tint: #f9fbff;
  --badge: #cfdbed;
  --ink: #1a1a1a;
  --muted: #555;
  --border: #ebebeb;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.7 'Hind', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container { max-width: 920px; margin: 0 auto; padding: 0 24px; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.skip-link { position: absolute; left: 24px; top: -100px; z-index: 1; background: #fff; padding: 8px 16px; }
.skip-link:focus { top: 8px; }
.hero {
  position: relative;
  text-align: center;
  padding: 36px 0 32px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--tint) 0%, #fff 70%);
  border-bottom: 1px solid var(--border);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--navy), var(--blue)); }
.venue { display: inline-block; padding: 5px 14px; margin-bottom: 16px; border-radius: 99px; background: var(--badge); color: var(--navy); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
h1 { margin: 0 0 16px; font-size: 34px; line-height: 1.18; letter-spacing: -0.015em; color: var(--navy); }
.authors { margin-bottom: 10px; font-weight: 500; color: var(--ink); }
.authors a { color: inherit; text-decoration: none; }
.authors a:hover { text-decoration: underline; }
.affil { display: inline-block; line-height: 0; margin-bottom: 22px; transition: opacity 0.15s ease; }
.affil:hover { opacity: 0.75; }
.affil img { height: 30px; width: auto; }
p { margin: 0 0 12px; color: var(--muted); }
.lead { max-width: 640px; margin: 22px auto 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.lead strong, .lead strong a { color: var(--navy); }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.links a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: 1px solid transparent; border-radius: 99px; background: var(--navy); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.links a:hover { background: #00019c; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(28, 49, 119, 0.18); }
.links a.alt { background: #fff; color: var(--navy); border-color: #ccc; }
.links a.alt:hover { background: var(--tint); border-color: var(--navy); box-shadow: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; gap: 12px; margin: 28px auto 0; }
.stat { padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.stat strong { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; color: var(--navy); }
.stat span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: #767676; }
section { padding: 28px 0; border-bottom: 1px solid var(--border); }
.tinted { background: var(--tint); }
h2 { color: var(--navy); font-size: 26px; line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; color: var(--navy); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 20px 0; }
.feature-grid article { border-top: 2px solid var(--navy); padding-top: 12px; }
.feature-grid p { margin: 0; }
figure { margin: 20px 0 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
figcaption, .small-note { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.figure-grid figure { margin-top: 8px; }
.figure-grid figcaption strong { color: var(--navy); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 12px 0 0; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 24px; height: 3px; background: #1f77b4; }
.legend .baseline { background: #7f7f7f; }
.legend .eqarch { background: #ff7f0e; }
.rule-example { margin: 16px 0; padding: 16px 20px; background: var(--tint); border-left: 4px solid var(--navy); border-radius: 8px; }
.rule-example p:last-child { margin: 0; }
.rule-example code { font-size: 15px; color: var(--navy); }
details { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; }
summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding-bottom: 8px; color: var(--muted); }
th, td { padding: 6px 12px; border-bottom: 1px solid var(--border); text-align: right; }
th:first-child, td:first-child { text-align: left; }
thead, tfoot { background: var(--tint); color: var(--navy); }
tbody th { font-weight: 400; }
pre { padding: 16px 20px; margin: 12px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
code { font: 13px/1.6 ui-monospace, 'SFMono-Regular', Consolas, monospace; }
#bibtex code { white-space: pre-wrap; overflow-wrap: anywhere; }
footer { padding: 24px 0; background: var(--navy); text-align: center; color: #fff; }
footer p { color: #fff; margin-bottom: 8px; }
footer .small-note { color: #e1e6f2; }
footer p:last-child { margin-bottom: 0; }
footer a, footer a:hover { color: #fff; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 32px; }
@media (max-width: 720px) {
  .hero { padding: 28px 0 24px; }
  h1 { font-size: 24px; }
  /* Let the title wrap naturally instead of orphaning a word before the forced break. */
  h1 br { display: none; }
  .affil img { height: 26px; }
  .lead { font-size: 15px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid, .figure-grid { grid-template-columns: 1fr; gap: 16px; }
  section { padding: 24px 0; }
  h2 { font-size: 24px; }
  /* Fit the five-column results table on phones, so the caption and last column are not clipped. */
  details { padding-inline: 10px; }
  table { font-size: 13px; }
  th, td { padding-inline: 4px; }
  thead th, tbody th { white-space: nowrap; }
  thead th:last-child { white-space: normal; }
}
@media (max-width: 359px) {
  details { padding-inline: 6px; }
  th, td { padding-inline: 3px; }
  tbody th { white-space: normal; }
}

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