/* Tamra site v2 — Scribe module page (modules/codex.html).
   The page editor drawn from src/modules/codex (CodexSidebar, CodexPageEditor, CodexPickers, codexLib, scribeCanvas),
   in the Quiet theme the app ships. Every selector is scoped to the mock-up (.vg-sb) or to this page (.sb-…). */

/* ── the frame: notebooks · the page · comments ─────────────────────────────────────────────────── */
.vg-sb{isolation:isolate}                        /* its layers stay under the tour's spotlight */
.vg-sb .page{display:grid;grid-template-columns:256px minmax(0,1fr) 330px}

/* sidebar (CodexSidebar.jsx) */
.vg-sb .sb-side{display:flex;flex-direction:column;min-height:0;border-right:1px solid #E6ECF2;background:#FBFCFE}
.vg-sb .sb-qn{display:flex;gap:6px;padding:12px 12px 6px}
.vg-sb .sb-qn span{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 4px;border-radius:8px;background:rgba(0,0,0,.04);
  color:#444D5A;font:600 12px/1 "Inter",sans-serif}
.vg-sb .sb-qn .ic{width:14px;height:14px}
.vg-sb .sb-qn em{padding:1px 5px;border-radius:999px;background:rgba(0,0,0,.08);font:700 10px/1.3 "Inter",sans-serif;color:#626976}
.vg-sb .sb-list{flex:1;min-height:0;overflow:hidden;padding-bottom:8px}
.vg-sb .sb-sec{display:flex;align-items:center;justify-content:space-between;padding:14px 18px 6px;font:600 12px/1 "Inter",sans-serif;color:#626976}
.vg-sb .sb-sec .ic{width:12px;height:12px;opacity:.7}
.vg-sb .sb-sp{display:flex;align-items:center;gap:6px;margin:0 6px 2px;padding:7px 10px 7px 12px;border-radius:8px}
.vg-sb .sb-sp .cv{width:10px;height:10px;color:#626976}
.vg-sb .sb-sp.open .cv{transform:rotate(90deg)}
.vg-sb .sb-sp .nb{width:17px;height:17px;flex:none;display:block}
.vg-sb .sb-sp b{flex:1;min-width:0;font:700 13px/1.2 "Inter",sans-serif;color:#0F1A2B;letter-spacing:-.005em}
.vg-sb .sb-sp em{min-width:18px;height:16px;padding:0 6px;border-radius:8px;background:rgba(0,0,0,.06);font:700 10px/16px "Inter",sans-serif;color:#626976;text-align:center}
.vg-sb .sb-pg{display:flex;align-items:center;gap:8px;margin:0 6px 1px;padding:6px 10px 6px 14px;border-radius:8px;font-size:13.5px;line-height:1.3;color:#444D5A;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vg-sb .sb-pg .ic{width:14px;height:14px;color:#8892A4}
.vg-sb .sb-pg.l1{padding-left:38px}
.vg-sb .sb-pg.on{background:color-mix(in srgb,var(--a) 7%,transparent);box-shadow:inset 2px 0 0 var(--a);color:#0F1A2B;font-weight:700}
.vg-sb .sb-pg.on .ic{color:var(--a)}
.vg-sb .sb-foot{display:flex;gap:6px;padding:10px 12px 12px;border-top:1px solid #E6ECF2}
.vg-sb .sb-new{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;height:34px;border-radius:8px;background:#0F1A2B;color:#fff;font:700 12.5px/1 "Inter",sans-serif}
.vg-sb .sb-new .ic{width:13px;height:13px}
.vg-sb .sb-fi{width:34px;height:34px;border-radius:8px;border:1px solid #E6ECF2;display:grid;place-items:center;color:#626976}
.vg-sb .sb-fi .ic{width:14px;height:14px}

/* the page (CodexPageEditor.jsx; Default layout, scribeCanvas.js) */
.vg-sb .sb-ed{position:relative;min-width:0;overflow:hidden;background:#fff}
.vg-sb .sb-bar{display:flex;align-items:center;gap:4px;height:48px;padding:0 14px 0 24px}
.vg-sb .sb-crumbs{flex:1;min-width:0;font-size:13px;color:#626976;white-space:nowrap}
.vg-sb .sb-crumbs i{font-style:normal;margin:0 7px;color:#B4BCC8}
.vg-sb .sb-crumbs b{font-weight:700;color:#0F1A2B}
.vg-sb .sb-saved{font-size:12px;color:#626976;margin-right:8px}
.vg-sb .sb-ib{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:#626976}
.vg-sb .sb-ib .ic{width:15px;height:15px}
.vg-sb .sb-ib.on{background:rgba(15,23,42,.06);color:#0F172A}
.vg-sb .sb-col{width:624px;margin:4px auto 0}
.vg-sb .sb-cover{height:112px;border-radius:12px;background:linear-gradient(120deg,#FEF3C7 0%,#FED7AA 50%,#FECACA 100%)}
.vg-sb .sb-icon{position:relative;z-index:2;display:grid;place-items:center;width:68px;height:68px;margin:-38px 0 0 2px;border-radius:14px;background:#fff;
  border:1px solid rgba(0,0,0,.10);color:#059669}
.vg-sb .sb-icon .ic{width:34px;height:34px}
.vg-sb .sb-title{margin-top:12px;font:800 34px/1.15 "Plus Jakarta Sans",sans-serif;letter-spacing:-.02em;color:#0F1A2B}
.vg-sb .sb-meta{display:flex;align-items:center;gap:16px;margin-top:11px;font-size:12px;color:#626976}
.vg-sb .sb-meta span{display:inline-flex;align-items:center;gap:5px}
.vg-sb .sb-meta .ic{width:11px;height:11px}
.vg-sb .sb-meta .b{color:#0F1A2B;font-weight:600}
.vg-sb .sb-faces{margin-left:2px}
.vg-sb .sb-faces i{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#0F172A;color:#fff;font:700 11.5px/1 "Plus Jakarta Sans",sans-serif;
  font-style:normal;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.14)}
.vg-sb .sb-faces i+i{margin-left:-7px}
.vg-sb .sb-props{display:flex;align-items:center;gap:10px;margin-top:8px;padding:6px 0;font-size:12px;color:#626976;white-space:nowrap}
.vg-sb .sb-props .ic{width:12px;height:12px}
.vg-sb .sb-props b{font-weight:600;color:#0F1A2B}
.vg-sb .sb-props i{font-style:normal;margin:0 7px;opacity:.5}
.vg-sb .sb-h{margin-top:16px;font:700 21px/1.25 "Plus Jakarta Sans",sans-serif;letter-spacing:-.01em;color:#0F1A2B}
.vg-sb .sb-p{margin-top:7px;font-size:15.5px;line-height:1.65;color:#1F2937}
.vg-sb .sb-at{font-weight:700;color:#0F1A2B}
.vg-sb .sb-ph{font-size:15px;color:#9AA3AF}
.vg-sb .sb-last{position:relative;margin-top:12px}

/* a live value (codexLib.jsx: smartbook-live:// chips) — the label is stored, the value is read when the page opens */
.vg-sb .sb-lv{display:inline-flex;align-items:center;padding:1px 8px 1px 7px;border-radius:6px;border:1px solid rgba(0,0,0,.12);background:rgba(0,0,0,.03);
  font-size:14.5px;line-height:1.5;font-weight:600;color:#0F1A2B;white-space:nowrap;vertical-align:1px}
.vg-sb .sb-lv>i{width:6px;height:6px;border-radius:50%;background:#1E8E5A;margin-right:6px;flex:none}
.vg-sb .sb-lv b{font-weight:800;font-variant-numeric:tabular-nums}
.vg-sb .sb-lv .ld,.vg-sb .sb-lv b{display:inline-block;overflow:hidden;white-space:nowrap}
.vg-sb .sb-lv .ld{max-width:0;opacity:.6}
.vg-sb .sb-lv b{max-width:160px}

/* the checklist (taskList: accent checkbox; a done item is struck through at .55) */
.vg-sb .sb-todo{display:flex;flex-direction:column;gap:3px;margin-top:9px}
.vg-sb .sb-todo li{display:flex;align-items:flex-start;gap:10px;font-size:15.5px;line-height:1.65;color:#1F2937}
.vg-sb .sb-todo li>i{flex:none;display:grid;place-items:center;width:16px;height:16px;margin-top:5px;border-radius:4px;border:1.5px solid #9AA3AF;background:#fff}
.vg-sb .sb-todo li.ok>i{background:#1E8E5A;border-color:#1E8E5A;color:#fff}
.vg-sb .sb-todo li.ok>i .ic{width:11px;height:11px}
.vg-sb .sb-todo li.ok>span{text-decoration:line-through;opacity:.55}
.vg-sb .sb-typed{--tw:104px;display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:bottom;max-width:var(--tw)}

/* a colleague's cursor (CollaborationCursor: caret + name tag, radius 4 4 4 0) */
.vg-sb .sb-cur{position:relative;display:inline-block;width:2px;height:20px;margin-left:1px;background:var(--c);vertical-align:-4px}
.vg-sb .sb-cur em{position:absolute;left:0;bottom:100%;margin-bottom:1px;padding:2px 6px 3px;border-radius:4px 4px 4px 0;background:var(--c);color:#fff;
  font:700 10px/1.2 "Inter",sans-serif;white-space:nowrap}

/* comments (360px drawer: All / Open / Resolved, threads with replies, the composer) */
.vg-sb .sb-cm{display:flex;flex-direction:column;min-height:0;border-left:1px solid rgba(0,0,0,.06);background:#fff}
.vg-sb .sb-cm-h{display:flex;align-items:center;gap:8px;padding:15px 18px;border-bottom:1px solid rgba(0,0,0,.06)}
.vg-sb .sb-cm-h>.ic{width:15px;height:15px;color:#0F172A}
.vg-sb .sb-cm-h div{flex:1}
.vg-sb .sb-cm-h b{display:block;font:700 14px/1.2 "Plus Jakarta Sans",sans-serif}
.vg-sb .sb-cm-h small{display:block;font-size:11px;color:#626976;margin-top:1px}
.vg-sb .sb-cm-h .x{width:15px;height:15px;color:#626976}
.vg-sb .sb-cm-f{display:flex;gap:2px;padding:8px 14px;border-bottom:1px solid rgba(0,0,0,.04)}
.vg-sb .sb-cm-f span{padding:4px 10px;border-radius:6px;font:700 11px/1.3 "Inter",sans-serif;color:#626976}
.vg-sb .sb-cm-f .on{background:#E2E8F0;color:#0F172A}
.vg-sb .sb-th{display:flex;gap:9px;padding:14px 18px;border-bottom:1px solid rgba(0,0,0,.04)}
.vg-sb .sb-th .av{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#0F172A;color:#fff;font:800 11px/1 "Inter",sans-serif}
.vg-sb .sb-th>div{flex:1;min-width:0}
.vg-sb .sb-th .who{display:flex;align-items:baseline;gap:8px}
.vg-sb .sb-th .who b{font-size:12px}
.vg-sb .sb-th .who small{font-size:11px;color:#626976}
.vg-sb .sb-th p{margin-top:5px;font-size:13px;line-height:1.55;color:#444D5A}
.vg-sb .sb-th .acts{display:flex;gap:12px;margin-top:7px}
.vg-sb .sb-th .acts span{display:inline-flex;align-items:center;gap:4px;font:700 11px/1 "Inter",sans-serif;color:#626976}
.vg-sb .sb-th .acts .ic{width:10px;height:10px}
.vg-sb .sb-th .rep{margin-top:10px;padding-left:11px;border-left:2px solid rgba(0,0,0,.08)}
.vg-sb .sb-th .rep .who{align-items:center;gap:6px;margin-bottom:3px}
.vg-sb .sb-th .av2{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:rgba(15,23,42,.10);color:#0F172A;font:700 11px/1 "Inter",sans-serif}
.vg-sb .sb-th .rep .who b{font-size:11px}
.vg-sb .sb-th .rep .who small{font-size:10px}
.vg-sb .sb-th .rep p{margin-top:0;padding-left:26px;font-size:12px}
.vg-sb .sb-cm-in{margin-top:auto;padding:12px;border-top:1px solid rgba(0,0,0,.06)}
.vg-sb .sb-cm-in .ta{display:block;height:56px;padding:10px 12px;border-radius:8px;border:1px solid rgba(0,0,0,.10);background:#F6F9FC;font-size:13px;color:#9AA3AF}
.vg-sb .sb-cm-in div{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.vg-sb .sb-cm-in small{font-size:11px;color:#626976}
.vg-sb .sb-cm-in b{display:inline-flex;align-items:center;gap:5px;padding:6px 14px;border-radius:8px;background:#0F172A;color:#fff;font:700 11px/1 "Inter",sans-serif;opacity:.5}
.vg-sb .sb-cm-in b .ic{width:11px;height:11px}

/* ── the tour's states: the live value picker, the [[ picker, the page menu ──────────────────────── */
.vg-sb .sb-scrim,.vg-sb .sb-modal,.vg-sb .sb-pick,.vg-sb .sb-menu{opacity:0;visibility:hidden;transition:opacity .45s ease,visibility 0s .45s}
.vg-sb[data-state=live] .sb-scrim,.vg-sb[data-state=live] .sb-modal,.vg-sb[data-state=link] .sb-pick,.vg-sb[data-state=menu] .sb-menu{
  opacity:1;visibility:visible;transition:opacity .45s ease .15s,visibility 0s}
.vg-sb .sb-l2{position:relative}
.vg-sb .t-link{display:none}
.vg-sb[data-state=link] .t-norm{display:none}
.vg-sb[data-state=link] .t-link{display:inline}
.vg-sb .sb-scrim{position:absolute;inset:0;z-index:6;background:rgba(15,23,42,.50)}
.vg-sb .sb-modal{position:absolute;z-index:7;left:50%;top:96px;width:560px;margin-left:-280px;border-radius:16px;background:#fff;border:1px solid rgba(0,0,0,.10);
  box-shadow:0 16px 48px rgba(15,23,42,.16);overflow:hidden}
.vg-sb .sb-mh{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid rgba(0,0,0,.06)}
.vg-sb .sb-mh b{display:flex;align-items:center;gap:7px;font:700 14px/1.2 "Plus Jakarta Sans",sans-serif;color:#0F1A2B}
.vg-sb .sb-mh b .ic{width:14px;height:14px;color:#0F172A}
.vg-sb .sb-mh small{display:block;margin-top:3px;font-size:12px;color:#626976}
.vg-sb .sb-mh .x{width:16px;height:16px;color:#626976}
.vg-sb .sb-types{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px}
.vg-sb .sb-types span{display:grid;grid-template-columns:40px 1fr;column-gap:13px;align-items:center;padding:15px;border-radius:12px;border:1px solid rgba(0,0,0,.10)}
.vg-sb .sb-types i{grid-row:span 2;width:40px;height:40px;border-radius:12px;background:rgba(0,0,0,.05);display:grid;place-items:center;color:#444D5A}
.vg-sb .sb-types i .ic{width:20px;height:20px}
.vg-sb .sb-types b{font:700 14px/1.2 "Plus Jakarta Sans",sans-serif;color:#0F1A2B}
.vg-sb .sb-types small{font-size:11px;color:#626976;margin-top:2px}
.vg-sb .sb-types .on{border-color:rgba(15,23,42,.20);background:rgba(15,23,42,.06)}
.vg-sb .sb-caret{display:inline-block;width:1.5px;height:19px;margin-left:1px;background:#0F1A2B;vertical-align:-4px}
.vg-sb .sb-pick{position:absolute;z-index:5;left:262px;top:100%;margin-top:4px;width:330px;padding:6px;border-radius:12px;background:#fff;border:1px solid rgba(0,0,0,.10);
  box-shadow:0 10px 30px rgba(15,23,42,.14),0 2px 6px rgba(15,23,42,.06)}
.vg-sb .sb-pk-h{padding:4px 8px 6px;font:600 11px/1.3 "Inter",sans-serif;color:#626976}
.vg-sb .sb-pick>span{display:flex;align-items:center;gap:10px;padding:8px 9px;border-radius:8px}
.vg-sb .sb-pick>span.on{background:rgba(15,23,42,.10)}
.vg-sb .sb-pick i{flex:none;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:color-mix(in srgb,var(--t) 8%,transparent);color:var(--t)}
.vg-sb .sb-pick i .ic{width:15px;height:15px}
.vg-sb .sb-pick span span{flex:1;min-width:0}
.vg-sb .sb-pick b{display:block;font-size:13px;font-weight:700;color:#0F1A2B;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vg-sb .sb-pick b em{font:600 11px/1 ui-monospace,Menlo,monospace;color:var(--t);margin-right:5px}
.vg-sb .sb-pick small{display:block;font-size:11px;color:#626976}
.vg-sb .sb-pick u{text-decoration:none;font-size:10px;color:#626976}
.vg-sb .sb-menu{position:absolute;z-index:6;right:14px;top:46px;width:272px;padding:6px;border-radius:12px;background:#fff;border:1px solid rgba(0,0,0,.10);
  box-shadow:0 14px 40px rgba(15,23,42,.16),0 2px 6px rgba(15,23,42,.06)}
.vg-sb .sb-menu .mi{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;font:600 13px/1.2 "Inter",sans-serif;color:#0F1A2B}
.vg-sb .sb-menu .mi .ic{width:14px;height:14px;color:#626976}
.vg-sb .sb-menu .sep{display:block;height:1px;margin:5px 8px;background:rgba(0,0,0,.07)}
.vg-sb .sb-mrow{display:flex;align-items:center;gap:4px;padding:6px 10px 6px 12px}
.vg-sb .sb-mrow small{flex:1;font:600 11px/1 "Inter",sans-serif;color:#626976}
.vg-sb .sb-mrow span{padding:4px 7px;border-radius:6px;border:1px solid rgba(0,0,0,.10);font-size:11px;color:#444D5A}
.vg-sb .sb-mrow .on{border-color:#0F172A;color:#0F172A;font-weight:700}
.vg-sb .serif{font-family:Georgia,"Times New Roman",serif}
.vg-sb .mono{font-family:ui-monospace,Menlo,monospace}
.vg-sb .sb-lay{padding:5px 10px 7px 12px}
.vg-sb .sb-lay small{display:block;margin-bottom:6px;font:600 11px/1 "Inter",sans-serif;color:#626976}
.vg-sb .sb-lay div{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.vg-sb .sb-lay span{padding:7px 9px;border-radius:8px;border:1px solid rgba(0,0,0,.10)}
.vg-sb .sb-lay span.on{border-color:#0F172A;background:rgba(15,23,42,.06)}
.vg-sb .sb-lay b{display:block;font:700 12px/1.2 "Inter",sans-serif;color:#0F1A2B}
.vg-sb .sb-lay em{display:block;margin-top:2px;font-size:10.5px;color:#626976}

/* ── the hero plays once: two colleagues arrive, the live values resolve, Omar types ─────────────── */
.motion .m-shot:not(.in) .vg-sb .sb-faces i{opacity:0;transform:scale(.6)}
.motion .m-shot.in .vg-sb .sb-faces i{animation:sbFace .45s cubic-bezier(.2,.7,.2,1) .25s both}
.motion .m-shot.in .vg-sb .sb-faces i+i{animation-delay:.42s}
.motion .m-shot:not(.in) .vg-sb .sb-lv .ld{max-width:30px}
.motion .m-shot:not(.in) .vg-sb .sb-lv b{max-width:0}
.motion .m-shot:not(.in) .vg-sb .sb-lv>i{opacity:.4}
.motion .m-shot.in .vg-sb .sb-lv{animation:sbFlash 1.4s ease calc(var(--k) * 650ms + 950ms) both}
.motion .m-shot.in .vg-sb .sb-lv>i{animation:sbDot .3s ease calc(var(--k) * 650ms + 950ms) both}
.motion .m-shot.in .vg-sb .sb-lv .ld{animation:sbLoad .35s ease calc(var(--k) * 650ms + 950ms) both}
.motion .m-shot.in .vg-sb .sb-lv b{animation:sbValue .6s cubic-bezier(.2,.7,.2,1) calc(var(--k) * 650ms + 950ms) both}
.motion .m-shot:not(.in) .vg-sb .sb-typed{max-width:0}
.motion .m-shot.in .vg-sb .sb-typed{animation:sbType 1.25s steps(14,end) 2.5s both}
@keyframes sbFace{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:none}}
@keyframes sbFlash{0%{background:rgba(0,0,0,.03);border-color:rgba(0,0,0,.12)}30%{background:rgba(30,142,90,.14);border-color:rgba(30,142,90,.45)}100%{background:rgba(0,0,0,.03);border-color:rgba(0,0,0,.12)}}
@keyframes sbDot{from{opacity:.4}to{opacity:1}}
@keyframes sbLoad{from{max-width:30px}to{max-width:0}}
@keyframes sbValue{from{max-width:0}to{max-width:160px}}
@keyframes sbType{from{max-width:0}to{max-width:var(--tw,280px)}}

/* ── templates: the 23 built in (codexLib.jsx BUILT_IN_TEMPLATES), grouped as the gallery groups them ── */
.sb-tpl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:44px 32px;margin-top:56px}
.sb-tg h3{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:2px solid var(--ink);font-size:17px;letter-spacing:-.01em}
.sb-tg h3 small{font:500 13px/1 var(--text);color:var(--muted)}
.sb-tg ul{display:flex;flex-direction:column}
.sb-tg li{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:12px;align-items:start;align-content:start;padding:13px 0;border-bottom:1px solid var(--hair)}
.sb-tg li:last-child{border-bottom:0}
.sb-tg li>svg{width:34px;height:34px;padding:8px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--ink);grid-row:span 2}
.sb-tg li b{font:650 15px/1.3 var(--display);letter-spacing:-.005em;color:var(--ink)}
.sb-tg li span{font-size:13.5px;line-height:1.45;color:var(--muted);margin-top:2px}
.sb-tg.wide{grid-column:span 2}
.sb-tg.wide ul{display:grid;grid-template-columns:1fr 1fr;column-gap:32px}
.sb-tg.wide li:nth-last-child(2){border-bottom:0}
.sb-tnote{display:flex;flex-wrap:wrap;gap:10px 28px;margin-top:40px;font-size:14.5px;color:var(--ink-2)}
.sb-tnote span{display:inline-flex;align-items:center;gap:8px}
.sb-tnote span::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--green)}
@media (max-width:1179px){
  .sb-tpl{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .sb-tpl{grid-template-columns:1fr;gap:36px}
  .sb-tg.wide{grid-column:auto}
  .sb-tg.wide ul{grid-template-columns:1fr}
  .sb-tg.wide li:nth-last-child(2){border-bottom:1px solid var(--hair)}
}
