/* ============================================================
   Snow Debt Crusher — Help Center
   Shared stylesheet. Palette pulled from the app's src/index.css.
   ============================================================ */

:root {
  /* Surfaces */
  --bg-base:      #eef0f8;
  --bg-card:      #ffffff;
  --bg-card2:     #f8f9fe;
  --bg-sidebar:   #1a1c2e;
  --bg-sidebar2:  #13152a;
  --bg-input:     #f4f5fd;
  --border:       #e8eaf3;
  --border-light: #ebebf5;

  /* Brand accent */
  --accent:       #6366f1;
  --accent-2:     #8b5cf6;
  --accent-grad:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-light: rgba(99,102,241,0.1);

  /* Status */
  --success:    #10b981;
  --success-bg: rgba(16,185,129,0.1);
  --warning:    #f59e0b;
  --warning-bg: rgba(245,158,11,0.1);
  --danger:     #ef4444;
  --danger-bg:  rgba(239,68,68,0.1);
  --info:       #3b82f6;
  --info-bg:    rgba(59,130,246,0.1);

  /* Text */
  --text-primary:   #1e2148;
  --text-secondary: #6c757d;
  --text-muted:     #adb5c8;
  --text-on-dark:   #d4d9f5;

  --sidebar-w: 260px;
  --header-h:  64px;
  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --maxw:      820px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--bg-sidebar);
  display: flex; align-items: center;
  padding: 0 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}
.topbar-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: #fff; }
.topbar-logo:hover { text-decoration: none; }
.topbar-logo .emoji { font-size: 22px; }
.topbar-logo span { color: #818cf8; }
.topbar-spacer { flex: 1; }
.topbar-cta {
  background: var(--accent-grad); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px;
}
.topbar-cta:hover { text-decoration: none; opacity: 0.92; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; margin-right: 14px; }

/* ---------- Shell ---------- */
.shell { display: flex; max-width: 1240px; margin: 0 auto; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: var(--header-h);
  align-self: flex-start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 26px 16px 40px;
  border-right: 1px solid var(--border);
  background: var(--bg-base);
}
.sidebar-section { margin-bottom: 22px; }
.sidebar-section-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0 12px; margin-bottom: 8px;
}
.sidebar a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13.5px; font-weight: 600;
  margin-bottom: 2px; line-height: 1.3;
}
.sidebar a:hover { background: var(--accent-light); color: var(--accent); text-decoration: none; }
.sidebar a.active { background: var(--accent-light); color: var(--accent); }
.sidebar a .ico { font-size: 15px; width: 18px; text-align: center; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; padding: 34px 40px 80px; }
.content { max-width: var(--maxw); }

.breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-secondary); font-weight: 600; }

h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px; line-height: 1.2; }
.lede { font-size: 16px; color: var(--text-secondary); margin-bottom: 30px; line-height: 1.6; }

h2 {
  font-size: 21px; font-weight: 800; margin: 38px 0 12px;
  padding-top: 10px; letter-spacing: -0.3px;
}
h3 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; }
p { margin-bottom: 14px; color: #393c5e; }
ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 7px; color: #393c5e; }
strong { color: var(--text-primary); font-weight: 700; }
code {
  background: var(--bg-input); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; font-size: 13px;
  font-family: 'SF Mono', ui-monospace, Menlo, monospace; color: #4f46e5;
}

/* ---------- Hero (index) ---------- */
.hero {
  background: var(--accent-grad); color: #fff;
  border-radius: var(--radius-lg); padding: 44px 38px;
  margin-bottom: 34px;
}
.hero .badge {
  display: inline-block; background: rgba(255,255,255,0.18);
  padding: 5px 13px; border-radius: 99px; font-size: 12.5px;
  font-weight: 700; margin-bottom: 16px;
}
.hero h1 { font-size: 33px; margin-bottom: 12px; color: #fff; }
.hero p { color: rgba(255,255,255,0.92); font-size: 16px; max-width: 600px; margin-bottom: 0; }
.hero .search-hint {
  margin-top: 22px; background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius);
  padding: 12px 16px; font-size: 13.5px; color: #fff;
}

/* ---------- Cards grid (index) ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 30px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 20px 18px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: block;
}
.card:hover {
  transform: translateY(-2px); text-decoration: none;
  box-shadow: 0 10px 28px rgba(99,102,241,0.12); border-color: var(--accent);
}
.card .card-ico { font-size: 24px; margin-bottom: 10px; }
.card h3 { margin: 0 0 5px; font-size: 15.5px; color: var(--text-primary); }
.card p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius); padding: 14px 16px 14px 18px;
  margin: 18px 0; font-size: 14px; border-left: 4px solid var(--accent);
  background: var(--accent-light);
}
.callout p:last-child { margin-bottom: 0; }
.callout .callout-title { font-weight: 800; margin-bottom: 4px; display: block; }
.callout.ny      { border-left-color: var(--accent-2); background: rgba(139,92,246,0.08); }
.callout.success { border-left-color: var(--success); background: var(--success-bg); }
.callout.warning { border-left-color: var(--warning); background: var(--warning-bg); }
.callout.danger  { border-left-color: var(--danger);  background: var(--danger-bg); }
.callout.info    { border-left-color: var(--info);     background: var(--info-bg); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; margin-left: 0; }
.steps > li {
  position: relative; padding-left: 44px; margin-bottom: 18px; min-height: 30px;
}
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-grad); color: #fff;
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps > li strong { display: block; margin-bottom: 2px; }

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); }
.tbl th { background: var(--bg-card2); font-weight: 700; color: var(--text-primary); }
.tbl td { color: #393c5e; }

/* ---------- Plan cards ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.plan {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 8px 24px rgba(99,102,241,0.12); }
.plan .plan-name { font-weight: 800; font-size: 15px; }
.plan .plan-price { font-size: 26px; font-weight: 800; margin: 6px 0; }
.plan .plan-price small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.plan ul { text-align: left; margin: 12px 0 0 18px; font-size: 12.5px; }
.plan .tag { display: inline-block; background: var(--accent-grad); color:#fff; font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; margin-bottom: 8px; letter-spacing: 0.4px; }

/* ---------- FAQ ---------- */
details.faq {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); margin-bottom: 10px; padding: 0 18px;
}
details.faq summary {
  cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 20px; color: var(--accent); font-weight: 700; }
details.faq[open] summary::after { content: '\2212'; }
details.faq[open] summary { border-bottom: 1px solid var(--border); }
details.faq .faq-body { padding: 14px 0 18px; font-size: 14px; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Page nav (prev/next) ---------- */
.pagenav { display: flex; justify-content: space-between; gap: 14px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); }
.pagenav a {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px;
}
.pagenav a:hover { border-color: var(--accent); text-decoration: none; }
.pagenav .dir { color: var(--text-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pagenav .ttl { font-weight: 700; color: var(--text-primary); }
.pagenav .next { text-align: right; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--border); margin-top: 50px;
  padding: 26px 40px; text-align: center;
  font-size: 12.5px; color: var(--text-muted);
}
.foot a { color: var(--text-secondary); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0;
    z-index: 45; background: var(--bg-card); width: 270px;
    transform: translateX(-100%); transition: transform 0.22s;
    box-shadow: 2px 0 18px rgba(0,0,0,0.12);
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 26px 20px 60px; }
  .grid, .plans { grid-template-columns: 1fr; }
  h1, .hero h1 { font-size: 26px; }
}
