/*
Theme Name: Being Topper Authority
Description: First-party institutional WordPress theme for Being Topper. Native WordPress-compatible hybrid/classic theme with Authority visual language and future BT ecosystem integration.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: bt-authority
*/
:root{
  --bt-indigo:#1B1F3B;--bt-purple:#2E1A47;--bt-gold:#C6A75E;--bt-blue:#2563EB;
  --bt-text:#1B1F3B;--bt-muted:#4A4F5D;--bt-bg:#F3F4F6;--bt-white:#fff;--bt-border:#E5E7EB;--bt-font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--bt-base-size:16px;
  --bt-max:1200px;--bt-narrow:850px;--bt-radius:0px;--bt-shadow:none;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bt-bg);color:var(--bt-text);font-family:var(--bt-font-family);font-size:var(--bt-base-size);line-height:1.6}
body.admin-bar .bt-header{top:32px}
a{color:var(--bt-blue);text-decoration:none}a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit}
img{max-width:100%;height:auto}
iframe{max-width:100%}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.screen-reader-text:focus{position:fixed;z-index:100000;top:5px;left:5px;width:auto;height:auto;padding:15px 20px;margin:0;clip:auto;white-space:normal;background:#fff;color:#000;box-shadow:0 0 0 2px var(--bt-blue)}
.skip-link{background:#fff;color:#000}
.bt-container{width:min(calc(100% - 48px),var(--bt-max));margin-inline:auto}
.bt-container--narrow{width:min(calc(100% - 48px),var(--bt-narrow));margin-inline:auto}
.bt-site-main{min-height:40vh}

/* Header / native WordPress navigation */
.bt-header{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.96);border-bottom:1px solid var(--bt-border);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.bt-header__inner{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.bt-brand{font-weight:700;font-size:22px;letter-spacing:-.03em;color:var(--bt-text);display:inline-flex;align-items:center;gap:12px}
.bt-brand:hover{text-decoration:none}
.custom-logo-link{display:inline-flex;align-items:center}.custom-logo{display:block;max-height:44px;width:auto}.bt-custom-header{display:none}.bt-custom-header img{display:block;width:100%;height:auto;max-height:300px;object-fit:cover}
.bt-brand img{display:block;max-height:44px;width:auto}
.bt-nav{display:flex;align-items:center;gap:28px}
.bt-nav__menu,.bt-nav__menu ul{list-style:none;margin:0;padding:0}
.bt-nav__menu{display:flex;align-items:center;gap:28px}
.bt-nav__menu > li{position:relative;margin:0;padding:0}
.bt-nav__menu a{font-family:var(--bt-font-family);font-size:var(--bt-menu-font-size);font-weight:var(--bt-menu-font-weight);color:var(--bt-muted);display:block;line-height:1.3}
.bt-nav__menu > li > a{padding:30px 0}
.bt-nav__menu a:hover,.bt-nav__menu a:focus,.bt-nav__menu .current-menu-item>a,.bt-nav__menu .current-menu-ancestor>a,.bt-nav__menu .current-menu-parent>a{color:var(--bt-text);text-decoration:none}
.bt-nav__menu .menu-item-has-children>a::after{content:"";display:inline-block;width:6px;height:6px;margin-left:8px;vertical-align:3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.bt-nav__menu .sub-menu{position:absolute;top:100%;left:-18px;min-width:var(--bt-submenu-width);padding:10px 0;background:#fff;border:1px solid var(--bt-border);box-shadow:0 12px 30px rgba(17,24,39,.08);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s ease,transform .18s ease,visibility .18s ease;z-index:200}
.bt-nav__menu .sub-menu li{position:relative}
.bt-nav__menu .sub-menu a{padding:11px 18px;white-space:normal}
.bt-nav__menu .sub-menu a:hover,.bt-nav__menu .sub-menu a:focus{background:#F8FAFC}
.bt-nav__menu li:hover>.sub-menu,.bt-nav__menu li:focus-within>.sub-menu,.bt-nav__menu li.bt-submenu-open>.sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
.bt-nav__menu .sub-menu .sub-menu{top:-11px;left:100%;transform:translateX(8px);}
.bt-nav__menu .sub-menu li:hover>.sub-menu,.bt-nav__menu .sub-menu li:focus-within>.sub-menu,.bt-nav__menu .sub-menu li.bt-submenu-open>.sub-menu{transform:translateX(0)}
.bt-menu{display:none;background:none;border:0;font-size:24px;line-height:1;padding:8px;cursor:pointer;color:var(--bt-text)}
.bt-mobile-nav{display:none;border-top:1px solid var(--bt-border);background:#fff}
.bt-mobile-nav__inner{padding:18px 0 22px}
.bt-mobile-nav .bt-nav__mobile-menu,.bt-mobile-nav .bt-nav__mobile-menu ul{list-style:none;margin:0;padding:0}
.bt-mobile-nav .bt-nav__mobile-menu>li{border-bottom:1px solid var(--bt-border);display:flex;flex-wrap:wrap;align-items:center}
.bt-mobile-nav .bt-nav__mobile-menu>li:last-child{border-bottom:0}
.bt-mobile-nav a{display:block;padding:12px 0;color:var(--bt-text);font-weight:600;flex:1 1 auto;min-width:0}
.bt-mobile-nav .sub-menu{display:none;padding-left:18px;flex:1 0 100%}
.bt-mobile-nav .sub-menu li{position:relative;display:flex;flex-wrap:wrap;align-items:center}
.bt-mobile-nav li.bt-submenu-open>.sub-menu{display:block}
.bt-mobile-nav .bt-submenu-toggle{flex:0 0 auto;margin-left:10px;border:1px solid var(--bt-border);background:#fff;width:30px;height:30px;border-radius:50%;cursor:pointer;color:var(--bt-text);line-height:1}
.bt-mobile-nav .bt-submenu-toggle::before{content:"+"}
.bt-mobile-nav li.bt-submenu-open>.bt-submenu-toggle::before{content:"−"}

/* Native WordPress identity / navigation controls */
.bt-identity-text{display:flex;flex-direction:column;min-width:0}.bt-site-title{font-weight:700;font-size:22px;letter-spacing:-.03em;line-height:1.15;color:var(--bt-text)}.bt-identity-text .bt-site-description{display:block;margin-top:3px}.bt-no-header-shadow .bt-header{box-shadow:none}.bt-header--sticky{position:sticky}.bt-no-sticky-header .bt-header{position:relative;top:auto}.bt-header{box-shadow:0 4px 18px rgba(17,24,39,.05)}.bt-no-header-shadow .bt-header{box-shadow:none}.bt-nav__menu .sub-menu a{font-family:var(--bt-font-family);font-size:var(--bt-menu-font-size);font-weight:var(--bt-menu-font-weight)}
/* Core Authority presentation */
.bt-hero,.bt-page-hero{padding:110px 0 90px;background:var(--bt-indigo);color:#fff}
.bt-hero h1,.bt-page-hero h1{font-size:clamp(42px,6vw,58px);line-height:1.08;letter-spacing:-.035em;margin:12px 0 22px}
.bt-eyebrow{font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--bt-gold);margin:0 0 14px}
.bt-body{font-size:18px;line-height:1.7;color:var(--bt-muted)}
.bt-body--light{color:rgba(255,255,255,.72)}
.bt-section{padding:96px 0}
.bt-section--surface{background:#fff}
.bt-section--authority{background:var(--bt-indigo);color:#fff}
.bt-section--depth{background:var(--bt-purple);color:#fff}
.bt-title{font-weight:700;letter-spacing:-.03em;line-height:1.15}
.bt-title--section{font-size:clamp(32px,4vw,42px);margin:0 0 24px}
.bt-grid{display:grid;gap:28px}.bt-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.bt-card{background:#fff;border:1px solid var(--bt-border);padding:30px;min-height:100%}
.bt-card h2,.bt-card h3{line-height:1.25;margin:8px 0 12px}
.bt-card p:last-child{margin-bottom:0}
.bt-editor-content{max-width:100%}
.bt-editor-content>*{max-width:100%}
.bt-editor-content h1,.bt-editor-content h2,.bt-editor-content h3,.bt-editor-content h4,.bt-editor-content h5,.bt-editor-content h6{line-height:1.2}
.bt-editor-content h2{font-size:34px;margin-top:52px}
.bt-editor-content h3{font-size:24px;margin-top:36px}
.bt-editor-content p,.bt-editor-content ul,.bt-editor-content ol{font-size:18px}
.bt-editor-content img{margin-block:24px}
.bt-editor-content .alignwide{width:min(100% + 96px,calc(100vw - 48px));max-width:none;margin-left:50%;transform:translateX(-50%)}
.bt-editor-content .alignfull{width:100vw;max-width:none;margin-left:50%;transform:translateX(-50%)}
.bt-footer{background:var(--bt-indigo);color:#fff;padding:64px 0}
.bt-footer a{color:rgba(255,255,255,.72)}
.bt-footer a:hover{color:#fff}
.bt-footer__grid{display:grid;grid-template-columns:1fr;gap:48px}
.bt-footer__grid[data-footer-total-cols="2"]{grid-template-columns:repeat(2,1fr)}
.bt-footer__grid[data-footer-total-cols="3"]{grid-template-columns:repeat(3,1fr)}
.bt-footer__grid[data-footer-total-cols="4"]{grid-template-columns:repeat(4,1fr)}
.bt-footer__grid[data-footer-total-cols="5"]{grid-template-columns:repeat(5,1fr)}
.bt-footer__menu,.bt-footer__menu ul{list-style:none;margin:0;padding:0}
.bt-footer__menu{display:flex;flex-wrap:wrap;gap:18px 28px}
.bt-footer__menu a{font-size:14px}
.bt-breadcrumbs{font-size:13px;margin-bottom:22px;color:rgba(255,255,255,.62)}
.bt-breadcrumbs a{color:rgba(255,255,255,.72)}
.bt-about-nav{padding:36px 0 0;background:var(--bt-indigo);color:#fff}
.bt-about-nav__links{display:flex;gap:26px;overflow:auto;border-bottom:1px solid rgba(255,255,255,.14)}
.bt-about-nav__links a{padding:0 0 14px;color:rgba(255,255,255,.68);white-space:nowrap}
.bt-about-nav__links a:hover{color:#fff;text-decoration:none}
.bt-pathway{display:flex;justify-content:space-between;gap:24px;padding:26px 0;border-bottom:1px solid rgba(255,255,255,.15)}
.bt-pathway h3{margin:0}.bt-pathway__body{max-width:760px}.bt-arrow{font-size:28px;color:var(--bt-gold)}

/* WordPress-native editorial components */
.wp-caption{max-width:100%}.wp-caption-text{font-size:14px;color:var(--bt-muted)}
.gallery{display:grid;gap:20px}.gallery-columns-2{grid-template-columns:repeat(2,1fr)}.gallery-columns-3{grid-template-columns:repeat(3,1fr)}.gallery-columns-4{grid-template-columns:repeat(4,1fr)}.gallery-columns-5{grid-template-columns:repeat(5,1fr)}
.wp-block-button__link,.wp-element-button{border-radius:0}
.wp-block-search__inside-wrapper{border-color:var(--bt-border)}
.wp-block-table{overflow-x:auto}
.wp-block-quote{border-left-color:var(--bt-gold)}

/* Sidebar */
.bt-with-sidebar{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:56px}
.bt-sidebar{font-size:15px}.bt-sidebar .widget{margin-bottom:36px}.bt-sidebar .widget-title{font-size:15px;text-transform:uppercase;letter-spacing:.08em;margin:0 0 14px}.bt-sidebar ul{list-style:none;margin:0;padding:0}.bt-sidebar li{padding:7px 0;border-bottom:1px solid var(--bt-border)}

/* Comments */
.bt-comments{padding-top:48px;margin-top:48px;border-top:1px solid var(--bt-border)}
.comment-list{list-style:none;margin:0;padding:0}.comment-list .comment{margin:0 0 28px;padding:24px;border:1px solid var(--bt-border);background:#fff}.comment-meta{font-size:13px;color:var(--bt-muted)}.comment-content{font-size:16px}.comment-form input,.comment-form textarea{width:100%;border:1px solid var(--bt-border);padding:10px;background:#fff}.comment-form .submit{background:var(--bt-indigo);color:#fff;border:0;padding:12px 18px;cursor:pointer}

/* Source parity */
:root{--bt-source-primary:#1B1F3B;--bt-source-secondary:#2E1A47;--bt-source-gold:#C6A75E;--bt-source-background:#F3F4F6;--bt-source-border:#E5E7EB;--bt-source-text:#1B1F3B;--bt-source-interaction:#2563EB}
.bt-fade-in,[data-bt-fade-in]{opacity:1;transform:none}
html.bt-motion-ready .bt-fade-in,html.bt-motion-ready [data-bt-fade-in]{opacity:0;transform:translateY(24px);transition:opacity .7s cubic-bezier(.25,.1,.25,1),transform .7s cubic-bezier(.25,.1,.25,1)}
html.bt-motion-ready .bt-fade-in-visible{opacity:1;transform:translateY(0)}
.bt-source-section{padding:7rem 1.5rem}.bt-source-container{max-width:72rem;margin:0 auto}.bt-source-container--narrow{max-width:56rem;margin:0 auto}.bt-source-authority{background:var(--bt-source-primary);color:#F3F4F6}.bt-source-depth{background:var(--bt-source-secondary);color:#F3F4F6}.bt-source-divider{width:64px;height:2px;background:var(--bt-source-gold)}.bt-source-divider--wide{width:120px;height:2px;background:var(--bt-source-gold)}.bt-source-h1{font-size:3.25rem;line-height:1.1;font-weight:700;letter-spacing:-.02em}.bt-source-h2{font-size:2.125rem;line-height:1.15;font-weight:600;letter-spacing:-.02em}.bt-source-body{font-size:1rem;line-height:1.625;color:#4A4F5D}.bt-source-body-light{font-size:1rem;line-height:1.625;color:rgba(243,244,246,.7)}.bt-source-gold{color:var(--bt-source-gold)}.bt-source-card{border:1px solid var(--bt-source-border);background:#fff;transition:border-color .5s ease}.bt-source-card:hover{border-color:rgba(198,167,94,.2)}

@media(max-width:900px){
  body.admin-bar .bt-header{top:46px}
  .bt-nav{display:none}.bt-menu{display:block}.bt-custom-header{display:block}.bt-mobile-nav.is-open{display:block}.bt-grid--3{grid-template-columns:1fr}.bt-section{padding:72px 0}.bt-hero,.bt-page-hero{padding:84px 0 68px}.bt-footer__grid{grid-template-columns:1fr}.bt-with-sidebar{grid-template-columns:1fr}.bt-editor-content .alignwide{width:100%;margin-left:0;transform:none}.bt-editor-content .alignfull{width:100vw;margin-left:50%;transform:translateX(-50%)}
}
@media(min-width:768px){.bt-source-section{padding:9rem 3rem}.bt-source-h1{font-size:3.625rem}.bt-source-h2{font-size:2.375rem}.bt-source-body,.bt-source-body-light{font-size:1.125rem}}
@media(min-width:1024px){.bt-source-section{padding:9rem 5rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.bt-nav__menu .sub-menu{transition:none}.bt-fade-in,[data-bt-fade-in],html.bt-motion-ready .bt-fade-in,html.bt-motion-ready [data-bt-fade-in]{opacity:1!important;transform:none!important;transition:none!important}}

/* Native-first token-driven presentation */
.bt-site-identity{display:flex;align-items:center;gap:16px;min-width:0}.bt-site-description{font-size:13px;color:var(--bt-muted);max-width:360px}.bt-footer .bt-brand{color:#fff}.bt-footer .custom-logo{filter:none}.bt-footer .bt-site-description{color:rgba(255,255,255,.72)}
.bt-footer__identity .custom-logo-link{margin-bottom:10px}.bt-footer__identity .bt-brand{margin-bottom:10px}
.bt-header .custom-logo-link,.bt-header .custom-logo{max-width:260px}
.bt-nav__menu .sub-menu .menu-item-has-children>a::after{transform:rotate(-45deg);vertical-align:1px}
.bt-mobile-nav[hidden]{display:none!important}
.bt-mobile-nav.is-open{display:block}
.bt-editor-content > :first-child{margin-top:0}.bt-editor-content > :last-child{margin-bottom:0}
.bt-editor-content .wp-block-heading{color:inherit}
.bt-footer .bt-footer__menu .sub-menu{display:block;margin-top:10px}

@media (max-width:900px){
  .bt-header__inner{min-height:68px}.bt-site-description{display:none}
}


/* Sticky header/mobile hardening */
body.admin-bar .bt-header{top:32px}
@media (max-width:782px){
  body.admin-bar .bt-header{top:46px}
}
@media (max-width:900px){
  .bt-header{isolation:isolate;overflow:visible}
  .bt-header__inner{position:relative;z-index:2}
  .bt-mobile-nav{position:relative;z-index:1;max-height:calc(100vh - 68px);overflow-y:auto;-webkit-overflow-scrolling:touch}
  body.admin-bar .bt-mobile-nav{max-height:calc(100vh - 114px)}
  .bt-site-identity{min-width:0;max-width:calc(100% - 60px)}
  .bt-site-title{font-size:20px}
  .bt-identity-text .bt-site-description{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
}

/* =========================================================
   Back to top, Dark mode toggle, Footer multi-column
   Added as a pure additive layer — nothing above this point
   was changed to add these three features.
   ========================================================= */

/* --- Back to top button --- */
.bt-to-top{position:fixed;right:20px;bottom:20px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:var(--bt-indigo,#1B1F3B);color:#fff;border:none;border-radius:var(--bt-radius,0px);cursor:pointer;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .25s ease,transform .25s ease,visibility .25s ease;z-index:60;font-size:20px;line-height:1}
.bt-to-top.is-visible{opacity:1;visibility:visible;transform:translateY(0)}
.bt-to-top:hover{background:var(--bt-gold,#C6A75E);color:var(--bt-indigo,#1B1F3B)}
.bt-to-top:focus-visible{outline:2px solid var(--bt-gold,#C6A75E);outline-offset:3px}
@media(max-width:640px){.bt-to-top{right:14px;bottom:14px;width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){.bt-to-top{transition:opacity .01ms,visibility .01ms}}

/* --- Dark mode toggle button --- */
.bt-mode-toggle{position:fixed;right:20px;bottom:76px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:var(--bt-white,#fff);color:var(--bt-indigo,#1B1F3B);border:1px solid var(--bt-border,#E5E7EB);border-radius:var(--bt-radius,0px);cursor:pointer;z-index:60}
.bt-mode-toggle:hover{border-color:var(--bt-gold,#C6A75E)}
.bt-mode-toggle:focus-visible{outline:2px solid var(--bt-gold,#C6A75E);outline-offset:3px}
.bt-mode-toggle__icon{width:18px;height:18px;display:block;border-radius:50%;background:currentColor;box-shadow:inset -5px -2px 0 0 var(--bt-white,#fff)}
.bt-dark .bt-mode-toggle__icon{box-shadow:inset -5px -2px 0 0 var(--bt-indigo,#0d0f1f);background:var(--bt-gold,#C6A75E)}
@media(max-width:640px){.bt-mode-toggle{right:14px;bottom:66px;width:44px;height:44px}}

/* --- Footer multi-column (auto-ratio based on how many columns are active) --- */
.bt-footer__column{min-width:0}
@media(max-width:900px){.bt-footer__grid{grid-template-columns:1fr!important;gap:24px}}

/* Footer bottom bar (copyright + tagline/footer-nav), matching the reference site's footer exactly */
.bt-footer__bottom{display:flex;flex-direction:column;gap:12px;align-items:flex-start;justify-content:space-between;margin-top:40px;padding-top:24px;border-top:1px solid rgba(255,255,255,.1)}
.bt-footer__copyright,.bt-footer__tagline{font-size:12px;color:rgba(255,255,255,.4);margin:0}
@media(min-width:640px){.bt-footer__bottom{flex-direction:row;align-items:center}}

/* =========================================================
   Dark mode — toggled via html.bt-dark, set by theme-enhancements.js
   Overrides both this theme's own tokens (--bt-*) and the
   design-system tokens used on the pasted capability-pathway
   pages (--background/--foreground/--primary/etc), so both
   native theme chrome and pasted static content re-theme together.
   ========================================================= */
html.bt-dark{
  --bt-bg:#12142A;
  --bt-white:#1B1E38;
  --bt-text:#F3F4F6;
  --bt-muted:#A7ABC2;
  --bt-border:#33375A;

  --background:222 47% 11%;
  --foreground:220 14% 96%;
  --card:233 30% 16%;
  --card-foreground:220 14% 96%;
  --popover:233 30% 16%;
  --popover-foreground:220 14% 96%;
  --muted:233 20% 20%;
  --muted-foreground:220 9% 70%;
  --border:233 20% 24%;
  --surface:233 30% 16%;
  --surface-elevated:233 28% 19%;
  --text-secondary:220 9% 70%;
}
html.bt-dark body{background:var(--bt-bg);color:var(--bt-text)}
html.bt-dark .bt-header{background:var(--bt-bg);border-color:var(--bt-border)}
html.bt-dark .bt-footer{background:#0d0f1f}
html.bt-dark .widget,
html.bt-dark .bt-content-entry,
html.bt-dark section.bg-white,
html.bt-dark .bg-white{background:var(--bt-white)!important;color:var(--bt-text)}
html.bt-dark a:where(:not(.wp-element-button)){color:var(--bt-gold,#C6A75E)}

/* =========================================================
   Additional dark-mode fixes — every rule below is purely
   additive, scoped under html.bt-dark only. Nothing above
   this line (light/normal mode) was touched.
   ========================================================= */

/* Fix: desktop submenu dropdown was hardcoded white, both at
   rest and on hover — the hover state specifically produced
   near-white text on a near-white background (genuinely
   invisible, not just visually inconsistent). */
html.bt-dark .bt-nav__menu .sub-menu{background:var(--bt-white);box-shadow:0 12px 30px rgba(0,0,0,.4)}
html.bt-dark .bt-nav__menu .sub-menu a:hover,
html.bt-dark .bt-nav__menu .sub-menu a:focus{background:var(--bt-bg)}

/* Fix: footer widgets (Institution/Ecosystem/Connect columns)
   were unintentionally caught by the general .widget dark-mode
   card-background rule above, creating an unwanted boxed look
   against the already-dark footer. Reset specifically for footer. */
html.bt-dark .bt-footer .widget{background:transparent!important;color:inherit}

/* Fix: entire mobile nav panel and its submenu toggle button
   were hardcoded white with no dark-mode override at all —
   the most visually significant gap found, since it affects
   the whole mobile navigation surface, not a small element. */
html.bt-dark .bt-mobile-nav{background:var(--bt-bg)}
html.bt-dark .bt-mobile-nav .bt-submenu-toggle{background:var(--bt-white);border-color:var(--bt-border)}

/* Fix: two generic, reusable structural classes — a light content
   "surface" section and a generic card component — were hardcoded
   white with no dark-mode override, unlike the specific .bg-white/
   .widget selectors already covered above. */
html.bt-dark .bt-section--surface{background:var(--bt-bg)}
html.bt-dark .bt-card{background:var(--bt-white);border-color:var(--bt-border);color:var(--bt-text)}

/* Fix: comment list items and comment form fields (name/email/
   textarea) were hardcoded white — in dark mode, someone typing
   a comment would be typing near-invisible text into a white box. */
html.bt-dark .comment-list .comment{background:var(--bt-white);border-color:var(--bt-border)}
html.bt-dark .comment-form input,
html.bt-dark .comment-form textarea{background:var(--bt-white);color:var(--bt-text);border-color:var(--bt-border)}

/* Fix: the "source parity" token system (--bt-source-*) — an
   entirely separate, parallel set of color variables powering
   the pasted capability-pathway page sections — had zero
   dark-mode awareness at all. Redefining them to reuse the same
   dark-mode values already established above, so this whole
   second system re-themes consistently with everything else. */
html.bt-dark{
  --bt-source-primary:var(--bt-white);
  --bt-source-secondary:var(--bt-white);
  --bt-source-background:var(--bt-bg);
  --bt-source-border:var(--bt-border);
  --bt-source-text:var(--bt-text);
}
html.bt-dark .bt-source-body{color:var(--bt-muted)}
html.bt-dark .bt-source-card{background:var(--bt-white);border-color:var(--bt-border)}

/* Fix: the "Skip to content" accessibility link (visible only to
   keyboard users on focus) was hardcoded white/black — low-impact
   but a genuine, real gap for completeness. */
html.bt-dark .skip-link,
html.bt-dark .screen-reader-text:focus{background:var(--bt-white);color:var(--bt-text)}
