/* political.wiki — Documentation Clean Slate */
:root {
    --bg: #FFFFFF;
    --sidebar-bg: #F6F8FA;
    --primary: #24292E;
    --text: #444D56;
    --border: #E1E4E8;
    --link: #0366D6;
    --code-orange: #E36209;
    --info-blue: #0366D6;
    --info-green: #28A745;
    --info-yellow: #F9C513;
    --info-red: #D73A49;
    --muted: #888888;
    --alt-bg: #FAFAFA;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

/* Top Navigation */
#top-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.15s;
}
#top-nav.scrolled { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; gap: 24px;
}
.nav-logo {
    font-weight: 700; font-size: 18px; color: var(--primary);
    text-decoration: none; flex-shrink: 0;
}
.nav-search { flex: 1; max-width: 500px; margin: 0 auto; }
.nav-search input {
    width: 100%; padding: 8px 16px;
    border: 1px solid var(--border); border-radius: 6px;
    font-family: 'Noto Sans', sans-serif; font-size: 14px;
    color: var(--text); background: var(--sidebar-bg);
    transition: width 0.2s, border-color 0.2s;
}
.nav-search input:focus {
    outline: none; border-color: var(--link);
    background: var(--bg);
}
.nav-controls { display: flex; gap: 16px; flex-shrink: 0; }
.nav-link {
    font-size: 14px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: color 0.1s;
}
.nav-link:hover { color: var(--link); }

/* Layout */
.layout {
    display: flex; margin-top: 53px; min-height: calc(100vh - 53px);
}

/* Sidebar */
#sidebar {
    width: 260px; flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    position: sticky; top: 53px; height: calc(100vh - 53px);
    overflow-y: auto;
}
.sidebar-inner { padding: 24px 16px; }
.sidebar-title {
    font-weight: 700; font-size: 12px; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted);
    margin-bottom: 12px;
}
.toc { list-style: none; }
.toc-item { margin-bottom: 2px; }
.toc-item a {
    display: block; padding: 4px 12px; border-radius: 4px;
    font-size: 14px; font-weight: 400; color: var(--text);
    text-decoration: none; transition: background 0.1s, color 0.1s;
}
.toc-item a:hover { background: #EAECEF; }
.toc-item.active > a {
    background: #E8F0FE; color: var(--link); font-weight: 600;
}
.toc-sub {
    list-style: none; margin-left: 16px;
    border-left: 1px solid var(--border); padding-left: 0;
}
.toc-sub li a { font-size: 13px; padding: 3px 12px; }

/* Main Content */
#content {
    flex: 1; max-width: 800px; padding: 32px 48px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.breadcrumb-sep { margin: 0 6px; opacity: 0.4; }
.breadcrumb-current { color: var(--text); }

/* Article */
article h1 {
    font-weight: 700; font-size: 32px; letter-spacing: -0.01em;
    color: var(--primary); margin-bottom: 4px; line-height: 1.3;
}
.last-edited {
    font-size: 13px; color: var(--muted); margin-bottom: 24px;
}
article h2 {
    font-weight: 700; font-size: 24px; letter-spacing: -0.01em;
    color: var(--primary); margin-top: 48px; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
article h3 {
    font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
    color: var(--primary); margin-top: 32px; margin-bottom: 12px;
}
article p {
    margin-bottom: 16px;
}
article code {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 14px; color: var(--code-orange);
    background: var(--sidebar-bg); padding: 2px 6px;
    border-radius: 3px;
}
article em { font-style: italic; }

/* Info Boxes */
.info-box {
    padding: 16px 20px; margin: 20px 0; border-radius: 4px;
    font-size: 14px; line-height: 1.6;
}
.info-blue {
    border-left: 4px solid var(--info-blue);
    background: rgba(3,102,214,0.08);
}
.info-green {
    border-left: 4px solid var(--info-green);
    background: rgba(40,167,69,0.08);
}
.info-yellow {
    border-left: 4px solid var(--info-yellow);
    background: rgba(249,197,19,0.08);
}
.info-red {
    border-left: 4px solid var(--info-red);
    background: rgba(215,58,73,0.08);
}

/* Wiki Table */
.wiki-table {
    width: 100%; border-collapse: collapse; margin: 24px 0;
    font-size: 14px;
}
.wiki-table th, .wiki-table td {
    padding: 10px 14px; text-align: left;
    border: 1px solid var(--border);
}
.wiki-table th {
    font-weight: 600; background: var(--sidebar-bg);
    color: var(--primary);
}
.wiki-table tbody tr:nth-child(even) { background: var(--alt-bg); }
.wiki-table tbody tr:hover { background: var(--sidebar-bg); }

/* References */
.references p {
    font-size: 14px; color: var(--text); margin-bottom: 8px;
    padding-left: 20px; text-indent: -20px;
}

/* Mobile */
@media (max-width: 768px) {
    #sidebar { display: none; }
    #content { padding: 24px 20px; }
    .nav-controls { display: none; }
    .layout { display: block; }
}
