/* A post uses the same article shell as an episode, so reuse that layout
   rather than restating it, then add the how-to specific pieces below. */
@import url('episode.css');

/* ---------- Intro ---------- */
.post-intro {
    font-size: 1.125rem;
}

.post-intro>p:first-child {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-mid);
}

/* ---------- Tables (key dates) ---------- */
.episode-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 2.5rem;
    font-size: 0.9375rem;
}

.episode-body th,
.episode-body td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.episode-body th {
    font-weight: 600;
    color: var(--color-text-darker);
    border-bottom-width: 2px;
}

.episode-body td:first-child {
    white-space: nowrap;
    font-weight: 500;
    color: var(--color-text-darker);
}

/* ---------- In this guide ---------- */
.post-toc {
    background-color: var(--color-bg-lighter);
    border-left: 3px solid var(--color-bg-community-cta);
    padding: 1.5rem 1.75rem;
    margin: 0 0 3rem;
}

.post-toc-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin: 0 0 0.75rem;
}

.post-toc ol {
    margin: 0;
    padding-left: 1.25rem;
}

.post-toc li {
    margin-bottom: 0.4rem;
}

.post-toc li:last-child {
    margin-bottom: 0;
}

.post-toc a {
    color: var(--color-text-dark);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.post-toc a:hover {
    color: var(--color-text-story-hover);
    border-bottom-color: currentColor;
}

/* ---------- How-to sections ---------- */
.post-howto {
    padding-top: 2.5rem;
    margin-bottom: 3.5rem;
    border-top: 1px solid #eee;
    scroll-margin-top: 2rem;
}

.post-howto:first-of-type {
    border-top: none;
    padding-top: 0;
}

.episode-body .post-howto-title {
    margin-top: 0;
}

/* ---------- Demo video ---------- */
.post-howto-video {
    margin: 2rem 0 1.5rem;
}

.post-howto-video video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background-color: #14181f;
}

.post-howto-video figcaption {
    margin-top: 0.625rem;
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

/* ---------- Official link ---------- */
.post-howto-link {
    margin-bottom: 0;
}

.post-howto-link .btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    background-color: var(--color-bg-community-cta);
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.post-howto-link .btn:hover {
    background-color: var(--color-bg-community-cta-hover);
}

/* ---------- Closing ---------- */
.post-closing {
    padding-top: 2.5rem;
    border-top: 1px solid #eee;
}

/* ---------- Inline links in body copy ---------- */
/* The site has no generic content-link rule, so without this the ~25 inline
   links to sos.mn.gov render as default browser blue. */
.episode-body a:not(.btn) {
    color: var(--color-bg-community-cta);
    text-decoration: none;
    border-bottom: 1px solid rgba(155, 86, 86, 0.35);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.episode-body a:not(.btn):hover {
    color: var(--color-bg-community-cta-hover);
    border-bottom-color: currentColor;
}

.episode-body a:not(.btn):focus-visible {
    outline: 2px solid var(--color-bg-community-cta);
    outline-offset: 2px;
}

/* ---------- Playlist promo ---------- */
/* Brand palette from the logomark: rust #9B5656, tan #D6A380,
   sage #7C9999, brown #6D5050. */
.post-playlist {
    margin: 3.5rem 0;
    padding: 2rem 2.25rem 2.25rem;
    background-color: #faf6f1;
    border-top: 5px solid #9B5656;
}

.post-playlist-kicker {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7C9999;
}

.episode-body .post-playlist-title {
    margin: 0 0 0.9rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: #9B5656;
}

.post-playlist-body {
    color: #6D5050;
}

.post-playlist-body > *:last-child {
    margin-bottom: 0;
}

.post-playlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #9B5656;
    color: #fff;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: none;
    transition: background-color 0.2s ease;
}

/* beat the generic body-link rule above */
.episode-body a.post-playlist-btn {
    color: #fff;
    border-bottom: none;
}

.episode-body a.post-playlist-btn:hover {
    background-color: #8a4a4a;
    color: #fff;
}

.post-playlist-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .post-playlist {
        padding: 1.5rem 1.25rem 1.75rem;
    }
}
