:root {
    --bg: #e0f2fe;
    --surface: #ffffff;
    --text: #0f172a;
    --muted-text: #475569;
    --primary: #0369a1;
    --primary-strong: #075985;
    --border: #bae6fd;
    --shadow: 0 10px 30px rgba(2, 132, 199, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg), #f0f9ff);
}

.page-shell {
    width: min(980px, calc(100% - 2rem));
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.site-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.site-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.site-brand-link {
    display: inline-flex;
    border-radius: 999px;
}

.site-logo {
    width: 64px;
    height: 64px;
    display: block;
}

h1,
h2 {
    color: var(--primary);
    margin: 0;
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.site-nav {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-strong);
}

a:focus-visible {
    outline: 3px solid #38bdf8;
    outline-offset: 2px;
    border-radius: 4px;
}

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

.post-item {
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
}

.post-item:last-child {
    border-bottom: 0;
}

time {
    color: var(--muted-text);
    font-size: 0.92rem;
}

.post-item h2 {
    margin-top: 0.2rem;
    font-size: 1.1rem;
}

.post-content {
    margin-top: 1rem;
}

.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
}

.markdown-content p {
    margin: 0.7rem 0;
}

.markdown-content ul {
    margin: 0.6rem 0 1rem 1.2rem;
}

.markdown-content pre {
    overflow-x: auto;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.markdown-content pre.mermaid {
    font-family: "Inter", sans-serif;
    line-height: 1.2;
    padding: 1rem 1.25rem;
}

.markdown-content pre.mermaid svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.static-chart {
    margin: 0.9rem 0 1.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.static-chart figcaption {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.55rem;
    font-size: 1.2rem;
    line-height: 1.3;
}

.static-chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.table-wrap {
    overflow-x: auto;
    margin: 0.8rem 0 1.1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

th:last-child,
td:last-child {
    border-right: 0;
}

thead th {
    background: #f0f9ff;
    position: sticky;
    top: 0;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .page-shell {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
        padding: 1rem;
        border-radius: 10px;
    }

    .site-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
    }

    .site-brand {
        gap: 0.5rem;
    }

    .site-logo {
        width: 52px;
        height: 52px;
    }

    table {
        min-width: 680px;
    }
}
