:root {
  --bg: #0f1115;
  --panel: #181b22;
  --border: #2a2f3a;
  --text: #e6e8eb;
  --muted: #9aa3af;
  --accent: #6366f1;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.tagline {
  color: var(--muted);
  margin-top: 0.5rem;
}

.tagline a {
  color: var(--accent);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

textarea, input[type="text"] {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  resize: vertical;
  margin-top: 0.5rem;
  font-family: inherit;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.field {
  margin-bottom: 1rem;
}

button {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.status {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.models-note {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.results {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.variant {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.variant pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  margin: 0.5rem 0 0;
}

.variant .meta, .input-preview {
  color: var(--muted);
  font-size: 0.85rem;
}

.score-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.score-good { background: rgba(74, 222, 128, 0.15); color: var(--good); }
.score-warn { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.score-bad { background: rgba(248, 113, 113, 0.15); color: var(--bad); }

.feedback-section {
  margin-top: 0.75rem;
}

.feedback-section h4 {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feedback-section p {
  margin: 0.25rem 0;
}

.upgrade {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.upgrade a {
  color: var(--accent);
}

/* ---------- Landing page ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.brand-mark {
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

/* override base header centering for the hero */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-ghost {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.hero-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 1.25rem;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.9rem; }
}

.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.section-lead {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 600px;
}

/* tool panel constrained inside its section */
#try .panel, #try .results, .try-limit {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.try-limit {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1.25rem;
}

.try-limit a {
  color: var(--accent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.example-card {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.example-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.price-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.price-tag {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.price-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.price-period {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}

.price-card li {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--good);
  font-weight: 700;
}

.price-card .btn-primary, .price-card .btn-ghost {
  width: 100%;
  box-sizing: border-box;
}

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

.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.faq-item h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

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

.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Modal Dialog ---------- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-lead {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.close-btn {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  color: var(--muted);
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.15s ease;
}

.close-btn:hover {
  color: var(--text);
}
