:root{
  color-scheme:light;
  --theme-bg:#e9eff5;
  --theme-surface:#f8fbfe;
  --theme-card:#ffffff;
  --theme-card-2:#eef4f9;
  --theme-text:#061522;
  --theme-soft:#10263b;
  --theme-muted:#344e64;
  --theme-line:#9eb4c6;
  --theme-gold:#7b5400;
  --theme-gold-soft:#fff3cf;
  --theme-blue:#004f91;
}

body{
  background:var(--theme-bg)!important;
  color:var(--theme-text)!important;
}

body.dark-mode{
  color-scheme:dark;
  --theme-bg:#050a11;
  --theme-surface:#09111a;
  --theme-card:#121d2b;
  --theme-card-2:#0a111b;
  --theme-text:#ffffff;
  --theme-soft:#f1f5f9;
  --theme-muted:#aebdcd;
  --theme-line:#2b3d50;
  --theme-gold:#ffd36f;
  --theme-gold-soft:#292417;
  --theme-blue:#69b9ff;
  background:#050a11!important;
}

.psd-theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:30px;
  padding:6px 11px;
  border:1px solid #9a6900;
  border-radius:999px;
  background:#fff5d7;
  color:#3f2b00;
  font:800 11px/1 "Inter","Segoe UI",Arial,sans-serif;
  white-space:nowrap;
  cursor:pointer;
}

/* One ribbon control treatment, matching the established tour button. */
.psd-shared-header #site-tour-button,
.psd-shared-header #psd-account-nav-link,
.psd-shared-header #psd-ribbon-watchlist-link,
.psd-shared-header .psd-theme-toggle,
.psd-shared-header .header-center>a[target="_blank"]>span:last-child,
.psd-shared-header .psd-bottom-promos>a[target="_blank"]>span:last-child{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:30px!important;
  padding:7px 15px!important;
  border:1px solid rgba(255,204,82,.72)!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,rgba(85,61,12,.96),rgba(28,24,18,.96))!important;
  color:#ffe08a!important;
  font:900 11px/1 "Inter","Segoe UI",Arial,sans-serif!important;
  box-shadow:0 0 18px rgba(225,167,39,.22)!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

/* Color-only correction. Dimensions and positioning remain controlled by the ribbon. */
.psd-shared-header .header-center>a[target="_blank"],
.psd-shared-header .psd-bottom-promos>a[target="_blank"]{
  background:linear-gradient(180deg,rgba(85,61,12,.96),rgba(28,24,18,.96))!important;
}

/* Light-mode color correction only. */
body:not(.dark-mode) .psd-shared-header .psd-account-menu{
  background:#ffffff!important;
}
body:not(.dark-mode) .psd-shared-header .psd-account-menu a,
body:not(.dark-mode) .psd-shared-header .psd-account-menu button{
  color:#061522!important;
}
body:not(.dark-mode) .psd-shared-header .psd-account-menu a:hover,
body:not(.dark-mode) .psd-shared-header .psd-account-menu a:focus-visible,
body:not(.dark-mode) .psd-shared-header .psd-account-menu button:hover,
body:not(.dark-mode) .psd-shared-header .psd-account-menu button:focus-visible{
  background:#fff3cf!important;
  color:#4b3200!important;
}

.psd-shared-header .psd-ribbon-social-wrap{margin:0 6px!important;padding:0!important;transform:none!important}
.psd-shared-header .psd-ribbon-social-wrap .social-links{display:inline-flex!important;align-items:center!important;gap:6px!important}
.psd-shared-header .social-label{
  font-weight:900!important;
  opacity:1!important;
}
.psd-shared-header .psd-follow-us{
  display:inline-flex!important;
  align-items:center!important;
  font-size:14px!important;
  line-height:1!important;
  letter-spacing:.05px!important;
  white-space:nowrap!important;
}
.psd-shared-header .psd-follow-us>span:not(.psd-follow-space){
  display:inline-block!important;
  color:#7b5400;
  animation:psdFollowUsColorWave 4.4s linear infinite;
  animation-delay:calc(var(--follow-i) * .16s);
  will-change:color,text-shadow,transform;
}
.psd-shared-header .psd-follow-us .psd-follow-space{
  display:inline-block!important;
  width:4px!important;
}

