/**
 * Help Center Stylesheet
 * Scoped under .help-center-page body class to avoid conflicts with main theme.
 * Font: DM Sans (loaded in header.php alongside Inter).
 */

/* ── Hide site header on docs / developer / schema pages ── */
body.single-docs .site-header,
body.single-docs header,
body.page-template-page-developers .site-header,
.help-center-page .site-header,
.help-center-page header {
  display: none !important;
}

/* ── Scroll offset ── */
.help-center-page {
  scroll-padding-top: 100px;
}

body.single-docs.help-center-page {
  scroll-padding-top: 24px;
}

.section-anchor {
  display: block;
  height: 100px;
  margin-top: -100px;
  visibility: hidden;
  pointer-events: none;
}

body.single-docs .section-anchor {
  height: 24px;
  margin-top: -24px;
}

/* ── Variables (scoped) ── */
.help-center-page {
  --hc-bg: #f7f6f3;
  --hc-surface: #ffffff;
  --hc-border: #e4e2dc;
  --hc-text: #1a1916;
  --hc-text-muted: #6b6860;
  --hc-accent: #5b0a91;
  --hc-accent-light: #f3eafa;
  --hc-green: #1a8a4a;
  --hc-green-light: #e8f7ee;
  --hc-orange: #d4600a;
  --hc-orange-light: #fff3e8;
  --hc-red: #c4312b;
  --hc-red-light: #fdf0ef;
  --hc-purple: #6c3fd4;
  --hc-purple-light: #f2eeff;
  --hc-tag-bg: #f0eeea;
  --hc-font: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* ══════════════════════════════════════
   HUB PAGE — /help-center/
   ══════════════════════════════════════ */

/* Hero */
.hc-hero {
  background: linear-gradient(180deg, #faf7fe 0%, #ffffff 100%);
  padding: 80px 24px 48px;
  text-align: center;
}

.hc-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.hc-hero h1 {
  font-family: var(--hc-font);
  font-size: 2.4rem;
  font-weight: 700;
  color: #03003d;
  margin: 0 0 12px;
  padding-top: 120px;
}

.hc-hero-sub {
  font-family: var(--hc-font);
  font-size: 1.1rem;
  color: #7e7f88;
  margin: 0 0 32px;
}

/* ── Search bar ── */
.hc-search-wrapper {
  position: relative;
  max-width: 560px;
  margin: 28px auto;
  padding-left: 16px;
  padding-right: 16px;
}

#hc-search {
  width: 100%;
  padding: 14px 48px 14px 20px;
  font-family: var(--hc-font);
  font-size: 1rem;
  color: var(--hc-text);
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

#hc-search::placeholder {
  color: var(--hc-text-muted);
  opacity: 0.7;
}

#hc-search:focus {
  border-color: var(--hc-accent);
  box-shadow: 0 0 0 3px rgba(91, 10, 145, 0.12);
}

#hc-search.is-loading {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b6860' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10' stroke-dasharray='31.4 31.4' stroke-dashoffset='0'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}

/* ── Search results dropdown ── */
#hc-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e4e2dc;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 999;
  max-height: 400px;
  overflow-y: auto;
}

#hc-results.is-active {
  display: block;
}

.hc-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--hc-text);
  border-bottom: 1px solid #e4e2dc;
  transition: background 0.15s;
  font-family: var(--hc-font);
  text-align: left;
}

.hc-result-item:last-child {
  border-bottom: none;
}

.hc-result-item:hover,
.hc-result-item.is-highlighted {
  background: #f3eafa;
}

.hc-result-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #5b0a91;
}

.hc-result-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.hc-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #5b0a91;
  text-align: left;
}

.hc-result-section {
  font-size: 0.8rem;
  color: #7e7f88;
  text-align: left;
}

.hc-no-results {
  padding: 16px;
  text-align: center;
  color: var(--hc-text-muted);
  font-size: 0.95rem;
  font-family: var(--hc-font);
}

/* ── Category cards ── */
.hc-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.hc-categories {
  padding: 48px 0 24px;
  background: #ffffff;
}

.hc-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hc-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: 12px;
  padding: 28px 24px;
  text-decoration: none;
  color: #03003d;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--hc-font);
}

.hc-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--hc-accent);
}

.hc-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--hc-accent-light);
  color: var(--hc-accent);
  margin-bottom: 4px;
}

