﻿:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #111827;
    --brand-soft: #eef2ff;
    --brand-text: #3730a3;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 18px;
    background: #020617;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
    letter-spacing: -.02em;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .main-nav a {
        border-radius: 999px;
        padding: 10px 16px;
        color: var(--muted);
        font-size: 14px;
        font-weight: 700;
    }

        .main-nav a:hover {
            background: var(--surface-soft);
            color: var(--text);
        }

        .main-nav a.active {
            color: var(--ink);
            background: rgba(255, 255, 255, 0.75);
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        }

.hero {
    overflow: hidden;
    background: radial-gradient(circle at top left, #e0e7ff, transparent 34%), linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 42px;
    align-items: center;
    padding-block: 92px;
}

.hero-copy {
    max-width: 790px;
}

.eyebrow,
.mini-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    padding: 8px 13px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.mini-label {
    border-color: transparent;
    background: var(--brand-soft);
    color: var(--brand-text);
    padding: 6px 11px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hero h1 {
    margin: 24px 0 0;
    max-width: 820px;
    font-size: clamp(46px, 7vw, 82px);
    line-height: .96;
    letter-spacing: -.065em;
}

.hero p {
    margin: 24px 0 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.75;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 650px;
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    padding: 12px;
    box-shadow: var(--shadow);
}

.search-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 26px;
}

.search-panel input,
.compact-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.search-panel button,
.compact-search button,
.soft-button {
    border: 0;
    border-radius: 18px;
    background: var(--brand);
    color: white;
    padding: 14px 22px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.hero-card {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 36px;
    background: rgba(255,255,255,.85);
    padding: 28px;
    box-shadow: var(--shadow);
}

    .hero-card h2 {
        margin: 20px 0 0;
        font-size: 38px;
        letter-spacing: -.04em;
    }

    .hero-card p {
        margin-top: 14px;
        color: var(--muted);
        font-size: 16px;
        line-height: 1.7;
    }

.text-link {
    display: inline-flex;
    margin-top: 20px;
    color: var(--text);
    font-weight: 800;
}

.section-block {
    padding-block: 66px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

    .section-head h2,
    .filter-panel h1,
    .detail-head h1 {
        margin: 10px 0 0;
        font-size: 38px;
        line-height: 1.08;
        letter-spacing: -.045em;
    }

    .section-head p,
    .filter-panel p,
    .detail-head p {
        margin: 10px 0 0;
        color: var(--muted);
        line-height: 1.7;
    }

.soft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

    .soft-button:hover {
        background: var(--surface-soft);
    }

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

    .post-grid.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.post-card {
    position: relative;
    min-height: 230px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    padding: 24px;
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .post-card:hover {
        transform: translateY(-4px);
        border-color: #cbd5e1;
        box-shadow: var(--shadow);
    }

.post-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.pill,
.count-badge {
    display: inline-flex;
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 6px 11px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.arrow {
    color: #cbd5e1;
    font-weight: 900;
}

.post-card h3 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.035em;
}

.post-card p {
    margin: 12px 0 0;
    min-height: 72px;
    color: var(--muted);
    line-height: 1.7;
}

.card-link {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.page-bg {
    background: var(--bg);
    min-height: calc(100vh - 144px);
}

.list-layout,
.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    padding-block: 42px;
}

.filter-panel,
.toc-card {
    position: sticky;
    top: 96px;
    height: fit-content;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: var(--surface);
    padding: 24px;
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

.compact-search {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    border-radius: 22px;
    background: var(--surface-soft);
    padding: 8px;
}

    .compact-search input {
        padding-inline: 10px;
    }

    .compact-search button {
        padding: 11px 14px;
        border-radius: 15px;
    }

.filter-links {
    margin-top: 20px;
    display: grid;
    gap: 6px;
}

    .filter-links a,
    .toc-card > a {
        display: block;
        border-radius: 16px;
        padding: 11px 13px;
        color: var(--muted);
        font-weight: 700;
    }

        .filter-links a:hover,
        .filter-links a.active,
        .toc-card > a:hover {
            background: var(--surface-soft);
            color: var(--text);
        }

.section-head.slim {
    margin-bottom: 18px;
}

.pagination-wrap {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
}

.detail-card {
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--surface);
    padding: clamp(26px, 5vw, 52px);
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

.back-link {
    display: inline-flex;
    margin-bottom: 30px;
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 10px 14px;
    color: var(--muted);
    font-weight: 800;
}

.detail-head {
    margin-bottom: 36px;
}

    .detail-head h1 {
        font-size: clamp(40px, 6vw, 64px);
    }

    .detail-head p {
        max-width: 720px;
        font-size: 19px;
    }

.post-content {
    color: #334155;
    font-size: 18px;
    line-height: 1.85;
}

    .post-content > *:first-child {
        margin-top: 0;
    }

    .post-content h1,
    .post-content h2,
    .post-content h3 {
        color: var(--text);
        line-height: 1.15;
        letter-spacing: -.035em;
    }

    .post-content h1 {
        font-size: 44px;
        margin: 0 0 24px;
    }

    .post-content h2 {
        font-size: 30px;
        margin: 42px 0 12px;
        padding-top: 20px;
        border-top: 1px solid var(--line);
    }

    .post-content h3 {
        font-size: 23px;
        margin: 30px 0 10px;
    }

    .post-content p {
        margin: 12px 0;
    }

    .post-content ul,
    .post-content ol {
        padding-left: 24px;
        margin: 16px 0;
    }

    .post-content li {
        margin: 8px 0;
    }

    .post-content a {
        color: #4338ca;
        font-weight: 800;
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }

    .post-content blockquote {
        margin: 24px 0;
        border-left: 4px solid #c7d2fe;
        border-radius: 18px;
        background: #eef2ff;
        padding: 16px 20px;
        color: #3730a3;
    }

    .post-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 24px 0;
        overflow: hidden;
        border-radius: 18px;
    }

    .post-content th,
    .post-content td {
        border: 1px solid var(--line);
        padding: 12px 14px;
        text-align: left;
    }

    .post-content th {
        background: var(--surface-soft);
        color: var(--text);
    }

    .post-content img,
    .post-content .post-media-image {
        display: block;
        width: 100%;
        max-width: min(100%, 860px);
        height: auto;
        margin: 22px auto;
        border-radius: 16px;
    }

.post-media-audio,
.post-media-video,
.post-media-file {
    display: grid;
    gap: 10px;
    margin: 22px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    padding: 14px;
}

.post-media-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.post-media-audio-player {
    width: 100%;
}

.post-media-video-player {
    display: block;
    width: 100%;
    max-height: 520px;
    border-radius: 12px;
    background: #020617;
}

.post-content .post-media-download {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    border-radius: 999px;
    background: white;
    padding: 7px 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.post-content .post-media-file-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    padding: 12px 14px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

    .post-content .post-media-file-link::after {
        content: "Open";
        flex: 0 0 auto;
        border-radius: 999px;
        background: var(--surface-soft);
        padding: 5px 9px;
        color: var(--muted);
        font-size: 12px;
    }

.toc-card h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.related-box {
    margin-top: 24px;
    border-radius: 24px;
    background: var(--surface-soft);
    padding: 16px;
}

    .related-box div {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }

        .related-box div a {
            border-radius: 999px;
            background: white;
            padding: 7px 10px;
            color: var(--muted);
            font-size: 13px;
            font-weight: 800;
        }

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 28px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 900px) {
    .hero-inner,
    .list-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding-block: 58px;
    }

    .hero-card,
    .filter-panel,
    .toc-card {
        position: static;
    }

    .post-grid,
    .post-grid.two-col {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .main-nav {
        display: none;
    }

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .search-icon {
        display: none;
    }

    .search-panel input {
        padding: 12px;
    }

    .search-panel button {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
    }
}

.ad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    justify-items: center;
}

@media (max-width: 900px) {
    .ad-grid {
        grid-template-columns: 1fr;
    }
}

