/* ============================================================
   Sector Strength · styles.css  v19
   Self-contained (nav + footer included — no site.css dependency)
   Template: Options page design system
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-size:16px;scroll-behavior:smooth}

:root{
  --bg:#0b1220;
  --surface:rgba(255,255,255,.03);--surface2:rgba(255,255,255,.05);
  --border:#243246;--border2:#334155;
  --text:#e6edf3;--text-muted:#9fb2c9;--text-dim:#9fb2c9;
  --blue:#3b82f6;--blue2:#60a5fa;--blue3:#93c5fd;
  --green:#10b981;--green2:#34d399;
  --yellow:#f59e0b;--yellow2:#fbbf24;
  --red:#ef4444;--red2:#f87171;
  --purple:#8b5cf6;--purple2:#a78bfa;
  --font:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial,sans-serif;
  --font-humanist:'Nunito Sans','Segoe UI','Gill Sans',Arial,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,monospace;
}

body{background:var(--bg);color:var(--text);font-family:var(--font);line-height:1.5;min-height:100vh}
a{color:var(--blue2);text-decoration:none}
a:hover{color:var(--blue3)}

/* ================================================================
   NAV (self-contained)
   ================================================================ */
.site-nav{
  position:sticky;top:0;z-index:200;
  background:rgba(11,18,32,0.88);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  max-width:1200px;margin:0 auto;height:68px;padding:0 24px;
  display:flex;align-items:center;justify-content:space-between;
}
.nav-logo{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:700;color:var(--text);letter-spacing:.02em}
.nav-logo:hover{color:var(--text)}
.nav-logo-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;background:transparent;border-radius:8px;border:none;box-shadow:none}
.nav-logo-img{width:38px;height:38px;display:block}
.nav-logo-text{position:relative;top:0.5px}
.nav-links{display:flex;align-items:center;gap:6px}
.nav-links a{font-size:15px;font-weight:600;color:var(--text-muted);padding:8px 12px;border-radius:8px;transition:color .15s,background .15s}
.nav-links a:hover{color:var(--text);background:var(--surface)}
.nav-links a.active{color:var(--text)}
.nav-link-muted{opacity:.8}

.nav-toggle{display:none;align-items:center;justify-content:center;width:48px;height:44px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer}
.nav-toggle:hover{border-color:var(--border2);background:var(--surface2)}
.nav-toggle-bars{position:relative;display:block;width:18px;height:2px;background:currentColor;border-radius:2px}
.nav-toggle-bars::before,.nav-toggle-bars::after{content:"";position:absolute;left:0;width:18px;height:2px;background:currentColor;border-radius:2px}
.nav-toggle-bars::before{top:-6px}
.nav-toggle-bars::after{top:6px}
.nav-drawer{max-width:1200px;margin:0 auto;padding:10px 24px 14px;border-top:1px solid var(--border)}
.nav-drawer a{display:block;font-size:14px;padding:16px 14px;border-radius:12px;color:var(--text);font-weight:700}
.nav-drawer a:hover{background:var(--surface2)}

/* ================================================================
   PAGE SHELL
   ================================================================ */
.page{max-width:1200px;margin:0 auto;padding:32px 24px 110px}

/* ---- PAGE HEADER ---- */
.page-header{margin-bottom:36px}
.page-header-inner{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:24px;flex-wrap:wrap;padding-bottom:28px;
  border-bottom:1px solid var(--border);
}
.page-header-eyebrow{
  font-family:var(--mono);font-size:12px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--blue2);margin-bottom:10px;opacity:.8;
}
.page-header h1{
  font-family:var(--font-humanist);
  font-size:clamp(30px,4.2vw,48px);font-weight:800;
  color:var(--text);letter-spacing:-.02em;line-height:1.1;
}
.page-header p{font-size:16px;color:var(--text-muted);margin-top:8px;font-weight:500;max-width:560px}
.stat-row{display:flex;gap:24px;flex-shrink:0}
.stat{text-align:right}
.stat-val{font-family:var(--font-humanist);font-weight:800;font-size:26px;color:var(--text);line-height:1}
.stat-label{font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);margin-top:4px}

/* ================================================================
   TOOL CARDS
   ================================================================ */
