/* ============================================================================
   Members and the Hedge Desk.

   Same tokens, same type, same radii as every other room — nothing here
   defines a colour of its own. Long carries a quiet green edge, short a
   quiet red one; the panels themselves stay neutral. Results read as word +
   icon + colour, never colour alone.
   ========================================================================= */

/* ---- Members: one compact card, centred in the room --------------------- */
.members .mem-wrap{ min-height:100%; display:flex; align-items:center; justify-content:center;
  padding:var(--s9, 48px) var(--pad-x); }
.mem-card{
  width:min(400px, 100%); display:flex; flex-direction:column; align-items:flex-start; gap:6px;
  padding:28px 28px 22px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r4); box-shadow:var(--lift-2);
}
.mem-mark{ width:36px; height:36px; border-radius:var(--r3); display:grid; place-items:center; margin-bottom:10px;
  background:var(--surface-2); color:var(--ink-2); box-shadow:inset 0 0 0 1px var(--line-2); }
.mem-mark svg{ width:17px; height:17px; }
.mem-card.is-unlocked .mem-mark{ color:var(--green); background:var(--green-50); box-shadow:none; }
.mem-card h1{ font-size:21px; font-weight:600; letter-spacing:-.03em; color:var(--ink); margin-top:2px; }
.mem-sub{ font-size:13px; line-height:1.5; color:var(--ink-3); margin-bottom:12px; }
.mem-form{ width:100%; display:flex; flex-direction:column; gap:10px; }
.mem-inp{ height:40px; font-size:15px; letter-spacing:.18em; font-family:var(--mono); }
.mem-inp[aria-invalid="true"]{ border-color:var(--red-400); }
.mem-err{ font-size:12.5px; color:var(--red); margin-top:-2px; }
.mem-go{ width:100%; height:38px; justify-content:center; font-size:13px; font-weight:600; }
.mem-note{ display:flex; gap:8px; font-size:12.5px; line-height:1.5; color:var(--ink-3); margin-bottom:8px; }
.mem-note svg{ width:15px; height:15px; flex:none; margin-top:2px; color:var(--ink-4); }
.mem-fine{ font-size:11.5px; line-height:1.5; color:var(--ink-4); margin-top:10px; }
.mem-link{ color:var(--blue); font-weight:500; font-size:inherit; padding:0; }
.mem-link:hover{ text-decoration:underline; }

/* ---- the desk: the client's reference layout, in TradeSeq's tokens ------ */
.hd{ max-width:1360px; display:flex; flex-direction:column; gap:14px; }
.hd-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px 16px; flex-wrap:wrap; }
.hd-head h1{ font-size:24px; font-weight:600; letter-spacing:-.035em; color:var(--ink); }
.hd-head p{ margin-top:3px; font-size:13px; color:var(--ink-3); }
.hd-meta{ display:flex; align-items:center; gap:8px; }
.hd-sim{ font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; padding:4px 9px;
  border-radius:var(--r2); color:var(--violet); background:var(--violet-50); }
.hd-snap{ display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--ink-3); padding:4px 10px;
  border-radius:var(--r2); background:var(--surface-2); white-space:nowrap; }
.hd-snap .pulse{ width:6px; height:6px; border-radius:50%; background:var(--green-400); }
.hd-snap .pulse.stale{ background:var(--amber-400); }

/* controls: inputs and Refresh on one row, Run Preflight under them */
.hd-bar{ display:flex; flex-direction:column; gap:12px; padding:14px 16px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r3); }
.hd-bar-r1{ display:flex; align-items:flex-end; gap:12px 16px; flex-wrap:wrap; }
.hd-bar-r2{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.hd-ctl{ min-width:0; }
.hd-ctl select{ width:220px; height:36px; }
.hd-max input{ width:150px; height:36px; }
.hd-submit-t{ display:flex; align-items:center; gap:9px; height:36px; cursor:pointer; font-size:13px; color:var(--ink-2); font-weight:500; }
.hd-submit-t small{ font-size:12px; color:var(--ink-4); font-weight:400; }
.hd-refresh{ margin-left:auto; height:36px; }
.hd-run{ height:36px; padding:0 16px; font-weight:600; }
.hd-bar-r2 .btn{ height:36px; }
.hd-last{ font-size:11.5px; color:var(--ink-4); }

/* the safety banner */
.hd-gate{ display:flex; align-items:flex-start; gap:12px; padding:13px 16px; border-radius:var(--r3);
  border:1px solid var(--line); background:var(--surface); }
.hd-gate-dot{ width:7px; height:7px; border-radius:50%; margin-top:6px; flex:none; background:var(--ink-3); }
.hd-gate b{ font-size:13px; font-weight:700; letter-spacing:.04em; }
.hd-gate p{ margin-top:4px; font-size:13.5px; line-height:1.5; color:var(--ink-2); max-width:96ch; }
.hd-gate.block{ border-color:color-mix(in srgb, var(--red-400) 40%, var(--line)); background:var(--red-50); }
.hd-gate.block b{ color:var(--red); }
.hd-gate.block .hd-gate-dot{ background:var(--red); }
.hd-gate.pass{ border-color:color-mix(in srgb, var(--green-400) 40%, var(--line)); background:var(--green-50); }
.hd-gate.pass b{ color:var(--green); }
.hd-gate.pass .hd-gate-dot{ background:var(--green); }

/* long | short: a coloured left edge, the panel itself neutral */
.hd-sides{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; align-items:start; }
.hd-side{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r3); min-width:0;
  box-shadow:inset 3px 0 0 var(--side); overflow:hidden; }
