/* ═══════════════════════════════════════════
   BotDir – Full CSS
   Futuristic, high-contrast directory theme
   ═══════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #070b0d;
  --bg-card: #0e1518;
  --bg-card-hover: #121d21;
  --bg-elevated: #162126;
  --border: #1e3036;
  --border-light: #31515b;
  --text: #eefcff;
  --text-muted: #9bb0b6;
  --text-dim: #667d84;
  --accent: #36e7a7;
  --accent-hover: #66f5c2;
  --accent-dim: rgba(54, 231, 167, 0.12);
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1200px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--text); line-height: 1.6; min-height: 100vh;
  background:
    radial-gradient(circle at 50% -15%, rgba(54,231,167,0.12), transparent 34rem),
    var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; border-radius: var(--radius); font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: all 0.2s;
  font-size: 0.875rem; line-height: 1.4; white-space: nowrap;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8125rem; }
.btn-primary { background: var(--accent); color: #04110d; border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #04110d; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-light); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-google {
  background: #fff; color: #333; border-color: #ddd; width: 100%;
  padding: 0.75rem 1.25rem; font-size: 0.9375rem; font-weight: 500;
}
.btn-google:hover { background: #f5f5f5; color: #333; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; font-weight: 700; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-icon {
  width: 1.7rem; height: 1.7rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 0.95rem;
  box-shadow: 0 0 18px rgba(54,231,167,0.22);
}
.logo-accent { color: var(--accent); }
.main-nav { display: flex; gap: 0.25rem; }
.nav-link {
  padding: 0.4rem 0.75rem; border-radius: var(--radius); color: var(--text-muted);
  font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-elevated); }
.nav-link.active { color: var(--text); background: var(--bg-elevated); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.user-menu { position: relative; }
.user-avatar-btn { background: none; border: none; cursor: pointer; padding: 0; border-radius: 50%; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 600; font-size: 0.875rem;
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 0.5rem);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 200px; box-shadow: var(--shadow-lg); z-index: 200;
}
.user-dropdown.open { display: block; }
.dropdown-header { padding: 0.75rem 1rem; }
.dropdown-name { display: block; font-weight: 600; font-size: 0.875rem; }
.dropdown-email { display: block; font-size: 0.75rem; color: var(--text-dim); }
.dropdown-divider { height: 1px; background: var(--border); }
.dropdown-item {
  display: block; padding: 0.5rem 1rem; color: var(--text-muted);
  font-size: 0.875rem; transition: all 0.15s;
}
.dropdown-item:hover { background: var(--bg-elevated); color: var(--text); }
.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 4px; padding: 4px;
}
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text-muted); border-radius: 2px; }
.mobile-menu { display: none; padding: 0.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-menu.open { display: block; }
.mobile-nav-link { display: block; padding: 0.5rem 0; color: var(--text-muted); font-size: 0.9375rem; }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 500; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-width: 400px; width: 100%; padding: 2rem; position: relative;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem; background: none; border: none;
  color: var(--text-dim); font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.modal-body { text-align: center; }
.modal-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.modal-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Page Header ── */
.page-header { padding: 3rem 0 2rem; }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-subtitle { font-size: 1rem; color: var(--text-muted); max-width: 600px; }

/* ── Section ── */
.section { padding: 3rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.section-title { font-size: 1.25rem; font-weight: 700; }

/* ── Hero ── */
.hero { padding: 5.5rem 0 3.5rem; text-align: center; }
.hero-title { font-size: clamp(2.35rem, 6vw, 4.6rem); letter-spacing: -0.055em; font-weight: 800; margin-bottom: 1.1rem; line-height: 1.02; }
.hero-title .highlight { color: var(--accent); }
.hero-subtitle { font-size: 1.125rem; color: var(--text-muted); max-width: 720px; margin: 0 auto 2rem; }
.eyebrow { display:flex; align-items:center; justify-content:center; gap:.55rem; margin-bottom:1rem; color:var(--accent); text-transform:uppercase; letter-spacing:.14em; font-size:.72rem; font-weight:700; }
.eyebrow span { width:1.7rem; height:1px; background:var(--accent); box-shadow:0 0 10px var(--accent); }
.hero-search {
  max-width: 560px; margin: 0 auto; position: relative;
}
.hero-search input {
  width: 100%; padding: 0.875rem 1.25rem; padding-right: 3rem;
  background: rgba(14,21,24,.92); border: 1px solid var(--border-light); border-radius: 999px;
  color: var(--text); font-size: 1rem; outline: none; transition: border-color 0.2s, box-shadow .2s;
}
.hero-search input::placeholder { color: var(--text-dim); }
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(54,231,167,.1), 0 12px 48px rgba(0,0,0,.28); }
.hero-search .search-icon {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 1.125rem;
}

/* ── Hero Stats ── */
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 2rem; }
.hero-stat { text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.hero-stat-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--text); }