.tool-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  padding:24px 24px 24px 28px;
  margin-bottom:16px;
  position:relative;overflow:hidden;
  box-shadow:0 4px 24px rgba(0,0,0,.22);
}
.tool-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;
  width:4px;
  background:linear-gradient(180deg,rgba(59,130,246,.95),rgba(59,130,246,.10));
}
.card-eyebrow{
  font-family:var(--mono);font-size:12px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--blue2);opacity:.8;margin-bottom:8px;
}
.tool-card h2{
  font-family:var(--font-humanist);font-size:20px;font-weight:700;
  color:var(--text);letter-spacing:-.015em;margin-bottom:6px;
}
.tool-card .desc{font-size:13.5px;color:var(--text-muted);margin-bottom:16px;line-height:1.5}

/* ================================================================
   CONTROLS ROW
   ================================================================ */
.controls-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.controls-row .label{
  font-family:var(--mono);font-size:11px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--text-muted);font-weight:600;
}
.status-text{font-size:12px;color:var(--text-muted)}

/* ================================================================
   CUSTOM TIMEFRAME DROPDOWN
   ================================================================ */
.tf-wrap{position:relative;display:inline-block;min-width:120px}
.tf-native{position:absolute;inset:0;opacity:0;pointer-events:none;width:1px;height:1px}
.tf-btn{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;min-width:120px;padding:8px 12px;border-radius:10px;
  background:rgba(255,255,255,.03);border:1px solid var(--border);
  color:var(--text);font-weight:700;font-size:13px;cursor:pointer;
  transition:background .15s,border-color .15s;
}
.tf-btn:hover{background:rgba(255,255,255,.05);border-color:var(--border2)}
.tf-caret{opacity:.65}
.tf-menu{
  position:absolute;top:calc(100% + 6px);left:0;min-width:100%;
  padding:6px;border-radius:12px;
  background:rgba(15,23,42,.98);border:1px solid var(--border);
  box-shadow:0 18px 45px rgba(0,0,0,.5);z-index:40;
}
.tf-opt{
  width:100%;text-align:left;padding:9px 10px;border-radius:8px;
  background:transparent;border:0;color:var(--text);
  font-weight:700;font-size:13px;cursor:pointer;
}
.tf-opt:hover{background:rgba(96,165,250,.12)}
.tf-opt[aria-selected="true"]{background:rgba(96,165,250,.18)}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:8px 14px;border-radius:8px;border:1px solid var(--border);
  background:var(--surface);color:var(--text);
  font-weight:600;font-size:12.5px;cursor:pointer;
  transition:background .15s,border-color .15s,transform .12s;
}
.btn:hover{background:var(--surface2);border-color:var(--border2)}
.btn:active{transform:translateY(1px)}
.btn-ghost{opacity:.85}

/* ================================================================
   PILL / BADGE
   ================================================================ */
.pill{
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 9px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);
  font-size:11px;font-family:var(--mono);color:rgba(255,255,255,.8);white-space:nowrap;line-height:1;
}
.pill.rk-on{background:rgba(245,158,11,.2);border-color:rgba(245,158,11,.4);color:rgba(255,246,224,.95)}
.pill.rk-mix{background:rgba(234,179,8,.18);border-color:rgba(234,179,8,.4);color:rgba(255,252,220,.95)}
.pill.rk-off{background:rgba(59,130,246,.18);border-color:rgba(59,130,246,.4);color:rgba(230,242,255,.95)}

/* ================================================================
   STRENGTH BARS
   ================================================================ */
.bars{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.barRow{display:grid;grid-template-columns:200px 1fr 68px;gap:12px;align-items:center}
.barLabel{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden}
.barLabel .sym{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;display:inline-block}
.barLabel .pill{flex:0 0 auto}
.barTrack{position:relative;height:8px;border-radius:999px;background:rgba(255,255,255,.05);overflow:hidden;border:1px solid rgba(255,255,255,.07)}
.barFill{position:absolute;top:0;bottom:0;border-radius:999px}
.barMid{position:absolute;top:-4px;bottom:-4px;left:50%;width:1px;background:rgba(255,255,255,.12)}
.barVal{font-family:var(--mono);font-size:13px;font-weight:600;text-align:right;color:var(--text)}

/* ================================================================
   SPREADS CHECKBOXES
   ================================================================ */
.checks-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px 16px;margin-bottom:16px}
.chk{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-muted);cursor:pointer;padding:4px 0}
.chk input[type=checkbox]{width:15px;height:15px;flex-shrink:0;accent-color:var(--blue2);cursor:pointer}
.chk:hover{color:var(--text)}

