/* Light / dark theme. Light is the brand default; dark is set on <html data-theme="dark"> by site.js. */
.theme-t .i-sun, .theme-t .i-moon { width: 19px; height: 19px; }
.theme-t .i-sun { display: none; }
[data-theme="dark"] .theme-t .i-sun { display: block; }
[data-theme="dark"] .theme-t .i-moon { display: none; }
.nav-cta .theme-t { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); display: grid; place-items: center; color: var(--ink-2); }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16140F;
  --bg-2: #1C1914;
  --card: #211E18;
  --ink: #F2ECE0;
  --ink-2: #C9C0B1;
  --muted: #968C7C;
  --line: #312C24;
  --line-2: #413A2F;
  --gold: #C28E22;
  --gold-d: #E3B95C;
  --gold-soft: #3B3019;
  --gold-tint: #2A2417;
  --dark: #0E0C09;
  --dark-2: #1A1712;
  --green: #7CC196;
  --green-soft: #1C2A21;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* bars with a baked-in cream glass */
[data-theme="dark"] .top { background: rgba(22, 20, 15, .88); }
[data-theme="dark"] .nav { background: rgba(22, 20, 15, .86); }
@media (max-width: 900px) { [data-theme="dark"] .side { background: rgba(33, 30, 24, .96); } }

/* things painted with --ink as a background need dark text now */
[data-theme="dark"] .filters .fp.on, [data-theme="dark"] .tagc.d, [data-theme="dark"] .seg span.on,
[data-theme="dark"] .btn-dark, [data-theme="dark"] .visa:not(.sepa) { color: #16140F; }
[data-theme="dark"] .seg span.on .ico { color: #16140F; }
@media (max-width: 900px) { [data-theme="dark"] .menu a.on { background: var(--gold); border-color: var(--gold); color: #16140F; } [data-theme="dark"] .menu a.on .ico { color: #16140F; } }
[data-theme="dark"] .tc .bx.dk { background: #0E0C09; }

/* dark cards keep an edge against the dark page */
[data-theme="dark"] .resume, [data-theme="dark"] .feat, [data-theme="dark"] .plan-hero, [data-theme="dark"] .breath { border: 1px solid #2B261F; }

/* inline SVG colours */
[data-theme="dark"] .logo [fill="rgb(17, 16, 14)"] { fill: var(--ink); }
[data-theme="dark"] circle[stroke="#F1E5C9"] { stroke: var(--gold-soft); }
[data-theme="dark"] [fill="#F1E5C9"] { fill: var(--gold-soft); }
[data-theme="dark"] [fill="#E3EFE6"] { fill: var(--green-soft); }
[data-theme="dark"] [fill="#F8F0DE"] { fill: var(--gold-tint); }
[data-theme="dark"] [fill="#EDE6D8"] { fill: var(--bg-2); }
[data-theme="dark"] [fill="#FFFDF8"] { fill: var(--card); }
[data-theme="dark"] [stroke="#FFFDF8"] { stroke: var(--card); }
[data-theme="dark"] [stroke="#D6CAB3"] { stroke: var(--line-2); }
[data-theme="dark"] text[fill="#57504A"] { fill: var(--ink-2); }
[data-theme="dark"] text[fill="#805A08"] { fill: var(--gold-d); }

/* page-specific fixes */
[data-theme="dark"] .cal .days span.l2 { color: #16140F; }
[data-theme="dark"] .cbt-r.bal, [data-theme="dark"] .tagc.g, [data-theme="dark"] .cbt-r.bal .k { border-color: #2C4434; }
[data-theme="dark"] .wc .pv .pg { background: #2A261F; border-color: var(--line-2); }
[data-theme="dark"] .danger { border-color: #4A2E26; }
[data-theme="dark"] .btn-danger { border-color: #6B3A2C; color: #F0A58C; }
[data-theme="dark"] .ov-prof a.out, [data-theme="dark"] .ov-prof a.out .ico { color: #F0A58C; }
[data-theme="dark"] .ov-scrim { background: rgba(0, 0, 0, .55); }
[data-theme="dark"] .sw::after { background: #F2ECE0; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select { color: var(--ink); }

/* theme switch row inside menus */
.theme-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; font: 600 14px/20px var(--sans); color: var(--ink-2); text-align: left; }
.theme-row:hover { background: var(--bg); color: var(--ink); }
.theme-row .i-moon, .theme-row .i-sun { width: 18px; height: 18px; color: var(--muted); }
.theme-row .i-sun { display: none; }
[data-theme="dark"] .theme-row .i-sun { display: block; }
[data-theme="dark"] .theme-row .i-moon { display: none; }
.theme-row .sw { margin-left: auto; transform: scale(.85); }
[data-theme="dark"] .theme-row .sw { background: var(--gold); }
[data-theme="dark"] .theme-row .sw::after { left: 23px; }

/* homepage mobile menu: tablets and phones */
.mnav { display: none; }
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .burger { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); }
  .plans { grid-template-columns: 1fr; max-width: 620px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 1080px) {
  .nav.open .mnav { display: grid; }
  .mnav { position: absolute; left: 0; right: 0; top: 100%; gap: 4px; padding: 12px 16px 20px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(36, 33, 28, .45); }
  .mnav a { display: flex; align-items: center; height: 48px; padding: 0 12px; border-radius: 12px; font: 600 16px/22px var(--sans); color: var(--ink); }
  .mnav a:hover { background: var(--bg); }
  .mnav .mn-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
  .mnav .mn-acts a { justify-content: center; }
  .mnav .mn-acts .btn { height: 48px; }
  .nav-cta .theme-t { width: 40px; height: 40px; }
}
