html[data-font-size="sm"] { font-size: 15px !important; }
html[data-font-size="md"] { font-size: 16px !important; }
html[data-font-size="lg"] { font-size: 18px !important; }

.font-size-switch {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border: 1px solid var(--border, var(--ss-border, rgba(127, 127, 127, 0.35)));
    border-radius: 999px;
    background: var(--surface, var(--ss-surface, rgba(255, 255, 255, 0.88)));
    overflow: hidden;
    color: var(--text, var(--ss-text, inherit));
}

.font-size-switch__label {
    padding: 0 0.4rem 0 0.6rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    opacity: 0.75;
}

.font-size-switch button {
    appearance: none;
    margin: 0;
    border: none;
    border-left: 1px solid var(--border, var(--ss-border, rgba(127, 127, 127, 0.25)));
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    min-height: 1.75rem;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
}

.font-size-switch button[aria-pressed="true"] {
    background: var(--accent, var(--ss-accent, #5b52a8));
    color: #fff;
}

.font-size-switch-wrap--home {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
}

.font-size-switch-wrap--home .font-size-switch {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.font-size-switch-wrap--home .font-size-switch button {
    border-left-color: rgba(255, 255, 255, 0.22);
}

.font-size-switch-wrap--home .font-size-switch button[aria-pressed="true"] {
    background: #fff;
    color: #1c2b3a;
}

.font-size-switch-wrap--fixed {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 80;
}

@media print {
    html,
    html[data-font-size] {
        font-size: 16px !important;
    }
    .font-size-switch,
    .font-size-switch-wrap {
        display: none !important;
    }
}
