:root {
  --bg: #0b0d11; --panel: #12151b; --panel2: #171b22; --line: #222731; --line2: #2c3240;
  --text: #e8ebf0; --muted: #8a93a3; --dim: #5d6575;
  --green: #3ddc84; --green-bg: rgba(61,220,132,.10); --green-line: rgba(61,220,132,.38);
  --amber: #f2b544; --amber-bg: rgba(242,181,68,.12); --amber-line: rgba(242,181,68,.40);
  --red: #f0565b; --red-bg: rgba(240,86,91,.12); --red-line: rgba(240,86,91,.40);
  --blue: #5b9cff; --blue-bg: rgba(91,156,255,.12); --blue-line: rgba(91,156,255,.40);
  --soft-red: #f5a3a6; --soft-green: #9fe8bf;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 13.5px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
button, select, input { font: inherit; color: inherit; }
a { color: inherit; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.sub { color: var(--muted); margin-top: 4px; }
.up { color: var(--green); } .down { color: var(--red); } .blue { color: var(--blue); }
.muted { color: var(--muted); } .dim { color: var(--dim); } .amber { color: var(--amber); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ===================================================================== layout */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--green-bg); border: 1px solid var(--green-line); color: var(--green); display: grid; place-items: center; font-weight: 800; }
.brand-name { font-weight: 700; letter-spacing: .14em; font-size: 13px; }
.brand-sub { color: var(--muted); font-size: 11px; }
.nav { padding: 6px 10px 14px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.grp { margin-top: 14px; }
.grp.first { margin-top: 6px; }
.grp h6 { margin: 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 0 10px 6px; display: flex; justify-content: space-between; }
.it { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 7px; color: #c5cad4; font-size: 13px; margin-bottom: 1px; text-decoration: none; }
.it:hover { background: var(--panel2); color: #fff; }
.it .l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.it .lt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .ic { flex: none; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); }
.it .v { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.it.on { background: var(--green-bg); color: #fff; }
.it.on .ic { background: rgba(61,220,132,.18); border-color: var(--green-line); color: var(--green); }
.alt-search { width: calc(100% - 20px); margin: 2px 10px 8px; background: var(--bg); border: 1px solid var(--line2); border-radius: 7px; padding: 7px 10px; font-size: 12px; outline: none; }
.alt-search:focus { border-color: var(--green-line); }
.alt-hdr { color: var(--dim); font-size: 10.5px; padding: 6px 10px 3px; letter-spacing: .04em; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: none; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.side-foot.on { display: flex; }
.side-foot .av { width: 28px; height: 28px; border-radius: 50%; background: #2a3040; display: grid; place-items: center; font-size: 11px; color: #fff; flex: none; }
.side-foot .who-name { color: var(--text); font-weight: 600; }
.side-foot .who-links { color: var(--dim); font-size: 11px; }
.side-foot a { color: var(--muted); }
.scrim { display: none; }

.main-col { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: rgba(11,13,17,.92); backdrop-filter: blur(8px); }
.menu-btn { display: none; background: none; border: 1px solid var(--line2); border-radius: 7px; width: 36px; height: 34px; padding: 8px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.crumb { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.crumb b { color: var(--text); font-weight: 600; }
.gsearch { flex: 1; display: flex; justify-content: center; min-width: 120px; }
.gsearch input { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px; outline: none; }
.gsearch input:focus { border-color: var(--green-line); }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
body:not([data-view="scanner"]) .scan-only { display: none !important; }
.inline { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.content { padding: 24px 28px 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

/* ===================================================================== basics */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line2); padding: 7px 13px; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: #d6dae2; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #3d4552; color: #fff; }
.btn-primary { background: var(--green); border-color: var(--green); color: #05210f; font-weight: 600; }
.btn-primary:hover { background: #5be59a; color: #05210f; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.star.on { color: var(--amber); border-color: var(--amber-line); background: var(--amber-bg); }
button.link { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0 4px; }
select, input[type=number], input[type=search] { background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 6px 9px; outline: none; }
select:focus, input:focus { border-color: var(--green-line); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-live { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.pill-cached { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.pill-stale, .pill-error { color: var(--red); background: var(--red-bg); border-color: var(--red-line); }
.pill-scan { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-line); }
.pill-muted { color: var(--muted); background: var(--panel2); }

.banner { margin: 0 0 16px; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--red-line); background: var(--red-bg); color: #fecaca; font-size: 13px; }
.banner.warn { border-color: var(--amber-line); background: var(--amber-bg); color: #fde4b0; }
.banner b { color: #fff; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; min-width: 0; }
.panel.pad { padding: 16px 18px; }
.panel.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head b { font-size: 13px; }
.panel-head .dim { font-size: 11.5px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.card-label { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 600; }
.card-label.amber { color: var(--amber); }
.card-value { font-size: 26px; font-weight: 650; margin-top: 6px; font-variant-numeric: tabular-nums; }
.card-value.small { font-size: 17px; padding: 8px 0 3px; }
.card-value.amber { color: var(--amber); } .card-value.red { color: var(--red); }
.card-foot { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.card-foot.wrap { white-space: normal; line-height: 1.5; }
.bar { height: 4px; background: var(--line2); border-radius: 3px; overflow: hidden; margin: 4px 0 6px; }
.bar-fill { height: 100%; width: 0; background: var(--blue); transition: width .4s; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two > .panel, .two > .card { margin-bottom: 16px; }
.p { color: #c5cad4; line-height: 1.6; font-size: 12.5px; margin: 8px 0 0; }
.p.big { font-size: 13.5px; }
b.h { font-size: 14px; }
.foot { color: var(--dim); font-size: 11.5px; padding: 6px 2px 0; line-height: 1.6; }
.foot a { color: var(--muted); }

/* ===================================================================== RSI scanner */
.overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.overview .card-label { margin-bottom: 0; }
.tabs { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: none; border: none; padding: 8px 13px; border-radius: 7px; color: var(--muted); cursor: pointer; font-weight: 500; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel2); color: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.count { background: var(--bg); border: 1px solid var(--line2); color: var(--muted); border-radius: 10px; padding: 0 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.count-alert { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.count-cross { background: var(--blue-bg); border-color: var(--blue-line); color: #cfe3ff; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toolbar input[type=search] { width: 200px; background: var(--bg); }
.group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.group-label { color: var(--dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; margin-right: 2px; }
.chip { border: 1px solid var(--line2); border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--muted); user-select: none; background: transparent; }
.chip:hover { color: var(--text); }
.chip.on { color: var(--green); border-color: var(--green-line); background: var(--green-bg); }
.toggle { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; cursor: pointer; }
.toolbar .spacer { flex: 1; }

.table-wrap { overflow: auto; max-height: calc(100vh - 170px); min-height: 260px; }
.table-wrap.flat { max-height: none; min-height: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th.sortable { cursor: pointer; }
thead th.sortable:hover { color: var(--text); }
thead th .arr { color: var(--green); margin-left: 3px; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; color: #d6dae2; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.015); }
tbody tr.multi td { background: rgba(240,86,91,.035); }
tbody tr.preview td { opacity: .82; }
tbody tr.row-hl td { background: rgba(242,181,68,.05); }
td.num, th.num { text-align: right; }
td.wrap { white-space: normal; min-width: 320px; }
.empty-row { text-align: center; color: var(--muted); padding: 24px 14px !important; }
.sym { font-weight: 650; color: #fff; text-decoration: none; letter-spacing: .01em; display: inline-flex; align-items: center; gap: 8px; }
a.sym:hover { color: var(--green); }
.sym .quote { color: var(--dim); font-weight: 400; margin-left: 1px; }
.tf { font-size: 11px; border: 1px solid var(--line2); border-radius: 5px; padding: 1px 7px; color: var(--muted); font-family: var(--mono); }
.rsi { font-family: var(--mono); font-weight: 700; }
a.chart { color: var(--dim); text-decoration: none; font-size: 12px; }
a.chart:hover { color: var(--blue); }
a.open { color: var(--muted); text-decoration: none; font-size: 12px; margin-right: 8px; }
a.open:hover { color: var(--green); }

.st { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.st-RETEST, .st-OS3 { color: #ffd5d5; background: rgba(240,86,91,.22); }
.st-NEAR, .st-OS2 { color: var(--red); background: var(--red-bg); }
.st-EARLY, .st-OS1 { color: var(--amber); background: var(--amber-bg); }
.st-ALERT { color: #ffd38a; background: rgba(242,181,68,.2); }
.st-MONITOR { color: var(--green); background: var(--green-bg); }
.st-ENDED { color: var(--muted); background: var(--panel2); font-weight: 500; }
.badge-new { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #0b0d10; background: var(--amber); border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }
tbody tr.new td { background: rgba(242,181,68,.06); }
tbody tr.ended td { opacity: .6; }
.badge-live { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--blue); border: 1px solid var(--blue-line); background: var(--blue-bg); border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }
.multi-badge { display: inline-block; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 6px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line2); }
.multi-badge.m2 { color: var(--amber); border-color: var(--amber-line); background: var(--amber-bg); }
.multi-badge.m3 { color: var(--red); border-color: var(--red-line); background: var(--red-bg); }
.cond { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; margin: 1px 4px 1px 0; border: 1px solid var(--line2); background: var(--panel2); }
.cond.a50 { border-color: var(--amber-line); color: #fde4b0; }
.cond.os { border-color: var(--red-line); color: #fecaca; }
.src { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.src-fresh { background: var(--green); } .src-cached { background: #64748b; } .src-stale { background: var(--amber); }
.sig { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.sig-L { color: var(--green); background: var(--green-bg); }
.sig-S { color: var(--red); background: var(--red-bg); }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

/* RSI colours */
.r-ob { color: var(--red) !important; } .r-hi { color: var(--soft-red) !important; }
.r-os { color: var(--green) !important; } .r-lo { color: var(--soft-green) !important; }

/* ===================================================================== coin / chart pages */
.coin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ttl { display: flex; gap: 14px; align-items: center; min-width: 0; }
.bigic { width: 46px; height: 46px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line2); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; flex: none; }
.ttl-sub { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; }
.ttl-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.chg { font-size: 14px; }
.meta { display: flex; gap: 24px; align-items: center; color: var(--muted); font-size: 11.5px; flex-wrap: wrap; }
.meta > div b { display: block; color: #fff; font-size: 14px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.coin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.coin-grid.single { grid-template-columns: minmax(0, 1fr); }
.chart-panel { overflow: hidden; }
.chart-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.small-note { font-size: 11.5px; }
.chart-box { height: 62vh; min-height: 440px; }
.chart-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.side-panel .pn { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.side-panel .pn:last-child { border-bottom: 0; }
.pn h4 { margin: 0 0 10px; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); font-weight: 600; display: flex; justify-content: space-between; }
.pn h4 .dim { letter-spacing: .04em; text-transform: none; font-weight: 400; }
.rsig { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rc { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 4px; text-align: center; }
.rc span { display: block; color: var(--dim); font-size: 10px; }
.rc b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rgs { display: flex; gap: 5px; }
.rg { flex: 1; text-align: center; border-radius: 6px; padding: 6px 3px; min-width: 0; }
.rg-tf { color: var(--dim); font-size: 10px; white-space: nowrap; }
.rg-l { font-size: 10.5px; font-weight: 700; margin-top: 1px; line-height: 1.2; }
.rg-bull { background: rgba(61,220,132,.12); } .rg-bull .rg-l { color: var(--green); }
.rg-nbull { background: rgba(61,220,132,.06); } .rg-nbull .rg-l { color: var(--soft-green); }
.rg-nbear { background: rgba(240,86,91,.06); } .rg-nbear .rg-l { color: var(--soft-red); }
.rg-bear { background: rgba(240,86,91,.12); } .rg-bear .rg-l { color: var(--red); }
.rg-na { background: var(--panel2); } .rg-na .rg-l { color: var(--dim); }
.rg-t { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; }
.rg-t-bull { color: var(--green); } .rg-t-nbull { color: var(--soft-green); } .rg-t-nbear { color: var(--soft-red); } .rg-t-bear { color: var(--red); } .rg-t-na { color: var(--dim); }
span.rg-t-bull, span.rg-t-bear { background: transparent; }
.rg-legend { color: var(--dim); font-size: 10.5px; margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 2px; }
.rg-dot.bull { background: var(--green); } .rg-dot.nbull { background: var(--soft-green); } .rg-dot.nbear { background: var(--soft-red); } .rg-dot.bear { background: var(--red); }
.warn-line { color: var(--red); font-size: 12px; margin: 10px 0 0; }
.lvrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.lvrow:last-of-type { border-bottom: 0; }
.more { margin: 10px 0 0; font-size: 12px; }
.more a { color: var(--green); text-decoration: none; }

/* analysis under the chart (bias, trade areas, levels) */
.analysis { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.analysis h3 { margin: 0; font-size: 17px; font-weight: 650; }
.analysis h4 { margin: 0 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); font-weight: 600; }
.an-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11.5px; }
.small { font-size: 11.5px; margin-bottom: 6px; }
.bias { border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.bias p { margin: 6px 0 0; color: #c5cad4; line-height: 1.6; }
.bias .b-label { font-weight: 700; font-size: 14px; }
.bias .b-flip { color: var(--muted); font-size: 13px; }
.b-bullish { border-left-color: var(--green); } .b-bullish .b-label { color: var(--green); }
.b-bearish { border-left-color: var(--red); } .b-bearish .b-label { color: #ff8a8a; }
.b-neutral { border-left-color: var(--amber); } .b-neutral .b-label { color: var(--amber); }
.an-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.an-2 > section, .lvbox, .rules { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.an-2 > section:first-child { background: linear-gradient(180deg, rgba(61,220,132,.05), transparent 120px), var(--panel); }
.an-2 > section:last-child { background: linear-gradient(180deg, rgba(240,86,91,.05), transparent 120px), var(--panel); }
.h-long { color: var(--green) !important; } .h-short { color: #ff8a8a !important; }
.tcard { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; background: var(--bg); }
.tcard.long { border-left: 3px solid var(--green); } .tcard.short { border-left: 3px solid var(--red); }
.tc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-zone { font: 700 14px var(--mono); }
.tc-dist { margin-left: auto; color: var(--dim); font: 12px var(--mono); }
.tc-dist .here { color: var(--amber); font-family: inherit; }
.tc-why { color: #c5cad4; font-size: 13px; margin-top: 6px; line-height: 1.55; }
.tc-inv { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tc-inv span { font-weight: 700; color: var(--dim); text-transform: uppercase; font-size: 10px; letter-spacing: .06em; margin-right: 4px; }
.kind { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 4px; border: 1px solid; }
.k-scalp { color: #cfe3ff; border-color: var(--blue-line); background: var(--blue-bg); }
.k-day { color: #ffd38a; border-color: var(--amber-line); background: var(--amber-bg); }
.k-swing { color: #e3c8ff; border-color: #5b3d80; background: rgba(168,117,255,.13); }
.an-3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-3.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-3.n1 { grid-template-columns: minmax(0, 1fr); }
.lv { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.lv .t { font-weight: 700; font-size: 11px; text-align: center; border-radius: 4px; height: 20px; line-height: 20px; }
.lv .t.R { color: var(--red); background: var(--red-bg); } .lv .t.S { color: var(--green); background: var(--green-bg); }
.lv .z { font: 700 13px var(--mono); }
.lv .l { grid-column: 2; color: var(--muted); font-size: 12px; }
.lv.next .z::after { content: " · " attr(data-near); color: var(--amber); font: 600 11px -apple-system, sans-serif; }
.tfb { font: 600 10px var(--mono); color: var(--muted); border: 1px solid var(--line2); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.stars { color: var(--amber); font-size: 11px; margin-left: 6px; letter-spacing: 1px; }
.lv-ref { margin: 4px 0; padding: 4px 8px; border-radius: 6px; background: var(--amber-bg); color: var(--amber); font: 700 12px var(--mono); }
.rules ul { margin: 6px 0 0; padding-left: 18px; color: #c5cad4; font-size: 13px; line-height: 1.6; }
.analysis .note { color: var(--muted); font-size: 12px; margin: 0; }
.analysis .disc { color: var(--dim); font-size: 11.5px; margin: 0; }
.lang { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; margin-right: 6px; }
.lang button { background: var(--panel); border: 0; padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--panel2); color: var(--text); }

/* ===================================================================== commodities RSI scanner */
.subtabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 18px; }
.subtabs a { padding: 7px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 13px; }
.subtabs a:hover { color: var(--text); }
.subtabs a.on { background: var(--panel2); color: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.mcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.mcard { text-decoration: none; display: block; transition: border-color .15s; }
.mcard:hover { border-color: var(--line2); }
.mc-top { display: flex; justify-content: space-between; align-items: center; }
.mc-name { display: flex; gap: 10px; align-items: center; }
.mc-name b { font-size: 14px; }
.mc-name .dim { font-size: 11px; }
.mc-top .arrow { color: var(--dim); }
.ci { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 800; flex: none; }
.sym .ci { width: 22px; height: 22px; font-size: 8.5px; }
.mc-price { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 10px; }
.mc-price span:first-child { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.mc-note { color: #b9bfca; font-size: 11.5px; line-height: 1.5; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.lg { display: flex; gap: 12px; color: var(--muted); font-size: 11px; flex-wrap: wrap; align-items: center; }
.lg i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg i.ob { background: var(--red); } .lg i.hi { background: var(--soft-red); } .lg i.lo { background: var(--soft-green); } .lg i.os { background: var(--green); }
table.heat td.hc { font-size: 14px; }
table.heat td.hc.r-ob { background: rgba(240,86,91,.16); } table.heat td.hc.r-hi { background: rgba(240,86,91,.06); }
table.heat td.hc.r-os { background: rgba(61,220,132,.16); } table.heat td.hc.r-lo { background: rgba(61,220,132,.06); }
table.heat td.hc b { font-weight: 650; }
.hl { font-size: 10px; font-weight: 700; margin-top: 1px; }
.howto { padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
.howto b { color: #fff; }

/* ===================================================================== sessions */
.kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0; }
.kv { font-size: 19px; font-weight: 650; margin-top: 8px; }
.kv .st { vertical-align: middle; margin-left: 6px; }
.k-active { border-color: var(--green-line); background: linear-gradient(180deg, rgba(61,220,132,.07), transparent), var(--panel); }
.k-active.closed { border-color: var(--line2); background: var(--panel); }
.z3 { display: inline-block; margin-right: 10px; font-variant-numeric: tabular-nums; }
.nd { font-size: 9.5px; color: var(--dim); margin-left: 3px; vertical-align: 2px; }
.seg-toggle { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; margin-left: auto; }
.seg-toggle button { background: transparent; border: 0; padding: 5px 11px; font-size: 12px; color: var(--muted); cursor: pointer; }
.seg-toggle button.on { background: var(--panel2); color: #fff; }
.tl { padding: 34px 22px 18px; overflow-x: auto; }
.tl-in { position: relative; min-width: 640px; }
.tick { position: absolute; top: 0; bottom: 22px; border-left: 1px solid var(--line); }
.tlab { position: absolute; bottom: 0; transform: translateX(-50%); color: var(--dim); font-size: 11px; }
.ovl { position: absolute; top: 0; bottom: 22px; background: rgba(61,220,132,.06); }
.seg { position: absolute; height: 28px; border: 1px solid; border-radius: 6px; color: #fff; font-size: 12px; display: flex; align-items: center; gap: 8px; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.seg span { color: var(--muted); }
.now { position: absolute; top: -8px; bottom: 18px; border-left: 2px solid #fff; }
.now-lab { position: absolute; top: -26px; transform: translateX(-50%); background: #fff; color: #000; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.scards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.scard.on { border-color: var(--green-line); }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-top b { font-size: 14px; }
.ztable { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ztable > div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ztable > div:last-child { border-bottom: 0; }
.ztable span { color: var(--muted); }
.ztable i { color: var(--dim); font-style: normal; font-size: 10px; }
.ztable b { font-variant-numeric: tabular-nums; }

/* ===================================================================== CPI */
.hero-row-wrap { margin-bottom: 0; }
.hero-row-wrap > .card { margin-bottom: 16px; }
.hero { border-color: var(--amber-line); background: linear-gradient(180deg, rgba(242,181,68,.08), transparent), var(--panel); }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.hero-t { font-size: 23px; font-weight: 650; }
.zrow { margin-top: 8px; color: #c5cad4; }
.hero-c { text-align: right; }
.cd { font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; border-radius: 4px; padding: 2px 7px; }
.tag-cpi { background: var(--amber-bg); color: var(--amber); }
.tag-ppi { background: var(--blue-bg); color: var(--blue); }
.imp { letter-spacing: 1px; }
.imp.hi { color: var(--red); } .imp.md { color: var(--amber); } .imp.off { color: var(--line2); }

/* ===================================================================== settings modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; }
.modal-box { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 20px 22px; width: min(560px, calc(100vw - 32px)); }
.modal-box h3 { margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid2 label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12.5px; }
.hint { color: var(--dim); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; margin-top: 10px; }
.modal-actions .hint { flex: 1; }
body.member .admin-only { display: none !important; }

/* ===================================================================== responsive */
@media (max-width: 1280px) {
  .overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1000px) {
  .coin-grid, .two, .an-2, .an-3, .an-3.n2, .scards { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-box { height: 56vh; min-height: 360px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .menu-btn { display: flex; }
  .top { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .crumb { flex: 1; }
  .gsearch { order: 3; flex-basis: 100%; }
  .gsearch input { max-width: none; }
  .content { padding: 18px 16px 30px; }
  .top-actions .inline, #refreshBtn { display: none !important; }
}
@media (max-width: 600px) {
  .mcards, .kpis, .kpis.three { grid-template-columns: minmax(0, 1fr); }
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .overview .progress-card { grid-column: span 2; }
  .overview .card { padding: 12px; }
  .card-value { font-size: 22px; }
  .price { font-size: 24px; }
  .meta { gap: 14px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* ===================================================================== altcoin lists */
.alt-tabs { display: flex; gap: 4px; margin: 0 10px 6px; padding: 3px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); }
.alt-tabs button { flex: 1; background: transparent; border: 0; border-radius: 6px; padding: 5px 4px; font-size: 11.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.alt-tabs button span { color: var(--dim); margin-left: 2px; }
.alt-tabs button[data-side="bull"].on { background: var(--green-bg); color: var(--green); }
.alt-tabs button[data-side="bear"].on { background: var(--red-bg); color: var(--red); }
.alt-more { display: block; padding: 6px 10px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.alt-more:hover { color: var(--green); }
.subtabs .count { margin-left: 6px; }
.rule-note { margin: -4px 0 16px; padding: 10px 14px; border-radius: 8px; font-size: 12.5px; color: #c5cad4; border: 1px solid var(--line); background: var(--panel); border-left: 3px solid var(--green); }
.rule-note.bear { border-left-color: var(--red); }

/* ===================================================================== right-hand panel: bigger text */
.side-panel { font-size: 14px; }
.side-panel .pn { padding: 16px 18px; }
.side-panel .pn h4 { font-size: 11px; margin-bottom: 12px; }
.side-panel .rc { padding: 8px 4px; }
.side-panel .rc span { font-size: 11px; }
.side-panel .rc b { font-size: 18px; }
.side-panel .rg-tf { font-size: 11px; }
.side-panel .rg-l { font-size: 12px; }
.side-panel .rg-legend { font-size: 11.5px; }
.side-panel .lvrow { font-size: 14px; padding: 9px 0; }
.side-panel .p, .side-panel .warn-line { font-size: 13.5px; }
.side-panel .st, .side-panel .sig { font-size: 12px; }
.side-panel .tf { font-size: 12px; }
.marow { display: grid; grid-template-columns: 46px 86px 1fr; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.marow .mono { font-size: 13px; text-align: right; }
.ma-st { font-weight: 700; font-size: 13px; }
.ma-st.above { color: var(--green); } .ma-st.below { color: var(--red); }
.ma-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; line-height: 1.5; }
.ma-note.good { background: var(--green-bg); color: #bff3d5; }
.ma-note.warn { background: var(--amber-bg); color: #fde4b0; }
.ma-note.bad { background: var(--red-bg); color: #fecaca; }
.coin-grid { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1280px) { .coin-grid { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (max-width: 1000px) { .coin-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===================================================================== recovery report */
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card-value.up { color: var(--green); } .card-value.down { color: var(--red); }
.rtools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 14px; }
.rtools input[type=search] { width: 200px; background: var(--bg); }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.rc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rc-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rc-name b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-name .rank { color: var(--dim); font-size: 12px; }
.rc-price { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 10px; flex-wrap: wrap; }
.rc-price .pr { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rspark { width: 100%; height: 150px; display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.rc-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 12px; }
.rc-cols h5 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.rrow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rrow > span:first-child { color: var(--muted); white-space: nowrap; }
.rrow b { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.rrow > span:last-child { font-variant-numeric: tabular-nums; text-align: right; min-width: 52px; }
.rc-text { color: #c5cad4; font-size: 13.5px; line-height: 1.6; margin: 12px 0 10px; }
.rc-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12.5px; color: var(--muted); }
.rc-foot input { width: 110px; margin-left: 6px; background: var(--bg); }
.rc-foot .be { color: #fde4b0; flex: 1; min-width: 160px; }
.rc-foot .open { margin-left: auto; }
@media (max-width: 1100px) { .rgrid { grid-template-columns: minmax(0, 1fr); } .kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rc-cols { grid-template-columns: minmax(0, 1fr); } .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===================================================================== gold / silver outlook */
.outlook { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.ol-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ol-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.ol-stats > div > span:first-child { display: block; color: var(--dim); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.ol-stats b span { font-size: 13px; font-weight: 500; }
.ol-stats b span.rsi-n { font-size: 17px; font-weight: 700; }
.ol-stats b { display: block; font-size: 17px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.ol-steps { margin: 10px 0 0; padding-left: 22px; }
.ol-steps li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ol-steps li::marker { color: var(--green); font-weight: 700; }
.ol-steps li.hold::marker { color: var(--amber); }
.ol-steps li.ath .ol-z b { color: var(--amber); }
.ol-z { display: flex; align-items: center; gap: 8px; font: 700 14px var(--mono); }
.ol-low { margin: 10px 0 2px; color: var(--muted); font-size: 13px; }
.ol-low b { color: #fff; }
@media (max-width: 1100px) { .ol-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ol-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- members-only prompt (accounts on, no subscription) */
#viewLock{display:grid;place-items:center;min-height:60vh}
#viewLock.hidden{display:none}
.lock-card{max-width:520px;text-align:center;background:var(--panel,#12151b);border:1px solid var(--line,#222731);border-radius:14px;padding:34px 30px}
.lock-ic{font-size:30px;margin-bottom:8px}
.lock-card h2{margin:0 0 10px;font-size:22px}
.lock-card p{color:var(--muted,#8a93a3);margin:0 0 16px;line-height:1.55}
.lock-price{margin:4px 0 18px;color:var(--muted,#8a93a3)}.lock-price b{color:var(--text,#e8ebf0);font-size:22px}
.lock-btns{display:flex;gap:10px;justify-content:center;margin-bottom:18px}
.lock-btn{display:inline-flex;align-items:center;line-height:1.2;padding:11px 20px;border-radius:9px;border:1px solid var(--line2,#2c3240);color:var(--text,#e8ebf0);font-weight:600;text-decoration:none}
.lock-btn.p{background:#3ddc84;border-color:#3ddc84;color:#04210f}
.lock-free{font-size:13px}
body.locked .nav .it:not([data-href="#cpi"]):not([data-href="#usdtd"]):not([data-href="#dominance"]) .v::after{content:"🔒";font-size:10px;opacity:.6}
body.locked .alt-search,body.locked .alt-tabs,body.locked #altList{display:none}
body.locked #freshness{display:none}
