:root {
  --ink: #15383b;
  --ink-deep: #0b2c2f;
  --ink-soft: #476467;
  --paper: #f7f5ee;
  --paper-bright: #fffef9;
  --paper-muted: #eeeade;
  --line: #d9d5c9;
  --line-dark: rgba(255, 255, 255, 0.18);
  --teal: #176b72;
  --teal-bright: #2b9296;
  --rust: #a64d3d;
  --rust-dark: #82382c;
  --purple: #6d4c93;
  --gold: #d5a84b;
  --success: #2e7158;
  --shadow-sm: 0 2px 12px rgba(25, 53, 54, 0.08);
  --shadow-md: 0 18px 50px rgba(17, 48, 50, 0.14);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--paper-bright);
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.section-block {
  padding-block: 92px;
}

.compact-top {
  padding-top: 34px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(21, 56, 59, 0.1);
  background: rgba(247, 245, 238, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(1360px, calc(100% - 48px));
  min-height: 76px;
  margin-inline: auto;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}

.brand strong {
  display: block;
  line-height: 1.05;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 35px;
  height: 35px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  background: var(--ink);
}

.brand-mark::before {
  top: 16px;
  left: 5px;
  width: 23px;
  height: 1px;
  transform: rotate(32deg);
}

.brand-mark::after {
  top: 16px;
  left: 5px;
  width: 23px;
  height: 1px;
  transform: rotate(-32deg);
}

.brand-mark span {
  position: absolute;
  z-index: 1;
  width: 6px;
  height: 6px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.brand-mark span:nth-child(1) {
  top: 4px;
  left: 14px;
}

.brand-mark span:nth-child(2) {
  top: 14px;
  right: 3px;
}

.brand-mark span:nth-child(3) {
  bottom: 3px;
  left: 14px;
}

.brand-mark span:nth-child(4) {
  top: 14px;
  left: 3px;
}

.primary-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 28px;
}

.primary-nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.primary-nav a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
select:focus-visible,
.chart-hit-target:focus-visible,
.table-open:focus-visible {
  outline: 3px solid rgba(43, 146, 150, 0.3);
  outline-offset: 2px;
}

.button-small {
  min-height: 40px;
  padding-inline: 17px;
  font-size: 13px;
}

.button-dark {
  background: var(--ink-deep);
  color: #fff;
}

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

.button-primary {
  background: var(--rust);
  color: #fff;
}

.button-primary:hover {
  background: var(--rust-dark);
}

.button-quiet {
  border-color: rgba(21, 56, 59, 0.22);
  background: transparent;
}

.button-quiet:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 360px);
  align-items: center;
  min-height: 540px;
  padding-block: 72px 80px;
  gap: 64px;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: 90px;
  right: 0;
  width: 42vw;
  height: 480px;
  content: "";
  background:
    radial-gradient(circle at 70% 45%, rgba(213, 168, 75, 0.18), transparent 45%),
    radial-gradient(circle at 35% 70%, rgba(23, 107, 114, 0.13), transparent 44%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(46, 113, 88, 0.13);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 6.2vw, 86px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-lede {
  max-width: 660px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
}

.tex-inline {
  display: inline-block;
  max-width: 100%;
  color: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.tex-inline mjx-container[jax="CHTML"],
mjx-container[jax="CHTML"] {
  margin: 0;
  color: inherit;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 36px;
  gap: 12px;
}

.record-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 270px;
  padding: 26px;
  justify-self: end;
  background: var(--ink-deep);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.record-card::before {
  position: absolute;
  top: -120px;
  right: -100px;
  width: 250px;
  height: 250px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(255, 255, 255, 0.035),
    0 0 0 84px rgba(255, 255, 255, 0.02);
}

.record-card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-verified {
  background: rgba(101, 205, 164, 0.14);
  color: #91e2c2;
}

.record-card > p {
  position: relative;
  z-index: 1;
  max-width: 260px;
  margin: 31px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.record-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  margin-top: 6px;
  gap: 9px;
  font-family: var(--serif);
  font-size: 25px;
}

.record-value strong {
  font-size: 46px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.record-card #hero-record-name {
  margin-top: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.text-button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
}

.text-button:hover {
  color: var(--rust);
}

.record-card .text-button {
  position: relative;
  z-index: 2;
  margin-top: 9px;
  color: #fff;
}

.record-card .text-button:hover {
  color: #f2c977;
}

.text-button.compact {
  color: var(--teal);
  font-size: 12px;
}

.metrics-strip {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.metrics-grid > div {
  display: flex;
  min-height: 106px;
  flex-direction: column;
  justify-content: center;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.metrics-grid > div:last-child {
  border-right: 1px solid var(--line);
}

.metrics-grid strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.metrics-grid > div > span {
  color: var(--ink-soft);
  font-size: 12px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  margin-bottom: 36px;
  gap: 48px;
}

.section-heading h2 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(37px, 4.2vw, 56px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.section-heading.align-end {
  align-items: end;
}

.explorer-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  align-items: stretch;
  min-height: 630px;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.filter-panel {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: #f0ede4;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.filter-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filter-panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.field-label,
fieldset legend {
  display: block;
  margin: 19px 0 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

input[type="search"],
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d1cdc1;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

input[type="search"] {
  padding: 0 10px 0 38px;
}

select {
  padding: 0 32px 0 11px;
}

.range-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.range-label output {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 6px 0 4px;
  accent-color: var(--teal);
}

fieldset {
  padding: 0;
  margin: 18px 0 0;
  border: 0;
}

.check-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 29px;
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  gap: 9px;
}

.check-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1px solid #a7aaa1;
  background: #fff;
  border-radius: 4px;
}

.check-row input:checked + .check-box {
  border-color: var(--teal);
  background: var(--teal);
}

.check-row input:checked + .check-box::after {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 4px;
  height: 7px;
  content: "";
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.check-row input:focus-visible + .check-box {
  outline: 3px solid rgba(43, 146, 150, 0.25);
  outline-offset: 2px;
}

.filter-note {
  margin-top: 24px;
  padding: 13px;
  border: 1px solid rgba(23, 107, 114, 0.15);
  background: rgba(23, 107, 114, 0.06);
  border-radius: var(--radius-sm);
}

.filter-note strong {
  color: var(--teal);
  font-size: 11px;
}

.filter-note p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.chart-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.chart-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-button[aria-pressed="true"] {
  background: rgba(23, 107, 114, 0.1);
  color: var(--teal);
}

.toolbar-separator {
  margin-inline: 7px;
  color: #aba89e;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  gap: 6px;
}

.icon-button:hover {
  background: var(--paper-muted);
  color: var(--ink);
}

.icon-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chart-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 490px;
  padding: 6px 14px 0 0;
}

#atlas-chart {
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: visible;
}

.axis-line {
  stroke: #898f89;
  stroke-width: 1;
}

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

.grid-line.target {
  stroke: rgba(166, 77, 61, 0.45);
  stroke-dasharray: 4 5;
}

.tick-label {
  fill: #65777a;
  font-family: var(--sans);
  font-size: 11px;
}

.target-label {
  fill: var(--rust);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 750;
}

.axis-label {
  fill: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.curve-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  transition: opacity 150ms ease;
}

.curve-path.lower-bound {
  stroke-dasharray: 9 7;
}

.curve-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  cursor: pointer;
}

.curve-point {
  cursor: pointer;
  stroke: var(--paper-bright);
  stroke-width: 2;
  transition:
    r 120ms ease,
    opacity 120ms ease;
}

.curve-point:hover,
.curve-point:focus {
  r: 7;
}

.matroid-point {
  cursor: pointer;
  fill: var(--ink-deep);
  stroke: var(--paper-bright);
  stroke-width: 3;
  filter: drop-shadow(0 2px 3px rgba(21, 56, 59, 0.25));
  transition: r 120ms ease;
}

.matroid-point.global-record {
  fill: var(--rust);
}

.matroid-point:hover,
.matroid-point:focus {
  r: 10;
}

.chart-tooltip {
  position: fixed;
  z-index: 80;
  width: max-content;
  max-width: 260px;
  padding: 11px 13px;
  background: var(--ink-deep);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-size: 11px;
  line-height: 1.42;
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, -50%);
  transition: opacity 100ms ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.chart-tooltip span {
  color: rgba(255, 255, 255, 0.68);
}

.empty-chart {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 12px 18px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 13px;
  transform: translate(-50%, -50%);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  min-height: 60px;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--line);
  gap: 8px 18px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 10px;
  gap: 7px;
}

.legend-item:hover {
  color: var(--ink);
}

.legend-item.hidden-series {
  opacity: 0.4;
}

.legend-swatch {
  width: 23px;
  height: 0;
  border-top: 3px solid var(--swatch);
}

.legend-swatch.lower-bound {
  border-top-style: dashed;
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  height: 48px;
  padding: 0 18px;
  background: #efede5;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  height: 70px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

tbody tr:hover {
  background: rgba(23, 107, 114, 0.045);
}

.record-name-cell strong,
.record-name-cell span {
  display: block;
}

.record-name-cell strong {
  font-size: 13px;
}

.record-name-cell span {
  color: var(--ink-soft);
  font-size: 10px;
}

.exact-cell {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.field-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.field-badge,
.characteristic-badge,
.claim-badge,
.verification-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field-badge {
  background: rgba(23, 107, 114, 0.09);
  color: var(--teal);
}

.characteristic-badge {
  background: rgba(109, 76, 147, 0.1);
  color: var(--purple);
  text-transform: none;
}

.characteristic-badges {
  margin-top: 14px;
}

.claim-badge.exact {
  background: rgba(46, 113, 88, 0.1);
  color: var(--success);
}

.claim-badge.lower-bound {
  background: rgba(109, 76, 147, 0.1);
  color: var(--purple);
}

.verification-badge {
  background: rgba(21, 56, 59, 0.07);
  color: var(--ink-soft);
}

.table-open {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  background: var(--paper-muted);
  border-radius: 50%;
  cursor: pointer;
}

.family-section {
  background: var(--ink-deep);
  color: #fff;
}

.light-heading .eyebrow {
  color: #e7bc66;
}

.light-heading > p {
  color: rgba(255, 255, 255, 0.64);
}

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

.family-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 390px;
  padding: 27px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.045);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.family-card:hover {
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-3px);
}

.family-card::after {
  position: absolute;
  right: -45px;
  bottom: -65px;
  width: 190px;
  height: 190px;
  content: "";
  border: 1px solid var(--family-color);
  border-radius: 50%;
  opacity: 0.25;
}

.family-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.family-card h3 {
  max-width: 300px;
  margin: 34px 0 12px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.family-card > p {
  color: rgba(255, 255, 255, 0.63);
  font-size: 12px;
}

.family-card .family-byline {
  margin: -5px 0 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-transform: uppercase;
}

.family-card .family-discovery-date {
  margin: -7px 0 11px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  font-weight: 650;
}

.family-formula {
  margin-top: 24px;
  color: #fff;
  font-family: var(--serif);
  font-size: 18px;
}

.family-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 24px;
  gap: 14px;
}

.family-card-footer > div > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.family-card-footer strong {
  display: block;
  color: #fff;
  font-family: var(--serif);
  font-size: 22px;
}

.curve-mini {
  width: 75px;
  height: 34px;
  fill: none;
  stroke: var(--family-color);
  stroke-linecap: round;
  stroke-width: 3;
}

.curve-mini.lower-bound {
  stroke-dasharray: 7 5;
}

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

.challenge-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-md);
}

