/* ═══════════════════════════════════════════════════════
   WholesaleNode — Documentation Shared Stylesheet
   wholesalenode.com
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@600;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --green-dark:   #0d5c38;
  --green-mid:    #17965f;
  --green-light:  #23ab70;
  --green-pale:   #e8f7f0;
  --ink:          #0f1a13;
  --ink-mid:      #3a4a40;
  --ink-light:    #6b7d72;
  --rule:         #dce8e1;
  --bg:           #f7faf8;
  --white:        #ffffff;
  --code-bg:      #eef4f0;
  --hook-bg:      #f0f4ff;
  --hook-border:  #b8c9f8;
  --hook-text:    #2a3a7a;
  --sidebar-w:    284px;
  --header-h:     64px;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow-sm:    0 1px 4px rgba(13,92,56,.08);
  --shadow-md:    0 4px 20px rgba(13,92,56,.12);
  --shadow-lg:    0 8px 32px rgba(13,92,56,.16);
  --transition:   .18s cubic-bezier(.4,0,.2,1);
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 15px; /* ROOT: font resizer JS changes this — all rem values scale with it */
}
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;   /* scales with html font-size */
  line-height: 1.7;
  color: var(--ink-mid);
  background: var(--bg);
}

/* ── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(35,171,112,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(35,171,112,0); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp .45s var(--transition) both;
}
.animate-in-delay-1 { animation-delay: .06s; }
.animate-in-delay-2 { animation-delay: .12s; }
.animate-in-delay-3 { animation-delay: .18s; }

/* ── TOP HEADER ─────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 0;
  box-shadow: var(--shadow-sm);
  animation: fadeIn .3s ease both;
}
.header-logo-block {
  display: flex; align-items: center;
  text-decoration: none;
  padding: 0 24px 0 20px;
  height: 100%;
  border-right: 1px solid var(--rule);
  flex-shrink: 0;
  transition: background var(--transition);
}
.header-logo-block:hover { background: var(--green-pale); }
.header-logo-img { height: 34px; width: auto; display: block; }
.header-title {
  font-family: 'Lora', serif; font-weight: 700;
  font-size: 1rem; color: var(--ink); letter-spacing: -.2px; line-height: 1.2;
}
.header-title span { color: var(--green-mid); }
.header-title small {
  display: block; font-family: 'DM Sans', sans-serif;
  font-weight: 400; font-size: 0.733rem; color: var(--ink-light);
  letter-spacing: .2px; margin-top: 1px;
}
.header-breadcrumb {
  flex: 1; display: flex; align-items: center; gap: 6px;
  padding: 0 24px; font-size: 0.867rem; color: var(--ink-light); overflow: hidden;
}
.header-breadcrumb a {
  color: var(--ink-light); text-decoration: none;
  white-space: nowrap; transition: color var(--transition);
}
.header-breadcrumb a:hover { color: var(--green-mid); }
.breadcrumb-sep { opacity: .5; font-size: 0.8rem; }
.breadcrumb-current {
  color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-actions {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 0 16px; height: 100%;
  border-left: 1px solid var(--rule); flex-shrink: 0;
}
.header-version {
  font-family: 'DM Mono', monospace; font-size: 0.767rem;
  color: var(--green-mid); background: var(--green-pale);
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.header-home-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius);
  background: var(--green-dark); color: #fff;
  font-size: 0.833rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.header-home-btn:hover { background: var(--green-mid); transform: translateY(-1px); }
.header-home-btn svg { width: 12px; height: 12px; }

/* ── LAYOUT ─────────────────────────────────────────── */
.docs-layout { display: flex; padding-top: var(--header-h); min-height: 100vh; }

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--rule);
  padding: 20px 0 60px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.sidebar-back {
  display: flex; align-items: center; gap: 7px;
  margin: 0 16px 16px; padding: 8px 12px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 12.5px; font-weight: 500; color: var(--ink-mid);
  text-decoration: none; transition: all var(--transition);
}
.sidebar-back:hover { border-color: var(--green-light); color: var(--green-dark); background: var(--green-pale); }
.sidebar-back svg { width: 13px; height: 13px; flex-shrink: 0; }
.sidebar-search { margin: 0 16px 16px; position: relative; }
.sidebar-search input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  color: var(--ink); background: var(--bg);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.sidebar-search input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(35,171,112,.12);
}
.sidebar-search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--ink-light);
}
.nav-group { margin-bottom: 4px; }
.nav-group-label {
  display: block; padding: 6px 20px 4px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--ink-light);
}
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 20px; font-size: 13.5px; font-weight: 400;
  color: var(--ink-mid); text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition); line-height: 1.3;
}
.nav-link:hover { color: var(--green-dark); background: var(--green-pale); }
.nav-link.active {
  color: var(--green-dark); font-weight: 600;
  background: var(--green-pale); border-left-color: var(--green-light);
}
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rule); flex-shrink: 0; transition: background var(--transition);
}
.nav-link:hover .nav-dot, .nav-link.active .nav-dot { background: var(--green-light); }
.nav-new {
  font-size: 9px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--green-mid);
  background: var(--green-pale); border: 1px solid #b2e4cc;
  padding: 1px 5px; border-radius: 3px; margin-left: auto;
}
.nav-hooks-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #2a3a7a;
  background: #e8edff; border: 1px solid #b8c9f8;
  padding: 1px 5px; border-radius: 3px; margin-left: auto;
}

