.guides-page,
.guide-detail,
.guide-reading-layout {
    max-width: 1120px;
    margin: 0 auto;
}

.guides-hero,
.guide-detail-header,
.guide-chapter-header {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
    padding-bottom: 18px;
}

.guides-kicker {
    color: #b91c1c;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.guides-hero h1,
.guide-detail-header h1,
.guide-chapter-header h1 {
    color: #111827;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(2.1rem, 7vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.03;
    margin: 0 0 14px;
}

.guides-hero p,
.guide-subtitle {
    color: #4b5563;
    font-size: 1.15rem;
    line-height: 1.45;
    margin: 0;
    max-width: 760px;
}

.guides-search {
    display: flex;
    gap: 10px;
    margin: 24px 0;
}

.guides-search input {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    flex: 1;
    font-size: 1rem;
    padding: 13px 15px;
}

.guides-search button,
.guide-read-link {
    background: #111827;
    border: 0;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    padding: 13px 18px;
    text-decoration: none;
}

.guide-list-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.guide-card {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 22px;
}

.guide-card-image {
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
    display: block;
    margin-bottom: 14px;
    overflow: hidden;
}

.guide-card-image img,
.guide-cover img,
.guide-inline-figure img,
.guide-gallery-grid img {
    display: block;
    height: auto;
    width: 100%;
}

.guide-card-image img {
    height: 100%;
    object-fit: cover;
}

.guide-card-meta,
.guide-meta-line,
.guide-breadcrumbs {
    align-items: center;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    font-size: .92rem;
    gap: 8px 12px;
}

.guide-card-meta span + span::before,
.guide-meta-line span + span::before {
    color: #c4c4c4;
    content: "•";
    margin-right: 12px;
}

.guide-card h2 {
    font-size: 1.5rem;
    letter-spacing: -.025em;
    line-height: 1.12;
    margin: 8px 0 9px;
}

.guide-card h2 a,
.guide-breadcrumbs a,
.guide-toc-list a,
.guide-side-toc a {
    color: inherit;
    text-decoration: none;
}

.guide-card p {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 14px;
}

.guide-breadcrumbs {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
    padding-bottom: 14px;
}

.guide-breadcrumbs a:hover {
    color: #b91c1c;
}

.guide-cover {
    margin: 0 0 22px;
}

.guide-cover figcaption,
.guide-inline-figure figcaption,
.guide-gallery-grid figcaption {
    color: #6b7280;
    font-size: .92rem;
    line-height: 1.35;
    margin-top: 8px;
}

.guide-cover figcaption small,
.guide-inline-figure figcaption small,
.guide-gallery-grid figcaption small {
    display: block;
}

.guide-lead,
.guide-description,
.guide-content {
    color: #2f3542;
    font-size: 1.18rem;
    line-height: 1.5;
}

.guide-lead {
    border-left: 4px solid #d1d5db;
    color: #111827;
    font-size: 1.28rem;
    margin: 0 0 24px;
    padding-left: 18px;
}

.guide-description p,
.guide-content p {
    margin: 0 0 1.02em;
}

.guide-content h2,
.guide-content h3 {
    color: #111827;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.025em;
    line-height: 1.14;
    margin: 1.55em 0 .7em;
}

.guide-content h2 { font-size: 1.9rem; }
.guide-content h3 { font-size: 1.45rem; }

.guide-toc-panel {
    border-top: 1px solid #e5e7eb;
    margin-top: 26px;
    padding-top: 22px;
}

.guide-toc-panel h2,
.guide-side-toc h2 {
    color: #111827;
    font-size: 1.55rem;
    letter-spacing: -.025em;
    margin: 0 0 16px;
}

.guide-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-toc-list li {
    border-bottom: 1px solid #eef0f3;
}

.guide-toc-list a {
    align-items: flex-start;
    display: flex;
    gap: 13px;
    padding: 14px 0;
}

.guide-step {
    align-items: center;
    background: #111827;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: .85rem;
    font-weight: 800;
    height: 28px;
    justify-content: center;
}

.guide-toc-list small {
    color: #6b7280;
    display: block;
    font-size: .95rem;
    font-weight: 400;
    line-height: 1.35;
    margin-top: 4px;
}

.guide-reading-layout {
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 1fr) 300px;
}

.guide-progress-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 22px;
    padding: 14px;
}

.guide-progress-top {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.guide-progress-top span {
    color: #6b7280;
    font-size: .9rem;
}

.guide-progress-track {
    background: #e5e7eb;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.guide-progress-track span {
    background: #b91c1c;
    display: block;
    height: 100%;
}

.guide-inline-figure {
    margin: 1.35em 0;
}

.guide-inline-figure img {
    border-radius: 0;
}

.guide-chapter-nav {
    border-top: 1px solid #e5e7eb;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    margin-top: 30px;
    padding-top: 18px;
}

.guide-chapter-nav a {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: #111827;
    font-weight: 800;
    padding: 14px;
    text-decoration: none;
}

.guide-chapter-nav a:last-child {
    text-align: right;
}

.guide-reading-sidebar {
    display: block;
}

.guide-side-toc {
    position: sticky;
    top: 88px;
}

.guide-side-toc a {
    border-left: 3px solid #e5e7eb;
    color: #4b5563;
    display: flex;
    gap: 9px;
    padding: 9px 0 9px 12px;
}

.guide-side-toc a.is-current {
    border-left-color: #b91c1c;
    color: #111827;
    font-weight: 800;
}

.guide-empty {
    color: #6b7280;
    padding: 16px 0;
}

@media (max-width: 900px) {
    .guide-reading-layout {
        display: block;
    }

    .guide-reading-sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .guides-page,
    .guide-detail,
    .guide-reading-layout {
        max-width: none;
    }

    .guides-search {
        flex-direction: column;
    }

    .guide-detail-header h1,
    .guide-chapter-header h1,
    .guides-hero h1 {
        font-size: clamp(2rem, 10vw, 3.1rem);
        line-height: 1.04;
    }

    .guide-lead,
    .guide-description,
    .guide-content {
        font-size: 1.08rem;
        line-height: 1.48;
    }

    .guide-chapter-nav {
        grid-template-columns: 1fr;
    }

    .guide-chapter-nav a:last-child {
        text-align: left;
    }
}
