/* ==========================================================================
   THE FREEPORT INDEX — orphan research section
   Minimalist. Chrome (site-header / site-footer) is the real main-site chrome,
   styled by research.css. This file styles only the #fx-root content, on the
   site's dark canvas (#030810) with Space Grotesk / Raleway / blue accent.
   ========================================================================== */

:root {
  --fx-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fx-bg:   #030810;
  --fx-fg:   var(--fp-on-dark);           /* #f7f5f1 */
  --fx-fg-2: var(--fp-on-dark-2);          /* 66% */
  --fx-fg-3: var(--fp-on-dark-3);          /* 42% */
  --fx-accent-txt: #6aa8ff;
  --fx-rule: rgba(247,245,241,.11);
}

.fx-page { background: var(--fx-bg); color: var(--fx-fg); font-family: var(--fp-font-body); }

/* clear the fixed header (~90px). Just enough, no viewport-relative void. */
.fx-page > main { padding-top: 5.25rem; }
@media (max-width: 760px) { .fx-page > main { padding-top: 4rem; } }

.fx-wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.75rem); }
.fx-narrow { max-width: 680px; }

/* ---------------------------------------------------------------- eyebrow */
.fx-eyebrow {
  font-family: var(--fp-font-display); font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--fx-accent-txt); margin: 0 0 1.1rem;
}

/* ------------------------------------------------------------------- chart */
.fx-chart { }
.fx-chart__head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.2rem; }
.fx-chart__head .fx-eyebrow { margin: 0; }
.fx-bignum { display: flex; align-items: baseline; gap: .8rem; }
.fx-bignum__v { font-family: var(--fp-font-display); font-weight: 600; font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem); letter-spacing: -.03em; line-height: .9; color: var(--fx-fg); }
.fx-bignum__lbl { font-size: .82rem; line-height: 1.4; color: var(--fx-fg-3); }
.fx-spread { display: block; margin-top: .7rem; font-family: var(--fx-mono); font-size: .78rem; letter-spacing: .01em; color: var(--fx-fg-2); font-variant-numeric: tabular-nums; }
.fx-spread em { font-style: normal; color: var(--fx-fg-3); }

