* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #1e222d; background: #f4f6fa; }
[hidden] { display: none !important; }
#top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
       background: #fff; border-bottom: 1px solid #dfe5f2; }
.brand { font-size: 18px; font-weight: bold; color: #2962ff; }
.brand span { color: #1e222d; }
#who { font-size: 13px; color: #787b86; display: flex; align-items: center; gap: 10px; }
.pill { padding: 2px 10px; border-radius: 10px; background: #e3ebff; color: #2962ff; font-weight: bold; font-size: 12px; }
main { max-width: 1200px; margin: 0 auto; padding: 18px 16px 40px; }
h1 { font-size: 20px; margin: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.muted { color: #787b86; font-size: 13px; }
.small { font-size: 12px; margin-top: 10px; }
.note { background: #fff8e1; border: 1px solid #f5d98b; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.card { max-width: 420px; margin: 60px auto; background: #fff; border: 1px solid #dfe5f2; border-radius: 12px; padding: 28px; }
.card p { color: #787b86; font-size: 14px; line-height: 1.5; }
.msg { color: #c5221f !important; min-height: 20px; }
.btn, .tf { background: #2962ff; color: #fff; border: 0; border-radius: 20px; padding: 8px 18px; font-size: 13px;
            font-weight: bold; cursor: pointer; }
.btn:hover { background: #1e4fd8; }
.linkbtn { background: none; border: 0; color: #2962ff; cursor: pointer; font-size: 13px; padding: 0; }
.tfs { display: flex; background: #fff; border: 1px solid #c9d3ea; border-radius: 20px; padding: 3px; }
.tf { background: transparent; color: #2962ff; padding: 6px 16px; }
.tf.on { background: #2962ff; color: #fff; }
.scroll { overflow-x: auto; background: #fff; border: 1px solid #dfe5f2; border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { position: sticky; top: 0; background: #f4f6fa; text-align: right; padding: 10px 12px; font-size: 12px; color: #787b86;
     cursor: pointer; white-space: nowrap; user-select: none; }
th:first-child, td:first-child { text-align: left; }
th.sorted { color: #2962ff; }
td { padding: 9px 12px; text-align: right; border-top: 1px solid #eef1f6; white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover td:first-child { color: #2962ff; text-decoration: underline; }
tr.locked { cursor: default; color: #a3a6af; }
tr.locked:hover td:first-child { color: #a3a6af; text-decoration: none; }
td.num { font-weight: bold; }
.up { color: #0b8043; } .dn { color: #c5221f; }
.tag { display: inline-block; min-width: 48px; text-align: center; padding: 2px 8px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: bold; }
.tag.up { background: #0b8043; } .tag.dn { background: #c5221f; }
.btn.ghost { background: #fff; color: #2962ff; border: 1px solid #c9d3ea; }
.btn.ghost:hover { background: #e3ebff; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
       padding: 8px 12px; background: #fff; border: 1px solid #dfe5f2; border-radius: 10px; }
.bar .left { display: flex; gap: 8px; }
.center { text-align: center; min-width: 240px; }
select { font-weight: bold; color: #1e222d; border: 1px solid #c9d3ea; border-radius: 8px; background: #fff; cursor: pointer; }
select:hover, select:focus { border-color: #2962ff; outline: none; }
select:disabled { color: #a3a6af; cursor: not-allowed; }
#isel { font-size: 15px; padding: 6px 10px; max-width: 280px; }
#stitle { font-size: 16px; font-weight: bold; }
#meta { font-size: 12px; margin-top: 2px; }
#opts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; padding: 8px 12px; background: #fff;
        border: 1px solid #dfe5f2; border-radius: 10px; font-size: 13px; }
#opts label { font-weight: bold; cursor: pointer; white-space: nowrap; user-select: none; }
#opts label.off { color: #a3a6af; cursor: not-allowed; }
#opts input { vertical-align: middle; margin: 0 5px 2px 0; }
.dot { display: inline-block; width: 10px; height: 3px; margin: 0 5px 3px 0; vertical-align: middle; }
#cmp { font-size: 13px; padding: 4px 8px; max-width: 220px; }
#main { display: flex; gap: 10px; margin-top: 8px; align-items: stretch; }
#chartbox { position: relative; flex: 1; min-width: 0; background: #fff; border: 1px solid #dfe5f2; border-radius: 10px; padding: 8px; }
#loading { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 5; display: none; align-items: center; justify-content: center;
           background: rgba(255,255,255,.75); font-weight: bold; color: #2962ff; border-radius: 10px; }
.spin { width: 26px; height: 26px; margin-right: 10px; border: 3px solid #c9d3ea; border-top-color: #2962ff; border-radius: 50%;
        animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
#side { flex: none; width: 260px; background: #fff; border: 1px solid #dfe5f2; border-radius: 10px; overflow: hidden;
        display: flex; flex-direction: column; }
.sh { flex: none; padding: 9px 10px; background: #f4f6fa; font-size: 13px; font-weight: bold; }
#ssel, #sort { flex: none; margin: 8px; font-size: 13px; padding: 6px 8px; }
#fund { flex: none; padding: 2px 10px 8px; border-bottom: 1px solid #dfe5f2; }
.fl { font-size: 11px; color: #787b86; margin-bottom: 6px; line-height: 1.4; }
.fg { display: flex; flex-wrap: wrap; }
.fi { width: 50%; padding: 3px 4px 3px 0; }
.fk { display: block; font-size: 10px; color: #787b86; }
.fv { display: block; font-size: 12px; font-weight: bold; }
#list { flex: 1; overflow-y: auto; border-top: 1px solid #dfe5f2; min-height: 120px; }
.srow { display: flex; align-items: center; padding: 6px 10px; font-size: 12px; cursor: pointer; border-bottom: 1px solid #f0f2f7; }
.srow:hover { background: #eef3ff; }
.srow.on { background: #dbe6ff; }
.rk { width: 18px; color: #787b86; flex: none; }
.nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 6px; }
.rt { flex: none; font-weight: bold; }
.empty, #sidenote { padding: 10px; font-size: 12px; color: #787b86; line-height: 1.5; }
#sidenote { border-top: 1px solid #dfe5f2; background: #fff8e1; }
@media (max-width: 860px) {
  #main { flex-direction: column; }
  #side { width: auto; max-height: 420px; }
}
#nav { display: flex; gap: 4px; }
#nav a { padding: 7px 14px; border-radius: 18px; font-size: 14px; font-weight: bold; color: #1e222d; text-decoration: none; }
#nav a:hover { background: #eef3ff; }
#nav a.on { background: #2962ff; color: #fff; }
.scroll.tall { max-height: calc(100vh - 170px); overflow-y: auto; }
td.txt { text-align: left; white-space: normal; max-width: 320px; color: #787b86; font-size: 12px; }
.btn.star { background: #fff; color: #e08e00; border: 1px solid #f59f00; }
.btn.star:hover { background: #fff6e0; }
.btn.star.on, .btn.star.on:hover { background: #f59f00; color: #fff; }
#sumbox { max-width: 760px; margin: 0 auto; }
.banner { background: #2962ff; color: #fff; padding: 16px 18px; border-radius: 10px; }
.banner b { display: block; font-size: 19px; }
.tiles { display: flex; gap: 8px; margin: 8px 0 0; flex-wrap: wrap; }
.tile { flex: 1; min-width: 140px; background: #fff; border: 1px solid #dfe5f2; border-radius: 10px; padding: 12px 14px; }
.tile small { display: block; font-size: 11px; color: #787b86; }
.tile span { font-size: 18px; font-weight: bold; }
.sumh { margin: 24px 0 8px; font-size: 15px; font-weight: bold; }
.sumt { background: #fff; border: 1px solid #dfe5f2; border-radius: 10px; overflow: hidden; }
.sumt th { position: static; cursor: default; }
.sumt tr { cursor: default; }
.sumt a { color: #2962ff; text-decoration: none; }
.sumt a:hover { text-decoration: underline; }
.barcell { width: 170px; }
.barcell div { height: 10px; border-radius: 2px; min-width: 2px; }
@media (max-width: 860px) { #top { flex-wrap: wrap; gap: 8px; } }
