/* POM visual stylesheet — ONE theme (fix-9 hybrid, founder decision 2026-10-31).
 * Shell + Chat: Mycelium Ledger (POM EI green-black, gold #d8c49a, conversation
 * strung on one fine thread with gold nodes — no messenger bubbles).
 * Article surface + Settings: Paper (warm paper #f4efe4, ink, pomegranate red
 * #c2243a as the single accent).
 * Emblem: Lily Crown, monochrome pomegranate red #c2243a in every header.
 * This file replaces the five stacked legacy layers wholesale. Every selector
 * the old cascade defined is carried here exactly once. */

/* ---------- Tokens ---------- */
:root{
 color-scheme:dark;
 /* Mycelium Ledger */
 --bg:#070808; --ground-hi:#16241b; --panel:#101511; --panel-2:#0b0f0c;
 --edge:#223028; --edge-2:#2c3d31; --text:#e9ede4; --sage:#bfcfc1;
 --muted:#93a48f; --faint:#7d927f; --gold:#d8c49a; --gold-dim:#5f7263;
 --gold-ink:#101410;
 /* Paper */
 --paper:#f4efe4; --paper-lo:#ece5d3; --ink:#141a26; --ink-2:#2c3549;
 --ink-3:#3c4456; --p-muted:#5c6577; --p-faint:#9aa1b2;
 --p-edge:rgba(20,26,38,.12); --red:#c2243a;
 --serif:Georgia,"Times New Roman",serif;
 --sans:"Schibsted Grotesk",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

/* ---------- Base ---------- */
*{box-sizing:border-box}
html{background:var(--bg);-webkit-text-size-adjust:100%}
html,body{overscroll-behavior-y:none}
body{margin:0;min-height:100dvh;color:var(--text);font:16px var(--sans);
 background:radial-gradient(120% 30% at 50% 0%,var(--ground-hi) 0%,var(--bg) 60%) no-repeat,var(--bg)}
main{width:100%;max-width:900px;margin:0 auto;padding:0 14px calc(65px + env(safe-area-inset-bottom))}
h1{font-size:clamp(1.85rem,7.2vw,3.4rem);line-height:1.07;letter-spacing:-.045em;margin:9px 0;color:var(--text)}
h2{font-size:1.1rem;color:var(--text)}
p{line-height:1.5;color:#cfd6c8}
a{color:var(--gold)}
.kicker{font-size:.72rem;color:var(--gold);letter-spacing:.14em;text-transform:uppercase;font-weight:700}
.sub,.small{font-size:.77rem;color:var(--muted)}
.status{font-size:.84rem;color:var(--muted);min-height:1.2em}
.pill{border:1px solid var(--edge-2);border-radius:90px;padding:7px 10px;font-size:.72rem;color:var(--gold)}
.hero-description{font-size:.9rem;line-height:1.4;margin:7px 0 13px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}
.grid{display:grid;gap:10px}
footer{margin-top:30px;font-size:.73rem;color:var(--faint);padding-bottom:env(safe-area-inset-bottom)}
footer a{color:var(--gold)}
body:has(#talk:not([hidden])) footer{display:none}
#networkStatus{display:none!important;font-size:.73rem;color:var(--muted);padding:0 17px 3px;min-height:20px}

/* ---------- Header / brand / navigation (the one shell frame) ---------- */
header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:calc(16px + env(safe-area-inset-top)) 18px 17px;border-bottom:1px solid var(--edge)}
.app-header{position:relative;z-index:20;height:calc(64px + env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;gap:12px;padding:env(safe-area-inset-top) 14px 0;background:var(--bg);border-bottom:1px solid var(--edge)}
.brand-lockup{display:flex;align-items:center;gap:9px;justify-content:center;margin-right:auto;min-width:0}
.brand-icon{display:block;flex:none;width:25px;height:38px;object-fit:contain;border-radius:0}
.brand-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.app-header .logo{font-size:1.12rem;font-weight:800;letter-spacing:.22em;color:var(--text);margin:0;line-height:1}
.logo{font-size:1.8rem;font-weight:850;letter-spacing:.13em;color:var(--gold)}
.brand-lockup small{font-size:.56rem;color:var(--sage);letter-spacing:.14em;text-transform:uppercase}
.icon-button,.new-chat{border:0;border-radius:11px;background:transparent;color:var(--text);padding:10px 12px;min-height:44px}
.icon-button{display:grid;place-items:center;min-width:44px;color:var(--gold)}
.icon-button:hover{background:#16241b}
.new-chat{font-size:.85rem;background:var(--panel);border:1px solid var(--edge-2);color:var(--text);border-radius:99px;font-weight:650;white-space:nowrap}
.new-chat:hover{background:#16241b}
.connection-state{font-size:.7rem;font-weight:600;color:var(--muted);white-space:nowrap;margin-right:8px}
#cloudConnect.confirmed{background:#e2f4e5;color:#1f472a}
#navMenu{position:fixed;display:flex;flex-direction:column;left:12px;top:calc(64px + env(safe-area-inset-top));width:min(275px,calc(100vw - 24px));height:auto;max-height:70dvh;overflow:auto;z-index:40;padding:10px;background:var(--panel);border:1px solid var(--edge-2);border-radius:16px;box-shadow:0 16px 40px #000a;margin:0;gap:4px}
#navMenu[hidden]{display:none!important}
#navMenu button{background:transparent;border:none;color:var(--text);text-align:left;padding:12px 15px;font-size:1rem;border-radius:10px;min-height:48px}
#navMenu button[aria-selected=true]{background:#1d2b21;color:var(--gold)}
.tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:14px 0}
.tabs button{border:1px solid var(--edge-2);background:var(--panel);color:var(--text);border-radius:9px;padding:10px 3px;white-space:nowrap;font-size:.86rem;min-width:0;min-height:44px}
.tabs button[aria-selected=true]{background:var(--gold);color:var(--gold-ink);font-weight:750}
@media(prefers-reduced-motion:no-preference){#navMenu{animation:menuEnter .12s ease-out}@keyframes menuEnter{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}}

/* ---------- Forms & buttons (ledger surfaces) ---------- */
button,textarea,input,select{font:inherit}
button{cursor:pointer;min-height:43px;touch-action:manipulation}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,textarea:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
input,textarea,select{scroll-margin-bottom:180px;font-size:16px}
input:not([type=checkbox]):not([type=file]),select{width:100%;min-height:44px;background:var(--panel-2);border:1px solid var(--edge-2);color:var(--text);border-radius:10px;padding:10px 12px}
input[type=file]{max-width:100%;font-size:.85rem}
input[type=checkbox]{accent-color:var(--gold)}
textarea{width:100%;resize:vertical;min-height:95px;border:1px solid var(--edge-2);background:var(--panel-2);color:var(--text);border-radius:10px;padding:12px;line-height:1.5}
input::placeholder,textarea::placeholder{color:var(--faint)}
label{display:block;color:var(--sage);font-size:.85rem;margin:14px 0 7px}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.primary,.secondary{border-radius:10px;padding:10px 13px}
.primary{border:0;background:var(--gold);color:var(--gold-ink);font-weight:800}
.secondary{background:var(--panel);border:1px solid var(--edge-2);color:var(--text)}
progress{display:block;width:100%;height:10px;margin:13px 0;accent-color:var(--gold)}
summary{touch-action:manipulation}
.model-details summary,.memory-details summary,.install-details summary{cursor:pointer;color:var(--gold);font-weight:700;min-height:43px;padding:9px 0}
.model-details,.memory-details{margin-top:12px}
.mini-details{border-top:1px solid var(--edge);padding:8px 0;margin-top:18px}
.mini-details summary{font-weight:650;color:var(--sage);min-height:43px;padding:10px 0;cursor:pointer}
.mini-details a{color:var(--gold)}

/* ---------- Cards & panels (ledger surfaces) ---------- */
.card,.bubble{background:var(--panel);border:1px solid var(--edge);border-radius:14px;padding:16px;margin:10px 0}
.card{padding:17px}
.tool-shell{border:1px solid var(--edge);background:var(--panel);border-radius:14px;padding:17px;margin-top:12px}
.memory-record{border:1px solid var(--edge);border-radius:14px;margin:10px 0;padding:13px;background:var(--panel)}
.memory-record p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem;margin:8px 0;color:#cfd6c8}
.memory-record .small{line-height:1.5}
.memory-record .actions button{font-size:.85rem}
.memory-grid{display:grid;grid-template-columns:1fr;gap:8px}
@media(min-width:600px){.memory-grid{grid-template-columns:1fr 1fr}}
@media(min-width:620px){.grid{grid-template-columns:1fr 1fr}}
article.note{background:var(--panel);border:1px solid var(--edge);border-radius:14px;padding:13px}
article.note strong{color:var(--gold)}
article.note p{font-size:.86rem;margin-bottom:4px;color:#cfd6c8}
.hebrew-result{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;font:inherit;font-size:.89rem;padding:13px;background:var(--panel);border:1px solid var(--edge);border-radius:12px;max-height:45dvh;overflow:auto;min-height:110px;color:var(--text)}
.app-link{display:flex;flex-direction:column;gap:7px;min-height:92px;padding:16px;border:1px solid var(--edge-2);border-radius:14px;background:var(--panel);color:var(--text);text-decoration:none;margin:12px 0;line-height:1.45}
.app-link strong{color:var(--gold);font-size:1.1rem}
.app-link span{font-size:.85rem;color:var(--muted)}
.app-link .app-link-action{color:var(--gold);font-weight:750}
.app-link:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.clean-page{max-width:700px;margin:18px auto 50px!important}
.subpage-header{display:block;border:0;background:transparent;padding:0 0 10px;height:auto}
.subpage-header h2{font-size:1.42rem;line-height:1.3;margin:3px 0;color:var(--text)}
.subpage-header p{font-size:.9rem;color:var(--muted);margin:0}
.tool-line{display:flex;align-items:center;gap:8px}
.tool-line input{flex:1;min-width:0;width:auto!important}
.tool-line .primary{min-width:76px;min-height:44px}
.example-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:15px}
.example-chips button{background:var(--panel);color:var(--text);border:1px solid var(--edge-2);min-height:39px;border-radius:99px;padding:8px 12px;font-size:.82rem}
.example-chips button:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.language-answer,#languageResult{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.91rem;line-height:1.6;color:var(--text);background:transparent;border:0;margin:15px 0 3px;max-height:43dvh;overflow:auto}
.language-switch{display:flex;align-items:stretch;flex-wrap:wrap;gap:6px;padding:5px;border-radius:999px;background:var(--panel);border:1px solid var(--edge);margin:14px 0 19px}
.language-switch>*{flex:1;min-width:135px;text-align:center;font-size:.85rem;font-weight:700;padding:10px 12px;border-radius:999px;min-height:42px;display:grid;place-items:center}
.language-switch button{color:var(--sage);background:transparent;border:0}
.language-switch button:hover{background:#16241b}
.language-switch[aria-current=page],.language-switch [aria-current=page]{color:var(--gold-ink);background:var(--gold)}
.app-directory{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--edge);border-radius:14px;background:var(--panel);margin-top:13px}
.directory-link{min-height:74px;padding:14px 16px;text-decoration:none;color:var(--text);display:flex;align-items:center;justify-content:space-between;gap:10px}
.directory-link:not(:last-child){border-bottom:1px solid var(--edge)}
.directory-link strong,.directory-link small{display:block}
.directory-link strong{font-size:1rem;font-weight:650}
.directory-link small{font-size:.78rem;color:var(--muted);margin-top:4px}
.directory-link>span:last-child{color:var(--gold);font-size:1.15rem}
.directory-link:hover{background:#16241b}
.directory-link:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}

/* ---------- Talk: the Mycelium Ledger thread ---------- */
#talk:not([hidden]){display:flex;flex-direction:column;height:calc(100dvh - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:320px}
.chat{max-height:min(44dvh,410px);min-height:125px;overflow:auto;overscroll-behavior:contain;margin:12px 0}
#talk .chat{order:1;flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;margin:0 auto;width:100%;max-width:760px;padding:24px 4px 12px 40px;scrollbar-width:thin;scroll-behavior:smooth;
 background-image:linear-gradient(90deg,transparent 0,transparent 18px,var(--edge-2) 18px,var(--edge-2) 19px,transparent 19px);background-repeat:repeat-y}
/* Ledger entries: no bubbles. Each turn hangs off the thread on a gold node. */
#talk .bubble{position:relative;background:transparent;border:0;box-shadow:none;border-radius:0;max-width:100%;margin:6px 0 18px;padding:8px 2px 2px;color:var(--text);line-height:1.62;font-size:.98rem;white-space:pre-wrap;overflow-wrap:anywhere}
#talk .bubble::before{content:"";position:absolute;left:-26px;top:15px;width:10px;height:10px;border-radius:100%;background:var(--bg);border:2px solid var(--gold)}
#talk .bubble.mine{background:transparent;max-width:100%;margin-left:0}
#talk .bubble.mine::before{border-color:var(--gold-dim)}
#talk .who{font-weight:700;font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);margin-bottom:5px}
#talk .mine .who{color:var(--faint)}
#talk .bubble>div:nth-child(2){overflow-wrap:anywhere;white-space:pre-wrap}
#talk .bubble.mine>div:nth-child(2){color:var(--sage)}
.who{font-weight:750;font-size:.73rem;color:var(--gold);margin-bottom:8px}
.bubble{white-space:pre-wrap;overflow-wrap:anywhere;max-width:95%;line-height:1.55}
.mine{background:var(--panel);margin-left:auto;max-width:85%}
.message-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding-top:10px;margin-top:12px;border-top:1px solid var(--edge)}
.message-tools button{min-height:34px;padding:6px 12px;border-radius:99px;background:var(--panel);color:#d8cdb2;border:1px solid var(--edge-2);font-size:.75rem;font-weight:650}
.message-tools button:hover{background:#16241b;color:var(--text)}
.message-tools button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.response-timestamp{font-size:.72rem;line-height:1.45;letter-spacing:.01em;color:var(--faint);margin-top:10px;padding-top:8px;border-top:1px solid var(--edge);white-space:normal}
.web-sources{border-top:1px solid var(--edge);margin-top:12px;padding-top:9px;display:grid;gap:7px;font-size:.83rem;white-space:normal;color:var(--muted)}
.web-sources a{color:var(--gold);overflow-wrap:anywhere;text-decoration:underline}
.source-read-status{font-size:.78rem;color:var(--faint)}
.cloud-thinking{opacity:.85;animation:pom-thinking 1.3s ease-in-out infinite}
@keyframes pom-thinking{0%,100%{opacity:.55}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.cloud-thinking{animation:none;opacity:1}#talk .chat{scroll-behavior:auto}}

/* ---------- Article surface: a Paper sheet inside the ledger ----------
 * fix-7's renderer (agent/article-format.js) emits bare h1-h3/p/ul/hr inside
 * the answer body; bubble() marks article answers .has-article/.article-body. */
#talk .bubble.has-article{background:linear-gradient(180deg,var(--paper) 0%,var(--paper-lo) 100%);color:var(--ink);border:1px solid #d9d2bf;border-radius:6px;padding:18px 18px 14px;box-shadow:0 14px 34px #000a;white-space:normal}
#talk .bubble.has-article::before{background:var(--paper)}
#talk .bubble.has-article .who{color:var(--red)}
.article-body{white-space:normal!important}
.article-body h1{font-family:var(--serif);font-size:1.72rem;font-weight:600;line-height:1.14;letter-spacing:-.02em;color:var(--ink);margin:2px 0 10px}
.article-body h1+p{font-size:1.05rem;line-height:1.55;font-weight:550;color:var(--ink-2)}
.article-body h2{font-family:var(--serif);font-size:1.16rem;font-weight:600;color:var(--ink);margin:22px 0 7px;line-height:1.3}
.article-body h3{font-size:.78rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink);margin:20px 0 7px}
.article-body p{font-size:.96rem;line-height:1.68;color:var(--ink-2);margin:0 0 13px}
.article-body ul,.article-body ol{font-size:.96rem;line-height:1.6;color:var(--ink-2);margin:0 0 13px;padding-left:20px}
.article-body li{margin:3px 0}
.article-body a{color:var(--red)}
.article-body strong{color:var(--ink)}
.article-body em{color:var(--ink-2)}
.article-body code{background:rgba(20,26,38,.07);padding:1px 5px;border-radius:5px;font-size:.86em}
.article-body hr{border:0;border-top:2px solid var(--ink);margin:24px 0 12px}
.article-body hr~p{font-size:.8rem;line-height:1.55;color:var(--p-muted);margin-bottom:8px}
#talk .bubble.has-article .message-tools{border-top-color:var(--p-edge)}
#talk .bubble.has-article .message-tools button{background:rgba(20,26,38,.04);border-color:var(--p-edge);color:var(--p-muted)}
#talk .bubble.has-article .message-tools button:hover{background:rgba(20,26,38,.1);color:var(--ink)}
#talk .bubble.has-article .response-timestamp{color:var(--p-faint);border-top-color:var(--p-edge)}
#talk .bubble.has-article .web-sources{border-top-color:var(--p-edge);color:var(--p-muted)}
#talk .bubble.has-article .web-sources a{color:var(--red)}
#talk .bubble.has-article .source-read-status{color:var(--p-faint)}

/* ---------- Composer (shell frame) ---------- */
.composer{background:var(--panel);border:1px solid var(--edge-2);border-radius:24px;padding:10px;margin-bottom:14px;box-shadow:0 10px 30px #0007}
#talk .composer{order:2;flex:0 0 auto;position:relative;width:100%;max-width:760px;margin:0 auto 5px;padding:9px 10px}
.composer label{margin:0 0 7px}
.composer .actions{margin-top:8px}
.composer-line{display:flex;align-items:flex-end;gap:8px;min-height:46px}
#q{resize:none;flex:1 1 auto;width:100%;min-width:0;min-height:44px;max-height:180px;overflow-y:auto;background:transparent;color:var(--text);border:0;outline:none;font-size:16px;line-height:1.45;padding:11px 4px 7px;box-shadow:none}
#q::placeholder{color:var(--faint);opacity:1}
#q:focus-visible{outline:none}
.voice-button,.send-button{border-radius:100%;width:43px;min-width:43px;height:43px;min-height:43px;display:grid;place-items:center;padding:0;flex:none}
.voice-button{color:var(--sage);background:transparent;border:0}
.voice-button.listening{color:#fff;background:var(--red);box-shadow:0 0 0 3px rgba(194,36,58,.35)}
.send-button{background:var(--gold);border:0;color:var(--gold-ink)}
.send-button:disabled{background:#3a4438;color:#8b968a}
.voice-status{margin:6px 5px 1px;font-size:.75rem;line-height:1.3;color:var(--sage)}

/* ---------- Guest access (Talk screen) ---------- */
.guest-access{border:1px solid var(--edge);background:var(--panel);border-radius:14px;padding:12px 14px;margin:0 0 12px}
.guest-access .small{font-size:.8rem;line-height:1.5;margin:6px 0;color:var(--muted)}
.guest-access .actions{margin:9px 0;gap:9px}
.guest-access button{font-size:.85rem;min-height:44px}
.guest-access a{color:var(--gold);text-decoration:underline;text-underline-offset:2px}
.guest-consent{display:flex;gap:9px;align-items:flex-start;margin:10px 0;color:var(--text);font-size:.81rem;line-height:1.45}
.guest-consent input{flex:none;margin-top:3px;accent-color:var(--gold)}
.guest-challenge{margin-top:10px;min-height:65px}
@media(max-width:390px){.guest-access{padding:11px}.guest-access .actions button{flex:1}}

/* ---------- History (ledger rows) ---------- */
#history .history-entry{display:flex;align-items:flex-start;gap:12px;justify-content:space-between;padding:14px;border-radius:14px;border:1px solid var(--edge);background:var(--panel);margin:10px 0}
#history .history-title{font-size:.95rem;color:var(--text);font-weight:650;overflow-wrap:anywhere}
#history .history-date{font-size:.74rem;color:var(--muted);margin-top:5px}
#history .history-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
#history .history-actions button{font-size:.76rem;border-radius:10px;color:var(--text);background:var(--panel-2);border:1px solid var(--edge-2);padding:7px 9px;min-height:35px}
#history .history-entry[aria-current=true]{border-color:var(--gold)}
@media(max-width:480px){#history .history-entry{display:block}#history .history-actions{justify-content:flex-start;margin-top:8px}}

/* ---------- Workflows (Tools) ---------- */
#workflowCard textarea,#workflowCard select{display:block;width:100%;max-width:100%;padding:12px;margin:6px 0 13px;background:var(--panel-2);color:var(--text);border:1px solid var(--edge-2);border-radius:10px;font:inherit}
#workflowCard textarea{min-height:95px;resize:vertical}
#workflowCard label{display:block;margin-top:9px}
#workflowCard .actions{display:flex;gap:8px;flex-wrap:wrap}
#workflowCard .actions button{min-height:44px}
#workflowSteps{padding-left:24px;line-height:1.75}
.workflow-output{white-space:pre-wrap;overflow-wrap:anywhere;max-height:45dvh;overflow:auto;padding:12px;border:1px solid var(--edge);border-radius:10px;color:var(--text);font:inherit;font-size:.82rem;background:var(--panel-2)}

/* ---------- Settings pages: base layout (ledger) ---------- */
.settings-page{max-width:760px;margin:20px auto;padding-bottom:45px}
.settings-page h2,#notes h2{color:var(--text)}
#knowledge,#notes,#apps,#hebrew{max-width:760px;margin:18px auto;padding-bottom:55px}

/* ---------- Settings: the Paper sheet ----------
 * Same shell around it — the Settings content surface is Paper (direction B):
 * white cards, hairline edges, red pill switches, red primary. The three real
 * consent inputs (#webSearchConsent/#libraryConsent/#researchMemoryConsent)
 * and every other Settings checkbox are restyled as switches by CSS only;
 * their elements, events and localStorage persistence are untouched. */
#settings{background:linear-gradient(180deg,var(--paper) 0%,var(--paper-lo) 100%);color:var(--ink);border-radius:20px;padding:22px 16px 28px;margin-top:16px;box-shadow:0 18px 50px #0009}
#settings h2,#settings h3{color:var(--ink)}
#settings p,#settings .small,#settings .sub,#settings .status{color:var(--p-muted)}
#settings .card{background:#fff;border:1px solid var(--p-edge);border-radius:18px;box-shadow:0 8px 24px rgba(30,40,70,.07);color:var(--ink)}
#settings label{color:var(--ink)}
#settings input:not([type=checkbox]):not([type=file]),#settings select,#settings textarea{background:#fff;border:1px solid rgba(20,26,38,.18);color:var(--ink)}
#settings input::placeholder,#settings textarea::placeholder{color:var(--p-faint)}
#settings .primary{background:var(--red);color:#fff}
#settings .secondary{background:#fff;border:1px solid rgba(20,26,38,.16);color:var(--ink)}
#settings .model-details summary,#settings .memory-details summary,#settings .install-details summary,#settings .mini-details summary{color:var(--ink)}
#settings .mini-details{border-top-color:var(--p-edge)}
#settings a{color:var(--red)}
#settings .connection-state{color:var(--p-muted)}
#settings button:focus-visible,#settings textarea:focus-visible{outline-color:var(--red)}
#settings progress{accent-color:var(--red)}
#settings input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:50px;height:30px;min-height:30px;border-radius:99px;background:#d8d2c2;border:1px solid rgba(20,26,38,.08);position:relative;cursor:pointer;transition:background .15s;margin:0;vertical-align:middle;padding:0}
#settings input[type=checkbox]::after{content:"";position:absolute;top:2px;left:2px;width:24px;height:24px;border-radius:100%;background:#fff;box-shadow:0 1px 4px rgba(20,26,38,.25);transition:left .15s}
#settings input[type=checkbox]:checked{background:var(--red)}
#settings input[type=checkbox]:checked::after{left:24px}
#settings input[type=checkbox]:focus-visible{outline:2px solid var(--red);outline-offset:2px}
#privacyResearchControls label.small{display:flex;align-items:center;gap:12px}
#privacyResearchControls label.small input{order:2;margin-left:auto}

/* ---------- Small screens ---------- */
@media(max-width:480px){
 main{padding:0 9px}
 .app-header{gap:4px;padding-inline:8px}
 .app-header .logo{font-size:1.06rem}
 .brand-lockup small{font-size:.52rem}
 .new-chat{padding:7px 10px;font-size:.74rem}
 .connection-state{font-size:.65rem;margin-right:2px}
 #talk:not([hidden]){min-height:260px}
 #talk .chat{padding:14px 3px 12px 38px}
 #talk .bubble{font-size:.94rem}
 #talk .composer{padding:7px 8px;margin-bottom:4px}
 #q{max-height:135px}
 .voice-button,.send-button{height:41px;min-height:41px;width:41px;min-width:41px}
 .settings-page,#language,#hebrew,#notes,#apps{margin-top:15px}
 #settings{padding:18px 12px 24px}
 .article-body h1{font-size:1.5rem}
}
@media(max-width:390px){
 main{padding-inline:9px}
 .tabs button{font-size:.8rem;padding:10px 2px}
 .hero-description{font-size:.84rem}
}
