/* ═══════════════════════════════════════════════════════════════
   Jtek Knowledge Base — visual refresh layer
   Loaded after each page's inline <style>, so source-order wins.
   Overrides common classes (.hero, .article-card, .sm-*, .tip-box,
   .warning-box, .step-mockup, .kb-sidebar-*) to bring every KB page
   up to the tutorial-page visual standard without touching markup.
═══════════════════════════════════════════════════════════════ */

/* ─── TYPOGRAPHY + BASE RHYTHM ─── */
body { letter-spacing: -0.005em; }

/* ─── NAV ─── */
.nav-outer nav {
  box-shadow: 0 2px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  background: rgba(255,255,255,0.85);
}
.btn-nav-primary { box-shadow: 0 3px 10px rgba(22,163,74,0.32), 0 1px 2px rgba(0,0,0,0.05); }
.btn-nav-primary:hover { box-shadow: 0 5px 16px rgba(22,163,74,0.4); }

/* ─── HERO ─── */
.hero { padding-top: 92px; padding-bottom: 56px; }
.hero-pill {
  padding: 6px 14px 6px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  font-weight: 700; font-size: 12.5px; letter-spacing: 0.01em;
}
.hero-pill-dot { animation: kb-pulse 2.4s ease-in-out infinite; }
@keyframes kb-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(1.3); } }
.hero h1 {
  font-weight: 800; letter-spacing: -0.044em; line-height: 1.04;
  font-size: clamp(32px, 5vw, 52px);
}
.hero-sub { font-size: 17.5px; line-height: 1.6; color: #6E6E73; }

/* ─── KB LAYOUT ─── */
.kb-layout { gap: 40px; max-width: 1120px; }
.kb-sidebar {
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  padding: 18px 0 16px;
}
.kb-sidebar-header {
  font-size: 11px; font-weight: 800; color: #8E8E93;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0 18px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 10px;
}
.kb-sidebar-nav { padding: 0 10px; }
.kb-sidebar-link {
  padding: 9px 12px;
  font-size: 13.5px; font-weight: 500; color: #3C3C43;
  border-radius: 9px;
  border-left: 2.5px solid transparent;
  transition: color .18s, background .18s, border-color .18s, transform .15s;
}
.kb-sidebar-link:hover { background: rgba(0,0,0,0.035); color: #1D1D1F; transform: translateX(1px); }
.kb-sidebar-link.active {
  background: linear-gradient(90deg, rgba(0,87,255,0.09), rgba(0,87,255,0.02));
  color: #0057FF; font-weight: 700;
  border-left-color: #0057FF;
  box-shadow: 0 1px 3px rgba(0,87,255,0.08);
}
.kb-hamburger {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  transition: transform .15s, box-shadow .2s;
}
.kb-hamburger:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }

/* ─── ARTICLE CARDS ─── */
.article-card {
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 22px;
  padding: 36px 40px 40px;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  margin-bottom: 20px;
  transition: box-shadow .25s;
}
.article-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04); }

