/* Exceção ao alvo de 500 linhas: este arquivo mantém, em um único dono,
   a estrutura editorial responsiva e o tema claro da página de detalhe. */
@layer pages {
.guide-detail-frame > .page-shell {
    padding-top: 0;
}

.guide-detail-page {
    --guide-detail-layout-width: 1440px;
    --guide-detail-editorial-width: 1240px;
    --guide-detail-surface: #121018;
    --guide-detail-surface-raised: #18151f;
    --guide-detail-border: rgb(224 220 235 / 14%);
    --guide-detail-border-strong: rgb(224 220 235 / 24%);
    --guide-detail-text: #f2eff7;
    --guide-detail-muted: #aaa5b4;
    --guide-detail-accent: #38cbe8;
    --guide-detail-accent-contrast: #071116;
    --guide-detail-accent-soft: rgb(56 203 232 / 12%);
    --guide-detail-anchor-offset: 92px;
    margin-top: 0;
    padding: 1.5rem 0 3.5rem;
}

.guide-detail-page > .container {
    max-width: var(--guide-detail-layout-width);
    padding-inline: 0;
}

.guide-detail-page .guide-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    color: var(--guide-detail-muted);
    font-size: 0.875rem;
}

.guide-detail-page .guide-breadcrumb a {
    color: inherit;
    text-decoration-color: transparent;
    text-underline-offset: 0.22em;
}

.guide-detail-page .guide-breadcrumb a:hover {
    color: var(--guide-detail-text);
    text-decoration-color: var(--guide-detail-accent);
}

.guide-detail-page .guide-breadcrumb a:focus-visible,
.guide-detail-page .guide-toc .toc-list a:focus-visible,
.guide-detail-page .guide-mobile-toc summary:focus-visible,
.guide-detail-page .guide-next-link:focus-visible,
.guide-detail-page .guide-back-link:focus-visible {
    outline: 2px solid var(--guide-detail-accent);
    outline-offset: 4px;
    border-radius: 3px;
}

.guide-detail-page .guide-breadcrumb > :last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guide-detail-page .guide-hero {
    display: block;
    max-width: var(--guide-detail-layout-width);
    margin: 0 auto 2rem;
    padding: 1.75rem 0 2rem;
    border: 0;
    border-top: 1px solid var(--guide-detail-border-strong);
    border-bottom: 1px solid var(--guide-detail-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.guide-detail-page .guide-hero--with-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    align-items: end;
    gap: clamp(2rem, 5vw, 5rem);
}

.guide-detail-page .guide-hero-copy {
    display: block;
    padding: 0;
}

.guide-detail-page .guide-overline {
    display: block;
    margin: 0 0 1rem;
    color: var(--guide-detail-accent);
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.guide-detail-page .guide-hero-title {
    max-width: 30ch;
    margin: 0;
    color: var(--guide-detail-text);
    background: none;
    font-size: clamp(2.1rem, 4vw, 3.75rem);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.04;
    -webkit-text-fill-color: currentcolor;
}

.guide-detail-page .guide-hero--with-media .guide-hero-title {
    max-width: 28ch;
    font-size: clamp(2.1rem, 3.6vw, 3.5rem);
}

.guide-detail-page .guide-hero-subtitle {
    max-width: 66ch;
    margin: 1.35rem 0 0;
    color: var(--guide-detail-muted);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.62;
}

.guide-detail-page .guide-hero-media {
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    background: var(--guide-detail-surface);
}

.guide-detail-page .guide-hero-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: contain;
}

.guide-detail-page .guide-facts-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 1.75rem 0 0;
}

.guide-detail-page .guide-fact {
    min-width: 0;
    padding: 0 1.1rem;
    border: 0;
    border-left: 1px solid var(--guide-detail-border-strong);
    border-radius: 0;
    background: transparent;
}

.guide-detail-page .guide-fact:first-child {
    padding-left: 0;
    border-left: 0;
}

.guide-detail-page .guide-fact dt {
    margin: 0 0 0.22rem;
    color: var(--guide-detail-muted);
    font-size: 0.75rem;
}

.guide-detail-page .guide-fact dd {
    margin: 0;
    color: var(--guide-detail-text);
    font-size: 0.9rem;
    font-weight: 650;
}

.guide-detail-page .guide-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: clamp(2.5rem, 4vw, 4rem);
    max-width: var(--guide-detail-editorial-width);
    margin: 0 auto;
}

