/* Screener page - extends style.css */

.filter-summary{ display:flex; flex-wrap:wrap; gap:8px; }
.fs-item{
  display:inline-flex; align-items:baseline; gap:6px; white-space:nowrap;
  background: var(--white); border:1px solid var(--line); border-radius:999px;
  padding:7px 13px;
}
.fs-lbl{ font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: var(--ink-soft); }
.fs-val{ font-family:'Instrument Sans', sans-serif; font-size:13.5px; font-weight:600; color: var(--indigo-dark); }
@media (max-width: 640px){
  .fs-item{ padding:6px 11px; }
  .fs-lbl{ font-size:11px; }
  .fs-val{ font-size:12.5px; }
}

.screener-meta-row{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.screener-meta-row .screener-meta{ margin-bottom:0; }
.screener-meta-row .pill-btn{ white-space:nowrap; }
.screener-meta{
  font-size:14px; color: var(--ink-soft); margin-bottom:20px; padding:12px 16px;
  background: var(--indigo-soft); border-radius: var(--radius-sm); display:inline-block;
}

/* Mobile-only stacked-card view for Qualifiers and Passes Everything - the
   only two sections on this page still using a dense multi-column table.
   Every other list here (Insider Buys, Dividends, Margin of Safety, etc.)
   already shows Ticker + Company + one headline number on mobile, so this
   reuses those same .floor-id/.floor-pct primitives instead of forcing a
   13-column table through a sideways scroll a visitor has to discover.
   Desktop keeps the full sortable table; only the mobile-breakpoint display
   swap below decides which one actually renders. */
.ql-card-list{ display:none; }
@media (max-width: 720px){
  #screener .table-scroll, #passes-everything .table-scroll{ display:none; }
  .ql-card-list{ display:block; }
}
.ql-row{
  display:grid; grid-template-columns: auto 1fr auto; align-items:center; gap:12px;
  padding:14px 0; border-bottom:1px solid rgba(255,255,255,0.08); cursor:pointer;
}
.ql-row:first-child{ padding-top:0; }
.ql-row:last-child{ border-bottom:none; }
.ql-row:hover, .ql-row:focus-visible{ background: rgba(255,255,255,0.025); outline:none; }
/* .floor-id/.floor-pct pick up grid-area:id/pct from .floor-row's own
   720px breakpoint rule below (plain class selectors, not scoped to
   .floor-row) - neutralize that here so they fall back to plain grid
   auto-placement inside .ql-row's own 3-column template instead of
   colliding on named areas .ql-row never defines. */
.ql-row .floor-id{ grid-area:auto; }
.ql-row .floor-pct{ grid-area:auto; min-width:auto; text-align:right; }
.ql-row .floor-pct-val{ font-size:17px; }
.ql-checkbox-wrap{ display:flex; align-items:center; }

.screener-table{ width:100%; border-collapse:collapse; min-width:920px; }
.screener-table thead th{
  text-align:left; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color: var(--ink-soft); padding:14px 16px; border-bottom:1px solid var(--line); white-space:nowrap;
}
.screener-table tbody td{
  padding:14px 16px; border-bottom:1px solid var(--line); font-size:14px; white-space:nowrap;
}
.screener-table tbody tr:last-child td{ border-bottom:none; }
.screener-table tbody tr:hover{ background: var(--cream); }
.screener-table tbody tr[data-ticker]{ cursor:pointer; }
.screener-table tbody tr[data-ticker]:focus-visible{ outline:2px solid var(--indigo); outline-offset:-2px; }
.screener-table .cell-ticker{ font-weight:800; }

/* Watchlist star toggle - reused inline across every ticker-row renderer
   on this page (light-themed tables and dark-glass tool bands alike), so
   it relies on currentColor/opacity rather than a fixed color to read
   correctly in both contexts. */
/* padding+matching negative margin grows the real tap target to the
   24x24px WCAG minimum (real touch-target audit finding - was 13.3x16px)
   without shifting where the star glyph visually sits or affecting the
   many surrounding row/card layouts that use this class. */
.watch-star{
  background:none; border:none; padding:6px; margin:-6px -6px -6px 2px; font-size:16px; line-height:1;
  cursor:pointer; color:inherit; opacity:0.45; vertical-align:middle;
  transition: opacity .15s ease, transform .15s ease;
}
.watch-star:hover{ opacity:0.85; transform:scale(1.15); }
.watch-star.active{ opacity:1; color:#FFB238; }
.screener-table .cell-company{ color: var(--ink-soft); font-size:12.5px; cursor:help; }
.screener-table .cell-name{ display:block; font-size:11.5px; font-weight:500; color: var(--ink-soft); }
.screener-table .pos{ color:var(--pos-text); font-weight:700; }
.screener-table .neg{ color:var(--neg-text); font-weight:700; }
.empty-row{ text-align:center; padding:48px 16px !important; color: var(--ink-soft); font-size:15px; }

/* Numeric columns read better right-aligned (magnitudes line up for
   scanning) - opt-in via .cell-num on both the header and its cells, not a
   blanket rule, so it only touches columns that are actually numbers. */
.screener-table thead th.cell-num{ text-align:right; }
.screener-table .cell-num{ text-align:right; font-variant-numeric: tabular-nums; }
.screener-table .cell-muted{ color: var(--ink-soft); }
.screener-table .cell-sector{ font-size:12.5px; color: var(--ink-soft); }

/* Subtle zebra striping for the Full Universe table specifically (opt-in
   via .odd-row, set only there) - at 200 rows deep, an unbroken table of
   same-color rows is genuinely harder to track across than one with
   alternating rows, same reasoning as any dense financial data table. */
#universeTable tbody tr.odd-row{ background: var(--cream-2); }
#universeTable tbody tr.odd-row:hover{ background: var(--cream); }

.conviction-row{ background: var(--gold-soft); }
.conviction-row:hover{ background: var(--gold-hover); }
.conviction-badge{
  display:inline-block; margin-left:8px; font-size:11px; font-weight:800; letter-spacing:.03em;
  color:var(--warn-text); background: var(--gold-soft); padding:2px 7px; border-radius: var(--radius-pill); vertical-align:middle;
}

/* Munger's Inversion Check flag count - only ever shown for a stock that
   actually trips at least one check, so a clean row stays quiet. */
/* Solid background, not --coral-soft's translucent one - layered over a
   conviction row's own gold-tinted highlight (.conviction-row), the two
   translucent colors were blending into a muddy brown that dropped
   contrast to 3.92:1. A solid background reads correctly everywhere this
   badge appears, not just on the site's plain default row background. */
.munger-flag-badge{
  display:inline-block; margin-left:8px; font-size:11px; font-weight:800; letter-spacing:.02em;
  color:var(--neg-text); background: #2E1512; padding:2px 7px; border-radius: var(--radius-pill);
  vertical-align:middle; cursor:help; white-space:nowrap;
}

.screener-table thead th.sortable{ cursor:pointer; user-select:none; position:relative; padding-right:22px; }
.screener-table thead th.sortable:hover{ color: var(--indigo-dark); }
.screener-table thead th.sortable::after{
  content:"↕"; position:absolute; right:6px; opacity:.35; font-size:11px;
}
.screener-table thead th.sortable.sort-asc::after{ content:"↑"; opacity:1; color: var(--indigo); }
.screener-table thead th.sortable.sort-desc::after{ content:"↓"; opacity:1; color: var(--indigo); }

.universe-controls{
  display:flex; gap:16px; flex-wrap:wrap; align-items:center; justify-content:space-between;
  margin-bottom:14px;
}
.universe-search-wrap{ position:relative; flex:1 1 240px; max-width:300px; }
.universe-search-icon{
  position:absolute; left:12px; top:50%; transform:translateY(-50%); width:15px; height:15px;
  color: var(--ink-soft); pointer-events:none;
}
.universe-controls input[type="search"]{
  width:100%; padding:10px 14px 10px 36px; border:1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); font-family:inherit; font-size:13.5px; -webkit-appearance:none; appearance:none;
}
.universe-controls input[type="search"]::placeholder{ color: var(--ink-soft); font-family:inherit; }
.universe-controls input[type="search"]:focus{ outline:none; border-color: var(--indigo); box-shadow:0 0 0 3px var(--indigo-soft); }
.universe-controls input[type="search"]::-webkit-search-cancel-button{ cursor:pointer; }

.universe-filter-group{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.universe-controls + .universe-filter-group{ margin-bottom:20px; }
.universe-filter-label{
  font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color: var(--ink-soft);
  white-space:nowrap;
}
.universe-status-filter{ display:flex; gap:8px; flex-wrap:wrap; }
.us-filter-btn{
  padding:8px 14px; border:1px solid var(--line); border-radius: var(--radius-pill); background: var(--white);
  color: var(--ink-soft); font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap;
}
.us-filter-btn:hover{ border-color: var(--indigo); color: var(--indigo-dark); }
/* White text on --indigo only hit 3.19:1 (real contrast-audit finding) -
   the site's own dark surface color clears 5.19:1 against this background. */
.us-filter-btn.active{ background: var(--indigo); color:#1D1D2E; border-color: var(--indigo); }

/* Multi-select, unlike the status filter above it - any combination can be
   active at once (e.g. "Graham Value" + "Near 52wk Low" together). */
.universe-quality-filter{ display:flex; gap:8px; flex-wrap:wrap; }
.uq-filter-btn{
  padding:7px 13px; border:1px solid var(--line); border-radius: var(--radius-pill); background: var(--white);
  color: var(--ink-soft); font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap;
}
.uq-filter-btn:hover{ border-color: var(--pos-text); color: var(--pos-text); }
.uq-filter-btn.active{ background: var(--mint-soft); color: var(--pos-text); border-color: var(--pos-text); }
.uq-filter-btn--all{ border-style:dashed; }
.uq-filter-btn--all.active{ background: var(--gold-soft); color: var(--warn-text); border-color: var(--warn-text); border-style:solid; }

#universeTable{ min-width:820px; }
.table-scroll:has(#universeTable){ max-height:520px; overflow-y:auto; }
#universeTable thead th{ position:sticky; top:0; background: var(--white); z-index:1; }
.status-pill{ font-size:11.5px; font-weight:700; padding:4px 10px; border-radius: var(--radius-pill); white-space:nowrap; display:inline-block; }
.status-pass{ color:var(--pos-text); background: var(--mint-soft); }
.status-partial{ color:var(--warn-text); background: var(--gold-soft); }
.status-fail{ color: var(--ink-soft); background: var(--cream-2); border:1px solid var(--line); }

/* ---------------- Closest to the Floor (52-week-low screen) ---------------- */
/* Deliberately theme-invariant dark surface, like the homepage's backtest
   panel / stock modal - a featured screen, not a page section that should
   flip with the light/dark toggle. */
.floor-band{
  position:relative; overflow:hidden; margin:48px 0 0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #241F45 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.floor-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.floor-orb-1{ width:440px; height:440px; background: var(--indigo); opacity:0.25; top:-170px; right:-130px; }
.floor-orb-2{ width:320px; height:320px; background:var(--neg-strong); opacity:0.14; bottom:-150px; left:-90px; }

.floor-head{ position:relative; z-index:1; max-width:640px; margin-bottom:52px; }
.tool-eyebrow{
  display:block; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color: rgba(255,255,255,0.5); margin-bottom:18px;
}
.floor-head h2{
  font-family:'Instrument Sans', sans-serif; font-weight:600; font-size:clamp(42px, 6vw, 68px); line-height:0.98;
  letter-spacing:-0.01em; margin:0 0 20px; color:#fff;
}
/* The giant size above suits two-word titles ("Insider Buying Tracker."); a heading that says what's
   inside needs a calmer size or it becomes a three-line wall. */
.floor-head h2.h2-descriptive{ font-size:clamp(30px, 4.2vw, 46px); line-height:1.08; }
.floor-head p{ font-size:15.5px; line-height:1.6; color: rgba(255,255,255,0.6); margin:0; max-width:520px; }

.floor-list{ position:relative; z-index:1; border-top:1px solid rgba(255,255,255,0.1); }
.floor-row{
  display:grid; grid-template-columns: 64px 1fr 2fr auto; align-items:center; gap:28px;
  padding:22px 0; border-bottom:1px solid rgba(255,255,255,0.08); cursor:pointer;
  opacity:0; transform:translateY(10px); animation: floorRowIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes floorRowIn{ to{ opacity:1; transform:translateY(0); } }
.floor-row:hover, .floor-row:focus-visible{ background: rgba(255,255,255,0.025); outline:none; }
.floor-rank{
  font-family:'Instrument Sans', sans-serif; font-size:32px; font-weight:600; line-height:1;
  color: rgba(255,255,255,0.14); -webkit-text-stroke:1px rgba(255,255,255,0.3);
}
.floor-id{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.floor-ticker{ font-weight:800; font-size:15px; color:#fff; }
.floor-company{ font-size:12px; color: rgba(255,255,255,0.5); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.floor-spread{ color: rgba(143,217,138,0.75); font-weight:700; }
.floor-pct{ text-align:right; min-width:96px; }
.floor-pct-val{
  display:block; font-family:'Instrument Sans', sans-serif; font-size:24px; font-weight:600;
  color:var(--pos-strong); font-variant-numeric: tabular-nums;
}
.floor-pct.urgent .floor-pct-val{ color:#FF8A75; }
.floor-pct.warm .floor-pct-val{ color:#FFC257; }
.floor-pct-lbl{ font-size:11px; color: rgba(255,255,255,0.4); text-transform:uppercase; letter-spacing:.04em; }

.floor-more-wrap{ position:relative; z-index:1; text-align:center; margin-top:32px; }
.floor-more{
  display:inline-flex; align-items:center; gap:8px; padding:11px 22px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.04);
  color:#fff; font-weight:700; font-size:13px; cursor:pointer;
}
.floor-more:hover{ background: rgba(255,255,255,0.12); }
.floor-more-arrow{ width:14px; height:14px; flex:none; }

.floor-footnote{ position:relative; z-index:1; font-size:11.5px; color: rgba(255,255,255,0.4); line-height:1.6; margin-top:32px; max-width:620px; }
.floor-band .empty-row{ position:relative; z-index:1; color: rgba(255,255,255,0.5); }

@media (max-width: 720px){
  .floor-band{ padding:56px 0 48px; }
  .floor-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "range range" "pct pct";
  }
  .floor-rank{ grid-area:rank; font-size:22px; }
  .floor-id{ grid-area:id; }
  
  .floor-pct{ grid-area:pct; text-align:left; }
}

/* ---------------- Margin of Safety Explorer ---------------- */
/* Same theme-invariant dark surface as .floor-band, and reuses its row-list
   primitives (.floor-rank/.floor-id/.floor-pct) - this is the same visual
   family, just with a diverging price-vs-value track instead of a 52-week
   range track. */
.mos-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 15% -10%, #241F45 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.mos-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.mos-orb-1{ width:420px; height:420px; background:#2fd678; opacity:0.16; top:-160px; left:-110px; }
.mos-orb-2{ width:320px; height:320px; background:var(--neg-strong); opacity:0.12; bottom:-150px; right:-90px; }

.mos-controls{
  position:relative; z-index:1; display:flex; gap:16px; flex-wrap:wrap; align-items:center; justify-content:space-between;
  margin-bottom:8px; padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,0.1);
}
.mos-controls input[type="search"]{
  flex:1 1 220px; max-width:300px; padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color:#fff; font-size:13.5px; font-family:inherit;
}
.mos-controls input[type="search"]::placeholder{ color: rgba(255,255,255,0.35); }
.mos-filter-toggle{ display:flex; align-items:center; gap:8px; font-size:13px; color: rgba(255,255,255,0.65); cursor:pointer; white-space:nowrap; }
.mos-filter-toggle input{ accent-color:#2fd678; width:15px; height:15px; }

.azn-sort-btn{
  display:flex; align-items:center; gap:7px; padding:9px 14px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.75);
  font-size:13px; font-weight:600; font-family:inherit; cursor:pointer; white-space:nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.azn-sort-btn:hover, .azn-sort-btn:focus-visible{ background: rgba(139,127,255,0.18); border-color: rgba(139,127,255,0.45); color:#fff; outline:none; }
.azn-sort-btn svg{ width:14px; height:14px; flex:none; transition: transform .15s ease; }
.azn-sort-btn.desc svg{ transform: rotate(180deg); }
.mos-excluded-note{ position:relative; z-index:1; font-size:12px; color: rgba(255,255,255,0.4); line-height:1.5; margin:16px 0 0; }

.mos-list{ position:relative; z-index:1; border-top:1px solid rgba(255,255,255,0.1); }
.mos-row{
  display:grid; grid-template-columns: 64px 1fr 2fr auto; align-items:center; gap:28px;
  padding:22px 0; border-bottom:1px solid rgba(255,255,255,0.08); cursor:pointer;
  opacity:0; transform:translateY(10px); animation: floorRowIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
.mos-row:hover, .mos-row:focus-visible{ background: rgba(255,255,255,0.025); outline:none; }
.mos-track-wrap{ display:flex; flex-direction:column; gap:7px; }
.mos-track{ position:relative; height:5px; border-radius:999px; background: rgba(255,255,255,0.1); overflow:visible; }
.mos-zero{ position:absolute; left:50%; top:-4px; bottom:-4px; width:1px; background: rgba(255,255,255,0.25); }
.mos-fill{ position:absolute; top:0; height:100%; border-radius:999px; transition: width 1s cubic-bezier(.16,1,.3,1); }
.mos-fill.pos{ background: linear-gradient(90deg, #2fd678, var(--pos-strong)); }
.mos-fill.neg{ background: linear-gradient(90deg, var(--neg-strong), #FF8A75); }
.mos-track-labels{ display:flex; justify-content:space-between; font-size:11px; color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; }
.mos-row.wide .floor-pct-val{ color:var(--pos-strong); }
.mos-row.moderate .floor-pct-val{ color:#C9F0A6; }
.mos-row.thin .floor-pct-val{ color:#FFC257; }
.mos-row.negative .floor-pct-val{ color:#FF8A75; }

@media (max-width: 720px){
  .mos-band{ padding:56px 0 48px; }
  .mos-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "track track" "pct pct";
  }
  .mos-row .floor-rank{ grid-area:rank; font-size:22px; }
  .mos-row .floor-id{ grid-area:id; }
  .mos-row .mos-track-wrap{ grid-area:track; }
  .mos-row .floor-pct{ grid-area:pct; text-align:left; }
}

/* ---------------- Overvalued & Value Traps ---------------- */
/* Reuses .floor-row/.floor-rank/.floor-id/.mos-track primitives - same
   visual family as the 52wk-low screen and Margin of Safety Explorer right
   above it, since this is the deliberate flip side of that same data. */
.vt-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #3A1F2E 0%, #221521 45%, #0E0B12 100%);
}
.vt-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.vt-orb-1{ width:420px; height:420px; background:var(--neg-strong); opacity:0.18; top:-160px; right:-110px; }
.vt-orb-2{ width:320px; height:320px; background:#8B7FFF; opacity:0.12; bottom:-150px; left:-90px; }

.vt-tabs{ position:relative; z-index:1; display:inline-flex; gap:4px; padding:4px; margin-bottom:20px; border-radius: var(--radius-pill); background: rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); }
.vt-tab-btn{
  background:none; border:none; padding:9px 18px; border-radius: var(--radius-pill); cursor:pointer;
  font-size:13px; font-weight:700; color: rgba(255,255,255,0.55); transition: background .15s ease, color .15s ease;
}
.vt-tab-btn:hover{ color: rgba(255,255,255,0.85); }
.vt-tab-btn.active{ background: rgba(255,255,255,0.14); color:#fff; }

.vt-trap-row{ grid-template-columns: 64px 1fr auto; cursor:pointer; }
.vt-trap-badges{ display:flex; flex-wrap:wrap; gap:8px; }
.vt-badge{ font-size:11.5px; font-weight:700; padding:5px 11px; border-radius: var(--radius-pill); white-space:nowrap; }
.vt-badge--cheap{ background: rgba(47,214,120,0.12); border:1px solid rgba(47,214,120,0.35); color:var(--pos-strong); }
.vt-badge--weak{ background: rgba(255,107,87,0.14); border:1px solid rgba(255,107,87,0.4); color:#FF8A75; }

@media (max-width: 720px){
  .vt-band{ padding:56px 0 48px; }
  .vt-trap-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "badges badges";
  }
  .vt-trap-row .floor-rank{ grid-area:rank; font-size:22px; }
  .vt-trap-row .floor-id{ grid-area:id; }
  .vt-trap-row .vt-trap-badges{ grid-area:badges; }
  .vt-trap-row .floor-pct{ display:none; }
}

/* ---------------- FCF Yield Screener ---------------- */
/* Reuses .mos-row's own 4-column grid (rank / id / detail / pct) wholesale
   - the row shape is identical, only the middle "detail" slot swaps a
   split above/below-zero bar for a plain two-line P/FCF readout, since
   yield doesn't have that same natural zero-midpoint story margin of
   safety does. */
.fcfy-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 15% -10%, #3D2817 0%, #241C14 45%, #0E0B08 100%);
}
.fcfy-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.fcfy-orb-1{ width:420px; height:420px; background:#FFC257; opacity:0.16; top:-160px; left:-110px; }
.fcfy-orb-2{ width:320px; height:320px; background:var(--pos-strong); opacity:0.1; bottom:-150px; right:-90px; }

.fcfy-detail{ display:flex; flex-direction:column; gap:4px; }
.fcfy-detail-line{ font-size:13.5px; font-weight:600; color:#fff; }
.fcfy-detail-sub{ font-size:12px; color: rgba(255,255,255,0.45); }
.fcfy-row.negative .floor-pct-val{ color: rgba(255,255,255,0.35); }

@media (max-width: 720px){
  .fcfy-band{ padding:56px 0 48px; }
  .fcfy-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "detail detail" "pct pct";
  }
  .fcfy-row .floor-rank{ grid-area:rank; font-size:22px; }
  .fcfy-row .floor-id{ grid-area:id; }
  .fcfy-row .fcfy-detail{ grid-area:detail; }
  .fcfy-row .floor-pct{ grid-area:pct; text-align:left; }
}

/* ---------------- PEG Ratio Ranking ---------------- */
/* Same .mos-row row shape as Margin of Safety / FCF Yield. The middle slot is a diverging track like Margin of Safety's, but
   on a log scale with PEG 1 (Lynch's fair value) at the centre: blue to the left (cheaper than the growth justifies), red to the
   right (dearer), neutral grey at the middle. Every state also carries a glyph and a word, and the number stays in plain ink:
   colour is never the only signal. */
.peg-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #1B2A47 0%, #131B2E 45%, #090D17 100%);
}
.peg-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.peg-orb-1{ width:420px; height:420px; background:#3987E5; opacity:0.16; top:-160px; left:-110px; }
.peg-orb-2{ width:320px; height:320px; background:#E66767; opacity:0.1; bottom:-150px; right:-90px; }

.peg-chips{ position:relative; z-index:1; display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.peg-chip{
  display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius: var(--radius-pill); cursor:pointer;
  font:inherit; font-size:12.5px; font-weight:700; color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.16);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.peg-chip:hover{ border-color: rgba(255,255,255,0.45); color:#fff; }
.peg-chip:focus-visible{ outline:2px solid #8B7FFF; outline-offset:2px; }
.peg-chip.active{ background:#fff; color:#11161A; border-color:#fff; }
.peg-chip-range{ font-size:11px; font-weight:600; opacity:.6; font-variant-numeric: tabular-nums; }
.peg-chip-n{ font-size:11px; font-weight:600; opacity:.65; font-variant-numeric: tabular-nums; }
.peg-count{ position:relative; z-index:1; margin:14px 0 0; font-size:13px; color: rgba(255,255,255,0.6); }
.peg-count b{ color:#fff; }

.peg-track .peg-tick{ position:absolute; top:-2px; bottom:-2px; width:1px; background: rgba(255,255,255,0.14); }
.peg-fill{ position:absolute; top:0; height:100%; }
.peg-fill--cheap{ background:#3987E5; border-radius:999px 0 0 999px; }
.peg-fill--rich{ background:#E66767; border-radius:0 999px 999px 0; }
.peg-row .floor-pct-val{ color:#fff; }
.peg-est{ margin-left:2px; font-family:inherit; font-size:14px; color: rgba(255,255,255,0.6); cursor:help; }
.peg-glyph{ display:inline-block; font-style:normal; font-size:11px; line-height:1; margin-right:2px; vertical-align:1px; }
.peg-glyph--cheap{ color:#6CA8F2; }
.peg-glyph--rich{ color:#F28A86; }
.peg-glyph--fair{ color: rgba(255,255,255,0.6); }
.peg-pct .floor-pct-lbl{ letter-spacing:.03em; }

@media (max-width: 720px){
  .peg-band{ padding:56px 0 48px; }
  .peg-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "track track" "pct pct";
  }
  .peg-row .floor-rank{ grid-area:rank; font-size:22px; }
  .peg-row .floor-id{ grid-area:id; }
  .peg-row .mos-track-wrap{ grid-area:track; }
  .peg-row .floor-pct{ grid-area:pct; text-align:left; }
  .peg-chip{ padding:7px 11px; font-size:12px; }
}

/* ---------------- Altman Z''-Score Screener ---------------- */
/* Same .mos-row row shape as Margin of Safety / FCF Yield, but a real
   three-way zone (safe/grey/distress) instead of a two-way pos/neg split -
   Altman's own published thresholds, not something this site chose. */
.azn-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #2E1F1A 0%, #1C1512 45%, #0B0908 100%);
}
.azn-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.azn-orb-1{ width:420px; height:420px; background:#FF8A75; opacity:0.14; top:-160px; right:-110px; }
.azn-orb-2{ width:320px; height:320px; background:#FFC257; opacity:0.12; bottom:-150px; left:-90px; }

.azn-methodology-details{ margin-bottom:28px; }
.azn-methodology-body p{ font-size:13.5px; color: rgba(255,255,255,0.7); line-height:1.65; margin:0 0 14px; max-width:760px; }
.azn-methodology-body ul{ margin:0 0 14px; padding-left:20px; max-width:760px; }
.azn-methodology-body li{ font-size:13.5px; color: rgba(255,255,255,0.7); line-height:1.6; margin-bottom:8px; }
.azn-methodology-body strong{ color:#fff; }
.azn-methodology-body code{ font-size:12px; background: rgba(255,255,255,0.08); padding:2px 6px; border-radius:5px; }
.azn-formula{ font-family:'Instrument Sans', sans-serif; font-size:16px; color:#fff; margin:0 0 14px; }
.azn-formula-note{ color: rgba(255,255,255,0.45); font-weight:400; font-size:12.5px; }

.azn-detail{ display:flex; flex-direction:column; gap:4px; }
.azn-detail-line{ font-size:13.5px; font-weight:600; color:#fff; }
.azn-detail-sub{ font-size:12px; color: rgba(255,255,255,0.45); }

.azn-row .floor-pct-lbl{ text-transform:none; letter-spacing:normal; font-size:11px; font-weight:700; }
.azn-row.safe .floor-pct-val{ color:var(--pos-strong); }
.azn-row.grey .floor-pct-val{ color:#FFC257; }
.azn-row.distress .floor-pct-val{ color:#FF8A75; }
.azn-zone-tag{
  display:inline-block; margin-top:3px; font-size:11px; font-weight:800; letter-spacing:.03em; text-transform:uppercase;
  padding:2px 8px; border-radius: var(--radius-pill);
}
.azn-row.safe .azn-zone-tag{ background: rgba(47,214,120,0.14); color:var(--pos-strong); }
.azn-row.grey .azn-zone-tag{ background: rgba(255,194,87,0.16); color:#FFC257; }
.azn-row.distress .azn-zone-tag{ background: rgba(255,138,117,0.16); color:#FF8A75; }

@media (max-width: 720px){
  .azn-band{ padding:56px 0 48px; }
  .azn-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "detail detail" "pct pct";
  }
  .azn-row .floor-rank{ grid-area:rank; font-size:22px; }
  .azn-row .floor-id{ grid-area:id; }
  .azn-row .azn-detail{ grid-area:detail; }
  .azn-row .floor-pct{ grid-area:pct; text-align:left; }
}

/* ---------------- Intrinsic Value Calculator ---------------- */
/* Deliberately theme-invariant dark surface, same reasoning as .floor-band -
   a featured interactive tool, not a page section that flips with the
   light/dark toggle. */
.dcf-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0; color:#fff;
  background: radial-gradient(140% 160% at 15% -10%, #241F45 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.dcf-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.dcf-orb-1{ width:420px; height:420px; background:#8B7FFF; opacity:0.22; top:-150px; left:-120px; }
.dcf-orb-2{ width:340px; height:340px; background:#2fd678; opacity:0.14; bottom:-140px; right:-100px; }

.dcf-head{ position:relative; z-index:1; max-width:640px; margin-bottom:48px; }
.dcf-head h2{
  font-family:'Instrument Sans', sans-serif; font-weight:600; font-size:clamp(38px, 5.5vw, 60px); line-height:1.02;
  letter-spacing:-0.01em; margin:18px 0 20px; color:#fff;
}
.dcf-head p{ font-size:15.5px; line-height:1.6; color: rgba(255,255,255,0.6); margin:0; max-width:560px; }

.dcf-layout{ position:relative; z-index:1; display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:28px; align-items:start; }
.dcf-controls{
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:26px; display:flex; flex-direction:column; gap:24px;
}
.dcf-ticker-picker{ position:relative; }
.dcf-ticker-picker label{ display:block; font-size:11.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color: rgba(255,255,255,0.5); margin-bottom:8px; }
.dcf-ticker-picker input{
  width:100%; padding:12px 16px; border-radius:12px; border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color:#fff; font-size:14px; font-family:inherit;
}
.dcf-ticker-picker input::placeholder{ color: rgba(255,255,255,0.35); }
.dcf-ticker-picker input:focus{ outline:none; border-color:#8B7FFF; background: rgba(255,255,255,0.08); }

.dcf-reset-btn{
  display:inline-flex; align-items:center; gap:7px; align-self:flex-start;
  background:none; border:none; padding:0; margin-top:-8px;
  font-size:12.5px; font-weight:700; color: rgba(255,255,255,0.5); cursor:pointer;
  transition: color .15s ease;
}
.dcf-reset-btn svg{ width:14px; height:14px; flex:none; }
.dcf-reset-btn:hover{ color:#C9C2FF; }
.dcf-ticker-results{
  position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:5; max-height:280px; overflow-y:auto;
  background: var(--band-mid); border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:6px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.dcf-ticker-results::-webkit-scrollbar{ width:7px; }
.dcf-ticker-results::-webkit-scrollbar-track{ background:transparent; }
.dcf-ticker-results::-webkit-scrollbar-thumb{ background: rgba(139,127,255,0.45); border-radius:999px; }
.dcf-ticker-results::-webkit-scrollbar-thumb:hover{ background: rgba(139,127,255,0.7); }
.dcf-ticker-result{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px; border-radius:9px; cursor:pointer; font-size:13.5px;
}
.dcf-ticker-result:hover, .dcf-ticker-result.active{ background: rgba(139,127,255,0.18); }
.dcf-ticker-result .t{ font-weight:800; color:#fff; }
.dcf-ticker-result .n{ color: rgba(255,255,255,0.5); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-left:10px; }
.dcf-ticker-empty{ padding:12px; font-size:12.5px; color: rgba(255,255,255,0.45); }

.dcf-knob-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:10px; gap:10px; }
.dcf-knob-head label{ font-size:13px; font-weight:700; color: rgba(255,255,255,0.85); }
.dcf-knob-sub{ font-weight:400; color: rgba(255,255,255,0.4); }
.dcf-knob-val{ font-family:'Instrument Sans', sans-serif; font-size:16px; font-weight:600; color:#C9C2FF; font-variant-numeric: tabular-nums; flex:none; }

.dcf-knob input[type="range"]{
  -webkit-appearance:none; appearance:none; width:100%; height:5px; border-radius:999px;
  background: rgba(255,255,255,0.12); outline:none; cursor:pointer;
}
.dcf-knob input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  background:#fff; border:3px solid #8B7FFF; box-shadow:0 2px 8px rgba(0,0,0,0.4); cursor:pointer;
}
.dcf-knob input[type="range"]::-moz-range-thumb{
  width:18px; height:18px; border-radius:50%; background:#fff; border:3px solid #8B7FFF;
  box-shadow:0 2px 8px rgba(0,0,0,0.4); cursor:pointer;
}
.dcf-knob input[type="range"]::-moz-range-track{ height:5px; border-radius:999px; background:transparent; }

.dcf-capm-suggestion{
  display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  margin-top:10px; padding:9px 12px; border-radius:10px;
  background: rgba(139,127,255,0.1); border:1px solid rgba(139,127,255,0.25);
}
.dcf-capm-text{ font-size:12px; color: rgba(255,255,255,0.75); line-height:1.4; }
.dcf-capm-text strong{ color:#C9C2FF; font-family:'Instrument Sans', sans-serif; font-size:13px; }
.dcf-capm-sub{ color: rgba(255,255,255,0.45); }
.dcf-capm-use{
  flex:none; font-size:11.5px; font-weight:700; padding:6px 12px; border-radius: var(--radius-pill);
  background: rgba(139,127,255,0.2); border:1px solid rgba(139,127,255,0.4); color:#C9C2FF; cursor:pointer;
  transition: background .15s ease;
}
.dcf-capm-use:hover{ background: rgba(139,127,255,0.35); }

.dcf-result{
  background: linear-gradient(165deg, rgba(139,127,255,0.14), rgba(139,127,255,0.02));
  border:1px solid rgba(255,255,255,0.1); border-radius:20px; padding:32px; min-height:320px;
  display:flex; flex-direction:column; justify-content:center;
}
.dcf-result-empty{ text-align:center; color: rgba(255,255,255,0.4); font-size:14px; }
.dcf-result-stock{ display:flex; align-items:baseline; gap:10px; margin-bottom:22px; flex-wrap:wrap; }
.dcf-result-ticker{ font-family:'Instrument Sans', sans-serif; font-size:24px; font-weight:700; color:#fff; }
.dcf-result-name{ font-size:13px; color: rgba(255,255,255,0.5); }
.dcf-result-grid{ display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:16px; margin-bottom:20px; }
.dcf-result-stat{ background: rgba(255,255,255,0.04); border-radius:14px; padding:16px; }
.dcf-result-lbl{ display:block; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.5); margin-bottom:6px; }
.dcf-result-price{ font-family:'Instrument Sans', sans-serif; font-size:26px; font-weight:600; color:#fff; }
.dcf-result-value{ font-family:'Instrument Sans', sans-serif; font-size:26px; font-weight:600; color:#C9C2FF; }
.dcf-verdict{
  padding:14px 18px; border-radius:14px; font-size:14.5px; font-weight:700; margin-bottom:16px;
}
.dcf-verdict.undervalued{ background: rgba(47,214,120,0.16); color:var(--pos-strong); }
.dcf-verdict.overvalued{ background: rgba(255,138,117,0.16); color:#FF8A75; }
.dcf-verdict.fair{ background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); }
.dcf-basis{ font-size:12px; line-height:1.55; color: rgba(255,255,255,0.5); margin:0; }
.dcf-basis b{ color: rgba(255,255,255,0.85); }
.dcf-result-warning{ font-size:13px; color:#FFC257; text-align:center; line-height:1.5; }

.dcf-scenario-strip{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-top:18px; }
.dcf-scenario{
  display:flex; flex-direction:column; gap:3px; text-align:center; padding:12px 8px; border-radius:12px;
  background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08);
}
.dcf-scenario--base{ background: rgba(139,127,255,0.1); border-color: rgba(139,127,255,0.25); }
.dcf-scenario-lbl{ font-size:11px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.45); }
.dcf-scenario-val{ font-family:'Instrument Sans', sans-serif; font-size:17px; font-weight:600; color:#fff; }
.dcf-scenario-sub{ font-size:11px; font-weight:700; }
.dcf-scenario-sub.pos{ color:var(--pos-strong); }
.dcf-scenario-sub.neg{ color:#FF8A75; }
.dcf-scenario-assump{ font-size:11px; color: rgba(255,255,255,0.35); }

.dcf-yearly-details{ position:relative; z-index:1; margin-top:28px; }
.dcf-yearly-details summary{
  cursor:pointer; font-family:'Instrument Sans', sans-serif; font-size:15px; font-weight:600; color:#fff;
  padding:14px 0; border-top:1px solid rgba(255,255,255,0.1); border-bottom:1px solid rgba(255,255,255,0.1);
  list-style:none;
}
.dcf-yearly-details summary::-webkit-details-marker{ display:none; }
.dcf-yearly-details summary::before{ content:"+ "; color: rgba(255,255,255,0.5); }
.dcf-yearly-details[open] summary::before{ content:"− "; }
.dcf-yearly-table{ margin-top:16px; min-width:520px; color:#fff; }
.dcf-yearly-table thead th{ color: rgba(255,255,255,0.5); border-bottom-color: rgba(255,255,255,0.1); }
.dcf-yearly-table tbody td{ border-bottom-color: rgba(255,255,255,0.06); font-variant-numeric: tabular-nums; }
.dcf-yearly-table tbody tr:hover{ background: rgba(255,255,255,0.03); }
.dcf-yearly-table tfoot td{
  padding:14px 16px; font-weight:700; color: rgba(255,255,255,0.85); border-top:1px solid rgba(255,255,255,0.15);
  font-variant-numeric: tabular-nums;
}
.dcf-yearly-note{ font-size:11.5px; color: rgba(255,255,255,0.4); line-height:1.6; margin:14px 0 0; max-width:640px; }

.dcf-footnote{ position:relative; z-index:1; font-size:11.5px; color: rgba(255,255,255,0.4); line-height:1.6; margin-top:32px; max-width:680px; }

@media (max-width: 860px){
  .dcf-layout{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width: 560px){
  .dcf-scenario-strip{ grid-template-columns:minmax(0,1fr); }
}

/* ---------------- DCA Backtest ---------------- */
.dca-range-note{ font-size:11px; color: rgba(255,194,87,0.85); line-height:1.5; margin:8px 0 0; }
.dca-window-note{ font-size:12px; color: rgba(255,255,255,0.5); margin:2px 0 16px; }

.dca-metrics-card{
  position:relative; z-index:1; margin-top:28px; padding:24px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
}
.dca-metrics-card h3{ font-size:15px; font-weight:600; color:#fff; margin:0 0 16px; max-width:520px; line-height:1.4; }
.dca-metrics-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:14px; }
.dca-metric{
  display:flex; flex-direction:column; gap:4px; padding:14px 16px; border-radius:14px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08);
}
.dca-metric-lbl{ font-size:11px; font-weight:700; letter-spacing:.02em; color: rgba(255,255,255,0.5); line-height:1.4; }
.dca-metric-val{ font-family:'Instrument Sans', sans-serif; font-size:19px; font-weight:600; color:#fff; }
.dca-metric-val.pos{ color:var(--pos-strong); }
.dca-metric-val.neg{ color:#FF8A75; }
.dca-metric-vs{ font-size:11px; font-weight:400; color: rgba(255,255,255,0.35); margin:0 2px; }
.dca-metric-sub{ font-size:11px; color: rgba(255,255,255,0.45); }

.dca-chart-card{
  position:relative; z-index:1; margin-top:20px; padding:24px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
}
.dca-chart-head{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.dca-chart-head h3{ font-size:15px; font-weight:600; color:#fff; margin:0; }
.dca-legend{ display:flex; gap:18px; flex-wrap:wrap; font-size:12px; color: rgba(255,255,255,0.7); }
.dca-legend-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.dca-legend-dot.dashed{ background:none; border:1.5px dashed; border-radius:0; width:11px; height:0; vertical-align:middle; }
.dca-chart-wrap{ position:relative; margin-bottom:0; }
.dca-chart-svg{ width:100%; height:auto; display:block; overflow:visible; }
.dca-tooltip{
  position:absolute; top:0; left:0; transform:translate(-50%,-115%);
  background: rgba(10,10,20,0.95); border:1px solid rgba(255,255,255,0.15); border-radius:10px;
  padding:9px 12px; font-size:12px; line-height:1.5; pointer-events:none; white-space:nowrap;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4); z-index:2;
}
.dca-tooltip strong{ display:block; color: rgba(255,255,255,0.5); font-weight:600; font-size:11px; margin-bottom:4px; }

@media (max-width: 720px){
  .dca-metrics-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 420px){
  .dca-metrics-grid{ grid-template-columns: minmax(0,1fr); }
}

/* ---------------- Inflation-Adjusted Real Return ---------------- */
.irr-metrics-card{
  position:relative; z-index:1; margin-top:28px; padding:24px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
}
.irr-metrics-card h3{ font-size:15px; font-weight:600; color:#fff; margin:0 0 16px; max-width:520px; line-height:1.4; }
.irr-metrics-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:14px; }
.irr-metric{
  display:flex; flex-direction:column; gap:4px; padding:14px 16px; border-radius:14px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08);
}
.irr-metric-lbl{ font-size:11px; font-weight:700; letter-spacing:.02em; color: rgba(255,255,255,0.5); line-height:1.4; }
.irr-metric-val{ font-family:'Instrument Sans', sans-serif; font-size:19px; font-weight:600; color:#fff; }
.irr-metric-val.pos{ color:var(--pos-strong); }
.irr-metric-val.neg{ color:#FF8A75; }
.irr-metric-vs{ font-size:11px; font-weight:400; color: rgba(255,255,255,0.35); margin:0 2px; }
.irr-metric-sub{ font-size:11px; color: rgba(255,255,255,0.45); }

.irr-chart-card{
  position:relative; z-index:1; margin-top:20px; padding:24px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
}
.irr-chart-head{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.irr-chart-head h3{ font-size:15px; font-weight:600; color:#fff; margin:0; }
.irr-legend{ display:flex; gap:18px; flex-wrap:wrap; font-size:12px; color: rgba(255,255,255,0.7); }
.irr-legend-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.irr-legend-dot.dashed{ background:none; border:1.5px dashed; border-radius:0; width:11px; height:0; vertical-align:middle; }
.irr-chart-wrap{ position:relative; margin-bottom:0; }
.irr-chart-svg{ width:100%; height:auto; display:block; overflow:visible; }
.irr-tooltip{
  position:absolute; top:0; left:0; transform:translate(-50%,-115%);
  background: rgba(10,10,20,0.95); border:1px solid rgba(255,255,255,0.15); border-radius:10px;
  padding:9px 12px; font-size:12px; line-height:1.5; pointer-events:none; white-space:nowrap;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4); z-index:2;
}
.irr-tooltip strong{ display:block; color: rgba(255,255,255,0.5); font-weight:600; font-size:11px; margin-bottom:4px; }

@media (max-width: 720px){
  .irr-metrics-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 420px){
  .irr-metrics-grid{ grid-template-columns: minmax(0,1fr); }
}

/* ---------------- Goal-Seek Calculator ---------------- */
/* Nested inside a .dcf-knob (target amount / return rate) rather than
   standing alone, so both need a little breathing room from the slider
   above them. */
.gs-target-type{ margin-top:10px; }
.gs-return-picker{ margin-top:12px; }
.gs-return-picker label{ font-size:11px; }

/* ---------------- Average Buy-In Price Calculator ---------------- */
.gav-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0; color:#fff;
  background: radial-gradient(140% 160% at 15% -10%, #1B3A33 0%, #16241F 45%, #0B0E0D 100%);
}
.gav-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.gav-orb-1{ width:420px; height:420px; background:#2fd678; opacity:0.2; top:-150px; left:-120px; }
.gav-orb-2{ width:320px; height:320px; background:#8B7FFF; opacity:0.14; bottom:-140px; right:-100px; }

.gav-layout{ position:relative; z-index:1; display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:28px; align-items:start; }
.gav-controls{
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:26px; display:flex; flex-direction:column; gap:18px;
}
.gav-controls-row{ display:flex; align-items:center; justify-content:space-between; gap:14px; }

.gav-lots{ display:flex; flex-direction:column; gap:10px; }
.gav-lot-row{ display:grid; grid-template-columns: 20px 1fr 1fr auto; align-items:end; gap:10px; }
.gav-lot-num{ font-family:'Instrument Sans', sans-serif; font-size:13px; font-weight:600; color: rgba(255,255,255,0.35); padding-bottom:11px; }
.gav-field label{ display:block; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.5); margin-bottom:6px; }
.gav-text-input{
  width:100%; padding:11px 13px; border-radius:10px; border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color:#fff; font-size:13.5px; font-family:inherit; font-variant-numeric: tabular-nums;
}
.gav-text-input::placeholder{ color: rgba(255,255,255,0.3); }
.gav-text-input:focus{ outline:none; border-color:#2fd678; background: rgba(255,255,255,0.08); }
.gav-lot-remove{
  width:38px; height:38px; border-radius:10px; flex:none; display:flex; align-items:center; justify-content:center;
  background: rgba(255,107,87,0.1); border:1px solid rgba(255,107,87,0.25); color:#FF8A75; cursor:pointer;
  transition: background .15s ease;
}
.gav-lot-remove svg{ width:15px; height:15px; }
.gav-lot-remove:hover:not(:disabled){ background: rgba(255,107,87,0.22); }
.gav-lot-remove:disabled{ opacity:0.25; cursor:not-allowed; }

.gav-add-btn{
  display:inline-flex; align-items:center; gap:7px; padding:10px 16px; border-radius:999px;
  background: rgba(47,214,120,0.14); border:1px solid rgba(47,214,120,0.4); color:var(--pos-strong);
  font-size:13px; font-weight:700; cursor:pointer; transition: background .15s ease;
}
.gav-add-btn svg{ width:15px; height:15px; }
.gav-add-btn:hover{ background: rgba(47,214,120,0.24); }

.gav-whatif{ border-top:1px solid rgba(255,255,255,0.08); padding-top:14px; }
.gav-whatif summary{
  cursor:pointer; font-size:13px; font-weight:700; color: rgba(255,255,255,0.75); list-style:none;
}
.gav-whatif summary::-webkit-details-marker{ display:none; }
.gav-whatif summary::before{ content:"+ "; color: rgba(255,255,255,0.4); }
.gav-whatif[open] summary::before{ content:"\2212 "; }
.gav-whatif-body{ padding-top:14px; display:flex; flex-direction:column; gap:12px; }
.gav-whatif-intro{ font-size:11.5px; color: rgba(255,255,255,0.4); line-height:1.5; margin:0; }
.gav-whatif-row{ display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:10px; }
.gav-whatif-empty{ font-size:12px; color: rgba(255,255,255,0.4); margin:0; }
.gav-out-row{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:13px; padding:6px 0; }
.gav-out-row span:first-child{ color: rgba(255,255,255,0.6); }
.gav-out-val{ font-weight:700; font-variant-numeric: tabular-nums; color:#fff; }
.gav-out-val.pos{ color:var(--pos-strong); }
.gav-out-val.neg{ color:#FF8A75; }

.gav-result{
  position:relative; background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:28px; min-height:280px; display:flex; flex-direction:column;
}
.gav-result-empty{ margin:auto; text-align:center; color: rgba(255,255,255,0.4); font-size:14px; }
.gav-result-lbl{ font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color: rgba(255,255,255,0.5); }
.gav-result-avg{ font-family:'Instrument Sans', sans-serif; font-size:44px; font-weight:700; color:var(--pos-strong); margin:8px 0 2px; }
.gav-result-sub{ font-size:12.5px; color: rgba(255,255,255,0.4); }
.gav-result-grid{ display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:14px; margin-top:22px; padding-top:20px; border-top:1px solid rgba(255,255,255,0.08); }
.gav-result-stat{ display:flex; flex-direction:column; gap:4px; }
.gav-result-stat-lbl{ font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.45); }
.gav-result-stat-val{ font-family:'Instrument Sans', sans-serif; font-size:19px; font-weight:600; color:#fff; }

.gav-pl{ margin-top:18px; padding:14px 16px; border-radius:14px; background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); }
.gav-pl-row{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:13px; padding:3px 0; color: rgba(255,255,255,0.7); }
.gav-pl-row span:last-child{ font-weight:700; font-variant-numeric: tabular-nums; color:#fff; }
.gav-pl.pos .gav-pl-row span:last-child{ color:var(--pos-strong); }
.gav-pl.neg .gav-pl-row span:last-child{ color:#FF8A75; }

.gav-range-wrap{ margin-top:20px; padding-top:18px; border-top:1px solid rgba(255,255,255,0.08); }
.gav-range-title{ display:block; font-size:11.5px; color: rgba(255,255,255,0.5); margin-bottom:12px; }
.gav-range-track{ position:relative; height:6px; border-radius:999px; background: linear-gradient(90deg, rgba(255,138,117,0.4), rgba(255,255,255,0.15), rgba(143,217,138,0.4)); margin:0 6px; }
.gav-range-marker{ position:absolute; top:50%; width:12px; height:12px; border-radius:50%; transform:translate(-50%,-50%); border:2px solid #0B0E0D; cursor:help; }
.gav-range-marker--avg{ background:var(--gold-bright); z-index:2; }
.gav-range-marker--now{ background:#8B7FFF; z-index:1; }
.gav-range-labels{ display:flex; justify-content:space-between; font-size:11px; color: rgba(255,255,255,0.4); margin-top:10px; font-variant-numeric: tabular-nums; }
.gav-range-legend{ display:flex; gap:16px; margin-top:10px; font-size:11px; color: rgba(255,255,255,0.55); }
.gav-legend-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; vertical-align:middle; }
.gav-legend-dot--avg{ background:var(--gold-bright); }
.gav-legend-dot--now{ background:#8B7FFF; }

.gav-links{ margin-top:18px; }

@media (max-width: 860px){
  .gav-layout{ grid-template-columns:minmax(0,1fr); }
  .gav-lot-row{ grid-template-columns:16px 1fr 1fr; grid-template-areas:"num shares price" ". remove remove"; }
  .gav-lot-remove{ grid-column: 1 / -1; width:100%; }
}

/* ---------------- Discount Rate Calculator ---------------- */
/* Same dark-workspace treatment as .dcf-band, but its own accent (a warm
   gold/violet duotone instead of violet/mint) so it reads as a distinct
   tool that happens to sit right next to the Intrinsic Value Calculator,
   not a re-skinned copy of it. */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.sr-only-range{
  position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; pointer-events:none;
}
.sr-only-range:focus-visible{
  position:static; width:auto; height:auto; opacity:1; pointer-events:auto; margin-top:10px;
}

.drc-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0; color:#fff;
  background: radial-gradient(150% 170% at 85% -10%, #3A2A55 0%, #1B1730 45%, var(--band-dark) 100%);
}
.drc-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.drc-orb-1{ width:380px; height:380px; background:#FFB238; opacity:0.16; top:-120px; right:-100px; }
.drc-orb-2{ width:320px; height:320px; background:#8B7FFF; opacity:0.2; bottom:-140px; left:-100px; }

.drc-layout{ position:relative; z-index:1; display:grid; grid-template-columns: 300px 1fr; gap:32px; align-items:start; }

.drc-dial-col{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:24px;
  padding:28px 22px; backdrop-filter: blur(6px);
}
.drc-dial{ width:100%; max-width:220px; height:auto; touch-action:none; cursor:grab; filter: drop-shadow(0 0 24px rgba(139,127,255,0.25)); }
.drc-dial:active{ cursor:grabbing; }
.drc-dial-track{ fill:none; stroke: rgba(255,255,255,0.1); stroke-width:14; stroke-linecap:round; }
.drc-dial-fill{ fill:none; stroke: url(#drcDialGradient); stroke-width:14; stroke-linecap:round; transition: d .05s linear; }
.drc-dial-thumb{ fill:#fff; stroke:#FFB238; stroke-width:4; filter: drop-shadow(0 0 6px rgba(255,178,56,0.7)); }
.drc-dial-value{ font-family:'Instrument Sans', sans-serif; font-size:34px; font-weight:700; fill:#fff; }
.drc-dial-caption{ font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; fill: rgba(255,255,255,0.4); }
.drc-dial-hint{ font-size:11.5px; color: rgba(255,255,255,0.4); margin:14px 0 20px; }

.drc-ref-points{ display:flex; flex-direction:column; gap:8px; width:100%; }
.drc-ref-chip{
  display:flex; flex-direction:column; gap:2px; align-items:flex-start; text-align:left;
  width:100%; padding:10px 13px; border-radius:14px; cursor:pointer;
  background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.1); color:#fff;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.drc-ref-chip:hover:not(:disabled){ background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.drc-ref-chip:disabled{ opacity:0.4; cursor:not-allowed; }
.drc-ref-chip.active{ background: rgba(255,178,56,0.14); border-color: rgba(255,178,56,0.5); }
.drc-ref-lbl{ font-size:12.5px; font-weight:800; }
.drc-ref-val{ font-family:'Instrument Sans', sans-serif; font-size:17px; font-weight:600; color:var(--gold-bright); }
.drc-ref-sub{ font-size:11px; color: rgba(255,255,255,0.45); }
.drc-ref-disclaimer{ font-size:11px; color: rgba(255,255,255,0.35); line-height:1.6; margin:16px 0 0; text-align:left; }
.drc-ref-disclaimer a{ color: rgba(255,255,255,0.55); }

.drc-panels{ display:flex; flex-direction:column; gap:20px; }
.drc-panel{
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:24px 26px; backdrop-filter: blur(6px);
}
.drc-panel h3{ font-family:'Instrument Sans', sans-serif; font-size:16px; font-weight:600; margin:0 0 16px; color:#fff; }
.drc-panel-note{ font-size:12px; color: rgba(255,255,255,0.45); line-height:1.6; margin:14px 0 0; }
.drc-panel-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }

.drc-decay-chart{ display:flex; align-items:flex-end; height:120px; gap:6px; padding:0 2px; }
.drc-decay-bars{ display:flex; align-items:flex-end; height:100%; gap:6px; width:100%; }
.drc-decay-bar-col{ display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; flex:1; gap:6px; }
.drc-decay-bar{
  width:100%; max-width:22px; border-radius:5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--gold-bright) 0%, #8B7FFF 100%);
  transition: height .12s ease;
}
.drc-decay-yr{ font-size:11px; color: rgba(255,255,255,0.4); }
.drc-decay-readouts{ display:flex; gap:24px; margin-top:16px; padding-top:16px; border-top:1px solid rgba(255,255,255,0.08); }
.drc-decay-lbl{ display:block; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.4); margin-bottom:4px; }
.drc-decay-val{ font-family:'Instrument Sans', sans-serif; font-size:20px; font-weight:600; color:#fff; }

.drc-capm-breakdown{ display:flex; flex-direction:column; gap:4px; }
.drc-capm-row{ display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; padding:8px 0; }
.drc-capm-term{ font-size:13px; font-weight:700; color: rgba(255,255,255,0.85); min-width:190px; }
.drc-capm-num{ font-family:'Instrument Sans', sans-serif; font-size:15px; font-weight:600; color:#C9C2FF; font-variant-numeric: tabular-nums; }
.drc-capm-note{ font-size:11px; color: rgba(255,255,255,0.4); flex-basis:100%; }
.drc-capm-op{ font-size:14px; color: rgba(255,255,255,0.3); padding-left:2px; }
.drc-capm-result{ margin-top:4px; padding-top:14px; border-top:1px solid rgba(255,255,255,0.1); align-items:center; }
.drc-capm-result .drc-capm-num{ font-size:20px; color:var(--gold-bright); }
.drc-capm-use{
  margin-left:auto; background: rgba(255,178,56,0.14); border:1px solid rgba(255,178,56,0.4); color:var(--gold-bright);
  font-size:11.5px; font-weight:700; padding:7px 13px; border-radius:999px; cursor:pointer; white-space:nowrap;
  transition: background .15s ease;
}
.drc-capm-use:hover{ background: rgba(255,178,56,0.26); }
.drc-capm-use:disabled{ opacity:0.4; cursor:not-allowed; }
.drc-capm-empty{ font-size:12.5px; color: rgba(255,255,255,0.45); }

.drc-elasticity{ margin-top:16px; }
.drc-elasticity-empty{ font-size:12.5px; color: rgba(255,255,255,0.45); }
.drc-elasticity-headline{ font-size:14px; line-height:1.6; color: rgba(255,255,255,0.85); }
.drc-elasticity-ticker{ font-weight:800; color:#fff; }
.drc-elasticity-sub{ display:block; font-size:11px; color: rgba(255,255,255,0.4); margin-top:4px; }
.drc-elasticity-price{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px;
  margin-top:12px; padding:10px 14px; border-radius:12px;
  background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08);
  font-size:13px; color: rgba(255,255,255,0.75);
}
.drc-elasticity-price strong{ color:#fff; font-family:'Instrument Sans', sans-serif; font-size:15px; }
.drc-elasticity-spread{ font-weight:700; font-size:12.5px; }
.drc-elasticity-spread.pos{ color:var(--pos-strong); }
.drc-elasticity-spread.neg{ color:#FF8A75; }
.drc-elasticity-swing{ font-size:13.5px; margin-top:10px; color: rgba(255,255,255,0.75); }
.drc-elasticity-swing strong.pos{ color:var(--pos-strong); }
.drc-elasticity-swing strong.neg{ color:#FF8A75; }

@media (max-width: 860px){
  .drc-layout{ grid-template-columns:minmax(0,1fr); }
  .drc-dial-col{ max-width:320px; margin:0 auto; }
}

/* ---------------- Technical Analysis ---------------- */
/* Same dark-workspace treatment as .dcf-band right above it (deliberate,
   theme-invariant - a hand-rolled SVG chart needs fixed, known colors for
   its gridlines/fills regardless of light/dark mode, same reasoning as the
   DCF calculator and Stock Compare). */
.ta-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #17233F 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.ta-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.ta-orb-1{ width:420px; height:420px; background:#2fd678; opacity:0.16; top:-150px; right:-110px; }
.ta-orb-2{ width:340px; height:340px; background:#FF8A75; opacity:0.12; bottom:-140px; left:-100px; }

.ta-head{ position:relative; z-index:1; max-width:640px; margin-bottom:48px; }
.ta-head h2{
  font-family:'Instrument Sans', sans-serif; font-weight:600; font-size:clamp(38px, 5.5vw, 60px); line-height:1.02;
  letter-spacing:-0.01em; margin:18px 0 20px; color:#fff;
}
.ta-head p{ font-size:15.5px; line-height:1.6; color: rgba(255,255,255,0.6); margin:0; max-width:560px; }

.ta-layout{ position:relative; z-index:1; display:grid; grid-template-columns: 300px 1fr; gap:28px; align-items:start; }
.ta-controls{
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:26px; display:flex; flex-direction:column; gap:24px;
}
.ta-range-block{ display:flex; flex-direction:column; gap:10px; }
.ta-range-lbl{ font-size:11.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color: rgba(255,255,255,0.5); }
.ta-range-pills{ display:flex; flex-wrap:wrap; gap:6px; }
.ta-range-pill{
  padding:7px 13px; border-radius:999px; border:1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7); font-size:12.5px; font-weight:700; cursor:pointer; transition: all .15s ease;
}
.ta-range-pill:hover{ border-color: rgba(255,255,255,0.3); color:#fff; }
.ta-range-pill.active{ background:#2fd678; border-color:#2fd678; color:var(--band-dark); }

.ta-stats{ display:flex; flex-direction:column; gap:14px; border-top:1px solid rgba(255,255,255,0.1); padding-top:20px; }
.ta-stat{ display:flex; flex-direction:column; gap:4px; }
.ta-stat-lbl{ font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.5); }
.ta-stat-val{ font-family:'Instrument Sans', sans-serif; font-size:19px; font-weight:600; color:#fff; font-variant-numeric: tabular-nums; }
.ta-stat-val--support{ color:var(--pos-strong); }
.ta-stat-val--resistance{ color:#FF8A75; }

.ta-result{
  background: linear-gradient(165deg, rgba(47,214,120,0.10), rgba(47,214,120,0.02));
  border:1px solid rgba(255,255,255,0.1); border-radius:20px; padding:32px; min-height:460px;
  display:flex; flex-direction:column; justify-content:center;
}
.ta-result-empty{ text-align:center; color: rgba(255,255,255,0.4); font-size:14px; }
.ta-result-head{ display:flex; align-items:baseline; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.ta-result-id{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.ta-result-ticker{ font-family:'Instrument Sans', sans-serif; font-size:24px; font-weight:700; color:#fff; }
.ta-result-name{ font-size:13px; color: rgba(255,255,255,0.5); }
.ta-result-price{ font-family:'Instrument Sans', sans-serif; font-size:26px; font-weight:600; color:#fff; }

.ta-chart-wrap{ width:100%; }
.ta-chart-wrap svg{ width:100%; height:auto; display:block; overflow:visible; }
.ta-chart-price-line{ fill:none; stroke:#2fd678; stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.ta-chart-price-fill{ fill: url(#taPriceGradient); }
.ta-chart-trend-line{ fill:none; stroke:#FFC257; stroke-width:1.6; stroke-dasharray:2 5; stroke-linecap:round; }
.ta-chart-support-line{ fill:none; stroke:var(--pos-strong); stroke-width:1.2; stroke-dasharray:5 4; opacity:0.75; }
.ta-chart-resistance-line{ fill:none; stroke:#FF8A75; stroke-width:1.2; stroke-dasharray:5 4; opacity:0.75; }
.ta-chart-now-line{ fill:none; stroke: rgba(255,255,255,0.35); stroke-width:1; stroke-dasharray:2 3; }
.ta-chart-now-dot{ fill:#fff; stroke:#2fd678; stroke-width:2; }
.ta-chart-axis-label{ font-size:11px; fill: rgba(255,255,255,0.45); font-family:inherit; }
.ta-chart-level-label{ font-size:11px; font-weight:700; font-family:inherit; }
.ta-chart-level-label--support{ fill:var(--pos-strong); }
.ta-chart-level-label--resistance{ fill:#FF8A75; }
.ta-chart-grid-line{ stroke: rgba(255,255,255,0.06); stroke-width:1; }

.ta-legend{ display:flex; flex-wrap:wrap; gap:18px; margin-top:18px; }
.ta-narrative{
  font-size:13.5px; line-height:1.65; color: rgba(255,255,255,0.75); margin:18px 0 0;
  padding-top:18px; border-top:1px solid rgba(255,255,255,0.1);
}
.ta-legend-item{ display:inline-flex; align-items:center; gap:7px; font-size:12px; color: rgba(255,255,255,0.55); }
.ta-legend-swatch{ width:16px; height:0; border-top-width:2px; border-top-style:solid; }
.ta-legend-swatch--price{ border-top-color:#2fd678; border-top-style:solid; border-top-width:2.5px; }
.ta-legend-swatch--trend{ border-top-color:#FFC257; border-top-style:dashed; }
.ta-legend-swatch--support{ border-top-color:var(--pos-strong); border-top-style:dashed; }
.ta-legend-swatch--resistance{ border-top-color:#FF8A75; border-top-style:dashed; }

.ta-footnote{ position:relative; z-index:1; font-size:11.5px; color: rgba(255,255,255,0.4); line-height:1.6; margin-top:32px; max-width:720px; }

@media (max-width: 860px){
  .ta-layout{ grid-template-columns:minmax(0,1fr); }
}

/* ---------------- Stock A vs Stock B comparison ---------------- */
/* Deliberately theme-invariant dark surface, same reasoning as .floor-band
   and .dcf-band above it. */
.compare-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #1B2E4A 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.compare-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.compare-orb-1{ width:420px; height:420px; background:#2fd678; opacity:0.16; top:-160px; right:-110px; }
.compare-orb-2{ width:340px; height:340px; background:var(--neg-strong); opacity:0.12; bottom:-150px; left:-100px; }

.compare-pickers{
  position:relative; z-index:2; display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:20px;
  margin-bottom:16px;
}
.compare-picker{ position:relative; }
.compare-picker-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.compare-picker-head label{ margin:0; }
.compare-remove-btn{
  background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.6);
  width:22px; height:22px; border-radius:50%; font-size:14px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.compare-remove-btn:hover{ background: rgba(255,107,87,0.25); color:#fff; border-color:var(--neg-strong); }

.compare-add-wrap{ position:relative; z-index:1; margin-bottom:28px; }
.compare-add-btn{
  background: rgba(255,255,255,0.04); border:1px dashed rgba(255,255,255,0.25); color: rgba(255,255,255,0.7);
  padding:10px 18px; border-radius:12px; font-size:13px; font-weight:700; cursor:pointer;
}
.compare-add-btn:hover{ background: rgba(47,214,120,0.1); border-color:#2fd678; color:#fff; }
.compare-add-btn[hidden]{ display:none; }

.compare-result{
  position:relative; z-index:1;
  background: linear-gradient(165deg, rgba(47,214,120,0.1), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.1); border-radius:20px; padding:32px; min-height:280px;
  display:flex; flex-direction:column; justify-content:center;
}
.compare-empty{ text-align:center; color: rgba(255,255,255,0.4); font-size:14px; }

.compare-table-wrap{
  overflow-x:auto;
}
.compare-table-wrap::-webkit-scrollbar{ height:7px; }
.compare-table-wrap::-webkit-scrollbar-track{ background:transparent; }
.compare-table-wrap::-webkit-scrollbar-thumb{ background: rgba(139,127,255,0.45); border-radius:999px; }
.compare-table-wrap::-webkit-scrollbar-thumb:hover{ background: rgba(139,127,255,0.7); }
.compare-head-row{
  display:grid; align-items:center; text-align:center; gap:8px;
  padding-bottom:18px; margin-bottom:8px; border-bottom:1px solid rgba(255,255,255,0.1);
  min-width:520px;
}
.compare-head-stock{ display:flex; flex-direction:column; gap:4px; }
.compare-head-stock.compare-head-empty{ color: rgba(255,255,255,0.25); }
.compare-head-ticker{ font-family:'Instrument Sans', sans-serif; font-size:20px; font-weight:700; color:#fff; }
.compare-head-name{ font-size:11.5px; color: rgba(255,255,255,0.5); }

.compare-row{
  display:grid; align-items:center; text-align:center; gap:8px;
  padding:13px 0; border-bottom:1px solid rgba(255,255,255,0.06);
  min-width:520px;
}
.compare-row:last-child{ border-bottom:none; }
.compare-cell{
  font-family:'Instrument Sans', sans-serif; font-size:15px; font-weight:600; color: rgba(255,255,255,0.75);
  padding:6px 8px; border-radius:10px;
}
.compare-cell.winner{ color:var(--pos-strong); background: rgba(47,214,120,0.12); }
.compare-cell-label{
  font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; text-align:left;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 720px){
  .compare-pickers{ grid-template-columns:minmax(0,1fr); }
}

/* Portfolio pool: row checkboxes, floating selection bar, analysis panel */
.screener-table .cell-select{ width:34px; text-align:center; padding-left:14px; }
/* Sized up from 16x16 to the 24x24px WCAG minimum directly (real touch-
   target audit finding) - a native checkbox's `appearance:auto` widget
   doesn't honor padding for its interactive/rendered box in Chromium, so
   the usual padding+negative-margin trick (verified live - padding was
   silently dropped) doesn't work here the way it does for text inputs. */
.portfolio-select-checkbox{
  width:24px; height:24px; margin:0; cursor:pointer; accent-color: var(--indigo); vertical-align:middle;
}
th.cell-select{ font-size:11px; color: rgba(255,255,255,0.3); }

.portfolio-bar{
  position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:60;
  display:flex; align-items:center; gap:18px; padding:12px 14px 12px 22px; border-radius:999px;
  background: var(--ink); border:1px solid var(--line); box-shadow: var(--shadow-lg);
}
.portfolio-bar-count{ font-size:13.5px; font-weight:700; color: var(--white); white-space:nowrap; }
.portfolio-bar .pill-btn.ghost{ color: var(--white); border-color: rgba(255,255,255,0.3); }
.portfolio-bar .pill-btn.ghost:hover{ border-color: var(--white); }
.portfolio-bar .pill-btn.primary{ background: var(--indigo); }
.portfolio-bar .pill-btn.primary:hover{ background: var(--indigo-dark); }
.portfolio-bar-actions{ display:flex; gap:8px; }
.portfolio-bar .pill-btn:disabled{ opacity:0.4; cursor:not-allowed; pointer-events:none; }

@media (max-width: 640px){
  .portfolio-bar{ left:12px; right:12px; bottom:14px; transform:none; width:auto; justify-content:space-between; }
}

/* Reserves space above the footer/page bottom while the fixed portfolio
   bar is showing, so it never floats on top of table content (e.g. the
   compare page's Market Cap row) that happens to end near the viewport
   bottom. */
body.has-portfolio-bar{ padding-bottom:96px; }

/* "Passes Everything" - the flagship, strictest list on the page, given its
   own gold-accented section so its visual weight matches its actual value
   rather than looking like one more filter chip on the generic universe
   table. */
.eyebrow-gold{ color: var(--warn-text); background: var(--gold-soft); }
.eyebrow-gold .dot{ background: var(--gold); }
.passes-everything-band{
  background: var(--gold-soft); border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  padding-top:40px; padding-bottom:40px;
}
.passes-everything-intro{ font-size:15px; color: var(--ink-soft); max-width:720px; margin:-10px 0 18px; line-height:1.55; }
.passes-everything-intro a{ color: var(--warn-text); font-weight:700; text-decoration:underline; }

/* Makes the funnel behind a short "Passes Everything" list legible at a
   glance - 199 tracked -> 20 clear the baseline -> 3 clear everything reads
   as "the bar is real," where a single small number on its own can read as
   "this tool is broken." */
.pe-funnel{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin:0 0 18px; }
.pe-funnel-step{
  font-size:13px; color: var(--ink-soft); white-space:nowrap;
  padding:6px 12px; border-radius: var(--radius-pill); background: var(--white); border:1px solid var(--line);
}
.pe-funnel-step b{ font-family:'Instrument Sans', sans-serif; font-weight:600; color: var(--ink); margin-right:3px; }
.pe-funnel-step--final{ background: var(--gold-soft); border-color: var(--gold); color: var(--warn-text); }
.pe-funnel-step--final b{ color: var(--warn-text); }
.pe-funnel-arrow{ color: var(--ink-soft); font-size:13px; }

.pe-trend{
  display:flex; align-items:center; gap:12px; margin:0 0 16px; padding:10px 14px;
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-sm);
  max-width:fit-content; color: var(--warn-text);
}
.pe-trend-spark{ width:64px; height:22px; flex:none; }
.pe-trend-text{ font-size:13px; color: var(--ink-soft); }
.pe-trend-text strong{ color: var(--ink); font-family:'Instrument Sans', sans-serif; font-size:15px; }
.pe-trend-delta.pos{ color: var(--pos-text); font-weight:700; }
.pe-trend-delta.neg{ color: var(--neg-text); font-weight:700; }

.list-legend{ font-size:12.5px; color: var(--ink-soft); margin:10px 0 16px; }
.list-legend a{ color: var(--indigo-dark); font-weight:600; text-decoration:underline; }
.universe-legend-row{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.universe-legend-row .list-legend{ margin:0 0 16px; }
.universe-legend-row .pill-btn{ margin-bottom:16px; white-space:nowrap; }

/* "Why Now" feed - a distinct signal band (indigo, not gold like Passes
   Everything) so it reads as a different KIND of information (timing/
   recency) rather than another quality tier. Theme-aware, unlike the DCF
   calculator/Stock Compare bands - this is a plain content section, not a
   heavy interactive tool that needs a fixed dark "workspace" feel. */
.why-now-band{
  background: var(--indigo-soft); border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  padding-top:40px; padding-bottom:40px;
}
.why-now-meta{
  font-size:14px; color: var(--ink-soft); margin:-10px 0 22px; padding:12px 16px;
  background: var(--white); border-radius: var(--radius-sm); display:inline-block;
}
.why-now-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:18px; align-items:start; }
.why-now-col{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md); padding:20px;
}
.why-now-col h3{ font-family:'Instrument Sans', sans-serif; font-size:16px; font-weight:600; margin:0 0 6px; }
.why-now-col-sub{ font-size:12.5px; color: var(--ink-soft); line-height:1.5; margin:0 0 14px; }
.why-now-list{
  display:flex; flex-direction:column; gap:2px; max-height:360px; overflow-y:auto;
}
.why-now-list::-webkit-scrollbar{ width:7px; }
.why-now-list::-webkit-scrollbar-track{ background:transparent; }
.why-now-list::-webkit-scrollbar-thumb{ background: var(--line); border-radius:999px; }
.why-now-list::-webkit-scrollbar-thumb:hover{ background: var(--ink-soft); }
.why-now-list .empty-row{ font-size:13px; color: var(--ink-soft); padding:8px 0; margin:0; }
.why-now-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 4px; border-top:1px solid var(--line); cursor:pointer; border-radius:8px;
  transition: background .15s ease;
}
.why-now-row:first-child{ border-top:none; }
.why-now-row:hover, .why-now-row:focus-visible{ background: var(--cream-2); outline:none; }
.why-now-row-id{ display:flex; align-items:center; gap:8px; min-width:0; }
.why-now-row-name{ font-size:12px; color: var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; }
.why-now-row-val{ font-size:13px; font-weight:700; text-align:right; white-space:nowrap; font-variant-numeric: tabular-nums; }
.why-now-sub{ display:block; font-size:11px; font-weight:400; color: var(--ink-soft); }
.why-now-footnote{ font-size:11.5px; color: var(--ink-soft); line-height:1.6; margin-top:20px; max-width:760px; }

@media (max-width: 1080px){
  .why-now-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .why-now-grid{ grid-template-columns:minmax(0,1fr); }
}

/* Today's Shortlist - the single synthesized answer, gold like Passes
   Everything (same underlying list, same quality tier) rather than indigo
   like Why Now (a different kind of information: timing, not quality). */
.shortlist-band{
  background: var(--gold-soft); border-bottom:1px solid var(--line);
  padding-top:56px; padding-bottom:40px;
}
.shortlist-meta{
  font-size:14px; color: var(--warn-text); margin:-10px 0 22px; padding:12px 16px;
  background: var(--white); border-radius: var(--radius-sm); display:inline-block;
}
.shortlist-grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; align-items:stretch; }
.shortlist-card{
  position:relative; background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md);
  padding:22px 20px 20px; cursor:pointer; transition: transform .15s ease, box-shadow .15s ease;
  display:flex; flex-direction:column; gap:10px;
}
.shortlist-card:hover, .shortlist-card:focus-visible{ transform: translateY(-3px); box-shadow: var(--shadow-md); outline:none; }
.shortlist-rank{
  position:absolute; top:-12px; left:18px; width:28px; height:28px; border-radius:50%;
  background: var(--gold); color:#3D2E00; font-weight:800; font-size:13px;
  display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-sm);
}
.shortlist-head{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.shortlist-head .cell-ticker{ font-family:'Instrument Sans', sans-serif; font-size:19px; font-weight:700; }
.shortlist-head .portfolio-select-checkbox{ margin-left:auto; }
.shortlist-company{ font-size:12.5px; color: var(--ink-soft); margin-top:-6px; }
.shortlist-margin{
  font-family:'Instrument Sans', sans-serif; font-size:28px; font-weight:600; color: var(--pos-text);
  display:flex; align-items:baseline; gap:8px;
}
.shortlist-margin span{ font-family:'Instrument Sans', sans-serif; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color: var(--ink-soft); }
.shortlist-price{ font-size:13px; font-weight:700; }
.shortlist-price-sub{ font-weight:400; color: var(--ink-soft); text-transform:none; }
.shortlist-badges{ display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.shortlist-badge{
  font-size:11px; font-weight:700; padding:4px 9px; border-radius: var(--radius-pill);
  background: var(--cream-2); color: var(--ink-soft);
}
.shortlist-badge.pass{ background: var(--mint-soft); color: var(--pos-text); }
.shortlist-badge.gold{ background: var(--gold-soft); color: var(--warn-text); }
.shortlist-badge.new{ background: var(--indigo-soft); color: var(--indigo-dark); }
.shortlist-footnote{ font-size:11.5px; color: var(--ink-soft); line-height:1.6; margin-top:22px; max-width:760px; }
.shortlist-footnote a{ color: var(--indigo-dark); font-weight:600; }

@media (max-width: 880px){
  .shortlist-grid{ grid-template-columns:minmax(0,1fr); }
}

/* ---------------- Watchlist dashboard cards ---------------- */
.wl-cards{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:18px; margin-bottom:12px; }
.wl-card{
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-md);
  padding:20px; display:flex; flex-direction:column; min-height:220px;
}
.wl-card-head{ margin-bottom:14px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.wl-card-head h3{ font-family:'Instrument Sans', sans-serif; font-size:15px; font-weight:600; margin:0 0 3px; color: var(--ink); }
.wl-card-head p{ font-size:12px; color: var(--ink-soft); margin:0; }
.wl-card-head--pos h3{ color: var(--pos-text); }
.wl-card-head--neg h3{ color: var(--neg-text); }
.wl-card-period{ font-size:11px; font-weight:800; letter-spacing:.03em; color: var(--ink-soft); background: var(--cream-2); padding:2px 8px; border-radius: var(--radius-pill); margin-left:6px; vertical-align:middle; }

.wl-card-stats{ display:flex; gap:20px; margin-bottom:14px; }
.wl-stat{ display:flex; flex-direction:column; gap:2px; }
.wl-stat-lbl{ font-size:11px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; color: var(--ink-soft); }
.wl-stat-val{ font-family:'Instrument Sans', sans-serif; font-size:20px; font-weight:600; color: var(--indigo-dark); }

.wl-card-empty{ font-size:12.5px; color: var(--ink-soft); margin:auto 0; text-align:center; }

.wl-opp-list{
  display:flex; flex-direction:column; gap:8px; flex:1; max-height:280px; overflow-y:auto;
}
.wl-opp-list::-webkit-scrollbar{ width:6px; }
.wl-opp-list::-webkit-scrollbar-track{ background:transparent; }
.wl-opp-list::-webkit-scrollbar-thumb{ background: var(--line); border-radius:999px; }
.wl-opp-list::-webkit-scrollbar-thumb:hover{ background: var(--ink-soft); }
.wl-opp-row{
  display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border-radius:9px;
  background: var(--cream); cursor:pointer; transition: background .15s ease;
}
.wl-opp-row:hover{ background: var(--indigo-soft); }
.wl-opp-ticker{ font-weight:800; font-size:13px; }
.wl-opp-margin{ font-family:'Instrument Sans', sans-serif; font-weight:600; font-size:14px; }
.wl-opp-margin.pos{ color: var(--pos-text); }
.wl-opp-margin.neg{ color: var(--neg-text); }

.wl-bar-row{ display:flex; align-items:flex-end; justify-content:space-around; gap:10px; height:150px; flex:1; }
.wl-bar-col{ display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:6px; height:100%; flex:1; min-width:0; cursor:pointer; }
.wl-bar-pct{ font-size:11px; font-weight:800; white-space:nowrap; }
.wl-bar-pct.pos{ color: var(--pos-text); }
.wl-bar-pct.neg{ color: var(--neg-text); }
.wl-bar-track{ width:100%; max-width:28px; height:100%; display:flex; align-items:flex-end; }
.wl-bar-fill{ width:100%; border-radius:6px 6px 0 0; transition: height .5s cubic-bezier(.16,1,.3,1); }
.wl-bar-fill.pos{ background: linear-gradient(180deg, var(--pos-strong), var(--pos-text)); }
.wl-bar-fill.neg{ background: linear-gradient(180deg, #FF8A75, var(--neg-text)); }
.wl-bar-ticker{ font-size:11px; font-weight:700; color: var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }

.wl-cards-note{ font-size:11.5px; color: var(--ink-soft); line-height:1.5; margin:0 0 24px; }

.wl-target-cell{ display:flex; align-items:center; gap:8px; }
.wl-target-input{
  width:88px; padding:6px 9px; border:1px solid var(--line); border-radius:8px; font-size:12.5px;
  background: var(--white); color: var(--ink); font-family:inherit;
}
.wl-buyzone-badge{
  font-size:11px; font-weight:700; color: var(--pos-text); background: var(--mint-soft);
  padding:3px 8px; border-radius: var(--radius-pill); white-space:nowrap;
}

.wl-held-cell{ display:flex; flex-direction:column; gap:6px; }
.wl-held-toggle{ display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color: var(--ink-soft); cursor:pointer; white-space:nowrap; }
.wl-held-entry{ display:flex; gap:6px; }
.wl-entry-price-input{
  width:72px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; font-size:12px;
  background: var(--white); color: var(--ink); font-family:inherit;
}
.wl-entry-date-input{
  width:126px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; font-size:12px;
  background: var(--white); color: var(--ink); font-family:inherit;
}
.wl-pnl{ display:block; font-size:11px; font-weight:700; margin-top:4px; font-variant-numeric: tabular-nums; }
.wl-pnl.pos{ color: var(--pos-text); }
.wl-pnl.neg{ color: var(--neg-text); }

@media (max-width: 1180px){
  .wl-cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px){
  .wl-cards{ grid-template-columns:minmax(0,1fr); }
}

/* ---------------- Insider Buying Tracker ---------------- */
/* Same theme-invariant dark surface + row-list primitives as .floor-band
   (.floor-rank/.floor-id/.floor-pct), same reuse pattern as .mos-row. */
.insider-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #1F3D2E 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.insider-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.insider-orb-1{ width:420px; height:420px; background:#2fd678; opacity:0.18; top:-160px; right:-110px; }
.insider-orb-2{ width:320px; height:320px; background:#8B7FFF; opacity:0.12; bottom:-150px; left:-90px; }

.insider-list{ position:relative; z-index:1; border-top:1px solid rgba(255,255,255,0.1); }
.insider-row{
  display:grid; grid-template-columns: 64px 1fr 2fr auto; align-items:center; gap:28px;
  padding:22px 0; border-bottom:1px solid rgba(255,255,255,0.08); cursor:pointer;
  opacity:0; transform:translateY(10px); animation: floorRowIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
.insider-row:hover, .insider-row:focus-visible{ background: rgba(255,255,255,0.025); outline:none; }
.insider-detail{ display:flex; flex-direction:column; gap:4px; }
.insider-buyers{ font-size:12.5px; color: rgba(255,255,255,0.6); line-height:1.5; }
.insider-buyers strong{ color:#fff; }
.insider-meta{ font-size:11px; color: rgba(255,255,255,0.4); }
.insider-pct{ text-align:right; min-width:110px; }
.insider-pct-val{
  display:block; font-family:'Instrument Sans', sans-serif; font-size:26px; font-weight:600;
  color:#2fd678; font-variant-numeric: tabular-nums;
}
.insider-pct-lbl{ font-size:11px; color: rgba(255,255,255,0.4); text-transform:uppercase; letter-spacing:.04em; }

@media (max-width: 720px){
  .insider-band{ padding:56px 0 48px; }
  .insider-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "detail detail" "pct pct";
  }
  .insider-row .floor-rank{ grid-area:rank; font-size:22px; }
  .insider-row .floor-id{ grid-area:id; }
  .insider-row .insider-detail{ grid-area:detail; }
  .insider-row .insider-pct{ grid-area:pct; text-align:left; }
}

/* ---------------- Dividend & Income Screener ---------------- */
.dividend-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 15% -10%, #3D3117 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.dividend-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.dividend-orb-1{ width:420px; height:420px; background:#FFC257; opacity:0.16; top:-160px; left:-110px; }
.dividend-orb-2{ width:320px; height:320px; background:#2fd678; opacity:0.12; bottom:-150px; right:-90px; }

.dividend-list{ position:relative; z-index:1; border-top:1px solid rgba(255,255,255,0.1); }
.dividend-row{
  display:grid; grid-template-columns: 64px 1fr 2fr auto; align-items:center; gap:28px;
  padding:22px 0; border-bottom:1px solid rgba(255,255,255,0.08); cursor:pointer;
  opacity:0; transform:translateY(10px); animation: floorRowIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
.dividend-row:hover, .dividend-row:focus-visible{ background: rgba(255,255,255,0.025); outline:none; }
.dividend-detail{ display:flex; flex-direction:column; gap:6px; }
.dividend-payout-track{ height:5px; border-radius:999px; background: rgba(255,255,255,0.1); overflow:hidden; max-width:220px; }
.dividend-payout-fill{ height:100%; border-radius:999px; background: linear-gradient(90deg, #2fd678, #FFC257); transition: width 1s cubic-bezier(.16,1,.3,1); }
.dividend-payout-fill.risky{ background: linear-gradient(90deg, #FFC257, var(--neg-strong)); }
.dividend-detail-labels{ font-size:11px; color: rgba(255,255,255,0.5); }
.dividend-detail-labels .risky{ color:#FF8A75; font-weight:700; }
.dividend-pct{ text-align:right; min-width:96px; }
.dividend-pct-val{
  display:block; font-family:'Instrument Sans', sans-serif; font-size:26px; font-weight:600;
  color:#FFC257; font-variant-numeric: tabular-nums;
}
.dividend-pct-lbl{ font-size:11px; color: rgba(255,255,255,0.4); text-transform:uppercase; letter-spacing:.04em; }

@media (max-width: 720px){
  .dividend-band{ padding:56px 0 48px; }
  .dividend-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "detail detail" "pct pct";
  }
  .dividend-row .floor-rank{ grid-area:rank; font-size:22px; }
  .dividend-row .floor-id{ grid-area:id; }
  .dividend-row .dividend-detail{ grid-area:detail; }
  .dividend-row .dividend-pct{ grid-area:pct; text-align:left; }
}

/* ---------------- Dividend Reinvestment (DRIP) Calculator ---------------- */
.drp-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #17332C 0%, #16241F 45%, #0B0E0D 100%);
}
.drp-band .dcf-head p a{ color:#fff; text-decoration:underline; text-decoration-color:rgba(255,255,255,0.45); text-underline-offset:3px; }
.drp-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.drp-orb-1{ width:420px; height:420px; background:#2fd678; opacity:0.18; top:-160px; right:-110px; }
.drp-orb-2{ width:320px; height:320px; background:#FFC257; opacity:0.12; bottom:-150px; left:-90px; }

.drp-layout{ position:relative; z-index:1; display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:28px; align-items:start; margin-bottom:28px; }
.drp-controls{
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:26px; display:flex; flex-direction:column; gap:18px;
}
.drp-ticker-note{ font-size:11.5px; color: rgba(255,255,255,0.5); line-height:1.55; margin:-8px 0 0; padding:10px 12px; background: rgba(47,214,120,0.08); border:1px solid rgba(47,214,120,0.2); border-radius:10px; }

.drp-field-grid{ display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap:14px; }
.drp-field label{ display:block; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.5); margin-bottom:6px; }
.drp-input-prefix, .drp-input-suffix{
  display:flex; align-items:center; border-radius:10px; border:1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  overflow:hidden;
}
.drp-input-prefix:focus-within, .drp-input-suffix:focus-within{ border-color:#2fd678; background: rgba(255,255,255,0.08); }
.drp-input-prefix span, .drp-input-suffix span{ padding:0 10px; font-size:13px; color: rgba(255,255,255,0.45); flex:none; }
.drp-input-prefix input, .drp-input-suffix input{ border:none; background:none; flex:1; min-width:0; }
.drp-input-prefix input{ padding-left:2px; }
.drp-input-suffix input{ padding-right:2px; }
.drp-tax-note{ font-size:11.5px; color: rgba(255,255,255,0.4); line-height:1.55; margin:10px 0 0; }

.drp-headline{ display:flex; flex-direction:column; gap:16px; }
.drp-stat{
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:16px; padding:18px 20px;
  display:flex; flex-direction:column; gap:4px;
}
.drp-stat--big .drp-stat-val{ font-size:38px; }
.drp-stat-lbl{ font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color: rgba(255,255,255,0.5); }
.drp-stat-val{ font-family:'Instrument Sans', sans-serif; font-size:22px; font-weight:700; color:#fff; }
.drp-stat-val.pos{ color:var(--pos-strong); }
.drp-stat-val.neg{ color:#FF8A75; }
.drp-stat-sub{ font-size:12px; color: rgba(255,255,255,0.4); }
.drp-stat-row{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; }
.drp-stat-row .drp-stat{ padding:14px 16px; }
.drp-stat-row .drp-stat-val{ font-size:17px; }

.drp-erosion-card{
  background: rgba(255,216,116,0.08); border:1px solid rgba(255,216,116,0.3); border-radius:16px; padding:18px 20px;
}
.drp-erosion-lbl{ display:block; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--gold-bright); margin-bottom:6px; }
.drp-erosion-val{ font-family:'Instrument Sans', sans-serif; font-size:26px; font-weight:700; color:var(--gold-bright); }
.drp-erosion-pct{ font-family:'Instrument Sans', sans-serif; font-size:13px; font-weight:600; color: rgba(255,216,116,0.7); }
.drp-erosion-note{ font-size:12px; color: rgba(255,255,255,0.6); line-height:1.6; margin:10px 0 0; }

.drp-chart-card{
  position:relative; z-index:1; background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:20px;
  padding:26px; margin-bottom:24px;
}
.drp-chart-head{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.drp-chart-head h3{ font-family:'Instrument Sans', sans-serif; font-size:16px; font-weight:600; margin:0; color:#fff; }
.drp-legend{ display:flex; gap:16px; flex-wrap:wrap; font-size:11.5px; color: rgba(255,255,255,0.65); }
.drp-legend-swatch{ display:inline-block; width:14px; height:3px; border-radius:2px; margin-right:6px; vertical-align:middle; }
.drp-legend-swatch--dashed{ background:none !important; border-top:2px dashed; width:14px; height:0; }
.drp-chart-svg{ width:100%; height:auto; display:block; }

.drp-table-details{ position:relative; z-index:1; }
.drp-table-details summary{
  cursor:pointer; font-family:'Instrument Sans', sans-serif; font-size:15px; font-weight:600; color:#fff;
  padding:14px 0; border-top:1px solid rgba(255,255,255,0.1); border-bottom:1px solid rgba(255,255,255,0.1);
  list-style:none;
}
.drp-table-details summary::-webkit-details-marker{ display:none; }
.drp-table-details summary::before{ content:"+ "; color: rgba(255,255,255,0.5); }
.drp-table-details[open] summary::before{ content:"\2212 "; }
.drp-table{ margin-top:16px; min-width:720px; color:#fff; }
.drp-table thead th{ color: rgba(255,255,255,0.5); border-bottom-color: rgba(255,255,255,0.1); }
.drp-table tbody td{ border-bottom-color: rgba(255,255,255,0.06); font-variant-numeric: tabular-nums; }
.drp-table tbody tr:hover{ background: rgba(255,255,255,0.03); }
.drp-table tbody td.pos{ color:var(--pos-strong); font-weight:700; }
.drp-table tbody td.drp-erosion-cell{ color:var(--gold-bright); }

@media (max-width: 860px){
  .drp-layout{ grid-template-columns:minmax(0,1fr); }
  .drp-field-grid{ grid-template-columns:minmax(0,1fr); }
  .drp-stat-row{ grid-template-columns:minmax(0,1fr); }
}

/* ---------------- Earnings Calendar & Surprise Track Record ---------------- */
.earnings-band{
  position:relative; overflow:hidden; margin:0;
  padding:76px 0 60px; color:#fff;
  background: radial-gradient(140% 160% at 85% -10%, #1F2A45 0%, var(--band-mid) 45%, var(--band-dark) 100%);
}
.earnings-orb{ position:absolute; border-radius:50%; filter:blur(90px); pointer-events:none; }
.earnings-orb-1{ width:420px; height:420px; background:#8B7FFF; opacity:0.18; top:-160px; right:-110px; }
.earnings-orb-2{ width:320px; height:320px; background:var(--neg-strong); opacity:0.12; bottom:-150px; left:-90px; }

.earnings-list{ position:relative; z-index:1; border-top:1px solid rgba(255,255,255,0.1); }
.earnings-row{
  display:grid; grid-template-columns: 64px 1fr 2fr auto; align-items:center; gap:28px;
  padding:22px 0; border-bottom:1px solid rgba(255,255,255,0.08); cursor:pointer;
  opacity:0; transform:translateY(10px); animation: floorRowIn .5s cubic-bezier(.16,1,.3,1) forwards;
}
.earnings-row:hover, .earnings-row:focus-visible{ background: rgba(255,255,255,0.025); outline:none; }
.earnings-detail{ display:flex; flex-direction:column; gap:6px; }
.earnings-meta{ font-size:12px; color: rgba(255,255,255,0.55); }
.earnings-hour-badge{
  display:inline-block; font-size:11px; font-weight:800; letter-spacing:.03em; text-transform:uppercase;
  padding:2px 7px; border-radius:999px; background: rgba(139,127,255,0.18); color:#B8ADFF; margin-left:6px;
}
.earnings-surprise-track{ display:flex; gap:4px; align-items:center; }
.earnings-surprise-dot{ width:9px; height:9px; border-radius:50%; background: rgba(255,255,255,0.15); }
.earnings-surprise-dot.beat{ background:#2fd678; }
.earnings-surprise-dot.miss{ background:var(--neg-strong); }
.earnings-surprise-lbl{ font-size:11px; color: rgba(255,255,255,0.4); margin-left:4px; }
.earnings-pct{ text-align:right; min-width:110px; }
.earnings-pct-val{
  display:block; font-family:'Instrument Sans', sans-serif; font-size:24px; font-weight:600;
  color:#fff; font-variant-numeric: tabular-nums;
}
.earnings-pct-val.soon{ color:#FFC257; }
.earnings-pct-lbl{ font-size:11px; color: rgba(255,255,255,0.4); text-transform:uppercase; letter-spacing:.04em; }

@media (max-width: 720px){
  .earnings-band{ padding:56px 0 48px; }
  .earnings-row{
    grid-template-columns: 36px 1fr; column-gap:16px; row-gap:12px;
    grid-template-areas: "rank id" "detail detail" "pct pct";
  }
  .earnings-row .floor-rank{ grid-area:rank; font-size:22px; }
  .earnings-row .floor-id{ grid-area:id; }
  .earnings-row .earnings-detail{ grid-area:detail; }
  .earnings-row .earnings-pct{ grid-area:pct; text-align:left; }
}

/* ---- Themed scrollbars: Firefox only ----
   Chromium (and Safari) ignore ::-webkit-scrollbar the moment scrollbar-width / scrollbar-color
   are set on the same element, and on Windows then draw the NATIVE scrollbar - recoloured, but
   still with its arrow buttons (the chunky left/right/up arrows). So those two properties live here,
   behind a test that only Firefox fails; everywhere else the thin ::-webkit-scrollbar rules above apply. */
@supports not selector(::-webkit-scrollbar){
  .dcf-ticker-results, .compare-table-wrap{ scrollbar-width: thin; scrollbar-color: rgba(139,127,255,0.5) transparent; }
  .why-now-list,
  .wl-opp-list{ scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
}

/* Phone pass (2026-10-17): the tools were drawn for a mouse. */
@media (max-width: 720px){
  .watch-star{ padding:14px; margin:-14px -14px -14px -6px; }
  .floor-more, .backtest-toggle-btn{ min-height:44px; }
  .drc-capm-use{ min-height:44px; padding:0 14px; }
  .dcf-reset-btn{ min-height:44px; padding:0 12px; display:inline-flex; align-items:center; }
  .dcf-knob input[type="range"]{ box-sizing:content-box; padding:20px 0; background-clip:content-box; }
}

/* A long value (the lens summary row: "1 of 4 · misses capital-light (n/a), real profit (n/a), ...") wrapped instead of running out of a phone-width card. */

