:root {
  --bg: #fff9f1;
  --bg-2: #fffefb;
  --paper: rgba(255, 253, 249, 0.88);
  --paper-strong: #fffdfa;
  --ink: #1f2a3a;
  --muted: #5d6b80;
  --line: rgba(69, 57, 44, 0.12);
  --shadow: 0 24px 60px rgba(110, 82, 42, 0.12);
  --shadow-soft: 0 14px 34px rgba(110, 82, 42, 0.08);
  --blue: #346fd1;
  --blue-2: #62b6e6;
  --rose: #f2c8cf;
  --rose-soft: #fff0f3;
  --gold: #ecd388;
  --gold-soft: #fff8de;
  --sky-soft: #ebf7ff;
  --sage-soft: #eff8f1;
  --brand-amber: #c57c0c;
  --brand-amber-deep: #ab6400;
  --radius: 30px;
  --radius-sm: 22px;
  --max-width: 1280px;
  --content-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(98, 182, 230, 0.17), transparent 28rem),
    radial-gradient(circle at 100% 0%, rgba(245, 194, 116, 0.18), transparent 28rem),
    radial-gradient(circle at 50% 20%, rgba(242, 200, 207, 0.12), transparent 24rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 26%, var(--bg) 100%);
}

body.is-lightbox-open {
  overflow: hidden;
}

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

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

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

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

.page-shell {
  position: relative;
  overflow: clip;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(255, 249, 241, 0.82);
  border-bottom: 1px solid rgba(69, 57, 44, 0.08);
}

