/* =========================================================
   Article page styles - layered on top of base styles.css
   ========================================================= */

.article-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb a {
  color: var(--purple-700);
  transition: opacity 0.15s ease;
}
.breadcrumb a:hover { opacity: 0.7; }

.breadcrumb span { color: var(--text-soft); }

.article-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.article-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.article h1 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-lede {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta a {
  color: var(--purple-700);
  font-weight: 600;
}

/* Quick answer / TL;DR box */
.quick-answer {
  background: var(--purple-50);
  border-left: 4px solid var(--purple-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.quick-answer h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple-700);
  margin-bottom: 0.5rem;
}

.quick-answer p {
  font-size: 1.02rem;
  color: var(--text);
  margin: 0;
}

/* Table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}

.toc li {
  counter-increment: toc-counter;
  margin-bottom: 0.5rem;
  padding-left: 1.75rem;
  position: relative;
  font-size: 0.95rem;
}

.toc li::before {
  content: counter(toc-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--purple-100);
  color: var(--purple-700);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toc a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.15s ease;
}
.toc a:hover { color: var(--purple-700); }

/* Article body content */
.article section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5rem;
}

.article h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  margin-top: 0;
  color: var(--text);
}

.article h3 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text);
}

.article p {
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.article p a:not(.btn) {
  color: var(--purple-700);
  text-decoration: underline;
  text-decoration-color: var(--purple-200);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.article p a:not(.btn):hover { text-decoration-color: var(--purple-600); }

/* Buttons inside articles - override article link styling */
.article .btn,
.article p a.btn,
.article a.btn {
  text-decoration: none !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  background: var(--purple-600);
  border: none;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.15), 0 6px 16px rgba(124, 58, 237, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  margin-top: 0.25rem;
}
.article .btn:hover,
.article p a.btn:hover,
.article a.btn:hover {
  background: var(--purple-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.2), 0 8px 24px rgba(124, 58, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
}
.article .btn:active {
  transform: translateY(0);
}

.article ul, .article ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article li {
  font-size: 1.04rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.article li::marker { color: var(--purple-500); }

.article code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--purple-50);
  color: var(--purple-700);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--purple-100);
}

.article strong { color: var(--text); font-weight: 700; }

.numbered-list {
  counter-reset: step-counter;
  list-style: none !important;
  padding-left: 0 !important;
}

.numbered-list li {
  counter-increment: step-counter;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1rem;
}

.numbered-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--purple-600);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Callout boxes */
.callout {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  margin: 1.75rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.callout-purple {
  background: var(--purple-50);
  border-color: var(--purple-200);
  border-left: 4px solid var(--purple-600);
}

.callout strong { color: var(--purple-700); }

/* FAQ */
.faq-item {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item:first-of-type { border-top: none; padding-top: 0.5rem; }

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* Related articles */
.related-articles {
  margin-top: 3rem;
}

.related-list {
  list-style: none !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.related-list li { padding: 0; margin: 0; }

.related-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: all 0.2s ease;
  height: 100%;
  text-decoration: none !important;
}

.related-list a:hover {
  border-color: var(--purple-200);
  background: var(--purple-50);
  transform: translateY(-2px);
}

.related-list strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.related-list span {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* CTA at bottom */
.cta-block {
  background: linear-gradient(135deg, var(--purple-50) 0%, #fff 100%);
  border: 1px solid var(--purple-200);
  border-radius: var(--radius);
  padding: 2rem 2rem 2rem;
  margin-top: 3rem;
  text-align: center;
}

.cta-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.cta-block p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.cta-block .btn {
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
}

@media (max-width: 640px) {
  .article-main { padding: 1.25rem 1rem 3rem; }
  .related-list { grid-template-columns: 1fr; }
  .cta-block { padding: 1.5rem 1.25rem; }
  .toc { padding: 1rem 1.25rem; }
}

/* =========================================================
   Contact form styles
   ========================================================= */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

.contact-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.25rem;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  margin-top: 0.5rem;
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.form-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.form-note a {
  color: var(--purple-700);
  text-decoration: underline;
  text-decoration-color: var(--purple-200);
  text-underline-offset: 2px;
}

.form-success {
  background: var(--green-50);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.form-success h3 {
  color: var(--green-700);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.form-success p {
  color: var(--text);
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .contact-form { padding: 1.25rem; }
}

/* =========================================================
   Comparison table
   ========================================================= */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
  background: var(--surface);
}

.comparison-table thead { background: var(--purple-50); }

.comparison-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--purple-700);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.comparison-table td:first-child {
  width: 30%;
  background: var(--bg);
  font-weight: 500;
  color: var(--text);
}

.comparison-table tr:last-child td { border-bottom: none; }

.comparison-table code {
  background: var(--purple-50);
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .comparison-table {
    font-size: 0.88rem;
  }
  .comparison-table th, .comparison-table td {
    padding: 0.65rem 0.75rem;
  }
}