.chk .swatch{width:10px;height:10px;border-radius:2px;display:inline-block;flex-shrink:0;opacity:.95;box-shadow:0 0 0 1px rgba(255,255,255,.18) inset}
.chk input[type=checkbox]:not(:checked)+.swatch{opacity:.25}

/* ================================================================
   CANVAS
   ================================================================ */
canvas.plot{width:100%;height:260px;background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:12px;display:block}

/* ================================================================
   CACHE ROW
   ================================================================ */
.cache-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid var(--border);min-width:0}
.cache-label{font-size:11px;color:var(--text-muted);font-family:var(--mono)}

/* ================================================================
   HELP / DETAILS
   ================================================================ */
details.help{margin-top:16px;border:1px dashed rgba(36,50,70,.8);border-radius:12px;padding:12px 16px}
details.help[open]{background:rgba(255,255,255,.015)}
details.help summary{cursor:pointer;list-style:none;font-size:14px;font-weight:600;color:var(--text-muted);display:flex;align-items:center;gap:6px}
details.help summary::marker{display:none}
details.help summary::-webkit-details-marker{display:none}
details.help summary::before{content:"▸";font-size:10px;transition:transform .15s;display:inline-block}
details.help[open] summary::before{transform:rotate(90deg)}
details.help .help-body{margin-top:12px;font-size:14px;color:var(--text-muted);padding-left:4px}
details.help ul{margin:6px 0 0 18px;padding:0}
details.help li{margin:5px 0;line-height:1.5}

/* ================================================================
   DISCLAIMER
   ================================================================ */
.disclaimer{
  margin-top:32px;padding:14px 18px;border-radius:10px;
  background:rgba(245,158,11,.06);border:1px solid rgba(245,158,11,.18);
  font-size:12px;color:var(--text-muted);line-height:1.6;
}
.disclaimer strong{color:rgba(251,191,36,.9)}

/* ================================================================
   FOOTER
   ================================================================ */
footer{
  border-top:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;
  margin-top:72px;padding:28px 24px;
  max-width:1200px;margin-left:auto;margin-right:auto;
}
.footer-left{font-size:14px;color:var(--text-dim)}
.footer-left a{color:var(--text-muted)}
.footer-left a:hover{color:var(--text)}
.footer-right{font-family:var(--mono);font-size:11px;color:var(--text-dim);letter-spacing:.08em}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media(max-width:820px){
  .nav-links{display:none}
  .nav-toggle{display:flex}
  .page{padding:28px 16px 96px}
  .page-header-inner{flex-direction:column;align-items:flex-start}
  .stat-row{width:100%;justify-content:flex-start}
  .stat{text-align:left}
  .page-header h1{font-size:28px}
  footer{flex-direction:column;align-items:flex-start;gap:8px;padding:20px 16px}
}

@media(max-width:600px){
  .nav-inner{padding:0 16px}
  .tool-card{padding:18px 16px 18px 20px}
  .barRow{grid-template-columns:1fr 1fr 56px;gap:8px}
  .barLabel .sym{max-width:100%}
  .barVal{font-size:12px}
  .checks-grid{grid-template-columns:1fr 1fr}
  canvas.plot{height:200px}
}

@media(max-width:380px){
  .checks-grid{grid-template-columns:1fr}
}


@media(max-width:900px){
  .regime-metrics{grid-template-columns:repeat(2,minmax(180px,1fr));}
}

@media(max-width:640px){
  .regime-state{font-size:32px;}
  .rotation-callout-grid{grid-template-columns:1fr;}
  .rotation-item-wide{grid-column:auto;}
}

