/* fonts self-hosted (v0.5): latin + latin-ext from Google Fonts, OFL */@font-face {font-family: 'JetBrains Mono';font-style: normal;font-weight: 400;font-display: swap;src: url(/font-jetbrainsmono-latin-ext-0.woff2?v=a30dda78ee) format('woff2');unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face {font-family: 'JetBrains Mono';font-style: normal;font-weight: 400;font-display: swap;src: url(/font-jetbrainsmono-latin-1.woff2?v=22194880e9) format('woff2');unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face {font-family: 'Source Sans 3';font-style: normal;font-weight: 400;font-display: swap;src: url(/font-sourcesans3-latin-ext-2.woff2?v=24ada63688) format('woff2');unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face {font-family: 'Source Sans 3';font-style: normal;font-weight: 400;font-display: swap;src: url(/font-sourcesans3-latin-3.woff2?v=10fa39ebed) format('woff2');unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face {font-family: 'Source Sans 3';font-style: normal;font-weight: 500;font-display: swap;src: url(/font-sourcesans3-latin-ext-2.woff2?v=24ada63688) format('woff2');unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face {font-family: 'Source Sans 3';font-style: normal;font-weight: 500;font-display: swap;src: url(/font-sourcesans3-latin-3.woff2?v=10fa39ebed) format('woff2');unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face {font-family: 'Source Sans 3';font-style: normal;font-weight: 600;font-display: swap;src: url(/font-sourcesans3-latin-ext-2.woff2?v=24ada63688) format('woff2');unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face {font-family: 'Source Sans 3';font-style: normal;font-weight: 600;font-display: swap;src: url(/font-sourcesans3-latin-3.woff2?v=10fa39ebed) format('woff2');unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face {font-family: 'Source Serif 4';font-style: normal;font-weight: 400;font-display: swap;src: url(/font-sourceserif4-latin-ext-4.woff2?v=4a1e2ec6d9) format('woff2');unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face {font-family: 'Source Serif 4';font-style: normal;font-weight: 400;font-display: swap;src: url(/font-sourceserif4-latin-5.woff2?v=4b0db7bdfa) format('woff2');unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face {font-family: 'Source Serif 4';font-style: normal;font-weight: 500;font-display: swap;src: url(/font-sourceserif4-latin-ext-4.woff2?v=4a1e2ec6d9) format('woff2');unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face {font-family: 'Source Serif 4';font-style: normal;font-weight: 500;font-display: swap;src: url(/font-sourceserif4-latin-5.woff2?v=4b0db7bdfa) format('woff2');unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
/* Clay/Mud palettes (Clay = light, Mud = dark, System follows prefers-color-scheme). */
:root{--sans:'Source Sans 3','Noto Sans',system-ui,-apple-system,'Segoe UI',sans-serif;--serif:'Source Serif 4','Noto Serif',Georgia,'Times New Roman',serif;--mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
 --r-sm:8px;--r:12px;--r-lg:16px;color-scheme:light;
 --bg:#FAF9F5;--sunk:#F5F4ED;--surface:#FFFFFF;--hover:rgba(115,114,108,.1);--border:rgba(31,30,29,.12);--border-strong:rgba(31,30,29,.24);--text:#141413;--text-2:#5E5D59;--text-3:#73726C;--code:#F5F4ED;--ok:#3A7246;--ok-soft:#EAF2EA;--shadow:0 1px 2px rgba(20,20,19,.04),0 4px 14px rgba(20,20,19,.05);
 --dot:rgba(31,30,29,.14);--err:#B3261E}
:root[data-theme=mud]{color-scheme:dark;--bg:#262624;--sunk:#1F1E1D;--surface:#30302E;--hover:rgba(222,220,209,.08);--border:rgba(222,220,209,.12);--border-strong:rgba(222,220,209,.24);--text:#F5F4ED;--text-2:#C2C0B6;--text-3:#9C9A92;--code:#1F1E1D;--ok:#8DC59A;--ok-soft:#2F3A31;--shadow:0 1px 2px rgba(0,0,0,.25),0 6px 20px rgba(0,0,0,.2);--dot:rgba(222,220,209,.10);--err:#F2B8B5}
@media (prefers-color-scheme:dark){:root[data-theme=system]{color-scheme:dark;--bg:#262624;--sunk:#1F1E1D;--surface:#30302E;--hover:rgba(222,220,209,.08);--border:rgba(222,220,209,.12);--border-strong:rgba(222,220,209,.24);--text:#F5F4ED;--text-2:#C2C0B6;--text-3:#9C9A92;--code:#1F1E1D;--ok:#8DC59A;--ok-soft:#2F3A31;--shadow:0 1px 2px rgba(0,0,0,.25),0 6px 20px rgba(0,0,0,.2);--dot:rgba(222,220,209,.10);--err:#F2B8B5}}
/* OS theme (v0.4, from Clay's ui-kit): a deeper warm dark */
:root[data-theme=os]{color-scheme:dark;--bg:#12110F;--sunk:#0C0B0A;--surface:#1B1A18;--hover:rgba(240,220,200,.07);--border:rgba(240,220,200,.11);--border-strong:rgba(240,220,200,.22);--text:#F3EEE6;--text-2:#C4BCB0;--text-3:#9A9186;--code:#0C0B0A;--ok:#8DC59A;--ok-soft:#1F2A21;--err:#F2B8B5;--shadow:0 0 0 1px rgba(240,220,200,.04),0 8px 30px rgba(0,0,0,.4);--dot:rgba(240,220,200,.08)}
:root{--accent:#D97757;--accent-solid:#C96442;--ui-solid:#B85A3A;--ui-solid-hover:#A24E31;--ui-on:#FFFFFF;--accent-on:#FFFFFF;--accent-hover:#B85A3A;--accent-text:#B5573A;--accent-soft:#FAEDE8;--accent-ring:rgba(217,119,87,.45);
 /* legacy aliases used by the portal */
 --bg-2:var(--sunk);--bg-3:var(--sunk);--ink:var(--text);--ink-2:var(--text);--muted:var(--text-2);--line:var(--border);--line-2:var(--border-strong);
 --clay:var(--accent);--clay-2:var(--accent-text);--clay-3:var(--accent);--ring:0 0 0 1px var(--border);--icon-stroke:1.5}
html.theme-fade,html.theme-fade *{transition:background-color .6s ease,color .6s ease,border-color .6s ease,fill .6s ease,stroke .6s ease !important}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased}
h1,h2,h3,.serif{font-family:var(--serif);font-weight:450;line-height:1.15;letter-spacing:-.01em}
.ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:var(--icon-stroke);stroke-linecap:round;stroke-linejoin:round}
button,input,textarea,select{font:inherit;color:inherit}
/* theme picker */
.tp{position:relative}.tp>button{display:grid;place-items:center;width:32px;height:32px;border-radius:var(--r-sm);border:1px solid var(--border-strong);background:transparent;color:var(--text);cursor:pointer}
.tp>button:hover{border-color:var(--accent)}.tp-pop{position:absolute;right:0;top:40px;z-index:20;width:236px;padding:14px;border-radius:var(--r);background:var(--surface);box-shadow:0 0 0 1px var(--border),var(--shadow);display:none}
.tp.open .tp-pop{display:block}.tp-pop h4{margin:0 0 8px;font:500 12px var(--sans);color:var(--text-2);text-transform:uppercase;letter-spacing:.06em}
.tp-seg{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:3px;border-radius:var(--r-sm);background:var(--sunk);margin-bottom:14px}
.tp-seg button{border:0;background:none;padding:6px 0;border-radius:6px;cursor:pointer;font-size:13px;color:var(--text-2)}.tp-seg button.on{background:var(--surface);color:var(--text);box-shadow:0 0 0 1px var(--border)}
.tp-sw{display:flex;flex-wrap:wrap;gap:8px}.tp-sw button{width:24px;height:24px;border-radius:50%;border:0;cursor:pointer;background:var(--c);box-shadow:0 0 0 1px var(--border)}.tp-sw button.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--c)}
.tp-note{margin:12px 0 0;font-size:11px;color:var(--text-3);line-height:1.4}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* shared focus ring (v0.3) */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* v0.4 token additions (Clay). Append to public/tokens.css AFTER the existing theme blocks.
   ui-kit.css also defines --warn; values here match it so load order doesn't matter. */
:root{
 /* character art (illustration colours; same hue family in every theme) */
 --char-stem:#6B5A3A;--char-leaf:#788C5D;--char-lump:#B05E3E;--char-anvil:#4A4643;--char-ember:#E8833A;--char-head:#5B5550;--char-beak:#C9A82D;--char-glint:#FFFFFF;--char-cheek:rgba(232,120,110,.35);
 /* status */
 --warn:#8A5A00;--warn-dot:#A87B12;--warn-soft:#FBF3DC;
 /* elevation */
 --shadow-pop-color:rgba(20,20,19,.15);--shadow-pop:0 6px 24px var(--shadow-pop-color);
 /* v0.4 notifications / voice / focus */
 --badge-bg:var(--accent-solid-aa);--badge-on:#FFFFFF;--accent-solid-aa:#B85A3A;
 --focus-ring:var(--accent);--focus-ring-soft:var(--accent-ring);
 --rec:#B3261E;--rec-soft:#FBE9E7;--rec-on:#FFFFFF;
 --meter:var(--accent)
}
:root[data-theme=mud]{
 --char-anvil:#6A6560;--char-head:#7A736C;--char-stem:#8C7650;--char-glint:#FFFFFF;--char-cheek:rgba(232,120,110,.35);
 --warn:#E8C27A;--warn-dot:#E0BE4A;--warn-soft:#3A3122;
 --shadow-pop-color:rgba(0,0,0,.45);
 --rec:#F2B8B5;--rec-soft:#3D2624;--rec-on:#1F1E1D
}
:root[data-theme=os]{
 --char-anvil:#6A6560;--char-head:#7A736C;--char-stem:#8C7650;
 --warn:#E8C27A;--warn-dot:#E0BE4A;--warn-soft:#2E2618;
 --shadow-pop-color:rgba(0,0,0,.55);
 --rec:#F2B8B5;--rec-soft:#33201E;--rec-on:#12110F
}
@media (prefers-color-scheme:dark){:root[data-theme=system]{
 --char-anvil:#6A6560;--char-head:#7A736C;--char-stem:#8C7650;
 --warn:#E8C27A;--warn-dot:#E0BE4A;--warn-soft:#3A3122;
 --shadow-pop-color:rgba(0,0,0,.45);
 --rec:#F2B8B5;--rec-soft:#3D2624;--rec-on:#1F1E1D
}}
