:root {
    --bs-primary: #0d6efd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
}

.content h2, .article-prose h2 { margin-top: 2rem; }
.content h3, .article-prose h3 { margin-top: 1.5rem; }
.content p,  .article-prose p  { line-height: 1.7; }
.content ul, .article-prose ul { line-height: 1.7; }

/* Markdown tables (rendered by Parsedown without Bootstrap classes) */
.content table,
.article-prose table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.content table th,
.content table td,
.article-prose table th,
.article-prose table td {
    padding: 0.6rem 0.75rem;
    border: 1px solid #dee2e6;
    vertical-align: top;
    text-align: left;
    white-space: normal;
}
.content table thead th,
.article-prose table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}
.content table tbody tr:nth-of-type(odd),
.article-prose table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.025);
}
.content table tbody tr:hover,
.article-prose table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}
@media (max-width: 768px) {
    .content table,
    .article-prose table { font-size: 0.85rem; }
    .content table th, .content table td,
    .article-prose table th, .article-prose table td { min-width: 110px; }
}

/* Verbatim source quotes — highlighted callout (Wirecutter/NYT style) */
.article-prose blockquote {
    background: #fff8dc;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 0.375rem 0.375rem 0;
    font-style: italic;
    color: #5a4a00;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.article-prose blockquote p { margin: 0; line-height: 1.6; }
.article-prose blockquote p + p { margin-top: 0.5rem; }
/* Adjacent blockquotes — visually group as one callout */
.article-prose blockquote + blockquote {
    margin-top: -0.5rem;
    border-top: 1px dashed rgba(255, 193, 7, 0.5);
    border-radius: 0;
}

/* Markdown-rendered product images inside article body */
.article-prose img {
    max-width: 360px;
    width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.article-prose figure img { margin: 0 auto; }
@media (max-width: 576px) {
    .article-prose img { max-width: 100%; }
}

.navbar-brand .text-primary { color: #0d6efd !important; }

/* WCAG AA contrast: darken default Bootstrap link blue on .bg-light surfaces */
.bg-light a,
nav.breadcrumb a,
.breadcrumb a { color: #0a58ca; }  /* 5.66:1 on #f8f9fa (was 4.26) */

/* WCAG AA contrast: inline <code> elements in article body */
.article-prose code,
.content code { color: #ad2768; background-color: #f9f9f9; }  /* 5.30:1 (was 4.27) */

/* Footer a11y fixes — Lighthouse flagged contrast + target-size */
footer.bg-dark .footer-meta {
    color: #c1c5c9;  /* WCAG AA: 8.86 on #212529 (was text-light-emphasis 1.88) */
}
footer.bg-dark .footer-heading {
    color: #e9ecef;  /* clear hierarchy without h5/h6 jump */
    letter-spacing: 0.03em;
}
/* Touch targets ≥24×24 — Lighthouse required */
footer.bg-dark ul.list-unstyled li { padding: 0.35rem 0; }
footer.bg-dark ul.list-unstyled li a { display: inline-block; min-height: 24px; padding: 2px 0; }
/* Make footer bottom row text WCAG-AA on dark */
footer.bg-dark .small.text-light-emphasis,
footer.bg-dark .small span:not(.badge) { color: #c1c5c9 !important; }
