/* OpenClawDatabase.com - Hybrid Agent-First Design
   Dark theme, tabbed navigation, vanilla CSS, mobile responsive */

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

:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card-hover: #273449;
  --border: rgba(148, 163, 184, 0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-blue: #60a5fa;
  --accent-purple: #a78bfa;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --code-bg: #0b1222;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 0 0;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  text-decoration: none;
}

.site-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

/* Tabs navigation */
.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
  scrollbar-width: thin;
}

.tab {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

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

.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* Main content */
main { padding: 2.5rem 0; }

/* Headings */
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: #f1f5f9;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: #f1f5f9;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #e2e8f0;
}

p { margin-bottom: 1rem; color: var(--text); }

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

/* Hero */
.hero {
  padding: 1rem 0 2rem 0;
  text-align: left;
}

.hero-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 1.5rem;
}

/* Search bar (static, no backend) */
.search-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  max-width: 700px;
  margin-bottom: 1rem;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.search-box input::placeholder { color: var(--text-dim); }

.search-box button {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.search-hint { font-size: 0.85rem; color: var(--text-dim); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
}

.card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f1f5f9;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.card a.card-link { color: var(--accent-blue); font-size: 0.85rem; font-weight: 500; }

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 1rem 0 2rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--card);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: rgba(96, 165, 250, 0.08);
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(96, 165, 250, 0.04); }