@media (max-width: 768px) {
  .hero-title { font-size: 1.75rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero-stats { gap: 1.25rem; }
  .hero-stat-value { font-size: 1.25rem; }
}

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; transition: all 0.2s; display: flex; flex-direction: column;
}
.card:hover { border-color: var(--border-light); background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.24); }
.card-featured { border-color: var(--accent); background: var(--accent-dim); }
.platform-disclaimer { color:var(--text-dim); font-size:.82rem; max-width:720px; margin:0 auto; }
.platform-hero { padding-bottom:3rem; }
.card-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.card-icon { font-size: 1.5rem; flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.card-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface-hover); }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.75rem; flex-grow: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: auto; }
.card-tag {
  display: inline-flex; align-items: center; padding: 0.2rem 0.5rem; border-radius: 4px;
  background: var(--bg-elevated); color: var(--text-muted); font-size: 0.6875rem;
  border: 1px solid var(--border); font-weight: 500;
}
.card-stat { font-size: 0.75rem; color: #789198; display: flex; align-items: center; gap: 0.25rem; }

/* ── Tags bar ── */
.tags-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tag-btn {
  padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.8125rem; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.tag-btn:hover { border-color: var(--border-light); color: var(--text); }
.tag-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag-count { color: #9bb0b6; font-size: 0.75rem; }

/* ── Job Card ── */
.job-card { padding: 1.25rem; }
.job-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.job-company-logo {
  width: 40px; height: 40px; border-radius: var(--radius); background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; font-size: 1.125rem;
  font-weight: 700; color: var(--accent); flex-shrink: 0; overflow: hidden;
}
.job-company-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-company { font-size: 0.8125rem; color: var(--text-muted); }
.job-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.job-title a { color: var(--text); }
.job-title a:hover { color: var(--accent); }
.job-details { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.job-detail { font-size: 0.75rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.25rem; }
.badge-featured {
  display: inline-flex; align-items: center; padding: 0.15rem 0.4rem; border-radius: 4px;
  background: var(--accent-dim); color: var(--accent); font-size: 0.6875rem; font-weight: 600;
}

/* ── Job List (cursor.directory style) ── */
.job-list { display: flex; flex-direction: column; gap: 0; }
.job-list-item { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-bottom: none; text-decoration: none; color: var(--text); transition: background 0.15s; }
.job-list-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.job-list-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.job-list-item:only-child { border-radius: var(--radius-lg); border-bottom: 1px solid var(--border); }
.job-list-item:hover { background: var(--surface); }
.job-list-featured { background: var(--accent-dim); border-color: rgba(249,115,22,0.2); }
.job-list-featured:hover { background: rgba(249,115,22,0.08); }
.job-list-logo { width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: 1.125rem; flex-shrink: 0; overflow: hidden; }
.job-list-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-list-content { flex: 1; min-width: 0; }
.job-list-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.job-list-company { font-size: 0.8125rem; color: var(--text-muted); }
.job-list-time { font-size: 0.75rem; color: var(--text-dim); margin-left: auto; white-space: nowrap; }
.job-list-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.375rem; }
.job-list-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8125rem; color: var(--text-dim); }
.job-list-arrow { color: var(--text-dim); font-size: 1.25rem; flex-shrink: 0; }
@media (max-width: 600px) {
  .job-list-item { flex-wrap: wrap; }
  .job-list-arrow { display: none; }
  .job-list-time { margin-left: 0; }
}

/* ── Job Detail Page ── */
.job-detail-header { display: flex; align-items: center; gap: 1rem; }
.job-detail-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.job-tag { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.8125rem; color: var(--text-muted); }
.job-description { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }

/* ── Plan Selector ── */
.plan-options { display: flex; flex-direction: column; gap: 0.75rem; }
.plan-option { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; border: 2px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; transition: all 0.15s; }
.plan-option:hover { border-color: var(--accent); }
.plan-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.plan-option input[type="radio"] { margin-top: 0.25rem; accent-color: var(--accent); }
.plan-name { font-weight: 600; font-size: 0.9375rem; }
.plan-desc { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Detail Page ── */
.detail-page { padding: 2rem 0 4rem; }
.detail-content { max-width: 800px; }
.detail-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.detail-meta { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.detail-author { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.detail-author a { color: var(--primary); }
.detail-author-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-hover); }
.detail-body { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.detail-body pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; overflow-x: auto; font-size: 0.8125rem; line-height: 1.6;
}
.detail-body code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8125rem; }
.detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.copy-btn {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 1rem; color: var(--text-muted); cursor: pointer; font-size: 0.8125rem;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem;
}
.copy-btn:hover { border-color: var(--border-light); color: var(--text); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

.vote-btn {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 1rem; color: var(--text-muted); cursor: pointer; font-size: 0.8125rem;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem;
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.voted { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--text); }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 0.625rem 0.875rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.875rem; outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; max-width: 640px; }

/* ── Dashboard ── */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.dash-stat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
}
.dash-stat-value { font-size: 1.75rem; font-weight: 700; }
.dash-stat-label { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.75rem; color: var(--text-dim); font-weight: 600; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; color: var(--text-muted); }
tr:hover td { background: var(--bg-card-hover); }

/* ── Status badges ── */
.status { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.6875rem; font-weight: 600; }
.status-approved { background: rgba(34,197,94,0.15); color: var(--green); }
.status-pending { background: rgba(249,115,22,0.15); color: var(--accent); }
.status-rejected { background: rgba(239,68,68,0.15); color: var(--red); }
.status-active { background: rgba(34,197,94,0.15); color: var(--green); }
.status-expired { background: rgba(115,115,115,0.15); color: var(--text-dim); }

/* ── Pagination ── */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span {
  padding: 0.4rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state-title { font-size: 1.125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }

/* ── FAQ ── */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.faq-question { font-weight: 600; font-size: 0.9375rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.75rem; line-height: 1.6; display: none; }
.faq-item.open .faq-answer { display: block; }

/* ── OpenClaw GitHub SEO Cluster ── */
.seo-cluster { overflow: hidden; }
.cluster-shell { max-width: 960px; }
.cluster-hero {
  position: relative; padding: 5rem 0 3.5rem;
  background: radial-gradient(circle at 18% 15%, rgba(249,115,22,0.17), transparent 35%),
              radial-gradient(circle at 86% 0%, rgba(59,130,246,0.1), transparent 28%);
  border-bottom: 1px solid var(--border);
}
.cluster-hero-compact { padding: 4rem 0 3rem; }
.cluster-hero h1 { max-width: 850px; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.04em; margin-bottom: 1.25rem; }
.cluster-kicker { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.75rem; }
.cluster-lead { max-width: 780px; color: var(--text-muted); font-size: 1.1rem; line-height: 1.75; }
.cluster-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.cluster-source-note { max-width: 780px; color: var(--text-dim); font-size: 0.78rem; margin-top: 1.1rem; }
.cluster-source-note strong { color: var(--text-muted); }
.cluster-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.75rem; margin: 1.5rem 0 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cluster-nav a { color: var(--text-muted); padding: 0.45rem 0.8rem; border-radius: 7px; font-size: 0.82rem; font-weight: 600; }
.cluster-nav a:hover { color: var(--text); background: var(--bg-elevated); }
.cluster-nav a.active { color: #fff; background: var(--accent); }
.cluster-section { padding: 3rem 0; border-bottom: 1px solid var(--border); }
.cluster-section:last-child { border-bottom: 0; }
.cluster-section > h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.025em; margin-bottom: 1rem; }
.cluster-copy { color: var(--text-muted); line-height: 1.8; margin-top: 1rem; }
.cluster-copy code, .cluster-answer code, .cluster-table code { color: #fed7aa; background: #21150d; border: 1px solid #3b2415; padding: 0.12rem 0.35rem; border-radius: 5px; font-size: 0.88em; }
.cluster-answer { background: linear-gradient(135deg, rgba(249,115,22,0.13), rgba(249,115,22,0.04)); border: 1px solid rgba(249,115,22,0.32); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 2rem; }
.cluster-answer strong { color: var(--text); }
.cluster-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
.cluster-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cluster-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; }
.cluster-card:hover { border-color: var(--border-light); }
.cluster-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.15rem; height: 2.15rem; border-radius: 8px; color: #fff; background: var(--accent); font-size: 0.85rem; font-weight: 800; margin-bottom: 1rem; }
.cluster-card h2, .cluster-card h3 { color: var(--text); font-size: 1rem; margin-bottom: 0.55rem; }
.cluster-card h2 a { color: var(--text); }
.cluster-card h2 a:hover { color: var(--accent); }
.cluster-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; }
.cluster-card-link { display: inline-block; margin-top: 1rem; font-size: 0.8rem; font-weight: 600; }
.cluster-step-list { display: grid; gap: 0; margin-top: 1.25rem; }
.cluster-step { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid var(--border); }
.cluster-step:last-child { border-bottom: 0; }
.cluster-step > span { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(249,115,22,0.25); font-weight: 700; }
.cluster-step strong { display: block; margin: 0.35rem 0; color: var(--text); }
.cluster-step p { color: var(--text-muted); font-size: 0.86rem; line-height: 1.7; }
.cluster-code { margin: 1.1rem 0 0; padding: 1rem 1.15rem; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #070707; color: #d4d4d4; line-height: 1.7; font-size: 0.82rem; }
.cluster-table-wrap { overflow-x: auto; margin-top: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cluster-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.cluster-table th, .cluster-table td { text-align: left; padding: 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cluster-table th { color: var(--text); background: var(--bg-elevated); font-size: 0.77rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cluster-table td { color: var(--text-muted); font-size: 0.84rem; line-height: 1.6; }
.cluster-table tbody tr:last-child td { border-bottom: 0; }
.cluster-note { margin-top: 1.25rem; padding: 1rem 1.15rem; border-left: 3px solid var(--blue); background: rgba(59,130,246,0.08); color: var(--text-muted); font-size: 0.86rem; line-height: 1.7; }

@media (max-width: 700px) {
  .cluster-hero { padding: 3.25rem 0 2.5rem; }
  .cluster-grid-2 { grid-template-columns: 1fr; }
  .cluster-nav { flex-wrap: nowrap; overflow-x: auto; }
  .cluster-nav a { white-space: nowrap; }
  .cluster-step { grid-template-columns: 2rem 1fr; gap: 0.75rem; }
  .cluster-step > span { width: 2rem; height: 2rem; }
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(6, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.8125rem; color: var(--text-dim); line-height: 1.5; }
.footer-links h3 { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text); }
.footer-links a { display: block; font-size: 0.8125rem; color: var(--text-dim); padding: 0.25rem 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.footer-bottom p { font-size: 0.75rem; color: var(--text-dim); text-align: center; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ── Comments ── */
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-avatar-placeholder { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.comment-input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.75rem 1rem; color: var(--text); font-size: 0.875rem; font-family: inherit; resize: vertical; min-height: 80px; transition: border-color 0.2s; }
.comment-input:focus { outline: none; border-color: var(--primary); }
.comment-item { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 0.75rem; }
.comment-author { font-weight: 600; font-size: 0.875rem; color: var(--text); margin-right: 0.5rem; }
.comment-date { font-size: 0.75rem; color: var(--text-dim); }
.comment-body { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.comment-submitted-msg { margin-top: 0.75rem; padding: 0.75rem 1rem; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 0.5rem; color: #10b981; font-size: 0.8125rem; }

/* ── Profile ── */
.profile-header { display: flex; align-items: center; gap: 1.5rem; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.profile-avatar-placeholder { width: 80px; height: 80px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; flex-shrink: 0; }
.profile-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.profile-bio { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; line-height: 1.5; }
.profile-meta { display: flex; gap: 1rem; color: var(--text-dim); font-size: 0.8125rem; flex-wrap: wrap; }

/* ── Inbox / Messages ── */
.badge-unread { background: var(--primary); color: #fff; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.4rem; border-radius: 999px; margin-left: 0.375rem; }
.inbox-item { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; border-radius: var(--radius); }
.inbox-item:hover { background: var(--surface-hover); }
.inbox-item.unread { background: var(--accent-dim); }
.inbox-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.inbox-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.inbox-info { flex: 1; min-width: 0; }
.inbox-name { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.inbox-preview { font-size: 0.8125rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-time { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }

.thread-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.thread-partner { font-weight: 600; font-size: 1rem; }
.thread-messages { max-height: 400px; overflow-y: auto; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem 0; }
.thread-msg { max-width: 80%; padding: 0.75rem 1rem; border-radius: 1rem; font-size: 0.875rem; line-height: 1.5; word-break: break-word; }
.thread-msg.sent { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 0.25rem; }
.thread-msg.received { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 0.25rem; }
.thread-msg-time { font-size: 0.6875rem; opacity: 0.6; margin-top: 0.25rem; }
.thread-compose { display: flex; flex-direction: column; border-top: 1px solid var(--border); padding-top: 1rem; }

@media (max-width: 600px) {
  .profile-header { flex-direction: column; text-align: center; }
  .profile-meta { justify-content: center; }
}

/* ── Grok Bot ecosystem ── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.grok-subnav { display:flex; gap:.35rem; flex-wrap:wrap; margin-bottom:2.5rem; }
.grok-subnav a { color:var(--text-muted); border:1px solid transparent; border-radius:999px; padding:.42rem .8rem; font-size:.8rem; font-weight:600; }
.grok-subnav a:hover, .grok-subnav a.active { color:var(--text); border-color:var(--border-light); background:rgba(255,255,255,.035); }
.grok-hero { padding:2rem 0 4.25rem; overflow:hidden; border-bottom:1px solid var(--border); background:radial-gradient(circle at 78% 45%, rgba(54,231,167,.13), transparent 24rem); }
.grok-hero-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.65fr); gap:4rem; align-items:center; }
.grok-hero h1 { max-width:780px; font-size:clamp(2.7rem,6vw,5.8rem); line-height:.94; letter-spacing:-.065em; margin-bottom:1.4rem; }
.grok-hero h1 em { color:var(--accent); font-style:normal; }
.grok-hero-grid > div > p { max-width:680px; color:var(--text-muted); font-size:1.08rem; }
.grok-search { display:flex; max-width:700px; margin-top:2rem; padding:.35rem; border:1px solid var(--border-light); border-radius:12px; background:rgba(7,11,13,.84); box-shadow:0 18px 60px rgba(0,0,0,.25); }
.grok-search input, .grok-filter-form input { min-width:0; flex:1; border:0; outline:0; color:var(--text); background:transparent; padding:.75rem 1rem; }
.grok-search button { border:0; border-radius:8px; padding:.75rem 1.1rem; color:#04110d; background:var(--accent); font-weight:800; cursor:pointer; }
.grok-trust-panel { border:1px solid var(--border-light); border-radius:16px; padding:1.4rem; background:linear-gradient(150deg, rgba(22,33,38,.9), rgba(8,13,15,.94)); box-shadow:0 28px 80px rgba(0,0,0,.3); }
.grok-trust-line { display:grid; grid-template-columns:4.5rem 1fr; gap:.6rem; align-items:baseline; padding:.8rem 0; border-bottom:1px solid var(--border); }
.grok-trust-line strong { color:var(--accent); font-size:1.65rem; line-height:1; }
.grok-trust-line span { color:var(--text-muted); font-size:.82rem; }
a.grok-trust-line { color:inherit; text-decoration:none; }
a.grok-trust-line:hover span { color:var(--text); }
.grok-trust-note { margin-top:1rem; color:var(--text-dim); font-size:.75rem; line-height:1.5; }
.grok-kicker { display:block; color:var(--accent); text-transform:uppercase; letter-spacing:.12em; font-size:.68rem; font-weight:800; margin-bottom:.35rem; }
.grok-section-tight { padding-top:2.2rem; }
.grok-recipe-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.grok-recipe-card { display:flex; flex-direction:column; min-height:230px; padding:1.25rem; border:1px solid var(--border); border-radius:12px; background:linear-gradient(145deg,var(--bg-card),rgba(10,17,20,.7)); color:var(--text); transition:.2s ease; }
.grok-recipe-card:hover { color:var(--text); border-color:var(--accent); transform:translateY(-3px); box-shadow:0 18px 44px rgba(0,0,0,.25); }
.grok-card-topline { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.grok-recipe-card h3 { font-size:1.12rem; letter-spacing:-.02em; margin-bottom:.55rem; }
.grok-recipe-card p { color:var(--text-muted); font-size:.82rem; line-height:1.55; flex:1; }
.grok-card-arrow { margin-top:1.1rem; color:var(--accent); font-size:.78rem; font-weight:700; }
.grok-source-badge { display:inline-flex; padding:.2rem .5rem; border-radius:999px; font-size:.62rem; font-weight:800; letter-spacing:.02em; }
.grok-source-badge.official { color:#76f4c7; border:1px solid rgba(54,231,167,.3); background:rgba(54,231,167,.09); }
.grok-source-badge.blueprint { color:#b8c6ff; border:1px solid rgba(126,148,255,.28); background:rgba(126,148,255,.08); }
.grok-source-badge.community { color:#ffd791; border:1px solid rgba(255,180,80,.28); background:rgba(255,180,80,.08); }
.grok-source-badge.native { color:#76f4c7; border:1px solid rgba(54,231,167,.32); background:rgba(54,231,167,.1); }
.grok-surface-section { border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:rgba(14,21,24,.48); }
.grok-category-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.7rem; }
.grok-category-link { display:flex; justify-content:space-between; align-items:center; padding:1rem; color:var(--text-muted); border-bottom:1px solid var(--border); }
.grok-category-link:hover { color:var(--text); border-color:var(--accent); }
.grok-category-link strong { color:var(--accent); }
.grok-component-paths { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:1rem; }
.grok-component-paths a { display:grid; grid-template-columns:2.2rem 1fr; gap:.15rem .8rem; padding:1.25rem; border:1px solid var(--border); border-radius:12px; background:var(--bg-card); color:var(--text); }
.grok-component-paths a:hover { border-color:var(--border-light); color:var(--text); }
.grok-component-paths small { grid-column:2; color:var(--text-dim); line-height:1.45; }
.grok-path-icon { grid-row:1 / span 2; color:var(--accent); font-size:1.5rem; }
.grok-independence { max-width:840px; margin:2rem auto 0; text-align:center; color:var(--text-dim); font-size:.76rem; }
.grok-page-header { padding-top:2rem; background:linear-gradient(180deg,rgba(54,231,167,.055),transparent); }
.grok-page-header .grok-subnav { margin-bottom:2rem; }
.grok-page-header .page-subtitle { max-width:760px; }
.grok-filter-form { display:flex; gap:.5rem; max-width:720px; padding:.35rem; margin-bottom:1.5rem; border:1px solid var(--border-light); border-radius:10px; background:var(--bg-card); }
.grok-detail-filter { padding-top:.2rem; border-top:1px solid var(--border); }
.grok-results-line { color:var(--text-dim); font-size:.8rem; margin:1.25rem 0; }
.grok-results-line strong { color:var(--text); }
.grok-template-header .page-subtitle strong { color:var(--text); }
.grok-template-proof { display:grid; grid-template-columns:auto 1fr; align-items:baseline; gap:.15rem .65rem; max-width:560px; margin-top:1.5rem; padding:1rem 1.15rem; border:1px solid var(--border-light); border-radius:12px; background:rgba(7,11,13,.65); }
.grok-template-proof strong { grid-row:1 / span 2; color:var(--accent); font-size:2.1rem; line-height:1; }
.grok-template-proof > span { color:var(--text); font-size:.82rem; font-weight:700; }
.grok-template-proof .grok-template-proof-note { color:var(--text-dim); font-size:.7rem; font-weight:400; }
.grok-template-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.grok-template-card { display:flex; flex-direction:column; min-width:0; padding:1.25rem; border:1px solid var(--border); border-radius:12px; background:linear-gradient(145deg,var(--bg-card),rgba(10,17,20,.7)); }
.grok-template-card:hover { border-color:var(--border-light); box-shadow:0 18px 44px rgba(0,0,0,.2); }
.grok-template-card h2 { font-size:1.12rem; letter-spacing:-.02em; margin-bottom:.55rem; }
.grok-template-card h2 a { color:var(--text); }
.grok-template-card h2 a:hover { color:var(--accent); }
.grok-template-card > p { flex:1; color:var(--text-muted); font-size:.82rem; line-height:1.55; }
.grok-template-connections { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:1rem; }
.grok-template-connections span { padding:.25rem .45rem; border:1px solid var(--border); border-radius:999px; color:var(--text-dim); font-size:.65rem; }
.grok-template-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1.1rem; }
.grok-native-cta { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; margin-top:1.3rem; }
.grok-native-cta span { color:var(--text-dim); font-size:.72rem; }
.grok-native-aside { border-color:rgba(54,231,167,.32); background:rgba(54,231,167,.055); }
.grok-provenance-callout { display:flex; gap:.75rem; align-items:flex-start; margin:1rem 0 1.5rem; padding:1rem; border-left:2px solid var(--accent); background:var(--accent-dim); }
.grok-provenance-callout strong { white-space:nowrap; color:var(--accent); font-size:.78rem; }
.grok-provenance-callout span, .grok-section-intro { color:var(--text-muted); font-size:.8rem; line-height:1.55; }
.grok-section-intro { margin:-.8rem 0 1.4rem; }
.grok-recipe-hero { padding:2rem 0 3.5rem; border-bottom:1px solid var(--border); background:radial-gradient(circle at 80% 30%,rgba(54,231,167,.12),transparent 28rem); }
.grok-recipe-hero .grok-subnav { margin-bottom:2rem; }
.grok-back { display:inline-block; color:var(--text-dim); font-size:.78rem; margin-bottom:1.4rem; }
.grok-recipe-hero .grok-card-topline { justify-content:flex-start; }
.grok-recipe-hero h1 { font-size:clamp(2.4rem,6vw,4.8rem); line-height:1; letter-spacing:-.055em; margin-bottom:1rem; }
.grok-recipe-hero > .container > p { max-width:820px; color:var(--text-muted); font-size:1.08rem; }
.grok-recipe-meta { display:flex; gap:1rem; margin-top:1.2rem; color:var(--text-dim); font-size:.72rem; }
.grok-recipe-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:3rem; align-items:start; }
.grok-recipe-main { min-width:0; }
.grok-instruction-block { display:grid; grid-template-columns:3rem 1fr; gap:1rem; padding:1.6rem 0; border-bottom:1px solid var(--border); }
.grok-instruction-block h2 { font-size:1.1rem; margin-bottom:.55rem; }
.grok-instruction-block p { color:var(--text-muted); font-size:.9rem; }
.grok-step { color:var(--accent); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.76rem; padding-top:.2rem; }
.grok-connection-list { display:flex; gap:.5rem; flex-wrap:wrap; }
.grok-connection-list span { padding:.4rem .65rem; color:var(--text); border:1px solid var(--border-light); border-radius:6px; background:var(--bg-elevated); font-size:.76rem; }
.grok-prompt { position:relative; padding:1.1rem; border:1px solid var(--border-light); border-radius:10px; background:#060a0b; }
.grok-prompt .copy-btn { position:absolute; right:.7rem; top:.7rem; }
.grok-prompt pre { white-space:pre-wrap; word-break:break-word; padding-top:2.2rem; color:#d9ebe8; font-size:.82rem; line-height:1.65; }
.grok-editor-note { margin-top:.75rem; color:var(--text-dim) !important; font-size:.72rem !important; }
.grok-safety-block { border-bottom:0; }
.grok-recipe-aside { position:sticky; top:calc(var(--header-h) + 1.5rem); display:flex; flex-direction:column; gap:1rem; }
.grok-aside-card { padding:1.1rem; border:1px solid var(--border); border-radius:10px; background:var(--bg-card); }
.grok-aside-card h3 { font-size:.95rem; margin-bottom:.5rem; }
.grok-aside-card p, .grok-number-list { color:var(--text-muted); font-size:.76rem; line-height:1.55; }
.grok-aside-card > a { display:inline-block; margin-top:.75rem; font-size:.75rem; }
.grok-number-list { list-style:decimal; padding-left:1.1rem; }
.grok-number-list li { margin:.4rem 0; }

@media (max-width: 900px) {
  .grok-hero-grid, .grok-recipe-layout { grid-template-columns:1fr; gap:2rem; }
  .grok-recipe-aside { position:static; }
  .grok-recipe-grid, .grok-template-grid, .grok-component-paths { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .grok-subnav { gap:.1rem; margin-bottom:1.7rem; }
  .grok-subnav a { padding:.35rem .55rem; font-size:.72rem; }
  .grok-hero { padding-top:1.3rem; }
  .grok-search, .grok-filter-form { flex-direction:column; }
  .grok-recipe-grid, .grok-template-grid, .grok-component-paths, .grok-category-grid { grid-template-columns:1fr; }
  .grok-template-proof { grid-template-columns:1fr; }
  .grok-template-proof strong { grid-row:auto; }
  .grok-recipe-card { min-height:0; }
  .grok-instruction-block { grid-template-columns:2rem 1fr; }
  .grok-provenance-callout { flex-direction:column; }
}

/* ── Cross-platform ecosystem hubs ── */
.platform-hub-nav { padding-bottom:.25rem; border-bottom:1px solid rgba(49,81,91,.55); }
.platform-directory-hero h1, .platform-index-hero h1 { max-width:900px; }
.platform-index-hero > .container > p { max-width:720px; color:var(--text-muted); font-size:1.08rem; }
.platform-capability-list { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:1.1rem; }
.platform-capability-list span { padding:.3rem .55rem; color:var(--text-muted); border:1px solid var(--border); border-radius:999px; background:rgba(14,21,24,.75); font-size:.68rem; font-weight:600; }
.platform-active-filter { border-bottom:1px solid var(--border); background:rgba(54,231,167,.055); }
.platform-active-filter .container { display:flex; justify-content:space-between; gap:1rem; padding-top:.8rem; padding-bottom:.8rem; color:var(--text-muted); font-size:.8rem; }
.platform-empty-card { display:flex; align-items:center; gap:1rem; padding:1.4rem; border:1px dashed var(--border-light); border-radius:12px; background:var(--bg-card); }
.platform-empty-card > span { display:flex; align-items:center; justify-content:center; width:2.5rem; height:2.5rem; flex:0 0 auto; border:1px solid var(--border-light); border-radius:50%; color:var(--accent); }
.platform-empty-card h3 { font-size:.95rem; margin-bottom:.2rem; }
.platform-empty-card p { color:var(--text-muted); font-size:.8rem; }
.platform-source-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:3rem; align-items:start; }
.platform-source-list { display:flex; flex-direction:column; border-top:1px solid var(--border); }
.platform-source-list > div { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.7rem 0; border-bottom:1px solid var(--border); color:var(--text-muted); font-size:.8rem; }
.platform-source-list strong { color:var(--accent); }
.platform-official-card { margin:0; }
.platform-hub-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.platform-hub-card { display:flex; flex-direction:column; min-height:290px; padding:1.3rem; color:var(--text); border:1px solid var(--border); border-radius:14px; background:linear-gradient(145deg,var(--bg-card),rgba(10,17,20,.72)); transition:.2s ease; }
.platform-hub-card:hover { color:var(--text); border-color:var(--accent); transform:translateY(-3px); box-shadow:0 18px 44px rgba(0,0,0,.25); }
.platform-hub-card-head { display:flex; align-items:center; gap:.75rem; }
.platform-hub-card-head h2 { font-size:1.1rem; line-height:1.2; }
.platform-hub-card-head div > span { color:var(--text-dim); font-size:.7rem; }
.platform-hub-card > p { flex:1; margin:1.1rem 0; color:var(--text-muted); font-size:.82rem; line-height:1.55; }
.platform-hub-card > strong { margin-top:1.2rem; color:var(--accent); font-size:.78rem; }

@media (max-width: 900px) {
  .platform-source-layout { grid-template-columns:1fr; gap:1.5rem; }
  .platform-hub-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .platform-hub-nav { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-right:-1.5rem; padding-right:1.5rem; }
  .platform-hub-nav::-webkit-scrollbar { display:none; }
  .platform-hub-grid { grid-template-columns:1fr; }
  .platform-hub-card { min-height:0; }
  .platform-active-filter .container { align-items:flex-start; }
}

/* OpenClaw hosting referral */
.do-promo-section { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.do-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.4rem 1.6rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.do-promo h2 { margin: 0.2rem 0 0.35rem; font-size: 1.2rem; color: var(--text); }
.do-promo p { margin: 0 0 0.45rem; color: var(--text-muted); }
.do-promo small { display: block; color: var(--text-dim); font-size: 0.75rem; }
.do-promo-label { color: var(--accent); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.do-promo-actions { display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0; }
.do-promo-actions .btn { white-space: nowrap; }
@media (max-width: 700px) {
  .do-promo { flex-direction: column; align-items: flex-start; }
}

/* ── Homepage leaderboard + sidebar ── */
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--header-h) + 1rem); }

.rank-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.rank-item {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); transition: border-color .15s, background .15s;
}
.rank-item:hover { border-color: var(--border-light); background: var(--bg-card-hover); }
.rank-num { flex: 0 0 1.6rem; text-align: center; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.rank-list li:nth-child(-n+3) .rank-num { color: var(--accent); }
.rank-img { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--bg-elevated); }
.rank-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--bg-elevated); align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.rank-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.rank-title { font-weight: 600; }
.rank-desc { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.rank-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; flex-shrink: 0; color: var(--text-muted); font-size: 0.85rem; }

.side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.1rem; }
.side-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.6rem; }
.side-title-row { display: flex; align-items: baseline; justify-content: space-between; }
.side-title-row .side-title { margin-bottom: 0.6rem; }
.side-more { font-size: 0.8rem; color: var(--text-dim); }
.side-more:hover { color: var(--accent); }

.sponsor-row {
  display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem 0.6rem; margin: 0 -0.6rem;
  border-radius: var(--radius); color: var(--text);
}
.sponsor-row:hover { background: var(--bg-card-hover); }
.sponsor-img { width: 32px; height: 32px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.sponsor-name { display: block; font-weight: 600; font-size: 0.9rem; }
.sponsor-desc { display: block; color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }
.sponsor-cta .sponsor-name { color: var(--accent); }

.cat-row {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.6rem; margin: 0 -0.6rem; border-radius: var(--radius);
  color: var(--text-muted); font-size: 0.9rem;
}
.cat-row:hover { background: var(--bg-card-hover); color: var(--text); }
.cat-count { color: var(--text-dim); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .home-cols { grid-template-columns: 1fr; }
  .home-side { position: static; }
  .rank-desc { white-space: normal; }
  .rank-stats { flex-direction: row; gap: 0.6rem; }
}

/* ═══ Managed OpenClaw AI bots: /ai-assistant, /dashboard/bots, header + promo ═══ */
/* Component display rules must not override the hidden attribute (bot page toggles). */
[hidden] { display: none !important; }
.btn-lg { padding: 0.75rem 1.4rem; font-size: 0.95rem; font-weight: 700; box-shadow: 0 8px 24px -10px rgba(54,231,167,0.65); }
.btn-ai-bot { gap: 0.35rem; box-shadow: 0 0 0 1px rgba(54,231,167,0.45), 0 6px 18px -8px rgba(54,231,167,0.8); }
.btn-ai-bot-short { display: none; }
.header-actions .btn-sm { min-height: 36px; }
@media (max-width: 1080px) and (min-width: 769px) {
  .main-nav .nav-link { padding: 0.4rem 0.5rem; }
}
@media (max-width: 520px) {
  .btn-ai-bot-full { display: none; }
  .btn-ai-bot-short { display: inline; }
  .header-signin, .header-dashboard { display: none; }
}

/* Promo on OpenClaw pages: managed bot first, DigitalOcean self-host as a small option */
.ai-promo {
  position: relative; flex-wrap: wrap; gap: 0.75rem 1.25rem; border-color: rgba(54,231,167,0.35); border-radius: 16px;
  background: radial-gradient(60% 140% at 0% 0%, rgba(54,231,167,0.16), transparent 60%), var(--bg-card);
}
.ai-promo-icon {
  display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; color: #04110d;
  background: linear-gradient(135deg, #66f5c2, #14b885); box-shadow: 0 10px 24px -10px rgba(54,231,167,0.8);
}
.ai-promo-copy { flex: 1 1 320px; min-width: 0; }
.ai-promo h2 { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.3; }
.ai-promo p a { white-space: nowrap; }
.do-promo .ai-promo-disclosure { flex-basis: 100%; padding-top: 0.75rem; border-top: 1px solid var(--border); line-height: 1.6; }
@media (max-width: 700px) {
  .ai-promo .do-promo-actions, .ai-promo .do-promo-actions .btn { width: 100%; }
  .ai-promo-copy { flex: 0 0 auto; }
}

/* ── Shared personality bits ── */
.pulse-dot {
  position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: pulse-dot 2.4s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}


/* ── CTA band (home + /ai-assistant) ── */
.cta-band {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem 2rem;
  padding: 2.25rem 2.5rem; border-radius: 16px; border: 1px solid rgba(54,231,167,0.3);
  background:
    radial-gradient(70% 160% at 100% 0%, rgba(54,231,167,0.22), transparent 60%),
    radial-gradient(50% 120% at 0% 100%, rgba(59,130,246,0.12), transparent 60%),
    var(--bg-card);
}
.cta-band-copy { position: relative; flex: 1 1 320px; min-width: 0; }
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 750; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.cta-band p { color: var(--text-muted); max-width: 520px; }
.cta-band-actions { position: relative; display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ── /ai-assistant landing ── */
.aa-hero { position: relative; overflow: hidden; padding: 4.5rem 0 4rem; border-bottom: 1px solid var(--border); }
.aa-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 60% at 80% 30%, rgba(54,231,167,0.20), transparent 70%),
    radial-gradient(35% 50% at 10% 0%, rgba(59,130,246,0.10), transparent 70%);
}
.aa-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 40%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 75% 40%, #000, transparent 75%);
}
.aa-hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; }
.aa-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 1.25rem; padding: 0.35rem 0.9rem 0.35rem 0.75rem;
  border: 1px solid rgba(54,231,167,0.35); border-radius: 999px; background: rgba(54,231,167,0.08);
  color: var(--accent-hover); font-size: 0.8rem; font-weight: 600;
}
.aa-title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.045em; margin-bottom: 1.1rem; }
.aa-title-accent { display: block; background: linear-gradient(100deg, #a7f3d0, var(--accent) 45%, #60a5fa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent); }
.aa-lead { color: var(--text-muted); font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.65; max-width: 520px; }
.aa-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.aa-btn-ghost { padding: 0.75rem 1.3rem; font-size: 0.95rem; }
.aa-price-line { margin-top: 1rem; color: var(--text-muted); font-size: 0.9rem; }
.aa-price-line strong { color: var(--text); }
.aa-trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.aa-trust li { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-muted); font-size: 0.85rem; }
.aa-trust svg { color: var(--accent); }

/* Telegram-style phone mock */
.aa-phone {
  position: relative; width: 100%; max-width: 380px; justify-self: center; margin: 0;
  border-radius: 28px; padding: 10px; background: linear-gradient(160deg, #2a2a2a, #121212);
  border: 1px solid #333; box-shadow: 0 40px 80px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.03) inset, 0 30px 80px -40px rgba(54,231,167,0.55);
  transform: rotate(1.5deg);
}
.aa-phone-top {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0.85rem; border-radius: 20px 20px 0 0;
  background: #1c2733; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.aa-chat-avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #04110d; flex-shrink: 0;
  background: linear-gradient(135deg, #66f5c2, #36e7a7 45%, #3b82f6);
}
.aa-chat-who { display: flex; flex-direction: column; line-height: 1.25; }
.aa-chat-who strong { font-size: 0.9rem; color: #fff; }
.aa-chat-who small { font-size: 0.72rem; color: #7fb3e6; }
.aa-chat {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 0.9rem 0.75rem 1rem; border-radius: 0 0 20px 20px; min-height: 360px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.025) 0 2px, transparent 3px) 0 0 / 28px 28px,
    linear-gradient(180deg, #0e1621, #0b121b);
}
.aa-chat-day { align-self: center; padding: 0.1rem 0.6rem; border-radius: 999px; background: rgba(0,0,0,0.35); color: rgba(255,255,255,0.7); font-size: 0.7rem; font-weight: 500; }
.aa-msg {
  position: relative; max-width: 85%; padding: 0.5rem 0.7rem 0.4rem; border-radius: 14px; font-size: 0.84rem; line-height: 1.45; color: #e9eef3;
  opacity: 0; animation: msg-in .5s cubic-bezier(.2,.8,.2,1) forwards;
}
.aa-msg p + p, .aa-msg p + ul { margin-top: 0.25rem; }
.aa-msg ul { padding-left: 0; }
.aa-msg li { position: relative; padding-left: 0.9rem; }
.aa-msg li::before { content: ""; position: absolute; left: 0.15rem; top: 0.6em; width: 4px; height: 4px; border-radius: 50%; background: #66f5c2; }
.aa-msg time { display: block; text-align: right; font-size: 0.66rem; color: rgba(255,255,255,0.45); margin-top: 0.15rem; }
.aa-msg-bot { align-self: flex-start; background: #182533; border-bottom-left-radius: 4px; }
.aa-msg-me { align-self: flex-end; background: #2b5278; border-bottom-right-radius: 4px; }
.aa-msg-me time { color: rgba(170,210,255,0.75); }
.aa-msg:nth-of-type(1) { animation-delay: .15s; }
.aa-msg:nth-of-type(2) { animation-delay: .6s; }
.aa-msg:nth-of-type(3) { animation-delay: 1.05s; }
.aa-msg:nth-of-type(4) { animation-delay: 1.5s; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.aa-typing {
  align-self: flex-start; display: inline-flex; gap: 4px; padding: 0.6rem 0.75rem; border-radius: 14px; border-bottom-left-radius: 4px;
  background: #182533; opacity: 0; animation: msg-in .4s cubic-bezier(.2,.8,.2,1) 2s forwards;
}
.aa-typing span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.55); animation: typing 1.2s ease-in-out infinite; }
.aa-typing span:nth-child(2) { animation-delay: .15s; }
.aa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

/* Sections */
.aa-section { padding: 4.5rem 0 0; }
.aa-section-head { text-align: center; margin-bottom: 2.25rem; }
.aa-kicker { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5rem; }
.aa-h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1.15; }

.aa-uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.aa-use {
  position: relative; padding: 1.4rem; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0) 50%), var(--bg-card);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s;
}
.aa-use:hover { transform: translateY(-3px); border-color: rgba(54,231,167,0.35); box-shadow: var(--shadow-lg); }
.aa-use-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 1rem;
  color: var(--accent-hover); background: rgba(54,231,167,0.10); border: 1px solid rgba(54,231,167,0.25);
}
.aa-use h3 { font-size: 1.02rem; font-weight: 650; margin-bottom: 0.3rem; }
.aa-use p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

.aa-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; counter-reset: none; position: relative; }
.aa-step {
  position: relative; padding: 1.25rem 1.4rem 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card);
}
.aa-step p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }
.aa-step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 1.1rem 0 0.6rem; border-radius: 50%;
  font-weight: 700; font-size: 0.9rem; color: #04110d; background: linear-gradient(135deg, #66f5c2, #14b885);
  box-shadow: 0 0 0 4px rgba(54,231,167,0.15);
}
.aa-step-art {
  display: grid; place-items: center; height: 116px; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, rgba(54,231,167,0.18), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 8px, transparent 8px 16px), #0f0f0f;
  border: 1px solid var(--border);
}
.aa-art-token {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: #182533; color: #e9eef3; font-size: 0.78rem;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,0.9);
}
.aa-art-token span { color: #7fb3e6; font-weight: 600; }
.aa-art-token code { font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 0.75rem; padding: 0.2rem 0.4rem; border-radius: 6px; background: rgba(0,0,0,0.35); color: #a7f3d0; }
.aa-art-start {
  display: inline-flex; align-items: center; justify-content: center; min-width: 150px; padding: 0.6rem 1.5rem; border-radius: 10px;
  background: #2b5278; color: #fff; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 0 0 6px rgba(43,82,120,0.25), 0 10px 24px -12px rgba(0,0,0,0.9);
}
.aa-art-live {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.9rem; border-radius: 999px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35); color: #86efac; font-size: 0.82rem; font-weight: 600;
}

/* Pricing */
.aa-price-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center;
  max-width: 920px; margin: 0 auto; padding: 2.5rem; border-radius: 24px;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(54,231,167,0.18), transparent 60%),
    var(--bg-card);
  border: 1px solid transparent;
  box-shadow: 0 40px 80px -40px rgba(54,231,167,0.45);
}
.aa-price-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(102,245,194,0.9), rgba(54,231,167,0.15) 40%, rgba(255,255,255,0.08) 70%, rgba(59,130,246,0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.aa-price-badge {
  display: inline-flex; padding: 0.25rem 0.7rem; margin-bottom: 0.9rem; border-radius: 999px;
  background: var(--accent); color: #04110d; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.aa-price { display: flex; align-items: baseline; gap: 0.25rem; margin: 0.9rem 0 0.25rem; }
.aa-price-amount { font-size: clamp(2.75rem, 7vw, 3.5rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.aa-price-per { color: var(--text-muted); font-size: 1rem; }
.aa-price-sub { color: var(--text-muted); }
.aa-price-sub strong { color: var(--text); }
.aa-price-btn { margin-top: 1.25rem; }
.aa-price-hint { margin-top: 0.7rem; color: var(--text-dim); font-size: 0.78rem; line-height: 1.5; max-width: 340px; }
.aa-price-list { display: grid; gap: 0.8rem; }
.aa-price-list li { position: relative; padding-left: 2rem; color: var(--text-muted); font-size: 0.93rem; line-height: 1.5; }
.aa-price-list li::before {
  content: ""; position: absolute; left: 0; top: 0.05rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: rgba(54,231,167,0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366f5c2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

/* FAQ (details/summary) */
.aa-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 0.6rem; }
.aa-faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); transition: border-color .2s; }
.aa-faq-item[open] { border-color: rgba(54,231,167,0.35); }
.aa-faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: 0.9rem 1.15rem;
  cursor: pointer; list-style: none; font-weight: 600; font-size: 0.97rem; border-radius: inherit;
}
.aa-faq-item summary::-webkit-details-marker { display: none; }
.aa-faq-item summary:hover { color: #fff; }
.aa-faq-icon { position: relative; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-light); transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .2s; }
.aa-faq-icon::before, .aa-faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; border-radius: 2px; background: var(--accent); }
.aa-faq-icon::after { transform: rotate(90deg); }
.aa-faq-item[open] .aa-faq-icon { transform: rotate(45deg); background: var(--accent-dim); }
.aa-faq-item p { padding: 0 1.15rem 1.1rem; color: var(--text-muted); line-height: 1.7; }
.aa-final { margin-bottom: 1rem; }


@media (max-width: 900px) {
  .aa-hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .aa-phone { transform: none; }
  .aa-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aa-steps { grid-template-columns: 1fr; }
  .aa-step { display: grid; grid-template-columns: 140px 1fr; grid-template-rows: auto 1fr; column-gap: 1.25rem; align-items: start; }
  .aa-step-art { grid-row: 1 / span 2; height: 100%; min-height: 110px; }
  .aa-step-num { margin-top: 0; }
  .aa-price-card { grid-template-columns: 1fr; padding: 2rem; }
}
@media (max-width: 768px) {
  .btn-sm { min-height: 40px; }
  .cta-band { padding: 1.75rem 1.5rem; }
  .cta-band-actions { width: 100%; }
  .cta-band-actions .btn { flex: 1 1 160px; }
  .aa-hero { padding: 3rem 0 3rem; }
  .aa-section { padding-top: 3.5rem; }
}
@media (max-width: 560px) {
  .aa-uses { grid-template-columns: 1fr; }
  .aa-step { grid-template-columns: 1fr; }
  .aa-step-art { grid-row: auto; height: 100px; }
  .aa-step-num { margin-top: 1rem; }
  .aa-actions .btn { flex: 1 1 100%; }
  .aa-price-card { padding: 1.5rem; border-radius: 20px; }
  .aa-price-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .aa-msg, .aa-typing { opacity: 1; }
  .aa-use:hover, .bot-app:hover { transform: none; }
}


/* ── Managed AI bots (/dashboard/bots) ── */
.bot-wrap { max-width: 760px; margin: 0 auto; }
.bot-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; }
.bot-card h2, .bot-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.bot-card p { color: var(--text-muted); }
.bot-step { display: flex; gap: 1rem; align-items: flex-start; }
.bot-step-num { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-light); }
.bot-step.is-done .bot-step-num { background: rgba(34,197,94,0.15); color: var(--green); border-color: var(--green); }
.bot-step.is-current .bot-step-num { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.bot-step.is-locked { opacity: 0.45; }
.bot-step-body { flex: 1; min-width: 0; }
.bot-step-body ol { list-style: decimal; padding-left: 1.25rem; color: var(--text-muted); margin: 0.5rem 0 0.75rem; }
.bot-step-body ol li { margin-bottom: 0.25rem; }
.bot-done-line { color: var(--green); font-weight: 600; }
.bot-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.bot-row .form-input { flex: 1 1 240px; min-width: 0; }
.bot-msg { margin-top: 0.5rem; font-size: 0.9rem; }
.bot-msg.is-error { color: var(--red); }
.bot-msg.is-ok { color: var(--green); }
.bot-msg.is-warn { color: var(--accent); }
.bot-badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-light); }
.bot-badge::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.bot-badge.s-running { color: var(--green); border-color: rgba(34,197,94,0.4); }
.bot-badge.s-offline, .bot-badge.s-error { color: var(--red); border-color: rgba(59,130,246,0.4); }
.bot-badge.s-setup { color: var(--accent); border-color: rgba(54,231,167,0.4); }
.bot-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; margin: 0.75rem 0; }
.bot-progress span { font-size: 0.75rem; color: var(--text-dim); border-top: 3px solid var(--border-light); padding-top: 0.35rem; }
.bot-progress span.is-done { color: var(--green); border-color: var(--green); }
.bot-progress span.is-current { color: var(--accent); border-color: var(--accent); }
.bot-kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.9rem; }
.bot-kv dt { color: var(--text-dim); }
.bot-events { font-size: 0.85rem; color: var(--text-muted); }
.bot-events li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 0.75rem; }
.bot-events time { color: var(--text-dim); flex: 0 0 auto; }
.bot-price { font-size: 2rem; font-weight: 700; }
.bot-price small { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.bot-uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.bot-uses div { background: var(--bg-elevated); border-radius: var(--radius); padding: 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.bot-uses strong { display: block; color: var(--text); }
.bot-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin-top: 0.75rem; }
.bot-app { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; min-height: 44px; padding: 0.8rem; text-align: left; background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-light); border-radius: var(--radius); cursor: pointer; font: inherit; transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease; }
.bot-app strong { color: var(--text); }
.bot-app small { font-size: 0.8rem; }
.bot-app .app-logo { flex: 0 0 auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.bot-app:hover { border-color: var(--accent); transform: translateY(-1px); }
.bot-app.is-selected, .bot-app:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.bot-apps-radio .bot-app { position: relative; }
.bot-apps-radio .bot-app input { position: absolute; opacity: 0; pointer-events: none; }
.bot-apps-radio .bot-app:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
a.bot-app { text-decoration: none; }
.bot-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aa-apps .bot-apps { gap: 1rem; }
@media (max-width: 860px) { .bot-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .bot-apps { grid-template-columns: 1fr; } }
.aa-apps .bot-app { padding: 1.25rem; }
.bot-app:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bot-qr { display: inline-block; background: #fff; padding: 12px; border-radius: var(--radius); margin-top: 0.75rem; }
.bot-qr svg { display: block; width: min(280px, 70vw); height: auto; }
.bot-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.bot-tier { display: flex; flex-direction: column; gap: 0.25rem; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.bot-tier strong { color: var(--text); }
.bot-tier.is-current { border-color: var(--accent); }
.bot-tier-price { color: var(--text); font-weight: 600; }
.bot-tier-current { color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.bot-tier .btn { align-self: flex-start; margin-top: 0.25rem; }
@media (max-width: 560px) {
  .bot-progress { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bot-progress span { font-size: 0.65rem; }
  .bot-step { gap: 0.75rem; }
}

/* Self-host section on /ai-assistant */

/* ── Dashboard overview (/dashboard) ── */
.dsh-hero { position: relative; padding: 3rem 0 2rem; background: radial-gradient(60% 120% at 15% 0%, rgba(54,231,167,0.12), transparent 60%); border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.dsh-eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.4rem; }
.dsh-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.dsh-sub { color: var(--text-muted); margin-top: 0.35rem; }
.dsh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.dsh-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.35rem; display: flex; flex-direction: column; gap: 0.9rem; }
.dsh-card-wide { grid-column: 1 / -1; }
.dsh-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dsh-card-head h2 { font-size: 1.1rem; font-weight: 700; }
.dsh-card-head p, .dsh-muted { color: var(--text-muted); font-size: 0.9rem; }
.dsh-bots { display: grid; gap: 0.6rem; }
.dsh-bot { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0.9rem; min-height: 56px; border: 1px solid var(--border-light); border-radius: var(--radius); background: var(--bg-elevated); color: var(--text); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.dsh-bot:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--text); }
.dsh-bot-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--bg); flex: 0 0 auto; }
.dsh-bot-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dsh-bot-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsh-bot-main small { color: var(--text-dim); }
.dsh-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px dashed var(--border-light); border-radius: var(--radius); }
.dsh-empty p { color: var(--text-muted); max-width: 52ch; }
.dsh-kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.95rem; }
.dsh-kv dt { color: var(--text-dim); }
.dsh-kv dd { font-weight: 600; }
.dsh-subs { display: grid; gap: 0.4rem; font-size: 0.88rem; }
.dsh-subs li { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; border-top: 1px solid var(--border); color: var(--text-muted); }
.dsh-subs small { color: var(--text-dim); margin-left: 0.3rem; }
.dsh-billing-btn { align-self: flex-start; }
.dsh-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.dsh-stats div { background: var(--bg-elevated); border-radius: var(--radius); padding: 0.9rem; text-align: center; }
.dsh-stats span { display: block; font-size: 1.6rem; font-weight: 800; }
.dsh-stats small { color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.dsh-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.dsh .btn-sm { min-height: 40px; }
@media (max-width: 760px) {
  .dsh-grid { grid-template-columns: 1fr; }
  .dsh-card-head { flex-direction: column; }
}
/* Small phones: keep the header from overlapping (logo mark stays, wordmark hides). */
@media (max-width: 359px) {
  .site-header .logo-text { display: none; }
}