.site-header__inner,
.section {
  width: min(var(--max-width), calc(100vw - 88px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand span,
.hero__title-accent {
  background: linear-gradient(180deg, var(--brand-amber) 0%, var(--brand-amber-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--brand-amber);
  -webkit-text-fill-color: transparent;
}

.brand img {
  width: 32px;
  height: 32px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a {
  position: relative;
  padding: 10px 8px 14px;
  color: var(--muted);
  transition: 0.18s ease;
}

.top-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transition: 0.18s ease;
}

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

.top-nav a.is-active {
  color: var(--ink);
}

.top-nav a.is-active::after {
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.section {
  position: relative;
  padding: 60px 28px;
}

.section--panel::before {
  content: "";
  position: absolute;
  inset: 24px calc((100% - var(--content-width)) / 2 - 40px);
  z-index: -1;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 237, 0.9));
  box-shadow: var(--shadow);
}

.section--warm::before {
  background: linear-gradient(180deg, rgba(255, 246, 224, 0.92), rgba(255, 250, 241, 0.92));
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: normal;
}

.hero {
  padding-top: 56px;
}

.hero__inner {
  max-width: var(--content-width);
  margin: 0 auto 40px;
  text-align: center;
}

h1 {
  display: block;
  font-size: clamp(2.5rem, 3.5vw, 3.55rem);
  line-height: 0.98;
  text-align: center;
}

.hero__title {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.hero__mark {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
}

.hero__title-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 auto;
}

h1 > span {
  display: block;
  white-space: nowrap;
  text-align: center;
}

.hero__line {
  display: block;
  white-space: nowrap;
}

h1 span + span {
  margin-top: 4px;
}

.hero__authors,
.hero__affiliation,
.hero__summary,
.section-heading p,
.text-card,
.figure-card figcaption,
.result-card p,
.glance-card p,
.profile-card p,
.failure-card p,
.citation-card pre,
.lightbox__caption {
  line-height: 1.72;
}

.hero__authors {
  margin: 18px auto 10px;
  max-width: var(--content-width);
  color: var(--blue);
  font-size: clamp(1.05rem, 1.4vw, 1.14rem);
  font-weight: 550;
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  line-height: 1.5;
}

.hero__authors a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

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

.hero__authors div + div {
  margin-top: 4px;
}

.hero__affiliation {
  margin: 0 auto 18px;
  color: var(--muted);
}

.hero__summary {
  max-width: var(--content-width);
  margin: 0 auto 32px;
  font-size: 1rem;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
}

.hero__actions,
.figure-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__actions {
  justify-content: center;
  margin-bottom: 34px;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hero__actions::-webkit-scrollbar {
  display: none;
}

.hero-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  min-width: 122px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.hero-pill--dark {
  background: linear-gradient(180deg, #4a4d56, #40434b);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 9px 20px rgba(52, 55, 63, 0.14);
}

.hero-pill--dark:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #555963, #4a4e57);
  box-shadow: 0 12px 24px rgba(52, 55, 63, 0.16);
}

.hero-pill--placeholder {
  cursor: default;
}

.hero-pill--placeholder:hover {
  transform: none;
  background: linear-gradient(180deg, #4a4d56, #40434b);
  box-shadow: 0 9px 20px rgba(52, 55, 63, 0.14);
}

.hero-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.96);
}

.hero-pill__icon--emoji {
  width: 24px;
  font-size: 1.05rem;
  line-height: 1;
}

.hero-pill__icon--badge {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 14px 28px rgba(52, 111, 209, 0.2);
}

.button--secondary,
.button--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(52, 111, 209, 0.12);
}

.button--small {
  min-height: 40px;
  padding: 0 14px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto;
  padding: 0;
  max-width: var(--content-width);
  list-style: none;
}

.stat-strip li {
  padding: 15px 18px;
  border-radius: 18px;
  border: 1px solid rgba(69, 57, 44, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.stat-strip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.35rem;
  color: var(--blue);
}

.stat-strip span {
  color: var(--muted);
  font-size: 0.95rem;
}

.figure-card,
.glance-card,
.profile-card,
.result-card,
.failure-card,
.text-card,
.citation-card,
.table-card,
.section-link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.figure-card,
.citation-card,
.table-card {
  padding: 18px;
}

.figure-card--hero {
  position: relative;
  margin: 0 auto 24px;
  max-width: var(--content-width);
}

.task-family .figure-card {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.figure-card--hero::before,
.figure-card--hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  border: 1px dashed rgba(52, 111, 209, 0.16);
}

.figure-card--hero::before {
  width: 240px;
  height: 240px;
  left: -28px;
  top: -30px;
  background: radial-gradient(circle, rgba(98, 182, 230, 0.08), transparent 70%);
}

.figure-card--hero::after {
  width: 180px;
  height: 180px;
  right: -16px;
  bottom: -22px;
  background: radial-gradient(circle, rgba(236, 211, 136, 0.12), transparent 72%);
}

.figure-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.figure-button img {
  width: 100%;
  border-radius: 20px;
}

.figure-card figcaption {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
}

.figure-actions {
  display: none;
}

.figure-story .figure-card,
#profiles .figure-card,
#analysis .figure-card,
.atlas .figure-card {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.section-links {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: center;
  gap: 16px 18px;
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  min-height: 56px;
  padding: 12px 20px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.18s ease;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(110, 82, 42, 0.06);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.72);
}

.section-link:hover {
  transform: translateY(-2px);
}

.section-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(52, 111, 209, 0.08);
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.section-heading--center {
  text-align: center;
}

.section-heading h2 {
  max-width: none;
  font-size: clamp(2rem, 3.2vw, 3rem);
  margin-bottom: 20px;
  line-height: 1.03;
  text-align: center;
  white-space: nowrap;
}

.heading-inline {
  white-space: normal;
}

.section-heading p {
  margin: 0 auto;
  max-width: var(--content-width);
  color: var(--muted);
  font-size: 1rem;
  text-align: justify;
  text-justify: inter-word;
}

.section-heading--results h2 {
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.35rem, 1.7vw, 1.65rem);
  white-space: normal;
  line-height: 1.08;
}

.section-heading--overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-heading--overview .eyebrow {
  text-align: center;
}

.section-heading--overview h2 {
  display: block;
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.9rem, 2.2vw, 2.35rem);
  white-space: nowrap;
  text-align: center;
}

.section-heading--overview p {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
  text-justify: inter-word;
}

.section-heading__lead--left {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: justify !important;
  text-justify: inter-word !important;
}

.text-card {
  padding: 22px 26px;
  color: var(--muted);
  font-size: 0.98rem;
}

.text-card--wide {
  max-width: var(--content-width);
  margin: 0 auto;
}

.abstract-body {
  max-width: var(--content-width);
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.72;
  text-align: justify;
  text-justify: inter-word;
}

.abstract-body p {
  margin: 0;
}

.glance-grid,
.profile-grid,
.result-cards,
.insight-row,
.failure-grid {
  display: grid;
  gap: 18px;
}

.glance-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
}

.glance-card,
.profile-card,
.result-card,
.failure-card {
  padding: 22px 24px;
}

.glance-card h3,
.profile-card h3,
.result-card h3,
.failure-card h3,
.text-card h3,
.figure-story__copy h3 {
  margin-bottom: 12px;
  font-size: 1.42rem;
}

.figure-story__copy h4 {
  margin-bottom: 12px;
  font-size: 1.32rem;
}

.glance-card p,
.profile-card p,
.result-card p,
.failure-card p,
.text-card p,
.figure-story__copy p {
  margin: 0;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
}

.glance-card--rose {
  box-shadow: inset 0 4px 0 var(--rose), var(--shadow-soft);
}

.glance-card--sky {
  box-shadow: inset 0 4px 0 rgba(98, 182, 230, 0.9), var(--shadow-soft);
}

