:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #e3e8dd;
  --text: #20251d;
  --accent: #547a29;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(
      ellipse at 74% 14%,
      rgb(145 191 76 / 10%),
      transparent 34rem
    ),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.intro {
  max-width: 790px;
  margin: 0 auto;
  padding: 82px 0 47px;
}

.eyebrow,
.step-label,
.examples-label,
.footer {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent);
}

.eyebrow-line {
  width: 20px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 17px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 620;
  letter-spacing: -0.065em;
  line-height: 1.12;
}

h1 span {
  color: #737b6e;
}

.intro-copy {
  max-width: 590px;
  margin-bottom: 0;
  color: #646d5e;
  font-size: 15px;
  line-height: 1.8;
}

.playground {
  max-width: 790px;
  margin: 0 auto;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgb(32 37 29 / 1.4%), transparent 52%), var(--panel);
}

.input-panel {
  padding: 28px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 31px;
}

.step-label {
  margin-bottom: 11px;
  color: var(--accent);
  font-size: 9px;
}

.step-label span {
  color: #71796c;
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -0.04em;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #dfe8d3;
  border-radius: 20px;
  color: #54792b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.live-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #83b642;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #555e50;
  font-size: 12px;
}

.input-wrap {
  position: relative;
  display: flex;
  min-height: 57px;
  align-items: center;
  border: 1px solid #d9e1d0;
  border-radius: 9px;
  background: #ffffff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.input-wrap:focus-within {
  border-color: #91bf4c;
  box-shadow: 0 0 0 3px rgb(145 191 76 / 14%);
}

.input-wrap.is-invalid {
  border-color: #cf756c;
}

.input-wrap.is-invalid:focus-within {
  border-color: #bf554b;
  box-shadow: 0 0 0 3px rgb(191 85 75 / 12%);
}

.input-visual {
  position: absolute;
  z-index: 0;
  inset: 0 16px 0 16px;
  overflow: hidden;
  pointer-events: none;
}

#input-segments {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  white-space: pre;
  will-change: transform;
}

.input-segment {
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.4;
}

.input-segment--token {
  background: hsl(var(--token-hue), 88%, 76%);
  box-shadow: inset 0 -3px hsl(var(--token-hue), 78%, 42%);
  color: hsl(var(--token-hue), 70%, 16%);
}

.input-segment--muted {
  background: #f0f1ee;
  box-shadow: inset 0 -2px #cdd1c8;
  color: #81867d;
}

.input-wrap input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  padding: 0 0 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
}

.input-wrap.is-segmented input {
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #26351a;
}

.input-wrap input::selection {
  background: rgb(145 191 76 / 28%);
}

.field-help {
  min-height: 20px;
  margin: 9px 0 0;
  color: #737b6e;
  font-size: 11px;
  line-height: 1.6;
}

.field-help code {
  color: #4f7026;
}

.example-chip:focus-visible {
  outline: 2px solid #8bb84b;
  outline-offset: 3px;
}

.examples {
  padding-top: 25px;
}

.examples-label {
  margin-bottom: 11px;
  color: #727a6e;
  font-size: 9px;
}

.example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.example-chip {
  padding: 7px 9px;
  border: 1px solid #e1e7db;
  border-radius: 6px;
  background: #f8faf5;
  color: #596252;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  transition:
    border-color 140ms ease,
    color 140ms ease;
}

.example-chip:hover {
  border-color: #91bf4c;
  color: #4f7026;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 27px;
  padding-top: 18px;
  border-top: 1px solid #e7ebe3;
  color: #6f7868;
}

.privacy-note > span {
  color: #759f38;
  font-size: 14px;
}

.privacy-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.input-error {
  margin: 0;
  padding-top: 10px;
  color: #ae3f36;
  font-size: 12px;
  line-height: 1.6;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 25px 2px 35px;
  color: #7b8375;
  font-size: 9px;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 32px, 540px);
  }

  .intro {
    padding: 61px 0 34px;
  }

  .input-panel {
    padding: 23px;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .input-panel {
    padding: 19px;
  }

  h1 {
    font-size: 38px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
