/* Link-AI Guides - Shared Styles */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --success-color: #059669;
  --warning-color: #d97706;
  --error-color: #dc2626;
  --code-bg: #f1f5f9;
  --code-border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 800px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

/* ── Layout ─────────────────────────────────────────── */
.site-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-primary);
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0,0,0,0.06);
}

/* ── Header / Nav ───────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.site-logo span { color: var(--accent-color); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.nav-link:hover {
  background: var(--accent-light);
  color: var(--accent-color);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-color);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1.5px solid var(--accent-color);
  transition: all 0.15s;
}

.btn-outline:hover {
  background: var(--accent-light);
}

/* ── Hero ───────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #f8faff 0%, #eff6ff 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 56px 48px 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

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

.breadcrumb a:hover { color: var(--accent-color); }

.breadcrumb-sep { color: #cbd5e1; }

.page-hero h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.page-hero .page-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* ── Article Content ─────────────────────────────────── */
.article-content {
  padding: 40px 48px 56px;
}

.article-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  letter-spacing: -0.3px;
}

.article-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 12px;
}

.article-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15.5px;
}

.article-content ul, .article-content ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  font-size: 15.5px;
}

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

.article-content a:hover {
  text-decoration-color: var(--accent-color);
}

/* ── AI Summary Box ─────────────────────────────────── */
.ai-summary-box {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.ai-summary-box h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #92400e;
  margin-top: 0 !important;
  margin-bottom: 10px;
}

.ai-summary-box p {
  color: #78350f;
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 0;
}

/* ── Direct Answer Box ───────────────────────────────── */
.direct-answer-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.direct-answer-box h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-color);
  margin-top: 0 !important;
  margin-bottom: 10px;
}

.direct-answer-box p {
  color: #1e3a5f;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 0;
}

/* ── Warning / Note Boxes ────────────────────────────── */
.context-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.context-box.warning {
  background: #fef2f2;
  border-color: #fecaca;
}

.context-box.info {
  background: var(--accent-light);
  border-color: #bfdbfe;
}

.context-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.context-box p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ── Code Blocks ─────────────────────────────────────── */
pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.65;
  font-family: var(--font-mono);
  border: 1px solid #1e293b;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: #be123c;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.code-label .lang-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-sans);
}

.copy-btn {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: #334155;
  color: #e2e8f0;
}

/* ── Comparison Tables ────────────────────────────────── */
.compare-table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.compare-table tr:hover td {
  background: #f8fafc;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.compare-table .check { color: var(--success-color); }
.compare-table .warn { color: var(--warning-color); }
.compare-table .fail { color: var(--error-color); }

/* ── CTA Module ──────────────────────────────────────── */
.inline-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 2px solid #bfdbfe;
  padding-bottom: 1px;
  transition: all 0.15s;
}

.inline-cta:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-color);
}

.cta-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #1a2a4a 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.cta-section h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.cta-section p {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 24px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta-buttons .btn-primary {
  background: #fff;
  color: var(--accent-color);
  font-size: 15px;
  padding: 12px 24px;
}

.cta-buttons .btn-primary:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cta-buttons .btn-outline {
  border-color: #64748b;
  color: #94a3b8;
  background: transparent;
  font-size: 15px;
  padding: 12px 24px;
}

.cta-buttons .btn-outline:hover {
  border-color: #94a3b8;
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.cta-base-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #94a3b8;
  margin-top: 12px;
}

.cta-base-url code {
  background: none;
  color: #e2e8f0;
  padding: 0;
  font-size: inherit;
}

.next-steps-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px 0;
}

.next-steps-section h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.next-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.next-step-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-decoration: none;
  transition: all 0.15s;
  display: block;
}

.next-step-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.next-step-card .step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.next-step-card .step-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.next-step-card.primary {
  border-color: var(--accent-color);
  background: var(--accent-light);
}

.next-step-card.primary .step-title {
  color: var(--accent-color);
}

/* ── FAQ Section ─────────────────────────────────────── */
.faq-section {
  margin: 40px 0;
}

.faq-section h2 {
  margin-top: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

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

.faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-q::before {
  content: "Q";
  background: var(--accent-color);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.faq-a {
  font-size: 14.5px;
  color: var(--text-secondary);
  padding-left: 28px;
  line-height: 1.7;
}

/* ── Error Table ─────────────────────────────────────── */
.error-table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
}

.error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.error-table th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.error-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.error-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--error-color);
  background: #fef2f2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ── Client Table ────────────────────────────────────── */
.client-table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
}

.client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.client-table th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.client-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

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

/* ── Checklist ───────────────────────────────────────── */
.checklist {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14.5px;
  color: var(--text-secondary);
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.checklist li.done::before {
  background: var(--success-color);
  border-color: var(--success-color);
}

.checklist li .li-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.checklist li .li-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Related Links ────────────────────────────────────── */
.related-links {
  margin: 40px 0;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-links h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.related-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.related-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s;
}

.related-link-card:hover {
  background: var(--accent-light);
  border-color: var(--accent-color);
}

.related-link-icon {
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.related-link-text .rl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.related-link-text .rl-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-primary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover { color: var(--accent-color); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 0 16px; }
  .page-hero { padding: 32px 20px 28px; }
  .page-hero h1 { font-size: 22px; }
  .article-content { padding: 28px 20px 40px; }
  .article-content h2 { font-size: 17px; }
  .cta-section { padding: 24px 20px; }
  .next-steps-grid { grid-template-columns: 1fr; }
  .related-links-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 16px; text-align: center; padding: 24px 20px; }
  .cta-buttons { flex-direction: column; align-items: center; }
}
