:root{
  --bg:#eef2f7;
  --surface:#fff;
  --ink:#14243a;
  --muted:#5b6c82;
  --line:#cdd7e4;
  --cobalt:#235db2;
  --green:#187d67;
  --red:#bc494f;
  --amber:#8c6500;
  --bluewash:#e6effc;
  --radius:10px;
  --shadow:0 8px 24px rgba(23,48,82,.07)
}
*{
  box-sizing:border-box
}
html{
  scroll-padding-top:20px
}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:15px/1.45 "Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif
}
.mono,dd,td{
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  font-variant-numeric:tabular-nums
}
.skip-link{
  position:fixed;
  top:8px;
  left:8px;
  z-index:20;
  padding:8px 12px;
  background:var(--ink);
  color:#fff;
  transform:translateY(-140%)
}
.skip-link:focus{
  transform:translateY(0)
}
button{
  font:inherit
}
button{
  cursor:pointer
}
.topbar{
  min-height:67px;
  padding:12px max(20px,calc((100vw - 1440px)/2));
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.85);
  gap:16px
}
.brand{
  display:flex;
  align-items:center;
  gap:10px
}
.brand-mark{
  width:25px;
  height:28px;
  background:linear-gradient(180deg,var(--cobalt) 0 28%,transparent 28% 39%,var(--cobalt) 39% 64%,transparent 64% 75%,var(--cobalt) 75%);
  border-left:5px solid var(--ink)
}
.brand strong,.brand span{
  display:block
}
.brand strong{
  font-size:13px;
  letter-spacing:.11em
}
.brand span,.eyebrow,.panel-note,.quiet-status,.section-heading>p,small{
  color:var(--muted);
  font-size:12px
}
.header-status{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px
}
.status-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--muted)
}
.status-dot.ok{
  background:var(--green)
}
.status-dot.warn{
  background:var(--amber)
}
.status-dot.error{
  background:var(--red)
}
.shell{
  max-width:1440px;
  margin:auto;
  padding:28px 20px 44px
}
.overview,.control-strip,.chart-heading,.panel-heading,.section-heading,.pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}
.overview{
  margin-bottom:22px
}
.eyebrow{
  margin:0 0 3px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:700
}
h1,h2,h3,p{
  margin-top:0
}
h1{
  font-size:28px;
  letter-spacing:-.04em;
  margin-bottom:0
}
h2{
  font-size:18px;
  letter-spacing:-.02em;
  margin-bottom:0
}
h3{
  font-size:13px;
  margin:16px 0 7px
}
.market-quote{
  text-align:right
}
.market-quote span,.market-quote small{
  display:block
}
.market-quote strong{
  display:block;
  font-size:25px;
  line-height:1.2;
  color:var(--cobalt)
}
.control-strip{
  padding:10px 0;
  margin-bottom:12px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  justify-content:flex-start;
  flex-wrap:wrap
}
.segmented{
  display:flex;
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden
}
.segmented button{
  border:0;
  background:#fff;
  min-height:36px;
  padding:0 13px;
  color:var(--muted)
}
.segmented button+button{
  border-left:1px solid var(--line)
}
.segmented .is-selected{
  background:var(--cobalt);
  color:#fff
}
.strategy-filters,.strategy-filters label{
  display:flex;
  align-items:center;
  gap:6px
}
.strategy-filters{
  flex-wrap:wrap;
  gap:6px 14px;
  font-size:13px
}
.strategy-filters label{
  min-height:36px;
  cursor:pointer
}
.strategy-filters input{
  width:16px;
  height:16px;
  accent-color:var(--cobalt)
}
.button-secondary{
  min-height:36px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--ink)
}
.button-secondary:hover{
  border-color:var(--cobalt);
  color:var(--cobalt)
}
.button-secondary:disabled{
  opacity:.45;
  cursor:not-allowed
}
.quiet-status{
  margin-left:auto
}
.monitor-strip{
  display:flex;
  align-items:center;
  gap:10px 18px;
  flex-wrap:wrap;
  margin:12px 0;
  padding:9px 12px;
  border:1px solid var(--line);
  border-left:3px solid var(--cobalt);
  background:var(--surface);
  color:var(--muted);
  font-size:12px
}
.monitor-strip strong{
  color:var(--ink);
  font-size:13px
}
.workspace{
  display:grid;
  grid-template-columns:minmax(0,3fr) minmax(270px,1fr);
  gap:14px
}
.chart-card,.panel,.variant-cards article{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow)
}
.chart-card{
  padding:18px;
  min-width:0
}
.panel,.side-rail,.lower-grid>*{
  min-width:0
}
.header-status{
  min-width:0;
  max-width:65%
}
#service-status-text{
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical
}
.chart-legend{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  font-size:12px;
  color:var(--muted)
}
.chart-legend span{
  display:flex;
  align-items:center;
  gap:4px
}
.legend-line{
  width:18px;
  border-top:2px solid;
  display:inline-block
}
.legend-band{
  width:18px;
  height:10px;
  background:rgba(35,93,178,.1);
  border:1px solid rgba(35,93,178,.3)
}
.upper{
  border-color:var(--red)
}
.middle{
  border-color:var(--amber);
  border-top-style:dashed
}
.lower{
  border-color:var(--green)
}
.chart-wrap{
  height:530px;
  position:relative;
  margin-top:14px
}
.chart-canvas{
  height:100%;
  width:100%
}
.chart-empty{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:30px;
  text-align:center;
  color:var(--muted);
  background:rgba(255,255,255,.88)
}
.chart-foot{
  padding-top:10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
  font-size:12px
}
.chart-foot a{
  color:var(--cobalt)
}
.side-rail{
  display:grid;
  gap:14px;
  align-content:start
}
.panel{
  padding:16px
}
.panel-heading time{
  font-size:11px;
  color:var(--muted)
}
.box-levels{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  margin:14px 0 10px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line)
}
.box-levels div{
  padding:10px 4px
}
.box-levels div+div{
  border-left:1px solid var(--line)
}
dt{
  font-size:12px;
  color:var(--muted)
}
dd{
  margin:3px 0 0;
  font-weight:700
}
.box-levels div:nth-child(1) dd{
  color:var(--red)
}
.box-levels div:nth-child(2) dd{
  color:var(--amber)
}
.box-levels div:nth-child(3) dd{
  color:var(--green)
}
.panel-note{
  margin-bottom:8px
}
.touch-list,.cycle-assumptions ul{
  margin:0;
  padding-left:18px;
  font-size:12px
}
.touch-list li+li{
  margin-top:4px
}
.gex-table-wrap{
  max-height:215px;
  overflow:auto
}
table{
  width:100%;
  border-collapse:collapse;
  font-size:12px
}
th{
  text-align:left;
  color:var(--muted);
  font-weight:600
}
th,td{
  padding:7px 5px;
  border-bottom:1px solid #e7edf4
}
td:last-child,th:last-child{
  text-align:right
}
.section-heading{
  margin:28px 0 10px;
  align-items:end
}
.section-heading>p{
  margin:0;
  text-align:right;
  max-width:420px
}
.trade-heading-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:16px
}
.variant-cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px
}
.variant-cards article{
  padding:16px;
  position:relative
}
.variant-card-top{
  display:flex;
  justify-content:space-between;
  gap:8px
}
.variant-card-top strong{
  font-size:16px
}
.variant-metrics{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
  margin-top:16px
}
.variant-metrics div{
  border-left:2px solid var(--line);
  padding-left:8px
}
.variant-metrics span{
  display:block;
  font-size:11px;
  color:var(--muted)
}
.variant-metrics b{
  font-size:14px
}
.positive{
  color:var(--green)
}
.negative{
  color:var(--red)
}
.neutral{
  color:var(--muted)
}
.lower-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:14px;
  margin-top:14px
}
.details-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin:16px 0
}
.details-grid div{
  border-top:1px solid var(--line);
  padding-top:7px
}
.status-badge{
  font-size:11px;
  padding:3px 7px;
  border-radius:20px;
  background:#e8edf3
}
.status-badge.ok{
  color:var(--green);
  background:#dcefe9
}
.status-badge.warn{
  color:var(--amber);
  background:#f4ead0
}
.status-badge.error{
  color:var(--red);
  background:#f6e1e2
}
.source-list{
  margin:0
}
.source-list div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:9px 0;
  border-bottom:1px solid var(--line)
}
.source-list dd{
  text-align:right;
  font-size:11px
}
.trade-section{
  margin-top:28px
}
.table-scroll{
  overflow-x:auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius)
}
.trades-table{
  min-width:900px
}
.trades-table tbody tr{
  cursor:pointer
}
.trades-table tbody tr:hover{
  background:var(--bluewash)
}
.pagination{
  margin-top:10px;
  justify-content:flex-end
}
.pagination span{
  min-width:100px;
  text-align:center;
  font-size:12px
}
:focus-visible{
  outline:3px solid #f0b83d;
  outline-offset:2px
}
@media (max-width:850px){
  .workspace,.lower-grid{
  grid-template-columns:minmax(0,1fr)
}
.chart-wrap{
  height:430px
}
.side-rail{
  grid-template-columns:1fr 1fr
}
.variant-cards{
  grid-template-columns:1fr
}
  .quiet-status{
  margin-left:0
}
}
@media (max-width:570px){
  .topbar{
  padding:10px 14px
}
.header-status .mono{
  display:none
}
.shell{
  padding:18px 14px
}
.overview{
  align-items:end
}
.market-quote strong{
  font-size:20px
}
.chart-heading{
  align-items:start;
  flex-direction:column
}
.chart-wrap{
  height:350px
}
.chart-foot{
  display:block
}
.chart-foot a{
  display:block;
  margin-top:5px
}
.side-rail{
  grid-template-columns:minmax(0,1fr)
}
.lower-grid{
  gap:10px
}
.details-grid{
  grid-template-columns:repeat(2,1fr)
}
.section-heading{
  align-items:start;
  flex-direction:column
}
  .section-heading>p{
  text-align:left
}
  .trade-heading-actions{
  align-items:flex-start;
  flex-direction:column;
  gap:6px
}
.control-strip{
  align-items:center
}
  .quiet-status{
  width:100%
}
  .monitor-strip{
  align-items:flex-start;
  flex-direction:column;
  gap:4px
}
.variant-cards article{
  padding:12px
}
}
@media (prefers-reduced-motion:reduce){
  *{
  scroll-behavior:auto!important;
  transition:none!important
}
}
