:root {
  --paper: #fff8ee;
  --ink: #211f1a;
  --muted: #756b5d;
  --line: rgb(33 31 26 / 12%);
  --green: #0f4f3d;
  --green-soft: #dff5e9;
  --gold: #f6c15b;
  --orange: #e46f3d;
  --blue: #3978f2;
  --blue-soft: #e8f0ff;
  --shadow: 0 30px 90px rgb(92 62 27 / 15%);
  color-scheme: light;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgb(15 79 61 / 16%), transparent 26rem),
    radial-gradient(circle at 86% 14%, rgb(246 193 91 / 22%), transparent 30rem),
    linear-gradient(135deg, #fff4e6 0%, var(--paper) 52%, #eee7d9 100%);
  overflow-x: hidden;
}

button {
  font: inherit;
}

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

.page > *,
.demo-shell,
.compare-grid,
.demo-panel,
.browser-frame,
.scroll-area,
.code-card,
.takeaway {
  min-width: 0;
  max-width: 100%;
}

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

.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(--gold);
  content: "";
}

h1 {
  font-size: clamp(31px, 4.1vw, 44px);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

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

.demo-shell {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgb(255 248 238 / 78%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.demo-head span,
.code-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.demo-actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgb(255 255 255 / 84%);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: translate 180ms ease, background 180ms ease;
}

.demo-actions button:last-child {
  border-color: transparent;
  color: white;
  background: var(--green);
}

.demo-actions button:hover {
  translate: 0 -2px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(rgb(33 31 26 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(33 31 26 / 5%) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}

.demo-panel {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgb(255 255 255 / 82%);
}

.demo-panel--before {
  --accent: #e46f3d;
  --accent-soft: #fff0e9;
}

.demo-panel--after {
  --accent: #0f8b65;
  --accent-soft: #e6f7ee;
}

.panel-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-title strong {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.browser-frame {
  position: relative;
  height: 420px;
  border: 1px solid color-mix(in oklch, var(--accent) 26%, white);
  border-radius: 22px;
  background: white;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 70%);
}

.site-header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 18px;
  color: white;
  background: var(--green);
  box-shadow: 0 16px 34px rgb(15 79 61 / 18%);
  pointer-events: none;
}

.site-header b {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.site-header span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  font-size: 12px;
  font-weight: 900;
}

.scroll-area {
  height: 100%;
  padding: 90px 18px 28px;
  overflow: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  background:
    linear-gradient(rgb(33 31 26 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(33 31 26 / 5%) 1px, transparent 1px),
    #fffdf8;
  background-size: 28px 28px;
}

.anchor-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 88%);
}

.anchor-nav a {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.doc-section {
  position: relative;
  min-height: 180px;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 18px 42px rgb(33 31 26 / 7%);
}

.doc-section + .doc-section {
  margin-top: 18px;
}

.anchor-target {
  scroll-margin-top: 86px;
}

.number {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.doc-section h2 {
  padding-right: 58px;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.doc-section p:not(.number) {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.demo-panel.is-jumped .doc-section[data-target] {
  outline: 3px solid color-mix(in oklch, var(--accent) 60%, transparent);
  outline-offset: 4px;
}

.demo-panel--before.is-jumped::after,
.demo-panel--after.is-jumped::after {
  position: absolute;
  z-index: 6;
  right: 30px;
  bottom: 30px;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
  content: "Target";
}

.code-card {
  display: grid;
  gap: 12px;
  margin: 0 22px 22px;
  padding: 22px;
  border-radius: 24px;
  color: white;
  background: #0d3f32;
  box-shadow: 0 20px 50px rgb(15 79 61 / 16%);
}

.code-card span {
  color: #9ce7c5;
}

.code-card pre {
  overflow-x: auto;
}

.code-card code {
  display: block;
  color: #fff8ee;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.7;
  white-space: pre;
}

.takeaway {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgb(255 255 255 / 70%);
}

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

.takeaway p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}

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

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

  .demo-actions {
    width: 100%;
    justify-content: stretch;
  }

  .demo-actions button {
    flex: 1;
  }

  .compare-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .browser-frame {
    height: 380px;
  }

  .anchor-nav {
    overflow-x: auto;
  }

  .anchor-nav a {
    flex: 0 0 auto;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 20px, 420px);
  }

  h1 {
    font-size: 30px;
  }

  .lead {
    font-size: 15px;
  }

  .demo-shell {
    border-radius: 24px;
  }

  .demo-panel {
    padding: 12px;
    border-radius: 22px;
  }

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

  .browser-frame {
    height: 350px;
    border-radius: 18px;
  }

  .scroll-area {
    padding-inline: 12px;
  }

  .doc-section {
    padding: 20px;
  }

  .doc-section h2 {
    font-size: 24px;
  }

  .code-card {
    margin-inline: 14px;
  }

  .code-card code {
    font-size: 14px;
  }
}