/* hero stat — name and return the SAME size; name in white, return tinted */
.fx-hero-stat { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; }
.fx-hero-stat__name, .fx-hero-stat__ret {
  font-family: var(--fp-font-display); font-weight: 600;
  font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.5rem); letter-spacing: -.02em; line-height: 1.05;
}
.fx-hero-stat__name { color: var(--fx-fg); }
.fx-hero-stat__ret { font-variant-numeric: tabular-nums; }
.fx-hero-stat__ret.up { color: #3ecf8e; }
.fx-hero-stat__ret.dn { color: #e0715c; }
.fx-hero-stat__cap { display: block; margin-top: .4rem; font-size: .8rem; color: var(--fx-fg-3); }

/* more-benchmarks toggle + grouped panel */
.fx-morebench {
  font-family: var(--fp-font-display); font-size: .74rem; font-weight: 600; cursor: pointer;
  color: var(--fx-fg-3); background: transparent; border: 1px dashed var(--fx-rule);
  border-radius: var(--fp-radius-pill, 999px); padding: .34rem .8rem;
  transition: color .15s ease, border-color .15s ease;
}
.fx-morebench:hover, .fx-morebench.is-on { color: var(--fx-fg); border-color: rgba(247,245,241,.32); }
.fx-morebench.is-on::after { content: ' ×'; }
.fx-bpanel { margin-top: 1rem; border: 1px solid var(--fx-rule); border-radius: 10px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .85rem; }
.fx-bpanel[hidden] { display: none; }
.fx-bpanel__grp { display: grid; grid-template-columns: 5.2rem 1fr; gap: .6rem; align-items: start; }
.fx-bpanel__gl { font-family: var(--fp-font-display); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fx-fg-3); padding-top: .3rem; }
.fx-bpanel__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.fx-bchip {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  font-family: var(--fp-font-display); font-size: .72rem; font-weight: 500; color: var(--fx-fg-3);
  background: transparent; border: 1px solid var(--fx-rule); border-radius: var(--fp-radius-pill, 999px);
  padding: .26rem .6rem; transition: color .15s ease, border-color .15s ease;
}
.fx-bchip__dot { width: 8px; height: 3px; border-radius: 2px; background: var(--c); opacity: .3; }
.fx-bchip:hover { color: var(--fx-fg-2); }
.fx-bchip.is-on { color: var(--fx-fg); border-color: rgba(247,245,241,.28); }
.fx-bchip.is-on .fx-bchip__dot { opacity: 1; }

/* timeline range slider — two overlaid handles over one track, rebases the chart */
.fx-range { position: relative; height: 34px; margin: .6rem 0 .2rem; }
.fx-range::before { content: ''; position: absolute; left: 8px; right: 8px; top: 15px; height: 3px; border-radius: 2px; background: rgba(247,245,241,.1); }
.fx-range input[type=range] { position: absolute; left: 0; right: 0; top: 6px; width: 100%; margin: 0; height: 22px; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; }
.fx-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 15px; height: 15px; border-radius: 50%; background: var(--fx-fg); border: 2px solid #030810; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: grab; }
.fx-range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 15px; height: 15px; border-radius: 50%; background: var(--fx-fg); border: 2px solid #030810; cursor: grab; }
.fx-range input[type=range]::-webkit-slider-thumb:active { cursor: grabbing; }
.fx-range__lbl { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-family: var(--fx-mono); font-size: .68rem; color: var(--fx-fg-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-chart__plot { position: relative; }
.fx-chart__svg { width: 100%; height: auto; display: block; }
.fx-chart__svg text { font-variant-numeric: tabular-nums; }
.fx-chart__read {
  position: absolute; top: -.2rem; transform: translateX(-50%); pointer-events: none; opacity: 0;
  display: flex; flex-direction: column; gap: .1rem; white-space: nowrap;
  font-family: var(--fx-mono); font-size: .72rem; background: rgba(3,8,16,.9); border: 1px solid var(--fx-rule);
  border-radius: 6px; padding: .5rem .6rem; transition: opacity .1s ease; z-index: 2;
}
.fx-chart__read.is-on { opacity: 1; }
.fx-read__date { color: var(--fx-fg); font-weight: 600; margin-bottom: .15rem; }
.fx-chart__ctrl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }
.fx-legend { display: flex; flex-wrap: wrap; gap: .5rem; }
.fx-lev { display: inline-flex; align-items: center; gap: .3rem; }
.fx-lev__btn {
  font-family: var(--fx-mono); font-size: .78rem; font-weight: 500; cursor: pointer;
  color: var(--fx-fg-3); background: transparent; border: 1px solid var(--fx-rule);
  border-radius: 6px; padding: .3rem .6rem; transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.fx-lev__btn.is-on { color: var(--fx-fg); border-color: rgba(247,245,241,.3); background: rgba(247,245,241,.05); }
.fx-lev__lbl { font-family: var(--fp-font-display); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-fg-3); margin-left: .3rem; }
.fx-leg {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  font-family: var(--fp-font-display); font-size: .78rem; font-weight: 600; color: var(--fx-fg-3);
  background: transparent; border: 1px solid var(--fx-rule); border-radius: var(--fp-radius-pill, 999px);
  padding: .34rem .8rem; transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.fx-leg__dot { width: 9px; height: 3px; border-radius: 2px; background: var(--c); opacity: .3; }
.fx-leg.is-on { color: var(--fx-fg); border-color: rgba(247,245,241,.28); }
.fx-leg.is-on .fx-leg__dot { opacity: 1; }
.fx-leg__val { font-family: var(--fx-mono); font-size: .72rem; color: var(--fx-fg-3); }
.fx-leg.is-on .fx-leg__val { color: var(--c); }
.fx-chart__note { margin: 1.1rem 0 0; font-size: .76rem; line-height: 1.5; color: var(--fx-fg-3); max-width: 72ch; }

/* ---------------------------------------------------------------- backtest */
.fx-bt-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 1.6rem; }
.fx-bt-preset { display: flex; align-items: center; gap: .5rem; }
.fx-bt-preset label { font-family: var(--fp-font-display); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fx-fg-3); }
.fx-page select, .fx-bt-w {
  font-family: var(--fp-font-display); font-size: .82rem; color: var(--fx-fg); background: rgba(247,245,241,.04);
  border: 1px solid var(--fx-rule); border-radius: 8px; padding: .4rem .6rem; cursor: pointer;
}
.fx-bt-editor { border: 1px solid var(--fx-rule); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1.6rem; }
.fx-bt-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 640px) { .fx-bt-legs { grid-template-columns: 1fr; } }
.fx-bt-leg__h { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--fp-font-display); font-weight: 600; font-size: .78rem; color: var(--fx-fg-2); padding-bottom: .5rem; margin-bottom: .5rem; border-bottom: 1px solid var(--fx-rule); }
.fx-bt-leg__h span { font-family: var(--fx-mono); font-size: .74rem; color: var(--fx-fg-3); font-variant-numeric: tabular-nums; }
.fx-bt-row { display: flex; align-items: center; gap: .5rem; padding: .28rem 0; }
.fx-bt-row__nm { flex: 1; font-size: .82rem; color: var(--fx-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-bt-w { width: 3.6rem; text-align: right; padding: .25rem .4rem; cursor: text; -moz-appearance: textfield; }
.fx-bt-w::-webkit-outer-spin-button, .fx-bt-w::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fx-bt-pct { font-family: var(--fx-mono); font-size: .72rem; color: var(--fx-fg-3); }
.fx-bt-side, .fx-bt-rm {
  width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: var(--fx-mono); font-size: .72rem; color: var(--fx-fg-3); background: transparent;
  border: 1px solid var(--fx-rule); border-radius: 6px; transition: color .15s ease, border-color .15s ease;
}
.fx-bt-side:hover, .fx-bt-rm:hover { color: var(--fx-fg); border-color: rgba(247,245,241,.3); }
.fx-bt-empty { font-size: .78rem; color: var(--fx-fg-3); font-style: italic; padding: .3rem 0; }
.fx-bt-add { display: flex; gap: .5rem; align-items: center; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--fx-rule); flex-wrap: wrap; }
.fx-bt-add select { min-width: 12rem; }
.fx-bt-add button {
  font-family: var(--fp-font-display); font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--fx-fg-2);
  background: transparent; border: 1px solid var(--fx-rule); border-radius: var(--fp-radius-pill, 999px); padding: .38rem .9rem;
  transition: color .15s ease, border-color .15s ease;
}
.fx-bt-add button:hover { color: var(--fx-fg); border-color: rgba(247,245,241,.3); }
#fx-bt-chart { margin-top: .5rem; }
.fx-metrics { margin-top: 1.6rem; }
.fx-metrics table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fx-metrics thead th { font-family: var(--fp-font-display); font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-fg-3); text-align: right; padding: 0 0 .6rem; border-bottom: 1px solid var(--fx-rule); }
.fx-metrics thead th:first-child { text-align: left; }
.fx-metrics tbody th { font-family: var(--fp-font-body); font-weight: 500; font-size: .84rem; color: var(--fx-fg-2); text-align: left; padding: .5rem 0; border-bottom: 1px solid rgba(247,245,241,.05); }
.fx-metrics tbody td { font-family: var(--fx-mono); font-size: .84rem; color: var(--fx-fg); text-align: right; padding: .5rem 0 .5rem 1.2rem; border-bottom: 1px solid rgba(247,245,241,.05); }
.fx-metrics tbody td.up { color: #3ecf8e; }
.fx-metrics tbody td.dn { color: #e0715c; }
/* search picker */
.fx-bt-searchwrap { position: relative; display: flex; gap: .5rem; align-items: center; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--fx-rule); }
.fx-bt-q { flex: 1; font-family: var(--fp-font-body); font-size: .88rem; color: var(--fx-fg); background: rgba(247,245,241,.04); border: 1px solid var(--fx-rule); border-radius: 8px; padding: .55rem .8rem; }
.fx-bt-q::placeholder { color: var(--fx-fg-3); }
.fx-bt-q:focus { outline: none; border-color: rgba(47,139,255,.5); }
.fx-browse-hd__btns { display: flex; gap: .5rem; }
#fx-bt-normalize, #fx-bt-clear { font-family: var(--fp-font-display); font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--fx-fg-2); background: transparent; border: 1px solid var(--fx-rule); border-radius: var(--fp-radius-pill, 999px); padding: .4rem .9rem; white-space: nowrap; }
#fx-bt-normalize:hover, #fx-bt-clear:hover { color: var(--fx-fg); border-color: rgba(247,245,241,.3); }
.fx-bt-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 320px; overflow-y: auto; background: #0a1420; border: 1px solid var(--fx-rule); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); padding: .3rem; }
.fx-bt-results[hidden] { display: none; }
.fx-bt-hit { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; cursor: pointer; background: transparent; border: 0; border-radius: 6px; padding: .5rem .6rem; }
.fx-bt-hit:hover { background: rgba(247,245,241,.06); }
.fx-bt-hit__id { font-family: var(--fx-mono); font-size: .8rem; font-weight: 600; color: var(--fx-fg); min-width: 5.5rem; }
.fx-bt-hit__nm { flex: 1; font-size: .82rem; color: var(--fx-fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-bt-hit__cat { font-family: var(--fp-font-display); font-size: .6rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-fg-3); }
.fx-bt-nohit { padding: .7rem .6rem; font-size: .82rem; color: var(--fx-fg-3); }
/* history presets + common-range note */
.fx-bt-hist { display: flex; align-items: center; gap: .4rem; margin: 1.2rem 0 .2rem; flex-wrap: wrap; }
.fx-bt-histbtn { font-family: var(--fx-mono); font-size: .74rem; cursor: pointer; color: var(--fx-fg-3); background: transparent; border: 1px solid var(--fx-rule); border-radius: 6px; padding: .28rem .6rem; }
.fx-bt-histbtn:hover { color: var(--fx-fg); border-color: rgba(247,245,241,.3); }

/* -------------------------------------------------------------------- hero */
.fx-hero { padding: clamp(1rem, 2vw, 1.6rem) 0 clamp(2rem, 5vw, 3.4rem); }
.fx-hero__title {
  font-family: var(--fp-font-display); font-weight: 600;
  font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4rem); line-height: 1.02; letter-spacing: -.03em;
  margin: 0; max-width: 18ch; color: var(--fx-fg); text-wrap: balance;
}
.fx-hero__title--theme { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); max-width: 22ch; }
.fx-hero__lede {
  font-size: clamp(1.05rem, .98rem + .4vw, 1.28rem); line-height: 1.55; color: var(--fx-fg-2);
  max-width: 58ch; margin: 1.5rem 0 0;
}

