/* theme.css: the appearance button, and the site's night ground.
   Every page loads this after its own stylesheet. Night rules are scoped to html.night,
   which theme.js removes before paint when the visitor chose light (or their device is light). */

/* The appearance button: one icon, a tap moves on to the next choice */
.theme-btn{position:relative;appearance:none;-webkit-appearance:none;background:none;border:0;cursor:pointer;width:34px;height:34px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--mid);padding:0;margin:0 2px;-webkit-tap-highlight-color:transparent;transition:.15s;flex-shrink:0}
.theme-btn:hover{color:var(--ink);background:rgba(26,27,30,.05)}
.theme-btn svg{width:18px;height:18px;display:none}
.theme-btn .t-lab{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;display:none}
html[data-pref="night"] .theme-btn .t-night,html[data-pref="light"] .theme-btn .t-light,html[data-pref="auto"] .theme-btn .t-auto{display:block}
.theme-btn.phone{display:none;margin-left:auto}
@media(max-width:900px){.theme-btn.phone{display:inline-flex}.nav-hamburger{margin-left:0}}

/* Night: the app's own dark tokens (frontend/src/tokens.js DARK), so every card on the site is the app's card */
html.night{color-scheme:dark}
html.night body{
  --bg:#1C1B19;--bg-card:#252321;--bg-deep:#2A2825;--ink:#F4F1EA;--mid:#CBC7BF;--faint:#A19D95;
  --hairline:#35322E;--border:#35322E;
  --teal:#C2AECD;--accent:#C2AECD;--teal-soft:rgba(194,174,205,.12);--teal-mid:rgba(194,174,205,.32);--accent-soft:rgba(194,174,205,.12);
  background:#1C1B19;color:#F4F1EA}

/* the bar */
html.night nav{background:rgba(28,27,25,.82);border-bottom-color:rgba(244,241,234,.1)}
html.night nav .brand-icon,html.night nav .brand-logo{color:#F4F1EA}
html.night nav .brand-mark{color:rgba(244,241,234,.72)}
html.night .nav-link:hover,html.night .theme-btn:hover{background:rgba(244,241,234,.08)}
html.night .nav-cta:hover,html.night .btn-primary:hover,html.night .mobile-menu .mobile-cta:hover{background:#fff;color:#1C1B19;transform:none;box-shadow:none}
html.night .btn-secondary:hover{background:rgba(244,241,234,.06)}
html.night .mobile-menu{background:rgba(28,27,25,.98)}
html.night .lang-menu .lang-list{background:#252321;box-shadow:0 14px 36px -16px rgba(0,0,0,.7)}
html.night .lang-menu .lang-list a:hover{background:rgba(244,241,234,.08)}

/* the plum underlines are drawn into the page; brighten them on the night ground */
html.night .accent-word::after{filter:brightness(2.2)}
html.night .article-cta-inner .accent-word::after{filter:none}

/* night objects that would vanish on a night plane are lifted a tone instead */
html.night .article-cta-inner,html.night .decision-card{--bg:#F4F1EA;--ink:#1A1B1E;background:#252321;box-shadow:inset 0 0 0 1px #35322E}
html.night footer{border-top:1px solid rgba(244,241,234,.08)}
html.night ::selection{background:rgba(194,174,205,.35)}

/* One header on every page: the home's. The wordmark reads in a row, the trial button is a pill,
   the bar is 58px. theme.css loads after each page's own styles, so these win without !important. */
nav{height:58px}
nav .brand-stack{flex-direction:row;align-items:baseline;gap:7px}
nav .brand-icon{height:24px}
nav .brand-logo{font-size:21px}
nav .brand-mark{font-size:13px}
nav .nav-cta{border-radius:100px}
nav .nav-cta:hover{transform:none;box-shadow:none;background:#2A2927;color:#F4F1EA}
/* The footer is the night ground on both appearances, so nothing in it can be the page's --bg:
   at night that is the ground itself and the words vanish */
.footer-links a:hover,.footer-legal a:hover,.footer-brand-logo,.footer-family-name{color:#F4F1EA}
.mobile-menu{top:58px}
