/* ============================================================
   Bonded – Shared Stylesheet
   Theme is controlled by data-theme="light"|"dark" on <html>.
   Default: light. User preference saved to localStorage.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;500;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Light theme ─────────────────────────────────────────── */
:root,
[data-theme="light"] {
  --bg:          #f7f9f8;
  --surface:     #ffffff;
  --surface2:    #f0f5f3;
  --surface3:    #e8f4f0;
  --teal:        #1a6b5a;
  --teal-light:  #2a8f77;
  --teal-pale:   #e8f4f0;
  --teal-border: #b8ddd5;
  --teal-glow:   rgba(26,107,90,.08);
  --sage:        #4a7c6f;
  --amber:       #e8832a;
  --amber-pale:  #fef3e8;
  --text:        #111c19;
  --text-2:      #6b7d78;
  --text-3:      #9eb3ad;
  --border:      #dde8e5;
  --border-2:    #eef4f2;
  --nav-bg:      rgba(255,255,255,0.95);
  --card-shadow: 0 1px 3px rgba(26,107,90,.06), 0 4px 16px rgba(26,107,90,.08);
  --theme-icon:  "☀️";
  --terra:       #C8532E;
  --terra-pale:  #F1DDD1;
}

/* ── Dark theme ──────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface2:    #1c2128;
  --surface3:    #21262d;
  --teal:        #3dd68c;
  --teal-light:  #5ee8a4;
  --teal-pale:   rgba(61,214,140,.12);
  --teal-border: rgba(61,214,140,.2);
  --teal-glow:   rgba(61,214,140,.12);
  --sage:        #3dd68c;
  --amber:       #f0a04b;
  --amber-pale:  rgba(240,160,75,.15);
  --text:        #e6edf3;
  --text-2:      #8b949e;
  --text-3:      #484f58;
  --border:      #30363d;
  --border-2:    #21262d;
  --nav-bg:      rgba(13,17,23,0.92);
  --card-shadow: none;
  --theme-icon:  "🌙";
  --terra:       #e06640;
  --terra-pale:  rgba(200,83,46,.15);
}

/* ── Smooth theme transition ─────────────────────────────── */
*, *::before, *::after {
  box-sizing:  border-box;
  margin:      0;
  padding:     0;
  transition:  background-color .2s ease, border-color .2s ease, color .15s ease;
}
/* Don't animate transforms/opacity (breaks animations) */
.spinner, .loading-overlay, .toggle-thumb, input[type=range]::-webkit-slider-thumb {
  transition: none !important;
}

html { scroll-behavior: smooth; }

body {
  background:             var(--bg);
  color:                  var(--text);
  font-family:            'Cabinet Grotesk', sans-serif;
  font-weight:            400;
  line-height:            1.6;
  -webkit-font-smoothing: antialiased;
  min-height:             100vh;
  display:                flex;
  flex-direction:         column;
}
/* Screener page — full viewport height, no body scroll */
body.page-screener {
  height:   100vh;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }

/* ── NAV ─────────────────────────────────────────────────── */
.site-nav {
  background:    var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding:       0 3rem;
  display:       flex;
  align-items:   center;
  height:        64px;
  gap:           2.5rem;
  position:      sticky;
  top:           0;
  z-index:       300;
  box-shadow:    0 2px 12px rgba(26,107,90,.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-logo {
  display:     flex;
  align-items: center;
  gap:         .6rem;
  flex-shrink: 0;
}
.nav-logo-mark {
  width:           30px;
  height:          30px;
  background:      var(--teal);
  border-radius:   7px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           #fff;
  font-family:     'Fraunces', Georgia, serif;
  font-weight:     700;
  font-style:      italic;
  font-size:       18px;
  line-height:     1;
  flex-shrink:     0;
}
.nav-logo-text {
  font-family:    'Fraunces', Georgia, serif;
  font-size:      1.15rem;
  font-weight:    600;
  color:          var(--text);
  letter-spacing: -.02em;
}
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links a {
  color:         var(--text-2);
  font-size:     .85rem;
  font-weight:   500;
  padding:       7px 13px;
  border-radius: 8px;
  transition:    background .15s, color .15s;
}
.nav-links a:hover  { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--text); background: var(--surface2); font-weight: 600; }
.nav-right {
  margin-left: auto;
  display:     flex;
  align-items: center;
  gap:         .75rem;
}

/* ── Theme toggle switch ─────────────────────────────────── */
.theme-toggle {
  all:           unset;
  cursor:        pointer;
  flex-shrink:   0;
  display:       inline-flex;
  align-items:   center;
}

.theme-toggle__track {
  position:      relative;
  display:       inline-flex;
  align-items:   center;
  width:         52px;
  height:        28px;
  border-radius: 100px;
  border:        1.5px solid var(--border);
  background:    var(--surface2);
  transition:    background .25s ease, border-color .25s ease;
}

.theme-toggle[aria-checked="true"] .theme-toggle__track {
  background:    var(--teal-pale);
  border-color:  var(--teal-border);
}

.theme-toggle__knob {
  position:      absolute;
  left:          3px;
  width:         20px;
  height:        20px;
  border-radius: 50%;
  background:    var(--surface);
  box-shadow:    0 1px 4px rgba(0,0,0,.18);
  display:       flex;
  align-items:   center;
  justify-content: center;
  transition:    transform .25s cubic-bezier(.34,1.56,.64,1), background .25s ease, box-shadow .25s ease;
  overflow:      hidden;
}

.theme-toggle[aria-checked="true"] .theme-toggle__knob {
  transform:     translateX(24px);
  background:    var(--teal);
  box-shadow:    0 1px 6px rgba(61,214,140,.35);
}

.theme-toggle__icon {
  position:      absolute;
  width:         13px;
  height:        13px;
  transition:    opacity .2s ease, transform .25s ease;
  color:         var(--text-2);
}

.theme-toggle__icon--sun {
  opacity:       1;
  transform:     rotate(0deg) scale(1);
}
.theme-toggle__icon--moon {
  opacity:       0;
  transform:     rotate(-45deg) scale(.6);
}

.theme-toggle[aria-checked="true"] .theme-toggle__icon--sun {
  opacity:       0;
  transform:     rotate(45deg) scale(.6);
}
.theme-toggle[aria-checked="true"] .theme-toggle__icon--moon {
  opacity:       1;
  transform:     rotate(0deg) scale(1);
  color:         white;
}

.theme-toggle:hover .theme-toggle__track {
  border-color:  var(--teal-border);
}
.theme-toggle:focus-visible .theme-toggle__track {
  outline:       2px solid var(--teal);
  outline-offset: 2px;
}

/* ── Language switcher ───────────────────────────────────── */
.lang-switcher {
  display:       inline-flex;
  gap:           2px;
  background:    transparent;
  border:        1px solid var(--border);
  border-radius: 999px;
  padding:       3px;
}
.lang-btn {
  border:         none;
  background:     transparent;
  color:          var(--text-3);
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .7rem;
  font-weight:    600;
  padding:        4px 10px;
  border-radius:  999px;
  cursor:         pointer;
  transition:     all .15s;
  letter-spacing: .04em;
}
.lang-btn.active              { background: var(--text); color: var(--bg); }
[data-theme="dark"] .lang-btn.active { background: var(--text); color: var(--bg); }
.lang-btn:hover:not(.active)  { color: var(--text-2); }

/* ── Nav CTA ─────────────────────────────────────────────── */
.nav-cta {
  background:     var(--teal);
  color:          white;
  border:         none;
  padding:        .45rem 1.1rem;
  border-radius:  7px;
  font-family:    'Cabinet Grotesk', sans-serif;
  font-size:      .83rem;
  font-weight:    700;
  cursor:         pointer;
  transition:     background .15s, transform .15s;
  letter-spacing: -.01em;
}
.nav-cta:hover { background: var(--teal-light); transform: translateY(-1px); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background:      var(--surface);
  border-top:      1px solid var(--border);
  padding:         1.75rem 3rem;
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  gap:             3rem;
  margin-top:      auto;
}
.footer-disclaimer {
  color:       var(--text-3);
  font-size:   .72rem;
  line-height: 1.55;
  max-width:   600px;
}
.footer-disclaimer strong { color: var(--text-2); }
.footer-links { display: flex; gap: 1.5rem; flex-shrink: 0; align-items: center; }
.footer-links a {
  color:       var(--text-2);
  font-size:   .78rem;
  font-weight: 500;
  transition:  color .15s;
}
.footer-links a:hover { color: var(--teal); }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; transform:translateY(8px);  } to { opacity:1; transform:translateY(0); } }
@keyframes spin    { to   { transform: rotate(360deg); } }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav   { padding: 0 1.25rem; gap: 1.25rem; }
  .nav-links  { display: none; }
  .site-footer { padding: 1.5rem 1.25rem; flex-direction: column; gap: 1rem; }
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* ── Hero Minimal (C variant) ────────────────────────────── */
.hero-minimal {
  padding:       80px 3rem 96px;
  text-align:    center;
  background:    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow-anim {
  opacity:   0;
  animation: heroEyebrowIn .5s ease .05s both;
}
@keyframes heroEyebrowIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-word {
  display:   inline-block;
  opacity:   0;
  animation: heroWordIn .7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-word-1 { animation-delay: .18s; }
.hero-word-2 { animation-delay: .38s; }
.hero-word-3 { animation-delay: .55s; }
.hero-word-4 { animation-delay: .68s; }
.hero-cta-wrap { display: flex; justify-content: center; }
@keyframes heroWordIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-minimal-inner {
  max-width: 1200px;
  margin:    0 auto;
}
.hero-minimal-eyebrow {
  display:        inline-flex;
  align-items:    center;
  gap:            8px;
  font-family:    'JetBrains Mono', 'DM Mono', ui-monospace, monospace;
  font-size:      11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--text-2);
  margin-bottom:  28px;
}
.hero-minimal-eyebrow::before {
  content:       '';
  width:         6px;
  height:        6px;
  background:    var(--terra);
  border-radius: 50%;
  flex-shrink:   0;
}
.hero-minimal-headline {
  font-family:    'Fraunces', 'Instrument Serif', Georgia, serif;
  font-weight:    400;
  font-size:      clamp(52px, 7.5vw, 112px);
  line-height:    0.95;
  letter-spacing: -0.035em;
  max-width:      1100px;
  margin:         0 auto;
  color:          var(--text);
}
.hero-minimal-headline em {
  font-style:  italic;
  font-weight: 500;
}
.hero-minimal-headline .em-green {
  color:       var(--teal);
  font-style:  italic;
  font-weight: 500;
}
.hero-minimal-lead {
  max-width:   560px;
  margin:      32px auto 28px;
  font-size:   16px;
  line-height: 1.6;
  color:       var(--text-2);
}
.hero-minimal-cta {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      var(--teal);
  color:           #fff;
  padding:         12px 26px;
  border-radius:   999px;
  font-weight:     600;
  font-size:       14px;
  letter-spacing:  -.01em;
  text-decoration: none;
  transition:      transform .2s, background .15s;
}
.hero-minimal-cta:hover {
  background: var(--teal-light);
  transform:  translateY(-1px);
}
.hero-minimal-ticker-wrap {
  margin-top:  72px;
  overflow:    hidden;
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding:     16px 0;
}
.hero-minimal-ticker {
  display:     flex;
  gap:         56px;
  white-space: nowrap;
  animation:   hm-ticker-slide 55s linear infinite;
  font-family: 'JetBrains Mono', 'DM Mono', ui-monospace, monospace;
  font-size:   13px;
  color:       var(--text-2);
}
.hero-minimal-ticker-item {
  display:     inline-flex;
  gap:         10px;
  align-items: center;
  flex-shrink: 0;
}
.hero-minimal-ticker-yield {
  color:       var(--teal);
  font-weight: 600;
}
@keyframes hm-ticker-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 768px) {
  .hero-minimal { padding: 3rem 1.5rem 4rem; }
  .hero-minimal-headline { font-size: clamp(40px, 11vw, 72px); }
  .hero-minimal-lead { font-size: 15px; }
  .hero-minimal-ticker-wrap { margin-top: 48px; }
}

