/* OutlineAI — marketing-quality landing */
:root {
  --bg: #0b0d12;
  --panel: #14171f;
  --panel-2: #1a1e29;
  --line: #232838;
  --text: #e7eaf0;
  --muted: #8a93a6;
  --primary: #5b8cff;
  --primary-2: #7c5bff;
  --accent: #00d4a8;
  --danger: #ff5b6b;
  --warn: #ffb84d;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;
  background: linear-gradient(180deg, #0b0d12 0%, #0f1219 100%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ─── Topbar ─── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11,13,18,0.85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none; min-height: 40px; }
.brand:hover { text-decoration: none; }
.logo { font-size: 22px; }
nav a {
  color: var(--muted); margin-left: 8px; font-size: 14px;
  padding: 10px 14px; border-radius: 8px; min-height: 40px;
  display: inline-flex; align-items: center;
}
nav a:hover { color: var(--text); text-decoration: none; background: var(--panel-2); }
nav a.nav-primary { color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  nav a.nav-secondary { display: none; }
}

/* ─── Hero ─── */
.hero { padding: 64px 0 32px; }
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1; margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero h1 .hl {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); font-size: 18px; max-width: 720px; margin: 0 0 32px; }

/* ─── Card ─── */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ─── Form ─── */
.form { padding: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field .req { color: var(--danger); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.field input, .field select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,140,255,0.15);
}
.field input::placeholder { color: #555c70; }

.hint-field { justify-content: flex-end; }
.remaining {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  height: 100%;
  justify-content: center;
}
.remaining-num { font-size: 22px; font-weight: 700; color: var(--accent); }
.remaining-label { font-size: 12px; color: var(--muted); }

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white; font-weight: 600; font-size: 15px;
  border: none; border-radius: 10px;
  padding: 14px 24px;
  cursor: pointer;
  width: 100%;
  transition: transform .08s, box-shadow .15s, opacity .15s;
  font-family: inherit;
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(91,140,255,0.35); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--primary); }
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255,91,107,0.1);
  border: 1px solid rgba(255,91,107,0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 14px;
}

.key-status {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
}
.key-status.checking { color: var(--muted); }
.key-status.ok { color: var(--accent); }
.key-status.bad { color: var(--danger); }

/* ─── Results ─── */
.results { padding: 32px 0; }
.meta-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.meta-pill {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.meta-bar .btn-ghost { margin-left: auto; }

.outline h2.outline-h1 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.outline .outline-meta-desc {
  color: var(--muted);
  margin: 0 0 20px;
  font-style: italic;
}
.outline-quality-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid rgba(255,184,77,0.45);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  background: rgba(255,184,77,0.09);
  color: #d7dce6;
  font-size: 13px;
}
.outline-quality-warning strong { color: var(--warn); font-size: 14px; }
.outline-quality-warning span { line-height: 1.55; }
.outline-section {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.outline-section:first-of-type { border-top: none; padding-top: 0; }
.outline-h2 {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 19px; margin: 0 0 8px;
  color: var(--text);
}
.outline-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.outline-section-heading .outline-h2 { flex: 1; }
.section-copy, .faq-copy {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.section-copy:hover, .faq-copy:hover,
.section-copy:focus-visible, .faq-copy:focus-visible {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(91,140,255,0.1);
  outline: none;
}
.outline-faq-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.outline-faq-heading .q { flex: 1; }
.outline-h3 { font-size: 15px; color: var(--text); margin: 8px 0 4px; }
.outline-h3::before { content: "↳ "; color: var(--muted); }
.outline-h3-list { list-style: none; padding: 0; margin: 4px 0 0 16px; }
.outline-h3-list li { font-size: 14px; color: var(--muted); margin-bottom: 3px; }
.outline-h3-list li::before { content: "• "; color: var(--primary); }

.outline-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.outline-kw {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.outline-kw.primary { background: rgba(91,140,255,0.15); color: var(--primary); border-color: rgba(91,140,255,0.4); font-weight: 600; }

.outline-faq {
  background: var(--panel-2);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 6px;
}
.outline-faq .q { font-weight: 600; margin-bottom: 4px; }
.outline-faq .a { color: var(--muted); font-size: 14px; }

.outline-block-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 24px 0 10px;
  font-weight: 700;
}

/* ─── Features ─── */
.features { padding: 80px 0; }
.features h2, .pricing h2, .api h2 {
  font-size: 32px; text-align: center; margin: 0 0 12px;
}
.features .sub, .pricing .sub, .api .sub { text-align: center; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--primary); transform: translateY(-2px); }
.feature .icon { font-size: 28px; margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin: 0 0 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 14px; }

/* ─── Pricing ─── */
.pricing { padding: 60px 0 80px; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pricing-grid { margin-top: 36px; }
.price-card { position: relative; text-align: left; }
.price-card h3 { margin: 0 0 8px; font-size: 18px; }
.price-card .price { font-size: 36px; font-weight: 800; margin: 0 0 16px; }
.price-card .price span { font-size: 14px; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 20px; }
.price-card li { padding: 6px 0; color: var(--muted); font-size: 14px; }
.price-card li::before { content: "✓ "; color: var(--accent); margin-right: 6px; }
.price-card.highlight { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.price-card.highlight h3 { padding-right: 100px; }
.price-card.highlight .badge { z-index: 2; }
.price-card .badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 1;
}

/* ─── FAQ ─── */
.faq-section { padding: 60px 0; border-top: 1px solid var(--line); }
.faq-section h2 { text-align: center; margin-bottom: 28px; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: " +"; color: var(--muted); float: right; }
.faq-list details[open] summary::after { content: " −"; }
.faq-list p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 12px 0 0; }
.faq-list a { color: var(--primary); }
.faq-list p a, a.billing-email { display: inline-block; min-height: 36px; line-height: 36px; padding: 0 4px; }

/* ─── API ─── */
.api { padding: 60px 0; }
.api pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.api code { color: var(--text); }
.join-note { text-align: center; margin-top: 24px; color: var(--muted); }

/* ─── Email capture ─── */
.email-capture { padding: 0 0 60px; }
.cta-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(91,140,255,0.08), rgba(124,91,255,0.08));
  border-color: rgba(91,140,255,0.3);
}
.cta-card h3 { margin: 0 0 4px; font-size: 18px; }
.cta-card p { margin: 0; color: var(--muted); font-size: 14px; }
.email-form { display: flex; gap: 10px; min-width: 360px; }

