:root {
  color-scheme: light;
  --page: #fcfcfb;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-secondary: #52514e;
  --ink-muted: #6b6a66;
  --rule: #0b0b0b;
  --hairline: #e1e0d9;
  --baseline: #c3c2b7;
  --box: #f4f3ef;
  --link: #1c5cab;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --diverging-negative-strong: #b3302f;
  --diverging-negative: #e8908f;
  --diverging-neutral: #f0efec;
  --diverging-positive: #86b6ef;
  --diverging-positive-strong: #1c5cab;
  --serif: "Times New Roman", Times, Tinos, "Liberation Serif", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 96px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

header.paper-head {
  text-align: center;
  margin-bottom: 32px;
}

header.paper-head h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 16px;
}

header.paper-head p {
  text-align: center;
}

.authors {
  font-size: 1.05rem;
  margin: 0;
}

.contact,
.affiliation,
.dateline {
  color: var(--ink-secondary);
  font-size: 0.92rem;
  margin: 4px 0 0;
}

.abstract {
  margin: 32px 24px;
  font-size: 0.95rem;
}

.abstract h2 {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 8px;
}

.keywords {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-top: 12px;
}

.citation-box {
  border-top: 1px solid var(--baseline);
  border-bottom: 1px solid var(--baseline);
  padding: 12px 0;
  margin: 0 24px 8px;
  font-size: 0.88rem;
}

.citation-box .label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.citation-box p {
  text-align: left;
  margin-bottom: 8px;
}

h2.section {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 48px 0 12px;
}

h3.subsection {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  margin: 28px 0 8px;
}

p {
  margin: 0 0 14px;
  text-align: justify;
  hyphens: auto;
}

.specification {
  border: 1px solid var(--baseline);
  background: var(--box);
  padding: 16px 20px;
  margin: 28px 0 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.specification .label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.specification .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.specification label {
  font-size: 0.92rem;
  display: flex;
  gap: 6px;
  align-items: center;
}

select,
input[type="text"],
input[type="range"] {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--baseline);
  padding: 3px 6px;
}

input[type="range"] {
  padding: 0;
  width: 100%;
}

.specification .summary {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

figure {
  margin: 24px 0 28px;
}

.chart {
  width: 100%;
  height: 340px;
}

.chart.tall {
  height: 420px;
}

.chart.short {
  height: 260px;
}

figcaption,
caption {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.45;
  text-align: left;
}

figcaption {
  margin-top: 6px;
}

figcaption b,
caption b {
  color: var(--ink);
  font-weight: 600;
}

.table-wrap {
  margin: 24px 0 28px;
  overflow-x: auto;
}

.table-wrap.scroll {
  max-height: 460px;
  overflow-y: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums lining-nums;
}

caption {
  caption-side: top;
  padding-bottom: 8px;
}

thead th {
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  padding: 6px 8px;
  text-align: right;
  white-space: nowrap;
  background: var(--page);
  position: sticky;
  top: 0;
}

tbody td {
  padding: 4px 8px;
  text-align: right;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 2px solid var(--rule);
}

tbody tr.group-start td {
  border-top: 1px solid var(--hairline);
}

th.text,
td.text {
  text-align: left;
}

td.symbol {
  font-family: var(--mono);
  font-size: 0.82rem;
  text-align: left;
}

tr.highlight td {
  background: var(--box);
}

.table-note {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 6px;
  text-align: left;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.button {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--link);
  background: none;
  border: 1px solid var(--baseline);
  padding: 3px 10px;
  cursor: pointer;
}

.button:hover {
  background: var(--box);
}

.inline-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
  font-size: 0.92rem;
}

ol.references {
  font-size: 0.9rem;
  padding-left: 24px;
}

ol.references li {
  margin-bottom: 8px;
}

.footnote {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  margin-top: 48px;
}

.loading {
  color: var(--ink-muted);
  font-style: italic;
}

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .abstract {
    margin: 24px 0;
  }

  .specification {
    position: static;
  }

  p {
    text-align: left;
  }
}