.hd-side.long{ --side:var(--green-400); --side-ink:var(--green); }
.hd-side.short{ --side:var(--red-400); --side-ink:var(--red); }
.hd-side-h{ display:flex; align-items:center; gap:10px; padding:12px 14px 12px 18px; border-bottom:1px solid var(--line); }
.hd-side-h h2{ font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--side-ink); }
.hd-tot{ display:block; margin-top:2px; font-size:12.5px; color:var(--ink-3); }
.hd-add{ margin-left:auto; height:34px; }
.hd-legs{ display:flex; flex-direction:column; }
.hd-empty{ padding:22px 18px; font-size:12.5px; color:var(--ink-4); }

.hd-leg{ padding:14px 14px 12px 18px; border-top:1px solid var(--line); }
.hd-leg:first-child{ border-top:0; }
.hd-leg.is-off{ opacity:.55; }
.hd-leg-top{ display:flex; align-items:flex-start; gap:10px; min-width:0; }
.hd-chk{ width:16px; height:16px; accent-color:var(--blue); flex:none; margin-top:2px; }
.hd-acct{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
.hd-acct b{ font-size:14px; font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hd-acct > span{ font-size:12px; color:var(--ink-3); }
.kind{ font-weight:600; }
.kind.evaluation{ color:var(--blue-900); }
.kind.funded{ color:var(--green-900); }
.hd-pill{ display:inline-flex; align-items:center; gap:6px; flex:none; font-size:12px; font-weight:500; padding:3px 10px;
  border-radius:999px; color:var(--ink-3); background:var(--surface-2); white-space:nowrap; }
.hd-pill i{ width:6px; height:6px; border-radius:50%; background:var(--ink-4); }
.hd-pill.ok{ color:var(--green); background:var(--green-50); } .hd-pill.ok i{ background:var(--green); }
.hd-pill.warn{ color:var(--amber-900); background:var(--amber-50); } .hd-pill.warn i{ background:var(--amber); }
.hd-pill.crit{ color:var(--red); background:var(--red-50); } .hd-pill.crit i{ background:var(--red); }
.hd-x{ color:var(--ink-4); margin-top:-1px; }
.hd-leg-fields{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; margin-top:12px; }
.hd-f .lbl{ font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hd-f .inp{ height:36px; font-size:13.5px; }
.hd-inp{ position:relative; display:block; }
.hd-inp.has-pre i{ position:absolute; left:10px; top:50%; transform:translateY(-50%); font-style:normal; font-size:13.5px; color:var(--ink-4); pointer-events:none; }
.hd-inp.has-pre .inp{ padding-left:22px; }
.hd-f.bad .inp{ border-color:var(--red-400); }
.hd-err{ display:block; margin-top:4px; font-size:11px; font-style:normal; color:var(--red); }
.hd-est{ margin-top:10px; padding:9px 12px; border-radius:var(--r2); background:var(--surface-2);
  font-size:12px; line-height:1.5; color:var(--ink-3); }
.hd-est b{ color:var(--ink-2); font-weight:600; }
.hd-kv{ margin-top:8px; display:flex; flex-direction:column; }
.hd-kv > div{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 0; }
.hd-kv dt{ font-size:12.5px; color:var(--ink-3); white-space:nowrap; }
.hd-kv dd{ font-size:12.5px; color:var(--ink-2); text-align:right; min-width:0; }

/* PASS · WARNING · BLOCKED — a word, a colour, and the reason */
.hd-tag{ display:inline-block; font-size:12px; font-weight:500; padding:3px 10px; border-radius:999px;
  color:var(--ink-3); background:var(--surface-2); line-height:1.4; text-align:left; }
.hd-tag.pass{ color:var(--green); background:var(--green-50); }
.hd-tag.warn{ color:var(--amber-900); background:var(--amber-50); }
.hd-tag.block{ color:var(--red); background:var(--red-50); }
.hd-tag.big{ font-size:12.5px; padding:4px 12px; white-space:nowrap; }

/* preflight checklist + what happens after submit, side by side */
.hd-bottom{ display:grid; grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr); gap:14px; align-items:start; }
.hd-pf, .hd-after{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r3); min-width:0; }
.hd-sec-h{ display:flex; align-items:center; justify-content:space-between; gap:10px 14px; flex-wrap:wrap; padding:14px 16px 10px; }
.hd-sec-h h2{ font-size:16px; font-weight:600; letter-spacing:-.02em; color:var(--ink); }
.hd-cl{ padding:0 16px; }
.hd-cl li{ display:flex; align-items:center; justify-content:space-between; gap:8px 16px; padding:10px 0; border-top:1px solid var(--line); }
.hd-cl li:first-child{ border-top:0; }
.hd-cl-l{ font-size:13px; color:var(--ink-2); display:flex; flex-direction:column; gap:2px; min-width:0; }
.hd-cl-l small{ font-size:11.5px; color:var(--ink-4); }
.hd-cl .hd-tag{ flex:none; max-width:60%; }
.hd-pf-foot{ padding:10px 16px 14px; font-size:11.5px; color:var(--ink-4); border-top:1px solid var(--line); }
.hd-after ol{ display:flex; flex-direction:column; gap:12px; padding:2px 16px 16px; }
.hd-after li{ display:flex; gap:12px; font-size:13px; line-height:1.55; color:var(--ink-2); }
.hd-after li b{ flex:none; width:24px; height:24px; border-radius:50%; display:grid; place-items:center;
  font-size:11.5px; font-weight:600; color:var(--ink-3); background:var(--surface-2); box-shadow:inset 0 0 0 1px var(--line-2); }

/* the account picker */
.hd-pick{ display:flex; flex-direction:column; gap:12px; }
.hd-pick-list{ display:flex; flex-direction:column; gap:12px; }
.hd-pick-gh{ font-size:11px; font-weight:600; color:var(--ink-3); padding:0 2px 5px; display:flex; gap:8px; }
.hd-pick-row{ width:100%; display:grid; grid-template-columns:minmax(0, 1fr) auto auto 90px; align-items:center; gap:12px;
  padding:8px 10px; border-radius:var(--r2); text-align:left; font-size:12px; color:var(--ink-3); }
.hd-pick-row:hover:not(:disabled){ background:var(--surface-2); }
.hd-pick-row:disabled{ opacity:.5; cursor:not-allowed; }
.hd-pick-row b{ color:var(--ink); font-size:12.5px; }
.hd-pick-c{ display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.hd-pick-s{ white-space:nowrap; }
.hd-pick-w{ justify-self:end; font-size:11.5px; color:var(--ink-4); white-space:nowrap; display:inline-flex; gap:4px; align-items:center; }
.hd-pick-w.add{ color:var(--blue); font-weight:600; }
.hd-pick-w svg{ width:12px; height:12px; }

/* the phone keeps Members / Hedge in the account menu; a desk does not need it there */
.pop-phone{ display:none; }

@media (max-width:1180px){
  .hd-sides, .hd-bottom{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:760px){
  .pop-phone{ display:flex; }
  .members .mem-wrap{ align-items:flex-start; padding-top:28px; }
  .mem-card{ padding:22px 18px 18px; }
  .hd-refresh{ margin-left:0; }
}
@media (max-width:560px){
  .hd-ctl, .hd-ctl select, .hd-max input{ width:100%; }
  .hd-bar-r1 > *{ flex:1 1 100%; }
  .hd-submit-t{ height:auto; align-items:flex-start; }
  .hd-bar-r2 .btn{ flex:1; justify-content:center; }
  .hd-side-h{ flex-wrap:wrap; }
  .hd-add{ margin-left:0; width:100%; justify-content:center; }
  .hd-leg-top{ flex-wrap:wrap; }
  .hd-leg-top .hd-pill{ order:5; margin-left:26px; }
  .hd-leg-top .hd-x{ order:6; margin-left:auto; }
  .hd-leg-fields{ grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
  .hd-leg-fields .hd-f:first-child{ grid-column:1 / -1; }
  .hd-kv > div{ flex-direction:column; align-items:flex-start; gap:4px; }
  .hd-kv dd{ text-align:left; }
  .hd-cl li{ flex-direction:column; align-items:flex-start; }
  .hd-cl .hd-tag{ max-width:100%; }
  .hd-pick-row{ grid-template-columns:minmax(0, 1fr) auto; }
  .hd-pick-s, .hd-pick-c{ display:none; }
}
