/* v0.9.8 — two OPT-IN light appearances, adapted from DESIGN_monotone.md and
 * DESIGN_minnanoginko.md. Original light/dark/system selectors are untouched.
 * No whole-page grayscale: chart series, error semantics and content keep meaning.
 * Font families are local fallbacks only. No @font-face, @import or remote fonts.
 */
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) {
 color-scheme:light;
 --ui-canvas:#f8f9fa; --ui-soft:#f3f4f5; --ui-ink:#191c1d; --ui-muted:#4b4b4b;
 --ui-divider:#e1e1e1; --ui-next:#f3f4f5; --ui-control:#737373; --ui-radius:0;
 --bg:#f8f9fa; --surface:#fff; --surface-2:#f3f4f5; --surface-hover:#eceeef;
 --text:#191c1d; --text-2:#4b4b4b; --text-3:#595959;
 --separator:#e1e1e1; --separator-strong:#737373;
 --accent:#000; --accent-hover:#292929; --on-accent:#fff; --accent-soft:#ededed; --focus:#000;
 --brand-navy:#191c1d; --brand-blue:#000; --brand-blue-light:#777;
 --stitch-link:#000; --stitch-badge:#ebebeb; --stitch-badge-ink:#191c1d; --stitch-chip:#f1f1f1;
 --stitch-card-border:#e1e1e1; --stitch-shadow:none; --shadow-popover:none;
 --stitch-note:#595959; --stitch-card:#fff; --stitch-inner:#f3f4f5; --stitch-nav-bg:#fff; --stitch-writing:#333;
 --success:#333; --success-soft:#eee; --warning:#785000; --warning-soft:#fff7e8;
 --danger:#ba1a1a; --danger-soft:#ffdad6;
 --challenge:#333; --challenge-hover:#000; --challenge-soft:#eee;
 --steady:#555; --steady-hover:#333; --steady-soft:#eee;
 --typing-done:#555; --typing-done-line:#888; --typing-future:#454545;
 --typing-active:#000; --typing-active-bg:#e9e9e9; --typing-active-line:#000;
 --typing-error:#a02337; --typing-error-bg:#fff0f2;
 --mono-control-radius:0px; --mono-panel-radius:0px; --mono-action-radius:0px;
 --r-sm:0px; --r-md:0px; --r-lg:0px;
}
:root[data-theme="monotone"] {
 --font-ui:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
 --mono-display:"Space Mono",var(--font-ui);
}
:root[data-theme="mono-accent"] {
 --ui-canvas:#fff; --ui-soft:#f4f4f4; --ui-ink:#1a1a1a; --ui-muted:#4b4b4b;
 --ui-next:#f4f4f4; --ui-radius:8px; --bg:#fff; --surface-2:#f4f4f4; --surface-hover:#ededed;
 --text:#1a1a1a; --stitch-inner:#f4f4f4; --stitch-badge:#eeff00; --stitch-badge-ink:#000;
 --stitch-card-border:#e5e5e5; --stitch-chip:#f4f4f4;
 --typing-active-bg:#eeff00;
 --mono-control-radius:4px; --mono-panel-radius:8px; --mono-action-radius:9999px;
 --r-sm:4px; --r-md:8px; --r-lg:8px;
 --mono-display:"Space Grotesk",Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(h1,h2,h3,h4,.metric-value,.flow-score,.home-stat-grid dd) {
 font-family:var(--mono-display);font-variant-numeric:tabular-nums;
}
:root[data-theme="monotone"] .stitch-ui :is(.dashboard-welcome h2,.page-intro h2) {letter-spacing:-.04em;}
/* Keep original layout, navigation, touch-target sizes and primary-action arbiter. */
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.btn,.nav-item,.choice-card,.header-selector-button,.account-chip,.header-option,.stitch-icon-tile,.stitch-release,.stitch-guide-close,.writing-profile-explainer,.recent-targets span,.insight-tab) {
 border-radius:var(--mono-control-radius);box-shadow:none!important;
}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.panel,.account-card,.account-panel,.learn-hero,.learn-lesson-card,.learn-summary,.metric-grid,.home-next,.home-progress,.home-tool-links,.home-recommendation,.home-first-guide,.stitch-guide-step,.fc-trend-figure,.writing-nudges,.registration-notice,.privacy-note,.course,.stat,.hud-item,.track,.target-card,.finish-box,.ch-card,.insight-panel) {
 border-radius:var(--mono-panel-radius);box-shadow:none!important;
}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(select,input:not([type=checkbox]):not([type=radio]),textarea) {
 border-radius:var(--mono-control-radius);border-color:var(--separator-strong);box-shadow:none;
}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.btn,.choice-card,.course,.nav-item):hover {box-shadow:none!important;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui .btn:not(.btn-danger):not(.danger):not([data-ui-primary="true"]) {border-color:var(--separator-strong)!important;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.header-selector-menu,.site-service-panel,.stitch-more-panel,.release-dialog,dialog) {
 border:1px solid #000;border-radius:var(--mono-panel-radius);box-shadow:none!important;backdrop-filter:none;
}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui .stitch-more-panel {border:0;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.topbar,.sidebar,.session-toolbar,.release-banner) {box-shadow:none;backdrop-filter:none;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui .release-banner {background:#1a1a1a;color:#fff;border-radius:var(--mono-panel-radius);}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui .nav-item.is-active {border:1px solid #000;color:#000;background:var(--stitch-badge);}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.btn,.course,.choice-card)[aria-pressed="true"] {border-color:#000!important;}
:root[data-theme="mono-accent"] .stitch-ui .btn[data-ui-primary="true"] {border-radius:var(--mono-action-radius);}
:root[data-theme="mono-accent"] .stitch-ui .btn[data-ui-primary="true"]:hover:not(:disabled) {background:#eeff00!important;color:#000!important;border-color:#000!important;}
:root[data-theme="mono-accent"] .stitch-ui :is(.stitch-release,.header-selector-button,.account-chip) {border-radius:9999px;}
:root[data-theme="monotone"] .stitch-ui .stitch-account-avatar {border-radius:0;}
/* Input text geometry is not changed by appearance font choices. All typing fonts
 * retain their original task-specific stack; free-writing keeps its reading font. */
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(input[type=checkbox],input[type=radio],progress) {accent-color:#000;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
 outline:2px solid var(--focus);outline-offset:3px;box-shadow:none!important;
}
/* Restrict image treatment to existing brand marks, never charts or user content. */
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) :is(.brand-mark-image--light,.stitch-mark img,.brand img) {filter:grayscale(1);}
/* Compact non-interactive preview shares actual tokens; the select is the only control. */
.appearance-preview {display:flex;align-items:center;gap:8px;margin:4px 0;min-width:0;font-size:12px;}
.appearance-preview>span:last-child {margin-left:4px;color:var(--text-2);overflow-wrap:anywhere;}
.appearance-preview>span:not(:last-child) {display:grid;place-items:center;width:36px;height:32px;border:1px solid var(--separator-strong);flex:0 0 36px;border-radius:var(--mono-control-radius,4px);}
.appearance-preview__surface{background:var(--surface);color:var(--text);}
.appearance-preview__ink{background:var(--accent);color:var(--on-accent);}
.appearance-preview__accent{background:var(--stitch-badge);color:var(--stitch-badge-ink);}
#theme-description,#theme-scope,#theme-save-status {line-height:1.55;max-width:65ch;}
#theme-save-status:empty {display:none;}
@media(max-width:760px){
 :root[data-theme="monotone"] .stitch-ui .dashboard-welcome h2 {font-size:28px;line-height:1.3;}
 :root[data-theme="monotone"] .stitch-ui :is(.stitch-header-title>h1,.brand-name) {font-size:18px;}
}
@media(forced-colors:active) {
 :root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {outline-color:Highlight;}
 :root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui .nav-item.is-active {border-color:Highlight;background:Canvas;color:CanvasText;}
}

/* Reading/typing surfaces keep their original task font, independent of UI theme. */
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.typing-text,.cbt-answer) {
 font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
/* Legacy input selector contains several :not(#id) clauses; shape override is
 * deliberately limited to the two new themes, never to sizing or focus. */
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(select,input:not([type=checkbox]):not([type=radio]),textarea) {border-radius:var(--mono-control-radius)!important;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui :is(.home-option,.home-empty,.home-activity-list,.home-stat-grid>div) {border-radius:var(--mono-panel-radius);box-shadow:none!important;}
:root[data-theme="monotone"] .stitch-ui :is(.home-tier,.release-badge,.badge,.chip,.kbd-key,.key) {border-radius:0;}
:root[data-theme="mono-accent"] .stitch-ui :is(.header-selector-button,.account-chip,.stitch-release) {border-radius:9999px!important;}
:root:is([data-theme="monotone"],[data-theme="mono-accent"]) .stitch-ui .btn:is(.btn-ghost,.quiet) {border-color:transparent!important;}
