:root {
  --bg: #ffffff;
  --text-main: #1a1a1a;
  --text-sub: #555555;
  --accent: #0073b1;
  --border: #eeeeee;
  --header-h: 64px;
  --radius: 12px;
}

/* --- BASE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    columns: var(--text-main);
    background: var(--bg);
}

.main-header {
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 10px 20px;
    font-weight: 800;
    color: var(--accent);
}

.article-layout {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.sidebar {
    order: -1;
}

.toc-box {
    background: #fff;
    padding: 10px 0 10px 20px
}

.toc-title {
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--text-sub);
    font-weight: 700;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 12px;
}

.toc-link {
    text-decoration: none;
    color: var(--text-main);
    font-size: 15px;
    display: flex;
    align-items: center;
}

.toc-link i {
    font-size: 10px;
    margin-right: 12px;
    color: var(--accent);
}

.article-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.main-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

@media (min-width: 850px) {
    .article-layout {
        grid-template-columns: 260px 1fr;
        gap: 24px;
        margin: 64px auto;
    }

    .sidebar {
        position: sticky;
        top: calc(var(--header-h) + 64px);
        height: fit-content;
        order: 0;
    }

    .toc-box {
        background: #f9f9f9;
        padding: 24px;
        border-radius: 12px;
        border: 1px solid var(--border);
        box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.2);
    }

    .toc-link:hover {
        color: var(--accent);
        font-weight: 800;
    }

}