/*
 * Kasaloop Article Pages – Shared Styling
 * Consistent visual language for guides, comparisons, and long-form content.
 */

:root {
  --guide-primary: #667eea;
  --guide-primary-dark: #764ba2;
  --guide-surface: rgba(255, 255, 255, 0.97);
  --guide-border: rgba(255, 255, 255, 0.45);
  --guide-shadow: 0 30px 60px rgba(102, 126, 234, 0.18);
  --guide-text: #1f2937;
  --guide-subtle-text: #4b5563;
  --guide-muted: #f8fafc;
  --guide-radius-lg: 1.75rem;
}

/* ------------------------------
   Layout & Wrapper
   ------------------------------ */

.article-page .article-wrapper {
  max-width: 1100px;
  margin: clamp(3rem, 8vw, 4.75rem) auto 0;
  padding: 0 clamp(1.25rem, 4vw, 1.75rem) clamp(3rem, 7vw, 4.5rem);
}

@media (max-width: 767px) {
  .article-page .article-wrapper {
    margin-top: clamp(2rem, 12vw, 3rem);
    padding: 0 1.25rem 3.5rem;
  }
}

.article-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4338ca 100%);
  color: #ffffff;
  padding: clamp(6rem, 14vw, 8rem) 1.5rem clamp(3rem, 10vw, 4.5rem);
  text-align: center;
}

.article-hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.article-hero p {
  margin: clamp(1.25rem, 3vw, 1.75rem) auto 0;
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  line-height: 1.65;
}

.article-meta {
  font-size: 0.95rem;
  color: var(--guide-subtle-text);
  text-align: center;
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
}

html.dark .article-meta {
  color: rgba(226, 232, 240, 0.72);
}

.article-page .guide-container {
  background: var(--guide-surface);
  border-radius: var(--guide-radius-lg);
  border: 1px solid var(--guide-border);
  box-shadow: var(--guide-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.article-page .guide-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(102, 126, 234, 0.07), transparent 60%);
}

.article-page .guide-container > * {
  position: relative;
  z-index: 1;
}

.article-page .guide-container section + section {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

.article-page .guide-container section:first-of-type {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* ------------------------------
   Typography & Content Flow
   ------------------------------ */

.article-page .guide-container p,
.article-page .guide-container ul,
.article-page .guide-container ol {
  margin: 1rem 0;
  color: var(--guide-subtle-text);
  line-height: 1.78;
  font-size: 1.02rem;
}

.article-page .guide-container ul,
.article-page .guide-container ol {
  padding-left: 1.4rem;
}

.article-page .guide-container li + li {
  margin-top: 0.4rem;
}

.article-page .guide-container strong {
  color: var(--guide-text);
}

.article-page .guide-container h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--guide-text);
  margin: clamp(2rem, 4vw, 2.75rem) 0 clamp(1.2rem, 2vw, 1.6rem);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(102, 126, 234, 0.4);
}

.article-page .guide-container h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--guide-text);
  margin: clamp(1.75rem, 3vw, 2.25rem) 0 1rem;
}

.article-page .guide-container h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--guide-text);
  margin: 1.25rem 0 0.75rem;
}

.article-page .lead {
  font-size: 1.15rem;
  color: var(--guide-subtle-text);
  margin: 1.5rem 0;
}

.article-page .inline-link {
  color: var(--guide-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-page .inline-link:hover {
  text-decoration: underline;
  color: var(--guide-primary-dark);
}

.article-page blockquote {
  margin: 1.75rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--guide-primary);
  border-radius: 1rem;
  background: rgba(102, 126, 234, 0.08);
  color: var(--guide-text);
}

.article-page pre {
  margin: 1.5rem 0;
  background: #111827;
  color: #f9fafb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
}

.article-page code {
  background: rgba(15, 23, 42, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 0.4rem;
  font-size: 0.95rem;
}

/* ------------------------------
   Table of Contents
   ------------------------------ */

.article-page .toc {
  background: var(--guide-muted);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.08);
}

.article-page .toc-title,
.article-page .toc h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--guide-text);
}