.hc-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.hc-card p {
  font-size: 0.88rem;
  color: #7e7f88;
  margin: 0;
  line-height: 1.5;
}

.hc-card-count {
  font-size: 0.78rem;
  color: #7e7f88;
  margin-top: auto;
}

/* ── Article index (hub bottom) ── */
.hc-index {
  padding: 48px 0 80px;
  background: #ffffff;
}

.hc-index-group {
  margin-bottom: 40px;
}

.hc-index-group h2 {
  font-family: var(--hc-font);
  font-size: 1.3rem;
  font-weight: 700;
  color: #03003d;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hc-border);
}

.hc-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hc-index-list li {
  border-bottom: 1px solid var(--hc-border);
}

.hc-index-list li:last-child {
  border-bottom: none;
}

.hc-index-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #5b0a91;
  font-family: var(--hc-font);
  border-radius: 8px;
  transition: background 0.15s;
}

.hc-index-list a:hover {
  background: var(--hc-accent-light);
}

.hc-index-title {
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.hc-index-excerpt {
  flex: 1;
  font-size: 0.85rem;
  color: #7e7f88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-index-arrow {
  color: #7e7f88;
  font-size: 1.1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.hc-index-empty {
  color: var(--hc-text-muted);
  font-style: italic;
  padding: 8px 0;
}


/* ══════════════════════════════════════
   ARTICLE PAGE — single-docs.php
   ══════════════════════════════════════ */

/* Two-column layout */
.hc-article-layout {
  display: flex;
  min-height: 100vh;
  background: var(--hc-bg);
}

/* ── Sidebar (240px, sticky) ── */
.hc-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--hc-surface);
  border-right: 1px solid var(--hc-border);
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}

#wpadminbar ~ .hc-article-layout .hc-sidebar {
  top: 32px;
}

.hc-sidebar-inner {
  padding: 28px 20px;
}

.hc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hc-border);
}

.hc-sidebar-logo {
  height: 24px;
  width: auto;
}

.hc-sidebar-label {
  font-family: var(--hc-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hc-sidebar-group {
  margin-bottom: 24px;
}

.hc-sidebar-heading {
  font-family: var(--hc-font);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hc-text-muted);
  margin: 0 0 8px;
  padding: 0 8px;
}

.hc-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hc-sidebar-nav li {
  margin-bottom: 2px;
}

.sidebar-link {
  display: block;
  padding: 7px 12px;
  font-family: var(--hc-font);
  font-size: 0.88rem;
  color: var(--hc-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.sidebar-link:hover {
  background: var(--hc-bg);
  color: var(--hc-text);
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--hc-accent-light);
  color: var(--hc-accent);
  font-weight: 600;
  text-decoration: none;
}

/* Override global red link color for all help center links */
.hc-hub a,
.hc-hub a:hover,
.hc-article-content a:hover,
.breadcrumb a:hover,
.related a:hover,
.toc a:hover,
.sidebar-link:hover {
  color: #6b2fa0 !important;
  opacity: 1;
}

/* Help center cards: inherit their own colors, no red bleed */
.hc-card,
.hc-card:hover,
.hc-card h3,
.hc-card p,
.hc-card .hc-card-count {
  color: inherit !important;
  text-decoration: none !important;
}

.hc-index-list a,
.hc-index-list a:hover {
  color: #6b2fa0 !important;
  text-decoration: none !important;
}

/* Override global a:hover underline for all sidebar/brand links */
.hc-sidebar a:hover,
.hc-sidebar-brand:hover,
.dev-sidebar a:hover,
.dev-sidebar-brand:hover,
.schema-sidebar a:hover,
.schema-sidebar-brand:hover {
  text-decoration: none;
}

/* ── Mobile sidebar toggle ── */
.hc-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 998;
  background: var(--hc-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--hc-font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hc-sidebar-toggle svg {
  stroke: #fff;
}

/* Mobile overlay backdrop */
.hc-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.35);
}

.hc-sidebar-overlay.is-visible {
  display: block;
}

/* ── Main content area (780px max, 56px 64px padding) ── */
.hc-article-p-main {
  width: 100%;
}
.hc-article-main {
  flex: 1;
  max-width: 780px;
  padding: 56px 64px;
  min-width: 0;
  margin: 0 auto;
}

/* ── Video embed placeholder ── */
.hc-video-embed {
  margin-bottom: 32px;
}

.hc-video-embed .media-placeholder.video {
  background: var(--hc-surface);
  border: 2px dashed var(--hc-border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
}

.media-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--hc-text-muted);
}