/* ── MAIN CONTENT ───────────────────────────────────── */
.docs-main {
  flex: 1; min-width: 0;
  padding: 56px 64px 100px;
  max-width: 900px;
}

/* ── HERO (index page) ──────────────────────────────── */
.docs-hero {
  margin-bottom: 56px; padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
  animation: fadeInUp .5s ease both;
}
.docs-hero-eyebrow {
  font-family: 'DM Mono', monospace; font-size: 11px;
  font-weight: 500; color: var(--green-mid);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px;
}
.docs-hero h1 {
  font-family: 'Lora', serif; font-weight: 700;
  font-size: 36px; line-height: 1.2; color: var(--ink);
  letter-spacing: -.5px; margin-bottom: 16px;
}
.docs-hero p { font-size: 16px; color: var(--ink-light); max-width: 580px; line-height: 1.65; }

/* ── PAGE HERO ──────────────────────────────────────── */
.page-hero {
  margin-bottom: 48px; padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  animation: fadeInUp .4s ease both;
}
.page-hero-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.page-hero-eyebrow {
  font-family: 'DM Mono', monospace; font-size: 10.5px;
  font-weight: 500; color: var(--green-mid);
  letter-spacing: 1.5px; text-transform: uppercase;
}
.page-hero-badge {
  font-family: 'DM Mono', monospace; font-size: 10px;
  background: var(--green-pale); color: var(--green-dark);
  border: 1px solid #b2e4cc; padding: 2px 8px; border-radius: 12px; font-weight: 600;
}
.page-hero-new {
  font-size: 9px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #d97706;
  background: #fffbeb; border: 1px solid #fde68a;
  padding: 2px 7px; border-radius: 10px;
}
.page-hero h1 {
  font-family: 'Lora', serif; font-weight: 700;
  font-size: 32px; line-height: 1.25; color: var(--ink);
  letter-spacing: -.4px; margin-bottom: 14px;
}
.page-hero-desc { font-size: 16px; color: var(--ink-light); max-width: 600px; line-height: 1.65; }
.page-hero-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