.article-page .toc ul,
.article-page .toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-page .toc li + li {
  margin-top: 0.65rem;
}

.article-page .toc a {
  color: var(--guide-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-page .toc a:hover {
  color: var(--guide-primary-dark);
  text-decoration: underline;
}

/* Collapsible TOC variant (property marketplace guide) */
.article-page .toc details {
  background: var(--guide-muted);
  border-radius: 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.08);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.article-page .toc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--guide-text);
}

.article-page .toc summary::-webkit-details-marker {
  display: none;
}

.article-page .toc details[open] summary i.fa-chevron-down {
  transform: rotate(180deg);
}

.article-page .toc summary i.fa-chevron-down {
  transition: transform 0.2s ease;
}

/* ------------------------------
   Cards, Callouts & Lists
   ------------------------------ */

.article-page .step-card,
.article-page .implementation-phase,
.article-page .phase-card,
.article-page .best-practice-card,
.article-page .challenge-card,
.article-page .week-card,
.article-page .day-section {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 1rem;
  padding: clamp(1.5rem, 3vw, 1.9rem);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-page .step-card:hover,
.article-page .best-practice-card:hover,
.article-page .challenge-card:hover,
.article-page .week-card:hover,
.article-page .day-section:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(102, 126, 234, 0.18);
}

.article-page .step-number,
.article-page .phase-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--guide-primary) 0%, var(--guide-primary-dark) 100%);
  color: #fff;
  font-weight: 700;
  margin-right: 0.75rem;
  font-size: 1.05rem;
}

.article-page .step-title,
.article-page .phase-title,
.article-page .challenge-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--guide-text);
}

.article-page .highlight-box,
.article-page .info-box,
.article-page .note-box {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
  border-left: 4px solid var(--guide-primary);
  border-radius: 0.9rem;
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
}

.article-page .warning-box,
.article-page .mistake-item,
.article-page .danger-box {
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.25), rgba(248, 113, 113, 0.22));
  border-left: 4px solid #f97316;
  border-radius: 0.9rem;
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
  color: #7c2d12;
}

.article-page .mistake-item h4 {
  margin-top: 0;
  color: #991b1b;
}

.article-page .checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.article-page .checklist li {
  position: relative;
  padding-left: 2rem;
  color: var(--guide-subtle-text);
}

.article-page .checklist li + li {
  margin-top: 0.6rem;
}

.article-page .checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--guide-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.article-page .advantage-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}

.article-page .advantage-list li {
  background: rgba(102, 126, 234, 0.08);
  border-left: 4px solid var(--guide-primary);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  color: var(--guide-subtle-text);
}

.article-page .feature-card {
  background: rgba(248, 250, 252, 0.95);
  border-left: 4px solid var(--guide-primary);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-page .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.18);
}

.article-page .feature-card h3 {
  color: var(--guide-primary);
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.article-page .feature-card h3 i {
  color: var(--guide-primary);
  margin-right: 0.5rem;
}

.article-page .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.25rem, 3vw, 1.75rem);
  margin: 2rem 0;
}

.article-page .article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.article-page .article-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: clamp(1.5rem, 3vw, 1.85rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.article-page .article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.14);
}

.article-page .article-card h2,
.article-page .article-card h3 {
  margin: 0;
}

.article-page .article-card__cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--guide-primary);
}

.article-page .article-card__cta i {
  margin-left: 0.35rem;
}

.article-page .info-box {
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.85), rgba(224, 231, 255, 0.9));
  border-left-color: #3b82f6;
  color: var(--guide-text);
}

.article-page .warning-box {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85), rgba(254, 215, 170, 0.9));
  border-left-color: #f59e0b;
  color: #7c2d12;
}

.article-page .warning-box h3,
.article-page .info-box h3 {
  margin-top: 0;
  color: inherit;
}

