/* ============================================================
   Verjust — human fact-checking product frontend
   Design system: warm editorial. Not corporate SaaS.
   Serif display headers + geometric sans body.
   Ink-on-cream base with a saturated teal accent + verdict semantics.
   ============================================================ */

:root {
  /* Palette — warmer, more editorial than the dev product */
  --cream: #faf7f2;
  --paper: #ffffff;
  --ink: #1c1917;
  --ink-2: #44403c;
  --ink-3: #78716c;
  --line: #e7e5e0;
  --line-2: #d6d3cf;

  --accent: #0f766e;         /* deep teal */
  --accent-2: #14b8a6;
  --accent-tint: #ccfbf1;
  --accent-ink: #134e4a;

  /* Verdict palette — printed-book highlighter energy */
  --verdict-supported: #16a34a;
  --verdict-supported-bg: #dcfce7;
  --verdict-supported-underline: #22c55e;

  --verdict-refuted: #dc2626;
  --verdict-refuted-bg: #fee2e2;
  --verdict-refuted-underline: #ef4444;

  --verdict-review: #d97706;
  --verdict-review-bg: #fef3c7;
  --verdict-review-underline: #f59e0b;

  --verdict-malformed: #78716c;
  --verdict-malformed-bg: #f5f5f4;

  /* Type */
  --font-display: "Cabinet Grotesk", "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-hero: 3.75rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow: 0 4px 14px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 20px 50px rgba(28, 25, 23, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-base); font-weight: 600; }

.muted { color: var(--ink-3); }
.center { text-align: center; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-4) var(--sp-8);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  color: var(--ink); font-weight: 700; font-size: 1.125rem; text-decoration: none;
  font-family: var(--font-display);
}
.brand:hover { text-decoration: none; }
/* Logo mark always renders in the accent color — currentColor on the rounded square */
.brand-mark { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: var(--sp-6); }
.site-nav a { color: var(--ink-2); font-weight: 500; font-size: var(--text-sm); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  padding: 0.5rem 1rem; background: var(--ink); color: var(--cream) !important;
  border-radius: var(--radius); font-weight: 600;
}
.nav-cta:hover { background: var(--accent); color: white !important; text-decoration: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base);
  cursor: pointer; transition: all 0.15s ease;
  text-decoration: none;
  gap: var(--sp-2);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--accent); color: white; }
.btn-secondary { background: var(--accent); color: white; }
.btn-secondary:hover { background: var(--accent-ink); color: white; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: var(--text-sm); }
.btn-block { display: flex; width: 100%; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: var(--sp-16) var(--sp-8) var(--sp-12); }
.eyebrow {
  display: inline-block; padding: 0.25rem 0.625rem; margin-bottom: var(--sp-4);
  background: var(--accent-tint); color: var(--accent-ink);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  border-radius: 999px;
}

