:root {
  color-scheme: light;
  --ink: #20201d;
  --muted: #706a5f;
  --paper: #fffaf0;
  --surface: #fffdf8;
  --line: #e7dcc9;
  --accent: #1c8c6d;
  --accent-soft: #dff5ec;
  --accent-line: #9fdec7;
  --gold: #f3b23e;
  --rose: #ff7a90;
  --shadow: 0 28px 80px rgba(76, 59, 35, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  font-family: "Avenir Next", "Hiragino Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(28, 140, 109, 0.16), transparent 25%),
    radial-gradient(circle at 86% 10%, rgba(243, 178, 62, 0.2), transparent 24%),
    linear-gradient(145deg, #f8efe0, #fdf8ed 46%, #eef6ef);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
  gap: 26px;
  align-items: center;
  min-width: 0;
}

.hero > * {
  min-width: 0;
}

.copy {
  position: relative;
  min-width: 0;
  padding: 10px 0;
}

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.2;
}

.lead {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.note {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(28, 140, 109, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.workspace {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 36px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 250, 240, 0.72)),
    var(--surface);
}

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

.panel-head > div {
  min-width: 0;
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: #102c25;
  color: #c7ffe9;
  font-size: 12px;
  font-weight: 800;
}

.field-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.field-card::after {
  position: absolute;
  inset: 12px 12px auto auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f3efe7;
  color: #a69a8a;
  font-weight: 900;
  content: "·";
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.field-card:has(:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(28, 140, 109, 0.12);
  transform: translateY(-2px);
}

.field-card:has(.text-input:not(:placeholder-shown)),
.field-card:has(input:checked),
.field-card:has(select:valid) {
  border-color: var(--accent-line);
  background:
    linear-gradient(135deg, rgba(223, 245, 236, 0.9), rgba(255, 255, 255, 0.94)),
    #fff;
}

.field-card:has(.text-input:not(:placeholder-shown))::after,
.field-card:has(input:checked)::after,
.field-card:has(select:valid)::after {
  background: var(--accent);
  color: #fff;
  content: "✓";
  transform: rotate(-8deg) scale(1.04);
}

.label-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding-right: 40px;
}

.number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #f3efe7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.field-card:has(.text-input:not(:placeholder-shown)) .number,
.field-card:has(input:checked) .number,
.field-card:has(select:valid) .number {
  background: #c6efdd;
  color: #0c6a50;
}

.label-row strong {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.label-row span:not(.number) {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.text-input,
.select-input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #e4d8c5;
  border-radius: 14px;
  outline: none;
  background: #fffaf2;
  color: var(--ink);
}

.text-input:focus-visible,
.select-input:focus-visible {
  border-color: var(--accent);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.choice {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4d8c5;
  border-radius: 16px;
  background: #fffaf2;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice strong {
  font-size: 14px;
}

.choice span {
  color: var(--muted);
  font-size: 12px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  cursor: pointer;
}

.check-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border: 1px dashed #d7c7ad;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 20%, rgba(28, 140, 109, 0.12), transparent 34%),
    #fffaf2;
}

.preview-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #efe6d5;
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.workspace:has(#agree:checked) .preview-icon {
  background: var(--accent);
  color: #fff;
  transform: rotate(-6deg);
}

.preview strong {
  display: block;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.code-card {
  min-width: 0;
  margin-top: 18px;
  padding: 16px;
  border-radius: 24px;
  background: #17251f;
  color: #e9fff5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.code-card span {
  display: block;
  margin-bottom: 10px;
  color: #a7d7c4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

pre {
  margin: 0;
  max-width: 100%;
  overflow: auto;
  font-size: 13px;
  line-height: 1.65;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

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

  h1 {
    max-width: 14ch;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 22px;
  }

  .hero {
    gap: 22px;
  }

  .copy {
    padding: 4px 2px 0;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(30px, 10.8vw, 42px);
    line-height: 1.15;
  }

  .lead {
    font-size: 15px;
    line-height: 1.8;
  }

  .note {
    margin-top: 18px;
  }

  .workspace {
    padding: 10px;
    border-radius: 26px;
  }

  .panel {
    gap: 12px;
    padding: 14px;
  }

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

  .panel-head,
  .radio-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: grid;
  }

  .pill {
    width: max-content;
  }

  .field-card {
    gap: 11px;
    padding: 14px;
    border-radius: 20px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .panel-head p,
  .label-row span:not(.number),
  .choice span,
  .preview p {
    font-size: 12px;
  }

  .label-row strong {
    font-size: 15px;
  }

  .field-card::after {
    inset: 10px 10px auto auto;
    width: 26px;
    height: 26px;
  }

  .label-row {
    gap: 9px;
    padding-right: 32px;
  }

  .text-input,
  .select-input {
    min-height: 46px;
  }

  .preview {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .preview-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .code-card {
    padding: 14px;
    border-radius: 20px;
  }

  pre {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .shell {
    width: min(100% - 16px, 1120px);
    padding-top: 18px;
    padding-bottom: 28px;
  }

  h1 {
    font-size: clamp(28px, 10vw, 36px);
  }

  .lead {
    font-size: 14px;
  }

  .workspace {
    padding: 8px;
    border-radius: 22px;
  }

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

  .panel-head h2 {
    font-size: 19px;
  }

  .field-card {
    padding: 12px;
    border-radius: 18px;
  }

  .number {
    width: 26px;
    height: 26px;
  }

  .label-row {
    gap: 8px;
  }

  .text-input,
  .select-input {
    min-height: 44px;
    padding-inline: 12px;
  }

  .choice {
    padding: 11px;
  }

  .preview,
  .code-card {
    padding: 12px;
  }
}