.article-page .challenge-solution {
  margin-top: 0.75rem;
  color: var(--guide-subtle-text);
}

.article-page .icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  margin-right: 0.75rem;
}

.article-page .icon-amber { background: #f59e0b; }
.article-page .icon-indigo { background: var(--guide-primary); }
.article-page .icon-mr3 { margin-right: 0.75rem; }

.article-page .link-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.article-page .link-list li + li {
  margin-top: 0.35rem;
}

.article-page .link-list a {
  color: var(--guide-primary);
  font-weight: 500;
}

.article-page .link-list a:hover {
  text-decoration: underline;
}

/* ------------------------------
   Stats & Metrics
   ------------------------------ */

.article-page .stat-highlight {
  border-radius: 1.5rem;
  padding: clamp(2rem, 4vw, 2.75rem);
  background: linear-gradient(135deg, var(--guide-primary) 0%, var(--guide-primary-dark) 100%);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 35px 65px rgba(102, 126, 234, 0.35);
  margin: clamp(2rem, 5vw, 2.75rem) 0;
}

.article-page .stat-highlight h3 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
}

.article-page .stat-highlight p {
  margin: 0.75rem 0;
  color: rgba(255, 255, 255, 0.92);
}

.article-page .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.25rem, 3vw, 1.75rem);
  margin: 2rem 0;
}

.article-page .stat-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1rem;
  border: 2px solid rgba(102, 126, 234, 0.18);
  padding: clamp(1.5rem, 3vw, 1.9rem);
  text-align: center;
  box-shadow: 0 16px 36px rgba(102, 126, 234, 0.2);
}

.article-page .stat-number {
  font-size: clamp(2.1rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--guide-primary);
  line-height: 1;
}

.article-page .stat-number--compact {
  font-size: clamp(1.6rem, 3vw, 1.9rem);
}

.article-page .stat-label {
  margin-top: 0.65rem;
  color: var(--guide-subtle-text);
  font-size: 0.95rem;
}

.article-page .roi-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.article-page .roi-table th,
.article-page .roi-table td {
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
}

.article-page .roi-table th { font-weight: 700; color: var(--guide-text); }
.article-page .roi-table td.text-right { text-align: right; }
.article-page .roi-table__primary > td { color: var(--guide-primary); font-weight: 600; }
.article-page .roi-table__subtotal > td { background: rgba(248, 250, 252, 0.85); font-weight: 600; }
.article-page .roi-table__emphasis > td { font-size: 1.05rem; }

.article-page .comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 1rem;
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.article-page .comparison-table th,
.article-page .comparison-table td {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
}

.article-page .comparison-table th {
  background: rgba(248, 250, 252, 0.95);
  font-weight: 700;
  color: var(--guide-text);
}

.article-page .comparison-table tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.6);
}