.hero {
  background:    var(--surface);
  border-bottom: 1px solid var(--border);
  padding:       4rem 3rem 3.5rem;
  display:       grid;
  grid-template-columns: 1fr auto;
  gap:           4rem;
  align-items:   center;
  animation:     fadeUp .55s ease both;
}
.hero-eyebrow {
  display:        inline-flex;
  align-self:     start;
  align-items:    center;
  gap:            .5rem;
  background:     var(--teal-pale);
  color:          var(--teal);
  font-size:      .75rem;
  font-weight:    700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding:        .3rem .75rem;
  border-radius:  100px;
  margin-bottom:  1.25rem;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px;
  background: var(--teal); border-radius: 50%;
}
.hero-headline {
  font-family:   'Instrument Serif', serif;
  font-style:    normal;
  font-size:     clamp(1.6rem, 2.4vw, 2.2rem);
  line-height:   1.35;
  color:         var(--text);
  max-width:     560px;
  margin-bottom: 1rem;
}
.hero-headline strong {
  font-style:  normal;
  color:       var(--teal);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
}
.hero-sub {
  color:         var(--text-2);
  font-size:     .95rem;
  max-width:     440px;
  line-height:   1.65;
  margin-bottom: 2rem;
}
.hero-cta {
  display:        inline-block;
  align-self:     start;
  background:     var(--teal);
  color:          white;
  padding:        .75rem 1.75rem;
  border-radius:  8px;
  font-weight:    700;
  font-size:      .9rem;
  transition:     all .2s;
  letter-spacing: -.01em;
}
.hero-cta:hover { background: var(--teal-light); transform: translateY(-1px); }

