/* Lattice, the design system of TernaryCode (from design2/kit.css): renders the app's UI in HTML. */


/* ============================================================== tokens */
.dark {
  color-scheme: dark;
  --base: #0e0e0e;        /* window ground: sidebar, top bar, status bar, gaps */
  --sheet: #191919;       /* panes, drawers, tiles: where content lives (= terminal bg) */
  --raised: #222222;      /* selected rows, active tab, cards inside a sheet */
  --overlay: #1c1c1c;     /* dialogs, palette */
  --menu: #232323;        /* menus, tooltips */
  --inset: #0c0c0c;       /* tracks: segmented, switches off, fields */
  --hover: rgba(255,255,255,.045);
  --press: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.115);
  --line-3: rgba(255,255,255,.2);
  --hi: rgba(255,255,255,.06);          /* 1px top highlight on raised things */
  --text: #ececec;
  --text-2: #a3a3a3;
  --text-3: #727272;
  --text-4: #4e4e4e;
  --accent: #2b66cc;
  --accent-h: #3673db;
  --accent-t: #86acf0;
  --accent-soft: rgba(70,130,235,.15);
  --ring: rgba(84,140,234,.55);
  --wait: #e8a23c;
  --run: #7aa7f2;
  --done: #55b882;
  --fail: #ec625b;
  --idle: #6a6a6a;
  --add: #55b882;
  --del: #ec625b;
  --add-bg: rgba(85,184,130,.10);
  --del-bg: rgba(236,98,91,.10);
  --add-hl: rgba(85,184,130,.28);
  --del-hl: rgba(236,98,91,.28);
  --cream: #fff6ea;
  --scrim: rgba(0,0,0,.5);
  --sh-pop: 0 10px 28px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);
  --sh-dlg: 0 30px 80px rgba(0,0,0,.65), 0 6px 18px rgba(0,0,0,.4);
  --sh-btn: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.4);
  /* terminal: "TernaryCode Dark" 2 */
  --t-bg: #191919; --t-fg: #d4d4d4; --t-dim: #7d7d7d; --t-faint: #555;
  --t-red: #ee7b74; --t-grn: #8fcf8f; --t-yel: #e6c07b; --t-blu: #7fb0f5; --t-mag: #c99ae8; --t-cyn: #6cc7cf; --t-wht: #f2f2f2;
  /* syntax */
  --s-kw: #c99ae8; --s-fn: #7fb0f5; --s-str: #a8d08d; --s-num: #e6b673; --s-ty: #6cc7cf; --s-com: #6d6d6d; --s-mac: #ee9a74; --s-op: #a3a3a3;
}
.light {
  color-scheme: light;
  --base: #ececeb;
  --sheet: #fcfcfc;
  --raised: #ffffff;
  --overlay: #ffffff;
  --menu: #ffffff;
  --inset: #e4e4e3;
  --hover: rgba(0,0,0,.04);
  --press: rgba(0,0,0,.07);
  --line: rgba(0,0,0,.075);
  --line-2: rgba(0,0,0,.12);
  --line-3: rgba(0,0,0,.2);
  --hi: rgba(255,255,255,.7);
  --text: #171717;
  --text-2: #595959;
  --text-3: #8a8a8a;
  --text-4: #b8b8b8;
  --accent: #1f5fbf;
  --accent-h: #1a52a8;
  --accent-t: #1a56b3;
  --accent-soft: rgba(31,95,191,.10);
  --ring: rgba(31,95,191,.45);
  --wait: #b06a00;
  --run: #1f5fbf;
  --done: #1a7f48;
  --fail: #c9372f;
  --idle: #9a9a9a;
  --add: #1a7f48;
  --del: #c9372f;
  --add-bg: rgba(26,127,72,.08);
  --del-bg: rgba(201,55,47,.07);
  --add-hl: rgba(26,127,72,.2);
  --del-hl: rgba(201,55,47,.2);
  --cream: #fff6ea;
  --scrim: rgba(20,20,20,.22);
  --sh-pop: 0 10px 28px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --sh-dlg: 0 30px 80px rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.08);
  --sh-btn: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.18);
  --t-bg: #fcfcfc; --t-fg: #222; --t-dim: #8a8a8a; --t-faint: #b5b5b5;
  --t-red: #c23b3b; --t-grn: #2f7d32; --t-yel: #8a6100; --t-blu: #1f5fbf; --t-mag: #8e44ad; --t-cyn: #16808a; --t-wht: #111;
  --s-kw: #8e44ad; --s-fn: #1f5fbf; --s-str: #2f7d32; --s-num: #a65f00; --s-ty: #16808a; --s-com: #9a9a9a; --s-mac: #b4502e; --s-op: #5c5c5c;
}

/* ============================================================== base */
.app, .app * { box-sizing: border-box; }
.app {
  font-family: "Inter", sans-serif; font-size: 13px; line-height: 1.38; color: var(--text);
  font-feature-settings: "calt" 0, "liga" 0; font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased; letter-spacing: 0;
}
.mono, .app code { font-family: "JBM", monospace; font-variant-ligatures: none; }
.ph, .phf { font-style: normal; font-weight: normal; line-height: 1; display: inline-block; speak: never; }
.ph { font-family: "Phosphor"; }
.phf { font-family: "PhosphorFill"; }

.t1 { color: var(--text); } .t2 { color: var(--text-2); } .t3 { color: var(--text-3); } .t4 { color: var(--text-4); }
.c-wait { color: var(--wait); } .c-run { color: var(--run); } .c-done { color: var(--done); } .c-fail { color: var(--fail); }
.c-idle { color: var(--idle); } .c-acc { color: var(--accent-t); } .c-add { color: var(--add); } .c-del { color: var(--del); }
.sp { flex: 1; }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; } .g12 { gap: 12px; } .g16 { gap: 16px; }
.ell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.medium { font-weight: 500; } .semi { font-weight: 600; }

