/* ========================================
   Learning Guide — Editorial Design
   ======================================== */

/* ---- Hero ---- */
.guide-hero {
    padding: 160px 40px 64px;
    background: var(--bg-deep);
}

.guide-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.guide-hero-kicker {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.guide-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.guide-hero-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 600px;
}

.guide-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.guide-hero-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.guide-hero-bar {
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    overflow: hidden;
    max-width: 320px;
}

.guide-hero-bar-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 2px;
}

/* ---- TOC ---- */
.guide-toc {
    padding: 48px 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.guide-toc-inner {
    max-width: 760px;
    margin: 0 auto;
}

.guide-toc-heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.guide-toc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.guide-toc-link {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.guide-toc-link:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
}

.guide-toc-link:hover .guide-toc-num {
    color: var(--accent-cyan);
}

.guide-toc-num {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.guide-toc-body {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.guide-toc-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guide-toc-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ---- Body ---- */
.guide-body {
    padding: 56px 40px 100px;
    background: var(--bg-primary);
}

.guide-body-inner {
    max-width: 760px;
    margin: 0 auto;
}

/* ---- Chapter ---- */
.guide-chapter {
    margin-bottom: 72px;
}

.guide-chapter-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.guide-chapter-num {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    min-width: 64px;
    font-variant-numeric: tabular-nums;
}

.guide-chapter-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.guide-chapter-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 8px;
}

.guide-chapter-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
}

.guide-chapter-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-chapter-progress {
    flex: 1;
    max-width: 180px;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.guide-chapter-progress-bar {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 2px;
}

.guide-chapter-progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* ---- Items ---- */
.guide-chapter-items {
    display: flex;
    flex-direction: column;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.15s ease;
}

.guide-item:last-child {
    border-bottom: none;
}

.guide-item-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.guide-item-content {
    flex: 1;
    min-width: 0;
}

.guide-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 2px;
    transition: color 0.15s ease;
}

.guide-item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Published */
.guide-item--published {
    text-decoration: none;
    cursor: pointer;
}

.guide-item--published:hover {
    padding-left: 12px;
    margin-left: -12px;
    border-left: 2px solid var(--accent-cyan);
}

.guide-item--published:hover .guide-item-title {
    color: var(--accent-cyan);
}

.guide-item--published:hover .guide-item-num {
    color: var(--accent-cyan);
}

.guide-item-category {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.guide-item-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.15s ease;
}

.guide-item--published:hover .guide-item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-cyan);
}

/* Upcoming */
.guide-item--upcoming {
    opacity: 0.4;
}

.guide-item--upcoming .guide-item-num {
    color: var(--text-muted);
    opacity: 0.5;
}

.guide-item-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent-amber);
    padding: 2px 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========================================
   Homepage — Guide Showcase
   ======================================== */
.guides-showcase {
    padding: 0 40px 48px;
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
}

.guides-showcase-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.guides-showcase-heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.guides-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.guides-showcase-card {
    display: block;
    padding: 28px 28px 28px 28px;
    border-left: 3px solid var(--accent-cyan);
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.guides-showcase-card:nth-child(2) {
    border-left-color: var(--accent-blue);
}

.guides-showcase-card:nth-child(3) {
    border-left-color: var(--accent-indigo);
}

.guides-showcase-card:nth-child(4) {
    border-left-color: var(--accent-amber);
}

.guides-showcase-card:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.guides-showcase-card:hover .guides-card-title {
    color: var(--text-primary);
}

.guides-card-kicker {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.guides-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 8px;
    transition: color 0.15s ease;
}

.guides-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   Responsive
   ======================================== */
@media screen and (max-width: 800px) {
    .guide-hero {
        padding: 120px 20px 48px;
    }

    .guide-hero h1 {
        font-size: 2rem;
    }

    .guide-hero-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .guide-hero-sep {
        display: none;
    }

    .guide-hero-meta span::after {
        content: '·';
        margin-left: 8px;
        color: var(--text-muted);
    }

    .guide-hero-meta span:last-child::after {
        display: none;
    }

    .guide-toc {
        padding: 32px 20px;
    }

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

    .guide-body {
        padding: 40px 20px 80px;
    }

    .guide-chapter-header {
        flex-direction: column;
        gap: 8px;
    }

    .guide-chapter-num {
        font-size: 2rem;
        min-width: auto;
    }

    .guide-chapter-title {
        font-size: 1.2rem;
    }

    .guide-item {
        padding: 14px 0;
        gap: 12px;
    }

    .guide-item-category,
    .guide-item-badge {
        display: none;
    }

    .guides-showcase {
        padding: 0 20px 32px;
    }

    .guides-showcase-grid {
        grid-template-columns: 1fr;
    }

    .guides-showcase-card {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .guide-hero {
        padding: 100px 16px 40px;
    }

    .guide-hero h1 {
        font-size: 1.7rem;
    }

    .guide-body {
        padding: 32px 16px 60px;
    }

    .guide-item-arrow {
        display: none;
    }

    .guides-index-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Guides Index Page
   ======================================== */
.guides-index {
    background: var(--bg-primary);
    min-height: 100vh;
}

.guides-index-hero {
    padding: 160px 40px 64px;
    background: var(--bg-deep);
    max-width: 760px;
    margin: 0 auto;
}

.guides-index-kicker {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.guides-index-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.guides-index-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.guides-index-grid {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 40px 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guides-index-card {
    display: block;
    padding: 32px;
    border-left: 3px solid var(--accent-cyan);
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.guides-index-card:nth-child(2) {
    border-left-color: var(--accent-blue);
}

.guides-index-card:nth-child(3) {
    border-left-color: var(--accent-indigo);
}

.guides-index-card:nth-child(4) {
    border-left-color: var(--accent-amber);
}

.guides-index-card:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(4px);
}

.guides-index-card-kicker {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.guides-index-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 8px;
    transition: color 0.15s ease;
}

.guides-index-card:hover .guides-index-card-title {
    color: var(--text-primary);
}

.guides-index-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.guides-index-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.guides-index-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media screen and (max-width: 800px) {
    .guides-index-hero {
        padding: 120px 20px 48px;
    }

    .guides-index-title {
        font-size: 1.8rem;
    }

    .guides-index-grid {
        padding: 32px 20px 80px;
    }

    .guides-index-card {
        padding: 24px;
    }
}