.hero-card {
  background:     linear-gradient(145deg, var(--teal) 0%, #0e4f40 100%);
  border-radius:  16px;
  padding:        2rem 1.75rem;
  min-width:      250px;
  color:          white;
  box-shadow:     0 8px 32px rgba(26,107,90,.3);
  flex-shrink:    0;
  display:        flex;
  flex-direction: column;
  gap:            0;
}
[data-theme="dark"] .hero-card {
  background: linear-gradient(145deg, #1a4d36 0%, #0a2e21 100%);
  box-shadow: 0 8px 32px rgba(61,214,140,.15);
}
.hero-card-count-wrap {
  padding-bottom: 1.5rem;
}
.hero-card-count {
  font-family:    'Instrument Serif', serif;
  font-size:      3.5rem;
  line-height:    1;
  font-weight:    400;
  letter-spacing: -.02em;
  margin-bottom:  .3rem;
}
.hero-card-count-label {
  font-size:      .72rem;
  font-weight:    700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity:        .55;
}
.hero-card-divider {
  height:     1px;
  background: rgba(255,255,255,.15);
  margin:     0 0 1.5rem;
}
.hero-card-btn {
  background:     white;
  color:          var(--teal);
  border:         none;
  width:          100%;
  padding:        .85rem 1.25rem;
  border-radius:  10px;
  font-family:    'Cabinet Grotesk', sans-serif;
  font-size:      .9rem;
  font-weight:    700;
  cursor:         pointer;
  transition:     all .2s;
  letter-spacing: -.01em;
  line-height:    1.35;
}
.hero-card-btn:hover {
  background: var(--teal-pale);
  transform:  translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.benefits {
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:    var(--bg);
  animation:     fadeUp .55s .1s ease both;
}
.benefits-grid {
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  max-width:             1340px;
  margin:                0 auto;
  padding:               0 2.5rem;
}
.benefit {
  padding:        1.6rem 2rem;
  border-right:   1px solid var(--border);
  display:        flex;
  flex-direction: column;
  gap:            4px;
}
.benefit:last-child { border-right: none; }
.benefit-k {
  font-family:    'Fraunces', 'Instrument Serif', serif;
  font-size:      2rem;
  font-weight:    500;
  letter-spacing: -.015em;
  line-height:    1;
  color:          var(--text);
  font-variant-numeric: tabular-nums;
}
.benefit-label {
  font-size:   .82rem;
  color:       var(--text-2);
  margin-top:  .15rem;
}
.benefit-note {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .6rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color:          var(--text-3);
  margin-top:     .6rem;
}

@media (max-width: 768px) {
  .hero      { grid-template-columns: 1fr; padding: 2.5rem 1.5rem; }
  .hero-card { display: none; }
  .benefits-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0 1.25rem;
  }
  .benefit {
    padding: 1.25rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .benefit:nth-child(odd)  { border-right: 1px solid var(--border); }
  .benefit:last-child      { border-bottom: none; }
  .benefit:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

/* ============================================================
   SCREENER
   ============================================================ */

.screener-layout { display: flex; flex: 1; min-height: 0; overflow: hidden; }

.sidebar {
  width: 268px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  overflow-y: auto;
  height: 100%;
  display: flex; flex-direction: column;
}
.sidebar-title {
  font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.search-wrap     { position: relative; margin-bottom: 1rem; }
.search-input {
  width: 100%;
  background: var(--surface3); border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .82rem; font-weight: 500;
  padding: .42rem .75rem .42rem 2rem;
  border-radius: 7px; outline: none;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  border-color: var(--teal);
  background: var(--surface2);
  box-shadow: 0 0 0 3px var(--teal-glow);
}
.search-icon {
  position: absolute; left: .65rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); font-size: .8rem; pointer-events: none;
}

.filter-block { padding: .9rem 0; border-bottom: 1px solid var(--border-2); }
.filter-block:last-of-type { border-bottom: none; }
.filter-label {
  font-size: .65rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: .65rem;
  display: flex; align-items: center; justify-content: space-between;
}
.filter-label-val {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; font-weight: 400;
  color: var(--teal); letter-spacing: 0; text-transform: none;
}

.toggle-track {
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 8px; padding: 3px;
  display: flex; gap: 2px; position: relative; cursor: pointer;
}
.toggle-option {
  flex: 1; text-align: center;
  font-size: .72rem; font-weight: 600;
  padding: .4rem .4rem; border-radius: 6px;
  color: var(--text-2); cursor: pointer;
  position: relative; z-index: 1;
  line-height: 1.25; user-select: none;
}
.toggle-option.active { color: white; }
[data-theme="dark"] .toggle-option.active { color: #0d1117; }
.toggle-thumb {
  position: absolute; top: 3px; bottom: 3px;
  border-radius: 6px; background: var(--teal);
  z-index: 0; box-shadow: 0 0 8px var(--teal-glow);
  transition: left .22s cubic-bezier(.4,0,.2,1), width .22s cubic-bezier(.4,0,.2,1) !important;
}

.range-slider-wrap { padding: .1rem 0 .4rem; }
.range-ends {
  display: flex; justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: .66rem; color: var(--text-3); margin-bottom: .55rem;
}
.range-track {
  position: relative; height: 4px;
  background: var(--surface3); border-radius: 10px;
  margin: .5rem .5rem; border: 1px solid var(--border);
}
.range-fill {
  position: absolute; height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--teal));
  border-radius: 10px;
}
input[type=range] {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: calc(100% + 1rem); left: -.5rem;
  height: 0; background: transparent;
  -webkit-appearance: none; appearance: none; pointer-events: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--teal);
  box-shadow: 0 0 6px var(--teal-glow);
  cursor: pointer; pointer-events: auto;
  transition: transform .15s !important;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.25); }
input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--teal);
  cursor: pointer; pointer-events: auto;
}

.esg-row {
  display: flex; align-items: center;
  justify-content: space-between; cursor: pointer; padding: .15rem 0;
}
.esg-label-main {
  font-size: .82rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: .45rem;
}
.esg-label-sub { font-size: .68rem; color: var(--text-3); margin-top: .1rem; }
.ios-switch {
  width: 36px; height: 20px;
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 100px; position: relative; cursor: pointer;
  flex-shrink: 0;
}
.ios-switch.on {
  background: #1a4d36; border-color: var(--teal);
  box-shadow: 0 0 8px var(--teal-glow);
}
.ios-switch::after {
  content: ''; position: absolute;
  top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--text-3);
  transition: left .2s, background .2s !important;
}
.ios-switch.on::after { left: 18px; background: var(--teal); }

.reset-btn {
  margin-top: 1rem; width: 100%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .75rem; font-weight: 600;
  padding: .48rem; border-radius: 7px; cursor: pointer;
}
.reset-btn:hover {
  border-color: var(--teal-border);
  color: var(--teal); background: var(--teal-pale);
}

.main-content {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  min-height: 0;
  overflow: hidden;
}
.table-topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex; align-items: center; flex-shrink: 0;
}

.screener-disclaimer {
  background:   var(--surface);
  border-top:   1px solid var(--border);
  padding:      .65rem 1.5rem;
  font-size:    .7rem;
  color:        var(--text-3);
  line-height:  1.5;
  flex-shrink:  0;
  display:      flex;
  align-items:  center;
  justify-content: space-between;
  gap:          .75rem;
}
.screener-disclaimer strong { color: var(--text-2); }
.disclaimer-close {
  background: none;
  border:     none;
  color:      var(--text-3);
  cursor:     pointer;
  font-size:  .9rem;
  flex-shrink: 0;
  padding:    .25rem;
}
.disclaimer-close:hover { color: var(--text-2); }
.result-count { font-size: .83rem; font-weight: 700; color: var(--text); }
.result-count span { color: var(--teal); }
.result-sub { font-size: .72rem; color: var(--text-3); margin-top: .05rem; }

.loading-overlay {
  position: absolute; inset: 0; background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  z-index: 50; opacity: 1; transition: opacity .3s !important;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.loading-text { font-size: .8rem; color: var(--text-3); font-family: 'DM Mono', monospace; }

.error-banner {
  background: #2d1b1b; border: 1px solid rgba(248,81,73,.3);
  color: #f85149; padding: .75rem 1.5rem;
  font-size: .82rem; display: none; align-items: center; gap: .75rem;
}
.error-banner.show { display: flex; }
.retry-btn {
  background: rgba(248,81,73,.15); border: 1px solid rgba(248,81,73,.3);
  color: #f85149; font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .75rem; font-weight: 600;
  padding: .3rem .7rem; border-radius: 5px; cursor: pointer;
  margin-left: auto;
}
.retry-btn:hover { background: rgba(248,81,73,.25); }

.table-container { overflow: auto; flex: 1; touch-action: pan-x pan-y pinch-zoom; }
.bond-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .81rem; }
.bond-table thead th {
  padding: .55rem 1.1rem; text-align: left;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; cursor: pointer; user-select: none;
  position: sticky; top: 0; z-index: 10;
}
.bond-table thead th:hover  { color: var(--text-2); }
.bond-table thead th.sorted { color: var(--teal); }
.sa { margin-left: .2rem; opacity: .6; font-style: normal; }
.sa.asc::after  { content: "↑"; }
.sa.desc::after { content: "↓"; }
.bond-table tbody tr  { border-bottom: 1px solid var(--border-2); cursor: pointer; }
.bond-table tbody tr:hover { background: var(--surface2); }
.bond-table tbody td  { padding: .65rem 1.1rem; vertical-align: middle; }