@keyframes psdFollowUsColorWave{
  0%,100%{
    color:#7b5400;
    text-shadow:0 0 1px rgba(123,84,0,.10);
    transform:translateY(0);
  }
  16%{
    color:#0a66c2;
    text-shadow:0 0 6px rgba(10,102,194,.38);
    transform:translateY(-.5px);
  }
  32%{
    color:#d32f2f;
    text-shadow:0 0 6px rgba(211,47,47,.32);
    transform:translateY(0);
  }
  48%{
    color:#00875a;
    text-shadow:0 0 6px rgba(0,135,90,.30);
    transform:translateY(-.5px);
  }
  64%{
    color:#7c3aed;
    text-shadow:0 0 6px rgba(124,58,237,.30);
    transform:translateY(0);
  }
  80%{
    color:#d29922;
    text-shadow:0 0 7px rgba(210,153,34,.38);
    transform:translateY(-.5px);
  }
}

body.dark-mode .psd-shared-header .psd-follow-us>span:not(.psd-follow-space){
  color:#ffd780;
}

@media (prefers-reduced-motion:reduce){
  .psd-shared-header .psd-follow-us>span:not(.psd-follow-space){
    animation:none!important;
    transform:none!important;
  }
}
.psd-shared-header .social-pill{
  min-height:28px!important;
  padding:4px 9px 4px 5px!important;
  font-weight:900!important;
  opacity:1!important;
}
.psd-shared-header .social-pill:not(.linkedin){min-width:58px!important}

/* Branded social pills: beveled oval + original platform logo colors. */
.psd-shared-header .psd-social-brand{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  border-radius:999px!important;
  text-decoration:none!important;
  line-height:1!important;
  box-sizing:border-box!important;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease!important;
}
.psd-shared-header .psd-social-logo{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  border-radius:5px!important;
  box-sizing:border-box!important;
  font-weight:900!important;
  line-height:1!important;
}
.psd-shared-header .psd-social-text{
  display:inline-block!important;
  white-space:nowrap!important;
}