.guide-detail-page .guide-shell--without-toc {
    grid-template-columns: minmax(0, 1fr);
}

.guide-detail-page .guide-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
    min-width: 0;
    overflow: visible;
}

.guide-detail-page .guide-section-header {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 1.15rem;
}

.guide-detail-page .guide-section-header p,
.guide-detail-page .guide-toc > p {
    margin: 0;
    color: var(--guide-detail-accent);
    font-size: 0.82rem;
    font-weight: 650;
}

.guide-detail-page .guide-section-header h2,
.guide-detail-page .guide-toc > h2 {
    margin: 0;
    color: var(--guide-detail-text);
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.guide-detail-page .guide-steps-panel {
    padding: 0 0 1.5rem;
    border: 0;
    border-bottom: 1px solid var(--guide-detail-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.guide-detail-page .steps-grid {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: guide-step;
}

.guide-detail-page .step-card {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.9rem 0;
    border: 0;
    border-top: 1px solid var(--guide-detail-border);
    border-radius: 0;
    background: transparent;
}

.guide-detail-page .step-index {
    display: block;
    width: auto;
    height: auto;
    padding-top: 0.06rem;
    border-radius: 0;
    background: transparent;
    color: var(--guide-detail-accent);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.guide-detail-page .step-copy h3 {
    margin: 0 0 0.18rem;
    color: var(--guide-detail-text);
    font-size: 1rem;
    line-height: 1.35;
}

.guide-detail-page .step-copy p {
    margin: 0;
    color: var(--guide-detail-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.guide-detail-page .guide-article-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.guide-detail-page .guide-article-content {
    max-width: 72ch;
    color: var(--guide-detail-text);
    font-size: 1.05rem;
    overflow-wrap: break-word;
}

.guide-detail-page .guide-article-content > :first-child {
    margin-top: 0;
}

.guide-detail-page .guide-article-content img {
    max-width: 100%;
    height: auto;
}

.guide-detail-page .guide-article-content pre {
    max-width: 100%;
    overflow-x: auto;
}

.guide-detail-page .guide-article-content h2 {
    margin: 3.25rem 0 1.1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--guide-detail-border-strong);
    color: var(--guide-detail-text);
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    letter-spacing: -0.025em;
    line-height: 1.18;
    scroll-margin-top: var(--guide-detail-anchor-offset);
}

.guide-detail-page .guide-article-content h3,
.guide-detail-page .guide-article-content h4 {
    margin: 2.25rem 0 0.8rem;
    color: var(--guide-detail-text);
    line-height: 1.25;
    scroll-margin-top: var(--guide-detail-anchor-offset);
}

.guide-detail-page .guide-article-content p,
.guide-detail-page .guide-article-content li {
    color: rgb(242 239 247 / 88%);
    line-height: 1.72;
}

.guide-detail-page .guide-article-content p {
    margin: 0 0 1.15rem;
}

.guide-detail-page .guide-article-content li + li {
    margin-top: 0.38rem;
}

.guide-detail-page .guide-article-content a {
    color: var(--guide-detail-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

.guide-detail-page .guide-article-content blockquote {
    margin: 1.75rem 0;
    padding: 1rem 1.2rem;
    border-left: 2px solid var(--guide-detail-accent);
    background: var(--guide-detail-accent-soft);
    color: var(--guide-detail-text);
}

.guide-detail-page .guide-article-content table {
    display: block;
    width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.guide-detail-page .guide-article-content th,
.guide-detail-page .guide-article-content td {
    min-width: 9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--guide-detail-border);
    text-align: left;
    vertical-align: top;
}

.guide-detail-page .guide-article-content th {
    background: var(--guide-detail-surface-raised);
    color: var(--guide-detail-text);
    font-weight: 700;
}

.guide-detail-page .guide-sidebar {
    align-self: stretch;
    min-width: 0;
    overflow: visible;
}

.guide-detail-page .guide-sidebar[hidden] {
    display: none;
}

.guide-detail-page .guide-toc {
    position: sticky;
    top: calc(var(--guide-detail-anchor-offset) + 1rem);
    width: min(100%, 280px);
    max-height: calc(100vh - var(--guide-detail-anchor-offset) - 2rem);
    overflow-y: auto;
    padding: 0 0 0 1.15rem;
    border-left: 1px solid var(--guide-detail-border-strong);
}

.guide-detail-page .guide-toc > h2 {
    margin-top: 0.25rem;
    font-size: 1.15rem;
}

.guide-detail-page .toc-list {
    display: grid;
    gap: 0.15rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.guide-detail-page .toc-list a {
    display: block;
    padding: 0.48rem 0.65rem;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--guide-detail-muted);
    font-size: 0.875rem;
    line-height: 1.35;
    text-decoration: none;
}

.guide-detail-page .toc-list a:hover,
.guide-detail-page .toc-list a[aria-current='location'] {
    border-left-color: var(--guide-detail-accent);
    color: var(--guide-detail-text);
}

.guide-detail-page .guide-mobile-toc {
    display: none;
}

.guide-detail-page .guide-mobile-toc[hidden] {
    display: none;
}

.guide-detail-page .guide-end-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--guide-detail-border);
}

.guide-detail-page .guide-next-link,
.guide-detail-page .guide-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.guide-detail-page .guide-next-link {
    border: 1px solid var(--guide-detail-accent);
    background: var(--guide-detail-accent);
    color: var(--guide-detail-accent-contrast);
}

.guide-detail-page .guide-next-link:hover {
    border-color: var(--guide-detail-text);
    background: var(--guide-detail-text);
    color: var(--guide-detail-surface);
}

.guide-detail-page .guide-back-link {
    border: 1px solid var(--guide-detail-border-strong);
    background: transparent;
    color: var(--guide-detail-text);
}

.guide-detail-page .guide-back-link:hover {
    border-color: var(--guide-detail-accent);
    color: var(--guide-detail-accent);
}

@media (width <= 960px) {
    .guide-detail-page .guide-hero--with-media {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 2rem;
    }

    .guide-detail-page .guide-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-detail-page .guide-sidebar {
        display: none;
    }

    .guide-detail-page .guide-mobile-toc {
        display: block;
        max-width: 72ch;
        margin: -1rem 0 2.5rem;
        border-top: 1px solid var(--guide-detail-border);
        border-bottom: 1px solid var(--guide-detail-border);
    }

    .guide-detail-page .guide-mobile-toc summary {
        padding: 0.9rem 0;
        color: var(--guide-detail-text);
        cursor: pointer;
        font-weight: 650;
    }

    .guide-detail-page .guide-mobile-toc .toc-list {
        margin: 0 0 0.85rem;
    }
}

@media (width <= 720px) {
    .guide-detail-page {
        padding-top: 1.25rem;
    }

    .guide-detail-page .guide-breadcrumb {
        margin-bottom: 1.2rem;
    }

    .guide-detail-page .guide-hero,
    .guide-detail-page .guide-hero--with-media {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 0 1.75rem;
    }

    .guide-detail-page .guide-hero-title {
        font-size: clamp(2rem, 9vw, 2.75rem);
    }

    .guide-detail-page .guide-hero--with-media .guide-hero-title {
        max-width: none;
        font-size: clamp(2rem, 9vw, 2.75rem);
    }

    .guide-detail-page .guide-hero-media {
        max-width: 32rem;
    }

    .guide-detail-page .guide-facts-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem 0;
    }

    .guide-detail-page .guide-fact:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .guide-detail-page .guide-main {
        gap: 2.25rem;
    }

    .guide-detail-page .guide-article-content {
        font-size: 1rem;
    }

    .guide-detail-page .guide-end-nav {
        align-items: stretch;
    }

    .guide-detail-page .guide-next-link,
    .guide-detail-page .guide-back-link {
        width: 100%;
    }

}

@media (prefers-reduced-motion: reduce) {
    .guide-detail-page .guide-next-link,
    .guide-detail-page .guide-back-link {
        transition: none;
    }
}
}

@layer theme {
.light-mode .guide-detail-page {
    --guide-detail-surface: #f1eef4;
    --guide-detail-surface-raised: #ebe7ef;
    --guide-detail-border: rgb(30 24 38 / 13%);
    --guide-detail-border-strong: rgb(30 24 38 / 23%);
    --guide-detail-text: #1d1922;
    --guide-detail-muted: #625b69;
    --guide-detail-accent: #087c94;
    --guide-detail-accent-contrast: #fff;
    --guide-detail-accent-soft: rgb(8 124 148 / 9%);
}

.light-mode .guide-detail-page .guide-article-content p,
.light-mode .guide-detail-page .guide-article-content li {
    color: rgb(29 25 34 / 88%);
}
}