/* ============================================================== window */
.win {
  position: relative; width: 1440px; height: 900px; background: var(--base); overflow: hidden;
  border-radius: 12px; display: grid;
  grid-template-columns: var(--sbw, 248px) 1fr; grid-template-rows: 44px 1fr 28px;
}
.dark .win { box-shadow: 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.06); }
.light .win { box-shadow: 0 0 0 1px rgba(0,0,0,.14); }
.win.nosb { grid-template-columns: 0 1fr; }
.win.win-sm { width: 1180px; height: 760px; }
.lights { display: flex; gap: 8px; padding-left: 16px; }
.lights b { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.25); }
.lights b:nth-child(2) { background: #febc2e; } .lights b:nth-child(3) { background: #28c840; }
.lights.off b { background: var(--line-3); }

/* ============================================================== sidebar */
.sb { grid-row: 1 / 3; grid-column: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 8px; position: relative; }
.sb-top { height: 44px; display: flex; align-items: center; gap: 4px; flex: none; padding-right: 2px; }
.sb-top .lights { padding-left: 8px; }
.sb-scroll { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.sb-h { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 8px; font-size: 11.5px; font-weight: 500; color: var(--text-3); flex: none; }
.sb-h .n { font-family: "JBM"; font-size: 10.5px; color: var(--text-4); font-weight: 500; }
.sb-h .ibtn { width: 22px; height: 22px; font-size: 13px; }
.sb-foot { height: 42px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px; margin: 0 -8px; padding-left: 16px; padding-right: 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; }
.sb-foot .ph { font-size: 15px; color: var(--text-3); }

/* queue: what waits for you, in ⌘J order */
.queue { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.qi { position: relative; display: grid; grid-template-columns: 18px 1fr auto; column-gap: 8px; padding: 7px 8px 7px 8px; border-radius: 8px; }
.qi .gl { margin-top: 1px; }
.qi .ti { font-size: 13px; font-weight: 500; color: var(--text); }
.qi .su { grid-column: 2 / 4; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); margin-top: 2px; min-width: 0; }
.qi .su .al { flex: none; }
.qi .age { font-family: "JBM"; font-size: 10.5px; color: var(--text-3); align-self: center; display: flex; align-items: center; gap: 6px; }
.qi.next { background: color-mix(in srgb, var(--wait) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wait) 22%, transparent); }
.qi.hov { background: var(--hover); }

/* project rows */
.grp { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.grp .ph { font-size: 10px; color: var(--text-4); }
.grp .sum { margin-left: auto; display: flex; gap: 8px; font-family: "JBM"; font-size: 10.5px; }
.grp .sum > span { display: inline-flex; align-items: center; gap: 4px; }
.pr { position: relative; display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; align-items: center; height: 48px; padding: 0 8px; border-radius: 8px; }
.pr-b { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pr .l1, .pr .l2 { display: flex; align-items: center; gap: 6px; min-width: 0; height: 17px; }
.pr .nm { font-size: 13px; font-weight: 500; color: var(--text); }
.pr .meta { display: flex; align-items: center; gap: 5px; font-family: "JBM"; font-size: 10.5px; color: var(--text-3); min-width: 0; flex: 1 1 auto; }
.pr .meta .t2 { flex: none; }
.pr .meta .ph { font-size: 11px; }
.pr .st { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; flex: 0 0 auto; max-width: 128px; min-width: 0; }
.pr.on { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .pr.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.05); }
.pr.hov { background: var(--hover); }
.pr.dim .nm { color: var(--text-2); } .pr.dim .pt { opacity: .7; }
.pr.child { height: 42px; grid-template-columns: 16px 1fr; column-gap: 8px; padding-left: 34px; }
.pr.child .nm { font-size: 12.5px; }
.pr.child::before { content: ""; position: absolute; left: 19px; top: -10px; height: calc(50% + 10px); width: 11px; border-left: 1px solid var(--line-3); border-bottom: 1px solid var(--line-3); border-bottom-left-radius: 6px; }
.pr.child .pt.wt { font-size: 13px; color: var(--text-3); }
.pdots { display: inline-flex; gap: 3px; align-items: center; }
.pdots b { width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); }
.pdots b.r { background: var(--run); } .pdots b.w { background: var(--wait); } .pdots b.d { background: var(--done); } .pdots b.f { background: var(--fail); }
.pdots .ph { font-size: 10px; color: var(--text-3); margin-left: 1px; }

/* project identity tile: kind + colour */
.pt { width: 24px; height: 24px; border-radius: 7px; flex: none; display: inline-grid; place-items: center; font-family: "JBM"; font-weight: 600; font-size: 10px; letter-spacing: -.02em;
  color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 22%, transparent); }
