.template-guide-page {
    --guide-ink: var(--pe-text);
    --guide-muted: var(--pe-text-muted);
    --guide-surface: var(--pe-surface-strong);
    --guide-surface-tint: linear-gradient(135deg, var(--marketing-band), var(--pe-surface-strong));
    --guide-card: var(--pe-card-bg);
    --guide-card-soft: var(--pe-card-bg-soft);
    --guide-border: var(--pe-border);
    --guide-card-border: var(--pe-card-border);
    --guide-accent: var(--pe-green-bright);
    --guide-media-bg: var(--marketing-image-bg);
    color: var(--pe-text-body);
    padding: 28px 24px 0;
}

.template-guide-shell {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.template-guide-hero,
.template-guide-section,
.template-guide-related {
    background: var(--guide-surface);
    border: 1px solid var(--guide-border);
    border-radius: 8px;
    box-shadow: var(--pe-shadow);
}

.template-guide-section:nth-of-type(even),
.template-guide-related {
    background: var(--guide-surface-tint);
}

.template-guide-hero {
    padding: clamp(2rem, 5vw, 4rem);
    text-align: center;
}

.template-guide-eyebrow {
    color: var(--guide-accent);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.template-guide-hero h1,
.template-guide-section h2,
.template-guide-related h2 {
    color: var(--guide-ink);
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0;
    margin: 0;
}

.template-guide-hero h1 {
    font-size: clamp(2.15rem, 4.2vw, 3.45rem);
    line-height: 1.02;
}

.template-guide-hero > p {
    color: var(--guide-muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    margin: 1.25rem auto 0;
    max-width: 780px;
}

.template-guide-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.template-guide-button {
    align-items: center;
    background: var(--pe-green);
    border: 1px solid var(--pe-green);
    border-radius: 8px;
    color: var(--pe-control-on-accent);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 800;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.template-guide-button:hover,
.template-guide-button:focus-visible {
    background: var(--pe-green-bright);
    border-color: var(--pe-green-bright);
    box-shadow: 0 12px 24px rgba(8, 127, 78, 0.18);
    color: var(--pe-control-on-accent);
    transform: translateY(-2px);
}

.template-guide-button--secondary {
    background: var(--pe-control-bg);
    border-color: var(--pe-control-border-active);
    color: var(--guide-accent);
}

.template-guide-button--secondary:hover,
.template-guide-button--secondary:focus-visible {
    background: var(--pe-control-bg-active);
    color: var(--guide-accent);
}

.legacy-marketing-content a.template-guide-button:not(.template-guide-button--secondary),
.legacy-marketing-content a.template-guide-button:not(.template-guide-button--secondary):hover,
.legacy-marketing-content a.template-guide-button:not(.template-guide-button--secondary):focus-visible,
.legacy-marketing-content a.template-guide-button:not(.template-guide-button--secondary) i {
    color: #fff;
}

.template-guide-overview,
.template-guide-related-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.75rem;
    text-align: left;
}

.template-guide-overview-card,
.template-guide-related-card,
.template-guide-step {
    background: var(--guide-card);
    border: 1px solid var(--guide-card-border);
    border-radius: 8px;
}

.template-guide-overview-card {
    align-content: start;
    display: grid;
    gap: 0.45rem;
    padding: 1.1rem;
}

.template-guide-overview-card i {
    align-items: center;
    background: var(--pe-control-bg);
    border: 1px solid var(--pe-control-border-active);
    border-radius: 8px;
    color: var(--guide-accent);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    margin: 0 auto 0.35rem;
    width: 38px;
}

.template-guide-overview-card h2 {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.45rem;
    text-align: center;
}

.template-guide-overview-card p,
.template-guide-section p,
.template-guide-section li,
.template-guide-related p,
.template-guide-related-card span {
    color: var(--guide-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.template-guide-section,
.template-guide-related {
    padding: clamp(1.4rem, 4vw, 2.5rem);
}

.template-guide-section-heading {
    align-items: start;
    column-gap: 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
}

.template-guide-section-number,
.template-guide-step-number {
    align-items: center;
    background: var(--pe-green);
    border-radius: 999px;
    color: var(--pe-control-on-accent);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.template-guide-section-number {
    margin-top: 0.18rem;
}

.template-guide-section h2,
.template-guide-related h2 {
    font-size: clamp(1.85rem, 2.65vw, 2.35rem);
    line-height: 1.05;
}

.template-guide-section-intro {
    grid-column: 1 / -1;
    margin: 0.9rem 0 0;
}

.template-guide-video-frame {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: var(--guide-media-bg);
    border: 1px solid var(--guide-card-border);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    overflow: hidden;
    padding: 1.5rem;
}

.template-guide-video-placeholder {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 480px;
    text-align: center;
}

.template-guide-video-placeholder i {
    color: var(--guide-accent);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
}

.template-guide-video-placeholder strong {
    color: var(--guide-ink);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.template-guide-video-placeholder p {
    margin: 0;
}

.template-guide-video-placeholder.is-ready {
    height: 100%;
    max-width: none;
    width: 100%;
}

.template-guide-video-placeholder.is-ready iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.template-guide-before-list,
.template-guide-checklist {
    margin: 1.4rem 0 0;
    padding: 0;
}

.template-guide-checklist {
    list-style: none;
}

.template-guide-before-list {
    padding-left: 1.2rem;
}

.template-guide-before-list li + li,
.template-guide-checklist li + li {
    margin-top: 0.7rem;
}

.template-guide-checklist li {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.template-guide-checklist i {
    color: var(--guide-accent);
    margin-top: 0.25rem;
}

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

.template-guide-step {
    align-content: start;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 1.2rem;
}

.template-guide-step h3 {
    color: var(--guide-ink);
    font-size: 1.08rem;
    margin: 0;
}

.template-guide-step p {
    grid-column: 2;
    margin: 0;
}

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

.template-guide-media-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.template-guide-figure {
    background: var(--guide-card);
    border: 1px solid var(--guide-card-border);
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
}

.template-guide-screenshot-placeholder {
    align-items: center;
    aspect-ratio: 16 / 10;
    background: var(--guide-media-bg);
    color: var(--guide-muted);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
}

.template-guide-screenshot-placeholder i {
    color: var(--guide-accent);
    font-size: 2rem;
}

.template-guide-figure img {
    background: var(--guide-media-bg);
    display: block;
    height: auto;
    width: 100%;
}

.template-guide-figure figcaption {
    color: var(--guide-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    padding: 0.85rem 1rem 1rem;
}

.template-guide-callout {
    background: linear-gradient(135deg, var(--guide-card-soft), var(--guide-card));
    border: 1px solid var(--guide-card-border);
    border-radius: 8px;
    margin-top: 1.25rem;
    padding: 1rem;
}

.template-guide-callout strong {
    color: var(--guide-ink);
    display: block;
    margin-bottom: 0.35rem;
}

.template-guide-callout p {
    margin: 0;
}

.template-guide-related {
    text-align: center;
}

.template-guide-related > p {
    margin: 0.9rem auto 0;
    max-width: 720px;
}

.template-guide-related-card {
    color: inherit;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    text-align: left;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.template-guide-related-card:hover,
.template-guide-related-card:focus-visible {
    border-color: var(--pe-control-border-active);
    transform: translateY(-2px);
}

.template-guide-related-card strong {
    color: var(--guide-ink);
}

.template-guide-footer-note {
    color: var(--guide-muted);
    margin: 0 auto;
    max-width: 780px;
    text-align: center;
}

.template-guide-footer-note a,
.template-guide-callout a {
    color: var(--guide-accent);
    font-weight: 800;
}

@media (max-width: 900px) {
    .template-guide-overview,
    .template-guide-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .template-guide-steps,
    .template-guide-media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .template-guide-page {
        padding: 16px 12px 0;
    }

    .template-guide-hero,
    .template-guide-section,
    .template-guide-related {
        padding: 1.25rem;
    }

    .template-guide-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .template-guide-button {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .template-guide-button,
    .template-guide-related-card {
        transition: none;
    }
}
