
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');

:root {
  --green: #247b58;
  --dark-green: #176442;
  --mint: #eaf5ec;
  --ink: #24372f;
  --muted: #718278;
  --border: #dce9de;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #e8f6e9, #f8faf6 65%);
  min-height: 100vh;
}

.hero {
  text-align: center;
  padding: 45px 20px 25px;
}

.logo {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 38px;
  background: white;
  border-radius: 22px;
  box-shadow: 0 10px 30px #244b3510;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--green);
  margin-bottom: 10px;
}

h1, h2, h3 {
  font-family: 'Manrope', sans-serif;
}

h1 {
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #ffffffb8;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  background: #d9a844;
  border-radius: 50%;
}

.layout {
  width: min(1080px, calc(100% - 36px));
  margin: 12px auto 28px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 20px;
  align-items: stretch;
}

.panel {
  padding: 30px;
  background: #ffffffed;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 45px #244b3509;
}

h2 {
  font-size: 21px;
  margin-bottom: 22px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 9px;
}

textarea, input {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fbfdfb;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  margin-bottom: 14px;
}

textarea {
  min-height: 135px;
  resize: vertical;
  line-height: 1.6;
}

textarea:focus, input:focus {
  border-color: #82b99a;
  box-shadow: 0 0 0 3px #247b5815;
}

textarea::placeholder {
  color: #9aa99f;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 23px;
}

button {
  font: inherit;
  cursor: pointer;
  transition: .2s ease;
}

.chip {
  padding: 8px 11px;
  border: 1px solid #dfeddf;
  border-radius: 25px;
  background: #f0f7f0;
  color: #46735a;
  font-size: 12px;
}

.chip:hover {
  background: #e1f0e3;
  transform: translateY(-1px);
}

.primary-btn {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 4px;
  box-shadow: 0 7px 18px #247b5820;
}

.primary-btn:hover {
  background: var(--dark-green);
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.hint {
  color: #89978f;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 13px;
}

.result-panel {
  background: linear-gradient(150deg, white, #f3faf3);
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.empty-state {
  flex: 1;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.cloud {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  border-radius: 22px;
  background: var(--mint);
  font-size: 30px;
  margin-bottom: 15px;
}

.empty-state p {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}

.empty-state span {
  font-size: 12px;
}

.result-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.8 'DM Sans', sans-serif;
  color: #355346;
  background: #edf7ee;
  border: 1px solid #dfeddf;
  border-radius: 14px;
  padding: 18px;
  min-height: 180px;
  margin-bottom: 16px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.secondary-btn {
  background: white;
  color: var(--green);
  border: 1px solid #c9dfce;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.secondary-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

#loading {
  padding: 30px 0;
  color: var(--green);
  font-size: 14px;
}

.features {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto 35px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.features article {
  background: #ffffffad;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 20px;
}

.features article > span {
  font-size: 23px;
}

.features h3 {
  font-size: 15px;
  margin: 11px 0 7px;
}

.features p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  text-align: center;
  color: #84968a;
  padding: 0 15px 28px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .hero {
    padding-top: 32px;
  }

  .layout {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }

  .panel {
    padding: 23px;
  }

  .features {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }

  .result-panel {
    min-height: 350px;
  }
}