.issuer-name { font-weight: 600; color: var(--text-2); font-size: .83rem; letter-spacing: -.01em; }
.issuer-sub  { font-size: .65rem; color: var(--text-3); margin-top: .06rem; }

.isin-chip {
  display:        inline-flex;
  align-items:    center;
  gap:            .3rem;
  margin-top:     .3rem;
  padding:        .15rem .45rem;
  background:     var(--surface2);
  border:         1px solid var(--border);
  border-radius:  4px;
  font-family:    'DM Mono', monospace;
  font-size:      .6rem;
  color:          var(--text-3);
  cursor:         pointer;
  transition:     background .12s, color .12s, border-color .12s;
  white-space:    nowrap;
}
.isin-chip:hover {
  background:     rgba(26,107,90,.08);
  border-color:   var(--teal-border);
  color:          var(--teal);
}
.isin-chip-icon { opacity: .6; font-size: .65rem; }

.pill {
  display: inline-block; font-size: .6rem; font-weight: 700;
  padding: .15rem .45rem; border-radius: 100px;
  letter-spacing: .04em; white-space: nowrap;
}
.pill-ig  { background: var(--teal-pale); color: var(--teal); border: 1px solid var(--teal-border); }
.pill-hy  { background: var(--amber-pale); color: var(--amber); border: 1px solid rgba(232,131,42,.3); }
.pill-esg { background: var(--teal-pale); color: var(--teal); border: 1px solid var(--teal-border); margin-left: .3rem; }
[data-theme="dark"] .pill-hy  { border-color: rgba(240,160,75,.25); }
[data-theme="dark"] .pill-esg { color: #3dd68c; }

.pill-liq-hi { background: rgba(88,166,255,.12); color: #58a6ff; border: 1px solid rgba(88,166,255,.2); }
.pill-liq-lo { background: var(--surface3); color: var(--text-3); border: 1px solid var(--border); }

.yield-num {
  font-family: 'DM Mono', monospace;
  font-size: .86rem; font-weight: 500;
  padding: .2rem .52rem; border-radius: 5px; display: inline-block;
}
.yield-hi  { color: var(--teal); background: var(--teal-pale); border: 1px solid var(--teal-border); }
.yield-mid { color: var(--sage); background: var(--surface2); border: 1px solid var(--border); }
.yield-lo  { color: var(--text-2); background: var(--surface3); border: 1px solid var(--border); }
[data-theme="dark"] .yield-mid { color: #8fdb8a; background: rgba(143,219,138,.07); border-color: rgba(143,219,138,.12); }

.min-val       { font-family: 'DM Mono', monospace; font-size: .75rem; color: var(--text-2); }
.maturity-main { color: var(--text); font-weight: 600; font-size: .82rem; }
.maturity-sub  { color: var(--text-3); font-size: .68rem; margin-left: .2rem; }

.empty-state { text-align: center; padding: 5rem 2rem; color: var(--text-2); }
.empty-icon  { font-size: 2rem; margin-bottom: .65rem; }
.empty-state h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.empty-state p  { font-size: .82rem; color: var(--text-3); }

.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem;
  background: var(--surface); border-top: 1px solid var(--border); flex-shrink: 0;
}
.page-info { font-family: 'DM Mono', monospace; font-size: .7rem; color: var(--text-3); }
.page-btns { display: flex; gap: .3rem; align-items: center; }
.page-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .76rem; font-weight: 600;
  padding: .26rem .58rem; border-radius: 5px; cursor: pointer;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--teal-border); color: var(--teal); background: var(--teal-pale);
}
.page-btn.active {
  background: var(--teal); color: white;
  border-color: var(--teal); font-weight: 700;
}
[data-theme="dark"] .page-btn.active { color: #0d1117; }
.page-btn:disabled { opacity: .25; cursor: not-allowed; }

@media (max-width: 880px) { .sidebar { display: none; } }

/* ── Risk & Period badges ─────────────────────────────────── */
.risk-badge {
  font-size:   .72rem;
  white-space: nowrap;
}
.period-badge {
  display:        inline-block;
  font-size:      .62rem;
  font-weight:    700;
  padding:        .14rem .44rem;
  border-radius:  100px;
  letter-spacing: .03em;
  white-space:    nowrap;
}
.period-short  { background: rgba(61,214,140,.12);  color: var(--teal);  border: 1px solid var(--teal-border); }
.period-medium { background: rgba(240,160,75,.12);  color: var(--amber); border: 1px solid rgba(240,160,75,.25); }
.period-long   { background: rgba(88,166,255,.12);  color: #58a6ff;      border: 1px solid rgba(88,166,255,.2); }

[data-theme="light"] .period-short  { background: #e8f4f0; color: #1a6b5a; border-color: #b8ddd5; }
[data-theme="light"] .period-medium { background: #fef3e8; color: #e8832a; border-color: rgba(232,131,42,.3); }
[data-theme="light"] .period-long   { background: #e8f0fe; color: #1a56b0; border-color: rgba(26,86,176,.25); }

/* ── Filter dropdown ─────────────────────────────────────── */
.filter-select {
  width:          100%;
  background:     var(--surface3);
  border:         1px solid var(--border);
  color:          var(--text);
  font-family:    'Cabinet Grotesk', sans-serif;
  font-size:      .78rem;
  padding:        .38rem .65rem;
  border-radius:  7px;
  outline:        none;
  cursor:         pointer;
  appearance:     none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239eb3ad' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:   no-repeat;
  background-position: right .6rem center;
  padding-right:  1.75rem;
}
.filter-select:focus {
  border-color: var(--teal);
  box-shadow:   0 0 0 3px var(--teal-glow);
}
[data-theme="dark"] .filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23484f58' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── Bond detail drawer ───────────────────────────────────── */
.bond-row { cursor: pointer; }
.bond-row:hover .issuer-name { color: var(--text-2); }

/* ── Detail drawer v2 ────────────────────────────────────────── */
.detail-overlay {
  position:        fixed;
  inset:           0;
  background:      rgba(14,26,22,.32);
  backdrop-filter: blur(4px);
  z-index:         400;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity .28s ease;
}
.detail-overlay.open { opacity: 1; pointer-events: auto; }

.detail-drawer {
  position:       fixed;
  right:          0;
  top:            0;
  bottom:         0;
  width:          min(520px, 95vw);
  background:     var(--surface);
  border-left:    1px solid var(--border);
  box-shadow:     -8px 0 40px rgba(0,0,0,.18);
  z-index:        401;
  display:        flex;
  flex-direction: column;
  transform:      translateX(100%);
  transition:     transform .3s cubic-bezier(.4,0,.2,1);
  overflow:       hidden;
}
.detail-drawer.open { transform: translateX(0); }

/* sticky header */
.drawer-head {
  position:      sticky;
  top:           0;
  background:    var(--surface);
  border-bottom: 1px solid var(--border);
  padding:       1.25rem 1.5rem 1.1rem;
  z-index:       1;
  flex-shrink:   0;
}
.drawer-close {
  position:      absolute;
  top:           1rem;
  right:         1rem;
  background:    var(--surface2);
  border:        1px solid var(--border);
  color:         var(--text-2);
  width:         32px;
  height:        32px;
  border-radius: 50%;
  cursor:        pointer;
  font-size:     .8rem;
  display:       flex;
  align-items:   center;
  justify-content: center;
  transition:    all .15s;
}
.drawer-close:hover { background: var(--teal-pale); color: var(--teal); border-color: var(--teal-border); }
.d-kicker {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .65rem;
  font-weight:    500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--text-3);
  margin-bottom:  .5rem;
  display:        flex;
  align-items:    center;
  gap:            .45rem;
}
.d-kicker::before {
  content:       '';
  display:       inline-block;
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    var(--teal);
  flex-shrink:   0;
}
.d-title {
  font-family:    'Fraunces', 'Instrument Serif', serif;
  font-size:      1.45rem;
  font-weight:    700;
  line-height:    1.2;
  color:          var(--text);
  margin:         0 2.5rem .75rem 0;
}
.d-title-tier {
  font-style:  italic;
  color:       var(--teal);
  font-weight: 400;
}
.d-meta-pills {
  display:   flex;
  flex-wrap: wrap;
  gap:       .4rem;
}
.d-pill {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .65rem;
  font-weight:    500;
  color:          var(--text-2);
  background:     var(--surface2);
  border:         1px solid var(--border);
  border-radius:  999px;
  padding:        .2rem .65rem;
  letter-spacing: .04em;
}

/* scrollable body */
.drawer-body { flex: 1; overflow-y: auto; }

/* sections */
.d-sec {
  padding:       1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.d-sec:last-child { border-bottom: none; }
.d-sec-label {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .6rem;
  font-weight:    600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--text-3);
  margin-bottom:  .7rem;
}
.d-sec-text {
  font-size:   .82rem;
  color:       var(--text-2);
  line-height: 1.7;
}
.d-sec-text p { margin: 0; }
.d-sec-text p + p { margin-top: .6rem; }
.d-sec-note {
  font-size:   .78rem;
  color:       var(--text-3);
  line-height: 1.65;
}
.d-sec-note strong { color: var(--teal); font-family: 'JetBrains Mono','DM Mono',monospace; font-weight: 600; }

/* score card */
.d-score-top {
  display:       flex;
  align-items:   baseline;
  gap:           .65rem;
  margin-bottom: 1.1rem;
}
.d-score-big {
  font-family:    'Fraunces', 'Instrument Serif', serif;
  font-size:      2.8rem;
  font-weight:    700;
  line-height:    1;
  color:          var(--teal);
  letter-spacing: -.04em;
}
.d-score-sublabel {
  font-size:   .78rem;
  color:       var(--text-3);
  line-height: 1.4;
}
.d-score-rows { display: flex; flex-direction: column; }
.d-score-row {
  display:               grid;
  grid-template-columns: 1fr 90px 44px;
  align-items:           center;
  gap:                   .75rem;
  padding:               .45rem 0;
  border-top:            1px solid var(--border-2);
}
.d-score-row:first-child { border-top: none; }
.d-score-row-label { font-size: .78rem; color: var(--text-2); min-width: 0; }
.d-score-bar-wrap {
  height:        5px;
  background:    rgba(26,107,90,.12);
  border-radius: 3px;
  overflow:      hidden;
}
[data-theme="dark"] .d-score-bar-wrap { background: rgba(61,214,140,.15); }
.d-score-bar-fill {
  height:        100%;
  background:    var(--teal);
  border-radius: 3px;
  transition:    width .4s cubic-bezier(.4,0,.2,1);
}
.d-score-pct {
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size:   .72rem;
  color:       var(--text-2);
  text-align:  right;
}

/* analyst card */
.d-analyst {
  background:    var(--teal-pale, rgba(0,200,170,.06));
  border:        1px solid var(--teal-border, rgba(0,200,170,.2));
  border-radius: 10px;
  padding:       1rem 1.1rem;
}
.d-analyst-head {
  font-size:      .6rem;
  font-weight:    700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--teal);
  margin-bottom:  .65rem;
  display:        flex;
  align-items:    center;
  gap:            .4rem;
}
.d-verdict-list { margin: 0; padding: 0; list-style: none; }
.d-verdict-list li {
  position:     relative;
  font-size:    .8rem;
  line-height:  1.6;
  color:        var(--text-2);
  padding-left: 1rem;
}
.d-verdict-list li::before {
  content:     '·';
  position:    absolute;
  left:        0;
  color:       var(--teal);
  font-weight: 700;
}
.d-verdict-list li + li { margin-top: .3rem; }

/* coupon num highlight */
.coupon-num {
  color:       var(--teal);
  font-weight: 700;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size:   .9em;
}



/* ── Score mini bar (table cell) ─────────────────────────── */
.score-td { white-space: nowrap; }
.score-bar-mini-wrap {
  display:     inline-flex;
  align-items: center;
  gap:         8px;
}
.score-bar-mini {
  width:         52px;
  height:        4px;
  border-radius: 2px;
  background:    rgba(26,107,90,.14);
  overflow:      hidden;
  flex-shrink:   0;
}
[data-theme="dark"] .score-bar-mini { background: rgba(61,214,140,.18); }
.score-bar-mini-fill {
  height:        100%;
  background:    var(--teal);
  border-radius: 2px;
  transition:    width .4s cubic-bezier(.4,0,.2,1);
}
.score-pct-num {
  font-family:  'DM Mono', 'JetBrains Mono', monospace;
  font-size:    .82rem;
  font-weight:  600;
  color:        var(--teal);
  min-width:    2.5ch;
}
.th-score { white-space: nowrap; }

/* ── Column header tooltips ──────────────────────────────── */
.th-with-tip {
  position: relative;
}
.th-with-tip .th-label {
  display:     flex;
  align-items: center;
  gap:         .2rem;
  cursor:      pointer;
}
.th-with-tip .th-label::after {
  content:        '?';
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  width:          13px;
  height:         13px;
  border-radius:  50%;
  background:     var(--surface3);
  border:         1px solid var(--border);
  color:          var(--text-3);
  font-size:      .58rem;
  font-weight:    700;
  font-style:     normal;
  flex-shrink:    0;
  transition:     background .15s, color .15s;
}
.th-with-tip:hover .th-label::after {
  background: var(--teal-pale);
  color:      var(--teal);
  border-color: var(--teal-border);
}
.th-tip {
  display:       none;
  position:      absolute;
  top:           calc(100% + 6px);
  left:          50%;
  transform:     translateX(-50%);
  width:         220px;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 8px;
  padding:       .65rem .8rem;
  font-size:     .72rem;
  font-weight:   400;
  color:         var(--text-2);
  line-height:   1.5;
  text-transform: none;
  letter-spacing: 0;
  box-shadow:    0 4px 16px rgba(0,0,0,.15);
  z-index:       200;
  pointer-events: none;
  white-space:   normal;
}
/* Arrow */
.th-tip::before {
  content:      '';
  position:     absolute;
  top:          -5px;
  left:         50%;
  transform:    translateX(-50%);
  width:        8px;
  height:       8px;
  background:   var(--surface);
  border-left:  1px solid var(--border);
  border-top:   1px solid var(--border);
  rotate:       45deg;
}
.th-with-tip:hover .th-tip { display: block; }

/* Keep tooltip inside viewport for first/last columns */
th:first-child .th-tip  { left: 0; transform: none; }
th:first-child .th-tip::before { left: 1rem; }
th:last-child  .th-tip  { left: auto; right: 0; transform: none; }
th:last-child  .th-tip::before { left: auto; right: 1rem; }


/* ============================================================
   MOBILE FILTERS — bottom sheet drawer
   ============================================================ */

/* Filter button — shown only on mobile */
.mobile-filter-btn {
  display:        none;
  position:       fixed;
  bottom:         1.25rem;
  left:           50%;
  transform:      translateX(-50%);
  z-index:        350;
  background:     var(--teal);
  color:          white;
  border:         none;
  border-radius:  100px;
  padding:        .7rem 1.4rem;
  font-family:    'Cabinet Grotesk', sans-serif;
  font-size:      .85rem;
  font-weight:    700;
  cursor:         pointer;
  box-shadow:     0 4px 20px rgba(0,0,0,.25);
  display:        none;
  align-items:    center;
  gap:            .45rem;
  white-space:    nowrap;
  transition:     transform .15s, box-shadow .15s;
}
.mobile-filter-btn:active { transform: translateX(-50%) scale(.96); }
.mobile-filter-btn .filter-count {
  background:     rgba(255,255,255,.25);
  border-radius:  100px;
  padding:        .1rem .45rem;
  font-size:      .75rem;
  min-width:      1.2rem;
  text-align:     center;
}

/* Bottom sheet overlay */
.mobile-filter-overlay {
  display:          none;
  position:         fixed;
  inset:            0;
  background:       rgba(0,0,0,.5);
  z-index:          500;
  backdrop-filter:  blur(2px);
  opacity:          0;
  transition:       opacity .25s;
}
.mobile-filter-overlay.open {
  opacity: 1;
}

/* Bottom sheet */
.mobile-filter-sheet {
  position:         fixed;
  bottom:           0;
  left:             0;
  right:            0;
  z-index:          501;
  background:       var(--surface);
  border-radius:    20px 20px 0 0;
  border-top:       1px solid var(--border);
  max-height:       88vh;
  overflow-y:       auto;
  transform:        translateY(100%);
  transition:       transform .3s cubic-bezier(.4,0,.2,1);
  padding-bottom:   env(safe-area-inset-bottom, 1rem);
}
.mobile-filter-sheet.open {
  transform: translateY(0);
}

/* Drag handle */
.sheet-handle {
  width:         40px;
  height:        4px;
  background:    var(--border);
  border-radius: 100px;
  margin:        .75rem auto .5rem;
}

/* Sheet header */
.sheet-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         .5rem 1.25rem 1rem;
  border-bottom:   1px solid var(--border);
}
.sheet-title {
  font-size:      .9rem;
  font-weight:    800;
  color:          var(--text);
  letter-spacing: -.02em;
}
.sheet-close {
  background:    var(--surface2);
  border:        1px solid var(--border);
  color:         var(--text-2);
  width:         30px;
  height:        30px;
  border-radius: 50%;
  cursor:        pointer;
  font-size:     .8rem;
  display:       flex;
  align-items:   center;
  justify-content: center;
}
.sheet-close:hover { color: var(--teal); border-color: var(--teal-border); }

/* Sheet body — reuses sidebar styles */
.sheet-body {
  padding: .75rem 1.25rem 1.5rem;
}
.sheet-body .filter-block {
  padding: .85rem 0;
}

/* Apply button at bottom */
.sheet-apply {
  display:        block;
  width:          calc(100% - 2.5rem);
  margin:         0 1.25rem 1rem;
  background:     var(--teal);
  color:          white;
  border:         none;
  border-radius:  10px;
  padding:        .85rem;
  font-family:    'Cabinet Grotesk', sans-serif;
  font-size:      .9rem;
  font-weight:    700;
  cursor:         pointer;
  text-align:     center;
  transition:     background .15s;
  position:       sticky;
  bottom:         0;
}
.sheet-apply:active { background: var(--teal-light); }

@media (max-width: 880px) {
  .mobile-filter-btn { display: flex; }
  .mobile-filter-overlay { display: block; }
}

/* ── Radio group filter ───────────────────────────────────── */
.radio-group {
  display:        flex;
  flex-direction: column;
  gap:            .3rem;
}
.radio-opt {
  display:     flex;
  align-items: center;
  gap:         .55rem;
  cursor:      pointer;
  padding:     .3rem .4rem;
  border-radius: 6px;
  transition:  background .12s;
  font-size:   .8rem;
  font-weight: 500;
  color:       var(--text-2);
}
.radio-opt:hover { background: var(--surface3); color: var(--text); }
.radio-opt input[type=radio] {
  appearance:   none;
  -webkit-appearance: none;
  width:        15px;
  height:       15px;
  border:       2px solid var(--border);
  border-radius: 50%;
  flex-shrink:  0;
  cursor:       pointer;
  transition:   border-color .15s;
  position:     relative;
}
.radio-opt input[type=radio]:checked {
  border-color: var(--teal);
  border-width: 4.5px;
}
.radio-opt input[type=radio]:checked + span { color: var(--teal); font-weight: 700; }

/* ── Sticky first column ─────────────────────────────────── */

/* First column header */
.bond-table thead th:first-child {
  position: sticky;
  left:      0;
  z-index:   20; /* above other sticky headers */
  background: var(--surface2);
}

/* First column data cells */
.bond-table tbody td:first-child {
  position:   sticky;
  left:       0;
  z-index:    5;
  background: var(--surface);
}

/* Keep hover background on sticky first cell */
.bond-table tbody tr:hover td:first-child {
  background: var(--surface2);
}

/* Shadow on right edge of sticky column to show it's fixed */
.bond-table thead th:first-child,
.bond-table tbody td:first-child {
  box-shadow: 2px 0 6px -2px rgba(0,0,0,.12);
}

[data-theme="dark"] .bond-table thead th:first-child,
[data-theme="dark"] .bond-table tbody td:first-child {
  box-shadow: 2px 0 8px -2px rgba(0,0,0,.4);
}

/* ── Credit risk cell ────────────────────────────────────── */
.risk-cell {
  display:     flex;
  align-items: center;
  gap:         .35rem;
  white-space: nowrap;
}
.risk-icon { font-size: .85rem; flex-shrink: 0; }
.risk-text {
  font-size:   .72rem;
  font-weight: 600;
  color:       var(--text-2);
}

/* ── Home bond tables ───────────────────────────────────── */
.home-tables-section {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.home-inner {
  max-width: 1340px;
  margin:    0 auto;
  padding:   3rem 2.5rem;
}

.home-tables {
  max-width: 1340px;
  margin:    0 auto;
  padding:   4rem 2.5rem;
}

/* Section header — serif h2 + link, with border-bottom */
.home-section-head {
  display:         grid;
  grid-template-columns: 1fr auto;
  align-items:     end;
  gap:             1.5rem;
  margin-bottom:   2rem;
  padding-bottom:  1.5rem;
  border-bottom:   1px solid var(--border);
}
.home-section-title {
  font-family:    'Fraunces', 'Instrument Serif', Georgia, serif;
  font-size:      clamp(1.6rem, 3vw, 2.4rem);
  font-weight:    400;
  letter-spacing: -.02em;
  line-height:    1;
  color:          var(--text);
  margin:         .5rem 0 .5rem;
}
.home-section-title em {
  font-style:  italic;
  font-weight: 500;
}
.home-section-sub {
  font-size:  .88rem;
  color:      var(--text-2);
  max-width:  480px;
  line-height: 1.55;
  margin-top: .25rem;
}

.home-tables-link {
  font-size:       .82rem;
  font-weight:     600;
  color:           var(--text);
  text-decoration: none;
  border-bottom:   1px solid var(--text);
  padding-bottom:  2px;
  white-space:     nowrap;
  align-self:      end;
  margin-bottom:   .25rem;
}
.home-tables-link:hover { color: var(--teal); border-color: var(--teal); }

.home-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .home-tables-grid { grid-template-columns: 1fr; }
}

.home-bond-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 20px;
  overflow:      hidden;
}

.home-bond-card-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         18px 22px;
  border-bottom:   1px solid var(--border-2);
  gap:             12px;
}