.media-placeholder-inner svg {
  color: var(--hc-accent);
}

.media-placeholder-inner .text-muted {
  font-size: 0.82rem;
  color: var(--hc-text-muted);
}


/* ══════════════════════════════════════
   ARTICLE CONTENT COMPONENTS
   ══════════════════════════════════════ */

/* ── Base typography ── */
.hc-article-content {
  font-family: var(--hc-font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--hc-text);
}

.hc-article-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--hc-text);
  line-height: 1.25;
}

.hc-article-content .subtitle,
.hc-article-content h1 + p:first-of-type {
  font-size: 1.05rem;
  color: var(--hc-text-muted);
  margin: 0 0 32px;
  line-height: 1.6;
}

.hc-article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--hc-border);
  color: var(--hc-text);
  line-height: 1.3;
}

.hc-article-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.hc-article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--hc-text);
  line-height: 1.35;
}

.hc-article-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--hc-text);
}

.hc-article-content p {
  margin: 0 0 16px;
}

.hc-article-content a {
  color: var(--hc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hc-article-content a:hover {
  color: #3d0663;
}

.hc-article-content ul,
.hc-article-content ol {
  padding-left: 24px;
}

.hc-article-content li {
  margin-bottom: 8px;
}

.hc-article-content li > ul,
.hc-article-content li > ol {
  margin-top: 8px;
  margin-bottom: 0;
}

.hc-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
}

.hc-article-content strong {
  font-weight: 600;
}

.hc-article-content hr {
  border: none;
  border-top: 1px solid var(--hc-border);
  margin: 40px 0;
}

/* ── Inline code & code blocks ── */
.hc-article-content code {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  font-size: 0.88em;
  background: var(--hc-tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.hc-article-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px 24px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.hc-article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── Table of Contents ── */
.toc {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0 0 32px;
  font-family: var(--hc-font);
}

.toc h4,
.toc .toc-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-text-muted);
  margin: 0 0 12px;
}

.toc ol,
.toc ul {
  margin: 0;
  padding-left: 20px;
}

.hc-article-content .toc .toc-list,
.toc .toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.hc-article-content .toc .toc-list li,
.toc .toc-list li {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
}

.toc li {
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.hc-article-content .toc a .toc-num,
.toc a .toc-num {
  color: #9b9690 !important;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
}

.toc a {
  color: var(--hc-accent);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* ── Callout boxes ── */
.callout {
  padding: 16px 20px;
  border-radius: 10px;
  margin: 0 0 20px;
  font-family: var(--hc-font);
  font-size: 0.92rem;
  line-height: 1.6;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 8px;
}

.callout .callout-body {
  flex: 1;
}

.callout strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.callout-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.callout-body {
  flex: 1;
  min-width: 0;
}

.callout.info,
.callout.tip {
  background: var(--hc-accent-light);
  border-left: 3px solid var(--hc-accent);
  color: var(--hc-text);
}

.callout.success {
  background: var(--hc-green-light);
  border-left: 3px solid var(--hc-green);
}

.callout.warning {
  background: var(--hc-orange-light);
  border-left: 3px solid var(--hc-orange);
}

.callout.danger,
.callout.error {
  background: var(--hc-red-light);
  border-left: 3px solid var(--hc-red);
}

.callout.purple {
  background: var(--hc-purple-light);
  border-left: 3px solid var(--hc-purple);
}

/* ── Steps (numbered) ── */
.steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  margin-left: 20px;
}

.steps > li,
.step {
  counter-increment: step-counter;
  position: relative;
  padding-left: 34px;
  margin-top: 3px;
  margin-bottom: 24px;
  min-height: 32px;
}

.steps > li::before,
.step::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  margin-top: 4px;
  align-self: flex-start;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: transparent;
  color: #5b0a91;
  border: 2px solid #5b0a91;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Step with explicit badge (mockup variant) */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hc-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
  line-height: 1;
  position: relative;
  top: -3px;
}

.step-content {
  flex: 1;
  min-width: 0;
}

/* Steps as flex rows (badge + content side by side) */
.step-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.step-row .step-content h4,
.step-row .step-content h3 {
  margin-top: 4px;
}

/* ── Tags / badges ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--hc-font);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--hc-tag-bg);
  color: var(--hc-text-muted);
  line-height: 1.5;
  vertical-align: middle;
}

.tag.green {
  background: var(--hc-green-light);
  color: var(--hc-green);
}

.tag.orange {
  background: var(--hc-orange-light);
  color: var(--hc-orange);
}

.tag.red {
  background: var(--hc-red-light);
  color: var(--hc-red);
}

.tag.blue {
  background: var(--hc-accent-light);
  color: var(--hc-accent);
}

.tag.purple {
  background: var(--hc-purple-light);
  color: var(--hc-purple);
}

/* ── Visual cards / feature blocks ── */
.vis-card,
.feature-block {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: 10px;
  padding: 24px;
  margin: 0 0 20px;
}

.vis-card h4,
.feature-block h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.vis-card p,
.feature-block p {
  margin: 0;
  color: var(--hc-text-muted);
  font-size: 0.92rem;
}

/* Grid layout for vis-cards */
.vis-grid,
.feature-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0 0 24px;
}

