:root {
  color-scheme: light;
  --ink: #171a1f;
  --muted: #596270;
  --line: #d9dee7;
  --panel: #ffffff;
  --band: #f4f7fb;
  --accent: #176f7a;
  --accent-strong: #0c4f59;
  --warm: #b85b2a;
  --shadow: 0 18px 48px rgba(25, 34, 44, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfe;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(251, 252, 254, 0.92);
  border-bottom: 1px solid rgba(217, 222, 231, 0.8);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 760;
  font-size: 18px;
  letter-spacing: 0;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--accent-strong);
}

main {
  overflow: hidden;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 24px 32px;
}

.hero-copy {
  min-width: 0;
  max-width: 1240px;
  width: 100%;
  padding-top: 0;
  text-align: center;
}

.venue,
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  word-break: normal;
}

h1 {
  max-width: 1240px;
  margin: 0;
  font-size: clamp(32px, 3.45vw, 50px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
  white-space: nowrap;
}

.title-tail {
  max-width: 1240px;
  margin: 18px auto 0;
  color: #232b35;
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 680;
  line-height: 1.22;
  text-wrap: balance;
  white-space: nowrap;
}

.authors {
  max-width: 1040px;
  margin: 22px auto 0;
  color: #232b35;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.45;
}

.authors span {
  display: inline;
}

.affiliations,
.notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  max-width: 920px;
  margin: 6px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.affiliations span,
.notes span {
  display: inline-block;
}

.subtitle {
  max-width: 780px;
  margin: 20px auto 0;
  color: #35404c;
  font-size: clamp(16px, 1.75vw, 19px);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

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

.button.disabled {
  color: #7d8793;
  cursor: not-allowed;
}

.hero-media {
  width: 100%;
  min-width: 0;
  max-width: 1180px;
  margin: 0;
  padding-top: 0;
}

.hero-media img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 24px;
}

.section.narrow {
  max-width: 860px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 24px;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(29px, 3.7vw, 42px);
  font-weight: 740;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.section p {
  margin-top: 0;
  color: #303945;
  font-size: 17px;
  line-height: 1.6;
}

.method-section {
  padding-top: 56px;
  padding-bottom: 44px;
}

.method-stack {
  display: grid;
  gap: 24px;
}

.method-item {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: center;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(25, 34, 44, 0.06);
}

.method-item figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.method-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 6px;
  background: #fff;
}

.method-copy {
  min-width: 0;
}

.method-copy h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.method-copy p {
  margin: 0;
  color: #3f4a57;
  font-size: 16px;
  line-height: 1.58;
}

.task-group + .task-group {
  margin-top: 38px;
}

#videos {
  --task-card-width: min(520px, calc(100% - 144px));
}

.task-group-title {
  margin-bottom: 14px;
  color: #303945;
  font-size: 20px;
}

.task-grid {
  display: grid;
  gap: 16px;
}

.task-grid-long {
  grid-template-columns: var(--task-card-width);
  justify-content: center;
}

.task-card {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(25, 34, 44, 0.07);
}

.task-carousel {
  position: relative;
  min-width: 0;
  outline: none;
}

.task-carousel:focus-visible {
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(23, 111, 122, 0.24);
}

.task-carousel-stage {
  display: grid;
  overflow: hidden;
  min-width: 0;
  padding: 8px 0 12px;
  isolation: isolate;
}

.carousel-card {
  grid-area: 1 / 1;
  width: var(--task-card-width);
  justify-self: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.7);
  filter: saturate(0.45) brightness(0.88);
  transition: transform 360ms ease, opacity 280ms ease, filter 280ms ease, box-shadow 280ms ease;
}

.carousel-card.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  filter: none;
  box-shadow: var(--shadow);
}

.carousel-card.is-prev,
.carousel-card.is-next {
  z-index: 1;
  opacity: 0.3;
  pointer-events: auto;
  cursor: pointer;
}

.carousel-card.is-prev {
  transform: translateX(-82%) scale(0.72);
}

.carousel-card.is-next {
  transform: translateX(82%) scale(0.72);
}

.carousel-card:not(.is-active) video {
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: 42%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(217, 222, 231, 0.95);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
  box-shadow: 0 8px 24px rgba(25, 34, 44, 0.18);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.carousel-arrow-prev {
  left: max(8px, calc(50% - 286px));
}

.carousel-arrow-next {
  right: max(8px, calc(50% - 286px));
}

.carousel-pagination {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 4px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #bec6d0;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.carousel-dot:hover,
.carousel-dot:focus-visible {
  background: var(--accent);
}

.carousel-dot.is-active {
  width: 28px;
  background: var(--accent);
}

.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;
}

.task-card video {
  display: block;
  width: 100%;
  /* 9:16 source with 10% cropped from the top and 20% from the bottom. */
  aspect-ratio: 45 / 56;
  background: #111;
  object-fit: cover;
  object-position: center 33.333%;
}

.task-meta {
  padding: 16px 18px 18px;
}

.task-meta h4 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.task-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

pre {
  overflow-x: auto;
  padding: 18px;
  background: #101820;
  color: #e9f0f4;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 50px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    padding-top: 30px;
  }

  h1,
  .title-tail {
    white-space: normal;
  }

  .method-item {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 620px) {
  html,
  body,
  main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
  }

  nav {
    gap: 12px;
  }

  .hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }

  h1 {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    font-size: 26px;
    line-height: 1.1;
  }

  h2 {
    max-width: 340px;
    font-size: 25px;
  }

  .hero-copy,
  .hero-media,
  .section-heading,
  .method-stack,
  .method-item,
  .task-grid,
  .task-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .section-heading p,
  .section.narrow p {
    max-width: 320px;
  }

  .title-tail {
    max-width: 300px;
    font-size: 16px;
  }

  .authors {
    max-width: 320px;
    font-size: 10.5px;
    line-height: 1.35;
  }

  .authors span {
    display: block;
  }

  .affiliations,
  .notes {
    max-width: 295px;
    gap: 3px 12px;
    font-size: 11px;
  }

  .affiliations {
    flex-direction: column;
    align-items: center;
  }

  .notes {
    gap: 3px 10px;
  }

  .subtitle {
    max-width: 295px;
    font-size: 13px;
  }

  .actions {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .method-item {
    padding: 12px;
  }

  .method-item figure {
    overflow-x: auto;
  }

  .method-item img {
    width: max(620px, 100%);
    max-width: none;
  }

  .method-copy h3 {
    max-width: 100%;
    font-size: 19px;
  }

  .method-copy p {
    font-size: 15px;
  }

  #videos {
    --task-card-width: min(520px, calc(100% - 48px));
  }

  .carousel-card {
    width: var(--task-card-width);
  }

  .carousel-arrow {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .task-group + .task-group {
    margin-top: 32px;
  }

  .task-group-title {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-card,
  .carousel-arrow,
  .carousel-dot {
    transition: none;
  }
}
