:root {
  --paper: #fffaf0;
  --ink: #18211d;
  --muted: #68736a;
  --line: rgba(24, 33, 29, 0.12);
  --active: #0f9f73;
  --active-dark: #0b3328;
  --active-soft: rgba(15, 159, 115, 0.1);
  --blue: #3978f2;
  --orange: #f29a35;
  --pink: #e85d87;
  --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.16), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(232, 93, 135, 0.14), transparent 34rem),
    linear-gradient(135deg, #eef4ec 0%, #fff8e8 54%, #eff1e7 100%);
  overflow-x: hidden;
}

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

.page > *,
.demo-shell,
.stage,
.faq-panel,
.faq-item,
.takeaway {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--active);
  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(34px, 5vw, 62px);
  line-height: 1.18;
  letter-spacing: -0.06em;
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.lead,
.faq-item p,
.takeaway p {
  word-break: auto-phrase;
}

.demo-shell {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 250, 240, 0.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,
.panel-head span {
  color: var(--active);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.status-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--active-dark);
  background: rgba(15, 159, 115, 0.12);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(rgba(24, 33, 29, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 29, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}

.faq-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.faq-panel:has(details[open]) {
  border-color: rgba(15, 159, 115, 0.42);
  background:
    radial-gradient(circle at 88% 16%, rgba(15, 159, 115, 0.16), transparent 14rem),
    var(--active-soft);
  box-shadow: 0 24px 70px rgba(15, 159, 115, 0.18);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.panel-state {
  display: inline-grid;
  min-width: 150px;
  min-height: 42px;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(24, 33, 29, 0.07);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.state-active,
.faq-panel:has(details[open]) .state-idle {
  display: none;
}

.faq-panel:has(details[open]) .state-active {
  display: inline;
}

.faq-panel:has(details[open]) .panel-state {
  color: #fff;
  background: var(--active);
}
.faq-panel:has(details[open]) .state-active {
  color: #fff;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.faq-item:has(details[open]) {
  border-color: rgba(15, 159, 115, 0.48);
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-2px);
}

.item-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: var(--muted);
  background: rgba(24, 33, 29, 0.08);
  font-size: 13px;
  font-weight: 900;
  transition:
    color 180ms ease,
    background 180ms ease,
    scale 180ms ease;
}

.faq-item:has(details[open]) .item-number {
  color: #fff;
  background: var(--active);
  scale: 1.06;
}

details {
  min-width: 0;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.04em;
  list-style: none;
  overflow-wrap: anywhere;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--active-dark);
  background: rgba(15, 159, 115, 0.12);
  content: "+";
  transition:
    rotate 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

details[open] summary::after {
  color: #fff;
  background: var(--active);
  content: "-";
}

.faq-item p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.8;
}

.code-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.code-panel pre {
  min-width: 0;
  inline-size: 100%;
  max-width: 100%;
  padding: 18px;
  border-radius: 22px;
  color: #ecfff4;
  background: var(--active-dark);
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-panel code {
  min-width: 0;
  display: block;
  white-space: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
  font: 800 13px/1.65 "SFMono-Regular", Consolas, monospace;
}

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

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

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

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

  h1 {
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.22;
  }

  .lead {
    font-size: 15px;
  }

  .demo-head,
  .panel-head,
  .takeaway {
    align-items: stretch;
    flex-direction: column;
  }

  .stage {
    padding: 14px;
  }

  .faq-panel {
    padding: 14px;
    border-radius: 24px;
  }

  .panel-head h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

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

  .code-panel pre {
    padding: 16px;
    border-radius: 18px;
  }

  .code-panel code {
    font-size: 12px;
    line-height: 1.7;
  }
}