/* ── QUICK LINKS GRID ───────────────────────────────── */
.quick-links {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 64px;
}
.quick-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); text-decoration: none;
  transition: all var(--transition); box-shadow: var(--shadow-sm);
  animation: fadeInUp .5s ease both;
}
.quick-card:nth-child(1) { animation-delay: .05s; }
.quick-card:nth-child(2) { animation-delay: .10s; }
.quick-card:nth-child(3) { animation-delay: .15s; }
.quick-card:nth-child(4) { animation-delay: .20s; }
.quick-card:nth-child(5) { animation-delay: .25s; }
.quick-card:nth-child(6) { animation-delay: .30s; }
.quick-card:hover {
  border-color: var(--green-light); box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.quick-card-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px; transition: background var(--transition);
}
.quick-card:hover .quick-card-icon { background: #d0f0e3; }
.quick-card-icon svg { width: 16px; height: 16px; color: var(--green-dark); }
.quick-card-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.quick-card-desc { font-size: 12px; color: var(--ink-light); line-height: 1.4; }

/* ── DOC SECTIONS ───────────────────────────────────── */
.doc-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.section-eyebrow {
  font-family: 'DM Mono', monospace; font-size: 10px;
  font-weight: 500; color: var(--green-mid);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
}
.doc-section h2 {
  font-family: 'Lora', serif; font-weight: 700;
  font-size: 24px; color: var(--ink); letter-spacing: -.3px;
  margin-bottom: 8px; line-height: 1.3;
  display: flex; align-items: center; gap: 10px;
}
.doc-section h2 .anchor-link {
  opacity: 0; font-size: 16px; color: var(--green-light);
  text-decoration: none; transition: opacity var(--transition);
}
.doc-section h2:hover .anchor-link { opacity: 1; }
.section-divider {
  width: 40px; height: 3px; background: linear-gradient(90deg, var(--green-light), var(--green-pale));
  border-radius: 2px; margin-bottom: 20px;
}
.doc-section h3 {
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  font-size: 17px; color: var(--ink);
  margin: 36px 0 10px; padding-top: 4px;
  border-top: 1px solid var(--rule);
}
.doc-section h3:first-of-type { border-top: none; margin-top: 24px; }
.doc-section p { margin-bottom: 14px; color: var(--ink-mid); }
.doc-section p + .doc-link { margin-bottom: 28px; }

/* ── FILTER TABS ─────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 20px 0 28px; padding: 4px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 4px);
}
.filter-btn {
  padding: 7px 16px; border-radius: var(--radius);
  font-size: 12.5px; font-weight: 500; color: var(--ink-light);
  background: transparent; border: none; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.filter-btn:hover { color: var(--green-dark); background: var(--green-pale); }
.filter-btn.active {
  background: var(--white); color: var(--green-dark);
  box-shadow: var(--shadow-sm); font-weight: 600;
  border: 1px solid var(--rule);
}
.filter-count {
  display: inline-block; margin-left: 5px;
  background: var(--green-pale); color: var(--green-dark);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
}
.filter-btn.active .filter-count {
  background: var(--green-dark); color: #fff;
}

/* ── SEARCH BAR (in-page) ───────────────────────────── */
.search-bar-inline {
  position: relative; margin-bottom: 20px;
}
.search-bar-inline input {
  width: 100%; padding: 10px 16px 10px 40px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--ink); background: var(--white);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar-inline input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(35,171,112,.12);
}
.search-bar-inline svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-light);
}
.search-no-results {
  display: none; text-align: center; padding: 32px;
  color: var(--ink-light); font-size: 14px;
}

/* ── FEATURE CARDS ───────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
.feature-card {
  padding: 18px 20px;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius);
  border-top: 3px solid var(--green-light);
  transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card h4 { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--ink-light); margin: 0; line-height: 1.55; }

/* ── STEPS ──────────────────────────────────────────── */
.steps { list-style: none; margin: 20px 0; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 20px; animation: slideInRight .4s ease both;
}
.steps li:nth-child(1) { animation-delay: .05s; }
.steps li:nth-child(2) { animation-delay: .10s; }
.steps li:nth-child(3) { animation-delay: .15s; }
.steps li:nth-child(4) { animation-delay: .20s; }
.steps li:nth-child(5) { animation-delay: .25s; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-dark); color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  transition: all var(--transition);
}
.steps li:hover .step-num { background: var(--green-mid); transform: scale(1.1); }
.step-body h4 { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.step-body p { font-size: 13.5px; color: var(--ink-mid); margin: 0; line-height: 1.6; }

/* ── SETTINGS TABLE ─────────────────────────────────── */
.settings-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  margin: 20px 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--rule);
}
.settings-table th {
  background: var(--ink); color: #fff; padding: 10px 16px;
  font-weight: 600; text-align: left; font-size: 12px;
  letter-spacing: .3px; text-transform: uppercase;
}
.settings-table td {
  padding: 10px 16px; border-bottom: 1px solid var(--rule); vertical-align: top;
  transition: background var(--transition);
}
.settings-table tr:last-child td { border-bottom: none; }
.settings-table tr:hover td { background: var(--green-pale); }
.settings-table tr:nth-child(even) td { background: var(--bg); }
.settings-table tr:nth-child(even):hover td { background: var(--green-pale); }
.settings-table code {
  font-family: 'DM Mono', monospace; font-size: 11.5px;
  background: var(--code-bg); padding: 1px 5px; border-radius: 3px; color: var(--green-dark);
}

