@font-face { font-family: Poppins; src: url(fonts/Poppins-Light.ttf); font-weight: 300; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Lora; src: url(fonts/Lora-Variable.ttf); font-weight: 400 700; font-display: swap; }
@font-face { font-family: Lora; src: url(fonts/Lora-Italic-Variable.ttf); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --midnight: #070F22; --navy: #0B1A3A; --navy2: #0E2145; --royal: #0A4DB8; --sky: #2E9BFF; --gold: #D4A440; --gold2: #F0D890;
  --ink: #13203A; --muted: #5B6B84; --line: #E1E7F0; --paper: #F5F7FB; --card: #FFFFFF;
  --red: #D62839; --red2: #B81E2E; --green: #12A15A; --green2: #0C8548; --up: #12A15A; --down: #D62839;
  --orbit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 600' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-width='1.3'%3E%3Cellipse cx='840' cy='330' rx='980' ry='230' transform='rotate(-10 840 330)' stroke='rgba(46,155,255,.22)'/%3E%3Cellipse cx='800' cy='310' rx='1180' ry='330' transform='rotate(-12 800 310)' stroke='rgba(212,164,64,.22)'/%3E%3Cellipse cx='760' cy='300' rx='1400' ry='430' transform='rotate(-8 760 300)' stroke='rgba(46,155,255,.12)'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Poppins, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.55; }
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { margin: 0; }
.serif { font-family: Lora, Georgia, serif; }

/* ---------- header (FMS style: logo box, gold app name, UPPERCASE menu with carets, search, options) ---------- */
.top { position: sticky; top: 0; z-index: 50; background: linear-gradient(90deg, var(--midnight), var(--navy) 60%, var(--navy2)); border-bottom: 2px solid var(--gold); }
.top-in { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; flex: none; }
/* NXW logo like the FMS app: the badge itself (navy rounded box, gold border), no extra frame */
.logo-box { display: flex; align-items: center; height: 50px; flex: none; }
.logo-box img.logo { height: 50px; width: auto; display: block; border-radius: 9px; }
.logo-box .nxw-svg { height: 50px; width: auto; }
/* Logo NXW = Light: no badge background, letters only */
.logo-box[data-logo="light"] .nx-bg { fill: transparent; stroke: transparent; }
.brand-ico { width: 32px; height: 32px; flex: none; }
.appname { font-size: 22px; font-weight: 500; letter-spacing: .2em; color: var(--gold); white-space: nowrap; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a { color: #DCE5F5; padding: 8px 12px; font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.on { color: var(--gold); border-bottom-color: var(--gold); }
.tsearch { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 36px; width: 250px; padding: 0 12px;
  border-radius: 9px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: #9DB0CC; }
.tsearch:focus-within { border-color: var(--gold); }
.tsearch svg { width: 16px; height: 16px; flex: none; }
.tsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-family: inherit; font-size: 13.5px; }
.tsearch input::placeholder { color: #8FA3C3; }
.sugg { display: none; position: absolute; top: 42px; left: 0; right: 0; min-width: 300px; background: var(--navy); border: 1px solid rgba(212,164,64,.4);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 6px; z-index: 70; }
.sugg.open { display: block; }
.sugg a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 6px; color: #DCE5F5; font-size: 13px; }
.sugg a:hover, .sugg a.hi { background: rgba(212,164,64,.16); color: #fff; text-decoration: none; }
.sugg a small { color: #8FA3C3; white-space: nowrap; }
.sugg .none { padding: 8px 10px; color: #8FA3C3; font-size: 13px; }
.asof { color: #9DB0CC; font-size: 12px; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; line-height: 1.25; }
.asof .demo-badge { margin-left: 0; }
.asof b { color: var(--gold2); font-weight: 500; }
.demo-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(214,40,57,.18); color: #FFB3BB; font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.optw { position: relative; flex: none; }
.opts { width: 38px; height: 38px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #DCE5F5;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.opts:hover, .opts.on { border-color: var(--gold); color: var(--gold); }
.opts svg { width: 20px; height: 20px; }
.opanel { display: none; position: absolute; right: 0; top: 48px; width: 290px; background: var(--navy); border: 1px solid rgba(212,164,64,.45);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.4); padding: 14px 16px; z-index: 80; color: #DCE5F5; }
.opanel.open { display: block; }
.opanel h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold2); }
.orow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.orow > span { font-size: 13px; font-weight: 500; }
.orow .osub { display: block; font-size: 11px; font-weight: 400; color: #8FA3C3; }
.oseg { display: inline-flex; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; overflow: hidden; }
.oseg button { font-family: inherit; border: 0; background: transparent; color: #C9D6EE; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.oseg button + button { border-left: 1px solid rgba(255,255,255,.12); }
.oseg button.on { background: var(--gold); color: var(--midnight); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font-family: inherit; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; border-radius: 12px; padding: 16px 30px; font-size: 15px; color: #fff !important; text-decoration: none !important;
  transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; }
.btn-red { background: var(--red); box-shadow: 0 10px 26px rgba(214,40,57,.35); }
.btn-red:hover { background: var(--red2); box-shadow: 0 14px 30px rgba(214,40,57,.45); }
.btn-green { background: var(--green); box-shadow: 0 10px 26px rgba(18,161,90,.32); }
.btn-green:hover { background: var(--green2); box-shadow: 0 14px 30px rgba(18,161,90,.42); }
.btn-sm { padding: 9px 16px; font-size: 12.5px; border-radius: 9px; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); font-weight: 600; }
.btn-ghost:hover { border-color: var(--gold); }
.btn-navy { background: var(--navy); }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 600px at 75% 10%, #16336E 0%, var(--navy) 45%, var(--midnight) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--orbit) center/cover no-repeat; opacity: .9; }
.hero-in { position: relative; padding: 72px 24px 64px; display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.kick { display: inline-block; font-size: 12.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); font-weight: 500; }
.hero h1 { font-family: Lora, Georgia, serif; font-size: 58px; line-height: 1.05; margin: 14px 0 6px; font-weight: 700; }
.hero h1 i { color: var(--gold); font-weight: 500; }
.rule { width: 90px; height: 3px; background: var(--gold); margin: 20px 0 22px; border-radius: 2px; }
.lead { font-size: 17px; font-weight: 300; color: #D6E0F2; max-width: 640px; margin: 0 0 30px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hstat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px 20px; backdrop-filter: blur(3px); }
.hstat .n { font-family: Lora, Georgia, serif; font-size: 40px; font-weight: 700; color: var(--gold2); line-height: 1.1; }
.hstat .l { font-size: 13px; color: #B9C7DF; letter-spacing: .04em; }
.sec { padding: 56px 0; }
.sec-h { text-align: center; margin-bottom: 30px; }
.sec-h h2 { font-family: Lora, Georgia, serif; font-size: 32px; color: var(--navy); margin-top: 8px; }
.sec-h .kick { color: var(--royal); }
.sec-h .rule { margin: 14px auto 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
/* How it works cards (same style as the FMS Help cards): icon left, serif title, text, gold "Open ->" link */
.feat { display: grid; grid-template-columns: 58px 1fr; column-gap: 18px; align-items: start; padding: 22px 24px; border-radius: 16px;
  transition: border-color .15s, transform .15s; }
.feat:hover { border-color: rgba(212,164,64,.55); transform: translateY(-2px); }
.feat .num { display: none; }
.feat .ico { grid-row: 1 / span 3; width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0;
  background: linear-gradient(145deg, #2160D0 0%, #123E8C 55%, #0C2A63 100%); color: var(--gold2); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.feat .ico svg { width: 28px; height: 28px; }
.feat h3 { font-family: Lora, Georgia, serif; font-size: 21px; font-weight: 600; color: var(--navy); margin: 2px 0 6px; }
.feat p { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.feat .go { justify-self: start; font-size: 14.5px; font-weight: 600; color: var(--gold); }
.feat .go span { display: inline-block; transition: transform .15s; }
.feat .go:hover { text-decoration: none; color: var(--gold2); }
.feat:hover .go span { transform: translateX(4px); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 22px; background: #fff; border: 1px solid var(--line); color: var(--ink) !important;
  font-size: 14px; font-weight: 500; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.chip .c { background: var(--navy); color: var(--gold2); border-radius: 12px; padding: 1px 9px; font-size: 12px; font-weight: 600; }
.band { background: linear-gradient(90deg, var(--navy), var(--navy2)); color: #fff; border-radius: 20px; padding: 30px 34px; display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.band h3 { font-family: Lora, Georgia, serif; font-size: 24px; }
.band p { margin: 6px 0 0; color: #C9D6EE; font-weight: 300; }

/* ---------- page head ---------- */
.phead { background: linear-gradient(90deg, var(--midnight), var(--navy) 70%, var(--navy2)); color: #fff; position: relative; overflow: hidden; }
.phead::before { content: ""; position: absolute; inset: 0; background: var(--orbit) center/cover no-repeat; opacity: .6; }
.phead-in { position: relative; padding: 30px 24px 26px; }
.phead h1 { font-family: Lora, Georgia, serif; font-size: 34px; font-weight: 700; margin-top: 6px; }
.phead p { margin: 6px 0 0; color: #C9D6EE; font-weight: 300; max-width: 900px; }
.crumb { font-size: 13px; color: #9DB0CC; }
.crumb a { color: var(--gold2); }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(6, 1fr); gap: 10px; align-items: end; margin: 22px 0 14px; }
.fld label { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.fld input, .fld select { width: 100%; font-family: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.fld input:focus, .fld select:focus { outline: 2px solid rgba(46,155,255,.35); border-color: var(--sky); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .cnt { font-size: 14px; color: var(--muted); }
.toolbar .cnt b { color: var(--navy); font-size: 16px; }
.toolbar .sp { flex: 1; }
.gchips { display: flex; flex-wrap: wrap; gap: 8px; }
.gchip { cursor: pointer; padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; color: var(--ink); font-family: inherit; }
.gchip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.gchip .c { color: var(--muted); margin-left: 4px; font-weight: 400; }
.gchip.on .c { color: var(--gold2); }

/* ---------- tables ---------- */
.tbox { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { position: sticky; top: 0; background: #F0F4FA; color: var(--navy); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
table.t th.num, table.t td.num { text-align: right; }
table.t th:hover { color: var(--royal); }
table.t th .ar { color: var(--gold); margin-left: 3px; }
table.t td { padding: 9px 10px; border-bottom: 1px solid #EEF2F7; white-space: nowrap; }
table.t tbody tr:hover { background: #F7FAFF; }
table.t td.name a { font-weight: 600; color: var(--navy); }
table.t td.name a:hover { color: var(--royal); }
table.t td .sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #EEF2F8; font-size: 12px; color: var(--ink); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 4px; font-size: 13px; color: var(--muted); }
.pager button { font-family: inherit; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 5px 11px; cursor: pointer; color: var(--ink); }
.pager button:disabled { opacity: .4; cursor: default; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- detail ---------- */
.dhead { display: flex; gap: 30px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.dchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dchips span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 3px 12px; font-size: 12.5px; color: #DCE6F7; }
.quote { text-align: right; }
.quote .px { font-family: Lora, Georgia, serif; font-size: 44px; font-weight: 700; line-height: 1; }
.quote .chg { font-size: 17px; font-weight: 600; margin-top: 6px; }
.quote .chg.up { color: #4BE39A; } .quote .chg.down { color: #FF7A86; }
.quote .when { font-size: 12.5px; color: #9DB0CC; margin-top: 4px; }
.dgrid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin: 22px 0; }
.ctitle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ctitle h3 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.ctitle h3::before { content: ""; display: inline-block; width: 4px; height: 15px; background: var(--gold); border-radius: 2px; margin-right: 8px; vertical-align: -2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { font-family: inherit; border: 0; background: #fff; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--navy); color: #fff; }
.chart { width: 100%; height: 320px; position: relative; }
.chart.sm { height: 220px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec td { padding: 7px 4px; border-bottom: 1px solid #EEF2F7; vertical-align: top; }
.spec td:first-child { color: var(--muted); width: 42%; }
.spec td:last-child { font-weight: 500; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kv div { background: #F7F9FC; border-radius: 10px; padding: 10px 12px; }
.kv .k { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.kv .v { font-size: 18px; font-weight: 700; }
.range { margin-top: 14px; }
.range .bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #FFD6DA, #EEF2F7, #CFF3E0); margin: 8px 0 4px; }
.range .dot { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--navy); border: 3px solid var(--gold); transform: translateX(-50%); }
.range .lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.desc { color: var(--muted); font-size: 14px; margin: 0 0 10px; }

/* ---------- ranking report ---------- */
.rep-ctrl { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) auto auto; gap: 10px; align-items: end; margin: 22px 0 16px; }
#rtbl td, #rtbl th { padding: 8px 7px; font-size: 13px; }
.rep-ctrl .fld.chk { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; white-space: nowrap; }
.rep-ctrl .fld.chk label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--ink); }
.months { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.months a { padding: 5px 11px; border-radius: 16px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--ink); font-weight: 500; text-decoration: none !important; }
.months a.on { background: var(--green); color: #fff; border-color: var(--green); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; border-top: 3px solid var(--gold); }
.kpi .k { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.kpi .v { font-size: 16px; font-weight: 700; color: var(--navy); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 13px; font-weight: 600; }
.rk { display: inline-flex; min-width: 30px; justify-content: center; font-weight: 700; color: var(--navy); }
.rk.top { background: var(--gold); color: var(--navy); border-radius: 8px; padding: 1px 6px; }
.dlt { font-weight: 700; font-size: 12.5px; }
.dlt.up { color: var(--up); } .dlt.down { color: var(--down); } .dlt.eq { color: var(--muted); } .dlt.new { color: var(--royal); }
.sbar { display: inline-block; width: 70px; height: 7px; background: #EEF2F7; border-radius: 4px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--royal)); }
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.mv { list-style: none; margin: 0; padding: 0; }
.mv li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #EEF2F7; font-size: 14px; }
.method { font-size: 13.5px; color: var(--muted); }
.method b { color: var(--ink); }
.note { background: #FFF8E6; border: 1px solid #F3DFA8; border-radius: 12px; padding: 12px 16px; font-size: 13.5px; color: #6B5414; margin: 14px 0; }

/* ---------- misc ---------- */
.loading { padding: 80px; text-align: center; color: var(--muted); }
.foot { background: var(--midnight); color: #9DB0CC; font-size: 13px; padding: 26px 0; margin-top: 50px; border-top: 2px solid var(--gold); }
.foot-in { display: flex; flex-direction: column; gap: 6px; }
.foot b { color: #fff; }
.foot-note { color: #7F93B5; font-size: 12px; }
.tip { position: fixed; pointer-events: none; z-index: 99; background: var(--navy); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); display: none; white-space: nowrap; }
.tip b { color: var(--gold2); }
.axis text { font-size: 11px; fill: var(--muted); font-family: Poppins, sans-serif; }
.axis line { stroke: var(--line); }

/* language button (2026-10-29, NXW website model): globe + code, menu EN VN FR CN JP; the header is always navy */
.lbox { position: relative; display: flex; flex: none; }
.lbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); color: #DCE5F5; cursor: pointer; font: inherit; }
.lbtn svg { width: 18px; height: 18px; } .lbtn:hover, .lbox.open .lbtn { border-color: var(--gold); color: var(--gold); }
.lcode { font-weight: 700; font-size: 12.5px; letter-spacing: .05em; color: #e9b54a; }
.lmenu { display: none; position: absolute; right: 0; top: calc(100% + 12px); min-width: 190px; z-index: 60; background: #121a4c;
  border: 1px solid rgba(241,205,120,.35); border-radius: 12px; padding: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.lbox.open .lmenu { display: block; }
.lmenu button { display: flex; width: 100%; align-items: center; gap: 12px; border: 0; background: transparent; color: #C9D6EC; font: inherit; font-size: 14px;
  font-weight: 500; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.lmenu button b { min-width: 34px; font-size: 12px; letter-spacing: .05em; color: #9DB0CC; }
.lmenu button:hover { background: rgba(212,164,64,.14); color: #e9b54a; }
.lmenu button.on, .lmenu button.on b { color: #e9b54a; }
@media (max-width: 1280px) { .lbtn { padding: 0 9px; } .lbtn svg { display: none; } }
@media (max-width: 1240px) { .asof { display: none; } }
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
  .filters .fld.q { grid-column: 1 / -1; }
  .rep-ctrl { grid-template-columns: repeat(3, 1fr); }
  .dgrid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding: 44px 16px 40px; }
  .hero h1 { font-size: 40px; }
  .grid3, .movers { grid-template-columns: 1fr; }
  .top-in { gap: 10px; height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; }
  .nav { order: 5; width: 100%; justify-content: space-between; }
  .nav a { padding: 6px 6px; font-size: 12px; letter-spacing: .03em; }
  .tsearch { width: auto; flex: 1; min-width: 120px; }
  .wrap { padding: 0 16px; }
  .quote { text-align: left; }
  .kv { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .appname { font-size: 17px; letter-spacing: .14em; }
  .logo-box, .logo-box img.logo, .logo-box .nxw-svg { height: 40px; }
  .dd-menu { min-width: 190px; }
  #dd-rk .dd-menu { left: -60px; }
  .filters, .rep-ctrl { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
}
@media print {
  .top, .foot, .rep-ctrl, .months, .no-print { display: none !important; }
  body { background: #fff; }
  .phead { background: #fff; color: var(--navy); }
  .phead::before { display: none; }
  .phead p { color: var(--muted); }
}

/* ---------- help menu and pages ---------- */
.dd { position: relative; display: flex; align-items: center; padding: 6px 0; margin: -6px 0; }
.dd-btn .caret { font-size: 10px; margin-left: 4px; opacity: .8; }
.dd-menu .sep { height: 1px; background: rgba(255,255,255,.1); margin: 5px 6px; }
.dd-menu .hd { padding: 6px 12px 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold2); }
.dd-menu a .c { float: right; margin-left: 14px; color: #8FA3C3; font-size: 12px; }
.dd-menu { display: none; position: absolute; left: 0; max-height: 70vh; overflow-y: auto; top: 100%; min-width: 220px; padding: 6px; margin-top: 4px;
  background: var(--navy); border: 1px solid rgba(212,164,64,.4); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 60; margin-top: 0; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu, .dd.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: 8px 12px; border-radius: 6px; color: #C9D6EE; white-space: nowrap; text-transform: none; font-weight: 500; letter-spacing: 0; border: 0; font-size: 13.5px; }
.dd-menu a:hover, .dd-menu a.on { background: rgba(212,164,64,.16); color: #fff; border: 0; text-decoration: none; box-shadow: none; }
#fields { scroll-margin-top: 84px; }
.help-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 14px; }
.help-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--navy); font-size: 13.5px; font-weight: 500; }
.help-tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.help-tabs a:hover { text-decoration: none; border-color: var(--gold); }
.card h2.ttl { font-size: 17px; font-weight: 600; color: var(--navy); border-left: 3px solid var(--gold); padding-left: 10px; margin-bottom: 14px; }
.tblwrap { overflow-x: auto; }
table.t.struct td { white-space: normal; vertical-align: top; }
table.t.struct td.tname a { font-family: Consolas, "Courier New", monospace; font-weight: 700; color: var(--royal); }
table.t.struct tr.sel { background: #FFF8E6; }
table.t.struct tr.sel td.tname a { color: var(--gold); }
table.t.struct td.mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
table.t.struct td.ex { color: var(--muted); font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.help-gap { height: 18px; }
.gl dt { font-weight: 600; color: var(--navy); margin-top: 12px; }
.gl dd { margin: 2px 0 0; color: var(--ink); }
#dd-help .dd-menu { left: auto; right: 0; }

/* ---------- dark mode (Options > Mode = Dark) ---------- */
html[data-mode="dark"] {
  --ink: #E3EAF6; --muted: #93A5C4; --line: #23365C; --paper: #08122A; --card: #0F1D3B; --royal: #5FB0FF;
  --soft: #15264A; --soft2: #1A2D55; --hd: #F0D890; color-scheme: dark;
}
html[data-mode="dark"] body { background: var(--paper); color: var(--ink); }
html[data-mode="dark"] .fld input, html[data-mode="dark"] .fld select, html[data-mode="dark"] .chip, html[data-mode="dark"] .gchip,
html[data-mode="dark"] .tbox, html[data-mode="dark"] .pager button, html[data-mode="dark"] .seg button, html[data-mode="dark"] .months a,
html[data-mode="dark"] .kpi, html[data-mode="dark"] .btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
html[data-mode="dark"] .btn-ghost { color: var(--ink) !important; }
html[data-mode="dark"] table.t th { background: var(--soft); color: var(--hd); border-color: var(--line); }
html[data-mode="dark"] table.t td, html[data-mode="dark"] .spec td, html[data-mode="dark"] .mv li { border-color: var(--line); }
html[data-mode="dark"] table.t tbody tr:hover { background: var(--soft); }
html[data-mode="dark"] .tag, html[data-mode="dark"] .kv div, html[data-mode="dark"] .sbar { background: var(--soft2); color: var(--ink); }
html[data-mode="dark"] .feat { background: #1A2340; border-color: #2A3558; }
html[data-mode="dark"] .note { background: #2A2410; border-color: #5C4B1A; color: #F0D890; }
html[data-mode="dark"] table.t.struct tr.sel { background: #2A2410; }
html[data-mode="dark"] .feat h3 { color: #F2F5FB; }
html[data-mode="dark"] .sec-h h2, html[data-mode="dark"] td.name a, html[data-mode="dark"] .ctitle h3,
html[data-mode="dark"] .kpi .v, html[data-mode="dark"] .rk, html[data-mode="dark"] .card h2.ttl, html[data-mode="dark"] .gl dt,
html[data-mode="dark"] .toolbar .cnt b { color: var(--hd); }
html[data-mode="dark"] .help-tabs a { color: var(--ink); }
html[data-mode="dark"] .help-tabs a.on, html[data-mode="dark"] .seg button.on, html[data-mode="dark"] .gchip.on { background: var(--gold); color: var(--midnight); border-color: var(--gold); }
html[data-mode="dark"] .rk.top { color: var(--midnight); }
html[data-mode="dark"] .chip .c { background: var(--soft2); }
html[data-mode="dark"] .band { background: linear-gradient(90deg, var(--soft), var(--soft2)); border: 1px solid var(--line); }
html[data-mode="dark"] .foot { background: #050B1A; }

/* ---------- Help > Table display ---------- */
.dtabs { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.dtabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dtabs a.on { background: var(--gold); border-color: var(--gold); color: var(--midnight); }
.dtabs a:hover { text-decoration: none; border-color: var(--gold); }
.dcnt { margin-left: auto; color: var(--muted); font-size: 13px; }
.dcnt b { color: var(--ink); }
table.dsp-t td { vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
table.dsp-t tr.off td { opacity: .5; }
table.dsp-t input.lab { width: 100%; min-width: 160px; font-family: inherit; font-size: 13.5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
table.dsp-t input.lab:focus { outline: 0; border-color: var(--gold); }
.mvb { white-space: nowrap; }
.mvb button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 6px; width: 26px; height: 24px; font-size: 10px; cursor: pointer; margin-right: 3px; }
.mvb button:hover:not([disabled]) { border-color: var(--gold); color: var(--gold); }
.mvb button[disabled] { opacity: .3; cursor: default; }
.sw { position: relative; display: inline-block; width: 38px; height: 21px; vertical-align: middle; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; border-radius: 21px; background: var(--line); cursor: pointer; transition: background .15s; }
.sw span::before { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sw input:checked + span { background: var(--green); }
.sw input:checked + span::before { transform: translateX(17px); }
.dact { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.dact .adm { width: 220px; }
.dmsg { font-size: 13px; color: var(--muted); }
.dmsg.ok { color: var(--green); } .dmsg.err { color: var(--red); }

/* Shiny "Disconnected from the server" grey screen: hidden, the page reloads itself (obs.js AUTO RELOAD) */
#shiny-disconnected-overlay, #ss-connect-dialog, #ss-overlay, .shiny-notification-panel #shiny-notification-panel-disconnect { display: none !important; }
#shiny-notification-panel:has(#shiny-notification-panel-disconnect) { display: none !important; }

#dfields { scroll-margin-top: 84px; }
.dtabs h2.ttl { margin: 0; }

/* ---------- LOADING popup ---------- */
.ldpop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(7,15,34,.45);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.ldpop.on { opacity: 1; pointer-events: auto; }
.ldbox { min-width: 260px; max-width: 90vw; padding: 26px 34px; border-radius: 16px; text-align: center; background: var(--navy); color: #fff;
  border: 1px solid rgba(212,164,64,.55); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.spin { width: 42px; height: 42px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--gold); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ldt { font-size: 16px; font-weight: 600; letter-spacing: .04em; color: var(--gold2); }
.lds { margin-top: 4px; font-size: 12.5px; color: #9DB0CC; min-height: 1em; }

/* Screener: Index column 20% wider */
#tbl th[data-k="name"], #tbl td.name { width: 26%; min-width: 300px; }

/* ---------- COMPARISON (like the NXW Monitor) ---------- */
.quote .cmpbtn { margin-bottom: 14px; padding: 10px 20px; font-size: 13px; box-shadow: 0 8px 20px rgba(214,40,57,.35); }
.quote .cmpbtn svg { width: 16px; height: 16px; }
.ctabs { display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid rgba(255,255,255,.14); }
.ctabs a { padding: 10px 18px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #B9C6DC; border-radius: 6px 6px 0 0; }
.ctabs a:hover { color: #fff; background: rgba(255,255,255,.06); }
.ctabs a.on { background: var(--red); color: #fff; }
.cmp-ctl { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; }
.cfld { display: flex; flex-direction: column; gap: 6px; }
.cfld > span { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cfld select { min-width: 260px; max-width: 360px; font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 38px 10px 14px; border: 1px solid var(--red); border-radius: 8px; color: #fff; cursor: pointer;
  -webkit-appearance: none; appearance: none; box-shadow: 0 6px 16px rgba(214,40,57,.25);
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.cfld select:hover { background-color: var(--red2); }
.cfld select:focus { outline: 2px solid var(--gold2); outline-offset: 2px; }
.cfld select option { background: var(--card); color: var(--ink); font-weight: 400; }
.cradio { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 0; }
.cradio label { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.cradio input { accent-color: var(--red); margin: 0; }
.ccards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 0; }
.ccard { background: linear-gradient(160deg, #0F2147, #0A1733); border: 1px solid #1F3463; border-radius: 12px; padding: 16px 18px; color: #DCE5F3; box-shadow: 0 10px 24px rgba(7,15,34,.18); }
.ccard .ct { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--gold2); }
.ccard .cbig { font-size: 28px; font-weight: 700; margin: 8px 0 10px; color: #fff; font-variant-numeric: tabular-nums; }
.ccard .crow { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #9DB0CC; }
.ccard .crow b { color: #fff; font-variant-numeric: tabular-nums; }
.ccard .up { color: #3DDC84 !important; } .ccard .down { color: #FF6B7A !important; } .ccard .na { color: #6F82A3; }
.csub { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.csub button { border: 0; background: transparent; padding: 9px 16px; font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted); cursor: pointer; border-radius: 6px 6px 0 0; }
.csub button.on { background: var(--red); color: #fff; }
.cnote { font-size: 12.5px; color: var(--muted); }
.cleg { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 6px; font-size: 13px; color: var(--ink); }
.cleg span { display: inline-flex; align-items: center; gap: 6px; }
.cleg i { width: 16px; height: 3px; border-radius: 2px; background: var(--c); }
.cch { height: 400px; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
@media (max-width: 900px) { .ccards { grid-template-columns: repeat(2, 1fr); } .cch { height: 300px; } }
@media (max-width: 520px) { .ccards { grid-template-columns: 1fr; } .cfld select { min-width: 0; width: 100%; } .cfld { width: 100%; } }
.cleg span.main i { height: 4px; }

/* Horizontal logo in the menu bar (2026-11-01, user "menu as well"): mark | thin gold rule | 2 lines in gold capitals, as <APP>_HORIZONTAL of C:\NXW\LOGO. */
.iobs-hbrand { display: flex; align-items: center; gap: 12px; color: #EAF0FA; flex: none; }
.iobs-hbrand-logo { line-height: 0; }
.iobs-hbrand-logo svg { height: 40px; width: auto; display: block; }
.iobs-hbrand-logo .nxw-cdl, .iobs-hbrand-logo .ims-cdl { stroke: #8A5E18; stroke-width: 6; paint-order: stroke; } .iobs-hbrand-logo .nxw-t, .iobs-hbrand-logo .ims-t { stroke: #8EC8F2; stroke-width: 1.5; paint-order: stroke; }
.iobs-hbrand-sub { font: 500 10.5px/1.5 Poppins, "Segoe UI", Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: #E2B95A; border-left: 1px solid currentColor; padding-left: 12px; }
html[data-mode="light"] .iobs-hbrand { color: #0B1A3A; } html[data-mode="light"] .iobs-hbrand-sub { color: #A87B22; } html[data-mode="light"] .iobs-hbrand-logo .nxw-cdl { stroke: #D9B25E; }
@media (max-width: 759px) { .iobs-hbrand-sub { display: none; } .iobs-hbrand-logo svg { height: 34px; } }