.vis-grid > .vis-card,
.feature-grid > .feature-block,
.card-grid > * {
  margin-bottom: 0;
}

/* ── Media placeholders ── */
.media-placeholder {
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  border-radius: 10px;
  padding: 40px 24px;
  text-align: center;
  color: var(--hc-text-muted);
  font-size: 0.88rem;
  margin: 0 0 20px;
}

.media-placeholder.video {
  border-style: dashed;
  border-width: 2px;
}

.media-placeholder img {
  max-width: 100%;
  border-radius: 8px;
}

/* ── Section dividers ── */
.section {
  margin: 0 0 40px;
}

.section:last-child {
  margin-bottom: 0;
}

/* ── Comparison / data tables ── */
.hc-article-content table,
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-family: var(--hc-font);
  font-size: 0.92rem;
}

.hc-article-content th,
.compare-table th {
  background: var(--hc-bg);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--hc-border);
  white-space: nowrap;
}

.hc-article-content td,
.compare-table td {
  padding: 10px 14px;
  border: 1px solid var(--hc-border);
  vertical-align: top;
}

.hc-article-content tr:nth-child(even) td,
.compare-table tr:nth-child(even) td {
  background: #faf9f7;
}

/* Compare table header variants */
.compare-table thead th:first-child {
  width: 30%;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hc-font);
  font-size: 0.82rem;
  color: var(--hc-text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--hc-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--hc-accent);
  text-decoration: underline;
}

.breadcrumb .sep {
  color: var(--hc-border);
}

/* ── Related articles ── */
.related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--hc-border);
}

.related h3 {
  font-family: var(--hc-font);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--hc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related li {
  margin-bottom: 8px;
}

.related a {
  font-weight: 500;
  color: var(--hc-accent);
  text-decoration: none;
}

.related a:hover {
  text-decoration: underline;
}

/* ── Definition lists ── */
.hc-article-content dl {
  margin: 0 0 20px;
}

.hc-article-content dt {
  font-weight: 600;
  margin: 16px 0 4px;
}

.hc-article-content dt:first-child {
  margin-top: 0;
}

.hc-article-content dd {
  margin: 0 0 8px 0;
  color: var(--hc-text-muted);
}

/* ── Blockquotes ── */
.hc-article-content blockquote {
  border-left: 3px solid var(--hc-accent);
  margin: 0 0 20px;
  padding: 12px 20px;
  background: var(--hc-accent-light);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: var(--hc-text);
}

.hc-article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ── Key-value / field rows ── */
.field-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hc-border);
  font-size: 0.92rem;
}

.field-row:last-child {
  border-bottom: none;
}

.field-label {
  font-weight: 600;
  min-width: 140px;
  flex-shrink: 0;
}

.field-value {
  color: var(--hc-text-muted);
}


/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 1024px) {
  .hc-article-main {
    padding: 40px 32px;
  }

  .vis-grid,
  .feature-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  /* Hub: cards → 2 columns */
  .hc-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Article: sidebar collapses to slide-out drawer */
  .hc-article-layout {
    display: block;
  }

  .hc-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 240px;
    min-width: 240px;
    height: 100vh;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: none;
  }

  .hc-sidebar.is-open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .hc-sidebar-toggle {
    display: flex;
  }

  .hc-article-main {
    padding: 32px 20px;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .hc-hero {
    padding: 140px 16px 32px;
  }

  .hc-hero h1 {
    font-size: 1.8rem;
  }

  .hc-cards-grid {
    grid-template-columns: 1fr;
  }

  .hc-article-main {
    padding: 24px 16px;
  }

  .hc-article-content h1 {
    font-size: 1.5rem;
  }

  .hc-article-content h2 {
    font-size: 1.2rem;
  }

  .compare-table {
    display: block;
    overflow-x: auto;
  }
}


