/* RC34 — explicit appearance choice. No filters on photos and no global inversion. */
:root {color-scheme: only light;}
:root[data-sd5-theme="dark"] {color-scheme: dark;--sd5-dark-action:#146779;background:#18252c;}
.sd5-logo .sd5-logo-dark{display:none!important}
html[data-sd5-theme="dark"] .sd5-logo .sd5-logo-light.has-dark-logo{display:none!important}
html[data-sd5-theme="dark"] .sd5-logo .sd5-logo-dark{display:block!important}
html[data-sd5-theme="dark"] .sd5-logo .sd5-logo-fallback{background:#f7fafb;border-radius:5px;padding:3px;box-sizing:border-box}
.sd5-appearance{margin-top:12px;padding:10px 0 4px;display:grid;gap:7px}
.sd5-appearance-label{font-size:13px;font-weight:650;color:var(--sd5-muted)}
.sd5-appearance-options{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:4px;padding:3px;border:1px solid var(--sd5-line);border-radius:9px;background:var(--sd5-bg)}
.sd5-appearance-options button{min-width:0;min-height:36px;border:1px solid transparent;border-radius:6px;padding:5px 3px;background:transparent;color:var(--sd5-ink);font:inherit;font-size:12px;font-weight:650;line-height:1.2;cursor:pointer;box-shadow:none}
.sd5-appearance-options button[aria-pressed="true"]{background:#146779;color:white;border-color:#146779}
.sd5-appearance-options button:focus-visible{outline:2px solid #3997ae;outline-offset:1px}
html[data-sd5-theme="dark"] body.sd5-theme{--sd5-bg:#18252c;--sd5-panel:#1f2e37;--sd5-ink:#e1edf1;--sd5-muted:#aabfc9;--sd5-accent:#8bc9d9;--sd5-hover:#a5dce8;--sd5-line:#3b505b;background:var(--sd5-bg);color:var(--sd5-ink)}
html[data-sd5-theme="dark"] .sd5-theme .sd5-site-header{background:#1b2b34;border-top-color:#39849a;border-bottom-color:#3b505b}
html[data-sd5-theme="dark"] .sd5-theme .sd5-bottom-nav,html[data-sd5-theme="dark"] .sd5-theme .sd5-sheet{background:#1b2b34;border-color:#3b505b;color:#e1edf1}
html[data-sd5-theme="dark"] .sd5-theme .sd5-bottom-nav :is(a,button){color:#b0c5ce}
html[data-sd5-theme="dark"] .sd5-theme .sd5-bottom-nav a.is-current{background:#294552;color:#a6e2ef}
html[data-sd5-theme="dark"] .sd5-theme .sd5-search button,html[data-sd5-theme="dark"] .sd5-theme .sd5-solid-button{background:#146779;color:#fff;border-color:#287e94}
html[data-sd5-theme="dark"] .sd5-theme :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=file]):not([type=range]),textarea,select){color:#e1edf1;caret-color:#e1edf1}
html[data-sd5-theme="dark"] .sd5-theme :is(input,textarea)::placeholder{color:#aabfc9;opacity:1}
html[data-sd5-theme="dark"] .sd5-theme .sd5-search input{background:transparent!important;color:#e1edf1}
html[data-sd5-theme="dark"] .sd5-theme .sd5-appearance-options button[aria-pressed="true"]{background:#146779;color:#fff;border-color:#287e94}
html[data-sd5-theme="dark"] .sd5-theme .sd5-overlay{background:rgba(0,0,0,.65)}
/* Keep the conversation hierarchy and controls distinct at night. */
html[data-sd5-theme="dark"] .sd5-theme .scm-page .scm-bubble{background:#263b46;border-color:#435b67;color:#e1edf1}
html[data-sd5-theme="dark"] .sd5-theme .scm-page .scm-bubble.is-mine{background:#234e59;border-color:#3e6c77;color:#edf8fa}
html[data-sd5-theme="dark"] .sd5-theme .scm-page .scm-bubble small{color:#b4cad3}
html[data-sd5-theme="dark"] .sd5-theme .scm-page .scm-bubble .scm-receipt.is-read{color:#94dcea}
html[data-sd5-theme="dark"] .sd5-theme .scm-page .scm-compose textarea{background:#1b2b34;border-color:#435b67;color:#e1edf1}
html[data-sd5-theme="dark"] .sd5-theme .scm-page .scm-bubble .scm-reaction-badge{background:#365e70;color:#f5fbff}

/* RC35 — compact informational cookie banner, same behavior in both palettes. */
.sd5-theme .cookie-consent{
  --sd5-cookie-icon-bg:#e9f2f4;
  --sd5-cookie-button:#12677d;
  --sd5-cookie-button-hover:#0d5265;
  box-sizing:border-box;z-index:979;bottom:14px;
  width:min(600px,calc(100% - 24px));max-width:100%;
  display:grid;grid-template-columns:30px minmax(0,1fr) auto 32px;
  grid-template-areas:"icon copy action close" "icon policy action close";
  align-items:center;justify-content:initial;gap:3px 9px;
  padding:10px 12px;border:1px solid var(--sd5-line);border-radius:11px;
  background:var(--sd5-panel);color:var(--sd5-ink);box-shadow:0 5px 20px #17344222;
  font-family:inherit;
}
.sd5-theme .cookie-consent__icon{grid-area:icon;align-self:start;width:30px;height:30px;background:var(--sd5-cookie-icon-bg);color:var(--sd5-accent);border-radius:7px}
.sd5-theme .cookie-consent__icon svg{width:20px;height:20px}
.sd5-theme .cookie-consent__text{display:contents}
.sd5-theme .cookie-consent__text strong{grid-area:copy;min-width:0;margin:0;font-family:inherit;font-size:13px;font-weight:650;line-height:1.35;color:var(--sd5-ink);overflow-wrap:anywhere}
.sd5-theme .cookie-consent__text span{grid-area:policy;min-width:0;font-size:12px;line-height:1.4;color:var(--sd5-muted)}
.sd5-theme .cookie-consent__text a{display:inline-block;margin:0;padding:5px 0;color:var(--sd5-accent);font-weight:650;text-underline-offset:2px}
.sd5-theme .cookie-consent__actions{grid-area:action;display:flex;justify-self:end;width:auto;min-width:0;gap:0}
.sd5-theme .cookie-consent__button--primary{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:auto;min-width:0;min-height:40px;margin:0;padding:7px 15px;border:1px solid var(--sd5-cookie-button);border-radius:7px;background:var(--sd5-cookie-button);color:#fff;font-family:inherit;font-size:13px;font-weight:700;line-height:1.2;white-space:nowrap;box-shadow:none}
.sd5-theme .cookie-consent__button--primary:hover{background:var(--sd5-cookie-button-hover);border-color:var(--sd5-cookie-button-hover);color:#fff}
.sd5-theme .cookie-consent__close{grid-area:close;position:static;align-self:start;justify-self:end;box-sizing:border-box;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;margin:0;border:0;border-radius:6px;background:transparent;color:var(--sd5-muted);font:24px/1 Arial,sans-serif;box-shadow:none}
.sd5-theme .cookie-consent__close:hover{background:var(--sd5-cookie-icon-bg)}
.sd5-theme .cookie-consent :is(a,button):focus-visible{outline:2px solid var(--sd5-accent);outline-offset:2px}
html[data-sd5-theme="dark"] .sd5-theme .cookie-consent{--sd5-cookie-icon-bg:#294552;--sd5-cookie-button:#146779;--sd5-cookie-button-hover:#0d5265;box-shadow:0 5px 20px #0005}
@media(max-width:760px){
 .sd5-theme .cookie-consent{bottom:calc(76px + env(safe-area-inset-bottom,0px));width:min(600px,calc(100% - 20px));padding:9px 10px;gap:3px 8px;grid-template-columns:26px minmax(0,1fr) auto 32px;grid-template-areas:"icon copy copy close" ". policy action action"}
 .sd5-theme .cookie-consent__icon{width:26px;height:26px}
 .sd5-theme .cookie-consent__icon svg{width:18px;height:18px}
 .sd5-theme .cookie-consent__button--primary{min-height:36px;padding:7px 12px}
}
