:root {
  /* Warm-neutral base — moves off pure black-on-white toward a cream ground
     with a dark warm slate for text. Meets WCAG AA everywhere body text
     appears: --text on --bg is ~11.5:1, --text-muted on --bg is ~4.7:1. */
  --bg: #f7f4ef;
  --surface: #fdfbf7;
  --surface-2: #f1ebe0;
  --text: #2b2f36;
  --text-muted: #6b6f78;
  --border: #e2dcd0;
  --border-strong: #cec5b3;
  /* Muted teal accent — replaces the near-black button color. #3b7c7e on
     white is ~4.7:1 with white foreground, meets AA for normal text. */
  --accent: #3b7c7e;
  --accent-fg: #ffffff;
  --accent-hover: #2f6567;
  --accent-soft: #e1eeed;
  --highlight: #f9f0d9;
  --highlight-border: #d4a017;
  /* Softer terracotta-red, replaces the harsher #b91c1c. Still reads as
     "warning" but doesn't shout. */
  --error: #a04545;
  --success: #3e7a5a;
  --shadow-sm: 0 1px 2px rgba(43, 47, 54, 0.05);
  --shadow-md: 0 4px 16px rgba(43, 47, 54, 0.06), 0 2px 4px rgba(43, 47, 54, 0.04);
  --shadow-lg: 0 12px 32px rgba(43, 47, 54, 0.08), 0 4px 8px rgba(43, 47, 54, 0.04);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1e23;
    --surface: #24272d;
    --surface-2: #2c3037;
    --text: #dcd8ce;
    --text-muted: #9a9891;
    --border: #34383f;
    --border-strong: #454a52;
    --accent: #5ba9aa;
    --accent-fg: #14232a;
    --accent-hover: #6cbaba;
    --accent-soft: #253a3b;
    --highlight: #29241a;
    --highlight-border: #a08040;
    --error: #d68c8c;
    --success: #6ba887;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

header { padding: 22px 0; border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: 14px; color: var(--text-muted);
  text-decoration: none; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface);
}
.nav-link:hover { color: var(--text); border-color: var(--text-muted); }
.nav-link.ghost { border-color: transparent; background: transparent; }

.hero { padding: 64px 0 32px; text-align: center; }
.hero h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero .tagline { font-size: 19px; color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; font-size: 15px; font-weight: 600;
  padding: 11px 20px; border-radius: 8px;
  text-decoration: none; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-fg);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); }

section { padding: 56px 0; border-top: 1px solid var(--border); }
section h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.01em; }
section .lede { color: var(--text-muted); font-size: 16px; margin: 0 0 28px; max-width: 620px; }

/* --- Try It Now: the visual focal point --- */
#try {
  /* No top border on this one — the panel below is its own visual
     container, and stacking a border-top on top of the card reads as
     accidental. Extra vertical breathing room isolates it from hero
     above and "What it does" below. */
  border-top: none;
  padding: 40px 0 64px;
}
#try h2 { font-size: 30px; margin-bottom: 10px; }
#try .lede { margin-bottom: 24px; }
#try-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
#try-panel::before {
  /* Faint accent bar along the top edge — signals this is the primary
     action on the page without shouting. */
  content: "";
  position: absolute; top: 0; left: 24px; right: 24px; height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
  opacity: 0.85;
}
#try-panel .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
#try-panel .row { align-items: flex-end; }
#try-panel input[type=text],
#try-panel select {
  width: 100%; box-sizing: border-box;
  padding: 15px 18px;
  font-family: inherit; font-size: 17px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border-strong); border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#try-panel input[type=text]:focus,
#try-panel select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#try-panel #try-extract-btn {
  padding: 15px 26px;
  font-size: 16px;
}
#try-result {
  margin-top: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  min-height: 100px;
  font-size: 15px;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}
#try-result.empty { color: var(--text-muted); font-style: italic; }
#try-cta {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
}
#try-cta a { color: var(--accent); font-weight: 600; text-decoration: none; }
#try-cta a:hover { text-decoration: underline; }

/* --- "How it works" section (4 steps + stat strip) --- */
#how .how-headline {
  font-size: 34px; line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 12px;
}
#how .how-headline-2 { color: var(--text-muted); font-weight: 600; }
#how .how-subhead { margin-bottom: 32px; }

.steps-grid {
  list-style: none; padding: 0; margin: 0 0 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  counter-reset: step;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px 20px;
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.step-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 4px;
}
.step-eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--text-muted);
  margin-bottom: 10px;
}
.step-title {
  margin: 0 0 8px; font-size: 16px; font-weight: 600;
  color: var(--text); line-height: 1.3;
}
.step-body {
  margin: 0; font-size: 14px; color: var(--text-muted);
  line-height: 1.55;
}