.home-bond-card-title {
  font-family:    'Fraunces', 'Instrument Serif', Georgia, serif;
  font-size:      1rem;
  font-weight:    500;
  letter-spacing: -.01em;
  color:          var(--text);
}

.home-bond-badge {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .62rem;
  font-weight:    600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding:        4px 10px;
  border-radius:  999px;
  white-space:    nowrap;
  flex-shrink:    0;
}

.badge-ig {
  background: var(--teal-pale);
  color:      var(--teal);
  border:     1px solid var(--teal-border);
}
[data-theme="dark"] .badge-ig {
  background: rgba(61,214,140,.12);
  color:      #3dd68c;
  border-color: rgba(61,214,140,.2);
}

.badge-hy {
  background: var(--terra-pale);
  color:      var(--terra);
  border:     1px solid rgba(200,83,46,.25);
}
[data-theme="dark"] .badge-hy {
  background: rgba(200,83,46,.15);
  border-color: rgba(200,83,46,.25);
}

.badge-sov {
  background: rgba(99,120,200,.1);
  color:      #4a5fd4;
  border:     1px solid rgba(99,120,200,.22);
}
[data-theme="dark"] .badge-sov {
  background: rgba(99,120,200,.15);
  color:      #8898f0;
  border-color: rgba(99,120,200,.25);
}

