/* Knowledge System figures: Obsidian panes (environment ck-* components) for open files and
   sessions; records being referenced use the same window card as the page hero and the
   register widget; thin wires with junction dots carry the flow. Tokens copied from
   site.css :root (dark) so the figures sit on the page without a seam. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500&display=swap");
:root{color-scheme:dark;--ck-green:#8fd3ad;
  --paper:#0c0c0c;--paper-2:#111111;--paper-3:#1a1a1a;
  --ink:#d4d4d4;--ink-2:#969696;--ink-3:#6b6b6b;
  --line:#232323;--line-2:#2a2a2a;--wire:#3a3a3a;
  --accent:#7fb2e8;--gold:#c08a4a;--green:#8fc4a0;
  --mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --serif:"Newsreader",Georgia,serif;
  --doc:"Segoe UI",system-ui,sans-serif}
*{box-sizing:border-box}
html,body{margin:0;background:transparent!important}
.stagepage.ksx{padding:10px 2px 14px;font-family:var(--mono);color:var(--ink);-webkit-font-smoothing:antialiased}

/* window card: same chrome as the hero's vault cards and the register widget */
.win{background:var(--paper-2);border:1px solid var(--line-2);box-shadow:0 8px 20px rgba(0,0,0,.28);position:relative}
.win .tb{display:flex;align-items:center;gap:7px;padding:6px 7px 6px 11px;border-bottom:1px solid var(--line);background:linear-gradient(var(--paper-3),var(--paper-2));white-space:nowrap}
.win .tb .fname{min-width:0;flex:0 1 auto;font-size:12px;font-weight:500;color:var(--ink);overflow:hidden;text-overflow:ellipsis}
.win .tb .tense{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent)}
.win .tb .ctl{margin-left:auto;display:flex;gap:1px;flex:0 0 auto;color:var(--ink-3);font-size:11px}
.win .tb .ctl s{text-decoration:none;width:13px;text-align:center}
.win .bd{padding:9px 12px 10px;font-size:12px;line-height:1.55;color:var(--ink-2)}
.win .bd b{color:var(--ink);font-weight:500}
.win .bd .eid{color:var(--accent)}

/* wires: an svg stretched across a gutter column; dots sit on card and pane edges */
.wires{display:block;width:100%;height:100%;overflow:visible}
.wires path{fill:none;stroke:var(--accent);stroke-width:1.5;vector-effect:non-scaling-stroke}
.wires path.gold{stroke:var(--gold)}
.jx{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--accent);top:50%;margin-top:-3.5px;z-index:2}
.jx.r{right:-4px}.jx.l{left:-4px}
.jx.gold{background:var(--gold)}

/* columns of parallel blocks: equal rows, each block centred in its row, so the
   wire endpoints in the gutter svg (row centres) land exactly on the junction dots */
.rows3,.rows2{display:grid;align-self:stretch}
.rows2{grid-template-rows:repeat(2,1fr)}
.rows3{grid-template-rows:repeat(3,1fr)}
.rows2>*,.rows3>*{align-self:center;margin:7px 0}
.gut{align-self:stretch}

/* phone: everything stacks, wires become a short down-tick between blocks */
.down{display:none}
@media (max-width:600px){
  .flow{display:block!important}
  .flow > .gut{display:none}
  .rows2,.rows3{display:block}
  .rows2>*,.rows3>*{margin:0}
  .rows2>*+*,.rows3>*+*{margin-top:8px}
  .down{display:block;width:1.5px;height:16px;background:var(--wire);margin:0 auto}
  .jx{display:none}
}

/* Obsidian panes (the environment hero's ck-* components), sized to content */
.ksx .ck-leaf{height:auto!important;min-height:0!important;position:relative;overflow:visible;box-shadow:0 10px 26px rgba(0,0,0,.35)}
.ksx .ck-leaf > .ck-tabbar{border-radius:8px 8px 0 0}
.ksx .ck-term{padding:12px 13px 10px;font-size:11px;line-height:1.6;min-height:0}
.ksx .ck-term .ck-out{justify-content:flex-start}
.ksx .ck-prompt{padding-top:8px}
.ksx .ck-status{margin-top:6px!important}
.ksx .ck-term .opt{display:block;padding-left:20px;color:var(--ink-3)}
.ksx .ck-term .opt.pick{color:var(--gold)}
.ksx .ck-u.gold{border-left:2px solid var(--gold)}
.ksx .ck-note{padding:14px 16px 14px!important}
.ksx .ck-note h1{font-size:16px!important;margin:0 0 4px!important}
.ksx .ck-note h2{font-size:13px!important;margin:10px 0 4px!important}
.ksx .ck-note p,.ksx .ck-note li{font-size:12px!important}
.ksx .ck-note p{margin:0 0 6px!important}
.ksx .ck-note p:last-child{margin-bottom:0!important}
.ksx .ck-note mark{background:rgba(214,178,94,.22);color:var(--ink);padding:0 2px;border-radius:2px}
.ksx .ck-note .add,.ksx .ck-note .del{display:block;padding:4px 10px;margin:0 0 4px -10px;font-size:12px;line-height:1.5}
.ksx .ck-note .add{background:rgba(143,211,173,.11);border-left:2px solid #8fd3ad;color:var(--ink)}
.ksx .ck-note .del{background:rgba(214,120,104,.12);border-left:2px solid #c98478;color:#b9aaa6;text-decoration:line-through;text-decoration-color:rgba(201,132,120,.7)}
.ksx .ck-note .add:last-child,.ksx .ck-note .del:last-child{margin-bottom:0}
.ksx .ck-tab.on{font-size:12px}
/* compact panes for the fan-out column: a single short note under a slim tab bar */
.ksx .slim .ck-tabbar{height:30px}
.ksx .slim .ck-tab.on{height:24px;font-size:11.5px}
.ksx .slim .ck-tplus,.ksx .slim .ck-tright{display:none}
.ksx .slim .ck-note{padding:9px 14px 10px!important}
