:root {
  --ink: #111;
  --muted: #555;
  --rule: #b8b8b8;
  --light-rule: #dedede;
  --accent: #294f73;
  --serif: "STIX Two Text", "Times New Roman", Times, serif;
  --sans: Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #fff;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 17px/1.58 var(--serif);
  text-rendering: optimizeLegibility;
}

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

p {
  margin: 0 0 1em;
}

.text-width {
  width: min(780px, calc(100% - 40px));
  margin-inline: auto;
}

.title-block {
  padding: 70px 0 34px;
  border-bottom: 1px solid var(--rule);
}

.note-status {
  margin: 0 0 12px;
  color: var(--muted);
  font: 0.76rem/1.4 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  max-width: 750px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.5rem);
  line-height: 1.14;
}

h2 {
  margin: 0 0 1.1rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

h3 {
  margin: 2.3rem 0 0.75rem;
  font-size: 1.14rem;
  line-height: 1.3;
}

.abstract {
  margin: 2rem 0 1.5rem;
}

.abstract strong {
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

.verification-note {
  margin: 1.4rem 0;
  padding-left: 16px;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  font-size: 0.94rem;
}

.contents {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 15px;
  margin-top: 1.8rem;
  padding: 10px 0;
  border-top: 1px solid var(--light-rule);
  color: var(--muted);
  font: 0.79rem/1.5 var(--sans);
}

.contents span {
  color: var(--ink);
  font-weight: 700;
}

.contents a {
  color: var(--muted);
  text-decoration: none;
}

.contents a:hover,
.contents a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.section {
  padding-top: 54px;
}

.section + .section {
  margin-top: 8px;
}

.display-math {
  max-width: 100%;
  margin: 1.15rem 0 1.3rem;
}

.theorem-equation {
  margin-block: 1.45rem;
  padding: 3px 0 3px 16px;
  border-left: 2px solid var(--accent);
}

.small-math {
  font-size: 0.96rem;
}

mjx-container[jax="CHTML"][display="true"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100%;
  margin: 0.8em 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 0;
}

.proof,
.proof-cont {
  margin-bottom: 0.75rem;
}

.proof-cont {
  margin-top: -0.15rem;
}

.figure,
.atlas-figure {
  margin: 2rem auto;
}

.figure svg,
.atlas-figure svg {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.compact-figure {
  max-width: 620px;
}

.wide-figure {
  width: min(1040px, calc(100vw - 36px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

figcaption,
.figure-caption,
.graph-panel p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

figcaption {
  margin-top: 9px;
}

figcaption > span,
.figure-caption > span,
.graph-panel p > span {
  color: var(--ink);
  font-weight: 600;
}

.edge,
.support-edge,
.g-edge {
  fill: none;
  stroke: #333;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edge.route,
.support-edge.sponsor,
.g-edge.sponsor {
  stroke: var(--accent);
}

.edge.direct {
  stroke-width: 4;
}

.edge.cut,
.support-edge.chord,
.g-edge.dash,
.g-tour {
  fill: none;
  stroke: #777;
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.edge.muted,
.g-edge.faint {
  stroke: #aaa;
}

.edge.connector {
  stroke: var(--accent);
  stroke-width: 3;
}

.node,
.support-node,
.g-node {
  fill: #fff;
  stroke: #222;
  stroke-width: 2;
}

.node.exit,
.node.start,
.support-node.owner,
.g-node.hot,
.g-node.hub {
  fill: var(--accent);
  stroke: var(--accent);
}

.math-label {
  fill: var(--ink);
  font: italic 18px/1 var(--serif);
  text-anchor: middle;
}

.edge-label {
  font-size: 15px;
}

.two-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: min(960px, calc(100vw - 36px));
  margin: 1.9rem 0 0 50%;
  transform: translateX(-50%);
}

.two-figures .figure {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--light-rule);
}

.figure-caption {
  width: min(960px, calc(100vw - 36px));
  margin: 8px 0 1.8rem 50%;
  transform: translateX(-50%);
}

.tour-overlay {
  fill: none;
  stroke: #555;
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
}

.receipt-overlay,
.g-edge.receipt {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  opacity: 0.45;
}

.plot-figure {
  padding-top: 8px;
}

.plot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 24px;
  padding: 0 8px 8px;
  color: var(--muted);
  font: 0.78rem/1.4 var(--sans);
}

.plot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.line-key {
  display: inline-block;
  width: 28px;
  border-top: 2px solid;
}

.line-key.published {
  border-color: #aaa;
  border-top-style: dashed;
}

.line-key.simple {
  border-color: #777;
}

.line-key.complement {
  border-color: var(--accent);
  border-top-style: dashed;
}

.line-key.current {
  border-color: #111;
  border-top-width: 3px;
}

.grid-line {
  stroke: #e2e2e2;
  stroke-width: 1;
}

.axis-label,
.phase-label {
  fill: #555;
  font: 13px/1 var(--sans);
  text-anchor: middle;
}

.axis-title {
  font-size: 14px;
}

.phase-line {
  stroke: #999;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.phase-label {
  fill: #333;
  font-family: var(--serif);
}

.curve {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.curve.published {
  stroke: #aaa;
  stroke-dasharray: 7 6;
}

.curve.simple {
  stroke: #777;
}

.curve.complement {
  stroke: var(--accent);
  stroke-dasharray: 8 4;
  stroke-width: 2.1;
}

.curve.current {
  stroke: #111;
  stroke-width: 2.7;
}

.endpoint {
  fill: #fff;
  stroke-width: 2;
}

.endpoint.published {
  stroke: #aaa;
}

.endpoint.simple {
  stroke: #777;
}

.endpoint.complement {
  stroke: var(--accent);
}

.endpoint.current {
  fill: #111;
  stroke: #111;
}

.results-table,
.verification-table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.9rem;
  line-height: 1.4;
}

caption {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--light-rule);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

thead th {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom-color: var(--ink);
}

.results-table th:first-child,
.results-table td:first-child {
  width: 48%;
}

.graph-plate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.graph-panel {
  min-width: 0;
  padding: 10px 12px 8px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.graph-panel svg {
  max-height: 230px;
}

.graph-panel p {
  margin: 4px 0 0;
}

.g-edge {
  stroke-width: 3;
}

.g-edge.bridge,
.g-edge.inter {
  stroke: var(--accent);
  stroke-width: 4;
}

.g-edge.tree,
.g-edge.cluster,
.g-edge.ladder {
  stroke: #444;
}

.g-node.role-a {
  fill: #333;
}

.g-node.role-r {
  fill: #fff;
}

.g-node.role-s {
  fill: #bbb;
}

footer {
  margin-top: 64px;
  padding: 32px 0 64px;
  border-top: 1px solid var(--rule);
  font-size: 0.93rem;
}

footer h2 {
  font-size: 1.25rem;
}

.references {
  margin: 0;
  padding-left: 1.5rem;
}

.references li {
  margin-bottom: 0.8rem;
  padding-left: 0.2rem;
}

.back-link {
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.76rem;
}

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

  .text-width {
    width: min(100% - 28px, 780px);
  }

  .title-block {
    padding-top: 42px;
  }

  .section {
    padding-top: 42px;
  }

  .two-figures,
  .graph-plate {
    grid-template-columns: 1fr;
  }

  .small-math {
    font-size: 0.9rem;
  }

  .results-table,
  .verification-table {
    font-size: 0.78rem;
  }

  th,
  td {
    padding: 7px 6px;
  }
}

@media print {
  body {
    font-size: 11pt;
  }

  .text-width,
  .wide-figure,
  .two-figures,
  .figure-caption {
    width: 100%;
    margin-left: auto;
    transform: none;
  }

  .contents,
  .back-link {
    display: none;
  }

  .section {
    padding-top: 28px;
  }

  figure,
  table {
    break-inside: avoid;
  }
}
