:root {
  --paper: #fffaf0;
  --paper-soft: #f7f0e3;
  --ink: #17211c;
  --muted: #68736a;
  --line: rgba(23, 33, 28, 0.12);
  --green: #0f9f73;
  --green-dark: #0b3328;
  --blue: #3978f2;
  --orange: #f29a35;
  --pink: #e85d87;
  --violet: #7657e8;
  --shadow: 0 28px 80px rgba(42, 52, 39, 0.16);
  color-scheme: light;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(15, 159, 115, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 12%, rgba(57, 120, 242, 0.15), transparent 34rem),
    linear-gradient(135deg, #eef4ec 0%, #fff8e8 56%, #ecefe5 100%);
  overflow-x: hidden;
}

.page {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0;
}

.page > *,
.range-lab,
.scroller,
.range-card,
.takeaway {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 2px 2px 0 var(--orange);
  content: "";
}

h1,
h2,
p,
pre {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.2;
}

.lead {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 700;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.range-lab {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.lab-head span,
.range-key span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.range-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-key span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #e4f7ec;
}

.range-key span:nth-child(2) {
  color: #244fba;
  background: #e8efff;
}

.range-key span:nth-child(3) {
  color: #a13c6a;
  background: #ffe7f1;
}

.range-key span:nth-child(4) {
  color: #5b3fba;
  background: #eee9ff;
}

.scroller {
  position: relative;
  height: 700px;
  overflow: auto;
  background:
    linear-gradient(rgba(23, 33, 28, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 28, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}

.sticky-guide {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.9);
  backdrop-filter: blur(18px);
}

.sticky-guide span {
  padding: 8px 11px;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sticky-guide strong {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 360px 26px 360px;
  min-width: 0;
  max-width: 100%;
}

.range-card {
  view-timeline-name: --range-card;
  view-timeline-axis: block;
  width: 100%;
  min-width: 0;
  display: grid;
  align-content: start;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(135deg, #0b3328, var(--green));
  box-shadow: 0 26px 70px rgba(15, 159, 115, 0.2);
}

.range-card--entry .range-meter span {
  animation-range: entry 0% entry 100%;
}

.range-card--cover {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(135deg, #173fe0, var(--blue));
}

.range-card--cover .range-meter span {
  animation-range: cover 0% cover 100%;
}

.range-card--contain {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(135deg, #b73c74, var(--pink));
}

.range-card--contain .range-meter span {
  animation-range: contain 0% contain 100%;
}

.range-card--exit {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(135deg, #4f34b4, var(--violet));
}

.range-card--exit .range-meter span {
  animation-range: exit 0% exit 100%;
}

.range-label {
  display: inline-flex;
  margin-bottom: 28px;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.range-card h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.range-card p {
  max-width: 100%;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.75;
}

.range-meter {
  height: 12px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.range-meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.9);
  transform-origin: left;
  animation: range-meter linear both;
  animation-timeline: --range-card;
  will-change: scale;
}

.range-card code {
  display: block;
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  color: #effff6;
  background: rgba(0, 0, 0, 0.18);
  font: 800 11px/1.55 "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.code-panel {
  padding: 0 26px 30px;
}

.code-panel pre {
  width: min(760px, 100%);
  margin-inline: auto;
  padding: 18px;
  border-radius: 20px;
  color: #ecfff4;
  background: var(--green-dark);
  overflow: auto;
}

.code-panel code {
  font: 800 13px/1.65 "SFMono-Regular", Consolas, monospace;
}

.takeaway {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: var(--shadow);
}

.takeaway span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.takeaway p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.7;
}

@keyframes range-meter {
  from {
    scale: 0 1;
  }

  to {
    scale: 1 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .range-meter span {
    animation: none;
  }
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 28px, 720px);
    padding: 28px 0;
  }

  .lab-head,
  .sticky-guide,
  .takeaway {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .page {
    width: calc(100vw - 32px);
    max-width: 350px;
    margin-right: auto;
    margin-left: 16px;
  }

  h1 {
  }

  .lead {
    font-size: 15px;
  }

  .scroller {
    height: 620px;
  }

  .track {
    grid-template-columns: 1fr;
    gap: 120px;
    padding: 150px 14px 260px;
  }

  .lab-head,
  .sticky-guide,
  .takeaway {
    padding-inline: 14px;
  }

  .range-card {
    padding: 24px;
  }
}
