/* Default RootBadger reading style. Never override a chosen or high-contrast theme. */
html:not(.dark):not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) {
    --bg-page: #f3f5f2;
    --bg-sidebar: #edf2ee;
    --bg-surface: #ffffff;
    --bg-raised: #f3f7f4;
    --bg-overlay: #ffffff;
    --border-default: #d5dfd8;
    --border-strong: #a9bcb0;
    --text-primary: #1d2925;
    --text-secondary: #35483f;
    --text-muted: #52675c;
    --link-color: #136c60;
    --link-hover-color: #0b4d45;
    --accent-color: #14776a;
    --brand-tint-soft: #e8f2ec;
    --brand-tint-panel: #f3f8f4;
    --brand-border-soft: #d5dfd8;
    --brand-border-mid: #b4c8b9;
    --brand-border-hard: #859f8e;
    --color-brand-300: #bd6c3c;
    --color-brand-400: #a75020;
    --color-brand-500: #944318;
    --color-brand-600: #783512;
    --rb-article-header-bg: #f1f5f1;
    color-scheme: light;
}

html.dark:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) {
    --bg-page: #111a18;
    --bg-sidebar: #15211d;
    --bg-surface: #1b2924;
    --bg-raised: #24352e;
    --bg-overlay: #24352e;
    --border-default: #34483d;
    --border-strong: #57705f;
    --text-primary: #f0f5ed;
    --text-secondary: #d7e2d6;
    --text-muted: #aec1b0;
    --link-color: #8ce0ca;
    --link-hover-color: #b8f1df;
    --accent-color: #8ce0ca;
    --brand-tint-soft: #22372e;
    --brand-tint-panel: #1d3028;
    --brand-border-soft: #34483d;
    --brand-border-mid: #496650;
    --brand-border-hard: #658d70;
    --color-brand-300: #f0bd8f;
    --color-brand-400: #e7a56d;
    --color-brand-500: #bb7847;
    --color-brand-600: #9b5f33;
    --rb-article-header-bg: #213128;
    color-scheme: dark;
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) {
    --color-rb-bg: var(--bg-page);
    --color-rb-surface: var(--bg-surface);
    --color-rb-raised: var(--bg-raised);
    --color-rb-border: var(--border-default);
    --color-rb-border-strong: var(--border-strong);
    --color-rb-text: var(--text-primary);
    --color-rb-muted: var(--text-muted);
    --color-rb-link: var(--link-color);
    --color-rb-accent: var(--accent-color);
    --color-surface: var(--bg-surface);
    --color-surface-raised: var(--bg-raised);
    --color-border: var(--border-default);
    --color-text-primary: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-text-muted: var(--text-muted);
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) body {
    background-image: radial-gradient(circle at 80% -12%, color-mix(in srgb, var(--accent-color) 7%, transparent), transparent 42%);
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) :is(.rb-panel, .rb-panel-muted) {
    border-color: var(--border-default);
    box-shadow: 0 3px 16px color-mix(in srgb, var(--text-primary) 4%, transparent);
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) .rb-panel-muted {
    background-color: var(--bg-raised);
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) :is(.post-thread-root, .post-reply-inline, .rb-reader-body) .post-body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: .004em;
    color: var(--text-primary);
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) :is(.post-thread-root, .post-reply-inline, .rb-reader-body) .post-body :is(pre, code, kbd) {
    font-family: var(--font-mono);
    letter-spacing: normal;
}

html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) :is(a, button, input, textarea, select, summary):focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    html:not([data-rb-profile-theme]):not([data-my-page-theme]):not(.hcdark):not(.hclight) :is(.post-thread-root, .post-reply-inline, .rb-reader-body) .post-body {
        font-size: .96rem;
        line-height: 1.58;
    }
}
