:root {
  color-scheme: light;
  --bg: #f2efe8;
  --bg-soft: #fbf8f1;
  --ink: #191814;
  --muted: #68645b;
  --line: rgba(25, 24, 20, 0.1);
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --accent: #0f5d46;
  --accent-dark: #0a4735;
  --focus: #f0b84a;
  --shadow: 0 22px 70px rgba(38, 35, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 93, 70, 0.12), transparent 34%),
    radial-gradient(circle at 85% 18%, rgba(240, 184, 74, 0.18), transparent 22%),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(4px);
  opacity: 0.55;
}

body::before {
  width: 22rem;
  height: 22rem;
  left: -7rem;
  top: 16vh;
  background: rgba(15, 93, 70, 0.11);
}

body::after {
  width: 18rem;
  height: 18rem;
  right: -4rem;
  top: 8vh;
  background: rgba(240, 184, 74, 0.15);
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1200px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 40px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.intro {
  padding: clamp(28px, 4vw, 42px);
  position: sticky;
  top: 24px;
  overflow: hidden;
}

.intro::after {
  content: "";
  position: absolute;
  inset: auto -6rem -7rem auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 93, 70, 0.12) 0%, rgba(15, 93, 70, 0) 70%);
}

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

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(3.25rem, 6vw, 6.2rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.02;
}

.lede {
  margin: 18px 0 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.3vw, 1.16rem);
  line-height: 1.65;
}

.benefits {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.benefits span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(25, 24, 20, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.fineprint {
  margin: 22px 0 0;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.55;
}

.stack {
  display: grid;
  gap: 20px;
}

.tool,
.answer-panel,
.paywall-card {
  background: var(--panel-strong);
}

.tool,
.answer-panel {
  padding: clamp(24px, 3vw, 30px);
}

.tool-header,
.answer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tool-header {
  margin-bottom: 24px;
}

.mode-switch {
  display: inline-flex;
  padding: 6px;
  gap: 6px;
  border: 1px solid rgba(25, 24, 20, 0.08);
  border-radius: 999px;
  background: rgba(240, 237, 229, 0.9);
}

.mode-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.mode-button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(38, 35, 28, 0.08);
}

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

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

label {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
}

textarea,
.unlock-row input {
  width: 100%;
  border: 1px solid rgba(25, 24, 20, 0.12);
  border-radius: 20px;
  background: rgba(251, 248, 241, 0.95);
  color: var(--ink);
}

textarea {
  min-height: 220px;
  resize: vertical;
  padding: 18px;
  line-height: 1.55;
}

textarea::placeholder,
.unlock-row input::placeholder {
  color: #8a857a;
}

textarea:focus,
button:focus-visible,
.unlock-row input:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.secondary {
  border: 1px solid rgba(25, 24, 20, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.secondary:hover {
  background: #f4f1e9;
}

#status {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: right;
}

.answer-panel {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.answer-heading {
  margin-bottom: 18px;
}

.answer {
  flex: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  color: var(--ink);
}

.answer.empty {
  color: var(--muted);
}

.paywall {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 24, 20, 0.34);
}

.paywall-card {
  position: relative;
  width: min(440px, calc(100% - 32px));
  margin: min(14vh, 120px) auto 0;
  padding: 24px;
  border: 1px solid rgba(25, 24, 20, 0.1);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(25, 24, 20, 0.18);
}

.paywall-copy {
  margin: 12px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.paywall-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--ink);
}

.paywall-list li + li {
  margin-top: 6px;
}

.price {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 900;
}

.unlock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 10px 0 12px;
}

.unlock-row input {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .intro {
    position: static;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1200px);
    padding: 12px 0 28px;
  }

  .card {
    border-radius: 24px;
  }

  .tool-header,
  .answer-heading,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-switch {
    width: 100%;
    justify-content: space-between;
  }

  .mode-button {
    flex: 1;
  }

  #status {
    text-align: left;
  }

  .unlock-row {
    grid-template-columns: 1fr;
  }
}