body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.8;
    color: #2d3748;
    max-width: 840px;
    margin: 0 auto;
    padding: 32px 20px 56px;
    background: #f7fafc;
}

a {
    color: #2b6cb0;
}

.site-header {
    text-align: center;
    margin-bottom: 34px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.site-title {
    margin: 0 0 8px;
    font-size: 2.4rem;
    line-height: 1.2;
}

.site-title a {
    color: #1a202c;
    text-decoration: none;
}

.site-description {
    margin: 0;
    color: #4a5568;
    font-size: 1.05rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.site-nav a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    background: #edf2f7;
    color: #2d3748;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
}

.site-nav a:hover {
    background: #e2e8f0;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 34px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: 1px solid transparent;
    background: #edf2f7;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
}

.nav-item:hover {
    background: #e2e8f0;
}

.nav-item:focus-visible {
    outline: 3px solid #90cdf4;
    outline-offset: 2px;
}

.nav-item.is-active {
    background: #1a202c;
    color: #fff;
    border-color: #1a202c;
}

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

.post-item {
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    margin-bottom: 22px;
    border: 1px solid #edf2f7;
}

.post-meta,
.meta {
    color: #718096;
    font-size: 0.9rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.tag-brain {
    background: #ebf8ff;
    color: #2b6cb0;
}

.tag-tools {
    background: #faf5ff;
    color: #6b46c1;
}

.tag-logic {
    background: #e6fffa;
    color: #319795;
}

.post-item h2 {
    font-size: 1.4rem;
    margin: 0 0 12px;
    line-height: 1.4;
}

.post-item h2 a {
    color: #1a202c;
    text-decoration: none;
}

.post-item h2 a:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

.post-summary {
    color: #4a5568;
    font-size: 1rem;
    margin: 0;
}

.empty-state {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    color: #718096;
    margin: 0;
    padding: 26px;
    text-align: center;
}

article,
.page-content {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 30px;
}

h1 {
    font-size: 2rem;
    color: #1a202c;
    line-height: 1.4;
    margin: 0 0 10px;
}

h2 {
    font-size: 1.35rem;
    color: #2b6cb0;
    margin-top: 38px;
    border-left: 4px solid #319795;
    padding-left: 10px;
}

h3 {
    font-size: 1.12rem;
    color: #4a5568;
    margin-top: 24px;
}

p {
    margin-bottom: 20px;
    font-size: 1.03rem;
}

ul,
ol {
    margin-bottom: 24px;
    padding-left: 22px;
}

li {
    margin-bottom: 8px;
}

.meta {
    margin-bottom: 28px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 14px;
}

.related-links {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid #edf2f7;
}

.content-visual {
    margin: 28px 0 32px;
}

.content-visual img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.content-visual figcaption {
    margin-top: 10px;
    color: #718096;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

.site-footer {
    text-align: center;
    margin-top: 48px;
    color: #718096;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.footer-links a {
    color: #4a5568;
    text-decoration: none;
}

.graph-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #4a5568;
}

.graph-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.graph-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.graph-canvas-wrap {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.graph-canvas-wrap svg {
    width: 100%;
    height: auto;
    display: block;
    cursor: grab;
}

.graph-canvas-wrap svg:active {
    cursor: grabbing;
}

.graph-link {
    stroke: #cbd5e0;
    stroke-width: 1.2;
    transition: stroke 0.2s, stroke-width 0.2s, opacity 0.2s;
}

.graph-link.is-dimmed {
    opacity: 0.1;
}

.graph-link.is-highlighted {
    stroke: #2b6cb0;
    stroke-width: 2.2;
    opacity: 1;
}

.graph-node circle {
    cursor: pointer;
    transition: opacity 0.2s, stroke-width 0.2s;
}

.graph-node.is-dimmed {
    opacity: 0.15;
}

.graph-node.is-highlighted circle {
    stroke-width: 3.5;
}

.graph-info {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 20px;
    min-height: 56px;
}

.graph-info .placeholder {
    color: #a0aec0;
    margin: 0;
}

.graph-info h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #1a202c;
    line-height: 1.4;
}

.graph-info .graph-info-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
}

@media (max-width: 640px) {
    body {
        padding: 22px 14px 44px;
    }

    .site-title {
        font-size: 2rem;
    }

    article,
    .page-content,
    .post-item {
        padding: 22px;
    }
}