.challenge-card h3 {
  margin: 21px 0 10px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.08;
}

.challenge-card > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 12px;
}

.challenge-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.challenge-target > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.challenge-target strong {
  font-family: var(--serif);
  font-size: 16px;
}

.challenge-field-records {
  display: flex;
  flex-wrap: wrap;
  margin: 16px 0 20px;
  gap: 6px;
}

.challenge-field-records > span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--paper-muted);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.submission-section {
  background:
    linear-gradient(120deg, rgba(23, 107, 114, 0.08), transparent 38%),
    #ebe7dc;
}

.submission-heading {
  align-items: end;
}

.submission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.submission-card {
  position: relative;
  min-height: 455px;
  padding: 36px;
  border: 1px solid #d4d0c4;
  background: var(--paper-bright);
  border-radius: var(--radius-md);
}

.submission-number {
  display: block;
  margin-bottom: 52px;
  color: #aaa396;
  font-family: var(--serif);
  font-size: 17px;
}

.submission-card h3 {
  max-width: 430px;
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.submission-card > p:not(.eyebrow) {
  max-width: 520px;
  color: var(--ink-soft);
  font-size: 13px;
}

.check-list {
  padding: 0;
  margin: 23px 0 30px;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-block: 8px;
  padding-left: 23px;
  font-size: 12px;
}

.check-list li::before {
  position: absolute;
  top: 4px;
  left: 1px;
  width: 10px;
  height: 6px;
  content: "";
  border: solid var(--teal);
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

.repo-notice {
  display: flex;
  align-items: flex-start;
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid rgba(21, 56, 59, 0.12);
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  gap: 11px;
}

.repo-notice > span {
  display: grid;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  place-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
}

.repo-notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.repo-notice a,
.submission-guide-link,
.inline-link {
  color: var(--teal);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.repo-notice code {
  padding: 0.08em 0.3em;
  background: rgba(21, 56, 59, 0.07);
  border-radius: 4px;
  font-size: 0.9em;
}

.submission-guide-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.methods-grid article {
  min-height: 240px;
  padding: 31px;
  border-right: 1px solid var(--line);
}

.methods-grid article:first-child {
  border-left: 1px solid var(--line);
}

.methods-grid h3 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}

.methods-grid article > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 12px;
}

.line-sample {
  display: block;
  width: 72px;
  height: 0;
  margin-bottom: 35px;
  border-top: 3px solid var(--teal);
}

.dashed-line {
  border-top-color: var(--purple);
  border-top-style: dashed;
}

.point-sample {
  display: block;
  width: 15px;
  height: 15px;
  margin-bottom: 28px;
  background: var(--rust);
  border: 3px solid var(--paper-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--rust);
}

footer {
  padding-block: 52px;
  background: #0a282b;
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand .brand-mark {
  border-color: #fff;
}

.footer-brand .brand-mark::before,
.footer-brand .brand-mark::after {
  background: #fff;
}

.footer-brand .brand-mark span {
  background: #0a282b;
  border-color: #fff;
}

.footer-inner > div > p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.footer-inner > .footer-copy > .footer-heading {
  margin: 0;
  color: #fff;
  font-size: inherit;
}

.footer-inner > .footer-copy > .site-credit {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.footer-meta a:hover {
  color: #fff;
}

.detail-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(820px, calc(100vh - 42px));
  padding: 0;
  border: 0;
  background: var(--paper-bright);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 100px rgba(4, 24, 26, 0.34);
  color: var(--ink);
}

.detail-dialog::backdrop {
  background: rgba(5, 29, 31, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: sticky;
  z-index: 3;
  top: 18px;
  float: right;
  display: grid;
  width: 38px;
  height: 38px;
  margin: 18px 18px -56px 0;
  place-items: center;
  background: var(--paper-muted);
  border-radius: 50%;
  cursor: pointer;
}

.dialog-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

#detail-content {
  padding: 44px;
}

.detail-kicker {
  margin-bottom: 12px;
}

.detail-title {
  max-width: 620px;
  margin: 0;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.detail-lede {
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.detail-value {
  display: flex;
  align-items: baseline;
  margin: 30px 0;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
}

.detail-value strong {
  font-size: 42px;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.detail-grid > div {
  min-height: 80px;
  padding: 15px;
  border-right: 1px solid var(--line);
}

.detail-grid > div:last-child {
  border-right: 0;
}

.detail-grid > div > span,
.detail-section-label {
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 19px;
}

.detail-section {
  margin-top: 27px;
}

.detail-section p {
  color: var(--ink-soft);
  font-size: 12px;
}

.detail-section h4 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: 20px;
}

.matrix-wrap {
  overflow-x: auto;
  margin-top: 12px;
  padding: 15px;
  background: #eeece4;
  border-radius: var(--radius-sm);
}

.matrix-table {
  width: auto;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 10px 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.matrix-table td {
  height: auto;
  padding: 0;
  border: 0;
}

.detail-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
}

.benchmark-list {
  display: grid;
  margin-top: 12px;
  gap: 8px;
}

.benchmark-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  gap: 16px;
}

.benchmark-entry strong,
.benchmark-entry span {
  display: block;
}

.benchmark-entry span {
  color: var(--ink-soft);
  font-size: 10px;
}

.benchmark-entry button {
  flex: 0 0 auto;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 13px 17px;
  background: var(--ink-deep);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 100;
  padding: 16px;
  background: #fff0cc;
  border: 1px solid #d29f37;
  border-radius: var(--radius-sm);
}

@media (max-width: 1040px) {
  .primary-nav {
    display: none;
  }

  .header-inner .button {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(50px, 7vw, 72px);
  }

  .explorer-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .family-grid,
  .challenge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-card:last-child,
  .challenge-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .section-shell,
  .header-inner {
    width: min(100% - 30px, 720px);
  }

  .section-block {
    padding-block: 70px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 70px;
  }

  .record-card {
    width: min(100%, 390px);
    min-height: 255px;
    justify-self: start;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid > div:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .metrics-grid > div:nth-child(4) {
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
  }

  .section-heading > p {
    max-width: 580px;
  }

  .explorer-shell {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    gap: 0 18px;
  }

  .filter-panel-heading,
  .filter-note {
    grid-column: span 2;
  }

  .filter-panel fieldset {
    margin-top: 9px;
  }

  .chart-wrap {
    min-height: 430px;
  }

  #atlas-chart {
    min-height: 420px;
  }

  .submission-grid,
  .methods-grid {
    grid-template-columns: 1fr;
  }

  .methods-grid article,
  .methods-grid article:first-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .header-inner .button {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-lede {
    font-size: 19px;
  }

  .metrics-grid > div {
    min-height: 92px;
    padding-left: 17px;
  }

  .section-heading h2 {
    font-size: 38px;
  }

  .filter-panel {
    display: block;
  }

  .chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 12px;
    gap: 5px;
  }

  .chart-toolbar-actions {
    flex-wrap: wrap;
  }

  .chart-wrap {
    min-height: 360px;
    padding-right: 0;
  }

  #atlas-chart {
    min-height: 350px;
  }

  .chart-legend {
    max-height: 120px;
    overflow-y: auto;
  }

  .family-grid,
  .challenge-grid {
    grid-template-columns: 1fr;
  }

  .family-card:last-child,
  .challenge-card:last-child {
    grid-column: auto;
  }

  .submission-card {
    min-height: 0;
    padding: 27px;
  }

  .submission-number {
    margin-bottom: 34px;
  }

  .detail-title {
    font-size: 34px;
  }

  #detail-content {
    padding: 32px 24px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-grid > div:last-child {
    border-bottom: 0;
  }

  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* Public mathematics and contribution pages */

.document-shell {
  width: min(900px, calc(100% - 48px));
  margin-inline: auto;
  padding: 82px 0 110px;
}

.document-hero {
  max-width: 790px;
  padding-bottom: 48px;
}

.document-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 78px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.document-hero > p:last-child {
  max-width: 690px;
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.48;
}

.document-toc {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 68px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-sm);
  gap: 8px 20px;
}

.document-toc a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
}

.document-toc .toc-subitem {
  padding-left: 9px;
  border-left: 2px solid rgba(23, 107, 114, 0.2);
  color: var(--ink-soft);
  font-weight: 600;
}

.document-toc a:hover,
.document-section a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.document-section {
  padding: 62px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.document-section h2 {
  max-width: 760px;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 49px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.document-section h3 {
  margin: 38px 0 12px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
}

.document-section > p,
.document-section > ul,
.document-section > ol {
  max-width: 760px;
}

.document-section > p {
  margin: 17px 0;
  color: #294d50;
  line-height: 1.72;
}

.math-panel {
  max-width: 850px;
  margin: 25px 0;
  padding: 18px 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-sm);
  font-family: var(--serif);
}

.math-panel.emphasized {
  border-left: 4px solid var(--teal);
  background:
    linear-gradient(90deg, rgba(23, 107, 114, 0.055), transparent 70%),
    var(--paper-bright);
}

.math-panel-note {
  margin: 7px 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.math-panel mjx-container[display] {
  min-width: max-content;
  margin-block: 0.7em !important;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 28px 0;
  gap: 14px;
}

.history-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.definition-grid article {
  min-height: 185px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-sm);
}

.definition-grid article > span {
  display: block;
  color: var(--rust);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.definition-grid strong {
  display: block;
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-size: 24px;
}

.definition-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.submission-overview {
  margin-bottom: 68px;
}

.workflow-list {
  padding: 0;
  list-style: none;
  counter-reset: workflow;
}

.workflow-list li {
  position: relative;
  min-height: 54px;
  margin: 0 0 17px;
  padding-left: 58px;
  color: #294d50;
  counter-increment: workflow;
}

.workflow-list li::before {
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  width: 38px;
  height: 38px;
  content: counter(workflow, decimal-leading-zero);
  place-items: center;
  background: var(--ink-deep);
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
}

.workflow-list strong {
  display: block;
  color: var(--ink);
}

.document-list {
  padding-left: 23px;
  color: #294d50;
}

.document-list li {
  margin: 10px 0;
  padding-left: 5px;
}

.document-callout {
  max-width: 790px;
  margin: 28px 0;
  padding: 21px 23px;
  border-left: 4px solid var(--gold);
  background: #fff8e6;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #3d5050;
}

.document-callout strong {
  color: var(--ink);
}

.family-program > .family-program-intro {
  max-width: 820px;
  font-family: var(--serif);
  font-size: 19px;
}

.family-program-body {
  margin-top: 42px;
  padding-left: 30px;
  border-left: 3px solid rgba(23, 107, 114, 0.22);
}

.family-subsection {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.family-subsection:first-child {
  border-top-color: rgba(23, 107, 114, 0.28);
}

.family-subsection > h3 {
  max-width: 780px;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(31px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.family-subsection h4 {
  margin: 38px 0 12px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.family-subsection > p,
.family-subsection > ul,
.family-subsection > ol {
  max-width: 760px;
}

.family-subsection > p {
  margin: 17px 0;
  color: #294d50;
  line-height: 1.72;
}

.reference-mark {
  display: inline-flex;
  margin-left: 0.14em;
  gap: 0.12em;
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

.document-section .reference-mark a {
  color: var(--rust);
  text-decoration: none;
}

.reference-list {
  padding-left: 24px;
}

.reference-list li {
  margin: 16px 0;
  padding-left: 7px;
  color: #294d50;
  scroll-margin-top: 100px;
}

.reference-list li:target {
  background: rgba(220, 178, 74, 0.12);
}

.document-table {
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  border-radius: var(--radius-sm);
}

.document-table tbody tr {
  cursor: default;
}

.document-table td {
  min-width: 150px;
  height: auto;
  padding-block: 15px;
  vertical-align: top;
}

.code-panel {
  max-width: 850px;
  margin: 20px 0;
  padding: 20px 22px;
  overflow-x: auto;
  background: var(--ink-deep);
  border-radius: var(--radius-sm);
  color: #edf7f4;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  padding-top: 38px;
  border-top: 1px solid var(--line);
  gap: 10px;
}

.article-page code {
  padding: 0.12em 0.35em;
  background: rgba(21, 56, 59, 0.07);
  border-radius: 4px;
  font-size: 0.9em;
}

.article-page .code-panel code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

@media (max-width: 700px) {
  .document-shell {
    width: min(100% - 30px, 900px);
    padding: 58px 0 82px;
  }

  .document-hero {
    padding-bottom: 38px;
  }

  .document-hero h1 {
    font-size: 48px;
  }

  .document-hero > p:last-child {
    font-size: 18px;
  }

  .document-toc {
    margin-bottom: 48px;
  }

  .document-section {
    padding: 48px 0;
  }

  .definition-grid {
    grid-template-columns: 1fr;
  }

  .family-program-body {
    padding-left: 14px;
  }

  .family-subsection {
    padding: 44px 0;
  }

  .math-panel {
    margin-inline: -4px;
    padding: 14px 17px;
  }
}