.home-bond-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       .82rem;
}

.home-bond-table thead th {
  padding:        12px 20px;
  text-align:     left;
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .6rem;
  font-weight:    500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--text-3);
  background:     var(--surface2);
  border-bottom:  1px solid var(--border-2);
  white-space:    nowrap;
}
.hbt-th-yield { text-align: right; }
.hbt-th-score { text-align: right; }

.home-bond-table tbody tr {
  border-bottom: 1px solid var(--border-2);
  transition:    background .12s;
  cursor:        pointer;
}
.home-bond-table tbody tr:last-child { border-bottom: none; }
.home-bond-table tbody tr:hover      { background: var(--surface2); }

.home-bond-table tbody td {
  padding:        14px 20px;
  vertical-align: middle;
}

.hbt-issuer {
  font-weight:   600;
  color:         var(--text);
  max-width:     180px;
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
}

.hbt-risk {
  display:    flex;
  align-items: center;
  gap:        6px;
  color:      var(--text-2);
  white-space: nowrap;
}

.hbt-dot {
  width:         8px;
  height:        8px;
  border-radius: 2px;
  flex-shrink:   0;
}

.hbt-mat {
  font-family:        'JetBrains Mono', 'DM Mono', monospace;
  font-size:          .75rem;
  color:              var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space:        nowrap;
}

