/* Sokil Advisory: light/dark theme.
   Light is the default. Dark applies only when a visitor picks it
   (saved in localStorage, set on <html data-theme="dark"> before paint). */

/* ---------- theme toggle button (both themes) ---------- */
.theme-btn{display:inline-grid;place-items:center;width:40px;height:40px;margin-left:14px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--body);cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.theme-btn:hover{color:var(--blue);border-color:var(--line-strong)}
.theme-btn:focus-visible{outline:2px solid var(--terra-ink);outline-offset:3px}
.theme-btn svg{width:20px;height:20px}
.theme-btn .sun{display:none}
html[data-theme="dark"] .theme-btn .sun{display:block}
html[data-theme="dark"] .theme-btn .moon{display:none}
.nav ul{margin-left:auto}
@media (max-width:640px){
  .theme-btn{order:1;margin-left:auto;width:44px;height:44px}
  .nav .menu-btn{order:2;margin-left:8px}
}

/* ---------- dark palette ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0e1625; --bg2:#121c2e; --card:#172238; --line:#253149; --line-strong:#56627a;
  --ink:#e4e8f0; --strong:#f4f6fa; --body:#b4bdcc; --muted:#8a94a8;
  --blue:#a9c1e8; --blue-2:#8ea3c4; --blue-tint:#1f2e4a;
  --fill:#2f4f82;
  --terra-ink:#e39a7a; --terra-tint:#3a2a26;
  --shadow:0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg:0 2px 4px rgba(0,0,0,.3), 0 24px 56px rgba(0,0,0,.45);
}
html[data-theme="dark"] a:hover{color:var(--strong)}

/* header */
html[data-theme="dark"] .nav{background:rgba(18,28,46,.88);border-color:var(--line)}
html[data-theme="dark"] img[src*="/mark.svg"]{filter:brightness(0) invert(1);opacity:.92}
/* header logo: the designer's cream version in dark mode */
.brand-d{display:none !important}
html[data-theme="dark"] .brand-l{display:none !important}
html[data-theme="dark"] .brand-d{display:block !important}
html[data-theme="dark"] #services::before,
html[data-theme="dark"] #services::after{filter:brightness(0) invert(1)}

/* buttons */
html[data-theme="dark"] .btn-primary{box-shadow:0 8px 20px rgba(0,0,0,.35)}
html[data-theme="dark"] .btn-ghost{background:rgba(255,255,255,.04);border-color:var(--line-strong)}
html[data-theme="dark"] .btn-ghost:hover{background:rgba(255,255,255,.1)}
html[data-theme="dark"] .menu-btn{border-color:var(--line)}

/* navy bands sit a step lighter than the page so they still read as bands */
html[data-theme="dark"] .bill,
html[data-theme="dark"] .cta,
html[data-theme="dark"] .talk-head{background:#1a2a47}
html[data-theme="dark"] .group-head .gi,
html[data-theme="dark"] .chip.active{background:var(--fill);border-color:var(--fill)}

/* cards and panels */
html[data-theme="dark"] .svc:hover{border-color:#3a4862;box-shadow:0 18px 44px rgba(0,0,0,.35)}
html[data-theme="dark"] .svc-num{color:#5d6880}
html[data-theme="dark"] .where{background:rgba(255,255,255,.03)}
html[data-theme="dark"] .chip{background:rgba(23,34,56,.85)}
html[data-theme="dark"] .chip:hover{background:var(--card)}
html[data-theme="dark"] .talk-foot{background:var(--bg2)}
html[data-theme="dark"] .step:not(:last-child)::after{background:var(--blue);opacity:.3}

/* navy icons drawn inline become light blue */
html[data-theme="dark"] [fill="#23395d"]{fill:var(--blue)}
html[data-theme="dark"] [stroke="#23395d"]{stroke:var(--blue)}

/* logos are full-colour artwork made for white: give them a light plate */
html[data-theme="dark"] .logo-slot{background:linear-gradient(180deg,#f7f5f0,#ece7dc);border-bottom-color:var(--line)}
html[data-theme="dark"] .logo-slot .name{color:#1d2433}
html[data-theme="dark"] .logo-slot .name small{color:#5a6170}

/* sub-page heroes: same skyline, navy fade instead of cream */
html[data-theme="dark"] .hero-bg .photo{filter:saturate(.7) brightness(.55)}
html[data-theme="dark"] .hero-bg .tint{opacity:.4}
html[data-theme="dark"] .hero-bg .fade{background:linear-gradient(90deg,#0e1625 0%,rgba(14,22,37,.96) 38%,rgba(14,22,37,.6) 62%,rgba(14,22,37,.2) 85%),linear-gradient(180deg,rgba(14,22,37,.4) 0%,rgba(14,22,37,0) 25%,rgba(14,22,37,0) 55%,#0e1625 100%)}
@media (max-width:980px){html[data-theme="dark"] .hero-bg .fade{background:linear-gradient(180deg,rgba(14,22,37,.86) 0%,rgba(14,22,37,.93) 60%,#0e1625 100%)}}

/* services page panels */
html[data-theme="dark"] .st.free,
html[data-theme="dark"] .opt.dark{background:#1a2a47;border-color:#2b3d5e}
html[data-theme="dark"] .opt .bf{border-top-color:var(--line)}
html[data-theme="dark"] .page-hero-band{background:linear-gradient(180deg,#0b1220 0%,#0e1625 100%)}
html[data-theme="dark"] .page-hero-band .page-hero::after{filter:brightness(0) invert(1);opacity:.05}
/* "On this page" jump bar, always visible on every main page. Markup: <nav class="toc"> inside .site-header, after .nav */
.toc{position:absolute;left:0;right:0;top:calc(100% + 8px);padding:0 16px}
.toc-in{max-width:1240px;margin:0 auto;height:46px;display:flex;align-items:stretch;gap:28px;padding:0 22px;background:rgba(255,255,255,.94);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.toc-label{flex:none;align-self:center;font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.toc ul{list-style:none;margin:0;padding:0;display:flex;gap:28px;min-width:0;overflow-x:auto;scrollbar-width:none}
.toc ul::-webkit-scrollbar{display:none}
.toc li{flex:none;display:flex}
.toc a{display:flex;align-items:center;font-size:14px;color:var(--body);white-space:nowrap;border-bottom:2px solid transparent;padding-top:2px;transition:color .15s ease,border-color .15s ease}
.toc a:hover{color:var(--blue)}
.toc a.on{color:var(--strong);font-weight:600;border-bottom-color:var(--terra)}
.toc a:focus-visible{outline:2px solid var(--terra-ink);outline-offset:-2px;border-radius:4px}
html[data-theme="dark"] .toc-in{background:rgba(18,28,46,.9)}
@media (min-width:1700px){.toc-in{max-width:1384px}}
.nav.open ~ .toc{display:none}
html:has(.toc) [id]{scroll-margin-top:150px}
@media (max-width:960px){.toc-label{display:none}.toc-in{height:44px;padding:0}.toc ul{gap:24px;padding:0 32px 0 18px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 32px),transparent)}}
@media (max-width:700px){.toc{top:calc(100% + 6px)}html:has(.toc) [id]{scroll-margin-top:126px}}
html:has(.toc) .hero,html:has(.toc) .page-hero-band{padding-top:150px}
html:has(.toc) main.page{padding-top:116px}
@media (max-width:700px){html:has(.toc) main.page{padding-top:96px}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