.glance-card--gold {
  box-shadow: inset 0 4px 0 rgba(236, 211, 136, 0.95), var(--shadow-soft);
}

.glance-card--sage {
  box-shadow: inset 0 4px 0 rgba(168, 213, 173, 0.95), var(--shadow-soft);
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.profile-card--rose {
  background: linear-gradient(180deg, var(--rose-soft), rgba(255, 255, 255, 0.92));
}

.profile-card--sky {
  background: linear-gradient(180deg, var(--sky-soft), rgba(255, 255, 255, 0.92));
}

.profile-card--sage {
  background: linear-gradient(180deg, var(--sage-soft), rgba(255, 255, 255, 0.92));
}

.capability-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 36px;
  overflow-x: auto;
}

.example-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  max-width: var(--content-width);
  margin: 0 auto 28px;
}

.example-tab {
  padding: 11px 24px;
  border: 1px solid rgba(52, 111, 209, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}

.example-tab:hover,
.example-tab.is-active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: transparent;
}

.example-panel {
  display: none;
}

.example-panel.is-active {
  display: block;
}

.capability-row span {
  flex: 0 0 auto;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(52, 111, 209, 0.12);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-weight: 800;
}

.task-family {
  margin-top: 28px;
}

.task-family + .task-family {
  margin-top: 36px;
}

.task-family__header {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 24px;
}