.article-page .comparison-table .positive { color: #15803d; font-weight: 600; }
.article-page .comparison-table .negative { color: #b91c1c; font-weight: 600; }
.article-page .comparison-table .summary-row {
  background: rgba(248, 250, 252, 0.95);
  font-weight: 700;
  border-top: 3px solid var(--guide-primary);
}

.article-page .comparison-table--three th:first-child,
.article-page .comparison-table--three td:first-child {
  width: 40%;
}

.article-page .comparison-table--three th:nth-child(2),
.article-page .comparison-table--three td:nth-child(2),
.article-page .comparison-table--three th:nth-child(3),
.article-page .comparison-table--three td:nth-child(3) {
  width: 30%;
}
.article-page .comparison-table .summary-total { color: #15803d; }

/* ------------------------------
   Implementation & Timelines
   ------------------------------ */

.article-page .implementation-container {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.article-page .phase-section {
  border-radius: 1.25rem;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.article-page .timeline-week {
  background: rgba(248, 250, 252, 0.95);
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 1.5rem;
}

.article-page .timeline-week h3 {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--guide-text);
}

.article-page .timeline-week ul {
  list-style: disc inside;
  margin: 0.75rem 0 0;
  color: var(--guide-subtle-text);
}

.article-page .week-header {
  font-weight: 700;
  color: var(--guide-text);
  margin-bottom: 0.75rem;
}

.article-page .day-section {
  background: rgba(255, 255, 255, 0.96);
}

.article-page .day-section h4 {
  margin-top: 0;
  color: var(--guide-text);
}

/* ------------------------------
   FAQ & Accordion
   ------------------------------ */

.article-page .faq-item {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 1.65rem);
  margin: 1rem 0;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.article-page .faq-item:hover {
  box-shadow: 0 24px 48px rgba(102, 126, 234, 0.15);
}

.article-page .faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--guide-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.article-page .faq-question i.fa-chevron-down {
  transition: transform 0.2s ease;
}

.article-page details[open] > .faq-question i.fa-chevron-down {
  transform: rotate(180deg);
}

.article-page .faq-question::-webkit-details-marker { display: none; }

.article-page .faq-answer {
  margin-top: 0.75rem;
  color: var(--guide-subtle-text);
}

/* ------------------------------
   CTA Section
   ------------------------------ */

.article-page .cta-section {
  background: linear-gradient(135deg, var(--guide-primary) 0%, var(--guide-primary-dark) 100%);
  color: rgba(255, 255, 255, 0.95);
  padding: clamp(2.5rem, 5vw, 3.25rem);
  border-radius: 1.5rem;
  text-align: center;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0;
  box-shadow: 0 35px 70px rgba(102, 126, 234, 0.28);
}

.article-page .cta-section h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.1rem);
}

.article-page .cta-section p {
  margin: 0.85rem 0;
  color: rgba(255, 255, 255, 0.92);
}

.article-page .cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.4rem;
  border-radius: 0.9rem;
  background: #fff;
  color: var(--guide-primary);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-page .cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
}

/* ------------------------------
   Animations & Effects
   ------------------------------ */

.article-page .card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-page .card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(102, 126, 234, 0.24);
}

/* ------------------------------
   Utility Overrides inside articles
   ------------------------------ */

.article-page p[class*="text-gray"],
.article-page li[class*="text-gray"],
.article-page span[class*="text-gray"],
.article-page div[class*="text-gray"],
.article-page a[class*="text-gray"] {
  color: var(--guide-subtle-text) !important;
}

html.dark .article-page p[class*="dark:text"],
html.dark .article-page li[class*="dark:text"],
html.dark .article-page span[class*="dark:text"],
html.dark .article-page div[class*="dark:text"],
html.dark .article-page a[class*="dark:text"] {
  color: rgba(226, 232, 240, 0.9) !important;
}

.article-page [class*="bg-gray-50"],
.article-page [class*="bg-white"],
.article-page [class~="bg-gray-100"] {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

html.dark .article-page [class*="bg-gray-50"],
html.dark .article-page [class*="bg-white"],
html.dark .article-page [class~="bg-gray-100"] {
  background: rgba(17, 24, 39, 0.78) !important;
  border-color: rgba(129, 140, 248, 0.28) !important;
  box-shadow: 0 22px 40px rgba(2, 6, 23, 0.45);
}

.article-page .vendor-disclosure {
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.25), rgba(248, 113, 113, 0.22));
  border-left: 4px solid #f59e0b;
  border-radius: 0.9rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.article-page .glass-effect {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
}

.article-page .fade-in {
  animation: guideFadeIn 0.8s ease-in both;
}

.article-page .slide-in-left {
  animation: guideSlideInLeft 0.8s ease-out both;
}

.article-page .slide-in-right {
  animation: guideSlideInRight 0.8s ease-out both;
}

@keyframes guideFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes guideSlideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes guideSlideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------------
   Dark Mode Overrides
   ------------------------------ */

