/* Workstation layer. Loaded after styles.css; preserves the Move It Up visual identity. */
select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

/* Compact masthead */
.workstation-head {
  padding: 74px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(520px, 1.15fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: end;
}
.workstation-kicker { display:flex; align-items:center; gap:9px; color:#9aa5af; font-size:10px; font-weight:850; letter-spacing:.15em; text-transform:uppercase; }
.workstation-copy h1 { margin:14px 0 10px; font-size:clamp(44px,5.7vw,78px); line-height:.92; letter-spacing:-.062em; }
.workstation-copy p { margin:0; max-width:560px; color:#7d8793; font-size:14px; line-height:1.6; }
.headline-signal {
  min-height: 150px;
  border-top: 1px solid var(--line-hi);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 58px minmax(150px,1fr) repeat(4,minmax(76px,.55fr));
  align-items:center;
  gap:14px;
}
.headline-rank { width:44px; height:44px; border-radius:13px; display:grid; place-items:center; background:var(--lime-soft); border:1px solid rgba(173,255,88,.14); color:var(--lime); font-size:12px; font-weight:900; }
.headline-company { min-width:0; }
.headline-company strong { display:block; font-size:32px; letter-spacing:-.045em; }
.headline-company span { display:block; margin-top:5px; color:#6d7782; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.headline-metric { min-width:0; }
.headline-metric span,.headline-metric strong { display:block; }
.headline-metric span { color:#59636e; font-size:8px; font-weight:750; letter-spacing:.09em; text-transform:uppercase; }
.headline-metric strong { margin-top:7px; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.headline-metric.score strong { color:#939daa; font-size:12px; }
.positive { color:var(--lime)!important; }
.negative { color:var(--red)!important; }

/* Dense utility strip */
.market-utility {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 58px;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(10,13,18,.78);
  display:grid;
  grid-template-columns: repeat(6,minmax(0,1fr)) auto;
  align-items:stretch;
  overflow:hidden;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}
.utility-cell { min-width:0; padding:11px 15px; border-right:1px solid var(--line); display:flex; flex-direction:column; justify-content:center; }
.utility-cell span,.utility-cell strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.utility-cell span { color:#56606b; font-size:8px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.utility-cell strong { margin-top:5px; color:#c4cbd1; font-size:10px; font-weight:760; }
.utility-cell strong.live { color:var(--lime); }
.utility-cell strong.replay { color:var(--amber); }
.quick-run { min-width:150px; border:0; background:var(--lime); color:#0a1005; padding:0 18px; cursor:pointer; font-size:11px; font-weight:900; letter-spacing:.02em; }
.quick-run:disabled { background:#171d24; color:#59636e; cursor:not-allowed; }

/* Ranking workstation */
.refined-section { padding-top:88px; }
.refined-section-intro { margin-bottom:24px; }
.refined-section-intro p { margin:8px 0 0; }
.pulse-layout { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:12px; align-items:start; }
.refined-ranking-card { min-height:620px; grid-row:auto; }
.ranking-toolbar { align-items:flex-end; gap:18px; padding-bottom:14px; background:linear-gradient(180deg,rgba(16,20,28,.98),rgba(12,16,22,.96)); }
.ranking-toolbar-title h3 { font-size:24px; }
.ranking-controls { display:flex; gap:8px; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; }
.date-stepper { display:flex; align-items:flex-end; gap:5px; }
.date-nav { width:38px; height:38px; border:1px solid var(--line); border-radius:9px; background:#090c11; color:#98a2ad; cursor:pointer; font-size:16px; }
.date-nav:disabled { opacity:.28; cursor:not-allowed; }
.history-select-wrap { display:grid; gap:5px; min-width:230px; }
.history-select-wrap > span { color:var(--faint); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.09em; }
.history-select-wrap select { appearance:none; width:100%; min-height:38px; border:1px solid var(--line); border-radius:9px; padding:0 34px 0 11px; background:#090c11 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%237d8793' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center; color:#c9d0d6; font-size:10px; font-weight:750; }
.history-select-wrap select:focus { outline:1px solid rgba(173,255,88,.32); border-color:rgba(173,255,88,.18); }
.ranking-subline { min-height:30px; padding:0 25px 9px; display:flex; justify-content:space-between; gap:16px; color:#56606b; font-size:8px; letter-spacing:.035em; }
.ranking-subline strong { color:#848f9a; font-weight:700; }
.segmented { height:38px; }
.segment { min-width:55px; }

.refined-ranking-head,.refined-ranking-row { grid-template-columns:48px minmax(240px,1fr) 96px 96px 80px 78px; }
.refined-ranking-head { padding-inline:9px; color:#525b65; }
.refined-ranking-row { min-height:58px; cursor:pointer; outline:none; }
.refined-ranking-row:hover,.refined-ranking-row:focus-visible { background:rgba(255,255,255,.03); }
.refined-ranking-row:focus-visible { box-shadow:inset 2px 0 0 var(--lime); }
.refined-ranking-row .ticker-avatar { background:#10161d; }
.refined-ranking-row .company-text strong { font-size:13px; letter-spacing:.01em; }
.metric-cell { min-width:0; font-variant-numeric:tabular-nums; }
.metric-cell small,.row-score small { display:none; }
.metric-cell strong { font-size:11px; font-weight:730; white-space:nowrap; }
.signal-price strong { color:#aeb7c0; }
.latest-price strong { color:#edf0f2; }
.move-cell strong { color:#7b8590; }
.refined-ranking-row .row-score { color:#818b96; font-size:10px; font-weight:700; text-align:right; }

/* One dense status rail instead of decorative cards */
.market-rail { border:1px solid var(--line); border-radius:20px; overflow:hidden; background:rgba(12,16,22,.84); position:sticky; top:88px; }
.rail-head { padding:18px 18px 14px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.rail-head strong { font-size:12px; }
.rail-block { padding:16px 18px; border-bottom:1px solid var(--line); }
.rail-block:last-child { border-bottom:0; }
.rail-block > span { display:block; color:#59636e; font-size:8px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.rail-block > strong { display:block; margin-top:8px; color:#d5dadd; font-size:16px; line-height:1.2; letter-spacing:-.02em; }
.rail-block > small { display:block; margin-top:6px; color:#626d78; font-size:9px; line-height:1.45; }
.rail-progress { margin:10px 0 0; }
.rail-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.rail-grid div { min-width:0; }
.rail-grid span,.rail-grid strong { display:block; }
.rail-grid span { color:#535d67; font-size:7px; text-transform:uppercase; letter-spacing:.08em; }
.rail-grid strong { margin-top:4px; color:#9da7b1; font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* History */
.history-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.history-item { min-height:74px; border:1px solid var(--line); border-radius:14px; background:rgba(13,17,23,.78); padding:14px; display:flex; justify-content:space-between; align-items:center; gap:14px; text-align:left; cursor:pointer; transition:border-color .15s ease,background .15s ease; }
.history-item:hover,.history-item.active { border-color:rgba(173,255,88,.18); background:rgba(17,22,29,.92); }
.history-item span strong,.history-item span small { display:block; }
.history-item span strong { font-size:11px; }
.history-item span small { margin-top:5px; color:#59636e; font-size:8px; text-transform:uppercase; letter-spacing:.06em; }
.history-badge { font-style:normal; border-radius:999px; padding:5px 7px; border:1px solid var(--line); font-size:7px; font-weight:900; letter-spacing:.08em; }
.history-badge.live { color:var(--lime); background:var(--lime-soft); border-color:rgba(173,255,88,.15); }
.history-badge.replay { color:var(--amber); background:rgba(247,194,93,.05); border-color:rgba(247,194,93,.13); }

/* Research compressed */
.research-compact-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.research-compact-card { min-height:140px; border-top:1px solid var(--line-hi); border-bottom:1px solid var(--line); padding:20px 4px 16px; display:flex; flex-direction:column; }
.research-compact-card + .research-compact-card { padding-left:18px; border-left:1px solid var(--line); }
.research-compact-card > span { color:var(--faint); font-size:8px; text-transform:uppercase; letter-spacing:.09em; }
.research-compact-card > strong { margin-top:auto; font-size:29px; letter-spacing:-.04em; }
.research-compact-card > small { color:#65707a; font-size:8px; margin-top:6px; }
.research-links { margin-top:12px; display:flex; justify-content:space-between; align-items:center; gap:24px; color:#68727d; font-size:9px; }
.research-links a { color:#c6cdd2; font-weight:800; }
.refined-footer { padding-top:34px; }

/* Security detail drawer */
.detail-backdrop { position:fixed; inset:0; z-index:85; background:rgba(0,0,0,.48); backdrop-filter:blur(4px); opacity:0; pointer-events:none; transition:opacity .2s ease; }
.detail-drawer { position:fixed; z-index:90; top:0; right:0; bottom:0; width:min(430px,100%); transform:translateX(102%); transition:transform .28s cubic-bezier(.2,.8,.2,1); background:#090c11; border-left:1px solid var(--line-hi); box-shadow:-30px 0 80px rgba(0,0,0,.42); overflow:auto; }
body.detail-open { overflow:hidden; }
.detail-open .detail-backdrop { opacity:1; pointer-events:auto; }
.detail-open .detail-drawer { transform:translateX(0); }
.detail-head { padding:24px; display:flex; justify-content:space-between; align-items:flex-start; border-bottom:1px solid var(--line); }
.detail-head h2 { margin:7px 0 0; font-size:38px; letter-spacing:-.055em; }
.detail-company { padding:18px 24px; border-bottom:1px solid var(--line); }
.detail-company strong { display:block; font-size:13px; }
.detail-company span { display:block; color:#69747f; font-size:9px; margin-top:6px; }
.detail-quote { padding:24px; display:grid; grid-template-columns:1fr 1fr; gap:18px; border-bottom:1px solid var(--line); }
.detail-quote div span,.detail-quote div strong { display:block; }
.detail-quote div span { color:#58626d; font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.detail-quote div strong { margin-top:7px; font-size:22px; font-variant-numeric:tabular-nums; }
.detail-meta { padding:12px 24px 24px; }
.detail-meta-row { display:flex; justify-content:space-between; gap:20px; padding:11px 0; border-bottom:1px solid rgba(255,255,255,.045); font-size:9px; }
.detail-meta-row span { color:#58626d; }
.detail-meta-row strong { color:#aab3bb; text-align:right; }
.detail-note { margin:0 24px 24px; padding:13px 14px; border:1px solid var(--line); border-radius:12px; color:#66717c; font-size:8px; line-height:1.55; }

@media (max-width:1100px) {
  .workstation-head { grid-template-columns:1fr; padding-top:68px; }
  .headline-signal { grid-template-columns:52px minmax(180px,1fr) repeat(4,minmax(72px,.5fr)); }
  .market-utility { grid-template-columns:repeat(3,1fr) auto; }
  .market-utility .utility-cell:nth-child(4),.market-utility .utility-cell:nth-child(5),.market-utility .utility-cell:nth-child(6) { display:none; }
  .pulse-layout { grid-template-columns:1fr; }
  .market-rail { position:static; display:grid; grid-template-columns:repeat(4,1fr); }
  .rail-head { grid-column:1/-1; }
  .rail-block { border-bottom:0; border-right:1px solid var(--line); }
  .rail-block:last-child { border-right:0; }
  .refined-ranking-head,.refined-ranking-row { grid-template-columns:48px minmax(210px,1fr) 90px 90px 76px 74px; }
  .history-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width:780px) {
  .workstation-head { padding:54px 0 18px; gap:26px; }
  .workstation-copy h1 { font-size:48px; }
  .workstation-copy p { font-size:12px; }
  .headline-signal { min-height:126px; grid-template-columns:46px 1fr repeat(2,minmax(66px,.45fr)); gap:10px; }
  .headline-metric.score,.headline-metric.latest { display:none; }
  .headline-company strong { font-size:28px; }
  .market-utility { width:min(100% - 24px,1320px); grid-template-columns:1fr 1fr auto; position:sticky; top:76px; z-index:24; }
  .market-utility .utility-cell:nth-child(3),.market-utility .utility-cell:nth-child(4),.market-utility .utility-cell:nth-child(5),.market-utility .utility-cell:nth-child(6) { display:none; }
  .quick-run { min-width:112px; padding-inline:12px; font-size:9px; }
  .refined-section { padding-top:68px; }
  .section-intro.refined-section-intro { grid-template-columns:1fr; gap:9px; }
  .ranking-toolbar { position:sticky; top:134px; z-index:20; align-items:stretch; flex-direction:column; padding:16px 16px 13px; border-bottom:1px solid var(--line); }
  .ranking-toolbar-title { display:flex; justify-content:space-between; align-items:flex-end; }
  .ranking-toolbar-title h3 { font-size:20px; }
  .ranking-controls { justify-content:stretch; width:100%; }
  .date-stepper { flex:1; }
  .history-select-wrap { min-width:0; flex:1; }
  .history-select-wrap > span { display:none; }
  .segmented { flex:0 0 126px; }
  .ranking-subline { padding-inline:16px; }
  .ranking-head.refined-ranking-head { display:none; }
  .ranking-wrap { padding:0 12px 14px; }
  .ranking-row.refined-ranking-row {
    display:grid;
    grid-template-columns:36px minmax(0,1fr) auto;
    grid-template-areas:
      "rank company score"
      "rank quote move";
    gap:8px 10px;
    min-height:82px;
    padding:12px 6px;
  }
  .refined-ranking-row .rank-index { grid-area:rank; align-self:center; }
  .refined-ranking-row .company-cell { grid-area:company; }
  .refined-ranking-row .signal-price { grid-area:quote; display:inline-flex; align-items:baseline; gap:6px; }
  .refined-ranking-row .signal-price::after { content:"→"; color:#46505a; margin-left:2px; }
  .refined-ranking-row .latest-price { grid-area:quote; display:inline-flex; align-items:baseline; gap:6px; margin-left:78px; }
  .refined-ranking-row .move-cell { grid-area:move; text-align:right; align-self:end; }
  .refined-ranking-row .row-score { grid-area:score; align-self:start; }
  .metric-cell small,.row-score small { display:block; color:#515b65; font-size:7px; font-weight:750; text-transform:uppercase; letter-spacing:.07em; }
  .signal-price small,.latest-price small { display:none; }
  .metric-cell strong { font-size:11px; }
  .refined-ranking-row .row-score { font-size:9px; }
  .market-rail { grid-template-columns:1fr 1fr; }
  .rail-block { border-bottom:1px solid var(--line); }
  .rail-block:nth-last-child(-n+2) { border-bottom:0; }
  .history-list { grid-template-columns:1fr 1fr; }
  .research-compact-grid { grid-template-columns:1fr 1fr; }
  .research-compact-card:nth-child(3) { padding-left:4px; border-left:0; }
  .research-links { flex-direction:column; align-items:flex-start; }
}

@media (max-width:520px) {
  .headline-signal { grid-template-columns:42px 1fr auto; }
  .headline-metric.signal,.headline-metric.score,.headline-metric.latest { display:none; }
  .headline-metric.move { display:block; }
  .headline-company span { max-width:200px; }
  .market-utility { grid-template-columns:1fr auto; }
  .market-utility .utility-cell:nth-child(2) { display:none; }
  .ranking-controls { flex-direction:column; }
  .date-stepper,.segmented { width:100%; flex:auto; }
  .history-select-wrap { flex:1; }
  .segmented .segment { flex:1; }
  .market-rail { grid-template-columns:1fr; }
  .rail-block { border-right:0; border-bottom:1px solid var(--line)!important; }
  .rail-block:last-child { border-bottom:0!important; }
  .history-list { grid-template-columns:1fr; }
  .research-compact-grid { grid-template-columns:1fr 1fr; }
  .detail-drawer { width:100%; border-left:0; }
  .detail-head { padding:20px; }
  .detail-company,.detail-quote,.detail-meta { padding-left:20px; padding-right:20px; }
}
