:root {
  --canvas: #eef4ed;
  --paper: #fffdf4;
  --paper-strong: #f8f1df;
  --ink: #17211c;
  --muted: #6d756b;
  --line: #dfe3d7;
  --green: #15a36d;
  --green-dark: #0b3328;
  --lime: #44d17d;
  --blue: #3978f2;
  --orange: #f59d35;
  --red: #e8574f;
  --shadow: 0 28px 80px rgba(35, 47, 37, 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% 8%, rgba(68, 209, 125, 0.2), transparent 32rem),
    radial-gradient(circle at 86% 12%, rgba(57, 120, 242, 0.16), transparent 34rem),
    linear-gradient(135deg, #edf4ee 0%, #fff9e9 54%, #e9efe6 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.hero > *,
.workspace > * {
  min-width: 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;
  text-transform: uppercase;
}

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

.eyebrow--small {
  margin-bottom: 8px;
  font-size: 11px;
}

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

h1 {
  max-width: 900px;
  font-size: clamp(48px, 7.4vw, 98px);
  line-height: 0.9;
  letter-spacing: -0.075em;
  overflow-wrap: anywhere;
}

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

.support-card {
  padding: 20px;
  border: 1px solid rgba(23, 33, 28, 0.1);
  border-radius: 28px;
  background: rgba(255, 253, 244, 0.82);
  box-shadow: var(--shadow);
}

.support-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.support-card__head span {
  flex: 1 1 auto;
}

.support-card__head strong {
  flex: 0 0 auto;
}

.support-card__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-card__head strong {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-size: 12px;
}

.support-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.support-list li,
.status-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--green-dark);
  background: #e5f6ec;
  font-size: 13px;
  font-weight: 900;
}

.support-list li span,
.status-chip span,
.support-card__head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.support-list li span,
.status-chip span {
  flex: 1 1 auto;
}

.support-list li::after,
.status-chip::after {
  flex: 0 0 auto;
}

.support-list li[data-supported="false"],
.status-chip[data-supported="false"] {
  color: #9f302a;
  background: #fff0ec;
}

.support-list li::after,
.status-chip::after {
  content: "OK";
}

.support-list li[data-supported="false"]::after,
.status-chip[data-supported="false"]::after {
  content: "No";
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.controls,
.preview-panel {
  border: 1px solid rgba(23, 33, 28, 0.1);
  border-radius: 32px;
  background: rgba(255, 253, 244, 0.78);
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.control-block,
.control-grid {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.block-title > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.block-title h2 {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.help {
  position: relative;
  margin-left: auto;
}

.help-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: var(--green-dark);
  background: #dff3e8;
  font-size: 14px;
  font-weight: 900;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.help-button--small {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

.help-button:hover,
.help-button:focus-visible {
  color: #fff;
  background: var(--green-dark);
  transform: translateY(-1px);
  outline: none;
}

.help-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  width: min(280px, 74vw);
  padding: 14px;
  border: 1px solid rgba(23, 33, 28, 0.1);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(35, 47, 37, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.help-popover::before {
  position: absolute;
  top: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border-left: 1px solid rgba(23, 33, 28, 0.1);
  border-top: 1px solid rgba(23, 33, 28, 0.1);
  rotate: 45deg;
  content: "";
}

.help-popover strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.help-popover p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.65;
}

.help-popover--field {
  right: auto;
  left: 50%;
  width: min(260px, 76vw);
  transform: translate(-50%, -4px);
}

.help-popover--field::before {
  right: auto;
  left: 50%;
  translate: -50% 0;
}

.help-popover--field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.65;
}

.help:hover .help-popover,
.help:focus-within .help-popover,
.help.is-open .help-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.help:hover .help-popover--field,
.help:focus-within .help-popover--field,
.help.is-open .help-popover--field {
  transform: translate(-50%, 0);
}

.segmented,
.effect-grid {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: 1fr 1fr;
}

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

.choice,
.effect {
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  color: var(--green-dark);
  background: #e5f6ec;
  font-size: 13px;
  font-weight: 900;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.choice:hover,
.effect:hover {
  transform: translateY(-1px);
}

.choice.is-active,
.effect.is-active {
  color: #fff;
  background: var(--green-dark);
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field,
.range-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-head {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.field input,
.field select,
.range-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: #fffdf8;
  font-weight: 900;
}

.field select:disabled {
  color: rgba(23, 33, 28, 0.34);
  background: rgba(223, 227, 215, 0.45);
}

.field:last-child {
  grid-column: 1 / -1;
}

.range-block {
  display: grid;
  gap: 12px;
}

.range-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.check-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.preview-panel {
  min-width: 0;
  padding: 18px;
}

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

.preview-head h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: var(--green-dark);
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(11, 51, 40, 0.2);
}

.preview-frame {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fffdf8;
}

.scroll-demo {
  position: relative;
  height: 430px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(23, 33, 28, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 28, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #f4efe3 0%, #fffaf0 42%, #edf7ef 100%);
  background-size: 34px 34px, 34px 34px, auto;
  overflow: auto;
  scroll-timeline: --demo-scroll block;
}

.scroll-demo::-webkit-scrollbar {
  width: 12px;
}

.scroll-demo::-webkit-scrollbar-track {
  background: rgba(11, 51, 40, 0.08);
  border-radius: 999px;
}

.scroll-demo::-webkit-scrollbar-thumb {
  background: var(--green);
  border: 3px solid #f5f0e7;
  border-radius: 999px;
}

.spacer {
  display: grid;
  place-items: center;
  min-height: 380px;
  color: rgba(23, 33, 28, 0.42);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spacer--end {
  min-height: 520px;
}

.demo-target {
  width: min(520px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(11, 51, 40, 0.12);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(68, 209, 125, 0.5), transparent 8rem),
    linear-gradient(135deg, #0b3328, #134d3f);
  box-shadow: 0 28px 70px rgba(11, 51, 40, 0.26);
  view-timeline-name: --demo-view;
  view-timeline-axis: block;
  animation: generated-animation linear both;
  animation-timeline: view(block);
  animation-range: entry 0% cover 100%;
  will-change: opacity, transform, clip-path, filter;
}

.demo-label {
  display: inline-flex;
  margin-bottom: 26px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #d9f7e6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-target h3 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.demo-target p {
  max-width: 360px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.demo-meter {
  height: 12px;
  margin-top: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), rgba(255, 255, 255, 0.18));
  transform-origin: left;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.code-panel {
  margin-top: 14px;
  border-radius: 24px;
  background: var(--green-dark);
  overflow: hidden;
}

.code-panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-panel pre {
  max-height: 430px;
  margin: 0;
  padding: 18px;
  overflow: auto;
}

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

@keyframes generated-animation {
  from {
    opacity: 0;
    translate: 0 40px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-target {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .support-card {
    max-width: 560px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 24px, 406px);
    padding: 24px 0;
  }

  h1 {
    font-size: clamp(38px, 12vw, 52px);
    letter-spacing: -0.08em;
  }

  .lead {
    font-size: 15px;
  }

  .controls,
  .preview-panel {
    border-radius: 24px;
  }

  .control-grid,
  .effect-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: 1fr;
  }

  .range-row {
    grid-template-columns: 1fr;
  }

  .preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }

  .scroll-demo {
    height: 380px;
  }

  .demo-target {
    width: min(100% - 24px, 420px);
    padding: 22px;
  }
}
