/* ════════════════════════════════════════
   ActOn brand design system — ResearchCraft
   Red #D91A1A  ·  Blue #A8D8F0  ·  Yellow #F5D03B
   Mirrors globals.css from CoverCraft (Next.js).
   ════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --red:    #D91A1A;
  --blue:   #A8D8F0;
  --yellow: #F5D03B;
  --bg:     #f8fafc;
  --fg:     #0f172a;
  --muted:  #64748b;
  --border: #e2e8f0;
  --card:   #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ── Typography ─────────────────────────────── */
h1 { font-size: 2rem; font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
h3 { font-size: 1rem; font-weight: 700; }

code, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────── */
.app-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.nav-product {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-product-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-product-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--fg);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: #0f172a; background: #f1f5f9; text-decoration: none; }
.nav-link.active { color: var(--red); background: #fff5f5; }
.nav-link svg { flex-shrink: 0; width: 16px; height: 16px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.credits-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: white;
  text-decoration: none;
}

.credits-badge.low {
  border-color: #fecaca;
  background: #fff5f5;
  color: var(--red);
}

.credits-badge .coin-icon {
  color: #eab308;
  font-size: 0.85rem;
}

.nav-user-email {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-logout {
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.nav-logout svg { width: 16px; height: 16px; }
.nav-logout:hover { background: var(--bg); color: var(--fg); }

/* ActOn wordmark */
.acton-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.acton-wordmark-text {
  font-weight: 900;
  color: var(--red);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ── Page layout ────────────────────────────── */
.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Cards ──────────────────────────────────── */
.app-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.app-card-red-top {
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: 16px;
}

.app-card-yellow-left {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--yellow);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

/* ── Inputs ─────────────────────────────────── */
.app-input {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  padding: 0.65rem 0.875rem;
  font-size: 0.875rem;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}
.app-input::placeholder { color: #94a3b8; }
.app-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,26,26,0.08); }

textarea.app-input { resize: vertical; }

/* ── Buttons ─────────────────────────────────── */
.btn-red {
  background: var(--red);
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 0.65rem 1.4rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(217,26,26,0.25);
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-red:hover {
  background: #c01515;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217,26,26,0.35);
  text-decoration: none;
  color: white;
}

.btn-outline-red {
  background: transparent;
  color: var(--red);
  font-weight: 600;
  border: 1.5px solid var(--red);
  border-radius: 50px;
  padding: 0.65rem 1.4rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-outline-red:hover {
  background: var(--red);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: var(--fg);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.65rem 1.4rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-secondary:hover { border-color: #cbd5e1; background: var(--bg); }

/* ── Forms ──────────────────────────────────── */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--fg);
  display: block;
  margin-bottom: 0.35rem;
}

.form-label .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.skip-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Error / Alert banners ───────────────────── */
.alert-error {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #b91c1c;
  font-size: 0.875rem;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #92400e;
  font-size: 0.875rem;
}

/* ── Code blocks ─────────────────────────────── */
pre {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* ── Venue tags ─────────────────────────────── */
.venues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.5rem 0 1rem;
}

.venue-tag {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Papers list ─────────────────────────────── */
.papers {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.papers li {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.papers a { color: var(--red); }
.papers a:hover { text-decoration: underline; }

.paper-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

/* ── Innovation box ──────────────────────────── */
.innovation-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

/* ── Run result badges ───────────────────────── */
.run-ok   { color: #15803d; font-weight: 600; font-size: 0.8rem; }
.run-fail { color: var(--red); font-weight: 600; font-size: 0.8rem; }
.run-skip { color: var(--muted); font-weight: 500; font-size: 0.8rem; }

/* ── Clarification UI ────────────────────────── */
.qa-history { list-style: none; padding: 0; }

.qa-history li {
  border-left: 3px solid var(--border);
  padding: 0.4rem 0 0.4rem 0.8rem;
  margin-bottom: 0.8rem;
}

.qa-q { font-size: 0.875rem; }
.qa-a { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }

.refined-topic-box {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--fg);
}

.clarify-question { margin-bottom: 1rem; }

/* ── Section spacing ─────────────────────────── */
.section + .section { margin-top: 2rem; }

.section-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ── Back link ───────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.back-link:hover { color: var(--fg); text-decoration: none; }

/* ── Meta line ───────────────────────────────── */
.meta-line {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ── File input + text input ─────────────────── */
input[type="file"],
input[type="text"],
input[type="email"],
input[type="password"] {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  padding: 0.6rem 0.875rem;
  font: inherit;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
input[type="file"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217,26,26,0.08);
}

/* ── Checkbox ─────────────────────────────────── */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Auth pages ──────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
}

.auth-left {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 380px;
  flex-shrink: 0;
  padding: 2.5rem;
  background: linear-gradient(160deg, #6e90aa 0%, #8fa3b5 40%, #ccaa9a 100%);
}

@media (min-width: 1024px) {
  .auth-left { display: flex; }
}

.auth-left-footer { font-size: 0.72rem; color: rgba(255,255,255,0.35); }

.auth-perks { list-style: none; margin-top: 1.5rem; }
.auth-perks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.75rem;
}

.auth-perk-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.65rem;
  color: white;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--bg);
}

.auth-box { width: 100%; max-width: 400px; }

.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .auth-mobile-brand { display: none; }
}

.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  padding: 2rem;
  margin-top: 1.25rem;
}

.auth-success {
  text-align: center;
  padding: 3rem 2rem;
}

.auth-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dcfce7;
  border: 1px solid #86efac;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}
.social-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.9rem;
}

.input-group input { padding-left: 2.2rem; }

.input-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  display: flex;
}
.input-toggle:hover { color: var(--fg); }

/* ── Footer ──────────────────────────────────── */
.app-footer {
  background: #0f172a;
  padding: 1.5rem 1.25rem;
  color: rgba(255,255,255,0.25);
  font-size: 0.75rem;
}

.app-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Details / summary ───────────────────────── */
details { margin-top: 0.75rem; }
details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.3rem 0;
  user-select: none;
}
details summary:hover { color: var(--fg); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .page { padding: 1.5rem 1rem 4rem; }
  .btn-red, .btn-outline-red, .btn-secondary { width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; }
}

/* ════════════════════════════════════════════════════════
   LANDING PAGE — full marketing page, mirrors CoverCraft
   ════════════════════════════════════════════════════════ */

.landing-bg { background: white; color: #0f172a; overflow-x: hidden; }

/* ── Landing nav ── */
.landing-nav {
  position: sticky; top: 0; z-index: 40;
  background: white; border-bottom: 1px solid #e2e8f0;
}
.landing-nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  height: 60px; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.landing-nav-links { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 1024px) { .landing-nav-links { display: flex; } }
.landing-nav-links a { font-size: 0.875rem; font-weight: 500; color: #64748b; text-decoration: none; transition: color 0.15s; }
.landing-nav-links a:hover { color: #0f172a; }

/* ── Hero decorations ── */
.hero-arc {
  position: absolute; top: -120px; right: -120px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #cceeff 0%, #a8d8f0 50%, #7ec8e8 100%);
  opacity: 0.45; pointer-events: none;
}
.hero-arc-2 {
  position: absolute; bottom: -200px; left: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, #f5d03b22 0%, #f5d03b08 100%);
  pointer-events: none;
}

/* ── Floating deco badges — hidden on small screens ── */
.float-deco { display: none; }
@media (min-width: 900px) { .float-deco { display: block; } }

/* ── Landing card ── */
.landing-card {
  background: white; border: 1px solid #e2e8f0;
  border-radius: 20px; box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ── Product preview mockup ── */
.product-preview {
  background: white; border-radius: 16px; overflow: hidden;
  border: 1px solid #e2e8f0; box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  font-size: 0.78rem;
}
.preview-chrome {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.75rem 1rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.preview-dot { width: 12px; height: 12px; border-radius: 50%; }
.preview-dot.dot-red    { background: #fc5f5a; }
.preview-dot.dot-yellow { background: #fdbc2c; }
.preview-dot.dot-green  { background: #34c84a; }
.preview-url { margin-left: 0.5rem; font-family: monospace; font-size: 0.7rem; color: #94a3b8; }
.preview-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.preview-label { font-size: 0.7rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.preview-paper { padding: 0.5rem 0.75rem; border: 1px solid #f1f5f9; border-radius: 8px; background: #f8fafc; }
.preview-paper-title { font-weight: 600; color: #D91A1A; display: block; }
.preview-paper-meta  { color: #94a3b8; font-size: 0.7rem; margin-top: 0.15rem; display: block; }
.preview-run-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 999px; padding: 0.3rem 0.75rem;
  color: #15803d; font-weight: 700; font-size: 0.72rem;
}
.preview-essay {
  background: white; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 0.75rem; color: #475569; line-height: 1.6;
}
.preview-essay mark {
  background: #dcfce7; color: #166534;
  border-bottom: 2px solid #4ade80; border-radius: 2px; font-style: normal;
}

/* ── Stats strip ── */
.stats-strip { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 2rem 1.5rem; }
.stats-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(2,1fr); gap: 2rem; text-align: center; }
@media (min-width: 768px) { .stats-inner { grid-template-columns: repeat(4,1fr); } }

/* ── Landing hero grid ── */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1fr; } }

/* ── Features / how-it-works / testimonials grids ── */
.features-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 3rem; }
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2,1fr); } }
.how-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 3rem; }
@media (min-width: 768px) { .how-grid { grid-template-columns: repeat(4,1fr); } }
.testi-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 3rem; }
@media (min-width: 768px) { .testi-grid { grid-template-columns: repeat(3,1fr); } }

/* ── Section badge ── */
.section-badge {
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px;
  padding: 0.35rem 0.875rem; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1.25rem;
}
.section-badge-red  { background: #fff5f5; border: 1px solid #fecaca; color: #D91A1A; }
.section-badge-blue { background: #eff9fe; border: 1px solid #bae6fd; color: #0284c7; }

/* ── btn-white (CTA section) + larger landing buttons ── */
.btn-white {
  background: white; color: #D91A1A; font-weight: 700; border: none;
  border-radius: 50px; padding: 1rem 2.5rem; font: inherit; font-size: 1rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12); transition: all 0.18s ease; text-decoration: none;
}
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); color: #D91A1A; text-decoration: none; }
.btn-red-lg    { padding: 0.875rem 1.75rem !important; font-size: 1rem !important; }

/* ── Landing footer ── */
.landing-footer { background: #0f172a; padding: 2.5rem 1.5rem; }
.landing-footer-inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 1.5rem;
}
@media (min-width: 640px) { .landing-footer-inner { flex-direction: row; } }

/* ── Rocket float animation ── */
@keyframes rocket-float {
  0%, 100% { transform: translateY(0) rotate(-45deg); }
  50%       { transform: translateY(-10px) rotate(-45deg); }
}
.rocket-float { animation: rocket-float 3s ease-in-out infinite; }

/* ── Scroll-reveal fade-in (IntersectionObserver) ── */
[data-fade] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1), transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
[data-fade].in-view { opacity: 1; transform: translateY(0); }
[data-fade][data-delay="1"] { transition-delay: 0.08s; }
[data-fade][data-delay="2"] { transition-delay: 0.16s; }
[data-fade][data-delay="3"] { transition-delay: 0.24s; }
[data-fade][data-delay="4"] { transition-delay: 0.32s; }

/* ── Utility ── */
.text-center { text-align: center; }
.sm-show { display: none; }
@media (min-width: 640px) { .sm-show { display: inline; } }

/* ════════════════════════════════════════════════════════
   LANDING v2 — original design for ResearchCraft
   ════════════════════════════════════════════════════════ */

/* Pipeline visualization */
.pipeline-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.5rem; }
.pipeline { display: flex; align-items: flex-start; min-width: 640px; gap: 0; }
.pipeline-node {
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 0.5rem;
}
.pipeline-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 0.6rem; flex-shrink: 0;
}
.pipeline-label { font-size: 0.78rem; font-weight: 700; color: #0f172a; }
.pipeline-sub   { font-size: 0.68rem; color: #94a3b8; margin-top: 0.2rem; }
.pipeline-arrow {
  flex-shrink: 0; padding-top: 1.1rem; color: #cbd5e1;
  font-size: 1.25rem; line-height: 1;
}

/* Feature split rows */
.feature-split { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 860px) { .feature-split { grid-template-columns: 1fr 1fr; gap: 5rem; } }

/* App mockup shell */
.mockup-shell {
  background: white; border: 1px solid #e2e8f0; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08); overflow: hidden; font-size: 0.78rem;
}
.mockup-topbar {
  background: #f8fafc; border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 1rem; display: flex; align-items: center; gap: 0.375rem;
}
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-title { margin-left: 0.5rem; font-size: 0.7rem; color: #94a3b8; font-family: monospace; }
.mockup-body { padding: 1rem; }

/* Chat-style clarify mockup */
.chat-msg { display: flex; gap: 0.6rem; margin-bottom: 0.75rem; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; margin-top: 2px;
}
.chat-bubble {
  max-width: 85%; padding: 0.5rem 0.75rem; border-radius: 12px;
  font-size: 0.75rem; line-height: 1.5;
}
.chat-msg:not(.user) .chat-bubble { background: #f1f5f9; color: #334155; border-radius: 4px 12px 12px 12px; }
.chat-msg.user .chat-bubble { background: #D91A1A; color: white; border-radius: 12px 4px 12px 12px; }
.chat-refined {
  background: #eff9fe; border: 1px solid #bae6fd; border-radius: 10px;
  padding: 0.6rem 0.8rem; margin-top: 0.5rem;
}
.chat-refined-label { font-size: 0.65rem; font-weight: 700; color: #0284c7; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }

/* Papers mockup */
.paper-row {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.6rem 0; border-bottom: 1px solid #f1f5f9;
}
.paper-row:last-child { border-bottom: none; }
.venue-chip {
  font-size: 0.6rem; font-weight: 700; padding: 0.2rem 0.5rem;
  border-radius: 4px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.paper-title-sm { font-weight: 600; color: #0f172a; font-size: 0.75rem; line-height: 1.35; }
.paper-doi { font-size: 0.65rem; color: #94a3b8; margin-top: 0.2rem; font-family: monospace; }

/* Terminal mockup */
.terminal-shell {
  background: #0f172a; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18); overflow: hidden; font-size: 0.78rem;
}
.terminal-topbar {
  background: #1e293b; padding: 0.65rem 1rem;
  display: flex; align-items: center; gap: 0.375rem; border-bottom: 1px solid #334155;
}
.terminal-body { padding: 1rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.t-comment { color: #475569; }
.t-keyword { color: #7dd3fc; }
.t-string  { color: #86efac; }
.t-fn      { color: #fbbf24; }
.t-normal  { color: #cbd5e1; }
.t-success { color: #4ade80; font-weight: 700; }
.t-prompt  { color: #64748b; }
.terminal-gap { height: 0.6rem; }

/* Citation compare */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2rem; }
@media (max-width: 640px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card { border-radius: 14px; padding: 1.25rem; font-size: 0.82rem; }
.compare-bad  { background: #fff5f5; border: 1px solid #fecaca; }
.compare-good { background: #f0fdf4; border: 1px solid #bbf7d0; }
.compare-ref  { padding: 0.5rem 0.75rem; border-radius: 8px; margin-bottom: 0.5rem; font-size: 0.78rem; line-height: 1.5; font-family: ui-monospace, monospace; }
.compare-bad  .compare-ref { background: #fee2e2; color: #991b1b; }
.compare-good .compare-ref { background: #dcfce7; color: #166534; }

/* Section with blue tint background */
.section-tinted { background: #f0f9ff; border-top: 1px solid #e0f2fe; border-bottom: 1px solid #e0f2fe; }
.section-yellow  { background: #fffbeb; border-top: 1px solid #fef3c7; border-bottom: 1px solid #fef3c7; }

/* Venues strip */
.venues-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.venues-strip .v { 
  padding: 0.3rem 0.875rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: white; border: 1px solid #e2e8f0; color: #475569;
}

/* Numbered feature badge */
.step-number {
  width: 36px; height: 36px; border-radius: 50%; background: #D91A1A; color: white;
  font-weight: 900; font-size: 0.875rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── ActOn app-switcher dropdown ─────────────────────── */
.acton-brand-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.acton-trigger {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: none; cursor: pointer;
  padding: 0.25rem 0.4rem; border-radius: 8px;
  transition: background 0.15s; line-height: 1;
  font-family: inherit; font-weight: inherit;
}
.app-nav .acton-trigger:hover { background: rgba(255,255,255,0.08); }
.lp-nav  .acton-trigger:hover { background: rgba(0,0,0,0.05); }
.dl-nav  .acton-trigger:hover { background: rgba(255,255,255,0.07); }
.acton-chevron { color: #64748b; transition: transform 0.18s; display: block; flex-shrink: 0; }
.acton-brand-wrap.open .acton-chevron { transform: rotate(180deg); }

.acton-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
}
.acton-lang-toggle button {
  height: 1.9rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  transition: all 0.15s ease;
}
.acton-lang-toggle button:hover { background: #f1f5f9; color: #0f172a; }
.acton-lang-toggle button.active { background: #0f172a; color: #fff; }
.acton-lang-floating {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  box-shadow: 0 12px 30px rgba(15,23,42,0.14);
}
@media (max-width: 640px) {
  .acton-lang-floating { right: 0.75rem; bottom: 0.75rem; }
}

.acton-dropdown {
  display: none; position: absolute;
  top: calc(100% + 10px); left: 0; z-index: 300;
  background: white; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 0.375rem; min-width: 272px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 16px 48px rgba(0,0,0,0.13);
  font-family: 'Inter', system-ui, sans-serif;
}
.acton-brand-wrap.open .acton-dropdown { display: block; }

.acton-dd-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem 0.625rem; }
.acton-dd-name  { font-weight: 800; font-size: 0.9rem; color: #0f172a; line-height: 1; }
.acton-dd-tag   { font-size: 0.72rem; color: #64748b; margin-top: 0.25rem; line-height: 1.4; }
.acton-dd-sep   { border: none; border-top: 1px solid #f1f5f9; margin: 0.25rem 0; }
.acton-dd-label { padding: 0.35rem 0.875rem 0.2rem; font-size: 0.62rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.09em; }

.acton-dd-app {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.875rem; border-radius: 10px;
  text-decoration: none; transition: background 0.12s;
}
.acton-dd-app:hover { background: #f8fafc; text-decoration: none; }
.acton-dd-app.active { background: #fff5f5; }
.acton-dd-app-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acton-dd-app-name { font-size: 0.84rem; font-weight: 700; color: #0f172a; line-height: 1; }
.acton-dd-app.active .acton-dd-app-name { color: #D91A1A; }
.acton-dd-app-desc { font-size: 0.7rem; color: #64748b; margin-top: 0.2rem; }
.acton-dd-badge { margin-left: auto; font-size: 0.6rem; font-weight: 700; color: #D91A1A; background: #fff5f5; border: 1px solid #fecaca; border-radius: 999px; padding: 0.15rem 0.5rem; flex-shrink: 0; white-space: nowrap; }

.acton-dd-contact { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.875rem; border-radius: 10px; color: #475569; font-size: 0.84rem; font-weight: 500; text-decoration: none; transition: background 0.12s; }
.acton-dd-contact:hover { background: #f8fafc; color: #0f172a; text-decoration: none; }
.acton-dd-contact-icon { width: 34px; height: 34px; border-radius: 9px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
