/* ═══ The sleek look, for every page built on style.css and site-nav.css (21 November 2026) ═══
   About, the app tour, the blog and its posts, the calculator, investors, the IR35 demo,
   practices, the legal pages and the 404 take the homepage's ground through this sheet (loaded
   last) and sleek.js (the moving nebula): near-black by night, a pale sky by day, the floating
   glass top bar, and the homepage's buttons. Learn's own tokens are answered at the end.
   Contrast, worked by hand: dark text-muted #A3AAB0 on surface #0B1226: 7.9:1; text-faint
   #8E979D on #0B1226: 6.3:1; light text-faint #5C6268 on #FFFFFF: 6.1:1, on #EEF3F1: 5.5:1. */

/* the tokens, at every layer style.css sets them: the page, and the bands it forces dark */
:root[data-theme="dark"],
:root[data-theme="dark"] :is(.nav-wrap, .sme-hero, .about-hero, .calc-page-hero, .blog-hero, .article-hero, .nf-404, .final-cta-section) {
  --color-bg: #070B1A; --color-surface: #0B1226; --color-surface-2: #111A31; --color-surface-offset: #0B1226;
  --color-border: rgba(255,255,255,.11); --color-divider: rgba(255,255,255,.07);
  --color-text: #F4F5F6; --color-text-mid: #C3C9CE; --color-text-muted: #A3AAB0; --color-text-faint: #8E979D;
  --color-navy: #F4F5F6; --color-navy-mid: #C3C9CE; --color-navy-surface: #111A31;
  --nb-space: #070B1A;
}
:root:not([data-theme="dark"]),
:root:not([data-theme="dark"]) :is(.nav-wrap, .sme-hero, .about-hero, .calc-page-hero, .blog-hero, .article-hero, .nf-404, .final-cta-section) {
  --color-bg: #EEF3F1; --color-surface: #FFFFFF; --color-surface-2: #F7FAF9; --color-surface-offset: #E7EEEC;
  --color-border: #D3DDDA; --color-divider: #E2E9E7;
  --color-text: #0B0D0E; --color-text-mid: #2C3338; --color-text-muted: #464C52; --color-text-faint: #5C6268;
  --color-navy: #0B0D0E; --color-navy-mid: #1E2428; --color-navy-surface: #E7EEEC;
  --color-teal-text: #0C6D61;
}