/* ── Article video (e.g. Dynamic Pricing walkthrough) ── */
.hc-article-video {
  margin-top: 48px;
  max-width: 100%;
  overflow: hidden;
}

.hc-article-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
}

.hc-article-video-caption {
  font-size: 13px;
  color: #6b6860;
  margin-top: 8px;
}


/*developer page START*/
.hc-article-main .adsgun-schema-json {
  position: relative;
  background: #1e1e2e;
  border-radius: 10px;
  margin: 0 0 20px;
  overflow: hidden;
}
.hc-article-main .adsgun-json-code {
  overflow-x: auto;
}
.hc-article-main .adsgun-code-content {
  margin: 0;
  padding: 20px 24px;
  font-family: 'SFMono-Regular','Consolas','Liberation Mono','Menlo',monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cdd6f4;
  background: none;
}
.hc-article-main .adsgun-code-content code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
}
.hc-article-main .adsgun-line-numbers {
  display: none;
}
.hc-article-main .copy-btn-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
}
.hc-article-main .adsgun_editor_copy_btn {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.hc-article-main .adsgun_editor_copy_btn:hover {
  background: rgba(255,255,255,0.2);
}
.hc-article-main .adsgun_editor_copy_btn svg {
  width: 16px;
  height: 16px;
  fill: #cdd6f4;
}
/*developer page END*/

/* ─── Discount Links: URL anatomy display ─── */
.url-display {
  background: #1e1e2e;
  border-radius: 10px;
  padding: 18px 22px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  margin: 20px 0;
  overflow-x: auto;
  color: #cdd6f4;
}
.url-display .url-base { color: #a6e3a1; }
.url-display .url-path { color: #89b4fa; }
.url-display .url-param { color: #fab387; }
.url-display .url-value { color: #f9e2af; }

/* ─── Bulk Discount Codes: Generation type cards ─── */
.gen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.gen-card {
  background: var(--hc-surface, #ffffff);
  border: 1px solid var(--hc-border, #e4e2dc);
  border-radius: 10px;
  padding: 18px 16px;
}
.gen-card .gen-icon { font-size: 22px; margin-bottom: 8px; display: block; }
.gen-card .gen-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.gen-card .gen-desc { font-size: 13px; color: var(--hc-text-muted, #6b6860); line-height: 1.5; }
.gen-card .gen-example {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #2e5bff;
  background: #eef1ff;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 8px;
}

/* ─── Bulk Discount Codes: Options table ─── */
.options-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  background: var(--hc-surface, #ffffff);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hc-border, #e4e2dc);
}
.options-table th {
  background: #f0eeea;
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b6860;
  border-bottom: 1px solid #e4e2dc;
}
.options-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #e4e2dc;
  vertical-align: top;
}
.options-table tr:last-child td { border-bottom: none; }
.options-table td:first-child {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: #2e5bff;
  white-space: nowrap;
  font-weight: 500;
}
.options-table td:nth-child(3) {
  color: #6b6860;
  font-size: 13px;
  font-family: 'DM Mono', monospace;
}

/* ─── Referral Program: Tier table ─── */
.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  background: var(--hc-surface, #ffffff);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hc-border, #e4e2dc);
}
.tier-table th {
  background: #f0eeea;
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b6860;
  border-bottom: 1px solid #e4e2dc;
}
.tier-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #e4e2dc;
  vertical-align: middle;
}
.tier-table tr:last-child td { border-bottom: none; }
.tier-table td:first-child { font-weight: 600; }
.tier-table .rate {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: #1a8a4a;
}
.tier-table tr.active-tier td { background: #e8f7ee; }

/* ─── Referral Program: How it works steps ─── */
.how-steps {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.how-steps li {
  list-style: none;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.how-steps li::before {
  display: none;
}
.how-steps li::marker {
  display: none;
}
.how-steps li:last-child { margin-bottom: 0; }
.how-num {
  background: #2e5bff;
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.how-content strong { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 3px; }
.how-content span { font-size: 1rem; color: #6b6860; }

.steps li > div p:first-child {
  margin-bottom: 4px;
}

.steps li > div p:last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .gen-grid { grid-template-columns: 1fr; }
}