.task-family__header h3 {
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.task-family__header p {
  margin: 0;
  max-width: var(--content-width);
  color: var(--muted);
  line-height: 1.72;
  text-align: justify;
  text-justify: inter-word;
}

.figure-story {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: 24px;
}

.figure-story + .figure-story {
  margin-top: 28px;
}

.figure-story__copy {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.atlas {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: 28px;
}

.atlas__tabs {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 20px;
}

.atlas-tab {
  flex: 0 0 auto;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(52, 111, 209, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  cursor: pointer;
  transition: 0.18s ease;
}

.atlas-tab:hover,
.atlas-tab.is-active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: transparent;
}

.atlas__header {
  margin-bottom: 16px;
}

.atlas__header h3 {
  font-size: 2rem;
}

.leaderboard-section {
  padding-top: 60px;
}

.leaderboard-heading {
  margin-bottom: 22px;
  text-align: center;
}

.leaderboard-heading span {
  display: inline-block;
  padding: 6px 12px;
  background: #dceecd;
  color: #324335;
  border-radius: 6px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
}

.leaderboard-card {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding: 40px 36px 34px;
  border: 1px solid rgba(69, 57, 44, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.leaderboard-intro h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 2.8vw, 2.65rem);
}

.leaderboard-quote {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
}

.leaderboard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.leaderboard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: #f2f5ef;
  border: 1px solid rgba(69, 57, 44, 0.08);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.leaderboard-badge--link {
  background: #dceecd;
  color: #355337;
}

.leaderboard-points {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.leaderboard-points li + li {
  margin-top: 10px;
}

.leaderboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 8px;
}

.leaderboard-summary-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(69, 57, 44, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #f7faf4, #ffffff);
}

.leaderboard-summary-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dceecd;
  color: #355337;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-summary-card h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.leaderboard-summary-card p {
  margin: 0;
  color: var(--muted);
  text-align: left;
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 22px;
}

.leaderboard-tab {
  padding: 11px 18px;
  border: 1px solid rgba(69, 57, 44, 0.1);
  border-radius: 14px;
  background: #f4f6f1;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}

.leaderboard-tab:hover,
.leaderboard-tab.is-active {
  background: #dceecd;
  color: #314434;
  border-color: transparent;
}

.leaderboard-panel {
  display: none;
}

.leaderboard-panel.is-active {
  display: block;
}

.leaderboard-table-card {
  margin: 0;
  border-radius: 20px;
  box-shadow: none;
  background: #fbfcfa;
}

.leaderboard-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(69, 57, 44, 0.08);
  text-align: left;
}

.leaderboard-table th {
  background: #f1f4ee;
  color: var(--ink);
  font-size: 0.9rem;
  white-space: nowrap;
}

.leaderboard-table th.is-sortable {
  position: relative;
  padding-right: 34px;
  cursor: pointer;
  user-select: none;
}

.leaderboard-table th.is-sortable::after {
  content: "↕";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(69, 57, 44, 0.42);
  font-size: 0.82rem;
  line-height: 1;
}

.leaderboard-table th.is-sortable.is-sorted::after {
  color: var(--ink);
}

.leaderboard-table th.is-sortable.is-sorted-asc::after {
  content: "↑";
}

.leaderboard-table th.is-sortable.is-sorted-desc::after {
  content: "↓";
}

.leaderboard-table th.is-sortable:focus-visible {
  outline: 2px solid rgba(98, 182, 230, 0.45);
  outline-offset: -2px;
}

.leaderboard-table tbody tr:nth-child(even) td {
  background: rgba(244, 246, 241, 0.58);
}

.leaderboard-table tbody td {
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.leaderboard-table tbody td:first-child {
  color: var(--ink);
  font-weight: 700;
}

.leaderboard-table .row--best td {
  background: #eef6e8;
}

.leaderboard-score {
  color: #1e5b2b;
  font-weight: 800;
}

.leaderboard-footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}

.leaderboard-contact {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

.leaderboard-contact a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.result-cards,
.insight-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-card__metric {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(98, 182, 230, 0.12);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.table-card {
  margin: 26px 0 24px;
  overflow: hidden;
}

.table-card--scroll {
  padding: 0;
}

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

.results-block {
  margin: 26px 0 10px;
}

.results-block h3 {
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.full-table {
  min-width: 1480px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(69, 57, 44, 0.08);
}

thead th {
  background: rgba(98, 182, 230, 0.12);
  font-size: 0.88rem;
  white-space: nowrap;
}

tbody td {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.row--best td {
  background: transparent;
}

.full-table td.cell--best {
  background: rgba(239, 248, 241, 0.96);
  color: #1e5b2b;
  font-weight: 800;
}

.failure-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: 28px;
}

.failure-card--rose {
  background: linear-gradient(180deg, var(--rose-soft), rgba(255, 255, 255, 0.92));
}

.failure-card--gold {
  background: linear-gradient(180deg, var(--gold-soft), rgba(255, 255, 255, 0.92));
}

.failure-card--sky {
  background: linear-gradient(180deg, var(--sky-soft), rgba(255, 255, 255, 0.92));
}

.failure-card--sage {
  background: linear-gradient(180deg, var(--sage-soft), rgba(255, 255, 255, 0.92));
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  gap: 18px;
  margin-top: 28px;
}

.analysis-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.analysis-card h3 {
  margin-bottom: 14px;
  font-size: 1.34rem;
}

.analysis-card .figure-button img {
  border-radius: 20px;
}

.analysis-card__hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, 0.76);
}

.lightbox__panel {
  position: relative;
  width: min(1400px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  overflow: auto;
}

.lightbox__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.lightbox__header h3 {
  font-size: 1.6rem;
}

.lightbox__close {
  position: sticky;
  top: 0;
  float: right;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(69, 57, 44, 0.12);
  background: white;
  cursor: pointer;
  z-index: 2;
}

.lightbox__content img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: white;
}

.lightbox__caption {
  margin: 16px 0 0;
  color: var(--muted);
}

@media (min-width: 1100px) {
  .heading-inline {
    white-space: nowrap;
  }
}

@media (max-width: 1180px) {
  .site-header__inner,
  .section {
    width: min(var(--max-width), calc(100vw - 52px));
  }

  .glance-grid,
  .result-cards,
  .insight-row,
  .leaderboard-summary,
  .analysis-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .section-links {
    grid-template-columns: repeat(2, max-content);
  }
}

@media (max-width: 820px) {
  .site-header__inner {
    min-height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .site-header__inner,
  .section {
    width: min(var(--max-width), calc(100vw - 24px));
  }

  .section {
    padding: 48px 16px;
  }

  .section--panel::before {
    inset: 14px 0;
    border-radius: 28px;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero__title {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hero__mark {
    width: 60px;
    height: 60px;
  }

  h1 > span {
    white-space: normal;
  }

  .hero__line {
    white-space: normal;
  }

  .section-heading h2 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    white-space: normal;
  }

  .section-heading--overview h2 {
    white-space: normal;
    font-size: clamp(1.95rem, 7vw, 2.8rem);
  }

  .leaderboard-card {
    padding: 24px 18px 20px;
  }

  .leaderboard-table {
    min-width: 920px;
  }

  .hero-pill {
    min-height: 50px;
    min-width: 138px;
    padding: 0 18px;
    font-size: 0.9rem;
  }

  .hero-pill__icon--badge {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .hero__inner,
  .text-card--wide {
    max-width: none;
  }

  .stat-strip,
  .glance-grid,
  .result-cards,
  .insight-row,
  .leaderboard-summary,
  .failure-grid,
  .section-links,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .capability-row {
    justify-content: flex-start;
  }

  .figure-card,
  .table-card,
  .citation-card,
  .analysis-card {
    padding: 16px;
  }

  .glance-card,
  .profile-card,
  .result-card,
  .failure-card,
  .text-card {
    padding: 22px;
  }

  .lightbox__panel {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    margin: 9px auto;
    padding: 16px;
  }

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