/* ===== KB PAGE VARIABLES ===== */
:root {
  --kb-sidebar-w: 260px;
  --kb-content-gap: 40px;
}

/* ===== BREADCRUMB ===== */
.kb-breadcrumb {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.kb-breadcrumb .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.kb-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-light);
}
.kb-breadcrumb ol li + li::before {
  content: "›";
  color: var(--text-light);
  font-size: 14px;
}
.kb-breadcrumb ol li a { color: var(--navy); }
.kb-breadcrumb ol li a:hover { color: var(--navy-light); }
.kb-breadcrumb ol li.active { color: var(--text-mid); }

/* ===== PAGE HERO ===== */
.kb-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a4a8a 60%, var(--navy-light) 100%);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.kb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.kb-hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.kb-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.kb-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,215,0,0.15);
  border: 1px solid rgba(255,215,0,0.35);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.kb-hero-badge svg { flex-shrink: 0; }
.kb-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}
.kb-hero h1 span { color: var(--gold); }
.kb-hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.78);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.kb-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kb-hero-tag {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
}
.kb-file-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  min-width: 240px;
  text-align: center;
}
.kb-file-icon {
  width: 80px;
  height: 96px;
  background: linear-gradient(160deg, #4a9eff 0%, #1a56db 100%);
  border-radius: 12px 12px 4px 4px;
  margin: 0 auto 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kb-file-icon::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.25);
  border-bottom-left-radius: 8px;
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}
.kb-file-icon span {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.kb-file-card h3 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.kb-file-meta { list-style: none; margin: 0; padding: 0; }
.kb-file-meta li {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  gap: 12px;
}
.kb-file-meta li:last-child { border-bottom: none; }
.kb-file-meta li strong { color: #fff; font-weight: 600; }

/* ===== LAYOUT ===== */
.kb-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: var(--kb-sidebar-w) 1fr;
  gap: var(--kb-content-gap);
  align-items: start;
}

/* ===== SIDEBAR ===== */
.kb-sidebar {
  position: sticky;
  top: 90px;
}
.kb-toc {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kb-toc-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kb-toc-nav { padding: 8px 0; }
.kb-toc-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mid);
  border-left: 3px solid transparent;
  transition: all 0.22s ease;
  line-height: 1.4;
}
.kb-toc-nav a:hover { color: var(--navy); background: var(--light-2); }
.kb-toc-nav a.active { color: var(--navy); border-left-color: var(--navy); background: rgba(0,51,102,0.05); }
.kb-toc-nav .toc-num {
  width: 18px;
  height: 18px;
  background: var(--border);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-mid);
  transition: all 0.22s ease;
}
.kb-toc-nav a.active .toc-num { background: var(--navy); color: #fff; }
.kb-toc-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* Sidebar CTA */
.kb-sidebar-cta {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.kb-sidebar-cta h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.kb-sidebar-cta p { color: rgba(255,255,255,0.72); font-size: 12px; line-height: 1.55; margin-bottom: 16px; }
.kb-sidebar-cta a {
  display: block;
  background: var(--green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.22s ease;
}
.kb-sidebar-cta a:hover { background: var(--green-dark); transform: translateY(-1px); }
.kb-sidebar-cta a + a {
  margin-top: 8px;
  background: rgba(255,255,255,0.12);
}
.kb-sidebar-cta a + a:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }

/* ===== CONTENT SECTIONS ===== */
.kb-section {
  margin-bottom: 64px;
  scroll-margin-top: 90px;
}
.kb-section:last-child { margin-bottom: 0; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.section-num {
  width: 38px;
  height: 38px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}
.section-heading h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.2;
}

.section-heading h3 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.2;
}

.section-heading h4 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.2;
}

