/* CLARA / v16 final typography and interaction contract.
 * Loaded after existing styles. Scoped to pages; intentional game HUDs,
 * storybook cinematics, Cubie animations and code editors keep local styling.
 */
:root{
 --clara-type-sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 --clara-type-mono:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
 --clara-type-ink:#241f1b;
 --clara-type-muted:#61564e;
 --clara-type-accent:#b74313;
 --clara-type-line:#e7dfd7;
 --clara-type-surface:#fff;
 --clara-type-focus:#c2410c;
}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page){
 font-family:var(--clara-type-sans);font-kerning:normal;
 -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
/* Fix inconsistent native browser button typography without flattening components. */
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(button,select,input:not([type="checkbox"]):not([type="radio"]),.file-button){
 font-family:var(--clara-type-sans);font-kerning:normal;
}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(button,.file-button){
 text-align:center;line-height:1.35;font-weight:650;letter-spacing:-.012em;
 text-decoration-thickness:from-font;box-sizing:border-box;
}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(button,.file-button):disabled{
 cursor:not-allowed;opacity:.55;
}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(button,select,input,textarea):focus-visible{
 outline:3px solid var(--clara-type-focus);outline-offset:3px;
}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(h1,h2,h3){
 font-family:var(--clara-type-sans);font-kerning:normal;text-wrap:balance;
}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(p,li){overflow-wrap:break-word;}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(pre,code,kbd,samp){font-variant-ligatures:none;tab-size:2;}
:where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) :is(button,a,select,input,textarea){-webkit-tap-highlight-color:transparent;}
/* Editorial and code treatment. The live code editor remains monospace. */
.clara-docs .docs-hero h1{letter-spacing:-.062em;line-height:1.035;max-width:13ch}
.clara-docs .docs-section h2{line-height:1.16;letter-spacing:-.04em}
.clara-docs .docs-section p{max-width:82ch;line-height:1.76}
.clara-docs .docs-code{border:1px solid #424048;box-shadow:0 12px 38px #26190b16}
.clara-docs .docs-codehead{font-family:var(--clara-type-sans);letter-spacing:.055em}
.clara-docs .docs-code pre,.clara-docs .docs-console,.clara-docs .docs-playground textarea{
 font-family:var(--clara-type-mono);font-variant-ligatures:none;
}
.clara-docs .docs-codeactions button{
 font-family:var(--clara-type-sans);font-weight:720;line-height:1.35;
}
.clara-docs .docs-playground :is(button,select,input){font-family:var(--clara-type-sans)}
.clara-docs .docs-playground button{font-weight:740;letter-spacing:-.012em}
.clara-docs .docs-sidebar a[aria-current="location"]{font-weight:760}
.clara-docs .docs-section .docs-note{max-width:82ch}
.clara-docs .docs-heroactions a,.clara-docs .docs-endlinks a{font-weight:710}
/* The storybook's light workbench must not inherit dark form appearance. */
.clara-story > main :is(.forge,.workshop) :is(input,select,textarea){color-scheme:light}
/* Keep dark development viewers and Cubie's isolated controls legible. */
.clara-game > main .game-view button{color-scheme:dark}
.clara-help :is(button,input,textarea,select){font-family:var(--clara-type-sans)}
/* Phone usability: controls fit their containers; no horizontal page overflow. */
@media(max-width:720px){
 :where(.clara-workspace,.studio-page,.public-page,.clara-desk,.legal-page) main :is(button,.file-button){max-width:100%;overflow-wrap:anywhere}
 .clara-docs .docs-code pre{font-size:12px;line-height:1.65}
 .clara-docs .docs-playground :is(select,input,button){min-height:44px}
 .clara-docs .docs-playground .docs-run-actions button{flex:1 1 148px}
 .clara-docs .docs-form-row>*{min-width:0}
}
@media(prefers-reduced-motion:reduce){
 .clara-docs .docs-codeactions button,.clara-docs .docs-playground button{transition:none}
}

/* Refine the lowest-end legacy button sizing without changing toolbar geometry. */
.clara-appmaker > main :is(button,.file-button){font-size:13px;line-height:1.38;font-weight:680;letter-spacing:-.016em;border-radius:10px}
.clara-appmaker > main :is(input,select){font-family:var(--clara-type-sans);font-size:13px}
.clara-docs .docs-codeactions button{font-size:12px;min-height:35px}
.clara-docs .docs-playground .docs-run-actions button{font-size:13px;line-height:1.3}
.clara-docs .docs-playground select{font-size:13px}
.clara-game > main :is(.game-panel,.game-inspector) :is(button,select){font-family:var(--clara-type-sans)}