/* ── Global dropdown dark mode fix ──────────────────────────── */
select{color-scheme:dark}
select option{background:#0f1a2e;color:#e6edf3}

.cache-row .status-text{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cache-row .pill{flex-shrink:0;white-space:nowrap}
.cache-row .btn{flex-shrink:0}

/* ================================================================
   MARKET CYCLE / ROTATION STATE
   ================================================================ */

.regime-header-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 420px;
  align-items:start;
  gap:24px;
  margin-bottom:14px;
}
.regime-header-main{
  min-width:0;
  max-width:820px;
}
.regime-header-row h2{margin-bottom:0;}
.regime-desc{
  max-width:820px;
  margin-top:14px;
  margin-bottom:0;
}
.status-update-card-top{
  width:420px;
  margin-top:54px;
  justify-self:end;
}
.regime-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,420px);
  gap:18px;
  align-items:start;
  margin-bottom:16px;
}
.regime-main,
.regime-side{min-width:0;}
.regime-main{overflow:hidden;}
.mini-scorecard{
  width:100%;
  box-sizing:border-box;
}
.regime-main,
.mini-scorecard{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.025);
  border-radius:14px;
  padding:18px 18px 16px;
}
.regime-main{position:relative;padding-left:18px;}
.regime-card::before{width:5px;background:linear-gradient(180deg,rgba(16,185,129,.95),rgba(59,130,246,.18));}
.regime-card.tone-good::before{background:linear-gradient(180deg,rgba(16,185,129,.95),rgba(59,130,246,.18));}
.regime-card.tone-mixed::before{background:linear-gradient(180deg,rgba(245,158,11,.95),rgba(245,158,11,.22));}
.regime-card.tone-bad::before{background:linear-gradient(180deg,rgba(239,68,68,.95),rgba(239,68,68,.22));}
.regime-kicker,
.mini-scorecard-head{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:10px;
}
.regime-explainer{font-size:12px;color:var(--text-muted);margin:0 0 14px;line-height:1.55;}
.regime-state{
  font-family:var(--font-humanist);
  font-size:clamp(28px,3.3vw,40px);
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.08;
  margin-bottom:16px;
}
.regime-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.metric-chip{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:12px;
  padding:10px 12px;
  min-width:0;
}
.metric-chip-label{
  display:block;
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:6px;
}
.metric-chip-value{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  font-size:14px;
  font-weight:700;
  line-height:1.25;
  color:var(--text);
  white-space:normal;
  overflow-wrap:anywhere;
}
.metric-chip-number{
  display:block;
  font-size:15px;
  font-weight:700;
  line-height:1.05;
}
.metric-chip-word{
  display:block;
  font-size:15px;
  font-weight:700;
  line-height:1.05;
}
#cycleStateScore,#cycleConfidence,#cycleBreadth,#cycleDefensive{
  font-size:15px;
}
.metric-chip-value.tone-good,.mini-score-value.tone-good,.driver-score.tone-good{color:#8ef0c3;}
.metric-chip-value.tone-mixed,.mini-score-value.tone-mixed,.driver-score.tone-mixed{color:#ffd37a;}
.metric-chip-value.tone-bad,.mini-score-value.tone-bad,.driver-score.tone-bad{color:#ff9a9a;}
.regime-summary{
  font-size:13.5px;
  color:var(--text);
  line-height:1.75;
  margin-bottom:12px;
  max-width:68ch;
}

.regime-subcopy{
  display:block;
  margin-bottom:10px;
}
.backup-state-line{
  display:block;
  font-size:15px;
  line-height:1.45;
  color:var(--text-muted);
}
.backup-state-line .backup-label{
  color:var(--text-muted);
  font-weight:700;
}
.backup-state-line .backup-value{
  font-size:17px;
  font-weight:800;
}
.backup-state-line.tone-good .backup-value{color:#8ef0c3;}
.backup-state-line.tone-mixed .backup-value{color:#ffd37a;}
.backup-state-line.tone-bad .backup-value{color:#ff9a9a;}
.regime-reason,
.regime-note{
  font-size:12.5px;
  color:var(--text-muted);
  line-height:1.55;
}
.mini-score-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.mini-score-box{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:12px;
  padding:12px;
}
.mini-score-label{
  display:block;
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:8px;
}
.mini-score-value{
  display:block;
  font-size:18px;
  font-weight:700;
  line-height:1.12;
  margin-bottom:6px;
}
.mini-score-state{
  display:block;
  font-size:12px;
  color:var(--text-muted);
  line-height:1.4;
}

.status-update-card{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  border-radius:14px;
  padding:14px 16px;
  margin-top:12px;
}
.status-update-head{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:8px;
}
.status-update-line{
  font-size:13px;
  line-height:1.7;
  color:rgba(255,255,255,.8);
}
.status-update-line + .status-update-line{margin-top:2px;}
.status-update-line span{
  color:rgba(255,255,255,.58);
  font-weight:600;
}

.driver-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.driver-grid-rail{
  grid-template-columns:1fr;
  margin-top:14px;
  margin-bottom:0;
}
.driver-pill{
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  padding:12px;
  min-height:172px;
}
.driver-pill.tone-good{
  background:rgba(16,185,129,.08);
  border-color:rgba(16,185,129,.22);
}
.driver-pill.tone-mixed{
  background:rgba(245,158,11,.08);
  border-color:rgba(245,158,11,.20);
}
.driver-pill.tone-bad{
  background:rgba(239,68,68,.08);
  border-color:rgba(239,68,68,.18);
}
.driver-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.driver-label{
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}
.driver-score{
  font-size:13px;
  font-weight:700;
  color:var(--text);
  line-height:1.35;
  text-align:right;
}
.driver-text{
  font-size:12.5px;
  line-height:1.6;
  color:var(--text);
}
.ai-brief-text{
  font-size:13px;
  line-height:1.75;
  color:var(--text);
  max-width:90ch;
}


.driver-evidence{
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,.08);
  display:grid;
  gap:5px;
}
.driver-evidence-row{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:8px;
  align-items:start;
  font-size:13px;
  line-height:1.5;
  color:var(--text-muted);
}
.driver-evidence-key{
  font-weight:800;
  font-size:13px;
  color:var(--text);
  white-space:nowrap;
}
.driver-evidence-value{
  min-width:0;
  font-size:13px;
  color:var(--text-muted);
}


.decision-inline{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
}
.decision-inline h3{
  font-size:18px;
  line-height:1.2;
  margin:2px 0 12px;
}
.decision-inline-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:0;
}
.decision-inline-row{
  padding:10px 0;
  border-top:1px solid rgba(255,255,255,.06);
}
.decision-inline-row:first-child{border-top:0;padding-top:0;}
.decision-label{
  display:block;
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:6px;
}
.decision-value{
  display:block;
  font-size:15px;
  line-height:1.35;
  color:var(--text);
  margin-bottom:4px;
}
.decision-text{
  margin:0;
  font-size:12.5px;
  line-height:1.6;
  color:var(--text-muted);
}
.rotation-callout{
  margin-top:12px;
  margin-bottom:10px;
  border:1px solid rgba(59,130,246,.24);
  background:linear-gradient(180deg,rgba(59,130,246,.08),rgba(255,255,255,.02));
  border-radius:14px;
  padding:12px;
}
.rotation-callout-head{
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:10px;
}
.rotation-callout-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.rotation-item{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:12px;
  padding:10px 12px;
}
.rotation-item-wide{grid-column:span 1}
.rotation-item-label{
  display:block;
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:6px;
}
.rotation-item-value{
  display:block;
  font-size:15px;
  line-height:1.4;
  color:var(--text);
}
.ai-brief-card{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.025);
  border-radius:14px;
  padding:16px 18px;
}
.ai-brief-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.ai-brief-head h3{
  font-size:18px;
  line-height:1.2;
  margin:2px 0 0;
}
.ai-brief-text{
  font-size:14px;
  line-height:1.7;
  color:var(--text);
}

.regime-footer-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

@media(max-width:1080px){
  .regime-header-row{grid-template-columns:1fr;}
  .regime-header-main,.regime-desc{max-width:none;}
  .status-update-card-top{width:100%;margin-top:0;justify-self:stretch;}
  .regime-hero{grid-template-columns:1fr}
  .driver-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:820px){
  .regime-metrics{grid-template-columns:repeat(2,minmax(180px,1fr))}
  .driver-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .decision-grid{grid-template-columns:1fr;}
}

@media(max-width:560px){
  .metric-chip{padding:9px 10px}
  .regime-state{font-size:30px}
  .driver-grid{grid-template-columns:1fr}
  .mini-score-grid{grid-template-columns:1fr}
}

@media(max-width:1100px){
  .driver-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(max-width:700px){
  .driver-grid{grid-template-columns:1fr;}
}

.driver-grid-rail .driver-pill{min-height:auto;}
@media(max-width:1080px){
  .driver-grid-rail{grid-template-columns:1fr;}
}
@media(max-width:820px){
  .driver-grid-rail{grid-template-columns:1fr;}
}
@media(max-width:560px){
  .driver-grid-rail{grid-template-columns:1fr;}
}
@media(max-width:1100px){
  .driver-grid-rail{grid-template-columns:1fr;}
}
@media(max-width:700px){
  .driver-grid-rail{grid-template-columns:1fr;}
}


/* ================================================================
   SIMPLE SECTOR STRENGTH LAYOUT
   ================================================================ */
.toolbar-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  flex-wrap:wrap;margin-bottom:18px
}
.snapshot-updated{font-size:13px;color:var(--text-muted)}

.summary-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:22px
}
.summary-card{padding:22px}
.summary-value{
  margin-top:8px;font-family:var(--font-humanist);font-size:28px;font-weight:800;
  color:var(--text);line-height:1.15
}
.summary-note{margin-top:8px;color:var(--text-muted);font-size:14px}

.section-title{
  font-family:var(--font-humanist);font-size:24px;font-weight:800;color:var(--text)
}
.table-head-row{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  flex-wrap:wrap;margin-bottom:16px
}
.table-head-note{color:var(--text-muted);font-size:13px}

.sector-table-wrap{overflow:auto}
.sector-table{width:100%;border-collapse:collapse}
.sector-table th{
  text-align:left;font-size:13px;color:var(--text-muted);font-weight:800;
  padding:12px 10px;border-bottom:1px solid var(--border);white-space:nowrap
}
.sector-table td{
  padding:14px 10px;border-bottom:1px solid rgba(255,255,255,.06);font-size:15px;vertical-align:middle
}
.sector-sym{font-weight:800;color:var(--text)}
.sector-name{font-size:13px;color:var(--text-muted);margin-top:2px}
.pos{color:var(--green2);font-weight:800}
.neg{color:var(--red2);font-weight:800}
.neu{color:var(--text-muted);font-weight:700}
.status-pill{
  display:inline-flex;align-items:center;justify-content:center;
  padding:6px 10px;border-radius:999px;border:1px solid var(--border2);
  background:rgba(255,255,255,.03);font-size:12px;font-weight:800;color:var(--text)
}
.loading-cell{color:var(--text-muted);text-align:center}

@media (max-width: 900px){
  .summary-grid{grid-template-columns:1fr}
}


.sector-table tbody tr.row-strong{background:rgba(16,185,129,.055)}
.sector-table tbody tr.row-rotation-in{background:rgba(96,165,250,.055)}
.sector-table tbody tr.row-rotation-out{background:rgba(251,146,60,.055)}
.sector-table tbody tr.row-weak{background:rgba(239,68,68,.055)}
.sector-table tbody tr.row-mixed{background:transparent}

.sector-table tbody tr:hover{
  background:rgba(255,255,255,.035);
}

.sector-dot{
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  margin-left:6px;
  background:#60a5fa;
  box-shadow:0 0 0 1px rgba(96,165,250,.18), 0 0 8px rgba(96,165,250,.22);
  vertical-align:middle;
}

.status-pill.status-strong{
  background:rgba(16,185,129,.10);
  border-color:rgba(16,185,129,.30);
  color:#b8ffe3;
}
.status-pill.status-rotation-in{
  background:rgba(96,165,250,.10);
  border-color:rgba(96,165,250,.32);
  color:#d6e7ff;
}
.status-pill.status-rotation-out{
  background:rgba(251,146,60,.10);
  border-color:rgba(251,146,60,.32);
  color:#ffe6cf;
}
.status-pill.status-weak{
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.30);
  color:#ffc7c7;
}
.status-pill.status-mixed{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.12);
  color:var(--text);
}

