/* insights.css — Our Thoughts: the list of articles and each article page.
   The list's cards are the design system's .st-card (marketing_style.css),
   opened out so the picture runs to the card's edges above the words. */

.insights-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.insights-card:hover,
.insights-card:focus-visible {
    box-shadow: 0 12px 32px rgba(10, 37, 64, 0.14);
    transform: translateY(-2px);
}

.insights-card:focus-visible {
    outline: 3px solid var(--st-wine);
    outline-offset: 3px;
}

.insights-card:hover h2,
.insights-card:focus-visible h2 {
    color: var(--st-wine);
}

.insights-card-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.insights-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.5rem;
}

.insights-card-body .st-h3 {
    margin-bottom: 0.75rem;
}

.insights-card-body .st-note {
    margin-top: auto;
}

/* The hero and the list share one brick wall, so the list starts close under the hero. */
.st-section.insights-list {
    padding-top: 0;
}

@media (prefers-reduced-motion: reduce) {
    .insights-card { transition: none; }
    .insights-card:hover, .insights-card:focus-visible { transform: none; }
}

/* ── Detail page ─────────────────────────────────────────────────────
   .insights-post-body wraps the sanitised body HTML (h2/h3/p/strong/em/
   ul/ol/li/a per InsightPost's own allowlist, marketing/models.py). */

.insights-post-hero {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.insights-post-body h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.insights-post-body h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.insights-post-body p {
    color: var(--main-text);
    margin-bottom: 1.25rem;
}

.insights-post-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

.insights-post-body a:hover {
    color: var(--primary-color);
}

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

/* The link back to the list and the byline under the title. */
.insights-post-back {
    font-size: 0.875rem;
    color: var(--st-ink-muted);
    text-decoration: none;
}

.insights-post-back:hover,
.insights-post-back:focus-visible {
    color: var(--st-wine);
    text-decoration: underline;
}

.insights-post-byline {
    font-size: 0.875rem;
    color: var(--st-ink-muted);
    margin-bottom: 1.5rem;
}

.insights-post-byline a {
    color: inherit;
    text-decoration: underline;
}

.insights-post-byline a:hover,
.insights-post-byline a:focus-visible {
    color: var(--st-wine);
}

/* Tables in the body carry no attributes, so every rule is here. A table wider than the
   column scrolls inside itself rather than pushing the page sideways on a phone. */
.insights-post-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.insights-post-body th,
.insights-post-body td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(10, 37, 64, 0.15);
    text-align: left;
    vertical-align: top;
}

.insights-post-body th {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom-width: 2px;
}
