@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./media/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --text-color: #111111;
  --secondary-text-color: #303030;
  --muted-color: #5b6270;
  --line-color: #e3e7ee;
  --soft-background: #f5f7fa;
  --accent-color: #0a8fb8;
  --content-width: 1120px;
  --text-width: 820px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-color);
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.65;
}

.project,
.hero-meta,
.hero-title,
.hero-media {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-right: 20px;
  padding-left: 20px;
}

.project-header {
  padding-top: 56px;
  text-align: center;
}

.hero-title {
  color: var(--text-color);
}

.teaser {
  margin: 0;
}

.hero-media .video-frame {
  background: #0d0f12;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.project-name {
  color: #52387a;
  background: linear-gradient(105deg, #24518d 0%, #52387a 58%, #7c2c62 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.hero-meta {
  padding-top: 24px;
  padding-bottom: 40px;
}

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

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

a[data-placeholder] {
  cursor: default;
}

.submission {
  margin: 0 0 22px;
  color: var(--muted-color);
  font-size: .92rem;
}

.publication-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: var(--text-color);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
}

.resource-link[data-placeholder] {
  border-color: var(--line-color);
  color: var(--muted-color);
  background: var(--soft-background);
}

.video-frame {
  overflow: hidden;
  border-radius: 12px;
  background: #efefef;
  aspect-ratio: 16 / 9;
}

video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

video:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: -3px;
}

.method-section,
.results-section {
  padding: 56px 0;
}

.project > section + section {
  border-top: 1px solid var(--line-color);
}

.method-section h2,
.results-section h2 {
  margin: 0 0 16px;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
  text-align: left;
}

.method-figure {
  margin: 28px 0 0;
}

.method-video-frame {
  aspect-ratio: 2160 / 592;
  border-radius: 0;
  background: #fff;
}

.results-summary {
  max-width: var(--text-width);
  margin: 0 0 24px;
  color: var(--secondary-text-color);
  font-size: 1rem;
  line-height: 1.65;
}

.results-figure {
  margin: 0;
}

.results-chart {
  position: relative;
  padding: 26px 20px 18px;
  border: 1px solid var(--line-color);
  border-radius: 12px;
  background: #fff;
}

.results-chart[hidden],
.chart-data[hidden],
.chart-tooltip[hidden] {
  display: none;
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 0 10px;
  margin-bottom: 28px;
}

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

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chart-method-pi05 {
  --bar-color: #626975;
  --bar-ink: #3e4653;
}

.chart-method-dsrl {
  --bar-color: #d49146;
  --bar-ink: #8a511b;
}

.chart-method-anchorq {
  --bar-color: #14977c;
  --bar-ink: #076b56;
}

.chart-swatch {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--bar-color);
}

.legend-detail {
  color: #52565e;
}

.chart-panels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chart-panel {
  min-width: 0;
  padding: 18px 12px 12px;
  border-radius: 12px;
}

.chart-panel-average {
  background: #f0f7f4;
}

.chart-panel h3 {
  margin: 0 0 28px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.chart-average-context {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #d7e4dd;
  font-size: 12px;
}

.chart-average-label {
  color: #33574c;
  font-size: 12px;
  text-align: center;
}

.chart-average-context > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 6px;
  font-variant-numeric: tabular-nums;
}

.chart-plot {
  position: relative;
  height: 196px;
  margin-left: 24px;
}

.chart-grid,
.chart-bars {
  position: absolute;
  inset: 0;
}

.chart-grid > span {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #e6e8e7;
}

.chart-grid > span:first-child {
  border-color: #aeb7b2;
}

.chart-grid > span > span {
  position: absolute;
  right: calc(100% + 7px);
  transform: translateY(-50%);
  color: #585f5b;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.chart-bars {
  display: flex;
  gap: 8px;
  padding: 0 5px;
}

.chart-bar-slot {
  position: relative;
  flex: 1;
  min-width: 0;
}

.chart-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 5px 5px 0 0;
  background: var(--bar-color);
  cursor: pointer;
  transition: filter 120ms ease, box-shadow 120ms ease;
}

.chart-bar:hover,
.chart-bar:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--bar-ink);
  outline: none;
}

.chart-value {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--bar-ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.chart-interval {
  position: absolute;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--bar-ink);
  pointer-events: none;
}