/* Highlight styles — used in the results doc */
.hl { padding: 0.05em 0.1em; border-radius: 3px; transition: background 0.15s ease; cursor: pointer; }
.hl-supported { background: var(--verdict-supported-bg); border-bottom: 2px solid var(--verdict-supported-underline); }
.hl-refuted   { background: var(--verdict-refuted-bg);   border-bottom: 2px solid var(--verdict-refuted-underline); }
.hl-review    { background: var(--verdict-review-bg);    border-bottom: 2px solid var(--verdict-review-underline); }
.hl-malformed { background: var(--verdict-malformed-bg); border-bottom: 2px dashed var(--line-2); opacity: 0.7; }
.hl:hover { filter: brightness(0.95); }
.hl.hl-active { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ============================================================
   App section
   ============================================================ */
.app { padding: var(--sp-16) var(--sp-8); background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.app-inner { max-width: 1200px; margin: 0 auto; }
.app-head { text-align: center; margin-bottom: var(--sp-8); }
.app-head h2 { margin-bottom: var(--sp-2); }

/* Tabs */
.tabs {
  display: inline-flex; background: var(--cream); padding: 4px;
  border-radius: var(--radius); border: 1px solid var(--line);
  margin-bottom: var(--sp-4);
}
.tab {
  padding: 0.5rem 1.25rem; border: none; background: transparent;
  color: var(--ink-3); font: inherit; font-weight: 600; font-size: var(--text-sm);
  cursor: pointer; border-radius: 7px; transition: all 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Input */
.input-panel { margin-bottom: var(--sp-4); }
textarea, input[type="url"], select {
  width: 100%; padding: 0.875rem 1rem;
  background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--radius); font: inherit; color: var(--ink);
  resize: vertical;
}
textarea:focus, input[type="url"]:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
textarea { min-height: 160px; font-size: var(--text-base); line-height: 1.6; }
.input-meta {
  display: flex; justify-content: space-between; margin-top: var(--sp-2);
  color: var(--ink-3); font-size: var(--text-sm);
}
.input-hint { font-style: italic; }

/* Controls row */
.app-controls {
  display: grid; grid-template-columns: 1.2fr 1.2fr 1fr auto; gap: var(--sp-4);
  align-items: end; margin-bottom: var(--sp-6);
  padding: var(--sp-4); background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.control-group { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.control-group label { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }
.control-cta { align-self: end; }
#check-btn { padding: 0.875rem 1.5rem; white-space: nowrap; }

.slider-wrap { display: flex; align-items: center; gap: var(--sp-3); }
input[type="range"] { flex: 1; accent-color: var(--accent); }
#conf-value { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); min-width: 3ch; text-align: right; }

/* Loading */
.loading {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  padding: var(--sp-16) var(--sp-4); color: var(--ink-2);
}
.spinner {
  width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { font-size: var(--text-base); }

/* Error */
.error-panel {
  padding: var(--sp-4) var(--sp-6);
  background: var(--verdict-refuted-bg); border: 1px solid var(--verdict-refuted-underline);
  border-radius: var(--radius); color: var(--verdict-refuted);
  margin-bottom: var(--sp-4);
}

/* ============================================================
   Results
   ============================================================ */
.results { margin-top: var(--sp-6); }
.results-summary {
  display: grid; grid-template-columns: 200px 1fr auto; gap: var(--sp-6); align-items: center;
  padding: var(--sp-6); background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  margin-bottom: var(--sp-6);
}
.score-card { text-align: center; }
.score-value {
  font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1;
  letter-spacing: -0.03em;
}
.score-label { font-size: var(--text-sm); color: var(--ink-3); margin-top: var(--sp-1); }
.summary-stats { display: flex; gap: var(--sp-6); }
.stat { text-align: center; min-width: 80px; }
.stat-num { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; }
.stat-label { font-size: var(--text-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-supported .stat-num { color: var(--verdict-supported); }
.stat-refuted .stat-num   { color: var(--verdict-refuted); }
.stat-review .stat-num    { color: var(--verdict-review); }

.filter-chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  padding: 0.4rem 0.75rem; border: 1px solid var(--line-2);
  background: var(--paper); border-radius: 999px;
  font: inherit; font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Results body: two-column */
.results-body {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-6);
}
.results-doc, .results-side {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-6);
}
.doc-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line);
}
.doc-toolbar h3 { font-size: var(--text-lg); }
.doc-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.doc-hint {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-4); font-size: var(--text-sm); color: var(--ink-3);
}
kbd {
  display: inline-block; padding: 0.05rem 0.3rem;
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 4px; font-family: var(--font-mono); font-size: 0.75em;
  background: var(--cream); color: var(--ink-2);
}
.kbd-hint { display: flex; gap: var(--sp-1); align-items: center; }

.doc {
  font-size: var(--text-lg); line-height: 1.75;
  color: var(--ink); max-height: 600px; overflow-y: auto; padding-right: var(--sp-2);
}
.doc p { margin: 0 0 var(--sp-4); }

/* Sources tabs */
.side-tabs { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.side-tab {
  padding: var(--sp-2) var(--sp-3); border: none; background: transparent;
  color: var(--ink-3); font: inherit; font-weight: 500; font-size: var(--text-sm);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.side-tab:hover { color: var(--ink-2); }
.side-tab-active { color: var(--ink); border-bottom-color: var(--accent); }

.side-empty { color: var(--ink-3); font-style: italic; padding: var(--sp-6) 0; text-align: center; }

/* Detail panel */
.claim-detail { }
.claim-detail-verdict {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; border-radius: 999px;
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: var(--sp-3);
}
.claim-detail-verdict.v-supported { background: var(--verdict-supported-bg); color: var(--verdict-supported); }
.claim-detail-verdict.v-refuted   { background: var(--verdict-refuted-bg); color: var(--verdict-refuted); }
.claim-detail-verdict.v-review    { background: var(--verdict-review-bg); color: var(--verdict-review); }
.claim-detail-verdict.v-malformed { background: var(--verdict-malformed-bg); color: var(--verdict-malformed); }

.claim-detail-claim {
  font-size: var(--text-lg); font-weight: 500; margin-bottom: var(--sp-4);
  line-height: 1.4; color: var(--ink);
}
.claim-detail-row { display: flex; justify-content: space-between; padding: var(--sp-3) 0; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.claim-detail-row-label { color: var(--ink-3); font-weight: 500; }
.claim-detail-row-value { color: var(--ink); font-weight: 500; text-align: right; word-break: break-word; max-width: 60%; }
.claim-detail-quote {
  margin: var(--sp-4) 0; padding: var(--sp-4);
  background: var(--cream); border-left: 3px solid var(--accent);
  font-style: italic; font-size: var(--text-sm); line-height: 1.6;
}
.claim-detail-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); flex-wrap: wrap; }

/* Sources panel */
.source-item {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
}
.source-item:last-child { border-bottom: none; }
.source-favicon {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 4px;
  background: var(--cream); border-radius: 4px;
}
.source-body { flex: 1; min-width: 0; }
.source-title { font-weight: 600; font-size: var(--text-sm); color: var(--ink); margin-bottom: 0.125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-url { font-size: var(--text-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-count {
  font-size: var(--text-xs); color: var(--ink-3);
  padding: 0.1rem 0.4rem; background: var(--cream); border-radius: 4px;
  margin-top: var(--sp-1); display: inline-block;
}

/* Bibliography */
.bib-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line);
}
.bib-style-name { font-weight: 600; color: var(--ink-2); font-size: var(--text-sm); }
#bib-list { font-size: var(--text-sm); line-height: 1.7; }
.bib-entry {
  padding: var(--sp-2) 0;
  padding-left: 2rem; text-indent: -2rem;   /* hanging indent for MLA/APA/Chicago */
}
.bib-entry.style-ieee { padding-left: 2.5rem; text-indent: -2.5rem; }
.bib-entry.style-bibtex, .bib-entry.style-ris {
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.5;
  white-space: pre-wrap; padding-left: 0; text-indent: 0;
  color: var(--ink-2);
}

/* ============================================================
   How it works
   ============================================================ */
.how { padding: var(--sp-16) var(--sp-8); }
.how-inner { max-width: 1200px; margin: 0 auto; }
.how h2 { text-align: center; margin-bottom: var(--sp-12); }
.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.step {
  background: var(--paper); padding: var(--sp-6);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: var(--sp-3);
  background: var(--ink); color: var(--cream);
  border-radius: 50%; font-family: var(--font-display); font-weight: 700;
}
.step h3 { margin-bottom: var(--sp-2); }
.step p { color: var(--ink-2); font-size: var(--text-sm); margin: 0; }

/* ============================================================
   Features
   ============================================================ */
.features { padding: var(--sp-16) var(--sp-8); background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features-inner { max-width: 1200px; margin: 0 auto; }
.features h2 { text-align: center; margin-bottom: var(--sp-12); }
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6);
}
.feature {
  padding: var(--sp-6);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.feature-icon { font-size: 1.5rem; margin-bottom: var(--sp-3); }
.feature h3 { margin-bottom: var(--sp-2); }
.feature p { color: var(--ink-2); font-size: var(--text-sm); margin: 0; }

/* ============================================================
   Pricing
   ============================================================ */
.pricing { padding: var(--sp-16) var(--sp-8); }
.pricing-inner { max-width: 1200px; margin: 0 auto; }
.pricing h2 { text-align: center; margin-bottom: var(--sp-2); }
.pricing > .pricing-inner > p.muted { text-align: center; margin-bottom: var(--sp-12); }
.tier-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.tier {
  background: var(--paper); padding: var(--sp-6);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; position: relative;
}
.tier-featured { border-color: var(--accent); box-shadow: var(--shadow); }
.tier-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.tier-name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); }
.tier-price { display: flex; align-items: baseline; gap: 0.25rem; margin: var(--sp-3) 0 var(--sp-1); }
.tier-price-amt { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 800; letter-spacing: -0.03em; }
.tier-price-suffix { color: var(--ink-3); font-weight: 500; }
.tier-price-note { color: var(--ink-3); font-size: var(--text-sm); margin-bottom: var(--sp-3); min-height: 1.2em; }
.tier-desc { color: var(--ink-2); font-size: var(--text-sm); margin-bottom: var(--sp-4); }
.tier-features { list-style: none; padding: 0; margin: 0 0 var(--sp-6); font-size: var(--text-sm); flex: 1; }
.tier-features li {
  position: relative; padding-left: 1.5rem; padding-block: 0.375rem;
  color: var(--ink-2);
}
.tier-features li::before {
  content: ""; position: absolute; left: 0.25rem; top: 0.6rem;
  width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.pricing-payg, .pricing-dev {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-4) var(--sp-6);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); margin-bottom: var(--sp-3);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding: var(--sp-16) var(--sp-8); background: var(--paper); border-top: 1px solid var(--line); }
.faq-inner { max-width: 800px; margin: 0 auto; }
.faq h2 { text-align: center; margin-bottom: var(--sp-12); }
.faq details {
  border-bottom: 1px solid var(--line); padding: var(--sp-4) 0;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: var(--text-lg);
  list-style: none; padding-right: var(--sp-8); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 0;
  font-size: 1.5rem; font-weight: 400; color: var(--ink-3);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin: var(--sp-3) 0 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: var(--cream); padding: var(--sp-12) var(--sp-8) var(--sp-6); }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 2fr; gap: var(--sp-12);
  margin-bottom: var(--sp-8);
}
.site-footer .brand { color: var(--cream); }
.site-footer .brand-mark { color: var(--accent); }
.footer-tagline { color: rgba(250, 247, 242, 0.7); font-size: var(--text-sm); margin-top: var(--sp-2); }
.footer-tagline a { color: var(--accent-2); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.footer-cols h4 { color: var(--cream); margin-bottom: var(--sp-3); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-cols a { display: block; color: rgba(250, 247, 242, 0.7); font-size: var(--text-sm); padding: 0.25rem 0; }
.footer-cols a:hover { color: var(--cream); text-decoration: none; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  padding-top: var(--sp-6); border-top: 1px solid rgba(250, 247, 242, 0.1);
  font-size: var(--text-sm); color: rgba(250, 247, 242, 0.5);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-preview { order: -1; margin: 0 auto; max-width: 400px; }
  .hero h1 { font-size: var(--text-4xl); }
  .app-controls { grid-template-columns: 1fr 1fr; }
  .results-summary { grid-template-columns: 1fr; text-align: center; }
  .summary-stats { justify-content: center; }
  .filter-chips { justify-content: center; }
  .results-body { grid-template-columns: 1fr; }
  .how-steps, .feature-grid, .tier-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { padding: var(--sp-3) var(--sp-4); }
  .site-nav { gap: var(--sp-3); }
  .site-nav a:not(.nav-cta) { display: none; }
  .hero { padding: var(--sp-12) var(--sp-4) var(--sp-8); }
  .hero h1 { font-size: var(--text-3xl); }
  .hero-sub { font-size: var(--text-base); }
  .app, .how, .features, .pricing, .faq { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .app-controls { grid-template-columns: 1fr; }
  .how-steps, .feature-grid, .tier-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--sp-2); text-align: center; }
}

/* ============================================================
   Landing v2 additions — Google-Ads-optimized layout
   ============================================================ */

/* Hero v2 — text-centric, tool right below the fold */
.hero-inner-v2 {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero-inner-v2 .hero-copy { max-width: 800px; margin: 0 auto; }
.hero-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}
.hero-h1-accent {
  color: var(--accent);
  display: inline-block;
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 680px;
  margin: 0 auto var(--sp-6);
}
.hero-ctas-note {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--ink-3);
}
.hero-inner-v2 .hero-ctas { justify-content: center; }