/* ===== INFO CALLOUT BOXES ===== */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.65;
}
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-body { flex: 1; }
.callout-body strong { display: block; font-weight: 700; margin-bottom: 3px; font-size: 13px; }
.callout.note { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.callout.tip  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.callout.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout.info { background: #f5f3ff; border: 1px solid #ddd6fe; color: #5b21b6; }

/* ===== SPEC TABLE ===== */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.spec-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.spec-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table tr:nth-child(even) td { background: var(--light); }
.spec-table td:first-child { font-weight: 600; color: var(--text-dark); width: 32%; }
.spec-table .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.tag-green { background: #dcfce7; color: #15803d; }
.tag-blue  { background: #dbeafe; color: #1d4ed8; }
.tag-gray  { background: #f3f4f6; color: #374151; }
.tag-red   { background: #fee2e2; color: #b91c1c; }

/* ===== STEP CARDS ===== */
.steps-grid {
  display: grid;
  gap: 16px;
}
.step-card {
  display: flex;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: all 0.22s ease;
  align-items: flex-start;
}
.step-card:hover { box-shadow: var(--shadow); border-color: rgba(0,51,102,0.18); }
.step-circle {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.step-body { flex: 1; min-width: 0; }
.step-body h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; }
.step-body p { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.step-body .step-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== DATA TYPE CARDS ===== */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.data-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all 0.22s ease;
  cursor: default;
}
.data-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: rgba(0,51,102,0.18); }
.data-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
}
.data-card .h4 { font-size: 13px; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; }
.data-card p { font-size: 11.5px; color: var(--text-light); line-height: 1.5; margin: 0; }

/* ===== METHOD TABS ===== */
.method-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.method-tab {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.22s ease;
}
.method-tab:hover { border-color: var(--navy); color: var(--navy); }
.method-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.method-panel { display: none; }
.method-panel.active { display: block; }

/* ===== TOOL CARDS ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.28s ease;
  display: flex;
  flex-direction: column;
}
.tool-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.tool-card-header-text .h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.tool-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-free { background: #dcfce7; color: #15803d; }
.badge-freemium { background: #dbeafe; color: #1d4ed8; }
.badge-paid { background: #fee2e2; color: #b91c1c; }
.tool-desc { font-size: 13px; color: var(--text-mid); line-height: 1.65; margin-bottom: 14px; flex: 1; }
.tool-features { list-style: none; margin: 0 0 16px; padding: 0; }
.tool-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-mid);
  padding: 3px 0;
}
.tool-features li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.5px;
}
.tool-card-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.btn-tool-primary {
  flex: 1;
  background: var(--navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.22s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-tool-primary:hover { background: var(--navy-light); color: #fff; transform: translateY(-1px); }
.btn-tool-secondary {
  background: var(--light-2);
  color: var(--text-mid);
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.22s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-tool-secondary:hover { background: var(--border); color: var(--text-dark); }

/* ===== COMPARISON TABLE ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.compare-table th {
  padding: 14px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.compare-table th:first-child { text-align: left; background: var(--light-2); color: var(--text-mid); }
.compare-table th.pst-col { background: var(--navy); color: #fff; }
.compare-table th.ost-col { background: #1d4ed8; color: #fff; }
.compare-table th.nst-col { background: #7c3aed; color: #fff; }
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  color: var(--text-mid);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child { text-align: left; font-weight: 600; color: var(--text-dark); background: var(--light); }
.compare-table tr:nth-child(even) td { background: var(--light); }
.compare-table tr:nth-child(even) td:first-child { background: #eef2f7; }
.check-yes { color: #16a34a; font-size: 16px; }
.check-no  { color: #dc2626; font-size: 16px; }
.check-partial { color: #d97706; font-size: 16px; }

/* ===== VERSION TIMELINE ===== */
.version-timeline { position: relative; padding-left: 28px; }
.version-timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--navy), var(--border));
  border-radius: 2px;
}
.version-item {
  position: relative;
  margin-bottom: 20px;
}
.version-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--navy);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--navy);
}
.version-item:last-child { margin-bottom: 0; }
.version-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.version-year {
  font-size: 11px;
  color: var(--text-light);
  background: var(--light-2);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.version-item p { font-size: 13px; color: var(--text-mid); line-height: 1.6; margin: 0; }

/* ===== FAQ ACCORDION ===== */
.faq-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
  gap: 12px;
  transition: background 0.18s;
  font-family: inherit;
}
.faq-question:hover { background: var(--light); }
.faq-question.active { background: var(--light); color: var(--navy); }
.faq-chevron {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--light-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.22s ease;
}
.faq-question.active .faq-chevron { background: var(--navy); transform: rotate(180deg); }
.faq-chevron svg { transition: all 0.22s ease; }
.faq-question.active .faq-chevron svg path { stroke: #fff; }
.faq-answer { display: none; padding: 0 20px 18px; font-size: 13.5px; color: var(--text-mid); line-height: 1.7; }
.faq-answer p { margin: 0; }

/* ===== CODE BLOCK ===== */
.code-block {
  background: #0d1117;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  overflow-x: auto;
  position: relative;
}
.code-block pre {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #e6edf3;
}
.code-block .code-label {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6e7681;
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 4px;
}
.code-comment { color: #8b949e; }
.code-key { color: #79c0ff; }
.code-val { color: #a5d6ff; }
.code-str { color: #a8ff78; }
.code-num { color: #f8cc6e; }

/* ===== INLINE HIGHLIGHT ===== */
.hl { background: #fef3c7; color: #92400e; padding: 1px 5px; border-radius: 4px; font-size: 0.92em; font-family: 'Courier New', monospace; font-weight: 600; }
.hl-blue { background: #dbeafe; color: #1e3a8a; padding: 1px 5px; border-radius: 4px; font-size: 0.92em; font-weight: 600; }
.hl-green { background: #dcfce7; color: #14532d; padding: 1px 5px; border-radius: 4px; font-size: 0.92em; font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .kb-layout { grid-template-columns: 1fr; }
  .kb-sidebar { position: static; }
  .kb-hero-inner { grid-template-columns: 1fr; }
  .kb-file-card { display: none; }
  .data-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .data-grid { grid-template-columns: 1fr; }
  .compare-table { font-size: 11.5px; }
  .compare-table th, .compare-table td { padding: 9px 10px; }
  .method-tabs { gap: 6px; }
  .method-tab { font-size: 12px; padding: 7px 12px; }
}