.chart-interval::before,
.chart-interval::after {
  content: "";
  position: absolute;
  left: -4px;
  width: 10px;
  height: 2px;
  background: var(--bar-ink);
}

.chart-interval::before {
  top: 0;
}

.chart-interval::after {
  bottom: 0;
}


.chart-hint {
  margin: 20px 0 0;
  color: #46524c;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 12px 15px;
  border: 1px solid #dce3df;
  border-radius: 10px;
  color: #17261f;
  background: #fff;
  box-shadow: 0 5px 20px #152d1f1a;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}

.chart-tooltip strong {
  font-weight: 600;
}

.chart-tooltip-action {
  color: #076b56;
}

.chart-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 14px;
  color: #414943;
  font-size: 12px;
  line-height: 1.6;
}

.chart-caption p {
  flex: 1 1 500px;
  margin: 0;
}

.chart-data summary {
  color: #33584a;
  text-underline-offset: 3px;
}

.chart-data {
  margin-top: 10px;
  font-size: 13px;
}

.chart-data summary {
  width: fit-content;
  cursor: pointer;
}

.chart-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.chart-data table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.chart-data th,
.chart-data td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4e7e5;
  text-align: right;
  white-space: nowrap;
}

.chart-data th:first-child {
  text-align: left;
}

.chart-data td span {
  color: #525b55;
}

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

  .chart-average-context {
    max-width: 175px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .results-chart {
    padding: 20px 10px 16px;
    border-radius: 12px;
  }

  .chart-toolbar {
    gap: 12px;
    margin-bottom: 18px;
    padding: 0 4px;
  }

  .chart-legend {
    gap: 12px;
    font-size: 12px;
  }

  .chart-legend .legend-detail {
    display: none;
  }

  .chart-panel {
    padding: 12px 6px 10px;
  }

  .chart-panel h3 {
    font-size: 15px;
  }

  .chart-plot {
    height: 160px;
    margin-left: 22px;
  }

  .chart-bars {
    gap: 7px;
    padding: 0 3px;
  }

  .chart-value {
    font-size: 11px;
  }

}

.task-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 30px 0 18px;
}

.task-selector a {
  padding: 9px 18px;
  border: 1px solid #d9d9df;
  border-radius: 999px;
  color: var(--text-color);
  background: #f8f8fa;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}

.task-selector a:hover {
  border-color: #777;
}

.task-selector a[aria-current="true"] {
  border-color: #242424;
  color: #fff;
  background: #242424;
}

.result-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 16px;
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.5;
}

.result-methods span {
  color: var(--secondary-text-color);
}

.result-methods a {
  color: var(--text-color);
  text-underline-offset: 5px;
}

.result-methods a:hover,
.result-methods a[aria-current="true"] {
  color: #52387a;
}

.result-methods a[aria-current="true"] {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.task-selector a:focus-visible,
.result-methods a:focus-visible,
.results-figure a:focus-visible,
.chart-data summary:focus-visible {
  outline: 2px solid #6557ac;
  outline-offset: 4px;
}

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

@media (max-width: 560px) {
  .project,
  .hero-meta,
  .hero-title,
  .hero-media {
    padding-right: 16px;
    padding-left: 16px;
  }

  .project-header {
    padding-top: 32px;
  }

  .hero-meta {
    padding-top: 20px;
    padding-bottom: 32px;
  }

  .method-section,
  .results-section {
    padding: 40px 0;
  }

  .task-selector {
    gap: 6px;
    margin-top: 24px;
  }

  .task-selector a {
    padding: 8px 10px;
    font-size: 14px;
  }

  .result-methods {
    gap: 14px;
    margin-top: 14px;
    font-size: 16px;
  }
}

@media (forced-colors: active) {
  .project-name {
    color: CanvasText;
    background: none;
    -webkit-text-fill-color: CanvasText;
  }

  .hero-title {
    color: CanvasText;
    background: Canvas;
  }

  .resource-link {
    border: 1px solid ButtonText;
  }

  .chart-bar,
  .chart-swatch {
    background: ButtonText;
    border: 1px solid ButtonText;
  }

  .chart-interval,
  .chart-interval::before,
  .chart-interval::after {
    background: Highlight;
  }

  .chart-bar:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-bar {
    transition: none;
  }
}