.hbt-yield {
  text-align:  right;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-weight: 600;
  font-size:   .9rem;
  font-variant-numeric: tabular-nums;
}

.hbt-score {
  text-align:  right;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-weight: 700;
  font-size:   .9rem;
  font-variant-numeric: tabular-nums;
}

.home-table-loading {
  text-align: center;
  color:      var(--text-3);
  padding:    2rem !important;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size:  .78rem;
}

/* ── Section tag (eyebrow label) ───────────────────────── */
.section-tag {
  display:        inline-block;
  font-size:      .7rem;
  font-weight:    700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color:          var(--teal);
  margin-bottom:  .4rem;
}

/* ── Home academy section ────────────────────────────────── */
.home-academy-section {
  background:    var(--bg);
  border-bottom: 1px solid var(--border);
}
.home-academy-header {
  display:         grid;
  grid-template-columns: 1fr auto;
  align-items:     end;
  gap:             1.5rem;
  margin-bottom:   2rem;
  padding-bottom:  1.5rem;
  border-bottom:   1px solid var(--border);
}
.home-academy-left { flex: 1; min-width: 0; }
.home-academy-title {
  font-family:    'Fraunces', 'Instrument Serif', Georgia, serif;
  font-size:      clamp(1.6rem, 3vw, 2.4rem);
  font-weight:    400;
  letter-spacing: -.02em;
  line-height:    1;
  color:          var(--text);
  margin:         .5rem 0 .6rem;
}
.home-academy-title em {
  font-style:  italic;
  font-weight: 500;
}
.home-academy-sub {
  font-size:  .9rem;
  color:      var(--text-2);
  max-width:  480px;
  line-height: 1.6;
}

.home-article-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   1.25rem;
}
.home-article-card {
  background:      var(--surface);
  border:          1px solid var(--border);
  border-radius:   18px;
  padding:         0 0 1.5rem;
  cursor:          pointer;
  transition:      transform .3s, box-shadow .3s;
  display:         flex;
  flex-direction:  column;
  min-height:      300px;
  position:        relative;
  overflow:        hidden;
  text-decoration: none;
  color:           inherit;
}
.home-article-card:hover {
  transform:  translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(14,26,22,.18);
}
/* gradient illustration band */
.home-article-illo {
  height:        140px;
  margin-bottom: 1.25rem;
  flex-shrink:   0;
  display:       grid;
  place-items:   center;
}
.home-article-card--1 .home-article-illo { background: linear-gradient(180deg, var(--teal-pale) 0%, transparent 100%); }
.home-article-card--2 .home-article-illo { background: linear-gradient(180deg, var(--terra-pale) 0%, transparent 100%); }
.home-article-card--3 .home-article-illo { background: linear-gradient(180deg, var(--amber-pale) 0%, transparent 100%); }
.home-article-num {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .68rem;
  font-weight:    500;
  color:          var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding:        0 1.5rem;
  margin-bottom:  .6rem;
}
.home-article-text {
  font-family:    'Fraunces', 'Instrument Serif', Georgia, serif;
  font-size:      1.15rem;
  font-weight:    500;
  line-height:    1.2;
  letter-spacing: -.01em;
  color:          var(--text);
  flex:           1;
  padding:        0 1.5rem;
}
.home-article-desc {
  font-size:   .85rem;
  color:       var(--text-2);
  line-height: 1.55;
  padding:     .5rem 1.5rem 0;
  flex:        1;
}
.home-article-footer {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         1rem 1.5rem 0;
  margin-top:      auto;
  border-top:      1px solid var(--border-2);
}
.home-article-meta {
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size:   .7rem;
  color:       var(--text-3);
}
.home-article-arrow-circle {
  width:           32px;
  height:          32px;
  border-radius:   50%;
  border:          1px solid var(--border);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       .9rem;
  color:           var(--text-3);
  transition:      all .2s;
}
.home-article-card:hover .home-article-arrow-circle {
  background:   var(--text);
  color:        var(--bg);
  border-color: var(--text);
}