.stat-strip {
  list-style: none; padding: 18px 20px; margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: 10px 22px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.stat-item { position: relative; padding: 0 12px 0 0; }
.stat-item + .stat-item::before {
  content: "·"; position: absolute; left: -18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-weight: 400; font-size: 18px;
}
.stat-item:last-child { padding-right: 0; }

.trial-callout {
  background: var(--highlight); border: 1px solid var(--highlight-border);
  border-radius: 12px; padding: 24px 26px; margin-bottom: 28px;
}
.trial-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}
.trial-heading { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.trial-body { margin: 0 0 16px; font-size: 15px; color: var(--text); max-width: 620px; }
.trial-cta { display: inline-block; }
.pricing-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--text-muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.pricing-divider::before, .pricing-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px 22px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow-md); }
.price-card .tier-name {
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.price-card .price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.price-card .price-unit { font-size: 15px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.price-card .credits { font-size: 15px; color: var(--text); margin: 10px 0 4px; }
.price-card .rate { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.price-card .tier-features {
  list-style: none; padding: 0; margin: 0 0 20px;
  font-size: 14px; color: var(--text);
}
.price-card .tier-features li {
  padding: 4px 0 4px 20px;
  position: relative;
}
.price-card .tier-features li::before {
  content: "✓";
  position: absolute; left: 0; top: 4px;
  color: var(--accent); font-weight: 700;
}
.price-card .buy-btn { margin-top: auto; text-align: center; }
.price-card .featured-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px; align-self: flex-start;
}

#app-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
  box-shadow: var(--shadow-sm);
}
#app-panel .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
#app-panel input[type=email], #app-panel input[type=text], #app-panel select {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  font-family: inherit; font-size: 15px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
}
#app-panel input:focus, #app-panel select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 200px; }
.status-line { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.status-line .credits-badge {
  font-family: var(--mono); background: var(--bg);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 2px 8px; font-weight: 600; color: var(--text);
}
.status-line .trial-tag { color: var(--success); font-weight: 600; }
.status-line .trial-expired { color: var(--error); font-weight: 600; }
.status-line .tier-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent);
}
.status-line .tier-badge.tier-business { background: var(--accent); color: var(--accent-fg); }
.status-line .rate-badge {
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
}
.status-line .support-link { color: var(--accent); text-decoration: none; }
.status-line .support-link:hover { text-decoration: underline; }
.signout-link {
  background: none; border: none; padding: 0;
  color: var(--text-muted); font-size: 14px; text-decoration: underline;
  cursor: pointer;
}
.signout-link:hover { color: var(--text); }
#result {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; min-height: 120px;
  font-size: 14px; white-space: pre-wrap;
  max-height: 400px; overflow-y: auto;
}
#result.empty { color: var(--text-muted); font-style: italic; }
.error { color: var(--error); font-weight: 500; }
.notice { font-size: 14px; color: var(--text-muted); margin-top: 12px; }

/* --- FAQ accordion (native <details>/<summary>, no JS) --- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  padding: 14px 24px 14px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  position: relative;
  outline: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 22px; font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}
.faq-item summary:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft);
  border-radius: 6px;
}
.faq-answer {
  padding: 4px 0 16px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px; margin-top: 24px;
  font-size: 13px; color: var(--text-muted);
}
footer p { margin: 0 0 8px; }
footer .disclaimer { max-width: 620px; }

/* --- blog --- */
.blog-list { padding: 40px 0 60px; }
.blog-list h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -0.02em; }
.blog-list .subtitle { color: var(--text-muted); margin: 0 0 28px; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.post-list li:first-child { border-top: 1px solid var(--border); }
.post-list a { text-decoration: none; }
.post-list a:hover .post-title { color: var(--accent); }
.post-list .post-date {
  font-size: 12px; font-family: var(--mono);
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; display: block; margin-bottom: 6px;
}
.post-list .post-title {
  margin: 0 0 6px; font-size: 20px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--text);
}
.post-list .post-desc { margin: 0; color: var(--text-muted); font-size: 15px; }

.post {
  padding: 40px 0 60px;
  max-width: 680px; margin: 0 auto;
}
.post .post-meta { color: var(--text-muted); font-size: 13px; margin: 0 0 8px; }
.post h1 { margin: 0 0 20px; font-size: 34px; letter-spacing: -0.02em; line-height: 1.15; }
.post-body { font-size: 17px; line-height: 1.7; }
.post-body h2 { font-size: 22px; margin: 32px 0 12px; }
.post-body h3 { font-size: 18px; margin: 24px 0 10px; }
.post-body p { margin: 0 0 16px; }
.post-body a { text-decoration: underline; color: var(--accent); }
.post-body ul, .post-body ol { padding-left: 24px; margin: 0 0 16px; }
.post-body code {
  font-family: var(--mono); font-size: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px;
}
.post-body pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 14px; overflow-x: auto;
  margin: 0 0 16px;
}
.post-body pre code { border: 0; padding: 0; background: transparent; }
.post-body blockquote {
  border-left: 3px solid var(--border-strong);
  padding: 4px 16px; margin: 0 0 16px;
  color: var(--text-muted);
}
.back-link {
  display: inline-block; font-size: 14px; color: var(--text-muted);
  text-decoration: none; margin-bottom: 20px;
}
.back-link:hover { color: var(--text); }

@media (max-width: 760px) {
  .hero { padding: 48px 0 24px; }
  .hero h1 { font-size: 34px; }
  #try { padding: 24px 0 48px; }
  #try h2 { font-size: 24px; }
  #try-panel { padding: 20px 18px 18px; border-radius: 14px; }
  #try-panel input[type=text] { font-size: 16px; padding: 13px 15px; }
  #try-panel #try-extract-btn { width: 100%; padding: 13px 18px; }
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
  #how .how-headline { font-size: 26px; }
  .stat-strip { flex-direction: column; gap: 10px; padding: 16px; }
  .stat-item + .stat-item::before { display: none; }
  .price-grid { grid-template-columns: 1fr; }
  .post h1 { font-size: 26px; }
  .post-body { font-size: 16px; }
}