/* Trust metrics row — replaces the checkmark list */
.hero-trust-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  padding: var(--sp-4);
  background: var(--cream-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.trust-metric {
  text-align: center;
  padding: 0 var(--sp-2);
  border-right: 1px solid var(--rule);
}
.trust-metric:last-child { border-right: 0; }
.trust-metric-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.trust-metric-label {
  font-size: 0.72rem;
  color: var(--ink-2);
  line-height: 1.2;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Larger CTA button variant */
.btn-lg {
  padding: 14px 28px;
  font-size: var(--text-base);
  font-weight: 600;
}

/* App section — above the fold styling */
.app-above-fold {
  padding-top: var(--sp-4);
  scroll-margin-top: 60px;
}

/* Section heads shared across new sections */
.section-head { text-align: center; margin-bottom: var(--sp-10); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: var(--sp-2) 0 var(--sp-3);
}
.section-head p.muted {
  max-width: 720px;
  margin: 0 auto;
  font-size: var(--text-base);
  color: var(--ink-2);
}
.eyebrow.center { display: inline-block; }

/* Comparison table */
.compare {
  padding: var(--sp-16) var(--sp-6);
  background: var(--cream);
}
.compare-inner { max-width: 1100px; margin: 0 auto; }
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--rule);
  overflow: hidden;
  font-size: var(--text-sm);
}
.compare-table th,
.compare-table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.compare-table thead th {
  background: var(--cream-2);
  font-weight: 600;
  color: var(--ink);
  font-size: var(--text-sm);
}
.compare-table tbody td {
  color: var(--ink-2);
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table .compare-us {
  background: rgba(15, 118, 110, 0.06);
  color: var(--ink);
  font-weight: 500;
}
.compare-table thead .compare-us {
  color: var(--accent);
  font-weight: 700;
}
.compare-table tbody td:first-child {
  font-weight: 500;
  color: var(--ink);
}
.compare-footnote {
  margin-top: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--ink-3);
  text-align: center;
}
.compare-footnote a { color: var(--accent); text-decoration: underline; }