/* ── Home region tabs ───────────────────────────────────── */
.home-region-tabs {
  display:       flex;
  gap:           4px;
  background:    var(--surface2);
  border-radius: 999px;
  padding:       4px;
  margin-bottom: 1.5rem;
  width:         fit-content;
  flex-wrap:     wrap;
}
.home-region-tab {
  padding:        7px 16px;
  border-radius:  999px;
  font-size:      .8rem;
  font-weight:    500;
  cursor:         pointer;
  border:         none;
  background:     transparent;
  color:          var(--text-2);
  font-family:    'Cabinet Grotesk', sans-serif;
  transition:     all .15s;
}
.home-region-tab.active {
  background: var(--surface);
  color:      var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.home-region-tab:hover:not(.active) { color: var(--text); }

@media (max-width: 768px) {
  .home-article-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .home-inner  { padding: 2rem 1.25rem; }
  .home-tables { padding: 2rem 1.25rem; }

  /* Header: stack title + link vertically */
  .home-tables-header {
    flex-direction: column;
    align-items:    flex-start;
    gap:            .4rem;
  }

  /* Region tabs: horizontal scroll instead of wrapping */
  .home-region-tabs {
    width:    100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .home-region-tabs::-webkit-scrollbar { display: none; }
  .home-region-tab { white-space: nowrap; flex-shrink: 0; }

  /* Tables: hide less critical columns (Risk, Min) */
  .home-bond-table th:nth-child(2),
  .home-bond-table th:nth-child(3),
  .hbt-risk,
  .hbt-min { display: none; }

  /* Tighten cell padding */
  .home-bond-table thead th,
  .home-bond-table tbody td { padding: .5rem .75rem; }

  /* Issuer column: allow more room */
  .hbt-issuer { max-width: 130px; }

  /* Card header: stack title + badge on small screens */
  .home-bond-card-header {
    flex-direction: column;
    align-items:    flex-start;
    gap:            .5rem;
    padding:        .75rem .85rem;
  }

  /* Tabs scroll-fade: show right edge gradient to hint at more tabs */
  .home-region-tabs {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
            mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
}

/* ── Hero logo block (replaces hero-card) ───────────────── */
.hero-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-logo-mark {
  width: 96px;
  height: 96px;
  background: var(--teal);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(30,110,90,.25);
}

.hero-logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.03em;
}

/* ── Newsletter section ─────────────────────────────────── */
.newsletter-section {
  background: var(--bg);
  padding:    3rem;
}
.newsletter-card {
  background:    #0E1A16;
  color:         #F6F3EC;
  border-radius: 24px;
  padding:       64px;
  display:       grid;
  grid-template-columns: 1.2fr 1fr;
  gap:           56px;
  align-items:   center;
  position:      relative;
  overflow:      hidden;
  max-width:     1280px;
  margin:        0 auto;
}
.newsletter-card::before {
  content:       '';
  position:      absolute;
  right:         -80px;
  top:           -80px;
  width:         380px;
  height:        380px;
  border-radius: 50%;
  background:    radial-gradient(circle, rgba(200,83,46,.22), transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .newsletter-card {
  background: #0a1510;
}
.newsletter-card-left {
  position: relative;
  z-index:  1;
}
.newsletter-eyebrow {
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .68rem;
  font-weight:    600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color:          rgba(246,243,236,.5);
  margin-bottom:  16px;
  display:        block;
}
.newsletter-headline {
  font-family:    'Fraunces', 'Instrument Serif', Georgia, serif;
  font-size:      clamp(1.8rem, 3.2vw, 3rem);
  font-weight:    400;
  line-height:    1.05;
  letter-spacing: -.025em;
  color:          #F6F3EC;
  margin:         0 0 18px;
}
.newsletter-headline em {
  font-style: italic;
  color:      var(--terra);
}
.newsletter-sub {
  font-size:  .95rem;
  line-height: 1.6;
  color:      rgba(246,243,236,.65);
  max-width:  400px;
}
.newsletter-form-panel {
  background:    rgba(246,243,236,.07);
  border:        1px solid rgba(246,243,236,.12);
  border-radius: 16px;
  padding:       28px;
  position:      relative;
  z-index:       1;
}
.newsletter-form-label {
  display:        block;
  font-family:    'JetBrains Mono', 'DM Mono', monospace;
  font-size:      .65rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color:          rgba(246,243,236,.55);
  margin-bottom:  10px;
}
.newsletter-input {
  display:     block;
  width:       100%;
  background:  transparent;
  border:      0;
  border-bottom: 1px solid rgba(246,243,236,.2);
  color:       #F6F3EC;
  font-family: inherit;
  font-size:   1rem;
  padding:     10px 0 14px;
  margin-bottom: 20px;
  outline:     none;
  transition:  border-color .15s;
}
.newsletter-input::placeholder { color: rgba(246,243,236,.35); }
.newsletter-input:focus        { border-color: var(--terra); }
.newsletter-check {
  display:     flex;
  gap:         7px;
  align-items: center;
  font-size:   .78rem;
  color:       rgba(246,243,236,.5);
  margin-bottom: 18px;
}
.newsletter-btn {
  width:         100%;
  padding:       14px;
  border-radius: 10px;
  border:        none;
  background:    #F6F3EC;
  color:         #0E1A16;
  font-family:   inherit;
  font-size:     .9rem;
  font-weight:   700;
  cursor:        pointer;
  transition:    opacity .15s, transform .1s;
}
.newsletter-btn:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.newsletter-btn:disabled             { opacity: .5; cursor: not-allowed; }

.newsletter-msg {
  font-size: .85rem;
  min-height: 1.2rem;
  position:  relative;
  z-index:   1;
  padding:   0 0 0 64px;
  margin-top: -24px;
}
.nl-success { color: #86efac; }
.nl-error   { color: #fca5a5; }

@media (max-width: 768px) {
  .newsletter-section { padding: 1.5rem; }
  .newsletter-card {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    gap: 32px;
  }
  .newsletter-msg { padding: 0; margin-top: 8px; }
}

/* ── Hero wide (single column) ──────────────────────────── */
.hero--wide {
  grid-template-columns: 1fr;
  max-width: none;
  margin: 0;
  gap: 0;
  padding: 5rem 4rem 6rem;
}

.hero--wide .hero-headline { max-width: 600px; font-size: clamp(1.8rem, 2.8vw, 2.6rem); }
.hero--wide .hero-sub      { max-width: 480px; }

@media (max-width: 768px) {
  .hero--wide { padding: 3rem 1.5rem 2.5rem; }
}

/* ── Mobile bottom navigation bar ───────────────────────────
   Visible only on small screens (≤768px).
   Adds padding to body so content isn't hidden behind it.
   ─────────────────────────────────────────────────────────── */
.mob-nav {
  display:         none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Pill-nav floats — no extra body padding needed */
  body { padding-bottom: 0; }

  /* Filter button merged into pill-nav on screener — hide standalone */
  body.page-screener .mobile-filter-btn { display: none !important; }

  /* Slim site-nav on screener */
  body.page-screener .site-nav { height: 48px; }

  /* Compact topbar */
  .table-topbar { padding: .4rem 1rem; }

  /* ── Floating pill-bar nav ─────────────────────────────── */
  .mob-nav {
    display:          flex;
    position:         fixed;
    bottom:           12px;
    left:             50%;
    transform:        translateX(-50%);
    z-index:          400;
    background:       var(--nav-bg);
    border:           1px solid var(--border);
    border-radius:    100px;
    backdrop-filter:  blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding:          0 .5rem;
    box-shadow:       0 4px 20px rgba(0,0,0,.12);
    gap:              0;
    width:            auto;
  }

  .mob-nav-item {
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         .6rem .9rem;
    color:           var(--text-3);
    text-decoration: none;
    transition:      color .15s;
  }
  .mob-nav-item.active,
  .mob-nav-item:hover { color: var(--teal); }

  .mob-nav-icon {
    width:  22px;
    height: 22px;
    flex-shrink: 0;
  }
  .mob-nav-icon svg {
    width:  100%;
    height: 100%;
    display: block;
  }

  /* Labels hidden in pill-bar (kept in DOM for a11y) */
  .mob-nav-label { display: none; }

  /* Filter button inside pill-nav */
  .mob-nav-filter {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
  }
  .mob-nav-filter .filter-count {
    position:   absolute;
    top:        .3rem;
    right:      .4rem;
    background: var(--teal);
    color:      white;
    border-radius: 100px;
    font-size:  .55rem;
    font-weight: 700;
    min-width:  .95rem;
    height:     .95rem;
    display:    flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* Divider before filter button */
  .mob-nav-filter::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--border);
  }

  /* Hide tooltip icons on touch */
  .th-with-tip .th-label::after { display: none; }
}
