:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #17211b;
  --muted: #5f6b63;
  --line: #d9dfd8;
  --primary: #1f6f50;
  --primary-dark: #15553d;
  --accent: #b8572a;
  --focus: #2f8f68;
  --shadow: 0 18px 45px rgba(23, 33, 27, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

.intro {
  max-width: 860px;
  margin-bottom: 20px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badges span {
  border: 1px solid rgba(31, 111, 80, 0.2);
  border-radius: 999px;
  background: rgba(31, 111, 80, 0.08);
  color: var(--primary-dark);
  padding: 7px 11px;
  font-size: 0.86rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  max-width: 780px;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.summary {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.tester-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
}

.tester-label,
.stars,
blockquote {
  margin: 0;
}

.tester-label {
  color: var(--text);
  font-weight: 800;
}

.stars {
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0;
}

blockquote {
  font-style: italic;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--text);
  outline: none;
}

input {
  min-height: 48px;
  padding: 11px 13px;
}

textarea {
  min-height: 360px;
  resize: vertical;
  padding: 16px;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 143, 104, 0.18);
}

.actions,
.result-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.actions {
  flex-wrap: wrap;
  margin-top: 4px;
}

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.primary {
  background: var(--primary);
  color: #ffffff;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary,
.copy {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.secondary:hover,
.copy:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.result-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 24px;
}

.result-header {
  justify-content: space-between;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.status {
  min-height: 22px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.validation-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: start;
  padding: 24px;
}

.validation-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.validation-form {
  display: grid;
  gap: 12px;
}

.validation-field {
  gap: 8px;
}

.fine-print {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.footer {
  width: min(1120px, calc(100% - 32px));
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

  .validation-panel {
    grid-template-columns: 1fr;
  }

  .form-panel,
  .result-panel,
  .validation-panel {
    padding: 18px;
  }

  textarea {
    min-height: 300px;
  }

  .footer {
    width: min(100% - 24px, 680px);
  }
}

@media (max-width: 460px) {
  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .result-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
}
