:root {
  --header-bg: #F2F0E5;
  --btn-bg: #f1ead6;
  --btn-bg-hover: #e5dcc2;
  --btn-border: rgba(139, 111, 71, 0.45);
  --btn-border-hover: rgba(139, 111, 71, 0.75);
  --btn-ink: #0f2438;
  --ink: rgba(0, 0, 0, 0.82);
  --ink-strong: #000000;
  --muted: #5f5f5f;
  --rule: rgba(0, 0, 0, 0.12);
  --takeaway-bg: #f5f5f5;
  --takeaway-border: #2f7f7a;
  --lad-highlight: #e6f4ea;
  --jump-bg: #E3EEF9;
  --jump-bg-hover: #D4E5F7;
  --jump-border: #6E9BD6;
  --jump-blue: #2568B5;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 28px;
}

body {
  margin: 0;
  background-color: #ffffff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: #1a56db;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--takeaway-border);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  background: #ffffff;
  color: var(--ink-strong);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.skip-link:focus {
  top: 12px;
}

/* Header Band */
.header-wrapper {
  background-color: var(--header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 42px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 40px;
  align-items: center;
}

.header-content {
  min-width: 0;
  color: var(--ink-strong);
  text-align: left;
}

.header-content h1 {
  margin: 0 0 0.16em;
  font-size: clamp(2.4rem, 3.5vw, 3.25rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.12;
  color: var(--ink-strong);
}

.header-content h2 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.22rem, 1.85vw, 1.6rem);
  font-weight: 500;
  line-height: 1.32;
  color: #191919;
}

.icon-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.35rem;
}

.icon-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-size: 1rem;
  line-height: 1.46;
  color: rgba(0, 0, 0, 0.86);
}

.icon-svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  margin-top: 2px;
  color: var(--ink-strong);
}

.icon-item strong {
  color: var(--ink-strong);
  font-weight: 700;
}

.hero-point-head {
  font-weight: 700;
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.32);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.hero-point-head:hover {
  color: #214e78;
  text-decoration-color: #214e78;
}

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

.button-container a.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--btn-bg);
  color: var(--btn-ink);
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(15, 36, 56, 0.12);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button-container a.button:hover {
  background-color: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
  box-shadow: 0 4px 8px rgba(15, 36, 56, 0.16);
  transform: translateY(-1px);
  text-decoration: none;
}

.button-container .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05em;
}

