/* Chinese typography improvements */
:root {
    --content-max-width: 820px;
    --base-font-size: 1.8rem;
}

body {
    font-family: "STSong", "Songti SC", "Noto Serif CJK SC", serif;
}

h1, h2, h3, h4 {
    font-family: "STHeiti", "Heiti SC", "Noto Sans CJK SC", sans-serif;
}

/* Body text */
.content main {
    font-size: var(--base-font-size);
    line-height: 2;
}

.content main p {
    font-size: var(--base-font-size);
    line-height: 2;
}

/* Sidebar — use same variable, slightly boosted for visual parity in narrow column */
.sidebar .sidebar-scrollbox {
    font-size: var(--base-font-size);
    line-height: 1.8;
}

.sidebar .sidebar-scrollbox ol {
    font-size: var(--base-font-size);
}

.sidebar .sidebar-scrollbox li {
    font-size: var(--base-font-size);
    padding: 4px 0;
}

.sidebar .sidebar-scrollbox li a {
    font-size: var(--base-font-size) !important;
}

/* Part titles in sidebar */
.sidebar .sidebar-scrollbox .part-title {
    font-weight: bold;
    font-size: var(--base-font-size);
    margin-top: 1em;
}

/* Blockquotes (whitepaper quotes) */
blockquote {
    border-left: 4px solid #c0a060;
    background: rgba(192, 160, 96, 0.06);
    padding: 0.8em 1.2em;
    margin: 1.2em 0;
    font-size: calc(var(--base-font-size) - 0.2rem);
    line-height: 1.8;
}

blockquote p {
    margin: 0.4em 0;
    font-size: inherit;
}

/* Force right-buttons to horizontal row */
.right-buttons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px;
}

/* ===== Font size adjuster — integrated with mdBook toolbar ===== */
#font-size-adjuster {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0 4px;
    border: 1px solid var(--icons);
    border-radius: 4px;
    overflow: hidden;
    height: 28px;
}

#font-size-adjuster button {
    background: none;
    border: none;
    border-right: 1px solid var(--icons);
    color: var(--icons);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

#font-size-adjuster button:last-child {
    border-right: none;
}

#font-size-adjuster button:hover {
    background: var(--theme-hover);
    color: var(--icons-hover);
}

#font-size-label {
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--icons);
    min-width: 36px;
    text-align: center;
    border-right: 1px solid var(--icons);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
