:root[data-theme="light"] {color-scheme:light}
:root[data-theme="dark"] {color-scheme:dark}
.theme-choice {position:relative;display:inline-flex; gap:.45rem; align-items:center; color:var(--muted); font-size:.8rem; font-weight:500; white-space:nowrap}
.theme-choice select {width:auto; max-width:10rem; padding:6px 8px; margin:0; background:var(--field); color:var(--text); border:1px solid var(--border); border-radius:8px; font:inherit; cursor:pointer}
.theme-choice select:focus-visible {outline:2px solid var(--accent);outline-offset:2px}
.public-appearance {display:flex; justify-content:flex-end; margin-bottom:12px}
:root[data-theme="dark"] .workspace, :root[data-theme="dark"] .marketing, :root[data-theme="dark"] .workspace-main, :root[data-theme="dark"] .workspace-header {--accent:#8ccfb4; --accent-hover:#a9dcc8; --info-bg:#213c32}
:root[data-theme="dark"] .workspace button:not(.secondary):not(.link-button), :root[data-theme="dark"] .marketing .cta {background:#306c55;color:white}
:root[data-theme="dark"] .ai-chips button, :root[data-theme="dark"] .chat-suggestions button {background:#253e34!important;color:#d9eee4!important;border-color:#405b4e!important}
:root[data-theme="dark"] .ai-form textarea {background:var(--field);color:var(--text)}
:root[data-theme="dark"] a:not([class]) {color:#8bbcf4}
:root[data-theme="dark"] .focus-card a {color:#233a2d}
@media (max-width:700px) {
  .theme-choice span {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .theme-choice select {max-width:7.5rem}
  .workspace-header {height:auto; min-height:70px; flex-wrap:wrap; gap:6px; padding-block:8px}
  .workspace-header .user-info {max-width:100%; flex-wrap:wrap}
  .marketing-nav, .marketing-nav>div {flex-wrap:wrap}
}
@media print {.theme-choice,.public-appearance{display:none}}

.theme-header-row {display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}

/* сегментированный переключатель темы */
.theme-seg{display:inline-flex;align-items:center;gap:2px;padding:4px;background:var(--field,#f1f5f3);border:1px solid var(--border,#dce8e2);border-radius:999px}
.theme-seg label{position:relative;display:grid;place-items:center;width:34px;height:34px;border-radius:999px;cursor:pointer;color:var(--muted);transition:background .15s ease,color .15s ease}
.theme-seg label:hover{color:var(--d-primary-dark,#046c4e)}
.theme-seg input{position:absolute;opacity:0;width:1px;height:1px}
.theme-seg .ts-ico{display:grid;place-items:center}
.theme-seg .ts-ico svg{width:17px;height:17px}
.theme-seg input:checked + .ts-ico{background:var(--d-primary,#059669);color:#fff;width:34px;height:34px;border-radius:999px;box-shadow:0 4px 12px rgba(5,150,105,.28)}
.theme-seg input:focus-visible + .ts-ico{outline:2px solid var(--d-primary,#059669);outline-offset:2px}
:root[data-theme="dark"] .theme-seg{background:#1A2420;border-color:#26332D}
:root[data-theme="dark"] .theme-seg input:checked + .ts-ico{background:#34D399;color:#06251C;box-shadow:0 4px 14px rgba(52,211,153,.25)}
