/* Citely — Taxonomy module workspace.
   Self-contained like the other app screens (dashboard/pinterest/login):
   the marketing stylesheet is not loaded here, so this file carries its own
   reset, tokens and layout. Tokens mirror pinterest.css deliberately. */

*{margin:0;padding:0;box-sizing:border-box}

:root{
  --void:#0B0A1A; --panel:#12102A; --panel2:#151330;
  --violet:#7C6CFF; --cyan:#4FD8FF; --green:#3ADFA5; --pink:#FF5C8A; --amber:#FFB65C; --red:#FF6B6B; --blue:#4FA3FF;
  --paper:#F2F1FA; --dim:#9C98C6; --line:rgba(255,255,255,.08); --line2:rgba(255,255,255,.14);
  --sbw:250px;
}

body{background:var(--void);color:var(--paper);font-family:Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}

.blob{position:fixed;border-radius:50%;filter:blur(120px);opacity:.5;pointer-events:none;z-index:0}
.bl1{width:520px;height:520px;background:rgba(124,108,255,.30);top:-180px;right:-120px}
.bl2{width:420px;height:420px;background:rgba(79,216,255,.16);bottom:-160px;left:180px}

/* ---------- sidebar ---------- */
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sbw);background:var(--panel);border-right:1px solid var(--line);
  padding:20px 14px;display:flex;flex-direction:column;gap:6px;z-index:3;overflow-y:auto}
.sb-logo{font-family:Unbounded,sans-serif;font-weight:700;font-size:18px;display:flex;align-items:center;gap:8px;padding:0 8px 14px}
.sb-logo .dot{color:var(--violet)}
.store{display:flex;align-items:center;gap:10px;background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:12px}
.store .fav{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,var(--violet),var(--cyan));
  display:grid;place-items:center;font-weight:700;font-size:13px;color:#0B0A1A}
.store b{display:block;font-size:13px}
.store span{font-size:11px;color:var(--dim)}
.sb-lab{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--dim);padding:12px 8px 6px}
.sb-nav{display:flex;flex-direction:column;gap:2px}
.nitem{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;font-size:13px;color:var(--dim);cursor:pointer}
.nitem:hover{background:rgba(255,255,255,.04);color:var(--paper)}
.nitem.active{background:rgba(124,108,255,.14);color:var(--paper);border:1px solid rgba(124,108,255,.3)}
.nitem .ni{width:18px;text-align:center}
.nitem .score{margin-left:auto;font-size:11px;color:var(--dim)}
.sb-user{margin-top:auto;display:flex;align-items:center;gap:10px;padding:10px;border-top:1px solid var(--line)}
.sb-user .av{width:28px;height:28px;border-radius:50%;background:var(--panel2);border:1px solid var(--line2);display:grid;place-items:center;font-size:12px}
.sb-user b{display:block;font-size:13px}
.sb-user span{font-size:11px;color:var(--dim)}
.sb-user .out{margin-left:auto;color:var(--dim);cursor:pointer}

/* ---------- main ---------- */
.main{margin-left:var(--sbw);position:relative;z-index:1}
.topbar{height:56px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:0 24px;
  background:rgba(11,10,26,.7);backdrop-filter:blur(10px);position:sticky;top:0;z-index:2}
.crumb{font-size:12px;color:var(--dim)}
.crumb b{color:var(--paper)}
.sp{flex:1}
.btn{background:var(--panel2);border:1px solid var(--line2);color:var(--paper);border-radius:9px;padding:7px 12px;
  font-size:12px;font-family:inherit;cursor:pointer}
