:root {
  --ink: #17211c;
  --muted: #657169;
  --paper: #f4f1e9;
  --card: #fffdf7;
  --line: #d8d8cd;
  --green: #1d5b45;
  --green-dark: #124532;
  --green-soft: #e7eee6;
  --lime: #d7f45c;
  --orange: #e9673d;
  --shadow: 0 18px 55px rgba(27, 43, 34, .09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(215, 244, 92, .16), transparent 25rem),
    radial-gradient(circle at 88% 32%, rgba(29, 91, 69, .07), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.skip-link{position:fixed;top:12px;left:12px;z-index:100;padding:10px 14px;border:2px solid var(--ink);border-radius:8px;background:var(--card);color:var(--ink);font-weight:800;transform:translateY(-150%)}
.skip-link:focus{transform:none}

.nav {
  position: relative;
  z-index: 2;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.03em;
}

.brand span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  box-shadow: 0 5px 16px rgba(29, 91, 69, .2);
}

.badge,
.editable {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .58);
  padding: 7px 10px;
  border-radius: 999px;
}

.hero {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 96px 24px 70px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 38px 10% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.eyebrow,
.step {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .15em;
  color: var(--green);
}

h1 {
  font-family: Georgia, serif;
  font-size: clamp(45px, 7vw, 82px);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
  margin: 22px 0;
}

h1 em {
  color: var(--green);
  font-weight: 400;
}

.lede {
  max-width: 680px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  gap: 26px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-weight: 780;
  padding: 15px 20px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(29, 91, 69, .16);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 11px 28px rgba(29, 91, 69, .22);
}

.button:active { transform: translateY(0); }

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  justify-content: center;
  margin-top: 30px;
  color: var(--muted);
  font-size: 13px;
}

.proof span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 20px;
  align-items: start;
}

.workspace:has(.output-panel[hidden]) {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.workspace:has(.output-panel:not([hidden]))::before {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 42px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--orange);
  font-weight: 850;
}

.panel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 253, 247, .94);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--green);
}

.output-panel::after { background: var(--lime); }

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

.panel h2 {
  font-family: Georgia, serif;
  font-size: 31px;
  letter-spacing: -.025em;
  margin: 5px 0 0;
}

.step { margin: 0; }

.text-button {
  border: 0;
  background: none;
  color: var(--green);
  font-weight: 780;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#changes {
  min-height: 260px;
  line-height: 1.55;
  background: linear-gradient(#fff, #fffdf9);
}

textarea:hover,
input:hover { border-color: #adb8b0; }

textarea:focus,
input:focus {
  outline: 3px solid rgba(215, 244, 92, .65);
  border-color: var(--green);
}

:is(a,button,select,.output-panel):focus-visible,
.voices input:focus-visible + span {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 2px 24px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}

legend,
.output-panel label {
  font-size: 13px;
  font-weight: 780;
  margin-bottom: 10px;
}

.voices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.voices label { position: relative; }
.voices input { position: absolute; opacity: 0; }

.voices span {
  display: block;
  min-height: 67px;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.voices span:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.voices small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.voices input:checked + span {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: var(--green-soft);
}

.submit {
  width: 100%;
  font-size: 16px;
}

.output-panel label { display: block; }

.output-panel label textarea,
.output-panel label input {
  display: block;
  margin: 7px 0 16px;
  font-weight: 400;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.secondary {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  font-weight: 780;
  border-radius: 9px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.secondary:hover:not(:disabled) {
  background: var(--green-soft);
  transform: translateY(-1px);
}

:is(button, input, select):disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
  transform: none;
}

.status {
  text-align: center;
  color: var(--muted);
  min-height: 24px;
  margin: 18px 20px 82px;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 26px;
  align-items: stretch;
  max-width: 1000px;
  margin: 0 auto 100px;
  padding: 0 24px;
}

.before-after > div:not(.arrow) {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 247, .7);
}

.before-after > div:last-child {
  border-color: rgba(29, 91, 69, .38);
  background: var(--green-soft);
}

.before-after code {
  display: block;
  color: var(--muted);
  line-height: 1.65;
}

.before-after .arrow {
  align-self: center;
  font-size: 30px;
  color: var(--orange);
}

.examples { max-width: 1000px; margin: 0 auto 100px; padding: 0 24px; }
.examples h2 { font: 42px/1.1 Georgia,serif; margin: 8px 0; }
.examples > p:not(.step) { color: var(--muted); }
.examples > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.examples a { border: 1px solid var(--line); border-radius: 9px; padding: 13px 16px; background: var(--card); color: var(--green); font-weight: 780; text-decoration: none; }
.examples a:hover { border-color: var(--green); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px max(24px, calc((100% - 1132px) / 2));
  background: var(--ink);
  color: #cad2cd;
  font-size: 13px;
  line-height: 1.6;
}

footer a {
  color: var(--lime);
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .workspace:has(.output-panel:not([hidden]))::before { display: none; }
}

@media (max-width: 760px) {
  .nav { min-height: 68px; }
  .hero { padding-top: 65px; }
  .proof { gap: 8px 16px; }
  .voices { grid-template-columns: 1fr; }
  .before-after { grid-template-columns: 1fr; }
  .before-after .arrow {
    transform: rotate(90deg);
    text-align: center;
  }
  footer { flex-direction: column; }
  h1 br { display: none; }
}

@media (max-width: 520px) {
  .hero { padding-inline: 18px; }
  .lede { font-size: 17px; }
  .workspace { padding-inline: 12px; }
  .panel { padding: 24px 18px; border-radius: 13px; }
  .panel-heading { gap: 12px; }
  .panel h2 { font-size: 28px; }
  .actions > * { width: 100%; }
  .input-meta { align-items: flex-start; }
}