/* ── REQ TABLE ──────────────────────────────────────── */
.req-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  margin: 20px 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--rule);
}
.req-table th {
  background: var(--ink); color: #fff; padding: 10px 16px;
  font-weight: 600; text-align: left; font-size: 12px;
  letter-spacing: .3px; text-transform: uppercase;
}
.req-table td {
  padding: 10px 16px; border-bottom: 1px solid var(--rule); vertical-align: top;
}
.req-table tr:last-child td { border-bottom: none; }
.req-table tr:nth-child(even) td { background: var(--bg); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.pill-green { background: var(--green-pale); color: var(--green-dark); }
.pill-orange { background: #fff4e6; color: #b35900; }

/* ── MODULE GRID ────────────────────────────────────── */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0; }
.module-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); text-decoration: none;
  transition: all var(--transition);
}
.module-card:hover {
  border-color: var(--green-light); background: var(--green-pale);
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.module-num {
  font-family: 'DM Mono', monospace; font-size: 11px;
  font-weight: 500; color: var(--green-mid);
  background: var(--green-pale); padding: 3px 7px;
  border-radius: 4px; flex-shrink: 0; margin-top: 1px;
}
.module-info { min-width: 0; }
.module-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 2px; }
.module-desc { font-size: 12px; color: var(--ink-light); line-height: 1.4; }
.module-new {
  font-size: 9px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--green-mid);
  background: var(--green-pale); border: 1px solid #b2e4cc;
  padding: 1px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle;
}