.btn:hover{border-color:var(--violet)}
.btn.primary{background:linear-gradient(135deg,var(--violet),#5A4BD8);border-color:transparent}
.wrap{padding:24px;max-width:1180px}

.mhead{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px}
.mico{width:38px;height:38px;border-radius:11px;background:rgba(124,108,255,.15);color:var(--violet);
  display:grid;place-items:center;font-weight:700;border:1px solid rgba(124,108,255,.3)}
.mhead h1{font-family:Unbounded,sans-serif;font-size:22px;font-weight:600}
.mhead .sub{font-size:13px;color:var(--dim);margin-top:3px;max-width:640px;line-height:1.5}

/* ---------- stats ---------- */
.statbar{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}
.statcard{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px}
.statcard .sl{font-size:11px;color:var(--dim);display:block}
.statcard b{font-family:Unbounded,sans-serif;font-size:22px;display:block;margin:4px 0 2px}
.statcard .sm{font-size:11px;color:var(--dim)}

/* ---------- cards ---------- */
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px}
.card + .card{margin-top:16px}
.card h3{font-size:14px;font-weight:600;margin-bottom:4px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.card h3 .lv{font-size:11px;font-weight:400;color:var(--dim)}
.hint{font-size:12px;color:var(--dim);line-height:1.6;margin-bottom:14px}
.hint b{color:var(--paper)}

/* ---------- axis switcher: the pivot control ---------- */
.axisbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.axisbar .lbl{font-size:11px;color:var(--dim);text-transform:uppercase;letter-spacing:.1em;margin-right:2px}
.chip{background:var(--panel2);border:1px solid var(--line2);border-radius:999px;padding:6px 13px;font-size:12px;
  cursor:pointer;color:var(--dim);font-family:inherit;display:flex;align-items:center;gap:7px}
.chip:hover{color:var(--paper);border-color:var(--violet)}
.chip.on{background:rgba(124,108,255,.16);border-color:var(--violet);color:var(--paper)}
.chip .n{font-size:10px;color:var(--dim);background:rgba(0,0,0,.3);border-radius:999px;padding:1px 6px}

/* ---------- discovered-axis table ---------- */
.ftable{width:100%;border-collapse:collapse;font-size:12px}
.ftable th{text-align:left;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);
  font-weight:500;padding:0 10px 8px;border-bottom:1px solid var(--line)}
.ftable td{padding:10px;border-bottom:1px solid var(--line)}
.ftable tr:last-child td{border-bottom:0}
.ftable .fk{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--paper)}
.src{font-size:10px;border-radius:5px;padding:2px 7px;border:1px solid var(--line2);color:var(--dim)}
.src.type{color:var(--green);border-color:rgba(58,223,165,.35)}
.src.option{color:var(--cyan);border-color:rgba(79,216,255,.35)}
.src.ns-tag{color:var(--amber);border-color:rgba(255,182,92,.35)}
.bar{height:5px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden;min-width:70px}
.bar i{display:block;height:100%;background:linear-gradient(90deg,var(--violet),var(--cyan))}
.pri{font-size:9px;letter-spacing:.08em;background:rgba(124,108,255,.18);color:var(--violet);
  border:1px solid rgba(124,108,255,.4);border-radius:5px;padding:2px 6px}

/* ---------- crawl bar ---------- */
.crawlbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.crawlbar input{background:var(--void);border:1px solid var(--line2);border-radius:9px;color:var(--paper);
  font-family:inherit;font-size:13px;padding:9px 13px;width:260px;max-width:100%}
.crawlbar input:focus{outline:none;border-color:var(--violet)}
.crawlmsg{font-size:12px;color:var(--dim)}
.crawlmsg.ok{color:var(--green)}
.crawlmsg.err{color:var(--red)}