td:first-child { font-weight: 600; color: #f1f5f9; }

/* Code blocks */
pre, code {
  font-family: "SF Mono", Monaco, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.875rem;
}

code {
  background: var(--code-bg);
  color: #93c5fd;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.5;
}

pre code {
  background: transparent;
  padding: 0;
  color: var(--text);
  font-size: 0.85rem;
}

.syntax-comment { color: var(--text-dim); }
.syntax-key { color: #93c5fd; }
.syntax-string { color: #86efac; }
.syntax-number { color: #fca5a5; }

/* API preview box */
.api-preview {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.api-preview-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-purple);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

/* Callout boxes */
.callout {
  border-left: 3px solid var(--accent-blue);
  background: rgba(96, 165, 250, 0.06);
  padding: 1rem 1.25rem;
  border-radius: 0.25rem;
  margin: 1.5rem 0;
}

.callout.warn {
  border-left-color: var(--warning);
  background: rgba(251, 191, 36, 0.06);
}

.callout.danger {
  border-left-color: var(--danger);
  background: rgba(248, 113, 113, 0.06);
}

.callout-title { font-weight: 600; margin-bottom: 0.25rem; color: #f1f5f9; }

/* Lists */
ul, ol { margin: 0.75rem 0 1rem 1.5rem; }
li { margin-bottom: 0.35rem; color: var(--text); }

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
}

.faq details[open] { border-color: rgba(96, 165, 250, 0.3); }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #f1f5f9;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--accent-blue);
  font-size: 1.25rem;
  font-weight: 300;
}

.faq details[open] summary::after { content: "−"; }

.faq details p { margin-top: 0.75rem; color: var(--text-muted); }

/* Quick blurbs (homepage "which agent") */
.blurbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.blurb { padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: 0.5rem; }
.blurb strong { color: var(--accent-blue); display: block; margin-bottom: 0.25rem; }
.blurb p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* Last updated */
.last-updated {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--card);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

/* Version badge (populated by /assets/version-badge.js) */
.version-badge {
  display: none; /* hidden until JS renders it — avoids empty pill flash */
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  margin-left: 0.5rem;
  margin-bottom: 1rem;
  vertical-align: middle;
}
.version-badge-rendered { display: inline-block; }
.version-badge-green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.version-badge-amber {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}
.version-badge-grey {
  background: var(--card);
  color: var(--text-dim);
}

/* Changelog page */
.changelog-legend { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem 1.25rem; margin-bottom: 2rem; }
.changelog-legend p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.changelog-month { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin: 2rem 0 1.25rem; }
.changelog-entry { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.changelog-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; margin-bottom: 0.6rem; }
.changelog-date { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; color: var(--text-dim); }
.changelog-version { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; color: var(--accent-blue); font-weight: 600; }
.changelog-platform { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.6rem; border-radius: 9999px; border: 1px solid var(--border); }
.changelog-platform-openclaw  { background: rgba(96, 165, 250, 0.12); color: #93c5fd; border-color: rgba(96, 165, 250, 0.4); }
.changelog-platform-nemoclaw  { background: rgba(167, 139, 250, 0.12); color: #c4b5fd; border-color: rgba(167, 139, 250, 0.4); }
.changelog-platform-ironclaw  { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }
.changelog-platform-hermes    { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.4); }
.changelog-platform-cowork    { background: rgba(251, 146, 60, 0.12); color: #fdba74; border-color: rgba(251, 146, 60, 0.4); }
.changelog-platform-chatgpt   { background: rgba(45, 212, 191, 0.12); color: #5eead4; border-color: rgba(45, 212, 191, 0.4); }
.changelog-platform-kilocode  { background: rgba(253, 224, 71, 0.12); color: #fde047; border-color: rgba(253, 224, 71, 0.4); }
.changelog-entry p { margin: 0 0 0.5rem; font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.changelog-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem; }
.changelog-affects { color: var(--text-dim); }
.changelog-affects a { margin-right: 0.3rem; }
.changelog-footer-note { margin-top: 2.5rem; padding: 1rem 1.25rem; background: var(--card); border: 1px dashed var(--border); border-radius: 0.75rem; }
.changelog-footer-note p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* Troubleshooting page */
.ts-controls { margin: 1.5rem 0 2rem; }
.ts-search {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ts-search:focus { outline: none; border-color: var(--accent-blue); }
.ts-filter-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.ts-chip {
  background: var(--card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ts-chip:hover { color: var(--text); border-color: var(--accent-blue); }
.ts-chip-active { background: var(--accent-blue); color: #0f172a; border-color: var(--accent-blue); font-weight: 600; }
.ts-count { font-size: 0.82rem; color: var(--text-dim); margin: 0.75rem 0 0; }
.ts-list { display: flex; flex-direction: column; gap: 1rem; }
.ts-card { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.1rem 1.25rem; }
.ts-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; margin-bottom: 0.75rem; }
.ts-card-head h3 { font-size: 1.05rem; margin: 0; color: var(--text); }
.ts-error {
  background: #0b1222;
  border: 1px solid var(--border);
  border-left: 3px solid #f87171;
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #fca5a5;
  overflow-x: auto;
  margin: 0 0 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ts-fix { font-size: 0.92rem; color: var(--text); line-height: 1.6; }
.ts-fix strong { color: #6ee7b7; }
.ts-fix p { margin: 0.3rem 0 0.6rem; }
.ts-fix pre { background: #0b1222; border: 1px solid var(--border); border-radius: 0.4rem; padding: 0.75rem 1rem; font-size: 0.85rem; overflow-x: auto; margin: 0.5rem 0; }
.ts-fix ol { margin: 0.3rem 0 0.6rem 1.2rem; padding: 0; }
.ts-fix ol li { margin-bottom: 0.3rem; font-size: 0.9rem; }
.ts-card-meta { font-size: 0.82rem; color: var(--text-dim); margin: 0.75rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.ts-footer-note { margin-top: 2.5rem; padding: 1rem 1.25rem; background: var(--card); border: 1px dashed var(--border); border-radius: 0.75rem; }
.ts-footer-note p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* Commands page */
.cmd-controls { margin: 1.5rem 0 1.5rem; }
.cmd-controls .ts-filter-row { margin-top: 0.6rem; }
.cmd-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--card); }
.cmd-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.cmd-table thead th {
  background: #0b1222;
  color: var(--text-dim);
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.cmd-table tbody td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmd-table tbody tr:last-child td { border-bottom: none; }
.cmd-table tbody tr:hover { background: rgba(96, 165, 250, 0.05); }
.cmd-syntax { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; color: var(--accent-blue); background: #0b1222; padding: 0.2rem 0.5rem; border-radius: 0.3rem; border: 1px solid var(--border); display: inline-block; white-space: nowrap; }
.cmd-desc { color: var(--text); max-width: 32rem; }
.cmd-since { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }
.cmd-loading { text-align: center; padding: 2rem; color: var(--text-dim); }
.cmd-kind {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.cmd-kind-slash { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.1); }
.cmd-kind-cli-command { color: #93c5fd; border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.1); }
.cmd-kind-cli-flag { color: #fdba74; border-color: rgba(251, 146, 60, 0.4); background: rgba(251, 146, 60, 0.1); }
.cmd-kind-env { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.cmd-kind-config { color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.1); }

/* Benchmarks page */
.bench-principles { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.1rem 1.35rem; margin-bottom: 2rem; }
.bench-principles ul { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--text-muted); font-size: 0.9rem; }
.bench-principles li { margin-bottom: 0.35rem; }
.bench-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.bench-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s, transform 0.1s; gap: 0.6rem; }
.bench-card:hover { border-color: var(--accent-blue); background: var(--card-hover); transform: translateY(-2px); text-decoration: none; }
.bench-card-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.bench-card-method { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; flex: 1; }
.bench-card-foot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-dim); padding-top: 0.4rem; border-top: 1px solid var(--border); }
.bench-task { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.15rem 1.3rem; margin-bottom: 1rem; }
.bench-task-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.bench-task-head h3 { margin: 0; font-size: 1.05rem; }
.bench-task-platforms { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.bench-task-desc { color: var(--text-muted); font-size: 0.88rem; margin: 0.15rem 0 0.6rem; }
.bench-task-consensus { background: rgba(96, 165, 250, 0.08); border-left: 3px solid var(--accent-blue); padding: 0.6rem 0.85rem; border-radius: 0.3rem; font-size: 0.9rem; margin: 0.5rem 0; }
.bench-task-meta { font-size: 0.82rem; color: var(--text-dim); margin: 0.5rem 0 0; }
.bench-loading { text-align: center; color: var(--text-dim); padding: 1.5rem; }
.bench-submit { background: var(--card); border: 1px dashed var(--border); border-radius: 0.75rem; padding: 1.25rem 1.4rem; margin-top: 2.5rem; }
.bench-submit-rules { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.4rem; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: #0b1222;
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 800px;
  margin-bottom: 1rem;
}

.footer-links {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a { color: var(--text-muted); }

/* Utility */
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* Mobile */
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .container { padding: 0 1rem; }
  .site-header { padding-top: 1.5rem; }
  .hero-intro { font-size: 1rem; }
  .search-box { flex-direction: column; padding: 0.5rem; }
  .search-box input { width: 100%; }
  .search-box button { width: 100%; }
}

/* ─────────────────────────────────────────
   TOP NAV — sticky full-width tab bar
   Mobile: scroll container + arrow buttons
   Desktop: equal-width tabs, no arrows
   ───────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: stretch;
  background: #1a2744;
  border: 1px solid var(--border);
  border-radius: 10px;
  position: sticky;
  top: 0.75rem;
  z-index: 100;
  max-width: 1100px;
  margin: 0.75rem auto 0;
  padding: 0 0.25rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* Scrollable inner container */
.topnav-scroll {
  display: flex;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.topnav-scroll::-webkit-scrollbar { display: none; }

/* Tabs */
.topnav-tab {
  flex-shrink: 0;
  text-align: center;
  padding: 1rem 1.1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  letter-spacing: 0.01em;
}
.topnav-tab:hover { color: var(--text); background: rgba(96,165,250,0.07); text-decoration: none; }
.topnav-tab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); background: rgba(96,165,250,0.1); }

/* Tabs keep their natural width — scroll engages when total exceeds container */

/* Arrow buttons — hidden until JS detects overflow */
.topnav-arrow {
  display: none; /* JS sets to flex when needed */
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  background: #1a2744;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 3px;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.topnav-arrow:hover { color: var(--accent-blue); background: rgba(96,165,250,0.12); }
.topnav-arrow:disabled { cursor: default; }

/* Subtle fade-edge behind each arrow */
.topnav-prev::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0; bottom: 0; width: 10px;
  background: linear-gradient(90deg, #1a2744, transparent);
  pointer-events: none;
}
.topnav-next::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 0; bottom: 0; width: 10px;
  background: linear-gradient(270deg, #1a2744, transparent);
  pointer-events: none;
}

/* Mobile fine-tuning */
@media (max-width: 768px) {
  .topnav-tab { font-size: 0.85rem; padding: 0.88rem 0.9rem; min-width: 76px; }
  .topnav-arrow { width: 30px; min-width: 30px; font-size: 1.3rem; }
}

/* ─────────────────────────────────────────
   SLIM HEADER (inner pages — logo + tagline only)
   ───────────────────────────────────────── */
.site-header-slim {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 1.25rem;
}

/* ─────────────────────────────────────────
   AGENT QUICK LINKS (breadcrumb-style row)
   ───────────────────────────────────────── */
.agent-quicklinks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  padding: 0.75rem 1.1rem;
  background: rgba(96,165,250,0.04);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}
.agent-quicklinks-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-right: 0.25rem;
  white-space: nowrap;
}
.agent-qlink {
  display: inline-block;
  font-size: 0.855rem;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
  padding: 0.18rem 0.65rem;
  border-radius: 9999px;
  background: rgba(96,165,250,0.09);
  border: 1px solid rgba(96,165,250,0.2);
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}
.agent-qlink:hover { background: rgba(96,165,250,0.22); color: #fff; text-decoration: none; }

/* ─────────────────────────────────────────
   FOOTER NAV (grouped agent links)
   ───────────────────────────────────────── */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-bottom: 0;
}
.footer-nav-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}
.footer-nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-right: 0.15rem;
  white-space: nowrap;
}
.footer-nav a { color: var(--text-muted); font-size: 0.875rem; text-decoration: none; }
.footer-nav a:hover { color: var(--accent-blue); }

/* ─────────────────────────────────────────
   SITE HERO — homepage centered splash
   ───────────────────────────────────────── */
.site-hero {
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(96,165,250,0.1) 0%, transparent 70%),
    linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
}

.hero-icon {
  margin-bottom: 1.75rem;
  display: inline-block;
  filter: drop-shadow(0 0 24px rgba(96,165,250,0.3));
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  margin-bottom: 1rem;
}

.hero-brand-line {
  display: block;
  font-size: 4.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
}

.hero-tagline-main {
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2.25rem;
  font-weight: 400;
}

/* Stats box */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 680px;
  margin: 0 auto 2rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}
.stats-grid .stat-item {
  padding: 1.4rem 1rem;
  border-right: 1px solid var(--border);
}
.stats-grid .stat-item:last-child { border-right: none; }

.stat-num {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Hero description */
.hero-desc {
  max-width: 680px;
  margin: 0 auto 1.75rem;
  color: var(--text-muted);
  font-size: 1.025rem;
  line-height: 1.7;
}

/* Feature checkmarks */
.features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}
.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.feature-badge::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Homepage main content (below hero) */
.home-main { padding: 2.5rem 0; }

@media (max-width: 640px) {
  .hero-brand-line { font-size: 2.9rem; }
  .hero-tagline-main { font-size: 1rem; margin-bottom: 1.75rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-item:nth-child(2) { border-right: none; }
  .stats-grid .stat-item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stats-grid .stat-item:nth-child(4) { border-top: 1px solid var(--border); }
  .site-hero { padding: 2.5rem 1rem 2rem; }
}

/* ─────────────────────────────────────────
   CENTERED SECTION (search / intro below news)
   ───────────────────────────────────────── */
.section-centered { text-align: center; }
.section-centered h2 { text-align: center; }
.section-centered .hero-intro {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-centered .search-box {
  margin-left: auto;
  margin-right: auto;
}
.section-centered .search-hint { text-align: center; }

/* ─────────────────────────────────────────
   CLICKABLE TABLE HEADERS
   ───────────────────────────────────────── */
th a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}
th a:hover { text-decoration: underline; }

/* Clickable blurb headings */
.blurb strong a {
  color: var(--accent-blue);
  text-decoration: none;
}
.blurb strong a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   LATEST GUIDES SECTION
   ───────────────────────────────────────── */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.guide-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 0.15s ease;
}
.guide-card:hover { border-color: rgba(96,165,250,0.35); }
.guide-card-agent {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guide-card-agent a {
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 0.72rem;
  text-decoration: none;
}
.guide-card-agent a:hover { text-decoration: underline; }
.guide-card-agent-link { font-size: 0.72rem; color: var(--text-dim); }
.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.guide-list li:last-child { border-bottom: none; }
.guide-list a { color: var(--text); text-decoration: none; }
.guide-list a:hover { color: var(--accent-blue); }
.guide-tag {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.guide-tag.live { color: var(--success); }
.guide-tag.soon { color: var(--text-dim); }

/* ─────────────────────────────────────────
   ICON PICKER (temporary, shown until user picks)
   ───────────────────────────────────────── */
.icon-picker {
  background: rgba(251,191,36,0.05);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.icon-picker h2 {
  margin-top: 0;
  color: var(--warning);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.icon-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: flex-start;
}
.icon-option {
  text-align: center;
  flex: 1;
  min-width: 80px;
}
.icon-option img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 2px solid var(--border);
  display: block;
  margin: 0 auto 0.5rem;
  transition: border-color 0.15s;
}
.icon-option img:hover { border-color: var(--accent-blue); }
.icon-option-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.icon-option-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ─────────────────────────────────────────
   HUB PAGES — agent landing grid
   ───────────────────────────────────────── */
.hub-hero { padding: 2rem 0 0; }
.hub-hero-top { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1rem; }
.hub-hero-icon { font-size: 2.5rem; flex-shrink: 0; line-height: 1; padding-top: 0.1rem; }
.hub-hero-name { font-size: 2rem; font-weight: 800; color: #f1f5f9; line-height: 1.15; margin-bottom: 0.3rem; }
.hub-hero-tagline { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.hub-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin: 0.85rem 0 1.25rem; }
.hub-stat-badge { font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.7rem; border-radius: 9999px; background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.2); color: var(--accent-blue); }
.hub-intro { color: var(--text-muted); font-size: 0.975rem; line-height: 1.75; max-width: 760px; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); margin-bottom: 1.75rem; }
.hub-section-label { font-size: 0.69rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 0.85rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.hub-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.2rem 1.25rem 1rem; text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.hub-card:hover { border-color: var(--accent-blue); background: var(--card-hover); transform: translateY(-2px); text-decoration: none; }
.hub-card.soon { opacity: 0.55; pointer-events: none; }
.hub-card-icon { font-size: 1.5rem; margin-bottom: 0.55rem; line-height: 1; }
.hub-card-title { font-size: 0.925rem; font-weight: 700; color: var(--text); margin-bottom: 0.35rem; }
.hub-card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; flex: 1; margin-bottom: 0.8rem; }
.hub-card-foot { display: flex; align-items: center; gap: 0.5rem; }

/* Breadcrumb nav for subpages */
.page-breadcrumb { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.5rem; margin-top: 0.5rem; }
.page-breadcrumb a { color: var(--text-dim); }
.page-breadcrumb a:hover { color: var(--accent-blue); }
.page-breadcrumb span { margin: 0 0.3rem; }

/* ─────────────────────────────────────────
   VIDEO EMBED
   ───────────────────────────────────────── */
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 0.75rem; border: 1px solid var(--border); margin: 1.5rem 0; background: #000; }
.video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; border-radius: 0.75rem; }

/* ─────────────────────────────────────────
   CREDIT / ATTRIBUTION BOX
   ───────────────────────────────────────── */
.credit-box { display: flex; gap: 0.75rem; align-items: flex-start; background: rgba(96,165,250,0.05); border: 1px solid rgba(96,165,250,0.15); border-radius: 0.5rem; padding: 0.85rem 1rem; margin: 1.25rem 0; font-size: 0.875rem; color: var(--text-muted); }
.credit-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.credit-box a { color: var(--accent-blue); }

/* ─────────────────────────────────────────
   MOMENT PAUSE — homepage human touchpoint
   ───────────────────────────────────────── */
.moment-pause {
  text-align: center;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.moment-pause p {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Glossary ────────────────────────────────────────────── */
.glossary-jump {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}
.glossary-jump strong { color: var(--text-dim); margin-right: 0.5rem; }
.glossary-jump a { color: var(--accent-blue); text-decoration: none; }
.glossary-jump a:hover { text-decoration: underline; }
.glossary-category { margin: 2.5rem 0; }
.glossary-category > h2 {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.glossary-term {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  scroll-margin-top: 5rem;
}
.glossary-term h3 {
  margin: 0 0 0.5rem;
  color: var(--accent-purple);
  font-size: 1.1rem;
}
.glossary-term p { margin: 0 0 0.5rem; }
.glossary-related { font-size: 0.9rem; margin-top: 0.5rem !important; }
.glossary-related a { color: var(--accent-blue); text-decoration: none; margin-right: 0.4rem; }
.glossary-related a:hover { text-decoration: underline; }

/* ── AdSense slots ──────────────────────────────────────── */
.ad-slot {
  margin: 2rem 0;
  min-height: 1px; /* avoid layout jump; collapses if ad doesn't fill */
}
.ad-slot-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim, #64748b);
  margin-bottom: 0.35rem;
}

/* ── Daily changelog table ──────────────────────────────── */
.daily-changelog-table td:first-child { white-space: nowrap; font-weight: 600; }
.daily-age-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}
.daily-age-today  { background: rgba(96, 165, 250, 0.2);  color: #93c5fd; }
.daily-age-recent { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.daily-age-stale  { background: rgba(251, 191, 36, 0.16);  color: #fde68a; }
.daily-age-old    { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }

/* ── Compare: decision-flow wizard ──────────────────────── */
.decision-flow {
  background: var(--card);
  border: 1px solid var(--border, #1f2937);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.decision-flow h2 { margin-top: 0; }
.df-stage { margin: 1rem 0; }
.df-question h3 { font-size: 1.1rem; margin: 0 0 0.75rem; color: var(--text); }
.df-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.df-option-btn {
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: var(--text);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.df-option-btn:hover {
  background: rgba(96, 165, 250, 0.18);
  border-color: var(--accent-blue, #60a5fa);
}
.df-back, .df-restart-btn {
  background: none;
  border: none;
  color: var(--accent-blue, #60a5fa);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.df-result h3 { margin: 0 0 0.75rem; }
.df-result-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.df-result-card:hover {
  background: rgba(167, 139, 250, 0.14);
  border-color: var(--accent-purple, #a78bfa);
  transform: translateY(-1px);
}
.df-result-primary {
  background: rgba(167, 139, 250, 0.14);
  border-color: var(--accent-purple, #a78bfa);
}
.df-result-emoji { font-size: 1.5rem; flex-shrink: 0; }
.df-result-name { font-weight: 600; margin-bottom: 0.2rem; }
.df-result-tagline { font-size: 0.9rem; color: var(--text-dim); }

/* ── Compare ────────────────────────────────────────────── */
.compare-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
}
.compare-filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.compare-filter label { font-size: 0.85rem; color: var(--text-dim); }
.compare-filter select {
  padding: 0.5rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
}
.compare-reset {
  padding: 0.55rem 0.9rem; background: transparent; color: var(--accent-blue);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
.compare-reset:hover { background: var(--bg); }
.compare-result { margin: 0.5rem 0 1.5rem; }
.compare-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.compare-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; display: flex; flex-direction: column;
}
.compare-card-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.compare-card-emoji { font-size: 2rem; }
.compare-card h3 { margin: 0; }
.compare-card h3 a { color: var(--accent-purple); text-decoration: none; }
.compare-card-tagline { color: var(--text-dim); font-size: 0.85rem; margin: 0.1rem 0 0; }
.compare-card-facts { list-style: none; padding: 0; margin: 0.5rem 0; font-size: 0.9rem; }
.compare-card-facts li { padding: 0.15rem 0; }
.compare-card-strength { color: #86efac; font-size: 0.9rem; margin: 0.25rem 0; }
.compare-card-weakness { color: #fca5a5; font-size: 0.9rem; margin: 0.25rem 0; }
.compare-card-cta {
  margin-top: auto; color: var(--accent-blue); text-decoration: none;
  font-weight: 500; padding-top: 0.5rem;
}
.compare-card-cta:hover { text-decoration: underline; }

.compare-matrix {
  width: 100%; border-collapse: collapse; margin: 1rem 0;
  font-size: 0.9rem; overflow-x: auto; display: block;
}
.compare-matrix thead th {
  background: var(--card); border-bottom: 2px solid var(--border);
  padding: 0.6rem; text-align: center;
}
.compare-matrix thead th a { color: var(--accent-purple); text-decoration: none; }
.compare-matrix tbody th {
  background: var(--card); text-align: left; padding: 0.5rem;
  font-weight: 500; color: var(--text-dim);
}
.compare-matrix td {
  padding: 0.5rem; border-bottom: 1px solid var(--border);
  text-align: center; vertical-align: top;
}
.compare-emoji { font-size: 1.4rem; }
.compare-score { font-family: monospace; color: var(--accent-blue); letter-spacing: 2px; }
.compare-matrix-pair td { text-align: left; }

.compare-pairs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem; margin-top: 1rem;
}
.compare-pair-link {
  display: block; padding: 0.7rem 0.9rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 0.95rem;
}
.compare-pair-link:hover { background: var(--bg); color: var(--accent-blue); }
.compare-pair-link .muted { font-size: 0.8rem; }

.compare-home-cta {
  margin-top: 1rem; text-align: center;
  font-size: 1rem;
}
.compare-home-cta a {
  color: var(--accent-purple); text-decoration: none;
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 8px;
  display: inline-block; background: var(--card);
}
.compare-home-cta a:hover { background: var(--bg); color: var(--accent-blue); }

/* ── Hero instruction + CTAs ────────────────────────────── */
.hero-instruction {
  max-width: 680px;
  margin: 0.75rem auto 1.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: center;
}
.hero-instruction strong {
  color: var(--accent-blue);
  font-weight: 600;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem auto 2.5rem;
  max-width: 720px;
}
.hero-instruction-humans {
  margin-top: 1.25rem;
  line-height: 1.5;
}
.hero-instruction-humans a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}
.hero-instruction-humans a:hover {
  text-decoration: underline;
}
.hero-cta {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s;
}
.hero-cta:hover {
  background: var(--bg);
  color: var(--accent-blue);
  transform: translateY(-1px);
}
.hero-cta-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border-color: transparent;
}
.hero-cta-primary:hover {
  color: #fff;
  filter: brightness(1.1);
}

/* primary CTA button (homepage cost-calculator promo, etc.) */
.btn-primary {
  display: inline-block;
  background: var(--accent-blue, #60a5fa);
  color: #0f172a;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s;
}
.btn-primary:hover { filter: brightness(1.08); color: #0f172a; text-decoration: none; }

/* Newsletter signup form (homepage) */
.newsletter-section { background: rgba(96,165,250,0.05); border: 1px solid rgba(96,165,250,0.15); border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; }
.beehiiv-wrap { display: flex; justify-content: center; margin: 1rem 0 0.6rem; }
.beehiiv-embed { background: transparent !important; max-width: 100%; }

/* Footer Subscribe CTA */
.footer-cta { text-align: center; margin: 1rem 0 1.25rem; }
.footer-newsletter-btn { font-size: 1rem; padding: 0.7rem 1.4rem; }

/* Newsletter modal */
.newsletter-modal {
  /* Native <dialog> defaults to position: fixed centered when opened
     via showModal(). Don't override it — that was causing the page
     to scroll to the dialog's DOM position on click. */
  background: var(--card, #1e293b);
  color: var(--text, #e2e8f0);
  border: 1px solid var(--border, rgba(148,163,184,.15));
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  width: 92%;
  box-shadow: 0 16px 64px rgba(0,0,0,.6);
}
.newsletter-modal::backdrop { background: rgba(15, 23, 42, .8); backdrop-filter: blur(2px); }
.newsletter-modal-close {
  position: absolute; top: 0.6rem; right: 0.6rem;
  background: transparent; color: var(--text-muted, #94a3b8);
  border: 0; font-size: 1.25rem; line-height: 1; cursor: pointer;
  width: 2rem; height: 2rem; border-radius: 6px;
}
.newsletter-modal-close:hover { background: rgba(255,255,255,.06); color: var(--text, #e2e8f0); }
.newsletter-modal-iframe-wrap { display: flex; justify-content: center; margin-top: 1rem; min-height: 320px; }
.newsletter-modal-iframe-wrap iframe { background: transparent !important; max-width: 100%; }
