:root {
  --paper: #fff8ee;
  --ink: #211f1a;
  --muted: #746b5e;
  --line: rgb(33 31 26 / 12%);
  --green: #0f4f3d;
  --green-soft: #dff5e9;
  --green-border: #9bdcbe;
  --orange: #ec8b34;
  --orange-soft: #fff0e3;
  --blue: #3978f2;
  --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;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 10%, rgb(15 79 61 / 15%), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgb(236 139 52 / 18%), transparent 30rem),
    linear-gradient(135deg, #fff4e6 0%, var(--paper) 52%, #eee6d8 100%);
  overflow-x: hidden;
}

button,
textarea {
  font: inherit;
}

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

.page > *,
.demo-shell,
.stage,
.compare-grid,
.form-card,
.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(--orange);
  content: "";
}

h1 {
  font-size: clamp(31px, 4.2vw, 48px);
  line-height: 1.15;
  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,
.panel-label,
.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;
  overflow-wrap: anywhere;
}

.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;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 20px;
  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;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.form-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 22px 60px rgb(33 31 26 / 8%);
}

.form-card--fixed {
  --accent: var(--orange);
  --accent-soft: var(--orange-soft);
}

.form-card--enhanced {
  --accent: #0f9f73;
  --accent-soft: var(--green-soft);
  border-color: var(--green-border);
  background:
    radial-gradient(circle at 100% 0%, var(--green-soft), transparent 220px),
    rgb(255 255 255 / 88%);
}

.form-card .panel-label {
  color: var(--accent);
}

.form-card h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.065em;
}

label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

textarea {
  width: 100%;
  min-block-size: 4lh;
  max-block-size: 12lh;
  padding: 16px;
  border: 2px solid color-mix(in oklch, var(--accent) 28%, white);
  border-radius: 20px;
  color: var(--ink);
  background: white;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.65;
  resize: none;
  overflow: auto;
  outline: none;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 18%, transparent);
}

.form-card--fixed textarea {
  block-size: 4lh;
}

@supports (field-sizing: content) {
  .form-card--enhanced textarea {
    field-sizing: content;
  }
}

.code-card {
  display: grid;
  gap: 12px;
  align-self: start;
  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: 14px;
  font-weight: 900;
  line-height: 1.65;
  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: 980px) {
  .stage,
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .demo-actions {
    width: 100%;
  }

  .demo-actions button {
    flex: 1;
  }
}

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

  h1 {
    font-size: 30px;
  }

  .lead {
    font-size: 15px;
  }

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

  .stage {
    padding: 14px;
  }

  .form-card {
    padding: 18px;
  }

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