/* Billing toggle */
.billing-toggle {
  display: inline-flex;
  align-self: center;
  padding: 4px;
  background: var(--cream-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  margin: 0 auto var(--sp-8);
  gap: 4px;
}
.pricing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pricing-inner .section-head,
.pricing-inner .tier-grid,
.pricing-inner .pricing-payg,
.pricing-inner .pricing-dev,
.pricing-inner .pricing-team-note {
  width: 100%;
}
.billing-btn {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.billing-btn:hover { color: var(--ink); }
.billing-btn-active {
  background: white;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.billing-save {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Tier grid — 3 columns instead of 4 */
.tier-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1000px;
  margin: 0 auto;
}
.tier-feature-no {
  color: var(--ink-3);
  text-decoration: line-through;
  opacity: 0.7;
}
.tier-microcopy {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-top: var(--sp-2);
}
.pricing-team-note {
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  background: var(--cream-2);
  border-radius: 8px;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.pricing-team-note strong { color: var(--ink); }
.pricing-team-note a { color: var(--accent); text-decoration: underline; }

/* Closing CTA */
.closing-cta {
  padding: var(--sp-16) var(--sp-6);
  background: linear-gradient(135deg, var(--ink) 0%, #292524 100%);
  color: var(--cream);
  text-align: center;
}
.closing-cta-inner {
  max-width: 680px;
  margin: 0 auto;
}
.closing-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
  color: var(--cream);
}
.closing-cta p {
  color: rgba(250, 247, 242, 0.7);
  font-size: var(--text-lg);
  margin-bottom: var(--sp-6);
}
.closing-cta .btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}
.closing-cta .btn-primary:hover {
  background: var(--accent-dark, #0d5d55);
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px 8px 8px 20px;
  animation: sticky-cta-in 0.3s ease-out;
}
@keyframes sticky-cta-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.sticky-cta-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--text-sm);
}
.sticky-cta-text { color: var(--ink-2); white-space: nowrap; }
.sticky-cta-text strong { color: var(--ink); }
.sticky-cta .btn-sm {
  padding: 8px 16px;
  font-size: var(--text-sm);
}

/* Compare responsive */
@media (max-width: 900px) {
  .compare-table { font-size: var(--text-xs); }
  .compare-table th, .compare-table td { padding: var(--sp-2) var(--sp-3); }
  .tier-grid-3 { grid-template-columns: 1fr 1fr; }
  .hero-trust-v2 { grid-template-columns: repeat(2, 1fr); }
  .trust-metric { border-right: none; padding: var(--sp-2); }
  .trust-metric:nth-child(odd) { border-right: 1px solid var(--rule); }
  .trust-metric:nth-child(-n+2) { border-bottom: 1px solid var(--rule); padding-bottom: var(--sp-3); }
  .trust-metric:nth-child(n+3) { padding-top: var(--sp-3); }
}
@media (max-width: 640px) {
  .tier-grid-3 { grid-template-columns: 1fr; }
  .sticky-cta { left: 8px; right: 8px; transform: none; padding: 8px 12px 8px 16px; border-radius: 12px; }
  .sticky-cta-inner { gap: var(--sp-2); }
  .sticky-cta-text { font-size: 0.8rem; white-space: normal; }
  .compare-table thead th:nth-child(n+3),
  .compare-table tbody td:nth-child(n+3) { display: none; }
  .closing-cta { padding: var(--sp-10) var(--sp-4); }
}

/* Who it's for band */
.who {
  padding: var(--sp-16) var(--sp-6);
  background: white;
}
.who-inner { max-width: 1100px; margin: 0 auto; }
.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-2);
}
.who-card {
  background: var(--cream-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: var(--sp-6);
  transition: transform 0.15s, box-shadow 0.15s;
}
.who-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.who-icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-3);
  line-height: 1;
}
.who-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.01em;
}
.who-card p {
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin: 0;
}
.who-note {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: var(--text-sm);
  color: var(--ink-3);
}
.who-note a { color: var(--accent); text-decoration: underline; }
@media (max-width: 900px) {
  .who-grid { grid-template-columns: 1fr; }
}
