/* Copyright (C) 2026 by Earl Woodruff. All rights reserved. Updated for KNC 2.5.1. */

:root{
  --bg:#09111f;--panel:#111b2e;--panel2:#16243b;--ink:#e9f0fb;--muted:#9fb0c8;--line:#263956;
  --accent:#76a7ff;--accent2:#8debd0;--red:#b91c1c;--redbg:#fff1f2;--blue:#1d4ed8;--black:#0f172a;
  --white:#f8fafc;--shadow:0 22px 55px rgba(0,0,0,.24)
}
*{box-sizing:border-box}
body{margin:0;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:linear-gradient(180deg,#09111f,#0d1422);position:relative;min-height:100vh}
body::before{content:"";position:fixed;inset:0;background:url('/static/assets/Bkgnd.png') center/cover no-repeat fixed;opacity:.72;z-index:-3}
body::after{content:"";position:fixed;inset:0;background:linear-gradient(180deg,rgba(9,17,31,.34),rgba(9,17,31,.58));z-index:-2}
body.workspace-mode::before{background-image:url('/static/assets/WorkSpace.png');opacity:.44}
body.workspace-mode::after{background:linear-gradient(180deg,rgba(7,15,30,.42),rgba(8,15,28,.68))}
h1,h2,h3,p,ul{margin-top:0} main{padding:1.05rem;max-width:1760px;margin:auto}
.hero{padding:1.8rem 1.25rem;display:flex;justify-content:space-between;gap:1rem;align-items:flex-end;border-bottom:1px solid rgba(255,255,255,.09);background:rgba(9,17,31,.48);backdrop-filter:blur(12px);position:sticky;top:0;z-index:5}
.hero h1{font-size:clamp(2rem,4vw,3.7rem);max-width:900px;line-height:1.02;margin:.25rem 0}.hero p{color:var(--muted);font-size:1.02rem;max-width:850px}
.eyebrow{color:var(--accent2);letter-spacing:.12em;text-transform:uppercase;font-weight:700;font-size:.78rem}
.hero-actions,.row{display:flex;align-items:center}.gap{gap:.7rem}.wrap{flex-wrap:wrap}.spread{justify-content:space-between}
.grid{display:grid;gap:1rem}.two{grid-template-columns:1fr 1fr}.three{grid-template-columns:1fr 1fr 1fr}.app-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:1rem}.admin-grid{align-items:start}
.workspace-compact{display:grid;grid-template-columns:190px minmax(0,1fr);gap:1rem}
.workspace-shell{position:relative}
.hero-actions{gap:.65rem;flex-wrap:wrap;justify-content:flex-end}
.hero-actions .ghost{white-space:nowrap}
.mainstack{padding-top:0}
.card{background:linear-gradient(180deg,rgba(17,27,46,.82),rgba(17,27,46,.68));border:1px solid rgba(255,255,255,.09);border-radius:24px;padding:1.1rem;box-shadow:var(--shadow)}
.translucent-card{background:linear-gradient(180deg,rgba(17,27,46,.82),rgba(17,27,46,.72));backdrop-filter:blur(10px)}
.accent-card{background:linear-gradient(135deg,rgba(118,167,255,.18),rgba(141,235,208,.09))}
.splash-panel .card{min-height:250px}
.sidebar,.rail{align-self:start}.sticky{position:sticky;top:126px}.mainpanel,.mainstack{min-height:600px}.mainstack{display:flex;flex-direction:column;gap:1rem}.wide-main{min-width:0}
.stack{display:flex;flex-direction:column;gap:.85rem}.compact{gap:.55rem}.panel{border-top:1px solid rgba(255,255,255,.08);padding-top:1rem;margin-top:1rem}.panelless{padding-bottom:.5rem}.topgap{margin-top:.8rem}.hidden{display:none!important}.muted{color:var(--muted)}
.pill{display:inline-flex;background:rgba(118,167,255,.13);border:1px solid rgba(118,167,255,.35);border-radius:999px;padding:.45rem .7rem;color:#cfe0ff;width:fit-content}
.course-pill{display:block;width:100%;text-align:center;background:rgba(118,167,255,.18);padding:.6rem .8rem}
.side-identity{display:flex;flex-direction:column;gap:.65rem}
.labelbtn[disabled]{opacity:1;cursor:default;background:rgba(36,54,82,.92);color:#f8fbff;border:1px solid rgba(255,255,255,.13)}
button.progressing{position:relative;overflow:hidden;color:#07101f;background:#dbe7ff;border:1px solid rgba(255,255,255,.12)}
button.progressing::before{content:"";position:absolute;inset:0;width:var(--progress,0%);background:linear-gradient(90deg,#8debd0,#9dc2ff);transition:width .08s linear;z-index:0}
button.progressing span{position:relative;z-index:1}
label{display:flex;flex-direction:column;gap:.36rem}label.inline{flex-direction:row;align-items:center;gap:.45rem}
input,textarea,select,button{font:inherit}input,textarea,select{width:100%;border:1px solid var(--line);background:#0c1525;color:var(--ink);border-radius:15px;padding:.75rem .85rem}
button{border:0;border-radius:15px;padding:.75rem 1rem;color:#07101f;background:linear-gradient(180deg,#9dc2ff,#72a0f7);box-shadow:0 14px 28px rgba(64,119,218,.28);font-weight:700;cursor:pointer}
button:hover{filter:brightness(1.05)}button.secondary,button.ghost{background:#243652;color:var(--ink);box-shadow:none;border:1px solid rgba(255,255,255,.08)}button.ghost{background:rgba(255,255,255,.06)}.smallbtn{font-size:.85rem;padding:.48rem .7rem}.railbtn{width:100%;justify-content:center}
.chip-list{display:flex;gap:.55rem;flex-wrap:wrap}.chip-list.vertical{flex-direction:column}.chip{background:#172640;color:var(--ink);border:1px solid var(--line);box-shadow:none;text-align:left;width:100%}.chip.active{border-color:var(--accent);background:rgba(118,167,255,.2)}
.tight-actions{display:grid;gap:.55rem}.composer-card{padding:1.2rem}.composer-grid{display:grid;grid-template-columns:220px minmax(0,1fr);gap:.85rem}.preview-label{font-size:.88rem;color:var(--muted);margin-bottom:.35rem}
.note-preview{min-height:130px;border:1px solid var(--line);border-radius:18px;background:rgba(12,21,37,.72);padding:1rem}.empty-preview{display:grid;place-items:center;color:var(--muted)}
.stream{display:flex;flex-direction:column;gap:1rem}.stream-card{min-height:640px}.note{background:rgba(248,250,252,.98);border-radius:22px;padding:1rem;border-left:8px solid var(--blue);color:var(--black);box-shadow:0 16px 34px rgba(0,0,0,.15)}.note.mine{border-left-color:var(--black)}.note.other{border-left-color:var(--blue)}.note.ai-note{border-left-color:var(--green)}.note.ai-note .note-body{color:var(--green);font-weight:600}
.note-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.note h3{color:var(--black);margin-bottom:.2rem}.meta{font-size:.82rem;color:#64748b}.note-body{white-space:normal;line-height:1.55;color:#000}.note .body-copy{margin-bottom:.7rem}.note .body-copy:last-child{margin-bottom:0}
.fileline{border-top:1px solid #e2e8f0;padding-top:.6rem;color:#475569;margin-top:.8rem}.attachment-link{color:#1d4ed8;font-weight:700;text-decoration:none}.attachment-link:hover{text-decoration:underline}.attachment-preview{display:block;max-width:100%;max-height:360px;object-fit:contain;border:1px solid #dbe4f0;border-radius:16px;margin-top:.7rem;background:#f8fafc}
.insert-block{border-radius:16px;padding:.85rem .95rem;margin:.7rem 0;white-space:normal}.chat-import{background:#ecfdf5;border-left:5px solid var(--green);color:var(--green)}.reflection-import{background:#fff;border-left:5px solid var(--green);color:var(--green);font-weight:700;text-transform:uppercase;font-variant:small-caps;letter-spacing:.04em}.reflection-modal-preview{background:#000;color:var(--green)}.insert-label{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;font-weight:700;opacity:.8;margin-bottom:.3rem}
.comments{margin-top:1rem;display:flex;flex-direction:column;gap:.55rem}.comment{border-left:4px solid var(--red);background:#fff5f5;color:var(--red);padding:.7rem .8rem;border-radius:14px;margin-left:1rem}.comment p{margin-bottom:.35rem}.comment .meta{color:#a83a3a}.replies{margin-left:1rem;margin-top:.6rem;display:flex;flex-direction:column;gap:.55rem}.comment-form{display:flex;gap:.5rem;margin-top:.8rem}.comment-form input{background:#fff;color:#111827;border-color:#d1d5db}.link{background:transparent;color:#a83a3a;box-shadow:none;border:0;padding:0 .3rem;font-weight:700}.replybox{margin-top:.5rem}
.note-topic-tags{display:flex;gap:.45rem;flex-wrap:wrap;margin:.55rem 0 0}.topic-chip{display:inline-flex;align-items:center;padding:.28rem .62rem;border-radius:999px;background:#e0ecff;color:#1e3a8a;border:1px solid #bfd3fb;font-size:.76rem;font-weight:700}.note-tools{margin-top:.85rem;padding-top:.7rem;border-top:1px solid #e2e8f0}.topic-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem;align-items:center}.topic-form select{background:#fff;color:#111827;border-color:#d1d5db}.smallhint{font-size:.82rem;margin:0}
.tag-list{display:flex;flex-direction:column;gap:.75rem;margin-top:1rem}.tag-row,.suggestion{border:1px solid rgba(255,255,255,.09);background:#0d1728;border-radius:18px;padding:1rem;display:flex;justify-content:space-between;gap:1rem}.ok{color:var(--accent2);font-size:.82rem;margin-left:.35rem}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.62);z-index:20;display:grid;place-items:center;padding:1rem}.modal-card{position:relative;background:#111b2e;border:1px solid var(--line);border-radius:24px;padding:1.2rem;width:min(960px,96vw);max-height:88vh;overflow:auto;overflow-x:hidden;box-shadow:var(--shadow)}.close{position:absolute;top:.7rem;right:.7rem;background:#243652;color:#fff;border-radius:999px;padding:.35rem .65rem;box-shadow:none}
.toast{position:fixed;right:1rem;bottom:1rem;background:#0f172a;color:#fff;border:1px solid var(--line);border-radius:16px;padding:1rem;box-shadow:var(--shadow);z-index:30}
.modal-actions{display:flex;gap:.7rem;justify-content:flex-end;flex-wrap:wrap;margin-top:1rem}.modal-shell{display:flex;flex-direction:column;gap:1rem}.modal-shell h2{padding-right:2rem}.modal-chat-log{max-height:360px;overflow:auto;border:1px solid var(--line);border-radius:18px;background:#0c1525;padding:.8rem;display:flex;flex-direction:column;gap:.65rem}.chatmsg{padding:.75rem;border-radius:16px;background:#172640}.chatmsg.assistant{border-left:4px solid var(--accent2)}.chatmsg.user{border-left:4px solid var(--accent)}.chat-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.7rem;align-items:end}.empty{padding:2rem;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:18px;background:rgba(12,21,37,.42)}
.search-mode-picker{display:flex;gap:1rem;flex-wrap:wrap;padding:.5rem 0;border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08)}
.summary-body{line-height:1.7;background:rgba(12,21,37,.6);border:1px solid var(--line);border-radius:18px;padding:1rem}.summary-body a{color:#9dc2ff;font-weight:700;text-decoration:none}.summary-body a:hover{text-decoration:underline}
.overview-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.word-cloud-shell{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;justify-content:center;min-height:220px;padding:1rem;border:1px solid var(--line);border-radius:20px;background:rgba(12,21,37,.66)}.word-cloud-term{background:transparent;border:0;box-shadow:none;color:#d7ecff;padding:.15rem .2rem;line-height:1;cursor:pointer}.word-cloud-term:hover{text-decoration:underline;color:#8debd0}.network-stage{border:1px solid var(--line);border-radius:22px;padding:.65rem;background:rgba(12,21,37,.5)}#conceptNetworkSvg{width:100%;height:auto;display:block}.network-node{cursor:pointer}.network-node circle{fill:rgba(118,167,255,.25);stroke:rgba(157,194,255,.92);stroke-width:2}.network-node text{fill:#eff7ff;font-size:13px;font-weight:700;text-anchor:middle;pointer-events:none}.network-node:hover circle{fill:rgba(141,235,208,.28);stroke:#8debd0}.network-node:focus circle{outline:none;fill:rgba(141,235,208,.28);stroke:#8debd0}

.reflection-modal-shell .suggestion,.reflection-modal-preview{background:#000;border-color:rgba(34,197,94,.45);color:var(--green);font-variant:small-caps;letter-spacing:.04em}
.reflection-modal-shell .suggestion strong,.reflection-modal-shell .suggestion p,.reflection-modal-shell .question{color:var(--green);font-variant:small-caps}
.reflection-modal-shell h2{color:#d4ffd9}
.thread-modal-list{display:flex;flex-direction:column;gap:.55rem}.selected-topic-row{border-color:var(--accent2);background:rgba(141,235,208,.13)}.thread-row{padding:.7rem .85rem;border-radius:14px;background:rgba(12,21,37,.55);border:1px solid var(--line);display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.admin-columns{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:1rem}.linked-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:0 0 .8rem}.leftpanel-bg{background-image:linear-gradient(180deg,rgba(17,27,46,.93),rgba(17,27,46,.86)),url('/static/assets/LeftPanel.png');background-size:cover;background-position:center}
.workspace-main-bg{position:relative}.workspace-main-bg::before{content:"";position:absolute;inset:0;background:url('/static/assets/WorkSpace.png') center/cover no-repeat;opacity:.22;border-radius:24px;pointer-events:none;z-index:0}.workspace-main-bg > *{position:relative;z-index:1}
.inline input[type="checkbox"], .inline input[type="radio"]{width:auto}
@media(max-width:1120px){.two,.three,.app-grid,.workspace-compact,.composer-grid,.admin-columns,.overview-choice-grid{grid-template-columns:1fr}.sticky{position:static}.hero{position:static;align-items:flex-start;flex-direction:column}.comment-form,.chat-input-row,.note-head{grid-template-columns:1fr;flex-direction:column}.workspace-compact{display:block}.workspace-compact>.card,.workspace-compact>.mainstack{margin-bottom:1rem}.mainstack{padding-top:0}}


.sortlabel{display:flex;align-items:center;gap:.45rem;font-size:.88rem;color:#dbe7ff}.smallselect{background:#f8fafc;border:1px solid rgba(15,23,42,.18);border-radius:999px;padding:.35rem .7rem;font-size:.84rem}
.note.just-updated{box-shadow:0 0 0 3px rgba(141,235,208,.55),0 18px 38px rgba(0,0,0,.18);transform:translateY(-1px)}
.note-tools{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;margin-top:.8rem}.collapsed-comments{display:none}.smallhint{font-size:.8rem;margin:.2rem 0 0}.topic-form{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}.topic-form select{min-width:10rem}
.kbp-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:.75rem 0 1rem}.overview-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.word-cloud-shell{display:flex;flex-wrap:wrap;gap:.55rem;line-height:1.8}.word-cloud-term{background:#eff6ff;border:1px solid rgba(32,58,114,.14);border-radius:999px;padding:.25rem .65rem;color:#203a72}.word-cloud-term:hover{transform:translateY(-1px)}
.network-stage{margin:.85rem 0}.network-node{cursor:pointer}.network-node circle{fill:rgba(141,235,208,.18);stroke:#8debd0;stroke-width:2}.network-node text{fill:#eff6ff;font-size:14px;text-anchor:middle;font-weight:700}.note-network-node circle{fill:rgba(157,194,255,.18);stroke:#9dc2ff}
.note-head .row{justify-content:flex-end}.linked-header{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:.85rem}
@media(max-width:900px){.kbp-action-grid,.overview-choice-grid{grid-template-columns:1fr}.note-tools{flex-direction:column;align-items:stretch}.topic-form{flex-direction:column;align-items:stretch}}
.compact-list{margin:.4rem 0 0 1rem;padding:0;display:flex;flex-direction:column;gap:.35rem}
.admin-tools-row{margin-bottom:.5rem}
#topicSupportPanel{margin-top:1rem;background:rgba(12,21,37,.55)}
#topicSupportPanel h3{margin-bottom:.5rem}
#auditLogList .tag-row,#usageDashboard .tag-row,#backupVersions .tag-row{align-items:flex-start}


/* Workspace ribbon layout patch */
.workspace-toplayout{display:block}.workspace-ribbon{position:sticky;top:82px;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;padding:.7rem 1rem;margin-bottom:1rem}.compact-identity{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;min-width:min(100%,360px)}.compact-identity .course-pill{margin:0}.compact-identity .muted{margin:0}.ribbon-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;flex:1;justify-content:flex-end}.read-window-shell{padding-top:0}.read-window-card{min-height:calc(100vh - 190px)}#workspaceHiddenHost{display:none !important}body.workspace-mode .hero{position:sticky;top:0;z-index:14;padding:.7rem 1rem;gap:1rem;background:rgba(6,11,23,.95);backdrop-filter:blur(14px)}body.workspace-mode .hero .eyebrow{font-size:.78rem;margin-bottom:.15rem}body.workspace-mode .hero h1{font-size:clamp(1.05rem,1.9vw,1.55rem);margin:.1rem 0 .15rem;line-height:1.15}body.workspace-mode .hero p{font-size:.88rem;max-width:72ch;margin:0}body.workspace-mode main{padding-top:.6rem}#composerCard.hidden{display:none !important}.workspace-mode .modal-card #composerCard{display:block !important}.workspace-mode .modal-card #composerCard .row.spread{align-items:flex-start}.workspace-mode .modal-card #composerCard h2{margin-bottom:.2rem}.workspace-mode .modal-card #composerCard{box-shadow:none;background:transparent;border:0;padding:0}.workspace-mode .modal-card.note-composer-modal{width:min(980px,96vw)}
@media(max-width:980px){.workspace-ribbon{top:70px}.compact-identity,.ribbon-actions{width:100%;justify-content:flex-start}.read-window-card{min-height:calc(100vh - 230px)}}


/* Workspace ribbon horizontal patch */
.workspace-ribbon{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:nowrap}
.workspace-ribbon .compact-identity{flex:0 0 auto;max-width:230px}
.workspace-ribbon .ribbon-actions{display:flex !important;flex-direction:row;flex-wrap:wrap;gap:.45rem;align-items:stretch;justify-content:flex-start;flex:1 1 auto}
.workspace-ribbon .ribbon-actions .railbtn{width:96px;min-width:96px;max-width:96px;min-height:48px;padding:.45rem .35rem;white-space:normal;line-height:1.1;text-align:center;display:flex;align-items:center;justify-content:center;font-size:.8rem}
.workspace-ribbon .ribbon-actions .progress-inline{width:96px;min-width:96px;max-width:96px}
@media (max-width: 1180px){
  .workspace-ribbon{flex-wrap:wrap}
  .workspace-ribbon .compact-identity{max-width:none;width:100%}
}
@media (max-width: 760px){
  .workspace-ribbon .ribbon-actions .railbtn{width:88px;min-width:88px;max-width:88px;font-size:.76rem;min-height:46px}
  .workspace-ribbon .ribbon-actions .progress-inline{width:88px;min-width:88px;max-width:88px}
}
.consent-pdf-frame{width:100%;min-height:55vh;border:1px solid rgba(255,255,255,.16);border-radius:16px;background:#fff}


/* 3D elastic overview network patch */
.network-stage{overflow:hidden}
.network-3d-stage{position:relative;width:100%;height:min(58vh,520px);min-height:380px;border-radius:20px;background:radial-gradient(circle at 30% 22%,rgba(118,167,255,.22),transparent 32%),radial-gradient(circle at 74% 70%,rgba(141,235,208,.16),transparent 36%),rgba(12,21,37,.78);overflow:hidden;perspective:900px;touch-action:none;cursor:grab;isolation:isolate}
.network-3d-stage:active{cursor:grabbing}
.network-3d-stage::before{content:"";position:absolute;inset:0;background:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:42px 42px;transform:translateZ(-120px) scale(1.18);opacity:.38;pointer-events:none}
.network-3d-edges,.network-3d-nodes{position:absolute;inset:0;width:100%;height:100%}.network-3d-edges{z-index:1;overflow:visible}.network-3d-edge{stroke:rgba(141,235,208,.52);stroke-linecap:round;filter:drop-shadow(0 0 7px rgba(141,235,208,.18))}.note-network-edge{stroke:rgba(157,194,255,.54)}
.network-3d-nodes{z-index:2;transform-style:preserve-3d}.network-3d-node{position:absolute;left:0;top:0;min-width:64px;max-width:150px;min-height:42px;padding:.48rem .7rem;border-radius:999px;background:linear-gradient(180deg,rgba(21,47,70,.96),rgba(16,31,54,.94));color:#eff7ff;border:1px solid rgba(141,235,208,.78);box-shadow:0 12px 30px rgba(0,0,0,.28),0 0 20px rgba(141,235,208,.16);font-size:.82rem;line-height:1.12;text-align:center;white-space:normal;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;will-change:transform,opacity;cursor:pointer;user-select:none}.network-3d-node:hover,.network-3d-node:focus{filter:brightness(1.12);box-shadow:0 18px 38px rgba(0,0,0,.36),0 0 26px rgba(141,235,208,.34);outline:none}.network-3d-node.note-network-node{background:linear-gradient(180deg,rgba(39,56,93,.96),rgba(20,33,62,.94));border-color:rgba(157,194,255,.84);box-shadow:0 12px 30px rgba(0,0,0,.28),0 0 20px rgba(157,194,255,.18)}.network-3d-node.note-network-node:hover,.network-3d-node.note-network-node:focus{box-shadow:0 18px 38px rgba(0,0,0,.36),0 0 26px rgba(157,194,255,.34)}
.network-3d-hint{position:absolute;left:50%;bottom:.7rem;transform:translateX(-50%);z-index:3;padding:.28rem .65rem;border-radius:999px;background:rgba(6,11,23,.62);border:1px solid rgba(255,255,255,.12);color:var(--muted);font-size:.78rem;white-space:nowrap;pointer-events:none}.network-3d-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--muted);z-index:2}.overview-network-note .network-3d-stage{height:420px;min-height:340px}
@media(max-width:760px){.network-3d-stage{min-height:320px}.network-3d-node{min-width:54px;max-width:124px;font-size:.74rem;padding:.42rem .55rem}.network-3d-hint{font-size:.72rem;max-width:90%;text-align:center}}

/* 3D overview refinements: draggable nodes and 3D word cloud */
.network-3d-stage.is-dragging,.network-3d-stage.is-dragging .network-3d-node{cursor:grabbing}
.wordcloud-3d-stage{background:radial-gradient(circle at 28% 24%,rgba(141,235,208,.24),transparent 34%),radial-gradient(circle at 78% 68%,rgba(157,194,255,.18),transparent 38%),rgba(12,21,37,.8)}
.wordcloud-3d-edge{stroke:rgba(255,226,159,.36);stroke-dasharray:4 8;filter:drop-shadow(0 0 7px rgba(255,226,159,.14))}
.network-3d-node.wordcloud-3d-node{min-width:70px;max-width:180px;min-height:38px;background:radial-gradient(circle at 50% 20%,var(--word-glow,rgba(255,226,159,.22)),transparent 58%),linear-gradient(180deg,rgba(45,58,78,.96),rgba(20,34,55,.94));color:var(--word-color,#ffe29f);border-color:var(--word-border,rgba(255,226,159,.78));box-shadow:0 12px 30px rgba(0,0,0,.28),0 0 22px var(--word-glow,rgba(255,226,159,.16));text-shadow:0 0 12px var(--word-glow-strong,rgba(255,226,159,.34));font-weight:800;letter-spacing:.01em}
.network-3d-node.wordcloud-3d-node:hover,.network-3d-node.wordcloud-3d-node:focus{box-shadow:0 18px 38px rgba(0,0,0,.36),0 0 30px var(--word-glow-strong,rgba(255,226,159,.42));filter:brightness(1.18)}
.overview-wordcloud-note .network-3d-stage{height:420px;min-height:340px}


.inquiry-modal .summary-body,
.inquiry-result-body {
  max-height: min(58vh, 620px);
  overflow: auto;
}
.inquiry-choice-grid button {
  min-height: 58px;
  text-align: left;
}
.summary-link {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* Splash simplification and Inquiry Tools table output */
.landing-empty{min-height:0;padding:0;margin:0}
.inquiry-table-wrap{overflow:auto;margin:.75rem 0 1rem;border:1px solid rgba(255,255,255,.14);border-radius:16px;background:rgba(248,250,252,.98)}
.inquiry-evidence-table{width:100%;border-collapse:collapse;color:#0f172a;font-size:.92rem;line-height:1.45}
.inquiry-evidence-table th,.inquiry-evidence-table td{border-bottom:1px solid #dbe4f0;border-right:1px solid #e2e8f0;padding:.7rem .75rem;vertical-align:top;text-align:left}
.inquiry-evidence-table th:last-child,.inquiry-evidence-table td:last-child{border-right:0}
.inquiry-evidence-table tbody tr:last-child td{border-bottom:0}
.inquiry-evidence-table th{background:#eaf2ff;color:#203a72;font-weight:800}
.inquiry-evidence-table a.summary-link{color:#1d4ed8}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.mini-table th,
.mini-table td {
  border-bottom: 1px solid rgba(20, 32, 56, 0.12);
  padding: 0.45rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.mini-table th {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.5);
}
.mini-table .warn-row td {
  background: rgba(255, 196, 0, 0.12);
}
.account-select {
  align-self: flex-start;
  min-width: 5.5rem;
}
#temporaryCredentialsText {
  width: min(100%, 720px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

/* Admin horizontal ribbon patch */
.admin-layout{display:block}
.admin-ribbon{position:sticky;top:82px;z-index:12;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:nowrap;padding:.7rem 1rem;margin-bottom:1rem}
.admin-ribbon .admin-identity-block{flex:0 0 auto;max-width:260px;min-width:220px}
.admin-ribbon .admin-identity-block .muted{margin:0 0 .35rem}
.admin-ribbon .admin-ribbon-actions{display:flex !important;flex-direction:row;flex-wrap:wrap;gap:.45rem;align-items:stretch;justify-content:flex-start;flex:1 1 auto}
.admin-ribbon .admin-ribbon-actions .railbtn{width:96px;min-width:96px;max-width:96px;min-height:48px;padding:.45rem .35rem;white-space:normal;line-height:1.1;text-align:center;display:flex;align-items:center;justify-content:center;font-size:.8rem}
.admin-ribbon .admin-ribbon-actions .railbtn.active{border-color:var(--accent);background:rgba(118,167,255,.22);box-shadow:0 0 0 1px rgba(118,167,255,.22) inset}
.admin-mainpanel{min-height:calc(100vh - 190px)}
.admin-selected-header{align-items:flex-start}
.admin-section{display:none}
.admin-section.active{display:block}
.admin-section .panel{margin-bottom:1rem}
body:not(.workspace-mode) .admin-ribbon{top:82px}
@media (max-width:1180px){.admin-ribbon{flex-wrap:wrap}.admin-ribbon .admin-identity-block{max-width:none;width:100%}}
@media (max-width:760px){.admin-ribbon .admin-ribbon-actions .railbtn{width:88px;min-width:88px;max-width:88px;font-size:.76rem;min-height:46px}.admin-selected-header{flex-direction:column}}
body.admin-mode .hero{position:sticky;top:0;z-index:14;padding:.7rem 1rem;gap:1rem;background:rgba(6,11,23,.95);backdrop-filter:blur(14px)}
body.admin-mode .hero .eyebrow{font-size:.78rem;margin-bottom:.15rem}
body.admin-mode .hero h1{font-size:clamp(1.05rem,1.9vw,1.55rem);margin:.1rem 0 .15rem;line-height:1.15}
body.admin-mode .hero p{font-size:.88rem;max-width:72ch;margin:0}
body.admin-mode main{padding-top:.6rem}

/* Green window title patch */
.modal-shell > h2,
.modal-card h2,
.card > h2,
.card > .row h2,
.card > .row.spread h2,
#streamTitle,
#composerCard h2,
#adminView h2,
#workspaceView h2{
  color:#d4ffd9;
}

/* Phase 3 rich notes and document workflow patch */
.note{position:relative}
.note-close-btn{position:absolute;top:.65rem;right:.65rem;width:2rem;height:2rem;border-radius:999px;padding:0;display:grid;place-items:center;background:#e2e8f0;color:#0f172a;border:1px solid #cbd5e1;box-shadow:none;font-size:1.25rem;font-weight:800;line-height:1;z-index:2}
.note-close-btn:hover{background:#fecaca;color:#7f1d1d}
.note-head{padding-right:2.25rem}.select-note-label{color:#0f172a;font-size:.84rem;font-weight:700;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:999px;padding:.35rem .55rem}.select-note-label input{accent-color:#0f766e}
.inline-attachment{margin:.75rem 0 0}.inline-attachment figcaption{font-size:.78rem;color:#64748b;margin-top:.25rem}.pdf-preview-wrap{margin-top:.7rem;border:1px solid #dbe4f0;border-radius:16px;overflow:hidden;background:#f8fafc}.pdf-preview{display:block;width:100%;height:420px;border:0;background:#fff}.draft-file-preview{margin-top:.55rem;max-height:300px}.upload-preview{border:1px solid var(--line);border-radius:18px;background:rgba(12,21,37,.62);padding:.85rem}.ocr-panel{margin-top:.75rem;border:1px solid #cbd5e1;border-radius:14px;background:#f8fafc;color:#0f172a;overflow:hidden}.ocr-panel summary{cursor:pointer;font-weight:800;padding:.65rem .8rem;color:#0f766e}.ocr-text{padding:.75rem .9rem;border-top:1px solid #e2e8f0;white-space:normal;line-height:1.5;max-height:300px;overflow:auto}.editor-toolbar{display:flex;gap:.45rem;flex-wrap:wrap;padding:.55rem;border:1px solid var(--line);border-radius:16px;background:rgba(12,21,37,.72)}.note-body h3,.note-body h4{color:#0f172a;margin:.7rem 0 .35rem}.note-body p{margin:.35rem 0}.note-body ul,.note-body ol{margin:.45rem 0 .65rem 1.35rem}.note-body blockquote{margin:.65rem 0;padding:.6rem .85rem;border-left:4px solid #0f766e;background:#ecfdf5;border-radius:10px;color:#0f172a}.note-body code{background:#e2e8f0;border-radius:6px;padding:.08rem .28rem}.summary-body p{margin:.4rem 0}.summary-body ul,.summary-body ol{margin:.5rem 0 .7rem 1.35rem}.summary-body blockquote{border-left:4px solid var(--green);padding:.6rem .8rem;background:rgba(141,235,208,.08);border-radius:10px}
button:disabled{opacity:.55;cursor:not-allowed}
.prompt-preview {
  max-height: 42vh;
  overflow: auto;
  white-space: pre-wrap;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text, #f4f8f0);
}
#standingPromptAdminText {
  min-height: 28rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.35;
}

/* Phase 3 refinement: compose directly on a final-note surface rather than a separate preview pane. */
.note-body-source.hidden{display:none !important}
.final-note-editor{min-height:260px;border:1px solid #dbe4f0;border-radius:20px;background:#f8fafc;color:#000;padding:1rem 1.1rem;line-height:1.55;box-shadow:0 12px 28px rgba(15,23,42,.12);outline:none;overflow:auto}
.final-note-editor:focus{border-color:#0f766e;box-shadow:0 0 0 4px rgba(15,118,110,.18),0 12px 28px rgba(15,23,42,.12)}
.final-note-editor.empty-editor::before{content:attr(data-placeholder);color:#64748b;pointer-events:none}
.final-note-editor h3,.final-note-editor h4{color:#0f172a;margin:.7rem 0 .35rem}.final-note-editor p{margin:.35rem 0}.final-note-editor ul,.final-note-editor ol{margin:.45rem 0 .65rem 1.35rem}.final-note-editor blockquote{margin:.65rem 0;padding:.6rem .85rem;border-left:4px solid #0f766e;background:#ecfdf5;border-radius:10px;color:#0f172a}.final-note-editor a{color:#0369a1;text-decoration:underline;font-weight:800}.final-note-editor .body-copy{color:#000}


.editor-color-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  cursor: pointer;
  margin: 0;
}
.editor-hidden-color-input {
  position: fixed;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.note-text-color { font-weight: inherit; }
.dangerbtn { border-color: rgba(150, 40, 40, 0.35); }
.dangerbtn:hover { border-color: rgba(150, 40, 40, 0.65); }



/* Small in-app external link popup so links never take over the whole workspace. */
.external-link-popup{
  position:fixed;
  right:24px;
  bottom:24px;
  width:min(680px, calc(100vw - 48px));
  height:min(560px, calc(100vh - 48px));
  background:#f8fafc;
  border:1px solid rgba(15,118,110,.32);
  border-radius:22px;
  box-shadow:0 28px 80px rgba(15,23,42,.35);
  z-index:9999;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.external-link-popup.hidden{display:none!important}
.external-link-popup-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.75rem .9rem;
  background:#ecfdf5;
  color:#166534;
  border-bottom:1px solid rgba(15,118,110,.18);
}
.external-link-popup iframe{flex:1;border:0;background:white;width:100%}
.external-link-fallback{margin:.35rem .9rem .65rem}

/* External scholarly source cards for Inquiry Tools */
.external-source-grid button{min-height:58px;text-align:left}
.external-source-results{display:flex;flex-direction:column;gap:.85rem;max-height:min(58vh,620px);overflow:auto;padding-right:.25rem}
.external-source-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.8rem;background:rgba(248,250,252,.98);color:#0f172a;border:1px solid #dbe4f0;border-radius:18px;padding:.9rem;box-shadow:0 12px 26px rgba(0,0,0,.16)}
.external-source-card h3{margin:.25rem 0 .35rem;color:#0f172a;font-size:1rem;line-height:1.25}
.external-source-card p{margin:.35rem 0}.external-source-card .meta{color:#64748b}.external-source-card a{color:#1d4ed8;font-weight:800}.source-badge{display:inline-flex;width:max-content;padding:.25rem .55rem;border-radius:999px;background:#e0f2fe;color:#075985;font-size:.74rem;font-weight:800;letter-spacing:.03em;text-transform:uppercase}.source-doi{display:inline-block;margin:.25rem 0;color:#334155;font-size:.82rem}.external-source-select{align-self:start;background:#eef6ff;color:#0f172a;border-radius:999px;padding:.28rem .55rem;border:1px solid #bfdbfe}.external-source-errors{background:rgba(255,247,237,.92);color:#7c2d12;border:1px solid #fed7aa;border-radius:14px;padding:.65rem .8rem}

/* Community Tools build */
.community-help-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.28rem;min-width:0;white-space:nowrap;transition:color .2s ease,text-shadow .2s ease,border-color .2s ease,background .2s ease;
}
.community-help-label,.community-help-count{display:inline;color:inherit;font-weight:800}
.community-help-count{margin-left:.15rem}
.community-help-btn.community-help-glow{
  background:rgba(255,255,255,.06) !important;color:#fecaca !important;border-color:rgba(248,113,113,.28) !important;box-shadow:none !important;
}
.community-help-btn.community-help-glow .community-help-label,.community-help-btn.community-help-glow .community-help-count{
  color:#f87171 !important;text-shadow:0 0 7px rgba(248,113,113,.24);animation:responseRequestTextGlow 4.2s ease-in-out infinite;
}
@keyframes responseRequestTextGlow{0%,100%{text-shadow:0 0 5px rgba(248,113,113,.18)}50%{text-shadow:0 0 10px rgba(248,113,113,.36)}}
.community-tools-modal{
  width:min(860px,94vw);
  max-width:94vw;
  overflow-x:hidden;
}
.community-tools-modal *,
.community-tools-modal *::before,
.community-tools-modal *::after{max-width:100%;box-sizing:border-box}
.community-tools-modal h2,
.community-tools-modal h3,
.community-tools-modal p,
.community-tools-modal strong,
.community-tools-modal label,
.community-tools-modal textarea,
.community-tools-modal input,
.community-tools-modal select{overflow-wrap:anywhere;word-break:normal}
.community-tools-modal .row{min-width:0;align-items:flex-start}
.community-tools-modal .row > div{min-width:0;flex:1 1 260px}
.community-tools-modal button{white-space:normal}
.community-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.65rem}
.community-choice-grid button{min-height:66px;line-height:1.15}
.community-list{display:grid;gap:.75rem;margin:.65rem 0 1rem;overflow-x:hidden;min-width:0}
.community-card{border:1px solid rgba(148,163,184,.22);background:rgba(15,23,42,.58);border-radius:18px;padding:.85rem;box-shadow:0 10px 28px rgba(0,0,0,.18);min-width:0;overflow:hidden;overflow-wrap:anywhere}
.community-card strong{color:var(--title-green,#90ee90);display:inline-block;max-width:100%}
.community-card form{margin-top:.6rem;display:grid;gap:.5rem;min-width:0}
.community-card textarea,.community-card input,.community-card select{width:100%;min-width:0}
.community-poll-options{display:grid;gap:.35rem;margin:.65rem 0;min-width:0}
.community-poll-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.5rem;border:1px solid rgba(148,163,184,.16);border-radius:12px;padding:.45rem .55rem;background:rgba(2,6,23,.35);min-width:0;overflow-wrap:anywhere}
.community-activity-row{display:grid;gap:.4rem;min-width:0}
.community-activity-row>.pill{width:max-content;max-width:100%}
.community-tools-modal .small-note{font-size:.9rem;line-height:1.4}
@media(max-width:640px){
  .community-tools-modal{width:92vw;max-width:92vw}
  .community-poll-option{grid-template-columns:auto minmax(0,1fr)}
  .community-poll-option .muted{grid-column:2 / -1}
}

/* Text-colour palette uses normal secondary-button styling; the main button stays plain text. */
.editor-color-control{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;cursor:pointer;margin:0}
.editor-color-palette{display:inline-flex;gap:.35rem;flex-wrap:wrap;align-items:center;background:rgba(12,21,37,.92);border:1px solid var(--line);border-radius:16px;padding:.35rem .45rem}
.editor-color-palette.hidden{display:none!important}
.final-note-editor .note-text-color,.note-body .note-text-color{color:inherit}
.final-note-editor span.note-text-color[style],.note-body span.note-text-color[style]{font-weight:inherit}


/* Popup Open Note and New Note close fixes */
.composer-title-row{position:relative;padding-right:2.6rem}.note-composer-close,.note-popup-close{width:2rem;height:2rem;border-radius:999px;padding:0;display:grid;place-items:center;background:#e2e8f0;color:#0f172a;border:1px solid #cbd5e1;box-shadow:none;font-size:1.25rem;font-weight:800;line-height:1}.note-composer-close{position:absolute;top:0;right:0}.note-composer-close:hover,.note-popup-close:hover{background:#fecaca;color:#7f1d1d}.inline-note-popup{position:fixed;right:24px;top:96px;width:min(660px,calc(100vw - 48px));max-height:calc(100vh - 128px);z-index:10020;display:flex;flex-direction:column}.inline-note-popup.hidden{display:none!important}.inline-note-popup-card{background:#f8fafc;color:#0f172a;border:1px solid rgba(15,118,110,.32);border-radius:22px;box-shadow:0 28px 80px rgba(15,23,42,.38);overflow:hidden;display:flex;flex-direction:column;max-height:inherit}.inline-note-popup-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;padding:.85rem 1rem;background:#ecfdf5;border-bottom:1px solid rgba(15,118,110,.18)}.inline-note-popup-head strong{color:#0f766e;font-size:1.05rem}.inline-note-popup-body{padding:1rem;overflow:auto}.inline-note-popup-body .note{box-shadow:none;border-color:#dbe4f0;margin:0}.inline-note-popup-actions{display:flex;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;padding:.75rem 1rem;border-top:1px solid #dbe4f0;background:#f1f5f9}


/* Contextual button hover help */
.button-help-tooltip{
  position:fixed;
  z-index:10000;
  max-width:min(360px,calc(100vw - 2rem));
  padding:.7rem .85rem;
  border-radius:14px;
  border:1px solid rgba(141,235,208,.45);
  background:rgba(9,17,31,.96);
  color:#e9f0fb;
  box-shadow:0 16px 38px rgba(0,0,0,.32);
  font-size:.88rem;
  line-height:1.35;
  pointer-events:none;
}
.button-help-tooltip.hidden{display:none!important}
.button-help-tooltip::before{
  content:"";
  position:absolute;
  top:-5px;
  left:calc(50% - 5px);
  width:10px;
  height:10px;
  transform:rotate(45deg);
  background:rgba(9,17,31,.96);
  border-left:1px solid rgba(141,235,208,.45);
  border-top:1px solid rgba(141,235,208,.45);
}


/* Workspace settings and dropdown text-colour menu */
.editor-toolbar{position:relative;overflow:visible}.editor-color-palette{position:absolute;right:.55rem;top:calc(100% + .35rem);z-index:1200;display:flex;gap:.35rem;flex-wrap:wrap;align-items:center;background:rgba(12,21,37,.98);border:1px solid var(--line);border-radius:16px;padding:.45rem;box-shadow:0 16px 40px rgba(0,0,0,.34);max-width:min(360px,calc(100vw - 3rem))}.editor-color-palette.hidden{display:none!important}.settings-modal{width:min(820px,94vw)}.settings-form{gap:.75rem}.settings-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,210px);gap:1rem;align-items:center;border:1px solid rgba(148,163,184,.18);border-radius:16px;background:rgba(12,21,37,.48);padding:.85rem}.settings-row strong{color:var(--green)}.settings-control select{width:100%}.settings-row.coming-soon{opacity:.72}.preferred-action{box-shadow:0 0 0 2px rgba(141,235,208,.32) inset}.quiet-mode *{scroll-behavior:auto!important}.quiet-mode .community-help-label,.quiet-mode .community-help-count{animation:none!important;text-shadow:none!important}.button-help-disabled .button-help-tooltip{display:none!important}
@media(max-width:650px){.settings-row{grid-template-columns:1fr}.editor-color-palette{left:.55rem;right:auto}}



/* Refined text-colour dropdown: swatches only, no text-row expansion. */
.editor-color-palette .colour-swatch{
  width:1.8rem;height:1.8rem;min-width:1.8rem;border-radius:999px;border:2px solid rgba(255,255,255,.86);box-shadow:0 0 0 1px rgba(15,23,42,.35),0 6px 14px rgba(0,0,0,.28);padding:0;cursor:pointer
}
.editor-color-palette .colour-swatch:hover,.editor-color-palette .colour-swatch:focus{outline:none;transform:translateY(-1px);box-shadow:0 0 0 2px rgba(141,235,208,.68),0 9px 18px rgba(0,0,0,.34)}
.colour-swatch-black{background:#000}.colour-swatch-red{background:#b91c1c}.colour-swatch-blue{background:#1d4ed8}.colour-swatch-green{background:#047857}.colour-swatch-purple{background:#7e22ce}.colour-swatch-orange{background:#c2410c}
.network-3d-node{background:var(--node-bg,linear-gradient(180deg,rgba(21,47,70,.96),rgba(16,31,54,.94)));border-color:var(--node-border,rgba(141,235,208,.78));box-shadow:0 12px 30px rgba(0,0,0,.28),0 0 20px var(--node-glow,rgba(141,235,208,.16))}
.network-3d-node:hover,.network-3d-node:focus{box-shadow:0 18px 38px rgba(0,0,0,.36),0 0 28px var(--node-glow-strong,rgba(141,235,208,.34))}
.network-3d-node.note-network-node{background:var(--node-bg,linear-gradient(180deg,rgba(39,56,93,.96),rgba(20,33,62,.94)));border-color:var(--node-border,rgba(157,194,255,.84));box-shadow:0 12px 30px rgba(0,0,0,.28),0 0 20px var(--node-glow,rgba(157,194,255,.18))}
.network-3d-node.note-network-node:hover,.network-3d-node.note-network-node:focus{box-shadow:0 18px 38px rgba(0,0,0,.36),0 0 28px var(--node-glow-strong,rgba(157,194,255,.34))}

/* New Note editor selection and whitespace fixes */
.final-note-editor{white-space:pre-wrap;user-select:text;-webkit-user-select:text}
.final-note-editor .note-text-color{white-space:pre-wrap}

/* Render saved colour tokens as visible styled text, including inside AI/summary notes. */
.note-body span.note-text-color[style], .final-note-editor span.note-text-color[style], .summary-body span.note-text-color[style]{font-weight:inherit}


/* Analogical Overview */
.analogical-modal .network-3d-stage{height:min(60vh,540px);min-height:400px}
.analogical-overview-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.8fr);gap:1rem;align-items:stretch}
.analogical-side-panel{border:1px solid var(--line);border-radius:20px;padding:1rem;background:rgba(12,21,37,.58);max-height:min(60vh,540px);overflow:auto}
.analogical-side-panel h3{margin:.15rem 0 .45rem;font-size:.98rem}
.analogical-side-panel p{margin:.35rem 0 .75rem}.analogical-side-panel ul{margin:.4rem 0 0;padding-left:1.1rem}.analogical-side-panel li{margin:.35rem 0}
.stance-legend{display:flex;flex-wrap:wrap;gap:.45rem;margin:.65rem 0 .85rem}.stance-chip{display:inline-flex;align-items:center;gap:.25rem;border-radius:999px;border:1px solid rgba(255,255,255,.18);padding:.25rem .55rem;font-size:.78rem;background:rgba(255,255,255,.06)}button.stance-chip{font-family:inherit;cursor:pointer}button.stance-chip:hover,button.stance-chip:focus{outline:none;transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.22)}button.stance-chip[aria-disabled="true"]{opacity:.72}.stance-chip strong{font-weight:900}.stance-support{color:#8debd0;border-color:rgba(141,235,208,.5)}.stance-tension{color:#ffe29f;border-color:rgba(255,194,102,.55)}.stance-extend{color:#9dc2ff;border-color:rgba(157,194,255,.55)}.stance-question{color:#ddb7ff;border-color:rgba(221,183,255,.55)}
.network-3d-stage.analogical-3d-stage{background:radial-gradient(circle at 25% 24%,rgba(141,235,208,.2),transparent 32%),radial-gradient(circle at 78% 68%,rgba(255,194,102,.16),transparent 36%),rgba(12,21,37,.8)}
.network-3d-node.analogical-network-node{background:var(--node-bg,linear-gradient(180deg,rgba(24,70,58,.96),rgba(13,38,42,.94)));border-color:var(--node-border,rgba(141,235,208,.82));box-shadow:0 12px 30px rgba(0,0,0,.3),0 0 22px var(--node-glow,rgba(141,235,208,.18));font-weight:800}
.network-3d-node.analogical-network-node:hover,.network-3d-node.analogical-network-node:focus{box-shadow:0 18px 38px rgba(0,0,0,.38),0 0 30px var(--node-glow-strong,rgba(141,235,208,.42))}.analogical-network-edge{stroke:rgba(255,226,159,.48)}
.overview-analogical-note .analogical-side-panel{max-height:none;margin-bottom:.75rem}.overview-analogical-note .network-3d-stage{height:420px;min-height:340px}
@media(max-width:900px){.analogical-overview-layout{grid-template-columns:1fr}.analogical-side-panel{max-height:none}.analogical-modal .network-3d-stage{min-height:340px}}

/* Overview persistence, analogical progress, and role-coloured linked notes */
button.progressing{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:.08rem;min-height:2.35rem}
button.progressing small{position:relative;z-index:1;font-size:.66rem;line-height:1.05;color:#07101f;opacity:.82;white-space:nowrap}
.overview-tile-note{border-left-color:#8debd0;background:linear-gradient(180deg,rgba(248,250,252,.99),rgba(235,253,248,.97));box-shadow:0 18px 38px rgba(20,184,166,.18)}
.overview-tile-note .note-body{color:var(--black);font-weight:500}.overview-tile-badges,.analogical-note-role-badges{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.4rem}.overview-tile-note .network-3d-stage{height:420px;min-height:330px}
.note.analogical-role-support{background:linear-gradient(180deg,rgba(236,253,245,.98),rgba(209,250,229,.96));border-left-color:#10b981}
.note.analogical-role-tension{background:linear-gradient(180deg,rgba(255,251,235,.99),rgba(254,243,199,.97));border-left-color:#f59e0b}
.note.analogical-role-extend{background:linear-gradient(180deg,rgba(239,246,255,.99),rgba(219,234,254,.97));border-left-color:#3b82f6}
.note.analogical-role-question{background:linear-gradient(180deg,rgba(250,245,255,.99),rgba(243,232,255,.97));border-left-color:#a855f7}
.note.analogical-role-support .note-body,.note.analogical-role-tension .note-body,.note.analogical-role-extend .note-body,.note.analogical-role-question .note-body{color:var(--black);font-weight:500}
.note.analogical-role-support .meta,.note.analogical-role-tension .meta,.note.analogical-role-extend .meta,.note.analogical-role-question .meta{color:#475569}
.note.analogical-role-tension{box-shadow:0 18px 38px rgba(245,158,11,.18)}.note.analogical-role-support{box-shadow:0 18px 38px rgba(16,185,129,.16)}.note.analogical-role-extend{box-shadow:0 18px 38px rgba(59,130,246,.16)}.note.analogical-role-question{box-shadow:0 18px 38px rgba(168,85,247,.16)}

/* Login cleanup: single-card responsive workspace/admin sign-in */
.auth-shell{
  min-height:calc(100vh - 220px);
  display:grid;
  place-items:start center;
  padding:clamp(.5rem,2vw,1.4rem) 0 2rem;
}
.login-card{
  width:min(100%,520px);
  min-height:auto!important;
  display:flex;
  flex-direction:column;
  gap:1rem;
  padding:clamp(1rem,2.4vw,1.45rem);
  backdrop-filter:blur(12px);
}
.workspace-login-card{width:min(100%,560px)}
.admin-login-card{width:min(100%,480px)}
.login-card-header h2{margin-bottom:.35rem}
.login-card-header .eyebrow{margin-bottom:.35rem}
.auth-form{gap:.8rem}
.project-picker-block{
  border:1px solid rgba(255,255,255,.1);
  background:rgba(12,21,37,.48);
  border-radius:18px;
  padding:.85rem;
}
.project-picker-block #courseDescription{margin:.55rem 0 0}
.auth-switch-line{
  margin:.15rem 0 0;
  display:flex;
  align-items:center;
  gap:.35rem;
  flex-wrap:wrap;
  color:var(--muted);
}
.link-button{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:var(--accent2)!important;
  padding:0!important;
  border-radius:0!important;
  text-decoration:underline;
  text-underline-offset:3px;
  font-weight:800;
}
.link-button:hover{filter:none;color:#d4ffd9!important}
.account-create-panel{
  border-top:1px solid rgba(255,255,255,.12);
  padding-top:.95rem;
}
.default-admin-hint{
  border-top:1px solid rgba(255,255,255,.1);
  padding-top:.8rem;
  margin-bottom:0;
}
@media(min-width:1180px){
  .auth-shell{place-items:start center;padding-top:2rem}
  .login-card{box-shadow:0 28px 70px rgba(0,0,0,.34)}
}
@media(max-width:760px){
  main{padding:.75rem}
  .auth-shell{min-height:calc(100vh - 160px);padding-top:.45rem}
  .login-card{width:100%;border-radius:20px;padding:1rem;gap:.85rem}
  .project-picker-block{padding:.75rem;border-radius:16px}
  .auth-switch-line{align-items:flex-start;line-height:1.35}
  .login-card input,.login-card select,.login-card button:not(.link-button){min-height:46px}
  .hero-actions{width:100%;justify-content:flex-start}
  .hero-actions .ghost{flex:1 1 145px}
}

.app-version{display:inline-flex;align-items:center;margin-left:.45rem;padding:.12rem .45rem;border:1px solid rgba(255,255,255,.3);border-radius:999px;font-size:.72em;letter-spacing:.05em;text-transform:none}
.account-create-form{border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:.85rem;margin:.75rem 0;background:rgba(255,255,255,.035)}
.account-create-form h4{margin:.1rem 0 .25rem;font-size:.95rem}

/* Admin-controlled feature rollout: hidden user-facing controls are separate from learner preferences. */
.admin-feature-hidden {
  display: none !important;
}
.feature-toggle-list {
  display: grid;
  gap: 0.65rem;
}
.feature-toggle-row {
  align-items: flex-start;
  cursor: pointer;
}
.feature-toggle-row input {
  margin-top: 0.2rem;
}
.feature-toggle-row span {
  flex: 1;
}

.feature-toggle-group{border:1px solid rgba(255,255,255,.11);border-radius:18px;padding:.75rem;background:rgba(255,255,255,.025)}
.feature-toggle-group h4{margin:.1rem 0 .55rem;display:flex;align-items:center;gap:.5rem;justify-content:space-between}
.feature-toggle-group + .feature-toggle-group{margin-top:.7rem}

.note-title-line{display:inline-flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.note-tag-badge{display:inline-flex;align-items:center;border:1px solid #99f6e4;background:#ccfbf1;color:#134e4a;border-radius:999px;padding:.18rem .48rem;font-size:.72rem;font-weight:900;letter-spacing:.04em;line-height:1.1;box-shadow:none;vertical-align:middle;cursor:pointer}
.note-tag-badge:hover,.note-tag-badge:focus{background:#99f6e4;color:#0f172a;outline:none}
.inline-note-popup-head .note-title-line{align-items:flex-start}

.analogical-rationale-panel{border-color:rgba(141,235,208,.5);background:linear-gradient(135deg,rgba(236,253,245,.96),rgba(239,246,255,.94));}
.analogical-rationale-panel summary{color:#075985;display:flex;align-items:center;gap:.35rem;}
.analogical-rationale-panel summary::before{content:"?";display:inline-grid;place-items:center;width:1.15rem;height:1.15rem;border-radius:999px;background:#0f766e;color:#fff;font-size:.78rem;font-weight:900;}
.analogical-rationale-text{max-height:none;overflow:visible;white-space:normal;}
.analogical-rationale-side-panel{margin:.7rem 0 .85rem;background:rgba(255,255,255,.06);border-color:rgba(141,235,208,.28);color:#e6fffa;}
.analogical-rationale-side-panel summary{color:#8debd0;}
.analogical-rationale-side-panel .analogical-rationale-text{color:#e6fffa;border-top-color:rgba(255,255,255,.12);}
.analogical-rationale-side-panel .analogical-rationale-text h3,.analogical-rationale-side-panel .analogical-rationale-text h4,.analogical-rationale-side-panel .analogical-rationale-text p,.analogical-rationale-side-panel .analogical-rationale-text li{color:#e6fffa;}


/* v2.4.3 zoom controls for visual networks and attachments */
.network-zoom-toolbar{position:absolute;right:.65rem;top:.65rem;z-index:8;display:flex;align-items:center;gap:.35rem;padding:.28rem .35rem;border-radius:999px;background:rgba(6,11,23,.72);border:1px solid rgba(255,255,255,.16);backdrop-filter:blur(10px);box-shadow:0 10px 24px rgba(2,6,23,.22)}
.network-zoom-toolbar .smallbtn,.zoom-toolbar .smallbtn{padding:.28rem .52rem;font-size:.76rem;min-height:0}.network-zoom-value,.zoom-value{font-size:.76rem;font-weight:800;color:#e2e8f0;min-width:3.2rem;text-align:center}.network-3d-stage .network-3d-edges,.network-3d-stage .network-3d-nodes{transition:filter .15s ease}.network-3d-stage[data-network-zoom] .network-3d-hint{bottom:.55rem}
.zoom-media{margin-top:.75rem;border:1px solid #dbe4f0;border-radius:16px;background:#f8fafc;overflow:hidden}.zoom-media-head{display:flex;justify-content:space-between;align-items:center;gap:.65rem;padding:.55rem .65rem;border-bottom:1px solid #e2e8f0;background:#f1f5f9;color:#0f172a;flex-wrap:wrap}.zoom-toolbar{display:flex;align-items:center;gap:.35rem}.zoom-toolbar .zoom-value{color:#334155}.zoom-media-viewport{overflow:auto;max-height:min(72vh,720px);background:#fff}.zoom-media-inner{--media-zoom:1;zoom:var(--media-zoom);transform-origin:top left;min-width:100%;padding:.1px}.zoom-media .inline-attachment{margin:.75rem}.zoom-media .pdf-preview-wrap{margin:0;border:0;border-radius:0}.zoom-media .pdf-preview{height:620px;min-width:100%;background:#fff}.zoom-media .attachment-preview{max-height:none;margin:.7rem auto}.upload-preview .zoom-media{margin-top:0}.upload-preview .pdf-preview{height:420px}.draft-file-preview{max-height:none}
@media(max-width:760px){.network-zoom-toolbar{left:.55rem;right:.55rem;justify-content:center}.zoom-media-head{align-items:flex-start}.zoom-toolbar{width:100%;justify-content:flex-start}}

/* v2.4.8 graph display simplification
   Keep PDF/image attachment zoom, but remove graph zoom UI and make saved/read-window
   graph cards use the same broad aspect ratio as the original generated preview. */
.network-zoom-toolbar{display:none !important}
.overview-network-note .network-stage,
.overview-wordcloud-note .network-stage,
.overview-analogical-note .network-stage,
.overview-tile-note .network-stage{width:100%;aspect-ratio:16/10;min-height:340px;max-height:520px;overflow:hidden;border-radius:20px}
.overview-network-note .network-3d-stage,
.overview-wordcloud-note .network-3d-stage,
.overview-analogical-note .network-3d-stage,
.overview-tile-note .network-3d-stage{height:100%;min-height:100%;max-height:none;width:100%;border-radius:20px}
@media(max-width:760px){.overview-network-note .network-stage,.overview-wordcloud-note .network-stage,.overview-analogical-note .network-stage,.overview-tile-note .network-stage{aspect-ratio:4/3;min-height:300px}}


/* v2.4.9 graph centering hotfix: rectangular read-window graph cards retain
   the broad preview aspect ratio, but the active 3D object is centered by JS.
   Keep attachment PDF/JPG zoom unchanged and graph zoom hidden. */
.overview-network-note .network-stage,
.overview-wordcloud-note .network-stage,
.overview-analogical-note .network-stage,
.overview-tile-note .network-stage{box-sizing:border-box}
.overview-network-note .network-3d-stage,
.overview-wordcloud-note .network-3d-stage,
.overview-analogical-note .network-3d-stage,
.overview-tile-note .network-3d-stage{transform-origin:center center}


/* v2.4.10 graph square-card hotfix
   Keep PDF/JPG zoom controls intact. Only graph/structure notes use square
   preview-style windows so their active centers match the generated preview. */
.overview-network-note .network-stage,
.overview-wordcloud-note .network-stage,
.overview-analogical-note .network-stage,
.overview-tile-note .network-stage{
  width:min(100%, 680px);
  aspect-ratio:1/1 !important;
  min-height:0 !important;
  max-height:none !important;
  height:auto !important;
  margin:.85rem auto;
  overflow:hidden;
  border-radius:20px;
}
.overview-network-note .network-3d-stage,
.overview-wordcloud-note .network-3d-stage,
.overview-analogical-note .network-3d-stage,
.overview-tile-note .network-3d-stage{
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  border-radius:20px;
}
@media(max-width:760px){
  .overview-network-note .network-stage,
  .overview-wordcloud-note .network-stage,
  .overview-analogical-note .network-stage,
  .overview-tile-note .network-stage{width:100%; aspect-ratio:1/1 !important;}
}

/* v2.4.11 PDF/image true zoom hotfix
   Keep graph windows square and graph zoom removed. For attachments, +/- now
   scales the PDF page/image object inside a stable scrollable viewport instead
   of expanding the preview window itself. */
.zoom-media{--media-zoom:1}
.zoom-media-viewport{
  height:min(72vh, 720px) !important;
  min-height:360px;
  max-height:none !important;
  overflow:auto;
  background:#fff;
}
.upload-preview .zoom-media-viewport{
  height:min(54vh, 520px) !important;
  min-height:320px;
}
.zoom-media-inner{
  zoom:1 !important;
  transform:none !important;
  transform-origin:top left;
  width:100%;
  min-width:100%;
  padding:0 !important;
}
.zoom-media[data-zoom-kind="pdf"] .zoom-media-inner{
  width:calc(100% * var(--media-zoom));
  min-width:100%;
}
.zoom-media[data-zoom-kind="pdf"] .pdf-preview-wrap{
  width:100%;
  margin:0;
  border:0;
  border-radius:0;
  overflow:visible;
}
.zoom-media[data-zoom-kind="pdf"] .pdf-preview{
  display:block;
  width:100% !important;
  min-width:0 !important;
  height:calc(620px * var(--media-zoom)) !important;
  border:0;
  background:#fff;
}
.upload-preview .zoom-media[data-zoom-kind="pdf"] .pdf-preview{
  height:calc(420px * var(--media-zoom)) !important;
}
.zoom-media[data-zoom-kind="image"] .inline-attachment{
  width:calc(100% * var(--media-zoom));
  max-width:none;
  margin:.75rem;
}
.zoom-media[data-zoom-kind="image"] .inline-attachment a{
  display:block;
}
.zoom-media[data-zoom-kind="image"] .attachment-preview{
  display:block;
  width:100% !important;
  max-width:none !important;
  max-height:none !important;
  height:auto;
  margin:.7rem auto;
}
.upload-preview .zoom-media[data-zoom-kind="image"] .attachment-preview{
  width:calc(100% * var(--media-zoom)) !important;
  max-width:none !important;
  transform:none !important;
  transform-origin:top left;
}