/* X: black/white brand treatment. */
body:not(.dark-mode) .psd-shared-header .psd-x-link{
  background:linear-gradient(145deg,#ffffff,#e9eef3)!important;
  border:1px solid #343a40!important;
  color:#111111!important;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.98),
    inset -2px -2px 4px rgba(0,0,0,.12),
    0 2px 5px rgba(16,38,59,.18)!important;
}
body:not(.dark-mode) .psd-shared-header .psd-x-logo{
  background:#000000!important;
  color:#ffffff!important;
  border:1px solid #000000!important;
}
body.dark-mode .psd-shared-header .psd-x-link{
  background:linear-gradient(145deg,#1c1c1c,#050505)!important;
  border:1px solid #f2f2f2!important;
  color:#ffffff!important;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.12),
    inset -2px -2px 4px rgba(0,0,0,.75),
    0 2px 6px rgba(0,0,0,.45)!important;
}
body.dark-mode .psd-shared-header .psd-x-logo{
  background:#ffffff!important;
  color:#000000!important;
  border:1px solid #ffffff!important;
}

/* LinkedIn: official blue logo treatment. */
body:not(.dark-mode) .psd-shared-header .social-pill.linkedin{
  background:linear-gradient(145deg,#ffffff,#e6f1fb)!important;
  border:1px solid #0a66c2!important;
  color:#0a66c2!important;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.98),
    inset -2px -2px 4px rgba(10,102,194,.14),
    0 2px 5px rgba(10,102,194,.16)!important;
}
.psd-shared-header .psd-linkedin-logo{
  background:#0a66c2!important;
  color:#ffffff!important;
  border:1px solid #0a66c2!important;
  font-family:Arial,"Segoe UI",sans-serif!important;
  font-size:11px!important;
}
body.dark-mode .psd-shared-header .social-pill.linkedin{
  background:linear-gradient(145deg,#10243a,#081421)!important;
  border:1px solid #0a66c2!important;
  color:#70b5f9!important;
  box-shadow:
    inset 1px 1px 0 rgba(112,181,249,.12),
    inset -2px -2px 4px rgba(0,0,0,.62),
    0 2px 6px rgba(0,0,0,.42),
    0 0 8px rgba(10,102,194,.13)!important;
}
.psd-shared-header .psd-social-brand:hover,
.psd-shared-header .psd-social-brand:focus-visible{
  transform:translateY(-1px)!important;
  outline:none!important;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.32),
    inset -2px -2px 4px rgba(0,0,0,.18),
    0 4px 8px rgba(16,38,59,.24)!important;
}
.psd-ribbon-actions{display:inline-flex;align-items:center;justify-content:flex-end;gap:7px;margin-left:auto}
.psd-ribbon-actions #psd-ribbon-watchlist-link{position:static!important;display:inline-flex;min-width:116px}
.psd-ribbon-actions #psd-ribbon-watchlist-link[hidden]{display:none!important}

body.dark-mode .psd-theme-toggle{
  background:#211b0f;
  color:#ffd780;
  border-color:rgba(255,211,111,.55);
}

.psd-theme-toggle:hover,.psd-theme-toggle:focus-visible{
  border-color:#d29922;
  box-shadow:0 0 14px rgba(210,153,34,.20);
  outline:none;
}

body:not(.dark-mode) .psd-shared-header{
  background:rgba(248,251,254,.97)!important;
  border-color:#a9bfd2!important;
  color:#061522!important;
}

body:not(.dark-mode) .psd-shared-header .brand,
body:not(.dark-mode) .psd-shared-header .social-label{
  color:#10263b!important;
}
body:not(.dark-mode) .psd-shared-header .psd-nav-link,
body:not(.dark-mode) .psd-shared-header .psd-nav-link:hover,
body:not(.dark-mode) .psd-shared-header .psd-nav-link:focus-visible,
body:not(.dark-mode) .psd-shared-header .psd-nav-link.active{
  color:#000!important;
}
body.dark-mode .psd-shared-header .psd-nav-link,
body.dark-mode .psd-shared-header .psd-nav-link:hover,
body.dark-mode .psd-shared-header .psd-nav-link:focus-visible,
body.dark-mode .psd-shared-header .psd-nav-link.active{
  color:#fff!important;
}

/* Main PAGE links only: cleaner Inter typography, no icons. */
.psd-shared-header .psd-nav-main .psd-nav-link{
  font-family:"Inter","Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.15!important;
  letter-spacing:.05px!important;
  text-shadow:none!important;
  gap:0!important;
  white-space:nowrap!important;
}
.psd-shared-header .psd-nav-main .psd-nav-link::before{
  content:none!important;
  display:none!important;
}

/* ASSET links: match the main page-link typography. */
.psd-shared-header .psd-nav-assets .psd-nav-link{
  font-family:"Inter","Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.15!important;
  letter-spacing:.05px!important;
  text-shadow:none!important;
  white-space:nowrap!important;
}

.psd-shared-header .psd-nav-assets .psd-nav-link::before{
  content:none!important;
  display:none!important;
}

/* Market Pulse: same typography as page/asset links, no icon. */
.psd-shared-header .psd-market-pulse-link{
  font-family:"Inter","Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.15!important;
  letter-spacing:.05px!important;
  text-shadow:none!important;
  white-space:nowrap!important;
  gap:0!important;
}
.psd-shared-header .psd-market-pulse-link::before{
  content:none!important;
  display:none!important;
}

body:not(.dark-mode) .psd-shared-header .site-subtitle{color:#344e64!important}
body:not(.dark-mode) .psd-shared-header .header-pill,
body:not(.dark-mode) .psd-shared-header .brand-stamp{background:#fff3cf!important;color:#523700!important}

/* Home label: same geometry, stronger contrast in light mode. */
body:not(.dark-mode) .psd-shared-header .psd-home-label{
  color:#684700!important;
  font-weight:900!important;
  opacity:1!important;
  text-shadow:0 1px 0 rgba(255,255,255,.95),0 0 5px rgba(154,105,0,.16)!important;
}
body.dark-mode .psd-shared-header .psd-home-label{
  color:#ffd780!important;
  font-weight:800!important;
  opacity:1!important;
}

.ad-slot:empty{display:none}
.ad-slot:not(:empty){margin:10px 16px;padding:10px;border:1px dashed rgba(210,153,34,.45);border-radius:10px;text-align:center}

/* Shared footer: high-contrast in both modes and intentionally compact. */
.psd-shared-footer{
  max-width:none!important;
  margin:12px 14px 0!important;
  padding:16px 0 12px!important;
  border-top:1px solid var(--theme-line)!important;
  color:var(--theme-muted)!important;
}
.psd-shared-footer .footer-links{gap:8px 14px!important;margin-bottom:10px!important}
.psd-shared-footer .footer-links a{
  color:var(--theme-soft)!important;
  font-weight:800!important;
  opacity:1!important;
}
.psd-shared-footer .footer-links a:hover,
.psd-shared-footer .footer-links a:focus-visible,
.psd-shared-footer .footer-links a.active{
  color:var(--theme-gold)!important;
  background:var(--theme-gold-soft)!important;
  outline:none!important;
}
.psd-shared-footer .legal{
  margin-top:8px!important;
  padding:11px 13px!important;
  border:1px solid var(--theme-line)!important;
  background:var(--theme-card)!important;
  color:var(--theme-soft)!important;
  font-weight:700!important;
}
.psd-shared-footer .psd-copyright{
  margin:10px 2px 0!important;
  color:var(--theme-muted)!important;
  font-weight:700!important;
}
body:not(.dark-mode) .psd-shared-footer,
body:not(.dark-mode) .psd-shared-footer .footer-links a,
body:not(.dark-mode) .psd-shared-footer .legal,
body:not(.dark-mode) .psd-shared-footer .psd-copyright{color:#061522!important}
body.dark-mode .psd-shared-footer .footer-links a,
body.dark-mode .psd-shared-footer .legal{color:#f8fbff!important}


/* Shared ribbon structure: four explicit rows. Layout only; widget sizes stay unchanged. */

/* Ribbon typography: use the same type style as the Global market public subtitle.
   Existing font sizes, control dimensions, and positions are preserved. */
.psd-shared-header .nav a,
.psd-shared-header .social-label,
.psd-shared-header .social-pill,
.psd-shared-header .psd-home-label,
.psd-shared-header .brand-stamp,
.psd-shared-header .header-pill,
.psd-shared-header .psd-theme-toggle,
.psd-shared-header #psd-account-nav-link,
.psd-shared-header #psd-ribbon-watchlist-link,
.psd-shared-header #site-tour-button,
.psd-shared-header .header-center > a[target="_blank"],
.psd-shared-header .header-center > a[target="_blank"] span,
.psd-shared-header .psd-donate-button,
.psd-shared-header .psd-social-text,
.psd-shared-header .psd-follow-us{
  font-family:"OCR A Std","Eurostile","Bank Gothic","Courier New",monospace!important;
  letter-spacing:.7px!important;
}

/* Ribbon page icons: generated from each link href so every page link gets one.
   The previous global .nav a::before suppression has been removed in site-nav.js. */
.psd-shared-header .psd-nav-link{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
}
.psd-shared-header .psd-nav-link::before{
  content:"•";
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  flex:0 0 16px!important;
  padding:0!important;
  border:1px solid #9a6900!important;
  border-radius:5px!important;
  background:linear-gradient(145deg,#fff9e5,#e4c66d)!important;
  color:#4c3300!important;
  font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji","Segoe UI",Arial,sans-serif!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  opacity:1!important;
  visibility:visible!important;
  text-shadow:0 1px 0 rgba(255,255,255,.88)!important;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.98),
    inset -1px -1px 2px rgba(79,54,5,.32),
    0 1px 3px rgba(16,38,59,.24)!important;
}

/* Main navigation row */
.psd-shared-header .psd-nav-link[href="dashboard.html"]::before{content:"📊"!important}
.psd-shared-header .psd-nav-link[href="sentiment-history.html"]::before{content:"📈"!important}
.psd-shared-header .psd-nav-link[href="news-articles.html"]::before{content:"📰"!important}
.psd-shared-header .psd-nav-link[href="charts.html"]::before{content:"📉"!important}
.psd-shared-header .psd-nav-link[href="market-sentiment.html"]::before{content:"📘"!important}
.psd-shared-header .psd-nav-link[href="advertise.html"]::before{content:"💼"!important}
.psd-shared-header .psd-nav-link[href="about.html"]::before{content:"ⓘ"!important}
.psd-shared-header .psd-nav-link[href="contact.html"]::before{content:"✉"!important}

/* Asset navigation row */
.psd-shared-header .psd-nav-link[href="crypto.html"]::before{content:"₿"!important}
.psd-shared-header .psd-nav-link[href="forex-sentiment-today.html"]::before{content:"💱"!important}
.psd-shared-header .psd-nav-link[href="energy.html"]::before{content:"⚡"!important}
.psd-shared-header .psd-nav-link[href="precious-metals.html"]::before{content:"🥇"!important}
.psd-shared-header .psd-nav-link[href="indices.html"]::before{content:"📊"!important}
.psd-shared-header .psd-nav-link[href="policy-assets.html"]::before{content:"🏛"!important}
.psd-shared-header .psd-nav-link[href="ai-assets.html"]::before{content:"AI"!important;font-family:"Inter","Segoe UI",Arial,sans-serif!important;font-size:7px!important}

/* Lowest row */
.psd-shared-header .psd-nav-link[href="market-pulse.html"]::before{content:"✦"!important}

body.dark-mode .psd-shared-header .psd-nav-link::before{
  border-color:#c99b34!important;
  background:linear-gradient(145deg,#4a3a18,#17120a)!important;
  color:#ffe08a!important;
  text-shadow:0 0 4px rgba(255,211,111,.32)!important;
  box-shadow:
    inset 1px 1px 0 rgba(255,229,164,.22),
    inset -1px -1px 2px rgba(0,0,0,.68),
    0 1px 4px rgba(0,0,0,.48)!important;
}
.psd-shared-header .psd-nav-link:hover::before,
.psd-shared-header .psd-nav-link.active::before{
  border-color:#d29922!important;
  transform:translateY(-1px);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.98),
    inset -1px -1px 2px rgba(79,54,5,.24),
    0 2px 5px rgba(16,38,59,.25),
    0 0 8px rgba(210,153,34,.32)!important;
}


.psd-shared-header .header-center{
  min-width:0!important;
}
.psd-shared-header .nav{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:space-between!important;
  gap:0!important;
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  height:132px!important;
  min-height:132px!important;
  max-height:132px!important;
  overflow:visible!important;
}
.psd-shared-header .psd-nav-row{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px 12px!important;
  min-height:27px!important;
  height:27px!important;
  flex:0 0 27px!important;
  white-space:nowrap!important;
}
.psd-shared-header .psd-nav-main{
  flex-wrap:nowrap!important;
}
.psd-shared-header .psd-nav-assets{gap:7px 14px!important}

/* Three-row ribbon baseline:
   1) Main links + Market Pulse + Account + Theme
   2) Asset links
   3) Donate/Tour + Social + Watchlist */
.psd-shared-header .psd-nav-bottom{
  position:relative!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-height:27px!important;
  height:27px!important;
  flex:0 0 27px!important;
}
.psd-shared-header .psd-bottom-promos{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:12px!important;
  margin-right:auto!important;
  min-width:0!important;
}
.psd-shared-header .psd-bottom-promos>a,
.psd-shared-header .psd-bottom-promos>#site-tour-button{
  margin:0!important;
  transform:none!important;
}
.psd-shared-header .psd-market-pulse-link{
  margin-left:0!important;
  pointer-events:auto!important;
}
.psd-shared-header .psd-nav-main .psd-market-pulse-link{
  font-family:"Inter","Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.15!important;
  letter-spacing:.05px!important;
  text-shadow:none!important;
  white-space:nowrap!important;
  gap:0!important;
}
.psd-shared-header .psd-nav-main .psd-market-pulse-link::before{
  content:none!important;
  display:none!important;
  width:0!important;
  height:0!important;
  min-width:0!important;
  flex:0 0 0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
}
.psd-shared-header .psd-ribbon-actions{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  margin-left:0!important;
}
.psd-shared-header .psd-ribbon-actions #psd-ribbon-watchlist-link{
  position:static!important;
  display:inline-flex!important;
  min-width:116px!important;
}
.psd-shared-header .psd-ribbon-actions #psd-ribbon-watchlist-link[hidden]{display:none!important}
.psd-shared-header .psd-nav-main #psd-account-nav-link{
  order:98!important;
  flex:0 0 auto!important;
}
.psd-shared-header .psd-nav-main .psd-theme-toggle{
  order:99!important;
  position:static!important;
  margin:0 0 0 4px!important;
  flex:0 0 auto!important;
}
@media(max-width:1180px){
  .psd-shared-header .nav{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    gap:4px!important;
    justify-content:flex-start!important;
  }
  .psd-shared-header .psd-nav-row{
    height:auto!important;
    min-height:27px!important;
    flex:0 0 auto!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    white-space:normal!important;
  }
  .psd-shared-header .psd-nav-bottom{gap:6px!important}
  .psd-shared-header .psd-bottom-promos{
    margin-right:0!important;
    flex-wrap:wrap!important;
  }
  .psd-shared-header .psd-market-pulse-link{margin-left:0!important}
}

/* ========================================================================
   PUBLIC SENTIMENT DASH — PRODUCTION RIBBON / GLOBAL NAVIGATION
   AUTHORITATIVE DESIGN SECTION
   ========================================================================

   THIS IS THE SINGLE EDIT POINT FOR RIBBON APPEARANCE GOING FORWARD.

   Owns:
   - ribbon dimensions and spacing
   - ribbon fonts, colors and animation
   - account/menu appearance
   - tour/donation controls
   - icons and social controls
   - desktop/mobile ribbon geometry
   - cross-page ribbon continuity

   site-nav.js owns ribbon HTML + behavior.
   site-theme.js owns theme state only.
   vote-widget.js owns voting only.

   Do not put ribbon CSS back into JavaScript or individual HTML pages.
   ======================================================================== */

/* Styles formerly injected late by site-nav.js are now available before first paint. */
@keyframes psdLabelDance{
        0%,100%{transform:translateY(0) rotate(0deg)}
        25%{transform:translateY(-2px) rotate(-.25deg)}
        50%{transform:translateY(1px) rotate(0deg)}
        75%{transform:translateY(-2px) rotate(.25deg)}
      }
      @keyframes psdLabelShine{
        0%,100%{box-shadow:0 0 10px rgba(210,153,34,.18);filter:brightness(1)}
        50%{box-shadow:0 0 25px rgba(240,183,47,.55),inset 0 0 12px rgba(255,215,128,.12);filter:brightness(1.12)}
      }
      .psd-shared-header .psd-dancing-label{
        width:340px!important;
        min-width:340px!important;
        max-width:340px!important;
        justify-content:center!important;
        box-sizing:border-box!important;
        translate:0 2px;
        animation:psdLabelDance 3.2s ease-in-out infinite,psdLabelShine 2.1s ease-in-out infinite!important;
        transform-origin:center!important;
        will-change:transform,filter,box-shadow;
      }
      /* AI-Built copies the live rendered height of Constantly Learning in alignRibbonGeometry(). */
      .psd-shared-header .brand-stamp.psd-dancing-label{
        translate:0 6px;
        justify-content:center!important;
        text-align:center!important;
        white-space:nowrap!important;
        font-size:12px!important;
        letter-spacing:.2px!important;
        animation-delay:.35s,.35s!important;
      }
      .psd-shared-header .site-subtitle.psd-ai-subtitle{
        position:relative;
        top:38px;
        margin-top:3px;
        font-family:"OCR A Std","Eurostile","Bank Gothic","Courier New",monospace!important;
        font-size:15.5px!important;
        font-weight:700!important;
        letter-spacing:.7px!important;
      }
      @media(prefers-reduced-motion:reduce){
        .psd-shared-header .psd-dancing-label{animation:psdLabelShine 2.8s ease-in-out infinite!important}
      }

      /*
       * Shared-ribbon stacking fix.
       * The donation/tour row intentionally extends beyond the center grid cell.
       * Keep that complete row above the navigation hit area on every page.
       */
      .psd-shared-header .header-center{
        position:relative!important;
        z-index:100!important;
        overflow:visible!important;
        pointer-events:none!important;
      }
      .psd-shared-header .header-center > a[target="_blank"],
      .psd-shared-header #site-tour-button{
        pointer-events:auto!important;
      }
      .psd-shared-header .nav{
        position:relative!important;
        z-index:1!important;
      }
      .site-tour-banner{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:7px;
        margin:7px 8px 0;
        padding:7px 15px;
        border:1px solid rgba(255,204,82,.72);
        border-radius:999px;
        background:linear-gradient(180deg,rgba(85,61,12,.96),rgba(28,24,18,.96));
        color:#ffe08a;
        font:inherit;
        font-size:11px;
        font-weight:900;
        line-height:1;
        white-space:nowrap;
        cursor:pointer;
        position:relative;
        z-index:101;
        pointer-events:auto;
        isolation:isolate;
        box-shadow:0 0 18px rgba(225,167,39,.22);
        transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
      }
      .site-tour-banner:hover,.site-tour-banner:focus-visible{
        transform:translateY(-1px);
        background:linear-gradient(180deg,#d7a42f,#8c6314);
        color:#07090d;
        box-shadow:0 0 24px rgba(255,198,69,.42);
        outline:none;
      }
      body.site-tour-open{overflow:hidden}
      .site-tour-overlay{
        position:fixed;
        inset:0;
        z-index:2147483647;
        display:flex;
        align-items:center;
        justify-content:center;
        background:#000;
      }
      .site-tour-overlay video{
        display:block;
        width:100vw;
        height:100vh;
        object-fit:contain;
        background:#000;
      }
      .site-tour-close{
        position:absolute;
        top:max(16px,env(safe-area-inset-top));
        right:max(16px,env(safe-area-inset-right));
        z-index:2;
        padding:11px 18px;
        border:2px solid #fff2b3;
        border-radius:999px;
        background:#f5b82e;
        color:#161006;
        font:inherit;
        font-size:14px;
        font-weight:900;
        cursor:pointer;
        box-shadow:0 6px 22px rgba(0,0,0,.55),0 0 0 3px rgba(245,184,46,.22);
      }
      .site-tour-close:hover,.site-tour-close:focus-visible{
        background:#ffd35c;
        border-color:#fff8d6;
        outline:none;
      }
      @media (max-width:900px){
        .site-tour-banner{margin-top:8px;font-size:10px;padding:7px 12px}
      }

/* Account/navigation styles formerly injected late by site-nav.js. */
.psd-account-nav-wrap{
        position:relative;
        display:inline-flex;
        align-items:center;
      }
      .psd-account-menu{
        position:absolute;
        top:calc(100% + 9px);
        right:0;
        z-index:2147483000;
        width:190px;
        padding:8px;
        border:1px solid rgba(210,153,34,.38);
        border-radius:14px;
        background:rgba(13,17,23,.99);
        box-shadow:0 18px 48px rgba(0,0,0,.52);
      }
      .psd-account-menu[hidden]{display:none!important}
      .psd-account-menu a,
      .psd-account-menu button{
        display:flex!important;
        width:100%;
        justify-content:flex-start;
        box-sizing:border-box;
        margin:0;
        padding:10px 11px!important;
        border:0;
        border-radius:9px;
        background:transparent;
        color:#e6edf3;
        font:600 12px Inter,Segoe UI,Arial,sans-serif;
        text-align:left;
        cursor:pointer;
      }
      .psd-account-menu a::before{display:none!important}
      .psd-account-menu a:hover,
      .psd-account-menu button:hover{
        background:rgba(210,153,34,.16);
        color:#ffd780;
      }
      #psd-account-nav-link.psd-member-link{
        color:#ffd780;
        border:1px solid rgba(210,153,34,.32);
        background:rgba(210,153,34,.10);
      }
      #psd-account-nav-link.psd-member-link::after{
        content:"▾";
        display:inline-block;
        margin-left:6px;
        font-size:9px;
        font-weight:900;
        line-height:1;
        color:currentColor;
        vertical-align:middle;
      }

      /* Shared ribbon rows are rendered explicitly in render(); theme CSS owns row placement.
         Do not suppress .nav a::before here: those pseudo-elements carry the ribbon page icons. */
      .psd-ribbon-social-wrap{
        display:inline-flex;
        align-items:center;
      }
      .psd-ribbon-social-wrap .social-links{margin-left:0!important}
      #psd-ribbon-watchlist-link:hover,
      #psd-ribbon-watchlist-link:focus-visible{
        color:#fff;
        background:rgba(210,153,34,.20);
        border-color:rgba(210,153,34,.52);
        outline:none;
      }
      #psd-ribbon-watchlist-link[hidden]{display:none!important}

      /* Member AI links: beveled gold text only — intentionally no box/background. */
      .psd-shared-header .psd-ai-feature-link,
      .psd-shared-header .psd-nav-link[href="market-pulse.html"],
      .psd-shared-header .psd-nav-link[href="market-intelligence.html"]{
        color:#f2cf72!important;
        font-size:13px!important;
        font-weight:900!important;
        letter-spacing:.12px!important;
        background:transparent!important;
        border-color:transparent!important;
        box-shadow:none!important;
        text-shadow:0 -1px 0 rgba(255,248,214,.30),0 1px 0 #6b4a0b,0 2px 3px rgba(96,62,4,.72),0 0 7px rgba(210,153,34,.34)!important;
      }
      .psd-shared-header .psd-ai-feature-link:hover,
      .psd-shared-header .psd-ai-feature-link:focus-visible,
      .psd-shared-header .psd-nav-link[href="market-pulse.html"]:hover,
      .psd-shared-header .psd-nav-link[href="market-pulse.html"]:focus-visible,
      .psd-shared-header .psd-nav-link[href="market-intelligence.html"]:hover,
      .psd-shared-header .psd-nav-link[href="market-intelligence.html"]:focus-visible{
        color:#ffe7a3!important;
        background:transparent!important;
        border-color:transparent!important;
        box-shadow:none!important;
        text-shadow:0 -1px 0 rgba(255,252,230,.42),0 1px 0 #77520c,0 2px 4px rgba(96,62,4,.78),0 0 10px rgba(225,167,39,.52)!important;
      }

      .psd-shared-header .psd-nav-link[href="market-intelligence.html"]::before{
        content:"AI"!important;
        font-family:Inter,"Segoe UI",Arial,sans-serif!important;
        font-size:8px!important;
      }

/* Final compact ribbon geometry formerly injected late by vote-widget.js. */
.header{
      padding:8px 22px 7px !important;
      gap:14px !important;
      min-height:148px !important;
    }

    .logo{
      width:112px !important;
      height:112px !important;
      padding:6px !important;
    }

    .brand{
      gap:11px !important;
    }

    .brand-stamp,
    .page-chip{
      padding:7px 12px !important;
      font-size:12px !important;
    }

    .header-pill{
      min-width:340px !important;
      padding:8px 30px !important;
      font-size:12px !important;
      justify-content:center !important;
      text-align:center !important;
      white-space:nowrap !important;
    }

    .site-subtitle{
      font-size:12px !important;
    }

    .header-center{
      min-width:360px !important;
      transform:translateY(-5px) !important;
    }

    .nav{
      gap:6px 8px !important;
      transform:translateY(-5px) !important;
      align-content:flex-start !important;
    }

    .nav a{
      font-size:11.5px !important;
      line-height:1.02 !important;
      padding:5px 6px !important;
      gap:4px !important;
      white-space:nowrap !important;
    }

    .nav a::before{
      width:12px !important;
      min-width:12px !important;
      font-size:10.5px !important;
    }

    .social-links{
      gap:6px !important;
      margin-left:6px !important;
      margin-top:0 !important;
    }

    .social-label{
      font-size:11px !important;
    }

    .social-pill{
      min-width:38px !important;
      padding:6px 10px !important;
      font-size:11px !important;
    }

    .social-pill.linkedin{
      min-width:68px !important;
    }

    @media(max-width:1180px){
      .header{
        min-height:auto !important;
      }
      .header-center,
      .nav{
        transform:none !important;
      }
    }

/* Reserve final desktop ribbon space before site-nav.js renders the shared header. */
@media(min-width:1181px){
  #site-header{
    display:block;
    min-height:148px;
  }
  .psd-shared-header #psd-account-nav-link{
    min-width:92px!important;
    justify-content:center!important;
    box-sizing:border-box!important;
  }
}

