/* Worksection source library — screen styles.
   Owned by ONE porting agent so screens can be built in parallel without
   racing on main.css. Loads AFTER main.css, so a bare class here beats a
   bare class there — but an ID rule in main.css still wins. Check the
   cascade before assuming a rule applies.
   Tokens, the .tip tooltip system and the chart series live in main.css and
   must not be redefined here. */

/* ── Shell ──────────────────────────────────────────────────────────────────
   ws-sources.js now renders the whole page into #ws-sources-list. index.html
   still carries this view's old toolbar and "How sources work" <details>;
   hide both (ID-prefixed selectors outrank main.css's bare .toolbar/.src-help)
   — every control they held is re-created by the render. .scroll carries an
   inline padding in index.html, hence the one !important. */
#view-sources > .toolbar{display:none;}
#view-sources .src-help{display:none;}
#view-sources > .scroll{display:flex;flex-direction:column;padding:26px 32px !important;}
#ws-sources-list{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:1168px;margin:0 auto;box-sizing:border-box;}
.wss-page{flex:1;min-height:0;display:flex;flex-direction:column;color:#2A323A;}
.wss-sp{flex:1;}
.wss-file{display:none;}
.wss-off{display:none !important;}
.wss-mono{font-family:var(--font-mono);}

/* ── Title row ── */
.wss-head{display:flex;align-items:flex-end;gap:20px;margin-bottom:20px;flex-shrink:0;flex-wrap:wrap;}
.wss-head-txt{flex:1;min-width:240px;}
/* main.css has `.view h1{font-weight:300;letter-spacing:-1px}` — the ID prefix outranks it. */
#ws-sources-list .wss-title{font-family:var(--font-display);font-size:27px;font-weight:400;letter-spacing:-.5px;line-height:1.15;margin:0 0 3px;color:#2A323A;}
.wss-sub{font-size:12.5px;color:#6B7480;margin:0;line-height:1.3;}
.wss-acts{display:flex;align-items:center;gap:9px;flex-shrink:0;}
.wss-acts .btn-ghost{padding:8px 15px;font-size:12.5px;font-weight:500;}
.wss-acts .btn.wss-primary{display:inline-flex;align-items:center;gap:7px;padding:8px 17px;font-size:12.5px;font-weight:600;cursor:pointer;}

/* ── Readiness: two headline numbers + the NATSPEC index control ── */
.wss-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;min-height:116px;margin-bottom:16px;flex-shrink:0;}
.wss-stat{background:#FFFFFF;border:1px solid #E8EDF2;border-radius:14px;padding:16px 20px;box-shadow:0 1px 3px rgba(42,50,58,.04),0 4px 14px rgba(42,50,58,.06);display:flex;flex-direction:column;min-width:0;box-sizing:border-box;cursor:help;}
.wss-stat-idx{cursor:default;}
.wss-eyebrow{font-family:var(--font-mono);font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;color:#9BA3AC;font-weight:400;}
.wss-eyebrow-row{display:flex;align-items:center;gap:7px;}
.wss-eyebrow-row .wss-eyebrow{flex:1;}
.wss-num{font-family:var(--font-display);font-size:38px;font-weight:400;letter-spacing:-1px;line-height:1.05;margin-top:5px;color:#2A323A;}
.wss-num-of{font-size:17px;color:#9BA3AC;letter-spacing:0;}
.wss-bar{height:6px;border-radius:3px;background:#EFEFF1;overflow:hidden;margin-top:auto;}
.wss-bar-fill{height:100%;transition:width .2s;}
.wss-sage{background:#6E7F5C;}
.wss-olive{background:#837D68;}
.wss-q{width:15px;height:15px;border-radius:50%;background:#F1EDE6;color:#837D68;font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;cursor:help;flex-shrink:0;line-height:1;}
.wss-idx-val{font-family:var(--font-display);font-size:22px;font-weight:400;letter-spacing:-.4px;line-height:1.1;margin-top:6px;}
.wss-idx-acts{display:flex;gap:8px;margin-top:auto;padding-top:8px;}
.wss-idx-btn{flex:1;display:inline-flex;align-items:center;justify-content:center;background:#FFFFFF;border:1px solid transparent;border-radius:9999px;padding:6px 10px;font-size:11.5px;font-weight:600;color:#2A323A;box-shadow:0 1px 2px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.07);cursor:pointer;font-family:var(--font);white-space:nowrap;line-height:1.2;box-sizing:border-box;}
.wss-idx-btn:hover{box-shadow:0 2px 5px rgba(0,0,0,.13),0 0 0 1px rgba(0,0,0,.11);}
.wss-idx-alt{background:#F7F7F7;border-color:#E8EDF2;box-shadow:none;font-weight:500;color:#4A5560;}
.wss-idx-alt:hover{background:#F1EDE6;box-shadow:none;}
.wss-link{background:none;border:none;padding:0;font-size:10.5px;font-weight:600;color:#837D68;cursor:pointer;font-family:var(--font);text-decoration:underline;text-underline-offset:2px;}
.wss-link:hover{color:#4D4936;}

/* ── The one thing that is wrong right now ── */
.wss-alert{display:flex;align-items:center;gap:11px;background:#F5E9E7;border:1px solid #ECC5C6;border-radius:12px;padding:9px 14px;margin-bottom:16px;flex-shrink:0;}
.wss-alert svg{flex-shrink:0;}
.wss-alert-txt{font-size:12.5px;color:#2A323A;line-height:1.35;min-width:0;}
.wss-alert-txt strong{font-weight:600;}
.wss-alert-txt .wss-mono{font-size:11.5px;}
.wss-alert-btn{flex-shrink:0;background:#FFFFFF;border:none;border-radius:9999px;padding:6px 14px;font-size:11.5px;font-weight:600;color:#8A1C1C;box-shadow:0 1px 2px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.07);cursor:pointer;font-family:var(--font);white-space:nowrap;}
.wss-alert-btn:hover{box-shadow:0 2px 5px rgba(0,0,0,.13),0 0 0 1px rgba(0,0,0,.11);}

/* ── The list ──
   The card sizes to its rows and shrinks (rows scroll) once it would overflow
   the pane, so a three-row filter never leaves a half-empty card. */
.wss-card{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;background:#FFFFFF;border:1px solid #E8EDF2;border-radius:14px;padding:16px 18px;box-shadow:0 1px 3px rgba(42,50,58,.04),0 4px 14px rgba(42,50,58,.06);box-sizing:border-box;}
.wss-card-hd{display:flex;align-items:center;gap:9px;height:30px;flex-shrink:0;}
.wss-card-title{font-family:var(--font-display);font-size:18px;font-weight:500;letter-spacing:-.3px;color:#2A323A;}
.wss-search{width:232px;box-sizing:border-box;padding:6px 12px;border:1px solid #D2DAE3;border-radius:9px;font-size:12px;background:#FFFFFF;font-family:var(--font);}
.wss-chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-height:26px;flex-shrink:0;margin:14px 0;}
.wss-chip{display:inline-flex;align-items:center;gap:7px;background:#FFFFFF;color:#4A5560;border:1px solid #D2DAE3;border-radius:9999px;padding:4px 13px;font-size:11.5px;font-weight:500;white-space:nowrap;cursor:pointer;font-family:var(--font);line-height:1.3;}
.wss-chip:hover{background:#F7F7F7;}
.wss-chip.on{background:#2A323A;color:#FCFBF9;border-color:#2A323A;font-weight:600;}
.wss-chip.on:hover{background:#2A323A;}
.wss-chip-n{font-family:var(--font-mono);font-size:10px;opacity:.6;}
.wss-rows{flex:1 1 auto;min-height:120px;overflow-y:auto;overflow-x:hidden;}
.wss-row{display:flex;align-items:center;gap:10px;height:38px;box-sizing:border-box;padding:0 12px;margin-bottom:6px;border:1px solid #E8EDF2;border-radius:10px;background:#FFFFFF;}
.wss-row-none{background:#FCFAFA;}
.wss-row-urgent{border-color:#ECC5C6;}
.wss-code{font-family:var(--font-mono);font-size:11.5px;color:#2A323A;background:#F7F7F7;border:1px solid #E8EDF2;border-radius:6px;padding:2px 0;width:54px;box-sizing:border-box;text-align:center;flex-shrink:0;line-height:1.4;}
.wss-code.wss-amber{background:#FFF4D6;border-color:#EBD9A5;color:#7A4A00;cursor:help;}
/* Code chips sit at the left edge — anchor their bubble left so it is not clipped. */
.wss-code.tip::after{left:0;transform:none;}
.wss-code.tip::before{left:14px;transform:none;}
.wss-row-t{flex:1;min-width:0;font-size:13px;font-weight:500;color:#2A323A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wss-row-none .wss-row-t{color:#4A5560;}
.wss-row-n{width:62px;flex-shrink:0;text-align:right;font-family:var(--font-mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:#837D68;}
.wss-row-n.wss-red{color:#8A1C1C;}
.wss-st{width:92px;flex-shrink:0;text-align:center;font-size:10.5px;font-weight:600;border-radius:9999px;padding:4px 0;cursor:help;line-height:1.3;}
.wss-st-word{background:#DFF5E1;color:#1B5E20;}
.wss-st-text{background:#FFF4D6;color:#7A4A00;}
.wss-st-none{background:#FDE7E7;color:#8A1C1C;}
.wss-act{width:92px;flex-shrink:0;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;background:#FFFFFF;color:#4A5560;border:1px solid #E8EDF2;border-radius:9999px;padding:5px 0;font-size:11px;font-weight:600;cursor:pointer;font-family:var(--font);line-height:1.3;white-space:nowrap;}
.wss-act:hover{background:#F7F7F7;}
.wss-act-add{background:#F1EDE6;color:#4D4936;border-color:#D8D5C9;}
.wss-act-add:hover{background:#E9E3D8;}
.wss-ico{width:26px;height:26px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #E8EDF2;background:#FFFFFF;color:#6B7480;cursor:pointer;padding:0;box-sizing:border-box;}
.wss-ico:hover{background:#F7F7F7;color:#2A323A;}
.wss-ico svg{display:block;}
.wss-ico-ph{visibility:hidden;pointer-events:none;}
.wss-empty{padding:34px 12px;text-align:center;font-size:12.5px;color:#6B7480;}

/* ── Footer ── */
.wss-foot{flex-shrink:0;display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid #E8EDF2;}
.wss-foot-n{font-size:11px;color:#6B7480;}
.wss-status{flex:0 0 100%;font-size:11px;color:#6B7480;line-height:1.4;}
.wss-status:empty{display:none;}
.wss-foot-tools{display:flex;align-items:center;gap:9px;}
.wss-amber-pill{font-family:var(--font-mono);font-size:10px;color:#7A4A00;background:#FFF4D6;border:1px solid #EBD9A5;border-radius:5px;padding:1px 7px;cursor:help;white-space:nowrap;}
.wss-derive{display:inline-flex;align-items:center;background:#FFFFFF;border:none;border-radius:9999px;padding:5px 13px;font-size:11px;font-weight:600;color:#2A323A;box-shadow:0 1px 2px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.07);cursor:pointer;font-family:var(--font);white-space:nowrap;}
.wss-derive:hover{box-shadow:0 2px 5px rgba(0,0,0,.13),0 0 0 1px rgba(0,0,0,.11);}

/* ── Narrow panes ── */
@media (max-width:960px){
  .wss-stats{grid-template-columns:1fr;min-height:0;}
  .wss-stat{min-height:100px;}
  .wss-search{width:180px;}
}