.cycle-explainer-card{margin-top:20px;}
.cycle-copy,.cycle-note{color:var(--text-muted);font-size:13px;line-height:1.7;max-width:920px;}
.cycle-copy{margin:0 0 14px;}
.cycle-note{margin:14px 0 0;}
.cycle-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:10px;}
.cycle-card{border:1px solid rgba(255,255,255,.14);border-radius:12px;padding:12px 14px;background:rgba(255,255,255,.02);transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;}
.cycle-title{font-weight:800;margin-bottom:4px;}
.cycle-sub{font-size:12px;color:var(--text-muted);line-height:1.5;}
.cycle-early{border-color:rgba(59,130,246,.28);}
.cycle-mid{border-color:rgba(16,185,129,.28);}
.cycle-late{border-color:rgba(245,158,11,.28);}
.cycle-risk{border-color:rgba(239,68,68,.28);}
.cycle-card.is-active{border-width:2px;box-shadow:0 0 0 1px rgba(255,255,255,.03),0 0 18px rgba(255,255,255,.04);}
.cycle-card.is-secondary{border-width:2px;box-shadow:0 0 0 1px rgba(255,255,255,.02);opacity:.96;}
.cycle-early.is-active{border-color:rgba(59,130,246,.52);}
.cycle-mid.is-active{border-color:rgba(16,185,129,.52);}
.cycle-late.is-active{border-color:rgba(245,158,11,.52);}
.cycle-risk.is-active{border-color:rgba(239,68,68,.52);}
.cycle-early.is-secondary{border-color:rgba(59,130,246,.4);}
.cycle-mid.is-secondary{border-color:rgba(16,185,129,.4);}
.cycle-late.is-secondary{border-color:rgba(245,158,11,.4);}
.cycle-risk.is-secondary{border-color:rgba(239,68,68,.4);}
.trend-cell{width:96px;}
.spark{display:block;color:rgba(148,163,184,.8);}
.spark-up{color:#34d399;}
.spark-down{color:#f87171;}
.spark-flat{color:rgba(148,163,184,.8);}
.spark-empty{color:var(--text-dim);font-size:12px;}
@media(max-width:900px){.cycle-cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:640px){.cycle-cards{grid-template-columns:1fr;}.trend-cell{width:auto;}}


.sector-meta{
  color: rgba(230,237,243,.72);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}
.sector-persist{
  color: rgba(230,237,243,.92);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}


.summary-card .card-eyebrow{text-transform:uppercase}
.market-phase-pill{
  display:inline-flex;align-items:center;gap:6px;
  margin:2px 0 14px;padding:7px 12px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.04);
  font-size:12px;font-weight:800;color:var(--text);
}
.sector-table tbody tr.row-candidate{background:rgba(34,197,94,.04)}
.sector-table tbody tr.row-improving{background:rgba(96,165,250,.045)}
.sector-table tbody tr.row-neutral{background:transparent}
.sector-table tbody tr.row-weakening{background:rgba(245,158,11,.045)}
.sector-table tbody tr.row-rotation-out{background:rgba(239,68,68,.045)}
.status-pill.status-candidate{
  background:rgba(34,197,94,.10);border-color:rgba(34,197,94,.28);color:#dcffe9;
}
.status-pill.status-improving{
  background:rgba(96,165,250,.10);border-color:rgba(96,165,250,.28);color:#dbeafe;
}
.status-pill.status-neutral{
  background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12);color:var(--text);
}
.status-pill.status-weakening{
  background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.28);color:#ffedd5;
}
.status-pill.status-rotation-out{
  background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.28);color:#fecaca;
}
.cycle-card.is-active{
  border-width:2px;
  box-shadow:0 0 0 1px rgba(255,255,255,.04),0 0 22px rgba(255,255,255,.06);
  background:rgba(255,255,255,.035);
}
.cycle-card.is-secondary{
  border-width:1px;
  box-shadow:none;
  background:rgba(255,255,255,.018);
  opacity:.94;
}
.cycle-early.is-active{border-color:rgba(59,130,246,.68);box-shadow:0 0 0 1px rgba(59,130,246,.16),0 0 20px rgba(59,130,246,.14)}
.cycle-mid.is-active{border-color:rgba(16,185,129,.68);box-shadow:0 0 0 1px rgba(16,185,129,.16),0 0 20px rgba(16,185,129,.14)}
.cycle-late.is-active{border-color:rgba(245,158,11,.72);box-shadow:0 0 0 1px rgba(245,158,11,.18),0 0 20px rgba(245,158,11,.16)}
.cycle-risk.is-active{border-color:rgba(239,68,68,.70);box-shadow:0 0 0 1px rgba(239,68,68,.16),0 0 20px rgba(239,68,68,.14)}
.cycle-early.is-secondary{border-color:rgba(59,130,246,.34)}
.cycle-mid.is-secondary{border-color:rgba(16,185,129,.34)}
.cycle-late.is-secondary{border-color:rgba(245,158,11,.36)}
.cycle-risk.is-secondary{border-color:rgba(239,68,68,.36)}
.sector-persist{color:rgba(230,237,243,.88);font-size:12px;line-height:1.35;margin-top:3px}
.sector-reason{color:rgba(230,237,243,.55);font-size:11px;line-height:1.35;margin-top:3px}