.header-image {
  min-width: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-image picture {
  display: block;
  width: 100%;
}

.header-hero-image {
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Byline */
.byline {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.35rem 20px;
  margin-bottom: 2.1rem;
}

.byline-container {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.authors {
  font-size: 1.2rem;
  line-height: 1.65;
  margin-bottom: 0.3rem;
  color: var(--ink-strong);
}

.authors a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.authors a:hover {
  color: #007bff;
  text-decoration: underline;
}

.author {
  white-space: nowrap;
}

.author-sep {
  margin: 0 0.5rem 0 0.05rem;
  color: var(--muted);
}

.affiliations {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
}

.acceptance-note {
  margin-top: 0.4rem;
  font-size: 0.94rem;
  color: var(--muted);
}

sup {
  font-size: 0.72em;
  line-height: 0;
}

/* Section Jump Cards */
.jump-section {
  margin: 0 auto 2.5rem;
}

.jump-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.jump-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 128px;
  padding: 16px 12px;
  background-color: var(--jump-bg);
  border: 2.5px solid var(--jump-border);
  border-radius: 12px;
  color: #182029;
  text-decoration: none;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.jump-card svg {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  color: #182029;
}

.jump-card:hover {
  background-color: var(--jump-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 96, 136, 0.18);
  text-decoration: none;
}

.jump-card:focus-visible {
  outline: 2px solid var(--jump-blue);
  outline-offset: 3px;
}

.jump-hint {
  margin: 16px auto 0;
  max-width: 780px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background-color: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(24, 32, 41, 0.07);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.16rem;
  line-height: 1.3;
  color: var(--jump-blue);
}

.jump-hint svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #182029;
}

/* Article Body */
main {
  padding-bottom: 1.5rem;
}

article section {
  margin: 0;
}

article section + section {
  margin-top: 2.75rem;
}

article section > :last-child {
  margin-bottom: 0;
}

.text-col {
  max-width: 730px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

article h2 {
  font-size: clamp(1.65rem, 2.3vw, 2.02rem);
  font-weight: 700;
  line-height: 1.24;
  color: var(--ink-strong);
  margin: 0 auto 0.85rem;
}

article h3 {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink-strong);
  margin: 1.65rem auto 0.5rem;
}

article p {
  margin: 0 auto 1.05rem;
}

article p strong {
  color: var(--ink-strong);
  font-weight: 700;
}

article code {
  font-family: var(--mono);
  font-size: 0.86em;
  background-color: #f4f4f4;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Collapsible <details> blocks */
details.paper-details {
  width: min(690px, calc(100% - 40px));
  max-width: 690px;
  margin: 0.85rem auto 1.15rem;
  padding: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background-color: transparent;
  transition: background-color 0.15s ease;
}

details.paper-details + details.paper-details {
  margin-top: -1.15rem;
  border-top: 0;
}

details.paper-details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: #2b2b2b;
  cursor: pointer;
  user-select: none;
}

details.paper-details > summary::-webkit-details-marker {
  display: none;
}

details.paper-details > summary::before {
  content: "▸";
  display: inline-block;
  font-size: 0.88em;
  color: var(--muted);
  transition: transform 0.18s ease;
}

details.paper-details[open] > summary::before {
  transform: rotate(90deg);
}

details.paper-details > summary:hover {
  color: var(--ink-strong);
}

details.paper-details[open] {
  background-color: #f9f9f7;
  padding: 0 0.9rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  margin-top: 0.85rem;
  margin-bottom: 1.15rem;
}

details.paper-details[open] + details.paper-details {
  margin-top: 0.65rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

details.paper-details[open] > summary {
  padding: 0.55rem 0;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

details.paper-details > p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.78);
}

details.paper-details-rubric[open] {
  width: min(820px, calc(100% - 40px));
  max-width: 820px;
  padding: 0 1.1rem 1rem;
}

details.paper-details-rubric > figure {
  margin-top: 0.35rem;
}

/* Takeaway Box */
.takeaway-box {
  max-width: 640px;
  margin: 1.75rem auto;
  padding: 1.1rem 1.35rem;
  background-color: var(--takeaway-bg);
  border: 1.5px solid var(--takeaway-border);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.takeaway-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 4px;
  color: var(--takeaway-border);
}

.takeaway-box p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.54;
  color: var(--ink-strong);
  font-weight: 400;
}

/* Figures */
.figure-block {
  max-width: 960px;
  margin: 1.85rem auto;
  padding-left: 20px;
  padding-right: 20px;
}

.figure-block.figure-teaser {
  max-width: 600px;
}

.figure-block.figure-narrow {
  max-width: 500px;
}

.figure-block.figure-medium {
  max-width: 820px;
}

figure {
  margin: 0;
}

.zoomable {
  display: block;
  cursor: zoom-in;
}

.figure-block img {
  margin: 0 auto;
  border-radius: 6px;
}

figcaption,
.table-caption {
  max-width: 760px;
  margin: 0.65rem auto 0;
  font-size: 0.9em;
  line-height: 1.48;
  color: var(--muted);
  text-align: center;
}

figcaption strong,
.table-caption strong {
  color: #222222;
  font-weight: 700;
}

.table-footnote {
  max-width: 760px;
  margin: 0.45rem auto 0;
  font-size: 0.82em;
  line-height: 1.48;
  color: var(--muted);
  text-align: left;
}

/* Tables (Booktabs style) */
.table-block {
  max-width: 940px;
  margin: 1.85rem auto;
  padding-left: 20px;
  padding-right: 20px;
}

.table-block.table-narrow {
  max-width: 780px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  background:
    linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, #ffffff 30%, rgba(255, 255, 255, 0)) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0)) 100% 0;
  background-repeat: no-repeat;
  background-color: #ffffff;
  background-size: 28px 100%, 28px 100%, 11px 100%, 11px 100%;
  background-attachment: local, local, scroll, scroll;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.9rem;
  line-height: 1.42;
  border-top: 2px solid #222222;
  border-bottom: 2px solid #222222;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.data-table th,
.data-table td {
  padding: 0.48rem 0.65rem;
  text-align: center;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
  font-weight: 400;
}

.data-table thead th {
  font-weight: 700;
  color: var(--ink-strong);
  border-bottom: 1px solid #333333;
  padding-top: 0.58rem;
  padding-bottom: 0.58rem;
}

.data-table tbody tr.group-start th,
.data-table tbody tr.group-start td {
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.data-table tbody tr.highlight th,
.data-table tbody tr.highlight td {
  background-color: var(--lad-highlight);
  color: var(--ink-strong);
  font-weight: 700;
}

/* BibTeX */
.bibtex-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 0.85rem;
}

.bibtex-header h2 {
  margin: 0;
}

.copy-btn {
  background-color: #f5f5f5;
  color: #222222;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.copy-btn:hover {
  background-color: #e8e8e8;
}

.bibtex-pre {
  margin: 0;
  padding: 1.15rem 1.35rem;
  background-color: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #222222;
}

.bibtex-pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.copy-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--takeaway-border);
  min-height: 1.3em;
}