/* ── FAQ ACCORDION ──────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.faq-item {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item.open { border-color: #b2e4cc; box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%; display: flex; align-items: flex-start;
  gap: 14px; padding: 16px 20px;
  background: none; border: none; cursor: pointer;
  text-align: left; font-family: 'DM Sans', sans-serif;
  transition: background var(--transition);
}
.faq-q:hover { background: var(--green-pale); }
.faq-item.open .faq-q { background: var(--green-pale); }
.faq-q-icon {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-pale); border: 1.5px solid #b2e4cc;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; transition: all .25s cubic-bezier(.4,0,.2,1);
}
.faq-item.open .faq-q-icon { background: var(--green-light); border-color: var(--green-light); }
.faq-q-icon svg { width: 10px; height: 10px; color: var(--green-dark); transition: transform .25s cubic-bezier(.4,0,.2,1); }
.faq-item.open .faq-q-icon svg { color: #fff; transform: rotate(45deg); }
.faq-q-text { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.45; flex: 1; }
.faq-a {
  display: none; padding: 0 20px 18px 54px;
  font-size: 13.5px; color: var(--ink-mid); line-height: 1.7;
}
.faq-item.open .faq-a { display: block; animation: fadeInUp .2s ease both; }
.faq-a p { margin-bottom: 8px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul { padding-left: 18px; margin-bottom: 8px; }
.faq-a ul li { margin-bottom: 4px; }
.faq-a code {
  font-family: 'DM Mono', monospace; font-size: 12px;
  background: var(--code-bg); padding: 1px 5px; border-radius: 3px; color: var(--green-dark);
}

/* ── CALLOUT ────────────────────────────────────────── */
.callout {
  padding: 14px 18px; border-radius: var(--radius);
  margin: 20px 0; font-size: 13.5px; line-height: 1.6;
  display: flex; gap: 12px; align-items: flex-start;
}
.callout-info { background: #eef7ff; border-left: 3px solid #4faee8; color: #1a3d5c; }
.callout-tip { background: var(--green-pale); border-left: 3px solid var(--green-light); color: var(--green-dark); }
.callout-warn { background: #fffbeb; border-left: 3px solid #f59e0b; color: #78350f; }
.callout-hook { background: var(--hook-bg); border-left: 3px solid var(--hook-border); color: var(--hook-text); }
.callout svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.callout strong { font-weight: 600; }

/* ── HOOK CARDS ─────────────────────────────────────── */
.hooks-grid { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.hook-card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition);
}
.hook-card:hover { border-color: var(--hook-border); box-shadow: var(--shadow-md); }
.hook-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer;
  background: none; border: none; width: 100%; text-align: left;
  transition: background var(--transition);
}
.hook-card-header:hover { background: var(--hook-bg); }
.hook-card.open .hook-card-header { background: var(--hook-bg); }
.hook-type-badge {
  font-family: 'DM Mono', monospace; font-size: 9.5px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
}
.badge-action { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-filter { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.hook-name {
  font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500;
  color: var(--ink); flex: 1;
}
.hook-desc-short { font-size: 12.5px; color: var(--ink-light); margin-left: auto; }
.hook-card-icon {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--transition);
}
.hook-card.open .hook-card-icon { background: var(--hook-border); border-color: var(--hook-border); }
.hook-card-icon svg { width: 10px; height: 10px; color: var(--ink-light); transition: transform .2s; }
.hook-card.open .hook-card-icon svg { color: #fff; transform: rotate(45deg); }
.hook-card-body {
  display: none; padding: 0 18px 18px;
  border-top: 1px solid var(--rule);
}
.hook-card.open .hook-card-body { display: block; animation: fadeInUp .2s ease both; }
.hook-meta { display: flex; gap: 16px; margin: 14px 0 12px; flex-wrap: wrap; }
.hook-meta-item { font-size: 12px; color: var(--ink-light); }
.hook-meta-item strong { color: var(--ink); font-weight: 500; }
.hook-params { margin: 12px 0; }
.hook-params-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ink-light); margin-bottom: 8px;
}
.hook-param-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px;
}
.hook-param-row:last-child { border-bottom: none; }
.hook-param-name {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--green-dark); background: var(--code-bg);
  padding: 1px 6px; border-radius: 3px; flex-shrink: 0;
}
.hook-param-type {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: #3730a3; background: #e0e7ff; padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.hook-param-desc { color: var(--ink-mid); line-height: 1.5; }
.hook-code-block {
  background: #1e2a22; border-radius: var(--radius);
  padding: 16px 18px; margin: 14px 0;
  overflow-x: auto; position: relative;
}
.hook-code-block pre {
  font-family: 'DM Mono', monospace; font-size: 12.5px;
  color: #b8f0d8; line-height: 1.7; margin: 0;
  white-space: pre;
}
.hook-code-block .kw { color: #79c0ff; }
.hook-code-block .fn { color: #d2a8ff; }
.hook-code-block .str { color: #a5d6ff; }
.hook-code-block .cm { color: #6e7d6e; font-style: italic; }
.hook-code-block .var { color: #ffa657; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #b8f0d8; font-family: 'DM Mono', monospace;
  font-size: 10px; padding: 3px 8px; border-radius: 4px; cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { background: rgba(255,255,255,.2); }
.hook-example-result {
  background: var(--green-pale); border-left: 3px solid var(--green-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 14px; margin-top: 10px;
  font-size: 13px; color: var(--green-dark); line-height: 1.6;
}
.hook-example-result strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; opacity: .7; }

/* ── RULE COMBINATION CARDS ─────────────────────────── */
.combo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }
.combo-card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 20px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.combo-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-mid), var(--green-pale));
}
.combo-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--green-light); }
.combo-card h4 { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.3; }
.combo-card p { font-size: 13px; color: var(--ink-light); line-height: 1.55; margin-bottom: 12px; }
.combo-modules { display: flex; gap: 6px; flex-wrap: wrap; }
.combo-tag {
  font-size: 10.5px; font-weight: 600; color: var(--green-dark);
  background: var(--green-pale); border: 1px solid #b2e4cc;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.combo-result {
  margin-top: 12px; padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius);
  font-size: 12px; color: var(--ink-light); line-height: 1.5;
  border-left: 3px solid var(--green-light);
}
.combo-result strong { color: var(--ink); }