html.dark {
  --guide-surface: rgba(17, 24, 39, 0.88);
  --guide-border: rgba(129, 140, 248, 0.32);
  --guide-shadow: 0 32px 60px rgba(2, 6, 23, 0.55);
  --guide-text: #f3f4f6;
  --guide-subtle-text: rgba(226, 232, 240, 0.88);
  --guide-muted: rgba(17, 24, 39, 0.78);
}

html.dark .article-page .guide-container::after {
  background: radial-gradient(circle at top, rgba(129, 140, 248, 0.08), transparent 60%);
}

html.dark .article-page .toc,
html.dark .article-page .toc details,
html.dark .article-page .phase-section,
html.dark .article-page .timeline-week,
html.dark .article-page .step-card,
html.dark .article-page .implementation-phase,
html.dark .article-page .phase-card,
html.dark .article-page .best-practice-card,
html.dark .article-page .challenge-card,
html.dark .article-page .week-card,
html.dark .article-page .day-section {
  background: rgba(17, 24, 39, 0.78);
  border-color: rgba(129, 140, 248, 0.28);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.5);
}

html.dark .article-page .article-card {
  background: rgba(17, 24, 39, 0.78);
  border-color: rgba(129, 140, 248, 0.28);
  box-shadow: 0 26px 48px rgba(2, 6, 23, 0.5);
}

html.dark .article-page .article-card__cta {
  color: #c4b5fd;
}

html.dark .article-page .step-number,
html.dark .article-page .phase-number {
  color: #ede9fe;
}

html.dark .article-page .highlight-box,
html.dark .article-page .info-box,
html.dark .article-page .note-box {
  background: rgba(30, 27, 75, 0.45);
  border-left-color: #a78bfa;
  color: rgba(226, 232, 240, 0.92);
}

html.dark .article-page .warning-box,
html.dark .article-page .mistake-item,
html.dark .article-page .danger-box {
  background: rgba(127, 29, 29, 0.28);
  border-left-color: #fca5a5;
  color: rgba(254, 226, 226, 0.9);
}

html.dark .article-page .mistake-item h4 {
  color: #fecaca;
}

html.dark .article-page .stat-card {
  background: rgba(17, 24, 39, 0.78);
  border-color: rgba(129, 140, 248, 0.32);
}

html.dark .article-page .stat-number {
  color: #c4b5fd;
}

html.dark .article-page .roi-table th,
html.dark .article-page .roi-table td,
html.dark .article-page .comparison-table th,
html.dark .article-page .comparison-table td {
  background: rgba(17, 24, 39, 0.78);
  border-color: rgba(75, 85, 99, 0.55);
}

html.dark .article-page .comparison-table tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.75);
}

html.dark .article-page .comparison-table .summary-row {
  background: rgba(30, 41, 59, 0.82);
}

html.dark .article-page .cta-button {
  background: rgba(17, 24, 39, 0.9);
  color: #c4b5fd;
}

html.dark .article-page .cta-button:hover {
  background: rgba(55, 65, 81, 0.9);
}

html.dark .article-page blockquote {
  background: rgba(17, 24, 39, 0.78);
  border-left-color: #a78bfa;
}

html.dark .article-page pre {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

html.dark .article-page code {
  background: rgba(30, 41, 59, 0.85);
  color: #e5e7eb;
}

html.dark .article-page .toc a,
html.dark .article-page .inline-link,
html.dark .article-page .link-list a {
  color: #c4b5fd;
}

html.dark .article-page .faq-question { color: #f3f4f6; }
html.dark .article-page .faq-answer { color: rgba(226, 232, 240, 0.88); }

html.dark .article-page .card-hover { background: rgba(17, 24, 39, 0.78); }
html.dark .article-page .card-hover:hover {
  box-shadow: 0 26px 52px rgba(2, 6, 23, 0.5);
}

/* ------------------------------
   Responsive Tweaks
   ------------------------------ */

@media (min-width: 1280px) {
  .article-page .article-wrapper {
    max-width: 1200px;
  }
}