/* the ground: the nebula (sleek.js) shows through the page and its hero bands */
html { background: var(--color-bg, #070B1A); }
html body { background-color: transparent !important; background-image: none !important; }
/* style.css paints these bands with a stars-teal-violet-blue sky at (0,2,1) !important; this outranks it */
html:root :is(.hero, .sme-hero, .about-hero, .calc-page-hero, .blog-hero, .article-hero, .nf-404, .final-cta-section),
html:root[data-theme] :is(.hero, .sme-hero, .about-hero, .calc-page-hero, .blog-hero, .article-hero, .nf-404, .final-cta-section) { background: transparent !important; background-image: none !important; border-color: transparent; }
:is(.hero, .final-cta-section)::before { background: radial-gradient(48% 42% at 70% 55%, rgba(20,184,166,.22), transparent 70%) !important; }

/* the nebula's layer (shared with sleek.css, which these pages do not load) */
.nb-space { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: #070B1A; }
.nb-space canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.neb { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.neb-1 { width: 95vmax; height: 70vmax; left: -30vmax; top: -22vmax; background: radial-gradient(closest-side, rgba(20,184,166,.55), rgba(14,124,110,.25) 55%, transparent); }
.neb-2 { width: 80vmax; height: 60vmax; right: -28vmax; top: 10vmax; background: radial-gradient(closest-side, rgba(232,215,174,.20), rgba(94,234,212,.10) 55%, transparent); }
.neb-3 { width: 70vmax; height: 55vmax; left: 10vmax; bottom: -30vmax; background: radial-gradient(closest-side, rgba(58,96,122,.38), rgba(20,40,52,.18) 55%, transparent); }
.neb-4 { width: 40vmax; height: 26vmax; left: 38vmax; top: 18vmax; background: radial-gradient(closest-side, rgba(94,234,212,.16), transparent); }
:root:not([data-theme="dark"]) .nb-space { background: linear-gradient(180deg, #F3F7F5, #E9F0EE); }
:root:not([data-theme="dark"]) .neb { opacity: .9; }
:root:not([data-theme="dark"]) .neb-1 { background: radial-gradient(closest-side, rgba(94,234,212,.55), rgba(94,234,212,.18) 55%, transparent); }
:root:not([data-theme="dark"]) .neb-2 { background: radial-gradient(closest-side, rgba(232,215,174,.75), rgba(232,215,174,.2) 55%, transparent); }
:root:not([data-theme="dark"]) .neb-3 { background: radial-gradient(closest-side, rgba(150,186,206,.45), rgba(150,186,206,.12) 55%, transparent); }
:root:not([data-theme="dark"]) .neb-4 { background: radial-gradient(closest-side, rgba(20,184,166,.16), transparent); }
@keyframes sk-drift1 { to { transform: translate3d(9vmax, 6vmax, 0) rotate(14deg) scale(1.08); } }
@keyframes sk-drift2 { to { transform: translate3d(-8vmax, 5vmax, 0) rotate(-12deg) scale(1.1); } }
@keyframes sk-drift3 { to { transform: translate3d(6vmax, -7vmax, 0) rotate(10deg) scale(.94); } }
@keyframes sk-drift4 { to { transform: translate3d(-10vmax, 4vmax, 0) scale(1.25); } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.motion-paused) .neb-1 { animation: sk-drift1 70s ease-in-out infinite alternate; }
  :root:not(.motion-paused) .neb-2 { animation: sk-drift2 85s ease-in-out infinite alternate; }
  :root:not(.motion-paused) .neb-3 { animation: sk-drift3 95s ease-in-out infinite alternate; }
  :root:not(.motion-paused) .neb-4 { animation: sk-drift4 60s ease-in-out infinite alternate; }
}

/* the shared top bar: a floating glass panel, as on the homepage */
.sn { top: 12px; width: min(1200px, calc(100% - 24px)); margin: 12px auto 0; min-height: 68px; padding: 10px 10px 10px 22px; border-radius: 22px; }
.sn::after { display: none; }
:root[data-theme="dark"] .sn { --sn-glass: rgba(11,18,38,.62); --sn-solid: #0B1226; --sn-panel: #0B1226; background: var(--sn-glass);
  box-shadow: inset 1.5px 1.5px 0 rgba(255,255,255,.45), inset -1px -1px 0 rgba(255,255,255,.12), 0 18px 40px -24px rgba(0,0,0,.7); }
:root:not([data-theme="dark"]) .sn { --sn-glass: rgba(255,255,255,.6); --sn-solid: #F7FAF9; --sn-panel: #FFFFFF; background: var(--sn-glass);
  box-shadow: inset 1.5px 1.5px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(11,13,14,.06), 0 18px 40px -26px rgba(11,13,14,.35); }
:root[data-theme="dark"] [data-site-nav] { --sn-text: #F4F5F6; --sn-text-2: #C3C9CE; --sn-panel: #0B1226; }
:root:not([data-theme="dark"]) [data-site-nav] { --sn-text: #0B0D0E; --sn-text-2: #464C52; }
.sn-cta { border-radius: 14px; }

/* buttons: white by night, ink by day, as on the homepage */
.btn-primary, :root .btn-primary { border-radius: 14px; }
:root[data-theme="dark"] .btn-primary { background: #FFFFFF; color: #0B0D0E; border-color: #FFFFFF; box-shadow: 0 14px 30px -16px rgba(0,0,0,.8); }
:root[data-theme="dark"] .btn-primary:hover { background: #E9ECEE; }
:root:not([data-theme="dark"]) .btn-primary { background: #0B0D0E; color: #FFFFFF; border-color: #0B0D0E; box-shadow: 0 14px 28px -18px rgba(11,13,14,.7); }
:root:not([data-theme="dark"]) .btn-primary:hover { background: #24292E; }

/* headings in the homepage's weight */
:is(.hero-heading, .about-hero h1, .blog-hero h1, .calc-page-hero h1, .article-hero h1, .sme-hero h1) { letter-spacing: -.045em; }

/* Learn's own tokens are answered in learn.html itself: its names (--space, --space-2) are
   style.css's spacing names, so they must not be set on the other pages. */

/* the blog posts: the meta line and the back link readable by night (#A3AAB0 on #070B1A: 8.3:1),
   the dots as dots (an old light rule painted each one as a bar), and room under the floating bar */
:root[data-theme="dark"] :is(.article-meta, .back-link, .disclaimer-note, .partner-role) { color: #A3AAB0 !important; }
:root[data-theme="dark"] .back-link:hover { color: #F4F5F6 !important; }
:root[data-theme] .article-meta-dot { background: transparent !important; }
.article-hero { padding-top: calc(clamp(64px, 10vw, 128px) + 40px) !important; }
/* faint labels the older pages typed at 35 to 40% white: lifted to the muted grey by night (8.9:1) */
:root[data-theme="dark"] :is(.tier-price-sub, .article-cta-note, .deadline-state, .article-contributed, .article-content blockquote cite),
:root[data-theme="dark"] [style*="rgba(255,255,255,0.4)"] { color: #A3AAB0 !important; }

/* the official Nebula Finance wordmark (nebulafinanceorion web/public/brand), light and dark versions */
.wm { display: inline-flex; align-items: center; line-height: 0; }
.wm img { display: block; height: 22px; width: auto; }
.wm .wm-d { display: none; }
:root[data-theme="dark"] .wm .wm-l, .wm-on-dark .wm .wm-l { display: none; }
:root[data-theme="dark"] .wm .wm-d, .wm-on-dark .wm .wm-d { display: block; }
@media (max-width: 420px) { .wm img { height: 19px; } }
/* the logo keeps its own shape: it never shrinks to fit a bar (a squashed wordmark read as condensed type), it
   steps down to 15px tall on the narrowest phones, and the bar makes room around it */
.wm, .wm img { flex-shrink: 0; } .wm img { max-width: none; }
@media (max-width: 360px) { .wm img { height: 15px; } }
