/* Original brand constants stay unchanged; only surface/text tokens switch. */
/* Day mode: darker grey text and lines, heavier body text. Brand colours (navy, teal) are unchanged. */
html[data-theme="day"]{--dim:#2e3a56;--faint:#56627f;--line:#b3bfd2}
html[data-theme="day"] body :is(p,li,td,dd,label,small,.small,.hint,.lead){font-weight:500}
html[data-theme="night"]{--bg:#10182b;--soft:#131e34;--card:#18233b;--ink:#eaf0fa;--dim:#b4c0d6;--faint:#a6b6d2;--line:#30405e;--link:#64d7df}
html[data-theme="dark"]{--bg:#090f1c;--soft:#0d1525;--card:#111b2e;--ink:#eaf0fa;--dim:#b4c0d6;--faint:#a6b6d2;--line:#293a55;--link:#64d7df}
.fm-theme{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border:1px solid var(--line);border-radius:999px;color:var(--ink);flex:none;font-family:var(--latin,sans-serif);font-size:14px}
.fm-theme select{border:0;background:var(--bg);color:var(--ink);font:inherit;max-width:95px;min-height:30px;cursor:pointer}
.fm-theme:focus-within{outline:2px solid var(--teal);outline-offset:3px}
html[data-theme="night"] .top,html[data-theme="dark"] .top{background:var(--bg)}
html[data-theme="night"] :is(.hero h1,.sec-head h2,.card h3,.value b,.legal h1,.legal h2,.legal h3,.apphero h1,.platform strong,.langs summary,.langs .menu a,.legal details summary,.legal table th,.btn.ghost),html[data-theme="dark"] :is(.hero h1,.sec-head h2,.card h3,.value b,.legal h1,.legal h2,.legal h3,.apphero h1,.platform strong,.langs summary,.langs .menu a,.legal details summary,.legal table th,.btn.ghost){color:var(--ink)}
html[data-theme="night"] :is(.value,.facts,.langs .menu,.legal details,.legal table,.platform),html[data-theme="dark"] :is(.value,.facts,.langs .menu,.legal details,.legal table,.platform){background:var(--card)}
html[data-theme="night"] :is(.facts th,.legal table th),html[data-theme="dark"] :is(.facts th,.legal table th){background:var(--soft)}
html[data-theme="night"] a,html[data-theme="dark"] a{color:var(--link)}
html[data-theme="night"] .btn.main,html[data-theme="dark"] .btn.main{background:var(--teal);color:var(--navy)}
html[data-theme="night"] .btn.ghost,html[data-theme="dark"] .btn.ghost{border-color:var(--line)}
html[data-theme="night"] .brand,html[data-theme="dark"] .brand{background:#fff;color:#1b2648;border-radius:10px;padding:5px 9px}
html[data-theme="night"] .brand small,html[data-theme="dark"] .brand small{color:#4f5b78}
html[data-theme="night"] .card .tag.client,html[data-theme="dark"] .card .tag.client{color:var(--ink);background:var(--soft)}
html[data-theme="night"] .card .tag,html[data-theme="dark"] .card .tag{color:var(--link)}
.top .wrap{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.top .brand{flex-shrink:0}
@media(min-width:821px) and (max-width:1150px){.top .nav{order:3;flex-basis:100%;justify-content:center}.top .langs{margin-inline-start:auto}}
@media(max-width:500px){.top .wrap{gap:7px}.top .brand{font-size:12px;letter-spacing:0}.top .brand img{width:32px}.top .brand small{font-size:9px}.fm-theme{padding:2px 6px}.fm-theme select{font-size:12px;max-width:70px}.langs summary{padding:5px 8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}
@media print{html[data-theme]{--bg:#fff;--soft:#fff;--card:#fff;--ink:#111;--dim:#333;--line:#aaa;--link:#111;color-scheme:light!important}.fm-theme{display:none!important}}