.article-number {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0057FF 0%, #3B7DFF 100%);
  color: white; font-size: 14px; font-weight: 800; letter-spacing: -0.02em;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,87,255,0.28), 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: 18px;
}
/* Category-accent override — inferred from existing color on hero-pill */
.article-card h2 {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.18;
  color: #1D1D1F; margin-bottom: 14px;
}
.article-intro { font-size: 16px; color: #6E6E73; line-height: 1.65; margin-bottom: 18px; }
.article-card p { font-size: 15.5px; color: #3C3C43; line-height: 1.7; }
.article-card p strong { font-weight: 700; color: #1D1D1F; }

/* Step list — numbered list of instructions */
.step-list {
  margin: 18px 0;
  padding-left: 0;
  display: flex; flex-direction: column; gap: 12px;
  counter-reset: sl;
  list-style: none;
}
.step-list li {
  position: relative;
  padding-left: 40px;
  font-size: 15.5px; color: #3C3C43; line-height: 1.6;
  counter-increment: sl;
}
.step-list li::before {
  content: counter(sl);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,87,255,0.08); color: #0057FF;
  font-size: 12px; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,87,255,0.15);
}
.step-list li strong { color: #1D1D1F; font-weight: 700; }

/* Inline code/kbd feel on strong words in steps (optional) */
.article-card code {
  background: rgba(0,87,255,0.08); color: #0057FF;
  padding: 1px 6px; border-radius: 5px;
  font-size: 13px; font-weight: 600; font-family: inherit;
}

/* ─── CALLOUTS ─── */
.tip-box, .warning-box {
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px; color: #1D1D1F;
  line-height: 1.6;
  margin-top: 22px;
  gap: 12px;
}
.tip-box {
  background: linear-gradient(180deg, rgba(0,87,255,0.06) 0%, rgba(0,87,255,0.02) 100%);
  border: 1px solid rgba(0,87,255,0.18);
}
.warning-box {
  background: linear-gradient(180deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.03) 100%);
  border: 1px solid rgba(245,158,11,0.25);
}
.tip-box-icon, .warning-box-icon {
  width: 28px; height: 28px; border-radius: 9px;
  display: flex !important; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px;
  margin-top: 0;
}
.tip-box-icon { background: #0057FF; color: white; }
.warning-box-icon { background: #F59E0B; color: white; }
.tip-box strong, .warning-box strong { font-weight: 700; }

/* ─── STEP MOCKUPS (the Jtek app screenshots) ─── */
.step-mockup {
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  margin-top: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  background: white;
  overflow: hidden;
}
.sm-bar {
  padding: 10px 14px;
  background: linear-gradient(180deg, #FAFAF8 0%, #F2F2F0 100%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  gap: 7px;
}
.sm-dot { width: 10px; height: 10px; box-shadow: 0 1px 1px rgba(0,0,0,0.1) inset; }
.sm-bar span { font-family: 'JetBrains Mono', 'Menlo', monospace; font-size: 10px; color: #8E8E93; letter-spacing: 0.01em; }

/* Dark Jtek sidebar in mockups — upgraded from #1e1e2d to brand-matching #1C1C1E */
.sm-side {
  background: #1C1C1E;
  border-right: 1px solid rgba(255,255,255,0.06);
  width: 132px;
  padding: 12px 8px;
}
.sm-side-item {
  padding: 7px 10px;
  font-size: 10.5px; font-weight: 500;
  color: rgba(255,255,255,0.42);
  border-radius: 7px;
  border-left: 2px solid transparent;
  letter-spacing: -0.005em;
  margin-bottom: 1px;
}
.sm-side-item:first-child { padding: 4px 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 8px; border-radius: 0; }
.sm-side-item:first-child span { color: rgba(255,255,255,0.92) !important; font-weight: 700 !important; font-size: 12px !important; }
.sm-side-item.active {
  color: white; font-weight: 600;
  background: rgba(255,255,255,0.08);
  border-left-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* Main panel */
.sm-main { background: #FAFAF8; }
.sm-topbar {
  padding: 10px 16px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  gap: 10px;
}
.sm-topbar h4 { font-weight: 800; letter-spacing: -0.02em; color: #1D1D1F; font-size: 13.5px !important; }

/* Buttons inside mockups */
.sm-btn {
  font-size: 10px; font-weight: 700; letter-spacing: 0.01em;
  padding: 5px 11px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 3px;
  transition: transform .15s;
}
.sm-btn.blue   { background: #0057FF; color: white; box-shadow: 0 2px 6px rgba(0,87,255,0.3); }
.sm-btn.purple { background: #6B3FFF; color: white; box-shadow: 0 2px 6px rgba(107,63,255,0.3); }
.sm-btn.outline { background: white; color: #1D1D1F; border: 1px solid rgba(0,0,0,0.08); font-weight: 600; }

/* Tag pills */
.sm-tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.01em;
  padding: 2.5px 9px; border-radius: 100px;
  display: inline-flex; align-items: center;
}
.sm-tag.blue   { background: rgba(0,87,255,0.10); color: #0057FF; }
.sm-tag.green  { background: rgba(24,163,74,0.10); color: #18A34A; }
.sm-tag.purple { background: rgba(107,63,255,0.10); color: #6B3FFF; }
.sm-tag.orange { background: rgba(249,115,22,0.12); color: #C2410C; }

/* Row items in mockups */
.sm-row {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 11px;
  gap: 10px;
}
.sm-row:last-child { border-bottom: none; }
.sm-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 8px; font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Hide the pulsing attention-grabber outline — it was positioned off-center
   because per-page dimensions didn't match the actual button rects. The
   "Click here" badge alone is enough to draw attention. */
.sm-highlight { display: none !important; }
.sm-badge {
  background: #0057FF;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.01em;
  padding: 3px 10px; border-radius: 100px;
  box-shadow: 0 3px 10px rgba(0,87,255,0.35);
  /* Page-level inline styles position each badge at the same column as the
     target button in the topbar (e.g. right:65px). That inline position stacks
     the "Click here" pill ON TOP of the button. Shift every badge down 32px
     so it always sits under the topbar, pointing at the button above. */
  transform: translateY(32px);
}
.sm-badge::before {
  /* little upward arrow from the badge toward the button it points at */
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #0057FF;
}

/* Form fields inside mockups */
.sm-form-field { margin-bottom: 10px; }
.sm-form-label { font-size: 9px; font-weight: 700; color: #8E8E93; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.sm-form-input {
  background: #FAFAF8;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 10.5px; color: #6E6E73;
}
.sm-form-input.filled { color: #1D1D1F; font-weight: 600; border-color: rgba(0,0,0,0.12); background: white; }

/* ─── BACK LINK / CTA ─── */
.back-link {
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  padding: 12px 26px;
  font-weight: 700;
}
.back-link:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

/* ─── FOOTER ─── */
.footer {
  padding: 48px 20px 32px;
  border-top: 1px solid rgba(0,0,0,0.06);
  color: #8E8E93; font-size: 13px;
}

/* ─── CATEGORY ACCENT INHERITANCE ─── */
/* Let each page's inline color on .hero-pill-dot drive the article-number/badge */
/* (no selector override needed — we use blue by default and let pages that set a custom pill color keep their hero color) */

/* ─── SMALL SCREENS ─── */
@media (max-width: 768px) {
  .article-card { padding: 26px 22px 30px; border-radius: 18px; }
  .article-card h2 { font-size: 21px; }
  .step-list li { padding-left: 36px; font-size: 15px; }
  .step-list li::before { width: 22px; height: 22px; font-size: 11px; }
}
