:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --ink: #17201b;
  --muted: #657067;
  --line: #d8ded5;
  --panel: #ffffff;
  --accent: #117a65;
  --accent-dark: #0c594a;
  --warn: #a53d20;
  --soft: #e7f2ed;
  --gold: #d6a642;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(246, 247, 244, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

nav {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
  padding: clamp(52px, 8vw, 96px) clamp(18px, 4vw, 56px) 34px;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: 0;
}

.subheadline {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.primary-link,
.analyze-button,
.secondary-button,
.copy-button {
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-link,
.analyze-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
}

.primary-link:hover,
.analyze-button:hover { background: var(--accent-dark); }

.hero-visual {
  min-height: 420px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 122, 101, 0.12), rgba(214, 166, 66, 0.18)),
    #fff;
  box-shadow: 0 24px 70px rgba(23, 32, 27, 0.1);
}

.score-ring {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin-left: auto;
  border: 16px solid var(--accent);
  border-left-color: var(--gold);
  border-radius: 50%;
  font-size: 44px;
  font-weight: 900;
}

.visual-lines {
  display: grid;
  gap: 14px;
  margin-top: 60px;
}

.visual-lines span {
  height: 16px;
  border-radius: 999px;
  background: #dce7e1;
}

.visual-lines span:nth-child(2) { width: 74%; background: #eef3ef; }
.visual-lines span:nth-child(3) { width: 52%; background: #cddbd4; }

.visual-note {
  margin-top: 54px;
  padding: 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.tool-section,
.pricing-section,
.why-section {
  padding: 34px clamp(18px, 4vw, 56px) 72px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 22px;
  align-items: start;
}

.editor-panel,
.results-panel,
.price-card,
.upgrade-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.editor-panel,
.results-panel {
  min-height: 620px;
  padding: clamp(18px, 3vw, 28px);
}

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

.panel-heading h2,
.section-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3vw, 36px);
}

.panel-heading p,
.section-copy p,
.empty-state p,
.price-card p,
.upgrade-panel p,
.why-grid span {
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}

.account-field {
  margin: 16px 0;
}

.account-field small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

textarea {
  resize: vertical;
  min-height: 280px;
  padding: 16px;
  line-height: 1.5;
}

.secondary-button,
.copy-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.analyze-button {
  width: 100%;
}

.wide-button {
  width: 100%;
  margin-top: 10px;
}

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

.error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e1ac98;
  border-radius: 8px;
  background: #fff1ec;
  color: var(--warn);
  font-weight: 700;
}

.empty-state {
  display: grid;
  place-content: center;
  min-height: 540px;
  text-align: center;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.score {
  font-size: 58px;
  font-weight: 900;
  color: var(--accent-dark);
}

.result-block {
  margin-top: 22px;
}

.result-block h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.result-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.message-box {
  position: relative;
  padding: 16px;
  border-radius: 8px;
  background: #f3f7f4;
  white-space: pre-wrap;
  line-height: 1.55;
}

.message-box .copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.message-text {
  padding-right: 78px;
}

.section-copy {
  max-width: 740px;
  margin-bottom: 22px;
}

.pricing-grid,
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.price-card,
.upgrade-panel,
.why-grid div {
  padding: 22px;
}

.price-card.featured {
  border-color: var(--accent);
  background: var(--soft);
}

.price {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 900;
}

.upgrade-panel {
  margin-top: 16px;
  max-width: 540px;
}

.why-grid div {
  display: grid;
  gap: 8px;
  border-top: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.48);
}

@media (max-width: 900px) {
  nav { display: none; }

  .hero,
  .tool-grid,
  .pricing-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .hero { min-height: auto; }
  .hero-visual { min-height: 300px; }
}

@media (max-width: 560px) {
  .panel-heading {
    grid-template-columns: 1fr;
    display: grid;
  }

  h1 { font-size: 42px; }

  .editor-panel,
  .results-panel {
    min-height: auto;
  }
}
