:root{--nav:#121d31;--nav-active:#243654;--bg:#f3f6f9;--card:#fff;--line:#dfe6ed;--text:#172033;--muted:#708096;--primary:#c8102e;--primary-hover:#8f0f22;--profit:#d93025;--loss:#159447;--warning:#b45309;--shadow:0 8px 28px rgba(26,39,61,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Segoe UI","Microsoft YaHei",sans-serif;color:var(--text);background:var(--bg)}button,input,select{font:inherit}.hidden{display:none!important}
.form-card label{display:grid;gap:7px;color:#536175;font-size:14px;margin-bottom:16px}.brand-mark{width:60px;height:60px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#8c0034,#e3194f);color:#fff;font-size:40px;font-weight:700}.brand-mark.small{width:42px;height:42px;border-radius:12px;font-size:28px;flex:none}
input,select{min-height:42px;border:1px solid #cbd5df;border-radius:7px;padding:8px 11px;background:#fff;color:var(--text);outline:none}input:focus,select:focus{border-color:#c8102e;box-shadow:0 0 0 3px rgba(200,16,46,.12)}button{border:0;border-radius:7px;min-height:40px;padding:9px 16px;cursor:pointer;transition:.15s;background:#e9eef3;color:#223047}button:hover{filter:brightness(.97)}button:disabled{opacity:.55;cursor:wait}.primary{background:var(--primary);color:#fff}.primary:hover{background:var(--primary-hover)}.secondary{background:#e6edf2;color:#24354b}.ghost{background:transparent;color:#617087}.danger{background:#fee2e2;color:#b91c1c}.full{width:100%}
.app-shell{min-height:100vh;display:grid;grid-template-columns:264px 1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:264px;background:var(--nav);color:#fff;padding:28px 14px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;padding:0 16px 26px}.brand strong{display:block;font-size:20px}.brand span{display:block;color:#9eb0c8;font-size:12px;margin-top:5px}.sidebar nav{display:grid;gap:5px}.sidebar nav button{background:transparent;color:#d9e2ee;text-align:left;padding:13px 24px;border-radius:5px}.sidebar nav button.active,.sidebar nav button:hover{background:var(--nav-active);color:#fff}.sidebar-foot{margin-top:auto;padding:0 18px;color:#8497af;font-size:12px;line-height:1.7}.version-badge{display:inline-block;margin-top:6px;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.10);color:#b6c6da;font-size:11px;letter-spacing:.3px;font-variant-numeric:tabular-nums}.version-badge.stale{background:#7a2e12;color:#ffd9c7}.status-pill.freshness{background:#f4f6f9;color:#5a6b80;border-color:#e0e5ec;font-variant-numeric:tabular-nums}.status-pill.freshness.stale{background:#fdeaea;color:#9a2020;border-color:#f3c4c4;font-weight:600}.workspace{grid-column:2;min-width:0}.topbar{height:96px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;position:sticky;top:0;z-index:5}.topbar h1{font-size:26px;margin:0 0 5px}.topbar>div>span{color:var(--muted);font-size:13px}.top-actions{display:flex;align-items:center;gap:10px}.status-pill{background:#fdecee;color:#8f0f22;border:1px solid #f3ccd3;border-radius:999px;padding:7px 12px;max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}main{padding:28px 36px 50px}.page{display:none}.page.active{display:block}.global-message{position:fixed;right:28px;top:110px;z-index:20;background:#172033;color:#fff;padding:13px 18px;border-radius:8px;box-shadow:var(--shadow);max-width:480px}.global-message.error{background:#991b1b}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.metric-grid article{background:var(--card);border:1px solid var(--line);border-radius:9px;padding:20px 22px;box-shadow:0 2px 7px rgba(26,39,61,.025)}.metric-grid span{color:var(--muted);display:block;font-size:14px;margin-bottom:10px}.metric-grid strong{font-size:28px}.small-value{font-size:17px!important}.toolbar{background:#fff;border:1px solid var(--line);padding:14px 18px;display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;border-radius:8px}.toolbar>div:first-child{display:flex;gap:14px;align-items:center}.toolbar span{color:var(--muted);font-size:13px}.toolbar button+button{margin-left:8px}.table-card{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:auto;min-height:240px}.table-card.compact{min-height:480px}table{width:100%;border-collapse:collapse;white-space:nowrap}th{background:#e9eff4;color:#26374c;font-size:13px;text-align:center;padding:12px 10px;position:sticky;top:0}td{border-top:1px solid #edf1f4;padding:11px 10px;text-align:center;font-size:14px}tbody tr:hover{background:#f8fafb}.empty{color:var(--muted);padding:40px!important}.profit{color:var(--profit)!important}.loss{color:var(--loss)!important}.warning{color:var(--warning)!important}.notice-card{background:#fff;border:1px solid var(--line);border-left:4px solid #9bb2c8;margin-top:16px;padding:16px 18px;border-radius:6px;color:#536175}.notice-card p{margin:7px 0 0;line-height:1.6}.form-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:20px;margin-bottom:18px}.form-card h2{font-size:18px;margin:0 0 20px}.form-card.horizontal{display:flex;align-items:end;gap:14px}.form-card.horizontal label{margin:0;min-width:140px}.form-card.wrap{flex-wrap:wrap}.result-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:22px;min-height:320px;white-space:pre-wrap;word-break:break-word;line-height:1.65;overflow:auto;margin:0}.split-view{display:grid;grid-template-columns:minmax(420px,42%) 1fr;gap:16px}.split-view .result-card{min-height:600px;max-height:75vh}.settings-grid{display:grid;grid-template-columns:minmax(540px,2fr) minmax(320px,1fr);gap:18px;align-items:start}.settings-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.settings-fields label{min-width:0}.settings-fields input,.settings-fields select{width:100%}.settings-fields .wide{grid-column:1/-1}
.compact-result{min-height:140px;max-height:340px;margin-top:14px}.clickable-row{cursor:pointer}.row-actions{display:flex;gap:5px;justify-content:center}.row-actions button{min-height:30px;padding:5px 9px;font-size:12px}.progress-card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:18px;margin-bottom:14px;display:grid;gap:14px}.progress-card>div{display:flex;justify-content:space-between;gap:12px;color:var(--muted)}.progress-card label{display:grid;grid-template-columns:90px 1fr 90px;gap:12px;align-items:center;color:var(--muted);font-size:14px}.progress-card progress{width:100%;height:14px}.setting-group{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;margin:12px 0 10px;padding:14px 0 0;border:0;border-top:1px solid var(--line);min-width:0}.setting-group:first-child{margin-top:0;padding-top:0;border-top:0}.setting-group legend{grid-column:1/-1;padding:0 0 12px;font-weight:700;color:#334155}.setting-group label{font-weight:400}.setting-group .wide{grid-column:1/-1}.stack-actions{display:grid;gap:10px}.muted-text{color:var(--muted);font-size:13px;line-height:1.6;margin:15px 0 0}
.section-heading{font-size:17px;margin:22px 0 10px}.source-ok{color:var(--loss)}.source-degraded,.source-limited,.source-rate_limited{color:var(--warning)}.source-permission_required,.source-credentials_required,.source-error{color:#b91c1c}.source-policy_blocked{color:var(--muted)}.page[data-page-panel="signals"] .table-card{min-height:150px}.page[data-page-panel="signals"] #signal-item-body td:nth-child(5){max-width:520px;overflow:hidden;text-overflow:ellipsis}.page[data-page-panel="signals"] #signal-source-body td:last-child{max-width:620px;white-space:normal;text-align:left;line-height:1.45}
@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.settings-grid,.split-view{grid-template-columns:1fr}.app-shell{grid-template-columns:214px 1fr}.sidebar{width:214px}.workspace{grid-column:2}.brand strong{font-size:17px}.brand span{display:none}}
@media(max-width:760px){.app-shell{display:block}.sidebar{position:static;width:auto;height:auto;padding:12px}.brand{padding:5px 8px 12px}.sidebar nav{display:flex;overflow:auto}.sidebar nav button{white-space:nowrap;padding:10px 13px}.sidebar-foot{display:none}.workspace{display:block}.topbar{height:auto;min-height:82px;padding:16px;align-items:flex-start}.top-actions{flex-wrap:wrap;justify-content:flex-end}.topbar h1{font-size:21px}main{padding:16px}.metric-grid{grid-template-columns:1fr 1fr}.form-card.horizontal{align-items:stretch;display:grid;grid-template-columns:1fr 1fr}.form-card.horizontal button{align-self:end}.settings-fields,.setting-group{grid-template-columns:1fr}.settings-fields .wide,.setting-group .wide{grid-column:auto}.toolbar{align-items:flex-start;gap:12px}.toolbar>div:last-child{display:flex}.status-pill{max-width:160px}}
@media(max-width:480px){.metric-grid{grid-template-columns:1fr}.form-card.horizontal{grid-template-columns:1fr}.top-actions .secondary{display:none}}

/* ---------- Public landing shell ----------
   Kept separate from the signed-in app: the two have different jobs and should
   change without disturbing each other. Spacing follows a 4px scale and the
   accent is used sparingly so it still reads as an accent. */
.landing{--ink:#0d1826;--ink-2:#42536b;--ink-3:#6b7c93;--edge:#e4eaf0;--tint:#f6f9fb;
  --accent:#c8102e;--accent-soft:#fdecee;--radius:16px;
  min-height:100vh;display:flex;flex-direction:column;background:#fff;
  color:var(--ink);-webkit-font-smoothing:antialiased}
.landing ::selection{background:#f7d3d9}

.landing-nav{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:32px;
  padding:16px 44px;background:rgba(255,255,255,.82);backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid rgba(228,234,240,.9)}
.landing-brand{display:flex;align-items:center;gap:11px;font-weight:650;font-size:17px;
  letter-spacing:-.2px;color:var(--ink);text-decoration:none}
.landing-mark{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;
  background:linear-gradient(150deg,#d81e34,#8f0f22);color:#fff;
  box-shadow:0 2px 8px rgba(200,16,46,.28)}
.landing-mark svg{width:17px;height:17px}
.landing-nav-links{display:flex;gap:28px}
.landing-nav-links a{color:var(--ink-2);text-decoration:none;font-size:15px;
  padding:4px 0;border-bottom:1.5px solid transparent;transition:.16s}
.landing-nav-links a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.landing-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.link-button{background:transparent;color:var(--ink-2);padding:9px 14px}
.link-button:hover{background:var(--tint);color:var(--ink);filter:none}
.outline{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--edge)}
.outline:hover{background:var(--tint);filter:none}
.landing button:focus-visible,.landing a:focus-visible{outline:2px solid var(--accent);
  outline-offset:3px;border-radius:8px}

.landing-main{flex:1}
.hero{max-width:1200px;margin:0 auto;padding:80px 44px 96px;display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center}
.eyebrow{display:inline-flex;align-items:center;gap:8px;margin:0 0 22px;padding:6px 14px;
  border-radius:999px;background:var(--accent-soft);color:#8f0f22;font-size:13px;
  font-weight:600;letter-spacing:.2px}
.eyebrow-dot{width:6px;height:6px;border-radius:50%;background:#e0364a}
.hero h1{margin:0 0 22px;font-size:clamp(34px,4.4vw,54px);line-height:1.14;
  letter-spacing:-1.4px;font-weight:700}
.hero-sub{margin:0 0 34px;max-width:520px;color:var(--ink-2);font-size:17px;line-height:1.8}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.large{min-height:50px;padding:13px 28px;font-size:16px;border-radius:10px;font-weight:600}
.primary.large{box-shadow:0 6px 18px rgba(200,16,46,.24)}
.hero-badges{list-style:none;display:flex;flex-wrap:wrap;gap:8px 20px;margin:30px 0 0;padding:0;
  color:var(--ink-3);font-size:13.5px}
.hero-badges li{display:flex;align-items:center;gap:7px}
.hero-badges li::before{content:"";width:5px;height:5px;border-radius:50%;background:#9fb2c4}

.hero-visual{position:relative;min-height:340px;display:grid;place-items:center}
.visual-glow{position:absolute;inset:6% 2% 14%;border-radius:50%;
  background:radial-gradient(circle at 60% 40%,rgba(216,30,52,.22),transparent 68%);filter:blur(34px)}
.visual-panel{position:relative;width:100%;max-width:430px;background:#fff;
  border:1px solid var(--edge);border-radius:18px;padding:18px;
  box-shadow:0 22px 60px rgba(13,24,38,.13),0 2px 6px rgba(13,24,38,.05)}
.visual-bar{display:flex;align-items:center;gap:6px;padding:0 2px 15px;
  border-bottom:1px solid #eef2f6;margin-bottom:15px}
.visual-bar>span{width:9px;height:9px;border-radius:50%;background:#e0e6ed}
.visual-chip{margin-left:auto;font-size:11.5px;font-weight:600;color:#8f0f22;
  background:var(--accent-soft);padding:4px 10px;border-radius:999px}
.visual-rows{display:grid;gap:11px}
.v-row{display:flex;gap:8px;align-items:center}
.v-row i{height:9px;border-radius:5px;background:#e8edf3;display:block}
.v-row i.accent{background:#f0c2ca;margin-left:auto}
.visual-card{position:absolute;display:flex;align-items:center;gap:8px;background:#fff;
  border:1px solid var(--edge);border-radius:11px;padding:9px 14px;font-size:13px;
  font-weight:550;color:var(--ink-2);box-shadow:0 10px 26px rgba(13,24,38,.12)}
.visual-card .dot{width:7px;height:7px;border-radius:50%;background:#e0364a}
.visual-card .dot.alt{background:#c99a12}
.visual-card-a{top:4%;left:-6%}
.visual-card-b{bottom:6%;right:-4%}

.section{max-width:1120px;margin:0 auto;padding:88px 44px}

.section-head{max-width:640px;margin:0 auto 48px;text-align:center}
.section-head h2{margin:0 0 12px;font-size:clamp(26px,2.9vw,34px);letter-spacing:-.7px;font-weight:700}
.section-head p{margin:0;color:var(--ink-2);font-size:16.5px;line-height:1.75}
.section-head.light h2{color:#fff}
.section-head.light p{color:#a9bccd}

.feature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(238px,1fr));gap:18px}
.feature-card{background:#fff;border:1px solid var(--edge);border-radius:var(--radius);
  padding:28px 26px;transition:.18s}
.feature-card:hover{border-color:#cddbe6;box-shadow:0 12px 32px rgba(13,24,38,.08);transform:translateY(-2px)}
.feature-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  background:var(--accent-soft);color:#8f0f22;margin-bottom:18px}
.feature-icon svg{width:21px;height:21px}
.feature-card h3{margin:0 0 10px;font-size:17px;letter-spacing:-.2px}
.feature-card p{margin:0;color:var(--ink-2);font-size:14.5px;line-height:1.78}

.band{background:linear-gradient(165deg,#101e30,#0b1524);color:#fff}
.band-inner{max-width:1120px;margin:0 auto;padding:88px 44px}
.how-steps{list-style:none;margin:0;padding:0;display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:22px}
.how-steps li{background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius);padding:28px 26px}
.step-index{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;
  background:var(--accent);color:#fff;font-weight:700;font-size:15px;margin-bottom:18px}
.how-steps h4{margin:0 0 9px;font-size:16.5px;color:#fff;letter-spacing:-.2px}
.how-steps p{margin:0;color:#a9bccd;font-size:14.5px;line-height:1.78}








.landing-foot{border-top:1px solid var(--edge);background:var(--tint)}
.foot-inner{max-width:1120px;margin:0 auto;padding:30px 44px;display:flex;gap:8px 20px;
  flex-wrap:wrap;align-items:center;color:var(--ink-3);font-size:13.5px}
.foot-brand{font-weight:650;color:var(--ink-2)}
/* Same weight as the surrounding footer text: the filing number is a legal
   notice, not a call to action, and must simply stay legible. */
.foot-beian{color:var(--ink-3);text-decoration:none}
/* Invite page. The codes block is deliberately loud and monospaced: it is the
   only moment the plaintext exists, and a missed copy means reissuing. */
.invite-fields{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-bottom:16px}
.invite-codes{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:16px;line-height:1.9;letter-spacing:.06em;background:var(--tint);
  border:1px solid var(--edge);border-radius:10px;padding:14px 16px;margin:0 0 12px;
  white-space:pre-wrap;word-break:break-all;user-select:all}
.foot-beian:hover{color:var(--ink-2);text-decoration:underline}

@media(max-width:960px){
  .hero{grid-template-columns:1fr;gap:48px;padding:56px 24px 72px;text-align:center}
  .hero-sub{margin-left:auto;margin-right:auto}
  .hero-actions,.hero-badges{justify-content:center}
  .hero-visual{order:2;min-height:280px}
  .visual-card-a{left:0}
  .visual-card-b{right:0}
}
@media(max-width:760px){
  .landing-nav{padding:12px 18px;gap:12px}
  .landing-nav-links{display:none}
  .hero h1{letter-spacing:-.6px}
  .section,.band-inner{padding:60px 18px}
  .section-head{margin-bottom:34px}
  .foot-inner{padding:24px 18px}
  .visual-card{display:none}
}
@media(prefers-reduced-motion:reduce){
  .landing *{transition:none!important}
  .feature-card:hover{transform:none}
}

/* ---------- Sign-in and register cards ----------
   Rules live here rather than in the landing block so a rewrite of that block
   cannot silently strip them, which is how the back control lost its styling
   and fell back to the default grey button. */
/* A near-neutral dark ground with the accent kept to a small, low-opacity
   corner glow. A saturated red across the whole viewport overwhelmed the card
   it exists to frame. */
/* A light ground, as most sign-in pages settle on. The card can no longer rely
   on a heavy shadow to separate itself once the background is pale, so it takes
   a hairline border and a shallow shadow instead; the deep drop shadow that
   worked on a dark ground would read as a smudge here. */
.auth-view{min-height:100vh;display:grid;place-items:center;padding:24px;
  background:
    radial-gradient(48% 42% at 12% 2%,rgba(200,16,46,.045) 0,rgba(200,16,46,0) 62%),
    linear-gradient(168deg,#fafbfc 0,#f4f6f9 58%,#eef1f5 100%)}
.auth-card{position:relative;width:min(408px,100%);background:#fff;border-radius:18px;
  padding:30px 34px 26px;border:1px solid #e4eaf0;
  box-shadow:0 1px 2px rgba(13,24,38,.05),0 14px 38px rgba(13,24,38,.07);
  display:flex;flex-direction:column}
.auth-back{align-self:flex-start;background:transparent;color:#8a94a3;min-height:auto;
  padding:2px 0;margin:0 0 22px;font-size:13.5px;display:inline-flex;align-items:center;gap:5px}
.auth-back::before{content:"←";font-size:14px}
.auth-back:hover{background:transparent;color:var(--primary);filter:none}
.auth-mark{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;
  background:linear-gradient(150deg,#d81e34,#8f0f22);color:#fff;
  box-shadow:0 5px 16px rgba(200,16,46,.3);margin-bottom:18px}
.auth-mark svg{width:23px;height:23px}
.auth-card h1{margin:0 0 6px;font-size:25px;letter-spacing:-.5px;font-weight:700}
.auth-sub{margin:0 0 26px;color:var(--muted);font-size:14.5px;line-height:1.6}
.auth-card label{display:grid;gap:7px;color:#536175;font-size:13.5px;margin:0 0 15px}
.auth-card input{min-height:44px;border-radius:9px}
.auth-card input:disabled{background:#f7f9fb;color:#9aa5b3;cursor:not-allowed}
.auth-card .primary.full{margin-top:7px}
/* Only occupies space once it has something to say. */
.form-message{min-height:0;margin:12px 0 0;color:#b91c1c;font-size:13.5px;line-height:1.6}
.form-message:empty{display:none}
.auth-hint{margin:14px 0 0;padding:11px 13px;border-radius:9px;background:#fbf7ee;
  border:1px solid #f0e4cb;color:#8a6d2f;font-size:13px;line-height:1.65}
.auth-switch{margin:20px 0 0;padding-top:17px;border-top:1px solid #edf1f5;
  color:var(--muted);font-size:13.5px;text-align:center}
.text-link{background:transparent;color:var(--primary);min-height:auto;padding:0 2px;
  font-size:13.5px;font-weight:600}
.text-link:hover{background:transparent;filter:none;text-decoration:underline}
.auth-card button:focus-visible,.auth-card input:focus-visible{outline:2px solid var(--primary);
  outline-offset:2px}
/* Second step of the two-phase cards. The step wrappers are plain blocks so
   the labels inside keep the spacing they already had. */
.auth-card [data-step][hidden]{display:none}
.auth-note{margin:0 0 16px;padding:11px 13px;border-radius:9px;background:#f2f7f4;
  border:1px solid #d8e8df;color:#2f6b4f;font-size:13px;line-height:1.65}
/* Six digits read as digits: wide tracking stops 111111 looking like a blur. */
.code-input{font-size:19px;letter-spacing:.34em;text-align:center;
  font-variant-numeric:tabular-nums}
.code-input::placeholder{font-size:14px;letter-spacing:normal}
.auth-aside{margin:10px 0 0;text-align:center}
.auth-aside:empty,.auth-aside:has(>[hidden]){display:none}
@media(max-width:520px){
  .auth-card{padding:26px 22px 22px;border-radius:16px}
  .auth-card h1{font-size:23px}
  .code-input{letter-spacing:.24em}
}
.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(238px,1fr));gap:18px}

/* ---------- Role-dependent chrome ----------
   Hiding here is comfort only; the boundary is the 403 the API returns. A
   member who un-hides these controls in devtools still gets refused. */
[data-admin-only][hidden]{display:none!important}
.account-line{display:flex;justify-content:space-between;gap:14px;align-items:baseline;
  margin:0;padding:11px 0;border-top:1px solid #edf1f5;color:var(--muted);font-size:14px}
.account-line:first-of-type{border-top:0;padding-top:0}
.account-line strong{color:#26374c;font-weight:600;word-break:break-all;text-align:right}
@media(min-width:1101px){
  /* With the settings form gone the two-column grid would leave the account
     card stranded beside 540px of nothing. */
  .settings-grid:has(>#settings-form[hidden]){grid-template-columns:minmax(320px,620px)}
}
