:root{--theme-card:#f2f6ff;--theme-track:#e3ebf8;--theme-text:#466184;--theme-muted:#778ba9;--theme-border:#cfdfff}
html[data-theme=dark]{--ink:#f3f6ff;--muted:#d3dff2;--line:#33435c;--paper:#172235;--canvas:#0b1220;--blue:#3678ff;--shadow:0 16px 42px #0005;--theme-card:#152238;--theme-track:#0c1729;--theme-text:#edf3ff;--theme-muted:#c6d5eb;--theme-border:#334b6e;color-scheme:dark;background:#0b1220}
.theme-control{flex-shrink:0;padding:13px 12px;border:1px solid var(--theme-border);border-radius:15px;background:var(--theme-card);color:var(--theme-text);margin-top:12px;font-size:12px;line-height:1.5}
.theme-control-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.theme-control-title strong{font-size:13px}.theme-control-title small{font-size:10px;letter-spacing:.07em;color:var(--theme-muted)}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:var(--theme-track);border-radius:13px}.theme-options button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-width:0;min-height:62px;padding:8px 4px;border:0;border-radius:10px;background:transparent;color:var(--theme-text);font-size:13px;font-weight:700;cursor:pointer}.theme-options svg{width:21px;height:21px;display:block}.theme-options button[aria-pressed=true]{color:#fff;background:#2861e9;box-shadow:0 3px 10px #194dc833}.theme-options button:focus-visible{outline:3px solid #8ab2ff;outline-offset:2px}.theme-control p{font-size:11px;margin:11px 0 2px;color:var(--theme-text)}.theme-help{font-size:10px;color:var(--theme-muted)}
.theme-trigger svg{width:21px;height:21px}.theme-login-trigger{position:absolute;right:20px;top:16px;padding:8px 14px;min-height:42px;border:1px solid var(--theme-border);border-radius:12px;color:var(--theme-text);background:var(--theme-card);font-size:13px;cursor:pointer;z-index:10}.auth-shell{position:relative}
.theme-layer{position:fixed;inset:0;z-index:3000;background:#09142666;display:grid;place-items:center;padding:18px}.theme-popover{position:relative;width:min(340px,100%);padding:38px 18px 18px;border-radius:22px;background:var(--paper);box-shadow:0 20px 80px #0005;border:1px solid var(--line)}.theme-popover .theme-control{margin:0;border:0;padding:10px;background:transparent}.theme-popover .theme-control-title strong{font-size:17px}.theme-close{position:absolute;right:10px;top:8px;border:0;background:transparent;color:var(--muted);width:36px;height:36px;font-size:25px;cursor:pointer}
@media screen and (min-width:1181px){.top-actions .theme-trigger{display:none}.sidebar .theme-control{margin-top:12px}.sidebar>.profile{margin-top:12px}}
@media screen and (max-width:1180px){.sidebar .theme-control{display:none}.theme-trigger{display:grid;place-items:center}}
@media screen and (max-width:760px){.theme-login-trigger{right:14px;top:12px}.auth-shell .auth-card{margin-top:50px}}
@media print{.theme-control,.theme-trigger,.theme-login-trigger,.theme-layer{display:none!important}html[data-theme=dark],html[data-theme=dark] body{background:#fff!important;color:#12233f!important}html[data-theme=dark] #content *{color:#12233f!important;background-color:transparent!important;box-shadow:none!important}}

/* A clear hierarchy without dark blue or low-opacity helper text on dark surfaces. */
@media screen{
 html[data-theme=dark] :is(h1,h2,h3,h4,h5,h6){color:#f3f6ff!important}
 html[data-theme=dark] :is(input,textarea)::placeholder{color:#c3d2e8!important;opacity:1}
 html[data-theme=dark] :is(.eyebrow,.form-help,.form-intro,.planner-form-note,.hub-note,.theme-help){opacity:1}
}
