.guides-page,
.guide-overview,
.guide-chapter {
    --guide-ink: #172126;
    --guide-muted: #5f6d72;
    --guide-green: #2d786c;
    --guide-green-dark: #1d5f56;
    --guide-copper: #cc5b35;
    --guide-cream: #f5f1e8;
    --guide-soft: #eef4f1;
    --guide-line: #d9e0dc;
    color: var(--guide-ink);
}

.guide-overview,
.guide-chapter {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
}

.guides-hero,
.guide-overview__header,
.guide-chapter__header {
    padding: clamp(2rem, 6vw, 4.5rem);
    margin-bottom: clamp(2rem, 5vw, 4rem);
    background: linear-gradient(125deg, var(--guide-cream) 0 64%, #e6eee9 64%);
    border: 1px solid var(--guide-line);
    border-radius: 1.25rem;
}

.guides-hero h1,
.guide-overview__header h1,
.guide-chapter__header h1 {
    max-width: 900px;
    margin: 0 0 1rem;
    color: var(--guide-ink);
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.guides-hero p,
.guide-overview__header p,
.guide-chapter__header p {
    max-width: 760px;
    margin: 0;
    color: var(--guide-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.guides-eyebrow {
    display: inline-block;
    margin-bottom: .85rem;
    color: var(--guide-green);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.guide-card {
    display: flex;
    min-height: 310px;
    padding: clamp(1.4rem, 3vw, 2.25rem);
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--guide-line) !important;
    border-radius: 1rem !important;
    background: #fff;
    box-shadow: 0 16px 40px rgba(23, 33, 38, .08) !important;
}

.guide-card h2 {
    margin: .6rem 0 1rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.guide-card h2 a {
    color: var(--guide-ink);
    text-decoration: none;
}

.guide-card h2 a:hover { color: var(--guide-green); }
.guide-card p { color: var(--guide-muted); }

.guide-card__meta,
.guide-byline {
    color: var(--guide-muted);
    font-size: .85rem;
    font-weight: 650;
}

.guide-button {
    display: inline-flex;
    width: fit-content;
    min-height: 48px;
    padding: 0 1.15rem;
    color: #fff !important;
    background: var(--guide-green);
    border-radius: .5rem;
    align-items: center;
    gap: .65rem;
    font-weight: 750;
    text-decoration: none;
}

.guide-button:hover { background: var(--guide-green-dark); }
.guide-back { margin-bottom: 1.25rem; }
.guide-back a { color: var(--guide-green); font-weight: 700; text-decoration: none; }
.guide-subtitle { margin-bottom: 1rem !important; font-size: 1.3rem !important; font-weight: 650; }
.guide-byline { margin-top: 1.25rem; }

.chapter-list {
    display: grid;
    padding: 0;
    margin: 1.5rem 0 0;
    list-style: none;
    border-top: 1px solid var(--guide-line);
}

.chapter-list li { border-bottom: 1px solid var(--guide-line); }
.chapter-list a {
    display: grid;
    padding: 1.2rem .4rem;
    color: var(--guide-ink);
    grid-template-columns: 3.1rem 1fr;
    gap: 1rem;
    align-items: start;
    text-decoration: none;
    transition: padding 160ms ease, background 160ms ease;
}

.chapter-list a:hover { padding-inline: .8rem; background: var(--guide-soft); }
.chapter-number { color: var(--guide-green); font-weight: 800; }
.chapter-list strong { display: block; margin-bottom: .2rem; }
.chapter-list small { display: block; color: var(--guide-muted); font-size: .9rem; line-height: 1.5; }

.guide-chapter__breadcrumbs {
    display: flex;
    margin-bottom: 1.25rem;
    color: var(--guide-muted);
    gap: .55rem;
    font-size: .9rem;
}

.guide-chapter__breadcrumbs a { color: var(--guide-green); text-decoration: none; }
.guide-chapter__layout {
    display: grid;
    grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.guide-toc {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    padding: 1.1rem;
    overflow-y: auto;
    background: var(--guide-soft);
    border: 1px solid var(--guide-line);
    border-radius: .75rem;
}

.guide-toc ol { padding-left: 1.25rem; margin: .75rem 0 0; }
.guide-toc li { padding: .3rem 0; color: var(--guide-muted); font-size: .78rem; line-height: 1.4; }
.guide-toc a { color: inherit; text-decoration: none; }
.guide-toc li.current { color: var(--guide-green-dark); font-weight: 800; }

.guide-content { min-width: 0; font-size: 1.03rem; line-height: 1.75; }
.guide-content h2 { margin: 2.4rem 0 .9rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.guide-content h3 { margin: 1.8rem 0 .7rem; font-size: 1.28rem; }
.guide-content p { margin: 0 0 1.15rem; }
.guide-content ul,
.guide-content ol { margin: 0 0 1.3rem; padding-left: 1.6rem; }
.guide-content li { margin-bottom: .35rem; }
.guide-content blockquote,
.guide-content .lead-quote {
    padding: 1.2rem 1.35rem;
    margin: 1.5rem 0;
    color: var(--guide-green-dark);
    background: var(--guide-soft);
    border-left: 4px solid var(--guide-green);
    border-radius: 0 .6rem .6rem 0;
    font-size: 1.08rem;
    font-weight: 650;
}

.guide-content pre {
    padding: 1.1rem;
    margin: 1.4rem 0;
    overflow-x: auto;
    color: #eef4f1;
    background: #172126;
    border-radius: .65rem;
    font-size: .88rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.guide-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .92rem; }
.guide-content th,
.guide-content td { padding: .7rem; border: 1px solid var(--guide-line); vertical-align: top; }
.guide-content th { background: var(--guide-soft); text-align: left; }

.chapter-pager {
    display: grid;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--guide-line);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.chapter-pager a {
    display: flex;
    padding: 1rem;
    color: var(--guide-ink);
    background: #fff;
    border: 1px solid var(--guide-line);
    border-radius: .65rem;
    flex-direction: column;
    text-decoration: none;
}

.chapter-pager a:hover { border-color: var(--guide-green); }
.chapter-pager small { margin-bottom: .2rem; color: var(--guide-green); }
.chapter-pager__next { text-align: right; }

@media (max-width: 900px) {
    .guide-chapter__layout { grid-template-columns: 1fr; }
    .guide-toc { position: static; max-height: 260px; }
}

@media (max-width: 640px) {
    .guides-grid { grid-template-columns: 1fr; }
    .guides-hero,
    .guide-overview__header,
    .guide-chapter__header { padding: 1.5rem; border-radius: .8rem; }
    .chapter-pager { grid-template-columns: 1fr; }
    .chapter-pager__next { text-align: left; }
}