.pt.s20 { width: 20px; height: 20px; border-radius: 6px; font-size: 9px; }
.pt.s18 { width: 18px; height: 18px; border-radius: 5px; font-size: 8.5px; }
.pt.s16 { width: 16px; height: 16px; border-radius: 5px; font-size: 8px; }
.pt.s32 { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.pt.wt { background: transparent; box-shadow: none; color: var(--text-3); font-size: 12px; }

/* unseen count */
.badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: inline-grid; place-items: center; font-family: "JBM"; font-size: 10px; font-weight: 600; color: #111; }
.badge.wait { background: var(--wait); } .badge.done { background: var(--done); } .badge.fail { background: var(--fail); color: #fff; } .badge.run { background: var(--accent); color: #fff; }
.light .badge.wait, .light .badge.done { color: #fff; }

/* ============================================================== top bar */
.tb { grid-row: 1; grid-column: 2; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 6px; min-width: 0; }
.tb .ttl { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 4px; border-radius: 8px; flex: none; }
.tb .ttl .nm { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.tb .ttl .chev { font-size: 10px; color: var(--text-3); }
.vsep { width: 1px; height: 16px; background: var(--line-2); flex: none; margin: 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 7px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.chip .ph { font-size: 13px; color: var(--text-3); }
.chip.mono { font-family: "JBM"; font-size: 11.5px; }
.chip.hov, .chip.line { box-shadow: inset 0 0 0 1px var(--line-2); }
.chip .ext { font-size: 11px; color: var(--text-4); }
.sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 3px color-mix(in srgb, var(--done) 18%, transparent); flex: none; }

/* tabs */
.tabs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; flex: 0 1 auto; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.tab .x { font-size: 10px; color: var(--text-3); margin-left: 2px; margin-right: -3px; opacity: 0; }
.tab.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .tab.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.05); }
.tab.on .x { opacity: 1; }
.tab .wdot { width: 6px; height: 6px; border-radius: 50%; background: var(--wait); }
.tab .prog { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 1px; background: var(--line-2); overflow: hidden; }
.tab .prog i { display: block; height: 100%; background: var(--run); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; color: var(--text); flex: none; }
.btn .ph { font-size: 14px; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: var(--sh-btn); }

.btn.secondary { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi); }
.light .btn.secondary { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.06); }
.btn.ghost { color: var(--text-2); }
.btn.ghost.hov { background: var(--hover); color: var(--text); }
.btn.danger { background: #c4413a; color: #fff; box-shadow: var(--sh-btn); }
.btn.dangerq { color: var(--fail); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; gap: 5px; border-radius: 6px; }
.btn.sm .ph { font-size: 13px; }
.btn.lg { height: 34px; padding: 0 16px; font-size: 13.5px; border-radius: 9px; }
.btn .kb { font-family: "JBM"; font-size: 10.5px; color: var(--text-3); }
.btn.primary .kb, .btn.danger .kb { color: rgba(255,255,255,.7); margin-left: 1px; }
.btn.focus { box-shadow: var(--sh-btn), 0 0 0 2px var(--sheet), 0 0 0 4px var(--ring); }
.ibtn { width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; color: var(--text-2); font-size: 15px; position: relative; flex: none; }
.ibtn.sm { width: 22px; height: 22px; font-size: 13px; border-radius: 6px; }
.ibtn.xs { width: 18px; height: 18px; font-size: 11px; border-radius: 5px; color: var(--text-3); }
.ibtn.hov { background: var(--hover); color: var(--text); }
.ibtn.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .ibtn.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.05); }
.ibtn.acc { color: var(--accent-t); }
.ibtn .dot { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--run); box-shadow: 0 0 0 2px var(--base); }
.igrp { display: inline-flex; align-items: center; gap: 2px; }

.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; font-family: "JBM"; font-size: 10.5px; font-weight: 500; color: var(--text-3); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.kbd.lg { height: 20px; min-width: 20px; font-size: 11px; }

/* segmented */
.seg { display: inline-flex; align-items: center; padding: 2px; gap: 2px; border-radius: 8px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.seg > span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.seg > span .ph { font-size: 13px; }
.seg > span .n { font-family: "JBM"; font-size: 10.5px; color: var(--text-4); }
.seg > span.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), 0 1px 2px rgba(0,0,0,.3); }
.light .seg > span.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.08); }
.seg > span.on .n { color: var(--text-3); }
.seg.full { display: flex; } .seg.full > span { flex: 1; }
.seg.sm > span { height: 22px; padding: 0 8px; font-size: 11.5px; }

