/* ── Guide Listing ─────────────────────────── */

.guide-listing {
  padding: 8rem 0 5rem;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.guide-card {
  display: block;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  position: relative;
}

.guide-card:hover {
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.08);
  border-color: rgba(13, 148, 136, 0.3);
  transform: translateY(-2px);
}

.guide-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-wash);
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(13, 148, 136, 0.15);
}

.guide-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.guide-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Guide Article Layout ─────────────────── */

.guide-article {
  padding: 8rem 0 4rem;
}

.guide-article .container {
  max-width: 720px;
}

.guide-breadcrumb {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.guide-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.guide-breadcrumb a:hover {
  text-decoration: underline;
}

.guide-article h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.guide-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.guide-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.guide-article h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

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

.guide-article ul,
.guide-article ol {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.guide-article li {
  margin-bottom: 0.375rem;
}

.guide-article em {
  font-style: italic;
}

.guide-article strong {
  font-weight: 600;
  color: var(--foreground);
}

.guide-article code {
  font-family: 'DM Sans', monospace;
  font-size: 0.875rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* ── APA Example Blocks ───────────────────── */

.apa-example {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.apa-example p {
  color: var(--foreground);
  margin-bottom: 0;
}

.apa-example .apa-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

/* ── Callout Boxes ────────────────────────── */

.guide-callout {
  background: var(--primary-wash);
  border: 1px solid rgba(13, 148, 136, 0.15);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.guide-callout p {
  color: var(--foreground);
  margin-bottom: 0;
}

.guide-callout strong {
  color: var(--primary);
}

/* ── Guide CTA ────────────────────────────── */

.guide-cta {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.guide-cta p {
  color: var(--foreground);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.guide-cta .btn {
  font-size: 0.875rem;
}

/* ── Comparison Table ─────────────────────── */

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}

.guide-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
}

.guide-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Flowchart ────────────────────────────── */

.flowchart {
  margin: 2rem 0;
}

.flowchart-node {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  text-align: center;
  transition: all 0.2s;
}

.flowchart-question {
  background: var(--primary-wash);
  border-color: rgba(13, 148, 136, 0.2);
}

.flowchart-question h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--foreground);
}

.flowchart-question p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.flowchart-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.flowchart-btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--primary);
  border-radius: 2rem;
  background: var(--bg);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s;
}

.flowchart-btn:hover {
  background: var(--primary);
  color: white;
}

.flowchart-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.flowchart-arrow {
  text-align: center;
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.flowchart-result {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.flowchart-result h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: #166534;
}

.flowchart-result p {
  font-size: 0.875rem;
  color: #15803D;
  margin-bottom: 0;
}

.flowchart-reset {
  display: inline-block;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 0.75rem;
  text-decoration: underline;
}

.flowchart [hidden] {
  display: none;
}

/* ── Responsive ───────────────────────────── */

@media (max-width: 768px) {
  .guide-listing {
    padding: 6.5rem 0 3.5rem;
  }

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

  .guide-article {
    padding: 6.5rem 0 3rem;
  }

  .guide-article h1 {
    font-size: 1.75rem;
  }

  .guide-article h2 {
    font-size: 1.25rem;
  }

  .flowchart-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-card:hover {
    transform: none;
  }
}