/* ------------------------------------------- what the index is (landing) */
.fx-explain__lede {
  font-size: clamp(1.12rem, 1rem + .55vw, 1.5rem); line-height: 1.55;
  color: var(--fx-fg); max-width: 64ch; margin: 0; text-wrap: pretty;
}
.fx-how {
  list-style: none; margin: 2.8rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.7rem 2.4rem;
}
.fx-how__step { display: flex; gap: 1rem; align-items: flex-start; }
.fx-how__n {
  font-family: var(--fx-mono); font-size: .95rem; font-weight: 600; line-height: 1.5;
  color: var(--fx-accent-txt); min-width: 1.5rem; padding-top: .1rem; font-variant-numeric: tabular-nums;
}
.fx-how__b { display: flex; flex-direction: column; gap: .35rem; }
.fx-how__t { font-family: var(--fp-font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; color: var(--fx-fg); }
.fx-how__d { font-size: .92rem; line-height: 1.55; color: var(--fx-fg-2); }
@media (max-width: 860px) { .fx-how { grid-template-columns: 1fr; gap: 1.4rem; } .fx-how__d { max-width: 52ch; } }

/* ---------------------------------------------- the ten themes (landing) */
.fx-themes { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.fx-list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--fx-rule);
}
.fx-theme {
  display: block; padding: 1.9rem 1.9rem 1.9rem 0;
  border-bottom: 1px solid var(--fx-rule); text-decoration: none; color: inherit;
  transition: background .16s ease;
}
.fx-theme:nth-child(odd) { border-right: 1px solid var(--fx-rule); padding-right: 2.4rem; }
.fx-theme:nth-child(even) { padding-left: 2.4rem; }
.fx-theme:hover { background: rgba(247,245,241,.025); }
.fx-theme__cat {
  display: block; font-family: var(--fp-font-display); font-size: .95rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fx-accent-txt); margin-bottom: .7rem;
}
.fx-theme__title {
  display: block; font-family: var(--fp-font-display); font-weight: 600;
  font-size: clamp(1.28rem, 1.1rem + .7vw, 1.6rem); line-height: 1.14; letter-spacing: -.02em;
  color: var(--fx-fg); transition: color .16s ease; text-wrap: balance;
}
.fx-theme:hover .fx-theme__title { color: var(--fx-accent-txt); }
.fx-theme__line { display: block; margin-top: .7rem; font-size: .95rem; line-height: 1.5; color: var(--fx-fg-2); max-width: 46ch; }
.fx-theme__ret { display: inline-flex; align-items: baseline; gap: .5rem; margin-top: .9rem; font-family: var(--fx-mono); font-size: 1.05rem; font-weight: 500; }
.fx-theme__ret.up { color: #3ecf8e; }
.fx-theme__ret.dn { color: #e0715c; }
.fx-theme__ret span { font-family: var(--fp-font-body); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-fg-3); }

.fx-foot { margin: 2.4rem 0 0; display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: baseline; justify-content: space-between; }
.fx-note { margin: 0; font-family: var(--fx-mono); font-size: .78rem; color: var(--fx-fg-3); }
.fx-foot__links { margin: 0; display: flex; gap: 1.4rem; }
.fx-foot__links a { font-family: var(--fp-font-display); font-size: .78rem; font-weight: 600; color: var(--fx-fg-3); text-decoration: none; }
.fx-foot__links a:hover { color: var(--fx-accent-txt); }

/* ----------------------------------------------------------------- sections */
.fx-section { padding: clamp(2.4rem, 5vw, 3.6rem) 0; border-top: 1px solid var(--fx-rule); }
.fx-section--last { padding-bottom: clamp(3rem, 7vw, 5rem); }
.fx-h2 { font-family: var(--fp-font-display); font-weight: 600; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); letter-spacing: -.02em; margin: 0 0 .6rem; color: var(--fx-fg); }
.fx-sub { color: var(--fx-fg-2); line-height: 1.55; margin: 0 0 1.8rem; max-width: 62ch; }