/* ── DOC LINKS ──────────────────────────────────────── */
.doc-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 9px 16px;
  background: var(--green-dark); color: #fff;
  font-size: 13px; font-weight: 500;
  border-radius: var(--radius); text-decoration: none;
  transition: all var(--transition);
}
.doc-link:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.doc-link svg { width: 13px; height: 13px; }
.doc-link-ghost {
  background: none; color: var(--green-dark);
  border: 1.5px solid var(--green-dark); margin-left: 8px;
}
.doc-link-ghost:hover { background: var(--green-pale); }

/* ── PREV/NEXT NAV ──────────────────────────────────── */
.page-nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 60px; padding-top: 32px; border-top: 1px solid var(--rule);
}
.page-nav-btn {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 18px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--rule);
  text-decoration: none; flex: 1; max-width: 240px;
  transition: all var(--transition);
}
.page-nav-btn:hover { border-color: var(--green-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.page-nav-btn.next { text-align: right; margin-left: auto; }
.page-nav-label { font-size: 11px; color: var(--ink-light); text-transform: uppercase; letter-spacing: .5px; }
.page-nav-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* ── LIVE DOT ────────────────────────────────────────── */
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-light); margin-right: 5px; vertical-align: middle;
  animation: pulse-dot 2s ease infinite;
}

/* ── TAG CLOUD ───────────────────────────────────────── */
.tag-cloud { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tag {
  font-size: 12px; font-weight: 500; color: var(--ink-mid);
  background: var(--white); border: 1px solid var(--rule);
  padding: 4px 12px; border-radius: 20px;
  cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.tag:hover, .tag.active { background: var(--green-pale); border-color: var(--green-light); color: var(--green-dark); }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) { .docs-main { padding: 40px 32px 80px; } }
@media (max-width: 860px) {
  .sidebar { display: none; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .combo-grid { grid-template-columns: 1fr; }
  .header-breadcrumb { display: none; }
}
@media (max-width: 600px) {
  .docs-main { padding: 28px 18px 60px; }
  .quick-links { grid-template-columns: 1fr; }
  .docs-hero h1 { font-size: 26px; }
  .page-hero h1 { font-size: 24px; }
  .header-actions { gap: 6px; padding: 0 12px; }
  .header-home-btn span { display: none; }
  .header-logo-img { height: 26px; }
  .filter-bar { overflow-x: auto; flex-wrap: nowrap; }
}

/* ── FONT SIZE CONTROLS ─────────────────────────────── */
.font-size-controls {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 3px 5px;
  margin-right: 6px;
}
.font-size-btn {
  display: flex; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-light); padding: 4px 6px; border-radius: 5px;
  font-family: 'DM Sans', sans-serif; line-height: 1;
  transition: all var(--transition);
}
.font-size-btn:hover { background: var(--green-pale); color: var(--green-dark); }
.font-size-btn svg { width: 10px; height: 10px; }
.font-size-btn:nth-child(1) span { font-size: 11px; font-weight: 600; }
.font-size-btn:nth-child(2) span { font-size: 14px; font-weight: 600; color: var(--ink-mid); }
.font-size-btn:nth-child(3) span { font-size: 16px; font-weight: 600; }
.font-size-reset { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); border-radius: 0; }

/* ── HELP BUBBLE ─────────────────────────────────────── */
@keyframes hbSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#help-bubble-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end;
}