/* switch */
.sw { width: 30px; height: 18px; border-radius: 9px; background: var(--line-3); position: relative; flex: none; display: inline-block; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.sw.on { background: var(--accent); }
.sw.on::after { left: 14px; }
.dark .sw:not(.on)::after { background: #cfcfcf; }

/* fields */
.fld { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 7px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: 12.5px; min-width: 0; }
.light .fld { background: #fff; }
.fld .ph { font-size: 14px; color: var(--text-3); }
.fld .ph-t { color: var(--text-3); }
.fld.focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.fld.mono { font-family: "JBM"; font-size: 12px; }
.fld .caret { width: 1.5px; height: 15px; background: var(--accent-t); margin-left: -6px; }
.sel { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px 0 10px; border-radius: 7px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi); font-size: 12.5px; white-space: nowrap; }
.light .sel { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.05); }
.sel .ph { font-size: 11px; color: var(--text-3); }
.chk { width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line-3); display: inline-grid; place-items: center; flex: none; font-size: 11px; color: #fff; }
.chk.on { background: var(--accent); box-shadow: none; }
.radio { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-3); flex: none; position: relative; }
.radio.on { background: var(--accent); box-shadow: none; }
.radio.on::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.stepper { display: inline-flex; align-items: center; height: 28px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--inset); }
.light .stepper { background: #fff; }
.stepper span { padding: 0 9px; font-family: "JBM"; font-size: 12px; }
.stepper i { width: 26px; height: 28px; display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.stepper i:first-child { border-right: 1px solid var(--line); } .stepper i:last-child { border-left: 1px solid var(--line); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: 500; white-space: nowrap; color: var(--text-2); background: var(--hover); }
.pill .ph, .pill .phf { font-size: 11px; }
.pill.wait { color: var(--wait); background: color-mix(in srgb, var(--wait) 14%, transparent); }
.pill.run { color: var(--run); background: color-mix(in srgb, var(--run) 13%, transparent); }
.pill.done { color: var(--done); background: color-mix(in srgb, var(--done) 14%, transparent); }
.pill.fail { color: var(--fail); background: color-mix(in srgb, var(--fail) 14%, transparent); }
.pill.acc { color: var(--accent-t); background: var(--accent-soft); }
.pill.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.mono { font-family: "JBM"; font-size: 10.5px; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-family: "JBM"; font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ============================================================== status glyphs */
/* Running: the 3×3 lattice of the app icon, a light travelling along its "</" path. */
.lat { width: 10px; height: 10px; display: inline-grid; grid-template-columns: repeat(3, 2px); grid-template-rows: repeat(3, 2px); gap: 2px; flex: none; vertical-align: middle; }
.lat b { width: 2px; height: 2px; border-radius: 1px; background: var(--c, var(--run)); opacity: .22; }
.lat.lg { width: 14px; height: 14px; grid-template-columns: repeat(3, 3px); grid-template-rows: repeat(3, 3px); gap: 2.5px; }
.lat.lg b { width: 3px; height: 3px; border-radius: 1.5px; }
.lat.xl { width: 22px; height: 22px; grid-template-columns: repeat(3, 4px); grid-template-rows: repeat(3, 4px); gap: 5px; }
.lat.xl b { width: 4px; height: 4px; border-radius: 2px; }
.lat.run b { animation: lat 1.2s linear infinite; }
.lat.run b:nth-child(2) { animation-delay: 0s; }
.lat.run b:nth-child(4) { animation-delay: .15s; }
.lat.run b:nth-child(8) { animation-delay: .3s; }
.lat.run b:nth-child(3) { animation-delay: .6s; }
.lat.run b:nth-child(5) { animation-delay: .75s; }
.lat.run b:nth-child(1), .lat.run b:nth-child(6), .lat.run b:nth-child(7), .lat.run b:nth-child(9) { animation: none; }
/* still frame used in screenshots: the light sits on "<" */
.still .lat.run b { animation: none; }
.still .lat.run b:nth-child(2) { opacity: .55; } .still .lat.run b:nth-child(4) { opacity: 1; } .still .lat.run b:nth-child(8) { opacity: .55; } .still .lat.run b:nth-child(3), .still .lat.run b:nth-child(5) { opacity: .32; }
@keyframes lat { 0% { opacity: 1; } 35% { opacity: .22; } 100% { opacity: .22; } }
.lat.idle b { --c: var(--idle); opacity: .45; }
.lat.idle b:nth-child(2), .lat.idle b:nth-child(4), .lat.idle b:nth-child(8), .lat.idle b:nth-child(3) { opacity: .9; }
.gl { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; }
.gl .phf, .gl .ph { font-size: 14px; }
.gl.sm .phf, .gl.sm .ph { font-size: 12px; }

/* agent marks */
.al { display: inline-grid; place-items: center; flex: none; }
.al svg, .al img { display: block; }
.al.tile { border-radius: 8px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }
.light .al.tile { background: #fff; }

/* ============================================================== main area, sheets */
.main { grid-row: 2; grid-column: 2; position: relative; min-height: 0; min-width: 0; padding: 0 8px 0 0; display: flex; gap: 6px; }
.win.nosb .main { padding-left: 8px; }
.sheet { position: relative; background: var(--sheet); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.light .sheet { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.04); }
.sheet.focus { box-shadow: inset 0 0 0 1px var(--line-2); }
.light .sheet.focus { box-shadow: 0 0 0 1px var(--line-3), 0 1px 3px rgba(0,0,0,.06); }
.sheet.wait { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wait) 60%, transparent), 0 0 0 3px color-mix(in srgb, var(--wait) 9%, transparent), 0 8px 30px color-mix(in srgb, var(--wait) 10%, transparent); }
.light .sheet.wait { box-shadow: 0 0 0 1px color-mix(in srgb, var(--wait) 60%, transparent), 0 0 0 4px color-mix(in srgb, var(--wait) 10%, transparent); }
.sheet.agent { box-shadow: inset 0 0 0 1.5px var(--accent); }
.stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.fill { flex: 1; min-width: 0; min-height: 0; }

/* pane header (inside a sheet, no rule under it) */
.ph-h { height: 34px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; font-size: 12.5px; }
.ph-h .nm { font-weight: 500; color: var(--text); }
.ph-h .mt { font-family: "JBM"; font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.ph-h .st { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.sheet:not(.focus) .ph-h .nm { color: var(--text-2); }
.ph-h .task { color: var(--text-3); font-size: 12px; min-width: 0; }
.ph-h .task::before { content: "—"; margin-right: 8px; color: var(--text-4); }

/* terminal */
.term { flex: 1; min-height: 0; padding: 2px 16px 12px; font-family: "JBM"; font-size: 12.5px; line-height: 1.6; color: var(--t-fg); white-space: pre; overflow: hidden; }
.term.sm { font-size: 11px; line-height: 1.5; padding: 0 12px 8px; }
.term.xs { font-size: 9.5px; line-height: 1.45; padding: 0 10px 6px; }
.term .d { color: var(--t-dim); } .term .f { color: var(--t-faint); } .term .b { color: var(--t-wht); font-weight: 600; }
.term .r { color: var(--t-red); } .term .g { color: var(--t-grn); } .term .y { color: var(--t-yel); } .term .u { color: var(--t-blu); } .term .m { color: var(--t-mag); } .term .c { color: var(--t-cyn); }
.term .i { font-style: italic; }
.term .cur { background: var(--t-fg); color: var(--t-bg); }
.term .cur.hollow { background: transparent; box-shadow: inset 0 0 0 1px var(--t-dim); }
.term .sel { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.term .link { text-decoration: underline; text-decoration-color: var(--t-blu); color: var(--t-blu); }
.term .box { color: var(--t-faint); }
.term .hl { background: color-mix(in srgb, var(--wait) 30%, transparent); color: var(--t-wht); border-radius: 2px; }
.term .cc { color: #d97757; }

/* splitter look between sheets is just the 6px gap; a drag shows this */
.split-hint { position: absolute; background: var(--accent); border-radius: 2px; }

/* ============================================================== status bar */
.stb { grid-row: 3; grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.stb .ph, .stb .phf { font-size: 12px; }
.stb .m { font-family: "JBM"; font-size: 10.5px; }
.stb .lead { display: flex; align-items: center; gap: 6px; color: var(--text-2); min-width: 0; }
.stb .lead b { font-weight: 500; color: var(--text); }
.stb .kbd { height: 16px; font-size: 10px; min-width: 16px; }

/* ============================================================== overlays */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 5; }
.dlg { position: absolute; z-index: 6; background: var(--overlay); border-radius: 14px; box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), var(--sh-dlg); display: flex; flex-direction: column; overflow: hidden; }
.light .dlg { box-shadow: 0 0 0 1px var(--line-2), var(--sh-dlg); }
.dlg-h { padding: 18px 20px 6px; display: flex; gap: 14px; align-items: flex-start; }
.dlg-h h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.dlg-h p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.dlg-b { padding: 12px 20px 18px; }
.dlg-f { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--base) 35%, transparent); }
.light .dlg-f { background: #fafafa; }
.dlg-f .hint { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.dicon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: none; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.dicon.wait { color: var(--wait); background: color-mix(in srgb, var(--wait) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wait) 25%, transparent); }
.dicon.fail { color: var(--fail); background: color-mix(in srgb, var(--fail) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fail) 25%, transparent); }
.dicon.acc { color: var(--accent-t); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.dicon.done { color: var(--done); background: color-mix(in srgb, var(--done) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--done) 25%, transparent); }

.menu { position: absolute; z-index: 7; min-width: 220px; padding: 5px; border-radius: 10px; background: var(--menu); box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), var(--sh-pop); font-size: 13px; }
.light .menu { box-shadow: 0 0 0 1px var(--line-2), var(--sh-pop); }
.mi { display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.mi .ph, .mi .phf { font-size: 14px; color: var(--text-2); width: 16px; text-align: center; }
.mi .k { margin-left: auto; padding-left: 18px; font-family: "JBM"; font-size: 10.5px; color: var(--text-3); }
.mi.on { background: var(--accent); color: #fff; } .mi.on .ph, .mi.on .k, .mi.on .phf { color: rgba(255,255,255,.85); }
.mi.dng { color: var(--fail); } .mi.dng .ph { color: var(--fail); }
.mi.dis { color: var(--text-4); } .mi.dis .ph { color: var(--text-4); }
.msep { height: 1px; background: var(--line); margin: 5px 6px; }
.mh { padding: 6px 8px 4px; font-size: 11px; font-weight: 500; color: var(--text-3); }

.tip { position: absolute; z-index: 8; padding: 6px 9px; border-radius: 7px; background: var(--menu); box-shadow: 0 0 0 1px var(--line-2), var(--sh-pop); font-size: 12px; color: var(--text); line-height: 1.45; max-width: 300px; }
.tip .t3 { font-size: 11.5px; }

.toast { position: absolute; z-index: 8; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 11px; background: var(--menu); box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), var(--sh-pop); font-size: 12.5px; white-space: nowrap; }
.light .toast { box-shadow: 0 0 0 1px var(--line-2), var(--sh-pop); }
.toast .phf, .toast .ph { font-size: 15px; }

/* generic list rows inside overlays */
.lrow { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.lrow.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.lrow.on2 { background: var(--press); }
.lrow .sub { color: var(--text-3); font-size: 12px; }
.lrow .k { margin-left: auto; font-family: "JBM"; font-size: 10.5px; color: var(--text-3); }
.lh { padding: 10px 10px 4px; font-size: 11px; font-weight: 500; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.lh .n { font-family: "JBM"; color: var(--text-4); font-size: 10.5px; }

/* cards inside sheets / settings groups */
.card { background: var(--raised); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .card { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.04); }
.card .cr { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 52px; }
.card .cr + .cr { border-top: 1px solid var(--line); }
.card .cr .lb { font-size: 13px; color: var(--text); }
.card .cr .nt { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }

/* code + diff */
.code { font-family: "JBM"; font-size: 12px; line-height: 1.65; white-space: pre; color: var(--t-fg); }
.code .ln { display: inline-block; width: 44px; padding-right: 14px; text-align: right; color: var(--text-4); user-select: none; }
.code .kw { color: var(--s-kw); } .code .fn { color: var(--s-fn); } .code .str { color: var(--s-str); } .code .num { color: var(--s-num); }
.code .ty { color: var(--s-ty); } .code .com { color: var(--s-com); font-style: italic; } .code .mac { color: var(--s-mac); } .code .op { color: var(--s-op); }
.dl { display: flex; min-height: 20px; }
.dl .a, .dl .b { width: 40px; flex: none; text-align: right; padding-right: 10px; color: var(--text-4); font-size: 11px; }
.dl .s { width: 18px; flex: none; text-align: center; color: var(--text-4); }
.dl .t { flex: 1; padding-right: 16px; white-space: pre; }
.code .dl, .code .hunk { white-space: normal; }
.dl.add { background: var(--add-bg); } .dl.add .s { color: var(--add); } .dl.add .a, .dl.add .b { color: color-mix(in srgb, var(--add) 60%, transparent); }
.dl.del { background: var(--del-bg); } .dl.del .s { color: var(--del); } .dl.del .a, .dl.del .b { color: color-mix(in srgb, var(--del) 60%, transparent); }
.dl .wa { background: var(--add-hl); border-radius: 2px; } .dl .wd { background: var(--del-hl); border-radius: 2px; }
.hunk { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; font-family: "JBM"; font-size: 11px; color: var(--text-3); background: color-mix(in srgb, var(--accent) 6%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hunk .ctx { color: var(--text-2); }

/* bars: +/− proportion */
.bars { display: inline-flex; gap: 2px; }
.bars b { width: 6px; height: 6px; border-radius: 1.5px; background: var(--line-2); }
.bars b.a { background: var(--add); } .bars b.d { background: var(--del); }

.anno { position: absolute; z-index: 20; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ff4fa3; color: #fff; font: 600 11px/20px "Inter"; text-align: center; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }

/* ============================================================== browser panel */
.bp-tabs { height: 36px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 6px; }
.bp-tab { position: relative; display: flex; align-items: center; gap: 7px; height: 26px; max-width: 210px; padding: 0 8px 0 9px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.bp-tab .ph { font-size: 13px; }
.bp-tab.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .bp-tab.on { box-shadow: 0 0 0 1px var(--line-2); }
.bp-tab .x { font-size: 10px; color: var(--text-3); }
.bp-tab .bdot { width: 6px; height: 6px; border-radius: 50%; background: var(--run); flex: none; }
.bp-bar { height: 40px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 4px 6px; }
.bp-bar .dis { opacity: .4; }
.bp-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
.light .bp-url { background: #f1f1f0; }
.bp-url .mono { font-size: 11.5px; }
.bp-url .ph { font-size: 13px; }
.bp-agent { flex: none; display: flex; align-items: center; gap: 8px; height: 38px; margin: 0 8px 6px; padding: 0 5px 0 11px; border-radius: 9px; font-size: 12px; color: var(--text); background: color-mix(in srgb, var(--accent) 13%, var(--sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent); white-space: nowrap; }
.bp-agent b { font-weight: 600; }
.bp-page { flex: 1; min-height: 0; margin: 0 8px 8px; border-radius: 8px; overflow: hidden; position: relative; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.bp-page.agent { box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.bp-page.agent::after { content: ""; position: absolute; inset: 0; pointer-events: none; }

/* Fernway: the demo page (web content, always light) */
.fw { position: relative; height: 100%; background: #faf9f7; color: #1d2a22; font-family: "Inter", sans-serif; overflow: hidden; }
.fw-h { display: flex; align-items: center; gap: 22px; height: 56px; padding: 0 22px; background: #fff; border-bottom: 1px solid #ebe8e3; }
.fw-logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.fw-logo b { width: 18px; height: 18px; border-radius: 5px 5px 5px 1px; background: #2f5d3e; }
.fw-nav { display: flex; gap: 18px; font-size: 13px; color: #5a655e; }
.fw-cart { position: relative; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px #e3dfd8; font-size: 17px; color: #1d2a22; }
.fw-cart b { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; border-radius: 9px; background: #d4552f; color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.fw-hero { margin: 18px 22px 0; border-radius: 12px; padding: 22px 24px; background: #2f5d3e; color: #f4efe6; }
.fw-k { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.fw-hero h2 { margin: 4px 0 4px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.fw-hero p { margin: 0; font-size: 12.5px; opacity: .85; }
.fw-sec { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 22px 10px; font-size: 14px; }
.fw-sec span { font-size: 12px; color: #7a847d; }
.fw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 22px; }
.fw-card { background: #fff; border-radius: 11px; box-shadow: 0 0 0 1px #ebe8e3; overflow: hidden; }
.fw-img { height: 78px; display: grid; place-items: center; font-size: 34px; }
.fw-b { padding: 10px 12px 12px; }
.fw-n { font-size: 13px; font-weight: 600; }
.fw-d { font-size: 11.5px; color: #7a847d; margin-top: 2px; }
.fw-r { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; }
.fw-btn { height: 28px; padding: 0 11px; border-radius: 8px; background: #2f5d3e; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.fw-btn.added { background: #e3ede5; color: #2f5d3e; }
.fw-btn.hl { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.acur { position: absolute; z-index: 3; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; }
.acur .ph { font-size: 20px; color: var(--accent); filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.acur::after { content: "Claude Code"; margin-top: 16px; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: #fff; font: 600 10.5px/16px "Inter"; }
.light .pt { color: color-mix(in srgb, var(--pc) 72%, #000); background: color-mix(in srgb, var(--pc) 15%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 30%, transparent); }

/* ============================================================== grid tiles */
.gridv { flex: 1; display: grid; gap: 6px; min-width: 0; min-height: 0; }
.tile { position: relative; }
.tile-h { height: 38px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; font-size: 12px; min-width: 0; }
.tile-h .nm { font-size: 13px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; }
.tile-h .br { font-family: "JBM"; font-size: 10.5px; color: var(--text-3); display: flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 0; }
.tile-h .br .ph { font-size: 11px; }
.tile-prog { height: 2px; margin: -2px 10px 2px; border-radius: 1px; background: var(--line-2); overflow: hidden; flex: none; }
.tile-prog i { display: block; height: 100%; background: var(--run); }
.tile-f { flex: none; display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 0 6px 6px; padding: 0 6px 0 10px; border-radius: 8px; font-size: 12px; }
.tile-f.wait { background: color-mix(in srgb, var(--wait) 11%, var(--sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wait) 26%, transparent); }
.tile-f.done { background: color-mix(in srgb, var(--done) 10%, var(--sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--done) 24%, transparent); }
.tile-f.fail { background: color-mix(in srgb, var(--fail) 10%, var(--sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fail) 24%, transparent); }
.tile-f.res { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }
.tile-f .phf, .tile-f .ph { font-size: 14px; }
.tile-f code { font-size: 11px; color: var(--text); }
.ttabs { display: flex; gap: 2px; min-width: 0; flex: none; }
.ttab { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.ttab.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.light .ttab.on { box-shadow: 0 0 0 1px var(--line-2); }
.ttab.w { color: var(--wait); }
.ttab.on.w { color: var(--wait); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wait) 35%, transparent); background: color-mix(in srgb, var(--wait) 10%, var(--sheet)); }
.ttab .wdot { width: 5px; height: 5px; border-radius: 50%; background: var(--wait); }
.tsplit { flex: 1; min-height: 0; display: flex; gap: 0; }
.tsplit > .term { border-left: 1px solid var(--line); }
.tsplit > .term:first-child { border-left: 0; }
.zoomed { position: relative; overflow: hidden; border-radius: 7px; margin: 0 6px 6px 0; box-shadow: inset 0 0 0 1px var(--line); }
.zoomed > .zi { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.zoomed.agent { box-shadow: 0 0 0 1.5px var(--accent); }
.zmark { position: absolute; right: 6px; top: 6px; z-index: 2; height: 18px; padding: 0 6px; border-radius: 5px; font: 500 10px/18px "JBM"; color: var(--text-2); background: var(--menu); box-shadow: 0 0 0 1px var(--line-2); }
.gadd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; color: var(--text-3); font-size: 12.5px; box-shadow: inset 0 0 0 1px var(--line-2); background-image: repeating-linear-gradient(90deg, transparent 0 6px, transparent 6px 12px); }

/* ============================================================== run agent */
.ra { display: grid; grid-template-columns: 250px 1fr; border-top: 1px solid var(--line); }
.ra-l { padding: 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; background: color-mix(in srgb, var(--base) 30%, transparent); }
.light .ra-l { background: #fafafa; }
.ra-ag { display: flex; align-items: center; gap: 11px; height: 50px; padding: 0 10px 0 8px; border-radius: 9px; font-size: 13px; }
.ra-ag.on { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi); }
.light .ra-ag.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.05); }
.ra-ag.add { height: 38px; gap: 9px; padding-left: 14px; font-size: 12.5px; }
.ra-r { padding: 8px 20px 10px; display: flex; flex-direction: column; }
.ra-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 8px 0; font-size: 13px; }
.ra-row + .ra-row { border-top: 1px solid var(--line); }
.ra-row.top { align-items: flex-start; }
.ra-lb { width: 92px; flex: none; color: var(--text-2); font-size: 12.5px; }
.ra-row.top .ra-lb { padding-top: 9px; }
.ra-sess { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ra-s { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; }
.ra-s.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.ra-s.more { font-size: 12px; gap: 8px; padding-left: 11px; }
.ra-cmd { display: flex; align-items: center; gap: 9px; margin: 0 14px 12px; height: 34px; padding: 0 12px; border-radius: 8px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.light .ra-cmd { background: #f3f3f2; }
.qi.here { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .qi.here { box-shadow: 0 0 0 1px var(--line-2); }
.qi.here::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--wait); }
.qi .here-t { font-family: "Inter"; font-size: 10.5px; font-weight: 500; color: var(--text-3); }
.st { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; white-space: nowrap; }
.sb-scroll > * { flex: none; }
.ph-h .nm { white-space: nowrap; }
/* Code & review screens: the Code drawer, Review, documents. Classes are prefixed cd-. */

/* drawer frame */
.cd-dh { height: 40px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 8px; }
.cd-body { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--line); }
.cd-col { width: 220px; flex: none; display: flex; flex-direction: column; min-height: 0; padding-top: 8px; border-right: 1px solid var(--line); }
.cd-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cd-colf { flex: none; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.cd-colf .mono { font-size: 10.5px; }

/* file tree */
.cd-tree { flex: 1; min-height: 0; overflow: hidden; padding: 0 6px; }
.cd-tr { display: flex; align-items: center; gap: 5px; height: 25px; padding-right: 8px; border-radius: 6px; font-size: 12.5px; color: color-mix(in srgb, var(--text) 84%, transparent); white-space: nowrap; }
.cd-tr.chg { color: var(--text); }
.cd-tr.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.cd-car { width: 12px; flex: none; font-size: 9px; color: var(--text-4); text-align: center; }
.cd-fi { font-size: 14px; color: var(--text-3); flex: none; }
.cd-fi.dir { color: color-mix(in srgb, var(--text-3) 80%, var(--accent-t)); }
.cd-m { font-family: "JBM"; font-size: 10px; font-weight: 600; width: 12px; text-align: center; flex: none; }
.cd-m.m { color: var(--accent-t); } .cd-m.a { color: var(--add); } .cd-m.d { color: var(--del); }

/* editor tabs, breadcrumb, status line */
.cd-etabs { height: 38px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 8px; }
.cd-et { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.cd-et .ph { font-size: 14px; }
.cd-et .x { font-size: 10px; color: var(--text-3); margin-left: 1px; }
.cd-et.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.light .cd-et.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.05); }
.cd-crumb { height: 32px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 16px; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.cd-sep { font-size: 9px; color: var(--text-4); }
.cd-sym { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-family: "JBM"; font-size: 11.5px; }
.cd-sym .ph { font-size: 13px; color: var(--s-fn); }
.cd-sl { height: 28px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); white-space: nowrap; }
.cd-sl .mono { font-size: 10.5px; }
.cd-sl .kbd { height: 16px; min-width: 16px; font-size: 10px; }
.cd-sl .phf { font-size: 12px; }
.cd-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 3px color-mix(in srgb, var(--done) 18%, transparent); }
.cd-ok.off { background: var(--text-4); box-shadow: none; }

/* code area */
.cd-ed { position: relative; flex: 1; min-height: 0; overflow: hidden; padding: 8px 0; }
.cd-l { display: flex; height: 20px; align-items: center; }
.cd-l .ln { width: 46px; padding-right: 16px; flex: none; }
.cd-l.cur { background: var(--hover); }
.cd-l.cur .ln { color: var(--text-2); }
.cd-t { white-space: pre; }
.cd-g { width: 3px; height: 20px; flex: none; margin-left: 8px; border-radius: 1px; }
.cd-g.a { background: var(--add); }
.cd-g.m { background: var(--accent-t); }
.cd-g.d { height: 0; width: 0; margin-top: 18px; border-left: 5px solid var(--del); border-top: 4px solid transparent; border-bottom: 4px solid transparent; background: none; border-radius: 0; margin-right: -2px; }
.cd-mini { padding: 6px 0; font-size: 11.5px; }
.cd-mini .cd-l { height: 19px; }
.cd-mini .ln { width: 38px; padding-right: 12px; }

/* LSP hover */
.cd-hover { position: absolute; z-index: 4; width: 372px; border-radius: 10px; background: var(--menu); box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), var(--sh-pop); font-family: "Inter"; white-space: normal; overflow: hidden; }
.light .cd-hover { box-shadow: 0 0 0 1px var(--line-2), var(--sh-pop); }
.cd-hv-sig { padding: 10px 12px 9px; font-size: 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--base) 30%, transparent); }
.light .cd-hv-sig { background: #f7f7f6; }
.cd-hv-doc { padding: 9px 12px 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.cd-hv-doc code, .cd-cdoc code, .cd-doc code { font-size: 11px; padding: 0 3px; border-radius: 3px; background: var(--hover); color: var(--text); }
.cd-hv-f { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 10px 0 12px; border-top: 1px solid var(--line); font-size: 11.5px; }
.cd-hv-f .mono { font-size: 10.5px; }
.cd-lk { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-t); font-weight: 500; white-space: nowrap; }
.cd-lk .kbd { height: 16px; font-size: 9.5px; }

/* review: scope, files, diff */
.cd-scope { display: flex; flex-direction: column; gap: 2px; margin: 0 8px 8px; padding: 3px; border-radius: 9px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.light .cd-scope { background: #f0f0ef; }
.cd-sc { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.cd-sci { width: 14px; height: 16px; display: grid; place-items: center; flex: none; color: var(--text-3); }
.cd-scb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cd-scb .cd-cnt { font-weight: 400; }
.cd-sc .ph { font-size: 13px; }
.cd-sc .mono { font-size: 10.5px; }
.cd-sc.on { background: var(--raised); color: var(--text); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), 0 1px 2px rgba(0,0,0,.25); }
.light .cd-sc.on { box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0,0,0,.06); }
.cd-cnt { font-family: "JBM"; font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.cd-sc.on .cd-cnt { color: var(--text-2); }
.cd-flist { flex: 1; min-height: 0; overflow: hidden; padding: 0 6px; }
.cd-fr { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 6px; border-radius: 7px; font-size: 12.5px; }
.cd-fr.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.cd-pm { display: flex; gap: 5px; font-family: "JBM"; font-size: 10.5px; flex: none; }
.cd-dfh { height: 42px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cd-dfh .bars { margin-left: 2px; }
.cd-diff { flex: 1; min-height: 0; overflow: hidden; font-size: 11px; line-height: 20px; }
.cd-diff .dl .a, .cd-diff .dl .b { width: 36px; padding-right: 8px; }
.cd-diff .hunk:first-child { border-top: 0; }
.cd-diff .dl .a, .cd-diff .dl .b { font-family: "JBM"; font-size: 10.5px; line-height: 20px; }
.hunk .ph { font-size: 11px; }

/* full review */
.cd-sh { height: 30px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.cd-sh .n { font-family: "JBM"; font-size: 10.5px; color: var(--text-4); font-weight: 500; }
.cd-commits { position: relative; padding: 2px 6px 4px; }
.cd-commits::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1px; background: var(--line-3); }
.cd-cm { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px 0 10px; border-radius: 7px; font-size: 12.5px; }
.cd-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--sheet); box-shadow: inset 0 0 0 2px var(--text-3); position: relative; z-index: 1; }
.cd-cm.wip .cd-dot { box-shadow: inset 0 0 0 2px var(--accent-t); background: var(--sheet); }
.cd-cm.wip .ell { color: var(--accent-t); font-weight: 500; }
.cd-cm.base { min-height: 32px; }
.cd-cm.base .cd-dot { width: 7px; height: 7px; margin: 0 1px; background: var(--text-4); box-shadow: none; }
.cd-sphd { flex: none; display: grid; grid-template-columns: 1fr 1fr; height: 28px; border-bottom: 1px solid var(--line); font-size: 10.5px; color: var(--text-3); }
.cd-sphd span { display: flex; align-items: center; padding-left: 14px; }
.cd-sphd span + span { border-left: 1px solid var(--line); }
.cd-split { flex: 1; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; font-size: 11.5px; line-height: 21px; padding-top: 4px; }
.cd-sp { min-width: 0; overflow: hidden; }
.cd-sp + .cd-sp { border-left: 1px solid var(--line); }
.cd-split .dl { min-height: 21px; }
.cd-split .dl .a { font-size: 10.5px; line-height: 21px; }
.cd-gap { background-image: repeating-linear-gradient(-45deg, var(--hover) 0 1px, transparent 1px 6px); }
.cd-next { flex: none; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.cd-wtf { flex: none; display: flex; align-items: center; gap: 9px; height: 52px; padding: 0 10px 0 16px; border-top: 1px solid var(--line); font-size: 12px; white-space: nowrap; background: color-mix(in srgb, var(--base) 25%, transparent); }
.light .cd-wtf { background: #f7f7f6; }
.cd-wtf .mono { font-size: 11px; }
.cd-wtf .ph { font-size: 14px; }