.copy-status:empty {
  display: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding: 1.85rem 20px 2.25rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
}

.site-footer p {
  margin: 0.25rem auto;
  max-width: 730px;
}

.site-footer a {
  color: #444444;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}

.site-footer a:hover {
  color: var(--ink-strong);
}

/* Zoom Dialog */
dialog#image-dialog {
  max-width: min(1160px, 94vw);
  max-height: 92vh;
  padding: 40px 24px 20px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

dialog#image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

dialog#image-dialog img {
  max-height: 75vh;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

dialog#image-dialog p {
  max-width: 820px;
  margin: 14px auto 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: #333333;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.full-resolution {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
}

/* Responsive (<900px: reorder header to title, subtitle, buttons, hero image, icon items) */
@media (max-width: 900px) {
  .header-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 26px 20px 30px;
  }

  .header-content {
    display: contents;
  }

  .header-content h1 {
    order: 1;
    font-size: 2.1rem;
    margin-bottom: 0.15em;
  }

  .header-content h2 {
    order: 2;
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 0.85rem;
  }

  .button-container {
    order: 3;
    margin-top: 0;
    margin-bottom: 1.05rem;
    gap: 8px;
  }

  .header-image {
    order: 4;
    max-width: 520px;
    margin: 0 auto 1.1rem;
  }

  .header-hero-image {
    width: 100%;
    max-width: 100%;
  }

  .icon-container {
    order: 5;
    gap: 9px;
    margin-bottom: 0;
  }

  .icon-item {
    font-size: 15px;
    line-height: 1.42;
    gap: 10px;
  }

  .icon-svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
  }

  .takeaway-box {
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (max-width: 650px) {
  .jump-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .jump-card {
    min-height: 98px;
    padding: 12px 10px;
    font-size: 0.96rem;
    gap: 7px;
  }

  .jump-card svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  .jump-hint {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 0.94rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17.5px;
    line-height: 1.55;
  }

  .header-container {
    padding: 22px 16px 26px;
  }

  .header-content h1 {
    font-size: 1.92rem;
  }

  .header-content h2 {
    font-size: 1.08rem;
  }

  .button-container a.button {
    padding: 7px 13px;
    font-size: 0.88rem;
  }

  .jump-wrap,
  .text-col,
  .figure-block,
  .table-block {
    padding-left: 16px;
    padding-right: 16px;
  }

  details.paper-details {
    width: calc(100% - 32px);
  }

  details.paper-details-rubric[open] {
    width: calc(100% - 32px);
    padding: 0 0.75rem 0.85rem;
  }

  .takeaway-box {
    margin-left: 16px;
    margin-right: 16px;
    padding: 0.95rem 1.1rem;
  }

  .takeaway-box p {
    font-size: 0.98rem;
  }

  .table-block::before {
    content: "Scroll horizontally \2192";
    display: block;
    text-align: right;
    font-size: 0.74rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
  }

  .data-table {
    font-size: 0.84rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.42rem 0.55rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

article > .jump-section { margin: 2.75rem auto 0; }
article > .jump-section + section { margin-top: 2.75rem; }