/* --------------------------------------------------------------- prose / story */
.fx-prose { max-width: 66ch; }
.fx-prose p { font-size: 1.1rem; line-height: 1.68; color: var(--fx-fg); margin: 0 0 1.15rem; }
.fx-prose p:last-child { margin-bottom: 0; }
.fx-prose strong { font-weight: 600; }
.fx-prose em { font-style: italic; }
.fx-prose a { color: var(--fx-accent-txt); text-decoration: none; border-bottom: 1px solid rgba(47,139,255,.4); }

.fx-whynow { margin: 2rem 0 0; padding-left: 1.2rem; border-left: 2px solid var(--fx-accent-txt); color: var(--fx-fg); line-height: 1.6; max-width: 62ch; }
.fx-whynow span { display: block; font-family: var(--fp-font-display); font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fx-fg-3); margin-bottom: .4rem; }

/* --------------------------------------------------------------- names */
.fx-namegrp { margin-bottom: 2rem; }
.fx-namegrp:last-child { margin-bottom: 0; }
.fx-namegrp__lbl { font-family: var(--fp-font-display); font-size: .68rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; margin-bottom: .2rem; }
.fx-namegrp__lbl span { font-family: var(--fx-mono); letter-spacing: 0; opacity: .6; margin-left: .2rem; }
.fx-namegrp__lbl.is-long { color: #3ecf8e; }
.fx-namegrp__lbl.is-short { color: #e0715c; }
.fx-namegrp__ret { font-family: var(--fx-mono); font-size: .8rem; font-weight: 500; letter-spacing: 0; margin-left: .6rem; }
.fx-namegrp__ret.up { color: #3ecf8e; }
.fx-namegrp__ret.dn { color: #e0715c; }
.fx-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border-top: 1px solid var(--fx-rule); }
.fx-name { padding: 1.1rem 0; border-bottom: 1px solid var(--fx-rule); }
.fx-name__id { display: flex; align-items: baseline; gap: .6rem; }
.fx-name__tkr { font-family: var(--fx-mono); font-size: .92rem; font-weight: 600; color: var(--fx-fg); }
.fx-name__co { font-size: .8rem; color: var(--fx-fg-3); }
.fx-name__wt { margin-left: auto; font-family: var(--fx-mono); font-size: .82rem; color: var(--fx-fg-2); font-variant-numeric: tabular-nums; }
.fx-name__role { margin-top: .45rem; font-size: .92rem; line-height: 1.5; color: var(--fx-fg-2); max-width: 42ch; }

/* the aggregate book (landing) — long / short columns with weights */
.fx-book { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2.6rem; }
@media (max-width: 640px) { .fx-book { grid-template-columns: 1fr; } }
.fx-book__h { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--fp-font-display); font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding-bottom: .5rem; margin-bottom: .3rem; border-bottom: 1px solid var(--fx-rule); }
.fx-book__h.is-long { color: #3ecf8e; } .fx-book__h.is-short { color: #e0715c; }
.fx-book__h span { font-family: var(--fx-mono); letter-spacing: 0; color: var(--fx-fg-3); }
.fx-book__row { display: flex; align-items: baseline; gap: .6rem; padding: .34rem 0; border-bottom: 1px solid rgba(247,245,241,.05); }
.fx-book__tk { font-family: var(--fx-mono); font-size: .82rem; font-weight: 600; color: var(--fx-fg); min-width: 4rem; }
.fx-book__nm { flex: 1; font-size: .82rem; color: var(--fx-fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-book__wt { font-family: var(--fx-mono); font-size: .82rem; color: var(--fx-fg-2); font-variant-numeric: tabular-nums; }
.fx-book__net { margin: 1.6rem 0 0; font-family: var(--fx-mono); font-size: .84rem; color: var(--fx-fg); font-variant-numeric: tabular-nums; }

/* index risk analytics grid */
.fx-riskgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 2rem; border-top: 1px solid var(--fx-rule); padding-top: 1.6rem; }
@media (max-width: 860px) { .fx-riskgrid { grid-template-columns: repeat(2, 1fr); } }
.fx-stat { display: flex; flex-direction: column; gap: .2rem; }
.fx-stat__v { font-family: var(--fp-font-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -.02em; color: var(--fx-fg); font-variant-numeric: tabular-nums; }
.fx-stat__l { font-size: .8rem; color: var(--fx-fg-3); }
/* keep column rhythm: give right column a gutter */
@media (min-width: 620px) {
  .fx-names { column-gap: 2.4rem; }
}
.fx-more { margin: 1.4rem 0 0; font-size: .85rem; color: var(--fx-fg-3); font-style: italic; }
.fx-watchline { margin: 1.5rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--fx-fg-3); }

/* --------------------------------------------------------------- risk / watch */
.fx-risk { font-size: 1.08rem; line-height: 1.62; color: var(--fx-fg); margin: 0; max-width: 62ch; }
.fx-watch { list-style: none; margin: 0; padding: 0; max-width: 62ch; }
.fx-watch li { padding: .8rem 0 .8rem 1.3rem; border-bottom: 1px solid var(--fx-rule); position: relative; color: var(--fx-fg-2); line-height: 1.55; }
.fx-watch li:last-child { border-bottom: 0; }
.fx-watch li::before { content: ""; position: absolute; left: 0; top: 1.25rem; width: 5px; height: 5px; border-radius: 50%; background: var(--fx-accent-txt); }

/* ------------------------------------------------------ theme source takes */
.fx-srclist { display: grid; gap: 0; border-top: 1px solid var(--fx-rule); }
.fx-src { padding: 1.1rem 0; border-bottom: 1px solid var(--fx-rule); }
.fx-src__hd { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.fx-src__who { font-family: var(--fp-font-display); font-weight: 600; font-size: .95rem; color: var(--fx-fg); }
.fx-src__pc { font-size: .8rem; color: var(--fx-fg-3); font-style: italic; }
.fx-src__take { margin: .45rem 0 0; line-height: 1.55; color: var(--fx-fg-2); max-width: 64ch; }
/* make the "who" a link when we have a source URL */
a.fx-src__who { text-decoration: none; border-bottom: 1px solid rgba(47,139,255,.35); transition: color .15s ease, border-color .15s ease; }
a.fx-src__who:hover { color: var(--fx-accent-txt); border-color: var(--fx-accent-txt); }

/* -------------------------------------------------- theme further reading */
.fx-reading { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fx-rule); }
.fx-read { border-bottom: 1px solid var(--fx-rule); }
.fx-read__lnk { display: flex; flex-direction: column; gap: .28rem; padding: 1rem 0; text-decoration: none; color: inherit; }
.fx-read__ttl { font-family: var(--fp-font-display); font-weight: 600; font-size: .98rem; line-height: 1.35; color: var(--fx-fg); transition: color .15s ease; }
.fx-read__ttl::after { content: " \2197"; font-family: var(--fx-mono); font-size: .78rem; color: var(--fx-fg-3); }
.fx-read__lnk:hover .fx-read__ttl { color: var(--fx-accent-txt); }
.fx-read__meta { font-size: .82rem; line-height: 1.5; color: var(--fx-fg-3); }
.fx-read__meta b { font-weight: 600; color: var(--fx-fg-2); }

/* thesis body flush-left under the one-paragraph summary */
.fx-thesis { margin-top: 1.6rem; }

/* further reading — merged research + external links, two columns, no sub-headings */
.fx-fr { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.6rem; border-top: 1px solid var(--fx-rule); padding-top: 1.6rem; }
.fx-fr__item { display: flex; flex-direction: column; gap: .32rem; }
.fx-fr__src { font-family: var(--fp-font-display); font-size: .62rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--fx-fg-3); }
.fx-fr__t { font-family: var(--fp-font-display); font-weight: 600; font-size: .98rem; line-height: 1.3; color: var(--fx-fg); text-decoration: none; }
a.fx-fr__t::after { content: " \2197"; font-family: var(--fx-mono); font-size: .74rem; color: var(--fx-fg-3); }
a.fx-fr__t:hover { color: var(--fx-accent-txt); }
.fx-fr__sum { margin: .1rem 0 0; font-size: .85rem; line-height: 1.55; color: var(--fx-fg-2); }
@media (max-width: 620px) { .fx-fr { grid-template-columns: 1fr; gap: 1.3rem; } }

/* --------------------------------------------------------------- sources */
/* core sources: two columns side by side, each a full paragraph */
.fx-srcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; border-top: 1px solid var(--fx-rule); padding-top: 1.9rem; }
@media (max-width: 720px) { .fx-srcgrid { grid-template-columns: 1fr; gap: 1.6rem; } }
.fx-source__name { font-family: var(--fp-font-display); font-size: 1.08rem; font-weight: 600; color: var(--fx-fg); text-decoration: none; }
.fx-source__name:hover { color: var(--fx-accent-txt); }
.fx-source__handle { font-family: var(--fx-mono); font-size: .78rem; color: var(--fx-fg-3); margin-left: .7rem; }
.fx-source__note { margin: .55rem 0 0; font-size: .92rem; line-height: 1.6; color: var(--fx-fg-2); max-width: 58ch; }

/* references by theme: theme label above each further-reading grid */
.fx-frt { margin-top: 2.7rem; }
.fx-frt:first-of-type { margin-top: .4rem; }
.fx-frt__cat { display: block; font-family: var(--fp-font-display); font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: .3rem; }
.fx-frt__t { font-family: var(--fp-font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; color: var(--fx-fg); margin: 0 0 1rem; }

/* ------------------------------------------- end-of-page section links */
/* Back link on the left, the section's other pages lower-right. */
.fx-endrow { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.fx-endrow .fx-back { margin-top: 0; }
.fx-xlinks { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-left: auto; }
.fx-xlinks a { font-family: var(--fp-font-display); font-size: .8rem; font-weight: 600; color: var(--fx-fg-3); text-decoration: none; transition: color .15s ease; }
.fx-xlinks a:hover { color: var(--fx-accent-txt); }

/* landing hero: Lite Index + Backtest links, lower right of the chart section */
.fx-herolinks { display: flex; justify-content: flex-end; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.fx-herolinks a { font-family: var(--fp-font-display); font-size: .8rem; font-weight: 600; color: var(--fx-fg-3); text-decoration: none; transition: color .15s ease; }
.fx-herolinks a:hover { color: var(--fx-accent-txt); }

/* landing: brief Sources / Methodology intros side by side, each with a button,
   sitting lower right of the hero chart section */
.fx-introcards { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 2.6rem; margin-top: 2.4rem; border-top: 1px solid var(--fx-rule); padding-top: 1.9rem; margin-left: auto; max-width: 760px; }
@media (max-width: 720px) { .fx-introcards { grid-template-columns: 1fr; max-width: none; } }
.fx-introcard { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.fx-introcard__t { font-family: var(--fp-font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; color: var(--fx-fg); margin: 0; }
.fx-introcard__p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--fx-fg-2); max-width: 52ch; }
.fx-btn {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .45rem;
  font-family: var(--fp-font-display); font-weight: 600; font-size: .82rem; color: var(--fx-accent-txt);
  text-decoration: none; border: 1px solid var(--fx-rule); border-radius: var(--fp-radius-pill, 999px);
  padding: .45rem 1rem; transition: border-color .15s ease, background .15s ease;
}
.fx-btn::after { content: " \2192"; }
.fx-btn:hover { border-color: var(--fx-accent-txt); background: rgba(47,139,255,.06); }

/* sources: closing note under the reader list */
.fx-srcnote { margin: 1.8rem 0 0; font-size: .85rem; line-height: 1.55; color: var(--fx-fg-3); }

/* methodology: an at-a-glance spec sheet above the prose */
.fx-spec { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2.8rem; margin: 0 0 2.6rem; border-top: 1px solid var(--fx-rule); }
.fx-spec__row { display: flex; gap: 1rem; justify-content: space-between; align-items: baseline; padding: .72rem 0; border-bottom: 1px solid rgba(247,245,241,.06); }
.fx-spec__k { font-family: var(--fp-font-display); font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-fg-3); white-space: nowrap; }
.fx-spec__v { font-size: .84rem; color: var(--fx-fg); text-align: right; }
@media (max-width: 620px) { .fx-spec { grid-template-columns: 1fr; } }

/* -------------------------------------------------- backtest: add positions */
.fx-bt-leg__h.is-long { color: #3ecf8e; }
.fx-bt-leg__h.is-short { color: #e0715c; }
.fx-bt-empty2 { padding: .5rem 0; font-size: .92rem; line-height: 1.55; color: var(--fx-fg-2); }
.fx-bt-hint { margin-top: 1.4rem; padding: 2.6rem 1.2rem; text-align: center; font-size: .9rem; color: var(--fx-fg-3); border: 1px dashed var(--fx-rule); border-radius: 12px; }

.fx-bt-browse-card { border: 1px solid var(--fx-rule); border-radius: 12px; padding: 1.1rem 1.2rem 1.2rem; margin-bottom: 1.6rem; }
.fx-browse-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.fx-browse-hd__t { font-family: var(--fp-font-display); font-weight: 600; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fx-fg-2); }
.fx-bt-browse-card .fx-bt-q { display: block; width: 100%; margin-bottom: .9rem; }
.fx-catpills { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.fx-catpill {
  font-family: var(--fp-font-display); font-size: .76rem; font-weight: 600; cursor: pointer;
  color: var(--fx-fg-3); background: transparent; border: 1px solid var(--fx-rule);
  border-radius: var(--fp-radius-pill, 999px); padding: .34rem .8rem;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.fx-catpill:hover { color: var(--fx-fg-2); }
.fx-catpill.is-on { color: var(--fx-fg); border-color: rgba(247,245,241,.3); background: rgba(247,245,241,.05); }
.fx-browse { max-height: 306px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 .8rem; }
.fx-browse__item {
  display: flex; align-items: baseline; gap: .55rem; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-radius: 6px; padding: .5rem .55rem; color: inherit;
  transition: background .12s ease;
}
.fx-browse__item:hover { background: rgba(247,245,241,.06); }
.fx-browse__id { font-family: var(--fx-mono); font-size: .8rem; font-weight: 600; color: var(--fx-fg); min-width: 4.4rem; }
.fx-browse__nm { flex: 1; font-size: .82rem; color: var(--fx-fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-browse__cat { font-family: var(--fp-font-display); font-size: .58rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-fg-3); white-space: nowrap; }
.fx-browse__add { font-family: var(--fx-mono); font-size: 1rem; line-height: 1; color: var(--fx-fg-3); opacity: 0; transition: opacity .12s ease, color .12s ease; }
.fx-browse__item:hover .fx-browse__add { opacity: 1; color: var(--fx-accent-txt); }
.fx-browse__more { grid-column: 1 / -1; padding: .7rem .55rem .1rem; font-size: .76rem; color: var(--fx-fg-3); font-style: italic; }

/* ---------------------------------------------------- lite index theme cards */
.fx-theme--static { cursor: default; }
.fx-theme--static:hover { background: transparent; }
.fx-theme--static:hover .fx-theme__title { color: var(--fx-fg); }
.fx-lite-pair { display: block; margin-top: .6rem; font-family: var(--fx-mono); font-size: .78rem; letter-spacing: .01em; color: var(--fx-fg-2); font-variant-numeric: tabular-nums; }
.fx-theme--static .fx-theme__line { max-width: none; }
.fx-theme--static .fx-theme__line + .fx-theme__line { margin-top: .55rem; }

/* --------------------------------------------------------------- back */
.fx-back {
  display: inline-block; margin-top: 2rem; font-family: var(--fp-font-display);
  font-size: .8rem; font-weight: 600; color: var(--fx-accent-txt); text-decoration: none;
}
.fx-back::before { content: "\2190  "; }
.fx-back:hover { text-decoration: underline; }

/* --------------------------------------------------------------- a11y + mobile */
:where(a, button, summary):focus-visible { outline: 2px solid var(--fx-accent-txt); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 620px) {
  .fx-list { grid-template-columns: 1fr; }
  .fx-theme, .fx-theme:nth-child(odd), .fx-theme:nth-child(even) { padding: 1.5rem 0; border-right: 0; }
  .fx-browse { grid-template-columns: 1fr; max-height: 280px; }
  .fx-catpills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fx-catpills::-webkit-scrollbar { display: none; }
  .fx-bt-head { flex-direction: column; align-items: flex-start; }
}
