/*
 * BuildVision — Shared guide detail page styles
 * Extracted from individual page <style> blocks for maintainability.
 * Linked after typography-tokens.css on all guide detail pages.
 *
 * Page-specific styles (comparison table variants, checklists, etc.)
 * remain in each page's <style> block as overrides.
 */

:root {
  --guide-max: 760px;
  --guide-p-gap: 18px;
  --guide-h2-gap: 48px;
  --guide-h2-first-top: 32px;
  --guide-h3-gap: 32px;
  --guide-head-body: 14px;
  --guide-hero-to-content: 36px;
  --guide-block-gap: 32px;
}

button, input, textarea, select { }
main p, main li, main td, main th, .answer-box { color: var(--neutral-700); }

main {
  flex: 1;
  max-width: var(--guide-max);
  margin: 0 auto;
  padding: var(--main-padding-top) var(--space-page-gutter) var(--main-padding-bottom);
  width: 100%;
  text-align: left;
}

.breadcrumb { margin-bottom: var(--guide-block-gap); }
.breadcrumb a:hover { color: var(--text-accent); }

main h1 {
  text-align: left;
  margin: 0 0 var(--guide-head-body) 0;
}

.dek {
  font-size: 18px;
  color: var(--neutral-700);
  margin: 0 0 var(--guide-head-body) 0;
  max-width: 65ch;
}

.byline {
  font-size: 13px;
  color: var(--neutral-400);
  margin: 0 0 var(--guide-hero-to-content) 0;
  max-width: 65ch;
}

.answer-box {
  background: white;
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
  margin: 0 0 var(--guide-block-gap) 0;
  font-size: 16px;
  line-height: 1.6;
  box-shadow: var(--shadow-card);
}

.answer-box p {
  max-width: 65ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.answer-box p + p {
  margin-top: var(--guide-p-gap);
}

main h2 {
  margin: var(--guide-h2-gap) 0 var(--guide-head-body) 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--neutral-100);
  text-align: left;
}

main h2:first-of-type {
  margin-top: var(--guide-h2-first-top);
}

main h3 {
  margin: var(--guide-h3-gap) 0 var(--guide-head-body) 0;
  text-align: left;
}

main > p:not(.dek):not(.byline),
.faq-answer p {
  font-size: 16px;
  max-width: 65ch;
  margin: 0 0 var(--guide-p-gap) 0;
  text-align: left;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

ul, ol {
  margin: 0 0 var(--guide-block-gap) 0;
  margin-left: 24px;
  max-width: 65ch;
  padding-left: 0;
}

main li {
  font-size: 16px;
  margin-bottom: 10px;
}

main li:last-child {
  margin-bottom: 0;
}

a { color: var(--text-link); text-decoration: underline; }
a:hover { color: var(--text-primary); }

.comparison-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  background: white;
  margin: var(--guide-block-gap) 0;
  font-size: 15px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--neutral-200);
}

.comparison-table th {
  background: var(--bv-blue-100);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

tbody tr {
  transition: background-color 0.15s var(--ease-spring);
}

tbody tr:hover {
  background-color: var(--neutral-50);
}

.faq-item {
  margin: 0 0 var(--guide-block-gap) 0;
  padding: 0;
}

.faq-item:last-of-type {
  margin-bottom: 0;
}

.faq-question {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--guide-head-body) 0;
  max-width: 65ch;
}

.faq-answer p {
  color: var(--neutral-700);
}

.faq-answer p + p {
  margin-top: var(--guide-p-gap);
}

.cta-box {
  margin: var(--guide-block-gap) 0;
  padding: var(--space-card-padding);
  border: none;
  border-radius: var(--radius-section);
  background: var(--gradient-hero);
  box-shadow: var(--shadow-hero-glow);
}

.cta-box p {
  font-size: 17px;
  color: var(--text-inverse);
  margin: 0;
  max-width: none;
}

.cta-box a {
  color: var(--green-100);
  text-decoration: underline;
  font-weight: 500;
}

.cta-box a:hover {
  opacity: 0.9;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .comparison-table { font-size: 13px; }
  .comparison-table th,
  .comparison-table td { padding: 10px 12px; }
}

.breadcrumb a {
  transition: color 0.15s var(--ease-spring), text-decoration-color 0.15s var(--ease-spring);
  text-decoration: underline;
  text-decoration-color: transparent;
}

.breadcrumb a:hover {
  color: var(--text-accent);
  text-decoration-color: currentColor;
  opacity: 1;
}

main a {
  transition: text-decoration-color 0.15s var(--ease-spring), opacity 0.15s var(--ease-spring);
  text-decoration: underline;
  text-decoration-color: transparent;
}

main a:hover {
  text-decoration-color: currentColor;
  opacity: 1;
}

.cta-box a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text-inverse) 45%, transparent);
}

.cta-box a:hover {
  text-decoration-color: var(--text-inverse);
  opacity: 1;
}

footer a {
  transition: color 0.15s var(--ease-spring);
}

@media (prefers-reduced-motion: reduce) {
  tbody tr {
    transition: none !important;
  }
  tbody tr:hover {
    background-color: transparent !important;
  }
  main a,
  .breadcrumb a,
  footer a,
  .nav-link,
  .nav-btn {
    transition: none !important;
  }
}