/*
  Smooth same-origin document navigation.
  The page can reload, but the browser keeps the shared ribbon visually
  continuous while the new document replaces the old one.
*/
@view-transition{navigation:auto}
.psd-shared-header{view-transition-name:psd-production-ribbon}
::view-transition-group(psd-production-ribbon),
::view-transition-old(psd-production-ribbon),
::view-transition-new(psd-production-ribbon){
  animation:none!important;
  mix-blend-mode:normal!important;
}
@media(prefers-reduced-motion:reduce){
  ::view-transition-old(root),
  ::view-transition-new(root){animation:none!important}
}

/* ========================================================================
   RIBBON — CONSTANTLY LEARNING PILL: FIXED ABOVE AI-BUILT
   ========================================================================
   Desktop only.

   Important:
   .header-center normally has transform:translateY(-5px). A transformed
   ancestor becomes the containing block for absolutely positioned children.
   That caused the previous left:145px value to be measured from the center
   column instead of from the ribbon itself.

   The center grid track is NOT removed or resized. We only remove its visual
   transform because it contains no other visible control except this pill.
   Therefore navigation, logo, donation/tour, social links, spacing, and
   ribbon dimensions remain unchanged.
   ======================================================================== */
@media(min-width:1181px){
  .psd-shared-header .header-center{
    position:static!important;
    transform:none!important;
  }

  .psd-shared-header .psd-learning-label{
    position:absolute!important;
    left:145px!important;
    top:5px!important;
    translate:0 0!important;
    margin:0!important;
    z-index:100!important;
  }
}