/* ---------- the tree (arbitrary nesting) ---------- */
.tree{display:flex;flex-direction:column;gap:5px}
.tree > .node{background:var(--panel2);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.node{position:relative}
.nhead{display:flex;align-items:center;gap:11px;padding:11px 14px;user-select:none}
.node.has-kids > .nhead{cursor:pointer}
.nhead:hover{background:rgba(255,255,255,.03)}
.nhead .car{color:var(--dim);font-size:9px;width:10px;text-align:center;transition:transform .15s;flex:0 0 auto}
.node.open > .nhead .car{transform:rotate(90deg)}
.nhead .nm{font-size:13px;font-weight:600;color:var(--paper)}
.nhead .ct{font-size:11px;color:var(--dim);background:rgba(255,255,255,.05);border-radius:999px;padding:1px 9px;min-width:34px;text-align:center}
.nhead .gr{flex:1;height:5px;border-radius:3px;background:rgba(255,255,255,.06);overflow:hidden;max-width:260px}
.nhead .gr i{display:block;height:100%;background:linear-gradient(90deg,var(--violet),var(--pink))}
.nhead .peek{color:var(--dim);font-size:12px;opacity:0;transition:opacity .12s;flex:0 0 auto}
.nhead:hover .peek{opacity:1}
.nhead .peek:hover{color:var(--cyan)}
.hidebtn{background:none;border:0;color:var(--dim);font-size:12px;cursor:pointer;opacity:0;transition:opacity .12s,color .12s;flex:0 0 auto;padding:2px 4px;line-height:1}
.nhead:hover .hidebtn{opacity:.7}
.hidebtn:hover{color:var(--red);opacity:1}
.hidebtn:disabled{opacity:.3;cursor:default}
.restorebtn{margin-left:auto;background:none;border:1px solid var(--line2);color:var(--dim);font-family:inherit;
  font-size:11px;border-radius:6px;padding:2px 9px;cursor:pointer}
.restorebtn:hover{color:var(--green);border-color:var(--green)}
.hiddennode{margin-top:8px;background:transparent;border-top:1px dashed var(--line2);border-radius:0}
.hiddennode .kids{margin-left:0;border-left:0}
.hiddennode .kids .nhead{padding-left:20px}
/* children: hidden until open; indent rail shows nesting */
.node .kids{display:none}
.node.open > .kids{display:block}
.kids{margin-left:22px;border-left:1px solid var(--line2);padding-left:2px}
.kids .node > .nhead{border-radius:8px}
.kids .nm{font-weight:500;font-size:12.5px}
/* leaf rows (no children) read lighter */
.node:not(.has-kids) > .nhead .nm{font-weight:400;color:var(--dim)}
.node:not(.has-kids) > .nhead:hover .nm{color:var(--paper)}
.genericnode{margin-top:8px;background:transparent;border-top:1px dashed var(--line2);border-radius:0}
.genericnode .kids{margin-left:0;border-left:0}
.genericnode .kids .nhead{padding-left:20px}

/* ---------- notice ---------- */
.notice{display:flex;gap:11px;align-items:flex-start;background:rgba(255,182,92,.07);
  border:1px solid rgba(255,182,92,.28);border-radius:12px;padding:12px 14px;font-size:12px;line-height:1.6;margin-bottom:14px}
.notice .ic{color:var(--amber)}
.notice b{color:var(--paper)}
.notice.err{background:rgba(255,107,107,.07);border-color:rgba(255,107,107,.3)}
.notice.err .ic{color:var(--red)}

.empty{padding:40px;text-align:center;color:var(--dim);font-size:13px}
.spin{display:inline-block;width:13px;height:13px;border:2px solid var(--line2);border-top-color:var(--violet);
  border-radius:50%;animation:sp .7s linear infinite;vertical-align:-2px}
@keyframes sp{to{transform:rotate(360deg)}}

@media(max-width:1000px){
  .statbar{grid-template-columns:repeat(2,1fr)}
  .sidebar{display:none}
  .main{margin-left:0}
}

/* ===== Module status chips — replace the bare "0" score with a clear state ===== */
.nitem .mstat{margin-left:auto;font-size:9px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;padding:2px 8px;border-radius:99px;border:1px solid transparent;display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.nitem .mstat.live{color:#7FE8C9;border-color:rgba(127,232,201,.32);background:rgba(127,232,201,.07)}
.nitem .mstat.live::before{content:"";width:5px;height:5px;border-radius:99px;background:#7FE8C9;box-shadow:0 0 7px #7FE8C9;animation:mstatpulse 2.4s ease-in-out infinite}
.nitem.active .mstat.live{color:#8CF0D6;border-color:rgba(127,232,201,.45)}
.nitem .mstat.soon{color:var(--dim);border-color:var(--line);background:rgba(255,255,255,.02);letter-spacing:.06em}
.nitem.soon{opacity:.5;cursor:default}
.nitem.soon:hover{background:transparent;color:var(--dim)}
@keyframes mstatpulse{0%,100%{opacity:1}50%{opacity:.35}}

/* ===== GATE 1 — confirm the collection map ===== */
.gate{display:flex;align-items:center;gap:13px;flex-wrap:wrap;padding:15px 18px;margin-bottom:18px;border-radius:15px;
  border:1px solid rgba(255,176,32,.34);background:rgba(255,176,32,.07)}
.gate.ok{border-color:rgba(58,223,165,.34);background:rgba(58,223,165,.06)}
.gdot{width:9px;height:9px;flex:none;border-radius:50%;background:#ffb020;box-shadow:0 0 0 5px rgba(255,176,32,.14)}
.gate.ok .gdot{background:#3adfa5;box-shadow:0 0 0 5px rgba(58,223,165,.14)}
.gtxt{flex:1 1 320px;font-size:13px;line-height:1.5;color:var(--paper)}
.gbtn{flex:none;background:linear-gradient(100deg,var(--cyan,#4FD8FF),var(--violet,#7C6CFF) 70%);border:0;color:#0B0A1A;
  font-family:inherit;font-size:13px;font-weight:700;padding:9px 16px;border-radius:10px;cursor:pointer;transition:filter .15s}
.gbtn:hover{filter:brightness(1.1)}
.gbtn:disabled{opacity:.5;cursor:default}
.gbtn.ghost{background:rgba(255,255,255,.06);border:1px solid var(--line2);color:var(--paper)}
.gbtn.sm{font-size:12px;padding:6px 12px;border-radius:8px}

/* ===== add a collection we missed ===== */
.addrow{margin-bottom:14px}
.addtoggle{background:rgba(255,255,255,.05);border:1px dashed var(--line2);color:var(--dim);font-family:inherit;
  font-size:12.5px;font-weight:600;padding:9px 15px;border-radius:10px;cursor:pointer;transition:.15s}
.addtoggle:hover{color:var(--paper);border-color:var(--violet,#7C6CFF)}
.addform{margin-top:12px;padding:16px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.03)}
.addgrid{display:grid;grid-template-columns:1fr 1.4fr;gap:12px}
@media(max-width:680px){.addgrid{grid-template-columns:1fr}}
.addform label{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--dim);font-weight:600}
.addform label i{text-transform:none;letter-spacing:0;opacity:.7;font-style:normal}
.addform input[type=text],.addform input:not([type]){width:100%}
.addform input{width:100%;margin-top:6px;background:rgba(0,0,0,.25);border:1px solid var(--line2);border-radius:9px;
  color:var(--paper);font-family:inherit;font-size:13px;padding:9px 11px}
.addform input:focus{outline:0;border-color:var(--violet,#7C6CFF)}
.addkind{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-top:14px}
.rad{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--paper);text-transform:none;letter-spacing:0;font-weight:500;cursor:pointer}
.rad input[type=radio]{width:auto;margin:0;accent-color:var(--violet,#7C6CFF)}
.subof{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--paper)}
.subof[hidden]{display:none}
/* The native option popup is drawn by the OS, not the page. A translucent
   background makes Chrome composite it against white, which is why the list came
   out light-on-light — so the select and its options both take OPAQUE colours. */
.rad select,.subof select{margin-left:0;background:#151330;border:1px solid var(--line2);border-radius:8px;color:var(--paper);
  font-family:inherit;font-size:12.5px;padding:7px 30px 7px 11px;max-width:260px;
  appearance:none;-webkit-appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%239C98C6' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 11px center}
.rad select:focus,.subof select:focus{outline:0;border-color:var(--violet,#7C6CFF)}
.rad select option,.subof select option{background:#151330;color:#F2F1FA}
.addact{display:flex;align-items:center;gap:10px;margin-top:15px}
.addmsg,.kmsg{font-size:12px;color:var(--dim)}

/* ===== inline collection / sub-collection editor ===== */
.kindbtn{background:none;border:0;color:var(--dim);font-size:13px;cursor:pointer;padding:2px 6px;border-radius:6px;opacity:0;transition:.15s}
.nhead:hover .kindbtn{opacity:1}
.kindbtn:hover{color:var(--cyan,#4FD8FF);background:rgba(255,255,255,.07)}
.kindform{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:6px 0 10px 30px;padding:11px 14px;
  border:1px solid var(--line2);border-radius:11px;background:rgba(124,108,255,.07)}

/* Locked sidebar items — visible, explained, not clickable (gate state). */
.nitem.locked{opacity:.45;cursor:not-allowed}
.nitem.locked:hover{background:none;color:var(--dim)}
.mstat.lock{margin-left:auto;font-size:10px;opacity:.8}

/* The store is fixed, not typed — shown as a read-only chip where the free-text
   domain box used to be, so it is obvious there is nothing to change here. */
.fixedstore{display:inline-flex;align-items:center;gap:8px;font-family:'IBM Plex Mono',monospace;font-size:13px;
  color:var(--paper);background:rgba(255,255,255,.05);border:1px solid var(--line2);border-radius:10px;padding:9px 14px}
.fixedstore::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--green,#3ADFA5);
  box-shadow:0 0 0 3px rgba(58,223,165,.18)}

/* Action card: copy on the left, one primary action on the right, real state
   underneath. Replaces the fixed-domain chip, which read as a dead input. */
.actcard .act-head{display:flex;align-items:flex-start;gap:22px}
.actcard .act-copy{flex:1;min-width:0}
.actcard .act-copy .hint{margin-bottom:0}
.actcard .act-head .btn{flex:none;margin-top:2px;white-space:nowrap}
@media(max-width:680px){
  .actcard .act-head{flex-direction:column;gap:14px}
  .actcard .act-head .btn{width:100%;justify-content:center}
}
.act-state{display:flex;align-items:center;gap:9px;margin-top:15px;padding-top:14px;
  border-top:1px solid var(--line);font-size:12.5px;color:var(--dim)}
.act-state b{color:var(--paper);font-weight:600}
.act-dot{width:7px;height:7px;border-radius:50%;flex:none;background:var(--dim)}
.act-dot.on{background:var(--green,#3ADFA5);box-shadow:0 0 0 3px rgba(58,223,165,.18)}
.act-dot.idle{background:var(--amber,#FFB65C);box-shadow:0 0 0 3px rgba(255,182,92,.16)}

/* Each row states what it is, in words, and that label is the control that
   changes it. The previous ⇅ icon was invisible to anyone not already told. */
.kindtag{display:inline-flex;align-items:center;gap:5px;flex:none;font-family:inherit;font-size:10.5px;font-weight:600;
  letter-spacing:.02em;padding:3px 9px;border-radius:99px;cursor:pointer;transition:.15s;white-space:nowrap}
.kindtag i{font-style:normal;font-size:10px;opacity:.85}
.kindtag.top{background:rgba(124,108,255,.14);border:1px solid rgba(124,108,255,.35);color:#B9AFFF}
.kindtag.sub{background:rgba(79,216,255,.12);border:1px solid rgba(79,216,255,.3);color:#8FE4FF}
.kindtag:hover{filter:brightness(1.25);border-color:currentColor}
/* The pencil is the affordance: it says "this is a control, not a caption".
   Amber rather than the badge's own colour so the ACTION reads as separate from
   the label — and it is the same yellow used elsewhere for "needs your input". */
.kindedit{font-style:normal;font-size:10.5px;margin-left:2px;color:var(--amber,#FFB65C);
  opacity:.85;transition:opacity .15s,transform .15s}
.kindtag:hover .kindedit{opacity:1;transform:scale(1.12)}
.kindtag:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:720px){.kindtag{display:none}}

/* Numbered instructions read as a checklist, not a wall of prose. */
.gsteps{margin:9px 0 9px 0;padding-left:19px;display:grid;gap:4px}
.gsteps li{font-size:12.5px;color:var(--dim);line-height:1.5}
.gsteps li::marker{color:var(--violet,#7C6CFF);font-weight:700}

/* Empty-state line under the gate heading — same weight as the numbered steps
   it replaces, so the "read your collections" state reads as deliberate rather
   than as a stripped-down version of the confirm state. */
.gsub{margin-top:6px;font-size:12.5px;line-height:1.55;color:var(--dim)}

.bx{color:var(--cyan);font-weight:800;font-style:normal}
