:root {
  --ink: #18202a;
  --muted: #5d6976;
  --line: #d8e0e7;
  --paper: #fbfcfd;
  --blue: #205f8e;
  --blue-dark: #133d5f;
  --green: #34775d;
  --orange: #b56a2b;
  --soft-blue: #eef6fb;
  --soft-green: #edf6f1;
  --shadow: 0 18px 50px rgba(14, 28, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 0 30px;
  background: rgba(251, 252, 253, 0.94);
  border-bottom: 1px solid rgba(216, 224, 231, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--blue-dark);
  border-radius: 8px;
  font-weight: 850;
}

.brand strong {
  color: var(--muted);
  font-size: 0.94rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

nav a {
  padding: 9px 10px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
  background: #edf2f6;
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 42svh;
  overflow: hidden;
  background: #f5f8fb;
}

.hero-media,
.hero-content {
  grid-area: 1 / 1;
}

.hero-media {
  display: none;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 58px;
  color: var(--ink);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--orange);
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1 {
  width: min(980px, 100%);
  margin-bottom: 14px;
  font-size: clamp(2.5rem, 5.2vw, 4.9rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.65rem, 2.7vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.32;
  letter-spacing: 0;
}

.hero-subtitle {
  width: min(840px, 100%);
  margin-bottom: 24px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.58rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.button-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.button-note {
  font-weight: 700;
  opacity: 0.82;
}

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

.button.ghost {
  color: var(--blue-dark);
  background: #fff;
  border-color: var(--line);
}

.section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0;
}

.section.band {
  width: 100%;
  max-width: none;
  padding: 88px max(24px, calc((100% - 1180px) / 2));
  background: var(--soft-green);
}

.section-heading {
  width: min(900px, 100%);
  margin-bottom: 36px;
}

.abstract-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: stretch;
}

.abstract-main {
  padding: 30px 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 1.08rem;
}

.abstract-main p:last-child,
.motivation-copy p:last-child,
.steps p:last-child,
.method-cards p:last-child,
.demo-copy p:last-child,
footer p {
  margin-bottom: 0;
}

.tldr-figure {
  overflow: hidden;
  margin: 28px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tldr-figure img {
  width: 100%;
}

.motivation-grid,
.demo-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 34px;
  align-items: start;
}

.motivation-copy,
.demo-copy {
  position: sticky;
  top: 92px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  border-radius: 8px;
}

.demo-copy {
  border-top-color: var(--green);
}

.realworld-copy {
  scroll-margin-top: 96px;
  border-top-color: var(--blue);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}

.carousel {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.realworld-carousel {
  border-color: rgba(32, 95, 142, 0.32);
}

.realworld-carousel .carousel-window {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.carousel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.switch {
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: #f3f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
}

.switch:hover,
.switch:focus-visible,
.switch.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  outline: none;
}

.carousel-window {
  overflow: hidden;
  border-radius: 8px;
  background: #101820;
}

.carousel-track {
  display: flex;
  transition: transform 260ms ease;
}

.video-slide {
  flex: 0 0 100%;
  margin: 0;
  background: #fff;
}

.video-slide video {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #101820;
  object-fit: contain;
}

figcaption {
  padding: 13px 15px 15px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

.stacked-section {
  display: grid;
  gap: 24px;
}

.steps,
.method-cards {
  display: grid;
  gap: 14px;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.steps article,
.method-cards article {
  min-height: 188px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps h3,
.method-cards h3,
.motivation-copy h3,
.demo-copy h3 {
  min-height: 2.86em;
}

.steps span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-weight: 900;
}

.steps p,
.method-cards p,
.motivation-copy p,
.demo-copy p,
.experiment-summary p {
  color: var(--muted);
}

.image-panel {
  overflow: hidden;
  margin-bottom: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  background: #fff;
}

.experiment-summary {
  width: min(820px, 100%);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.tables {
  display: grid;
  gap: 22px;
}

.table-card {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(14, 28, 43, 0.07);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

caption {
  padding: 18px 18px 6px;
  color: var(--muted);
  text-align: left;
  font-weight: 760;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--blue-dark);
  background: var(--soft-blue);
  font-size: 0.86rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.ours td {
  color: var(--blue-dark);
  background: #e9f3fb;
  font-weight: 900;
}

footer {
  padding: 34px 24px;
  color: rgba(255, 255, 255, 0.72);
  background: #111b25;
  text-align: center;
}

@media (max-width: 940px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  nav {
    justify-content: flex-start;
  }

  .hero-content,
  .section {
    width: min(100% - 32px, 1180px);
  }

  .abstract-grid,
  .motivation-grid,
  .demo-grid,
  .three-up {
    grid-template-columns: 1fr;
  }

  .motivation-copy,
  .demo-copy {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand strong {
    min-width: 0;
  }

  .hero {
    min-height: 68svh;
  }

  .hero-content {
    padding: 54px 0 64px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .section,
  .section.band {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .button {
    width: 100%;
  }
}