#help-bubble-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--green-dark); color: #fff;
  border: none; border-radius: 28px;
  padding: 12px 20px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,92,56,.35);
  font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 600;
  transition: all var(--transition);
  user-select: none;
}
#help-bubble-btn:hover { background: var(--green-mid); transform: translateY(-2px); box-shadow: 0 6px 28px rgba(13,92,56,.4); }
#help-bubble-btn.hb-open { background: var(--ink); }
#help-bubble-btn svg { width: 17px; height: 17px; }
#help-bubble-label { white-space: nowrap; }

#help-bubble-panel {
  width: 360px; max-width: calc(100vw - 48px);
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  margin-bottom: 12px;
  flex-direction: column; overflow: hidden;
  max-height: calc(100vh - 120px);
}

.hb-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(135deg, var(--green-pale), #fff);
}
.hb-title {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Lora', serif; font-weight: 700; font-size: 15px; color: var(--ink);
  margin-bottom: 3px;
}
.hb-subtitle { font-size: 12px; color: var(--ink-light); line-height: 1.4; }

.hb-search-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--rule);
  position: relative;
}
.hb-search-wrap svg { width: 15px; height: 15px; color: var(--ink-light); flex-shrink: 0; }
#hb-input {
  flex: 1; border: none; outline: none;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--ink);
  background: transparent;
}
#hb-input::placeholder { color: var(--ink-light); }
.hb-clear {
  background: none; border: none; cursor: pointer;
  color: var(--ink-light); font-size: 14px; padding: 2px 6px;
  border-radius: 4px; transition: all var(--transition);
  line-height: 1;
}
.hb-clear:hover { background: var(--rule); color: var(--ink); }

.hb-results {
  overflow-y: auto; max-height: 280px;
  padding: 6px;
}
.hb-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  transition: all var(--transition); cursor: pointer;
  border: 1px solid transparent;
}
.hb-result:hover, .hb-result:focus {
  background: var(--green-pale); border-color: var(--green-light);
  outline: none;
}
.hb-result-icon {
  width: 30px; height: 30px; background: var(--bg);
  border: 1px solid var(--rule); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hb-result-icon svg { width: 14px; height: 14px; color: var(--green-mid); }
.hb-result-body { flex: 1; min-width: 0; }
.hb-result-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.hb-result-section { font-size: 11.5px; color: var(--green-mid); margin-top: 2px; font-family: 'DM Mono', monospace; }
.hb-result-arrow { width: 14px; height: 14px; color: var(--ink-light); flex-shrink: 0; }
.hb-result:hover .hb-result-arrow { color: var(--green-dark); }

.hb-empty {
  padding: 28px 20px; text-align: center;
  flex-direction: column; align-items: center;
  color: var(--ink-light); font-size: 13px;
}
.hb-empty p { margin: 0; line-height: 1.5; max-width: 240px; }

.hb-initial { padding: 14px 14px 16px; }
.hb-hint-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ink-light); margin-bottom: 10px;
}
.hb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hb-chip {
  font-size: 12px; font-weight: 500; color: var(--ink-mid);
  background: var(--bg); border: 1px solid var(--rule);
  padding: 4px 10px; border-radius: 14px; cursor: pointer;
  transition: all var(--transition); font-family: 'DM Sans', sans-serif;
}
.hb-chip:hover { background: var(--green-pale); border-color: var(--green-light); color: var(--green-dark); }
.hb-disclaimer {
  font-size: 11.5px; color: var(--ink-light); line-height: 1.5;
  background: var(--bg); border-radius: var(--radius); padding: 9px 12px;
  border-left: 3px solid var(--rule); margin: 0;
}
.hb-disclaimer strong { color: var(--ink-mid); }

@media (max-width: 600px) {
  #help-bubble-wrap { bottom: 16px; right: 16px; }
  #help-bubble-panel { width: calc(100vw - 32px); }
  .font-size-controls { display: none; }
}

/* ── PRINT ───────────────────────────────────────────── */
@media print {
  .site-header, .sidebar { display: none !important; }
  .docs-main { padding: 20px; max-width: 100%; }
  .faq-a { display: block !important; }
  .hook-card-body { display: block !important; }
}