/* Contact form (under the second pricing section) is a different layout:
   3 columns + a help paragraph, not a single input + button. */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.contact-form .field { display: flex; flex-direction: column; }
.contact-form .field label {
  font-size: 13px; color: var(--muted); font-weight: 600;
  margin-bottom: 4px;
}
.contact-form input,
.contact-form select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.contact-form input:focus,
.contact-form select:focus { outline: none; border-color: var(--primary); }
.contact-form button { white-space: nowrap; padding: 12px 20px; height: 46px; }
.contact-help { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .contact-form { grid-template-columns: 1fr; }
}
.email-form input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  flex: 1;
  font-family: inherit;
}
.email-form input:focus {
  outline: none; border-color: var(--primary);
}
.email-form button { white-space: nowrap; padding: 12px 20px; }
@media (max-width: 640px) {
  .cta-card { flex-direction: column; align-items: stretch; }
  .email-form { min-width: 0; flex-direction: column; }
}

/* ─── Footer ─── */
.foot {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.foot .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.foot a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.foot a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.foot-meta { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.foot-meta > span { padding: 0 4px; color: var(--muted); }

/* ─── Utility ─── */
[hidden] { display: none !important; }

/* ─── Samples ─── */
.sample-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  color: var(--text);
  text-decoration: none;
}
.sample-card:hover { text-decoration: none; }
.sample-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sample-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.sample-tag.risk-health { background: rgba(0,212,168,0.12); color: var(--accent); border-color: rgba(0,212,168,0.35); }
.sample-tag.risk-financial { background: rgba(255,184,77,0.12); color: var(--warn); border-color: rgba(255,184,77,0.35); }
.sample-tag.risk-legal { background: rgba(255,91,107,0.12); color: var(--danger); border-color: rgba(255,91,107,0.35); }
.sample-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sample-cta {
  margin-top: 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

/* ─── Blog ─── */
.blog-body {
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
}
.blog-body h2 {
  font-size: 26px;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.blog-body h3 {
  font-size: 19px;
  margin: 28px 0 10px;
  line-height: 1.3;
}
.blog-body p { margin: 0 0 18px; }
.blog-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.blog-body a:hover { color: var(--primary-2); }
.blog-body ul, .blog-body ol { margin: 0 0 18px; padding-left: 24px; }
.blog-body li { margin-bottom: 6px; }
.blog-body li::marker { color: var(--primary); }
.blog-body strong { color: var(--text); }
.blog-body blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--primary);
  background: var(--panel-2);
  border-radius: 0 8px 8px 0;
  color: var(--text);
  font-style: italic;
}
.blog-body code {
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.blog-body pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.blog-body pre code { background: transparent; padding: 0; }
.blog-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
}
.blog-body th, .blog-body td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.blog-body th {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--panel-2);
}
.blog-body td:first-child { font-weight: 600; }