.debug-panel{margin-top:24px}.debug-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.debug-item{background:rgba(255,255,255,.02);border:1px solid rgba(129,157,207,.18);border-radius:14px;padding:12px}.debug-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}.debug-head span{color:#9fb2d2;font-size:12px}.debug-scores{font-size:12px;color:#b9c8df;margin-bottom:8px}.debug-flags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.debug-flags span,.debug-reasons code{display:inline-block;background:rgba(24,38,64,.9);border:1px solid rgba(129,157,207,.2);border-radius:999px;padding:3px 8px;font-size:11px;color:#dce8ff}.debug-reasons{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.debug-item details summary{cursor:pointer;color:#9fb2d2;font-size:12px}.debug-item pre{white-space:pre-wrap;word-break:break-word;font-size:11px;line-height:1.45;color:#c9d7ee;margin:10px 0 0}


.sector-subrs{font-size:12px;color:rgba(167,182,204,.78);margin-top:4px;}

.strength-cell{font-weight:800;color:#e8edf7;letter-spacing:.02em;white-space:nowrap;}
.sector-table th:nth-child(2), .sector-table td:nth-child(2){width:90px;}

/* Benchmark selector additions */
.toolbar-controls{display:flex;align-items:flex-end;gap:18px;flex-wrap:wrap;}
.toolbar-control{display:flex;flex-direction:column;gap:2px;}
.benchmark-wrap{min-width:148px;}
.tf-btn-caret{opacity:.65;font-size:11px;line-height:1;}
.benchmark-note{
  display:inline-flex;align-items:center;gap:8px;
  margin:-4px 0 18px;padding:8px 12px;border-radius:999px;
  border:1px solid rgba(96,165,250,.22);
  background:rgba(96,165,250,.07);
  color:rgba(219,234,254,.94);font-size:13px;font-weight:700;
}
.summary-card .summary-note{min-height:38px;}
.sector-dot{display:inline-block;width:6px;height:6px;border-radius:999px;background:#60a5fa;margin-left:6px;vertical-align:middle;box-shadow:0 0 12px rgba(96,165,250,.75);}
@media(max-width:640px){
  .toolbar-row{align-items:flex-start;}
  .toolbar-controls{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  .toolbar-control .tf-wrap,.toolbar-control .tf-btn{width:100%;min-width:0;}
  .snapshot-updated{width:100%;}
  .benchmark-note{width:100%;border-radius:12px;align-items:flex-start;}
}

/* ================================================================
   Header stats alignment fix - 2026-05-01
   Keeps the sector count / comparison / view stats pinned right on desktop.
   ================================================================ */
.page-header-inner > div:first-child{
  flex:1 1 560px;
  min-width:0;
  max-width:820px;
}
.stat-row{
  margin-left:auto;
  justify-content:flex-end;
  align-self:flex-end;
}

@media(max-width:820px){
  .page-header-inner > div:first-child{
    max-width:none;
    flex:1 1 auto;
  }
  .stat-row{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
    align-self:flex-start;
  }
}


/* Current-period relative movers card */
.period-rs-card{
  margin-bottom:18px;
}
.period-rs-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.period-rs-explain{
  max-width:420px;
  font-size:12px;
  line-height:1.45;
  color:var(--text-muted);
  text-align:right;
}
.period-rs-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.period-rs-item{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  border:1px solid rgba(129,157,207,.18);
  background:rgba(255,255,255,.025);
  border-radius:12px;
  padding:12px 14px;
}
.period-rs-rank{
  width:24px;
  height:24px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:11px;
  font-weight:800;
  color:var(--text-muted);
  background:rgba(96,165,250,.10);
  border:1px solid rgba(96,165,250,.22);
}
.period-rs-main{
  min-width:0;
  flex:1 1 auto;
}
.period-rs-symbol{
  font-family:var(--font-humanist);
  font-size:22px;
  font-weight:900;
  color:var(--text);
  line-height:1.05;
}
.period-rs-sub{
  margin-top:3px;
  font-size:11px;
  color:var(--text-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.period-rs-value-wrap{
  text-align:right;
  flex:0 0 auto;
}
.period-rs-value{
  font-size:15px;
  font-weight:900;
}
.period-rs-item.is-positive .period-rs-value{color:var(--green2)}
.period-rs-item.is-negative .period-rs-value{color:var(--red2)}
.period-rs-item.is-neutral .period-rs-value{color:var(--text-muted)}
.period-rs-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:5px;
  padding:3px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  color:var(--text);
  background:rgba(255,255,255,.055);
  border:1px solid rgba(129,157,207,.18);
}
.period-rs-item.is-positive .period-rs-badge{
  color:var(--green2);
  background:rgba(16,185,129,.08);
  border-color:rgba(16,185,129,.22);
}
.period-rs-item.is-negative .period-rs-badge{
  color:var(--red2);
  background:rgba(239,68,68,.08);
  border-color:rgba(239,68,68,.22);
}
.period-rs-footnote{
  margin-top:12px;
  color:var(--text-muted);
  font-size:12px;
  line-height:1.5;
}
@media(max-width:900px){
  .period-rs-head{
    flex-direction:column;
  }
  .period-rs-explain{
    max-width:none;
    text-align:left;
  }
  .period-rs-grid{
    grid-template-columns:1fr;
  }
}
