/* Layout: a framed workbench — tab rail left, view strip on top, records center, detail drawer right. */
:root {
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8780' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --bg: #efeee9; --surface: #fcfbf8; --surface-2: #f6f5f1; --surface-3: #eeece6;
  --line: #dfdcd4; --line-2: #ebe9e3; --ink: #1d1c1a; --ink-2: #57544e; --ink-3: #8b8780;
  --accent: #2f45d8; --accent-ink: #ffffff; --accent-soft: #e5e8fb; --accent-line: #b9c1f3;
  --sel: rgba(47, 69, 216, .08); --sel-edge: #3b3a36; --focus: rgba(29, 28, 26, .42); --field-focus: #f2f1ec; --warn: #a1500b; --warn-soft: #fbeedd; --bad: #b42318; --bad-soft: #fde8e6; --good: #1d7a46; --good-soft: #e1f3e8;
  --shadow: 0 1px 0 rgba(29, 28, 26, .04), 0 8px 28px rgba(29, 28, 26, .10);
  --f-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-display: "Bricolage Grotesque", "Geist", ui-sans-serif, system-ui, sans-serif;
  --r: 8px; --r-lg: 14px; --side-w: 248px;
  /* choice chips */
  --c-blue: #dfe7fb; --c-blue-i: #1f3f9a; --c-teal: #d7f0ee; --c-teal-i: #0d5c56; --c-green: #dcefdf; --c-green-i: #1d6332;
  --c-olive: #e9ecd4; --c-olive-i: #535c12; --c-amber: #f8ecc8; --c-amber-i: #7a5300; --c-orange: #fbe1cf; --c-orange-i: #8a3a07;
  --c-red: #f9dcda; --c-red-i: #8f1d16; --c-pink: #f7dbea; --c-pink-i: #86214f; --c-purple: #e8defa; --c-purple-i: #4d2a93; --c-gray: #e8e6e1; --c-gray-i: #4a4741;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121214; --surface: #1b1b1e; --surface-2: #212125; --surface-3: #29292e;
  --line: #303036; --line-2: #26262b; --ink: #ecebe7; --ink-2: #aaa8a2; --ink-3: #77756f;
  --accent: #8a99ff; --accent-ink: #0d1140; --accent-soft: #23294f; --accent-line: #3c4790;
  --sel: rgba(138, 153, 255, .12); --sel-edge: #d9d7d0; --focus: rgba(236, 235, 231, .5); --field-focus: #26262b; --warn: #f0b46b; --warn-soft: #3a2a14; --bad: #ff8f84; --bad-soft: #3d1c19; --good: #6fd39a; --good-soft: #15301f;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.45);
  --c-blue: #1f2b4d; --c-blue-i: #a9bdf5; --c-teal: #133633; --c-teal-i: #8fdcd3; --c-green: #183420; --c-green-i: #9fd9ae;
  --c-olive: #2d3115; --c-olive-i: #cdd68e; --c-amber: #3a2f12; --c-amber-i: #f0d082; --c-orange: #3b2414; --c-orange-i: #f5b98d;
  --c-red: #3d1b19; --c-red-i: #f5a39c; --c-pink: #3a1a2b; --c-pink-i: #f1a6cb; --c-purple: #2b2146; --c-purple-i: #c8b2f6; --c-gray: #2b2a28; --c-gray-i: #c9c6bf;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #121214; --surface: #1b1b1e; --surface-2: #212125; --surface-3: #29292e;
  --line: #303036; --line-2: #26262b; --ink: #ecebe7; --ink-2: #aaa8a2; --ink-3: #77756f;
  --accent: #8a99ff; --accent-ink: #0d1140; --accent-soft: #23294f; --accent-line: #3c4790;
  --sel: rgba(138, 153, 255, .12); --sel-edge: #d9d7d0; --focus: rgba(236, 235, 231, .5); --field-focus: #26262b; --warn: #f0b46b; --warn-soft: #3a2a14; --bad: #ff8f84; --bad-soft: #3d1c19; --good: #6fd39a; --good-soft: #15301f;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.45);
  --c-blue: #1f2b4d; --c-blue-i: #a9bdf5; --c-teal: #133633; --c-teal-i: #8fdcd3; --c-green: #183420; --c-green-i: #9fd9ae;
  --c-olive: #2d3115; --c-olive-i: #cdd68e; --c-amber: #3a2f12; --c-amber-i: #f0d082; --c-orange: #3b2414; --c-orange-i: #f5b98d;
  --c-red: #3d1b19; --c-red-i: #f5a39c; --c-pink: #3a1a2b; --c-pink-i: #f1a6cb; --c-purple: #2b2146; --c-purple-i: #c8b2f6; --c-gray: #2b2a28; --c-gray-i: #c9c6bf;
  color-scheme: dark;
}

html { box-sizing: border-box; height: 100%; }
*, *::before, *::after { box-sizing: inherit; }
body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font: 13.5px/1.45 var(--f-ui); -webkit-font-smoothing: antialiased;
  padding: 0; overflow: hidden; } /* full screen: no frame around the app */
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible:not(input):not(textarea):not(select):not([contenteditable]) { outline: 2px solid var(--focus); outline-offset: 2px; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
#root { height: 100%; }
.shell { --ease-out: cubic-bezier(.2, .8, .2, 1); position: relative; height: 100%; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); background: var(--surface); border: 0; border-radius: 0; overflow: hidden; transition: grid-template-columns .26s var(--ease-out); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.shell.side-off { grid-template-columns: 0 minmax(0, 1fr); }
.shell > .side { grid-column: 1; grid-row: 1; }
.shell > .main { grid-column: 2; grid-row: 1; }
.side > :not(.side-resize) { min-width: calc(var(--side-w) - 1px); } /* the contents keep their width while the column slides */
/* closed sidebar: moving to the left edge peeks it, floating over the page */
.side-edge { display: none; position: fixed; left: 0; top: 0; bottom: 0; width: 22px; z-index: 36; }
.shell.side-off .side-edge { display: block; }
.shell.side-off.peek .side { position: absolute; left: 8px; top: 8px; bottom: 8px; width: var(--side-w); z-index: 37; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: side-peek .2s var(--ease-out); }
@keyframes side-peek { from { transform: translateX(-16px); opacity: 0; } }
.side { background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; position: relative; }
.side-off .side { border-right: 0; }
.side-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: 3; }
.side-resize:hover { background: var(--accent-line); }
.side-top { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--surface); display: grid; place-items: center; flex: none; position: relative; }
.mark::after { content: ""; position: absolute; right: -1px; top: 6px; width: 5px; height: 8px; background: var(--accent); border-radius: 2px 0 0 2px; }
.mark b { font: 700 13px/1 var(--f-display); }
.ws-name { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 14px 8px 6px; display: flex; align-items: center; justify-content: space-between; }
.side-label button { border: 0; background: none; color: var(--ink-3); padding: 2px; border-radius: 5px; display: grid; place-items: center; }
.side-label button:hover { background: var(--surface-3); color: var(--ink); }
.nav-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 7px; text-align: left; color: var(--ink-2); min-height: 32px; }
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.on { background: var(--surface-3); color: var(--ink); font-weight: 500; }
.nav-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .cnt { font: 11px var(--f-mono); color: var(--ink-3); }
.nav-item .more { opacity: 0; border: 0; background: none; padding: 2px; border-radius: 5px; color: var(--ink-3); display: grid; }
.nav-item:hover .more, .nav-item.on .more, .nav-item .more:focus-visible { opacity: 1; }
.nav-item .more:hover { background: var(--surface-3); color: var(--ink); }
.star { color: var(--warn); font-size: 11px; }
.app-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; border: 0; background: none; width: 100%; text-align: left; }
.app-chip:hover { background: var(--surface-3); }
.app-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 600 14px/1 var(--f-display); flex: none; }
.app-chip .nm { font: 600 15px/1.2 var(--f-display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-chip .sub { font-size: 11.5px; color: var(--ink-3); }
.side-foot { border-top: 1px solid var(--line); padding: 8px; display: grid; gap: 2px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 54px; }
.top h1 { font: 600 17px/1.2 var(--f-display); letter-spacing: -.015em; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; max-width: 40%; }
.top .vtabs-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--line); }
.top .vtabs { min-width: 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); padding-right: 20px; }
.main { container-type: inline-size; container-name: main; }
.bar { flex-wrap: nowrap; }
.bar .search { flex: 0 1 220px; min-width: 120px; }
@container main (max-width: 1040px) { .top .lbl, .bar .lbl { display: none; } .top .btn:has(.lbl) { width: 32px; padding: 0; justify-content: center; } }
@container main (max-width: 620px) { .bar .search select { display: none; } }
.crumb .tbl { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.save { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.save .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.save.saving .dot { background: var(--warn); }
.save.error { color: var(--bad); } .save.error .dot { background: var(--bad); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 28px; }
.btn .badge { font: 600 10.5px/16px var(--f-mono); min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); text-align: center; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.bar { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bar .grow { flex: 1; }
.vtabs { display: flex; gap: 2px; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.vtabs::-webkit-scrollbar { display: none; }
.vtabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.vtabs.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); }
.vtabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); width: 210px; color: var(--ink-3); }
.search:focus-within { border-color: transparent; background: var(--field-focus); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); }
.search select { border: 0; background: none; color: var(--ink-3); font-size: 12px; max-width: 76px; outline: 0; }
.chips { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 9px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.chip button { border: 0; background: none; color: inherit; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.chip button:hover { background: var(--accent-line); }
.chips .count { color: var(--ink-2); margin-left: auto; }
.linkbtn { border: 0; background: none; color: var(--accent); padding: 0 4px; font-weight: 500; }
.linkbtn:hover { text-decoration: underline; }

.content { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.suggest { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--surface); }
.suggest .lead { font-size: 12px; color: var(--ink-3); }
.sug { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px dashed var(--accent-line); background: var(--surface); color: var(--accent); font-weight: 500; font-size: 12.5px; }
.sug:hover { background: var(--accent-soft); border-style: solid; }

/* ---------- grid ---------- */
.grid-wrap { flex: 1; min-height: 0; position: relative; outline: none; }
.grid { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
.g-inner { position: relative; min-width: 100%; min-height: 100%; display: flex; flex-direction: column; }
.g-body { position: relative; flex: 1 0 auto; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; background: var(--surface-2); border-bottom: 1px solid var(--line); height: 34px; }
.g-row { position: absolute; left: 0; display: flex; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.g-row:hover .g-cell { background-color: var(--surface-2); }
.g-cell { flex: none; border-right: 1px solid var(--line-2); padding: 0 9px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; position: relative; background: var(--surface); }
.g-cell > .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.wrap .g-cell { align-items: flex-start; padding-top: 7px; white-space: normal; }
.wrap .g-cell > .v { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.g-cell.r { justify-content: flex-end; } .g-cell.r > .v { text-align: right; }
.g-cell.c { justify-content: center; }
.g-cell.frz, .g-hcell.frz { position: sticky; z-index: 2; }
.g-cell.frz-last, .g-hcell.frz-last { box-shadow: 1px 0 0 var(--line), 6px 0 8px -6px rgba(0,0,0,.18); }
.g-row.sel-row .g-cell { background-color: var(--sel); }
.g-cell.in { background-color: var(--sel); }
.g-cell.cur { box-shadow: inset 0 0 0 2px var(--sel-edge); z-index: 3; }
.g-cell.frz.cur { z-index: 4; }
.g-cell.err > .v { color: var(--bad); font-size: 12px; }
.g-num { width: 64px; color: var(--ink-3); font: 11.5px var(--f-mono); gap: 4px; padding: 0 6px; justify-content: space-between; }
.g-num input { margin: 0; accent-color: var(--accent); width: 14px; height: 14px; }
.g-num .n { flex: 1; text-align: center; }
.g-num .x { border: 0; background: none; color: var(--ink-3); padding: 2px; border-radius: 4px; display: none; }
.g-row:hover .g-num .x, .g-row.sel-row .g-num .x { display: grid; }
.g-row:hover .g-num .n { display: none; }
.g-num .x:hover { color: var(--accent); background: var(--accent-soft); }
.g-hcell { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 4px 0 9px; border-right: 1px solid var(--line); position: relative; background: var(--surface-2); color: var(--ink-2); font-weight: 500; font-size: 12.5px; user-select: none; cursor: grab; }
.g-hcell .ti { font-size: 11px; color: var(--ink-3); width: 14px; text-align: center; flex: none; font-family: var(--f-mono); }
.g-hcell .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-hcell .hm { border: 0; background: none; color: var(--ink-3); width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; padding: 0; opacity: 0; }
.g-hcell:hover .hm, .g-hcell .hm:focus-visible { opacity: 1; }
.g-hcell .hm:hover { background: var(--surface-3); color: var(--ink); }
.g-hcell.sorted .nm::after { content: " ↑"; color: var(--accent); }
.g-hcell.sorted.desc .nm::after { content: " ↓"; }
.g-hcell.dragging { opacity: .4; }
.g-hcell.add { cursor: pointer; width: 44px; justify-content: center; padding: 0; color: var(--ink-3); }
.g-hcell.add:hover { color: var(--accent); background: var(--accent-soft); }
.rsz { position: absolute; right: -4px; top: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 3; }
.rsz::after { content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: transparent; }
.rsz:hover::after, .rsz.active::after { background: var(--accent); }
.drop-line { position: absolute; top: 0; width: 2px; background: var(--accent); z-index: 9; pointer-events: none; }
.g-group { position: absolute; left: 0; display: flex; align-items: center; gap: 8px; padding-left: 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; cursor: pointer; user-select: none; }
.g-group .tw { color: var(--ink-3); width: 14px; transition: transform .12s; display: inline-block; }
.g-group.closed .tw { transform: rotate(-90deg); }
.g-group .gc { font: 11.5px var(--f-mono); color: var(--ink-3); font-weight: 400; }
.g-group .gsum { margin-left: auto; display: flex; position: sticky; right: 0; }
.g-add { position: absolute; left: 0; display: flex; align-items: center; gap: 8px; padding-left: 14px; color: var(--ink-3); cursor: pointer; border-bottom: 1px solid var(--line-2); }
.g-add:hover { color: var(--accent); background: var(--surface-2); }
.g-foot { position: sticky; bottom: 0; z-index: 6; display: flex; background: var(--surface-2); border-top: 1px solid var(--line); height: 30px; font-size: 12px; color: var(--ink-3); }
.g-foot .g-cell { background: var(--surface-2); border-right-color: transparent; }
.g-editor { position: absolute; z-index: 20; background: var(--field-focus); box-shadow: var(--shadow); border-radius: 2px; }
.g-editor input, .g-editor textarea { width: 100%; height: 100%; border: 0; outline: 0; background: none; padding: 0 9px; color: var(--ink); }
.g-editor textarea { padding: 8px 9px; resize: none; min-height: 110px; }
.g-empty { position: absolute; left: 0; right: 0; top: 90px; text-align: center; color: var(--ink-3); display: grid; gap: 10px; justify-items: center; }

/* cell content */
.pill { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; background: var(--c-gray); color: var(--c-gray-i); }
.pills { display: flex; gap: 4px; overflow: hidden; }
.c-blue { background: var(--c-blue); color: var(--c-blue-i); } .c-teal { background: var(--c-teal); color: var(--c-teal-i); } .c-green { background: var(--c-green); color: var(--c-green-i); }
.c-olive { background: var(--c-olive); color: var(--c-olive-i); } .c-amber { background: var(--c-amber); color: var(--c-amber-i); } .c-orange { background: var(--c-orange); color: var(--c-orange-i); }
.c-red { background: var(--c-red); color: var(--c-red-i); } .c-pink { background: var(--c-pink); color: var(--c-pink-i); } .c-purple { background: var(--c-purple); color: var(--c-purple-i); } .c-gray { background: var(--c-gray); color: var(--c-gray-i); }
.lnk { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
button.lnk:hover { background: var(--accent-soft); color: var(--accent); }
.chk { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ink-3); display: inline-grid; place-items: center; }
.chk.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chk.on::after { content: ""; width: 8px; height: 4px; border: 2px solid currentColor; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.stars { color: var(--warn); letter-spacing: 1px; } .stars i { color: var(--line); font-style: normal; }
.thumbs { display: flex; gap: 3px; }
.thumbs img, .thumbs .f { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-3); font-size: 9px; display: grid; place-items: center; color: var(--ink-3); }
.cell-url { color: var(--accent); }
.dim { color: var(--ink-3); }

/* ---------- board / gallery / list / calendar / form ---------- */
.scroll { flex: 1; min-height: 0; overflow: auto; }
.board { display: flex; gap: 12px; padding: 14px; align-items: flex-start; min-height: 100%; }
.col { flex: 0 0 272px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; display: flex; flex-direction: column; max-height: 100%; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; }
.col-h .gc { font: 11.5px var(--f-mono); color: var(--ink-3); font-weight: 400; }
.col-b { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; overflow-y: auto; }
.col.over { background: var(--accent-soft); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: pointer; display: grid; gap: 6px; text-align: left; width: 100%; }
.card:hover { border-color: var(--ink-3); }
.card.dragging { opacity: .35; }
.card .ttl { font-weight: 600; line-height: 1.3; }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--ink-2); align-items: center; }
.card .kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; }
.card .kv dt { color: var(--ink-3); } .card .kv dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .cover { margin: -10px -11px 4px; border-radius: 9px 9px 0 0; overflow: hidden; background: var(--surface-3); }
.card .cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.col-add { border: 0; background: none; color: var(--ink-3); text-align: left; padding: 6px 8px; border-radius: 7px; }
.col-add:hover { background: var(--surface-3); color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 210px), 1fr)); gap: 14px; padding: 16px; }
.gallery .card { padding: 0; overflow: hidden; gap: 0; }
.gallery .cover { margin: 0; border-radius: 0; aspect-ratio: var(--ar, 4 / 3); max-width: 100%; }
.gallery .body { padding: 10px 12px 12px; display: grid; gap: 6px; min-width: 0; }
.gallery .noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; }
.list { max-width: 880px; margin: 0 auto; padding: 10px 16px 24px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 8px; }
.li:hover { background: var(--surface-2); }
.li .ic { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); font: 600 14px var(--f-display); }
.li .ic img { width: 100%; height: 100%; object-fit: cover; }
.li .tx { flex: 1; min-width: 0; } .li .tx b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .tx span { color: var(--ink-3); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .tr { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.li-group { font-weight: 600; padding: 16px 8px 6px; display: flex; gap: 8px; align-items: center; }
.cal { display: grid; grid-template-columns: minmax(0, 1fr) 230px; min-height: 100%; }
.cal-main { padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; }
.cal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-h h2 { margin: 0 8px 0 0; font: 600 18px/1.2 var(--f-display); letter-spacing: -.01em; min-width: 150px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); flex: 1; grid-template-rows: auto; grid-auto-rows: minmax(112px, 1fr); --ev-h: 21px; }
.ev-sp { height: var(--ev-h); flex: none; }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cal-day.out { background: var(--surface-2); } .cal-day.out .dn { color: var(--ink-3); }
.cal-day .dn { font: 11.5px var(--f-mono); padding: 2px 4px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.cal-day.today .dn b { background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 0 6px; font-weight: 500; }
.cal-day .add { opacity: 0; border: 0; background: none; color: var(--ink-3); padding: 0 3px; border-radius: 4px; line-height: 16px; }
.cal-day:hover .add { opacity: 1; } .cal-day .add:hover { color: var(--accent); background: var(--accent-soft); }
.cal-day.over { background: var(--accent-soft); }
.ev { display: block; width: 100%; height: var(--ev-h, 21px); line-height: calc(var(--ev-h, 21px) - 4px); flex: none; text-align: left; border: 0; border-radius: 5px; padding: 2px 6px; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; background: var(--c-blue); color: var(--c-blue-i); }
.cal-grid .ev.span { border-radius: 0; margin: 0 -5px; width: calc(100% + 10px); position: relative; z-index: 1; } .ev.span.s { border-radius: 5px 0 0 5px; } .ev.span.e { border-radius: 0 5px 5px 0; } .ev.span.s.e { border-radius: 5px; }
.ev.cont { color: transparent; }
.cal-more { font-size: 11.5px; color: var(--ink-3); border: 0; background: none; text-align: left; padding: 0 6px; }
.cal-side { border-left: 1px solid var(--line); padding: 12px; background: var(--surface-2); min-width: 0; }
.cal-side h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 500; }
.cal-side .hint { font-size: 12px; color: var(--ink-3); margin: 0 0 10px; }
.cal-side .ev { margin-bottom: 4px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.form-wrap { padding: 24px 16px 48px; display: flex; justify-content: center; }
.form-card { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.form-cover { height: 88px; background: var(--accent); position: relative; overflow: hidden; }
.form-cover::before, .form-cover::after { content: ""; position: absolute; border-radius: 50%; }
.form-cover::before { width: 160px; height: 160px; right: 40px; top: -60px; background: var(--accent-ink); opacity: .14; }
.form-cover::after { width: 90px; height: 90px; right: -20px; bottom: -40px; background: var(--surface); opacity: .25; }
.form-body { padding: 22px 26px 26px; display: grid; gap: 18px; }
.form-body h2 { margin: 0; font: 600 24px/1.2 var(--f-display); letter-spacing: -.02em; }
.form-body .desc { color: var(--ink-2); margin: -10px 0 0; }
.fld { display: grid; gap: 6px; }
.fld > label, .fld > .lbl { font-weight: 500; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.fld .req { color: var(--bad); }
.fld .err { color: var(--bad); font-size: 12px; }
.inp { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 10px; outline: 0; color: var(--ink); }
textarea.inp { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.inp:focus { border-color: transparent; background: var(--field-focus); box-shadow: none; }
.inp.bad { border-color: var(--bad); }
select.inp, .search select, select.fx-sel { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: var(--chev); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px; }
.search select { padding-right: 20px; background-position: right 4px center; }
.done { text-align: center; padding: 40px 20px; display: grid; gap: 10px; justify-items: center; }
.done .tick { width: 48px; height: 48px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 22px; }

/* ---------- record panel ---------- */
/* The record panel slides over the table from the right, so the table and its tools never squeeze or jump. */
.panel { position: absolute; top: var(--top-h, 0px); right: 0; bottom: 0; z-index: 32; width: 460px; max-width: calc(100% - 56px); overflow: hidden; border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0;
  transform: translateX(calc(100% + 32px)); visibility: hidden; box-shadow: none; transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), visibility 0s linear .28s; }
.panel.open { transform: none; visibility: visible; box-shadow: -28px 0 56px -12px rgba(29, 28, 26, .18); border-top-left-radius: 12px; transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), visibility 0s; }
@media (prefers-reduced-motion: reduce) { .shell, .panel, .panel.open { transition: none; } .shell.side-off.peek .side { animation: none; } }
.p-head { display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.p-head .where { flex: 1; color: var(--ink-3); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-body { flex: 1; overflow-y: auto; padding: 16px 18px 40px; display: grid; gap: 16px; align-content: start; }
.p-title { font: 600 22px/1.2 var(--f-display); letter-spacing: -.02em; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; margin: -4px -6px; width: calc(100% + 12px); background: none; outline: 0; color: var(--ink); }
.p-title:hover { border-color: var(--line); } .p-title:focus { border-color: transparent; background: var(--field-focus); box-shadow: none; }
.p-id { font: 11.5px var(--f-mono); color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.pf { display: grid; gap: 5px; }
.pf .lbl { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.pf .lbl .ti { font-family: var(--f-mono); font-size: 11px; width: 14px; text-align: center; }
.pf .ro { min-height: 34px; display: flex; align-items: center; padding: 0 2px; color: var(--ink-2); }
.pf.hl { animation: hl 1.2s ease-out; border-radius: 8px; }
@keyframes hl { from { box-shadow: 0 0 0 6px var(--accent-soft); background: var(--accent-soft); } to { box-shadow: 0 0 0 6px transparent; background: transparent; } }
.ch-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ch-row .lnk { height: 26px; font-size: 12.5px; gap: 4px; padding-right: 3px; }
.ch-row .lnk .x { border: 0; background: none; color: var(--ink-3); width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; padding: 0; }
.ch-row .lnk .x:hover { background: var(--bad-soft); color: var(--bad); }
.opt-btn { border: 1px dashed var(--line); background: none; border-radius: 13px; height: 26px; padding: 0 10px; color: var(--ink-3); font-size: 12.5px; }
.opt-btn:hover { background: var(--accent-soft); color: var(--accent); }
.choice-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-pick .pill { cursor: pointer; border: 1px solid transparent; height: 26px; padding: 0 10px; }
.choice-pick .pill.off { background: none; color: var(--ink-3); border-color: var(--line); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.att { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); display: grid; place-items: center; font-size: 11px; color: var(--ink-2); text-align: center; padding: 0; max-width: 100%; }
.att img { width: 100%; height: 100%; object-fit: cover; }
.att .x { position: absolute; top: 4px; right: 4px; border: 0; width: 22px; height: 22px; border-radius: 6px; background: var(--surface); color: var(--ink); display: grid; place-items: center; opacity: 0; padding: 0; }
.att:hover .x { opacity: 1; }
.att.add { border-style: dashed; cursor: pointer; color: var(--ink-3); }
.att.add:hover { background: var(--accent-soft); color: var(--accent); }
.p-sec { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.p-sec h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 500; }
.act { font-size: 12.5px; color: var(--ink-2); display: grid; gap: 2px; }
.act b { color: var(--ink); font-weight: 500; }
.act .when { color: var(--ink-3); font-size: 11.5px; }
.act s { color: var(--ink-3); }
.cmt { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.cmt .when { color: var(--ink-3); font-size: 11.5px; }
.rating-in { display: flex; gap: 2px; }
.rating-in button { border: 0; background: none; padding: 2px; font-size: 18px; color: var(--line); line-height: 1; }
.rating-in button.on { color: var(--warn); }

/* ---------- home ---------- */
.home { height: 100%; overflow-y: auto; background: var(--surface); }
.home-in { max-width: 1120px; margin: 0 auto; padding: 22px 28px 60px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.home-top { display: flex; align-items: center; gap: 10px; }
.home-top .ws-name { font: 600 15px var(--f-display); flex: none; }
.home-top .sp { flex: 1; }
.home h2 { margin: 0 0 12px; font: 600 13px var(--f-ui); color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; }
.starts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.start { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 18px; display: grid; gap: 10px; align-content: start; min-height: 150px; position: relative; }
.start:hover { border-color: var(--ink); }
.start .glyph { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); }
.start.prime .glyph { background: var(--accent); color: var(--accent-ink); }
.start b { font: 600 19px/1.15 var(--f-display); letter-spacing: -.015em; }
.start span { color: var(--ink-2); font-size: 13px; }
.start.drop { background: var(--accent-soft); }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.appcard { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.appcard:hover { border-color: var(--ink-3); }
.appcard .cv { height: 92px; position: relative; overflow: hidden; }
.appcard .cv canvas, .appcard .cv img { width: 100%; height: 100%; display: block; object-fit: cover; }
.appcard .bd { padding: 12px 14px 14px; display: flex; gap: 10px; align-items: flex-start; }
.appcard .bd .app-ico { margin-top: -28px; box-shadow: 0 0 0 3px var(--surface); }
.appcard .nm { font: 600 16px/1.2 var(--f-display); letter-spacing: -.01em; }
.appcard .sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.card-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 2; }
.appcard .pin { border: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--surface); color: var(--ink-2); display: grid; place-items: center; opacity: 0; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.appcard .pin:hover { color: var(--ink); }
.appcard:hover .pin, .appcard:focus-within .pin, .appcard .pin.on, .appcard .pin:focus-visible { opacity: 1; } .appcard .pin.on { color: var(--warn); }
@media (hover: none) { .appcard .pin { opacity: 1; } }
.appcard .bd .app-ico { position: relative; z-index: 1; }
.tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tpl { text-align: left; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); padding: 0; display: flex; flex-direction: column; }
.tpl:hover { border-color: var(--ink); }
.tpl .pv { height: 168px; background: var(--surface-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; padding: 12px; }
.tpl .bd { padding: 12px 14px 14px; display: grid; gap: 4px; }
.tpl b { font: 600 17px/1.2 var(--f-display); letter-spacing: -.01em; }
.tpl span { color: var(--ink-2); font-size: 12.5px; }
.pv-gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pv-gal canvas { width: 100%; aspect-ratio: 3 / 4; border-radius: 4px; display: block; }
.pv-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 100%; }
.pv-board > div { background: var(--surface-3); border-radius: 6px; padding: 5px; display: grid; gap: 5px; align-content: start; }
.pv-board i { display: block; height: 26px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-style: normal; font-size: 9.5px; padding: 3px 5px; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pv-board em { font-style: normal; font-size: 9.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.pv-grid { font: 10px var(--f-mono); display: grid; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.pv-grid div { display: grid; grid-template-columns: 44px 1fr 56px 46px; border-bottom: 1px solid var(--line-2); }
.pv-grid span { padding: 4px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-right: 1px solid var(--line-2); color: var(--ink-2); }
.pv-grid div:first-child span { background: var(--surface-2); color: var(--ink-3); }

/* ---------- popovers, modals, toast ---------- */
.pop { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; max-width: min(520px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; padding: 6px; }
.pop.pad { padding: 12px; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 7px 9px; border-radius: 7px; text-align: left; color: var(--ink); min-height: 32px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: 0; }
.menu-item .k { margin-left: auto; color: var(--ink-3); font: 11px var(--f-mono); }
.menu-item.danger { color: var(--bad); }
.menu-item svg.i { color: var(--ink-3); } .menu-item.danger svg.i { color: var(--bad); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 8px 9px 4px; }
.pop h5 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row > .inp, .row > select { width: auto; flex: 1; min-width: 90px; height: 32px; }
.cond { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.cond .conj { width: 56px; font-size: 12px; color: var(--ink-3); text-align: right; flex: none; }
.cond select.conj { text-align: left; color: var(--ink); height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cond .inp { height: 32px; width: auto; flex: 1; min-width: 100px; }
.cgroup { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin: 2px 0 6px; background: var(--surface-2); flex: 1; min-width: 0; }
.fld-list { display: grid; gap: 2px; }
.fld-li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; }
.fld-li:hover { background: var(--surface-2); }
.fld-li .ti { font: 11px var(--f-mono); color: var(--ink-3); width: 16px; text-align: center; }
.fld-li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fld-li .frz-tag { font-size: 10.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.tog { width: 30px; height: 18px; border-radius: 9px; background: var(--line); border: 0; position: relative; padding: 0; flex: none; }
.tog::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: left .12s; }
.tog.on { background: var(--accent); } .tog.on::after { left: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(20, 19, 17, .32); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { width: min(1060px, 100%); } .modal.narrow { width: min(480px, 100%); }
.m-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.m-head h3 { margin: 0; font: 600 18px/1.2 var(--f-display); letter-spacing: -.015em; flex: 1; }
.m-body { padding: 18px 20px; overflow: auto; display: grid; gap: 16px; align-content: start; }
.m-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.m-foot .note { margin-right: auto; color: var(--ink-3); font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80; background: var(--ink); color: var(--surface); padding: 9px 10px 9px 14px; border-radius: 10px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); font-size: 13px; max-width: calc(100vw - 32px); }
.toast button { border: 0; background: none; color: var(--accent-line); font-weight: 600; padding: 2px 6px; border-radius: 6px; }
:root[data-theme="dark"] .toast button { color: var(--accent-ink); }
.bulk { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 12; background: var(--ink); color: var(--surface); border-radius: 12px; padding: 6px 6px 6px 14px; display: flex; gap: 6px; align-items: center; box-shadow: var(--shadow); max-width: calc(100% - 24px); flex-wrap: wrap; }
.bulk .btn { background: transparent; color: var(--surface); border-color: rgba(255,255,255,.18); height: 30px; }
.bulk .btn:hover { background: rgba(255,255,255,.12); }
.bulk .linkbtn { color: var(--accent-line); }
.empty-state { padding: 60px 20px; text-align: center; color: var(--ink-3); display: grid; gap: 10px; justify-items: center; }
.empty-state b { color: var(--ink); font: 600 17px var(--f-display); }

/* import */
.drop { border: 1.5px dashed var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 10px; justify-items: center; text-align: center; background: var(--surface-2); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop b { font: 600 18px var(--f-display); }
.pv-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.pv-table table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.pv-table th, .pv-table td { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px 8px; text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pv-table th { background: var(--surface-2); vertical-align: top; padding: 6px; }
.pv-table th input, .pv-table th select { display: block; width: 100%; min-width: 120px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 0 6px; font-size: 12.5px; }
.pv-table th select { margin-top: 4px; color: var(--ink-2); }
.pv-table td.skip, .pv-table th.skip { opacity: .4; }
.sheet-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sheet-tab { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: var(--surface); }
.sheet-tab.on { border-color: var(--accent); background: var(--accent-soft); }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font: 600 22px var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-3); }
.note-box { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.ok-box { background: var(--good-soft); color: var(--good); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.deps { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; display: grid; gap: 4px; }
.vpick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vp { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.vp:hover, .vp.on { border-color: var(--accent); }
.vp .pvw { height: 92px; background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 8px; overflow: hidden; }
.vp .bd { padding: 8px 10px 10px; display: grid; gap: 2px; }
.vp b { font-weight: 600; display: flex; gap: 6px; align-items: center; } .vp span { font-size: 12px; color: var(--ink-3); }
.mini-grid div { display: flex; gap: 4px; margin-bottom: 4px; } .mini-grid i { height: 12px; flex: 1; background: var(--surface); border: 1px solid var(--line-2); border-radius: 2px; font: 8.5px/10px var(--f-ui); font-style: normal; color: var(--ink-3); overflow: hidden; white-space: nowrap; padding: 0 3px; }
.mini-board { display: flex; gap: 4px; height: 100%; } .mini-board > div { flex: 1; background: var(--surface-3); border-radius: 4px; padding: 3px; display: grid; gap: 3px; align-content: start; }
.mini-board i { display: block; height: 14px; background: var(--surface); border-radius: 2px; font: 8px/14px var(--f-ui); font-style: normal; padding: 0 3px; overflow: hidden; white-space: nowrap; color: var(--ink-2); }
.mini-gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; } .mini-gal i { aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); overflow: hidden; display: block; } .mini-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; } .mini-cal i { height: 13px; background: var(--surface); border-radius: 2px; position: relative; } .mini-cal i.e::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 4px; border-radius: 2px; background: var(--accent); }
.mini-list i { display: block; height: 12px; margin-bottom: 5px; border-bottom: 1px solid var(--line); font: 8.5px/10px var(--f-ui); font-style: normal; color: var(--ink-2); }
.mini-form i { display: block; height: 12px; margin-bottom: 5px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.formula-in { font-family: var(--f-mono); font-size: 13px; min-height: 70px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fx-chips button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 2px 7px; font: 11.5px var(--f-mono); color: var(--ink-2); }
.fx-chips button:hover { border-color: var(--accent); color: var(--accent); }
.fx-out { font: 12.5px var(--f-mono); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.fx-out.bad { background: var(--bad-soft); color: var(--bad); }
.choice-ed { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.choice-ed .sw { width: 22px; height: 22px; border-radius: 6px; border: 0; flex: none; }
.choice-ed .inp { height: 30px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.swatches button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); }
.mobile-only { display: none; }
.scrim-side { display: none; }

@media (max-width: 1000px) {
  .panel { width: 420px; }
  .cal { grid-template-columns: minmax(0, 1fr); } .cal-side { border-left: 0; border-top: 1px solid var(--line); }
  .tpls, .starts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { padding-block: 0; }
  .shell { grid-template-columns: minmax(0, 1fr) !important; }
  .shell > .main { grid-column: 1; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 84vw); z-index: 40; transform: translateX(-105%); transition: transform .18s ease; padding-left: env(safe-area-inset-left, 0px); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: var(--shadow); }
  .shell.side-open .side { transform: none; }
  .shell.side-open .scrim-side { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(20,19,17,.3); }
  .side-resize { display: none; }
  .mobile-only { display: inline-flex; }
  .desk-only { display: none !important; }
  .panel, .panel.open { position: fixed; inset: 0; z-index: 45; width: auto; max-width: none; border: 0; border-radius: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  .side-edge { display: none !important; }
  .top { padding: 8px 10px; min-height: 48px; flex-wrap: wrap; row-gap: 6px; }
  .crumb { flex: 1; max-width: none; }
  .top .vtabs-wrap { order: 5; flex-basis: 100%; margin-left: 0; padding-left: 0; border-left: 0; }
  .bar { padding: 6px 8px; }
  .search { width: auto; flex: 1 1 140px; }
  .bar .lbl { display: none; }
  .home-in { padding: 16px 16px 48px; gap: 26px; }
  .home-top .save, .home-top .lbl { display: none; }
  .starts, .tpls { grid-template-columns: minmax(0, 1fr); }
  .start { min-height: 0; grid-template-columns: 40px 1fr; align-items: center; padding: 14px; gap: 4px 12px; }
  .start .glyph { grid-row: span 2; }
  .start b { font-size: 17px; }
  .g-num { width: 44px; } .g-num input { display: none; }
  .col { flex-basis: 248px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  .cal-grid { grid-auto-rows: minmax(64px, 1fr); }
  .cal-h h2 { min-width: 0; font-size: 16px; }
  .ev { font-size: 10.5px; padding: 1px 3px; }
  .cal-grid { --ev-h: 17px; }
  .vpick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pop.sheet { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); max-width: none; max-height: 72vh; }
  .bulk { bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
[hidden] { display: none !important; }
.cal-grid .ev.span.s { margin-left: 0; width: calc(100% + 5px); }
.cal-grid .ev.span.e { margin-right: 0; width: calc(100% + 5px); }
.cal-grid .ev.span.s.e { width: 100%; }

/* ===== round 2: charts, pivot, timeline, pages, automations, alerts, assistant, roles ===== */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; }

.chart { display: block; overflow: visible; }
.chart .ch-grid { stroke: var(--line-2); stroke-width: 1; }
.chart .ch-base { stroke: var(--line); stroke-width: 1; }
.chart .ch-ax { fill: var(--ink-3); font: 11px var(--f-ui); }
.chart .ch-lbl { fill: var(--ink-2); font: 12px var(--f-ui); }
.chart .ch-big { fill: var(--ink); font: 600 26px var(--f-display); }
.chart .mk { transition: opacity .12s; cursor: pointer; }
.chart:hover .mk { opacity: .8; } .chart .mk:hover { opacity: 1; }
.chart .hit { cursor: pointer; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ch-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12.5px; min-width: 140px; display: grid; gap: 3px; }
.ch-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.ch-tip .dim { font-size: 11px; }
.chart-wrap { max-width: 1040px; margin: 0 auto; padding: 18px 16px 30px; display: grid; gap: 14px; }
.chart-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); position: relative; }
.ch-head { margin-bottom: 10px; } .ch-body { position: relative; min-height: 240px; }
.chart-table summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 4px 0; }
.chart-table .pv-table { margin-top: 8px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pivot { padding: 16px; max-width: 1100px; }
.pivot-t th { text-align: left; } .pivot-t tbody th { background: var(--surface-2); font-weight: 500; }
.pivot-t .pcell { cursor: pointer; font-family: var(--f-mono); font-size: 12.5px; }
.pivot-t .pcell:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.pivot-t tr.tot td, .pivot-t tr.tot th { border-top: 1px solid var(--line); }

.tl { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tl-bar-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tl-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
.tl-left { position: sticky; left: 0; background: var(--surface); border-right: 1px solid var(--line); z-index: 2; min-width: 0; }
.tl-right { overflow-x: auto; min-width: 0; }
.tl-canvas { position: relative; }
.tl-hd { height: 40px; position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); z-index: 3; font-size: 11.5px; color: var(--ink-3); padding: 0 12px; display: flex; align-items: center; }
.tl-canvas .tl-hd { padding: 0; display: block; }
.tl-m { position: absolute; top: 4px; padding-left: 6px; font-weight: 600; color: var(--ink-2); white-space: nowrap; border-left: 1px solid var(--line); }
.tl-d { position: absolute; bottom: 4px; padding-left: 4px; font-family: var(--f-mono); font-size: 10.5px; }
.tl-lanes { position: relative; }
.tl-gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.tl-we { position: absolute; top: 0; bottom: 0; background: var(--surface-2); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 1; }
.tl-row { height: 36px; border-bottom: 1px solid var(--line-2); position: relative; display: flex; align-items: center; padding: 0 12px; min-width: 0; }
.tl-left .tl-row { overflow: hidden; }
.tl-row.tl-grp { background: var(--surface-2); font-weight: 600; gap: 8px; }
.tl-canvas .tl-row { padding: 0; }
.tl-name { color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; padding: 0; font-weight: 400; }
.tl-bar { position: absolute; top: 6px; height: 24px; border: 0; border-radius: 6px; display: flex; align-items: center; padding: 0; font-size: 12px; font-weight: 500; overflow: hidden; cursor: grab; z-index: 2; touch-action: none; }
.tl-bar:active { cursor: grabbing; }
.tl-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; text-align: left; pointer-events: none; }
.tl-h { width: 6px; align-self: stretch; cursor: ew-resize; flex: none; }
.tl-h:hover { background: rgba(0,0,0,.12); }
.tl-nodate { position: absolute; top: 8px; height: 20px; border: 1px dashed var(--line); background: none; border-radius: 6px; font-size: 11.5px; color: var(--ink-3); padding: 0 8px; }
.tl-nodate:hover { border-color: var(--accent); color: var(--accent); }

.pg-scroll { background: var(--surface-2); }
.pg-top { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 7; flex-wrap: wrap; }
.pg-state { font-size: 12px; color: var(--good); } .pg-state.draft { color: var(--warn); }
.pg-palette { display: flex; gap: 6px; padding: 10px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--surface); }
.pg-palette .sug { cursor: grab; }
.pg-canvas { padding: 16px; max-width: 1240px; margin: 0 auto; }
.pg-canvas.phone { max-width: 400px; }
.pg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pg-b { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; position: relative; }
.pg-grid.editing .pg-b { cursor: pointer; border-style: dashed; }
.pg-grid.editing .pg-b:hover { border-color: var(--accent); }
.pg-b.drop { box-shadow: -4px 0 0 var(--accent); }
.pg-b.pgw-heading { background: none; border-color: transparent; padding: 4px 2px 0; }
.pg-grid.editing .pg-b.pgw-heading { border-color: var(--line); }
.pg-heading h2 { margin: 0; font: 600 22px/1.2 var(--f-display); letter-spacing: -.02em; }
.pg-text { color: var(--ink-2); } .pg-text p { margin: 0 0 8px; } .pg-text ul { margin: 0; padding-left: 18px; }
.pg-tools { display: flex; align-items: center; gap: 2px; margin: -6px -6px 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.pg-tools .pg-tname { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); flex: 1; }
.pg-drag { color: var(--ink-3); cursor: grab; display: grid; padding: 2px; }
.pg-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; min-width: 0; }
.pg-h b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pg-metric { width: 100%; border: 0; background: none; text-align: left; padding: 0; display: grid; gap: 4px; cursor: pointer; border-radius: 8px; }
.pg-metric:hover .pg-mv { color: var(--accent); }
.pg-mv { font: 600 34px/1.05 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.pg-ml { font-size: 12.5px; color: var(--ink-2); }
.pg-chart { position: relative; }
.pg-list { display: grid; gap: 2px; }
.pg-li { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 8px; text-align: left; color: var(--ink); min-width: 0; }
.pg-li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pg-li:hover { background: var(--surface-2); }
.pg-li.on { background: var(--accent-soft); color: var(--accent); }
.pg-kv { display: grid; grid-template-columns: minmax(80px, auto) 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.pg-kv dt { color: var(--ink-3); } .pg-kv dd { margin: 0; min-width: 0; overflow: hidden; }
.pg-filter { display: grid; gap: 4px; font-size: 12px; }
.pg-btn { width: 100%; justify-content: center; height: 40px; }
.pg-b.pgw-button, .pg-b.pgw-filter { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.pg-ai { font-size: 13.5px; } .pg-ai ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; } .pg-ai p { margin: 0 0 6px; }
.pg-view { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; position: relative; }
.pg-view .board { padding: 10px; }
@container main (max-width: 700px) { .pg-grid { grid-template-columns: minmax(0, 1fr); } .pg-b { grid-column: span 1 !important; } }

.auto-li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
.auto-main { flex: 1; min-width: 0; text-align: left; border: 0; background: none; display: grid; gap: 2px; padding: 0; color: var(--ink); }
.auto-main .dim { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-last { font-size: 12px; color: var(--ink-3); white-space: nowrap; } .auto-last.failed { color: var(--bad); } .auto-last.ok { color: var(--good); }
.au-step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.au-k { font: 600 13px var(--f-display); color: var(--accent); padding-top: 8px; text-transform: uppercase; letter-spacing: .06em; }
.au-c { display: grid; gap: 8px; min-width: 0; }
.au-act { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; background: var(--surface-2); }
.run { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; font-size: 12.5px; margin-bottom: 6px; }
.run.failed { border-color: var(--bad); } .run .btn { justify-self: start; }

.bell { position: relative; }
.bell .bdg { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font: 600 10px/16px var(--f-mono); padding: 0 4px; }
.menu-item.unread { background: var(--accent-soft); }
.al-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; flex: none; margin-top: 6px; }
.menu-item.unread .al-dot { background: var(--accent); }
.role-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--warn-soft); color: var(--warn); font-size: 13px; border-bottom: 1px solid var(--line); }
.role-banner .btn { margin-left: auto; }
.cmd-list { display: grid; gap: 1px; max-height: 56vh; overflow: auto; }
.cmd-list .menu-item.on { background: var(--accent-soft); }

.ask-btn { color: var(--accent); }
@media (max-width: 760px) {
  .tl-body { grid-template-columns: 130px minmax(0, 1fr); }
  .pg-canvas { padding: 10px; }
  .au-step { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ===== Task list (Asana look, Workflowy behavior) ===== */
.ol { flex: 1; min-height: 0; overflow: auto; position: relative; padding-bottom: 60px; outline: none; }
.ol-top { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ol-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; flex-wrap: wrap; }
.ol-crumbs > span:last-child:not(.dim) { font-weight: 600; }
.ol-tog { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.ol-zoomhead { display: flex; align-items: center; gap: 10px; padding: 22px 18px 6px 22px; }
.ol-zoomhead .ol-check { width: 22px; height: 22px; }
.ol-ztitle { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font: 600 26px/1.2 var(--f-display); letter-spacing: -.02em; color: var(--ink); padding: 2px 4px; border-radius: 6px; }
.ol-ztitle:focus { background: var(--surface-2); }
.ol-zoommeta { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; padding: 0 22px 14px 56px; font-size: 12.5px; }
.ol-head { position: sticky; top: 49px; z-index: 3; display: flex; align-items: center; height: 32px; padding: 0 8px 0 74px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.ol-hname { flex: 1; }
.ol-cols { display: flex; flex: none; }
.ol-hc, .ol-cell { width: 128px; flex: none; text-align: left; }
.ol-hc { padding: 0 10px; border-left: 1px solid var(--line); line-height: 32px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-row { display: flex; align-items: center; min-height: 40px; padding: 0 8px 0 6px; border-bottom: 1px solid var(--line-2); position: relative; background: var(--surface); }
.ol-row:hover, .ol-row:focus-within { background: var(--surface-2); }
.ol-row:focus-within { background: var(--surface-2); }
.ol-row.dragging { opacity: .35; }
.ol-handle { width: 20px; flex: none; display: grid; place-items: center; color: var(--ink-3); cursor: grab; opacity: 0; touch-action: none; align-self: stretch; }
.ol-handle svg.i { width: 14px; height: 14px; }
.ol-row:hover .ol-handle, .ol-row:focus-within .ol-handle { opacity: 1; }
.ol-ind { flex: none; align-self: stretch; width: calc(var(--d, 0) * 24px); background-image: repeating-linear-gradient(90deg, transparent 0 9px, var(--line) 9px 10px, transparent 10px 24px); }
.ol-caret { width: 22px; height: 22px; flex: none; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; padding: 0; border-radius: 5px; transform: rotate(-90deg); transition: transform .12s; }
.ol-caret.open { transform: none; }
.ol-caret.none { visibility: hidden; }
.ol-caret:hover { background: var(--surface-3); color: var(--ink); }
.ol-check { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink-3); background: none; padding: 0; margin: 0 8px 0 2px; position: relative; color: transparent; }
.ol-check::after { content: ""; position: absolute; left: 4.5px; top: 2px; width: 4px; height: 8px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.ol-check:hover { border-color: var(--good); color: var(--good); }
.ol-check.on { background: var(--good); border-color: var(--good); color: #fff; }
.ol-title { flex: 1; min-width: 60px; border: 0; background: none; outline: 0; font: 14px/1.4 var(--f-ui); color: var(--ink); padding: 8px 4px; text-overflow: ellipsis; }
.ol-row.is-done .ol-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.ol-kids { display: inline-flex; align-items: center; gap: 3px; font: 11.5px var(--f-mono); color: var(--ink-3); padding: 0 6px; flex: none; }
.ol-kids svg.i { width: 12px; height: 12px; }
.ol-zoom, .ol-more { width: 28px; height: 28px; flex: none; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; padding: 0; border-radius: 6px; opacity: 0; }
.ol-row:hover .ol-zoom, .ol-row:hover .ol-more, .ol-row:focus-within .ol-zoom, .ol-row:focus-within .ol-more { opacity: 1; }
.ol-zoom:hover, .ol-more:hover { background: var(--surface-3); color: var(--ink); }
.ol-cell { height: 40px; border: 0; border-left: 1px solid var(--line-2); background: none; padding: 0 10px; display: flex; align-items: center; overflow: hidden; color: var(--ink); font-size: 13px; }
.ol-cell:hover { background: var(--surface-3); }
.ol-empty { color: var(--ink-3); opacity: 0; display: grid; } .ol-row:hover .ol-empty { opacity: 1; }
.ol-date { font-size: 13px; } .ol-date.late { color: var(--bad); } .ol-date.today { color: var(--good); font-weight: 500; }
.ol-sec { display: flex; align-items: center; gap: 8px; padding: 20px 14px 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ol-sec b { font: 600 16px var(--f-display); letter-spacing: -.01em; }
.ol-add { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--ink-3); padding: 10px 14px 10px 74px; text-align: left; font-size: 13.5px; }
.ol-add:hover { color: var(--accent); background: var(--surface-2); }
.ol-drop { position: absolute; right: 12px; height: 2px; background: var(--accent); z-index: 6; pointer-events: none; display: none; }
.ol-drop::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); }
.ol-ghost { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--surface); padding: 6px 12px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* outline look: Workflowy-style bullets, no columns */
.ol.outline .ol-row { border-bottom: 0; min-height: 34px; background: transparent; }
.ol.outline .ol-row:hover, .ol.outline .ol-row:focus-within { background: var(--surface-2); }
.ol.outline .ol-title { font-size: 15px; padding: 6px 4px; }
.ol-bullet { width: 22px; height: 22px; flex: none; border: 0; background: none; padding: 0; margin: 0 4px 0 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer; }
.ol-bullet::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); }
.ol-bullet.closed { background: var(--surface-3); }
.ol-bullet:hover { background: var(--line); }
.ol.outline .ol-add { padding-left: 74px; }
.ol.outline .ol-sec { background: transparent; }
@container main (max-width: 760px) { .ol .ol-cols .ol-cell:not(:nth-child(2)), .ol-head .ol-cols .ol-hc:not(:nth-child(2)) { display: none; } .ol-handle { opacity: 1; } .ol-more { opacity: 1; } }
@container main (max-width: 480px) { .ol .ol-cols, .ol-head { display: none; } .ol-zoom { display: none; } }
.bar { flex-wrap: nowrap; }
@container main (max-width: 480px) { .ol-top [data-olkeys], .ol-top [data-expandall], .ol-top [data-collapseall] { display: none; } .ol-top { gap: 6px; } }
/* nested group headers with totals */
.g-group { padding-left: 0 !important; display: flex !important; gap: 0 !important; }
.g-gcell { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 9px; height: 100%; background: inherit; overflow: hidden; white-space: nowrap; }
.g-gcell.r { justify-content: flex-end; font-weight: 500; color: var(--ink-2); font-size: 12.5px; }
.g-gcell.frz { position: sticky; z-index: 2; }
.g-gcell .gl { overflow: hidden; text-overflow: ellipsis; }
.g-group.lv0 { background: var(--surface-3); }
.g-group.lv1 { background: var(--surface-2); font-weight: 500; }
.g-group.lv2 { background: var(--surface); font-weight: 500; }
.g-group:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.g-group:hover .tw { color: var(--ink); }

/* ---------- shared workspace (sync.js) ---------- */
.sy-ws span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save .sy-err { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.save .sy-retry { height: 26px; padding: 0 10px; }
.sy-link { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 14px; display: grid; gap: 8px; background: var(--surface-2); }
.sy-link-t { font-weight: 600; }
.sy-link .row { display: flex; gap: 8px; }
.sy-link .row .inp { flex: 1; min-width: 0; }
.sy-av { width: 28px; height: 28px; font-size: 12px; flex: none; }
.sy-seen { display: block; font-size: 12px; }
.sy-role { width: 140px; height: 32px; flex: none; }
@media (max-width: 560px) {
  .save .sy-err { max-width: 120px; }
  .sy-role { width: 112px; }
  .sy-link .row { flex-direction: column; }
}
.sy-rm { width: 32px; flex: none; display: inline-flex; justify-content: center; }
.sy-add { display: flex; gap: 8px; align-items: center; }
.sy-add #sy-name { flex: 1; min-width: 0; }
.sy-add .btn { flex: none; min-width: 112px; justify-content: center; }
@media (max-width: 560px) { .sy-ws span { max-width: 110px; } .sy-add { flex-wrap: wrap; } .sy-add #sy-name { flex-basis: 100%; } .sy-add .sy-role { flex: 1; width: auto; } }
.fld-li .sy-rm, .fld-li .btn.sy-rm { width: 32px; min-width: 32px; padding: 0; }
.sy-add .sy-role { flex: none; width: 140px; }
@media (max-width: 440px) { .home-top:has(.sy-ws) .ws-name { display: none; } }

/* ---------- review before a run (steps.js) ---------- */
.st-scope { margin: 0 0 12px; font-weight: 500; }
.st-table-wrap { overflow: auto; max-height: 52vh; border: 1px solid var(--line); border-radius: var(--r); }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th, .st-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
.st-table th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; color: var(--ink-2); }
.st-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.st-table tfoot td { border-bottom: 0; background: var(--surface-2); }
.st-warn { color: var(--warn); margin: 10px 0 0; }
.st-bad { color: var(--bad); font-weight: 600; margin: 10px 0 0; }
.st-ok { color: var(--ink-2); margin: 10px 0 0; }
/* page widgets: picker, editable record, waiting state */
.pg-wait { padding: 8px 2px; }
.pg-pick { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.pg-pick-box { flex: 1; min-width: 0; position: relative; }
.pg-pick-box .inp { width: 100%; }
.pg-pick-cur { display: block; margin-top: 6px; font-weight: 600; font-size: 15px; }
.pg-pick-list { position: absolute; left: 0; right: 0; top: 40px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-height: 320px; overflow: auto; padding: 4px; }
.pg-kv-ed dd { display: flex; align-items: center; }
.pg-kv-ed .inp { height: 32px; width: 100%; max-width: 260px; }
.st-check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.st-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; max-height: 220px; overflow: auto; }

/* ---------- Compare view (matrix.js) ---------- */
.mx-top { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.mx-scroll { flex: 1; min-height: 0; }
.mx { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.mx th, .mx td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0; height: 40px; background: var(--surface); }
.mx thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 600; color: var(--ink-2); padding: 0 12px; text-align: center; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.mx .mx-rh { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 500; color: var(--ink); padding: 0 14px; min-width: 200px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface); }
.mx thead .mx-rh { z-index: 3; background: var(--surface-2); color: var(--ink-2); }
.mx-sec th { background: var(--surface-2) !important; color: var(--ink-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; height: 32px; }
.mx-c { min-width: 128px; }
.mx-c.mx-none .mx-in { color: var(--ink-3); }
.mx-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; height: 100%; }
.mx-b { height: 100%; border: 0; background: none; color: var(--ink-3); font-size: 17px; line-height: 1; transition: background .12s, color .12s; }
.mx-b:hover { background: var(--surface-2); color: var(--ink); }
.mx-b:active { background: var(--surface-3); }
.mx-in { width: 100%; height: 100%; border: 0; background: none; text-align: center; font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); outline: 0; padding: 0 6px; }
.mx-in:focus { background: var(--field-focus); box-shadow: none; }
.mx-tot th, .mx-tot td { background: var(--surface-2); font-weight: 600; height: 36px; }
.mx-tot td { padding: 0 12px; text-align: center; }
.mx-empty { padding: 24px !important; color: var(--ink-3); text-align: center; height: auto !important; }
.mx-pick { max-height: 300px; overflow: auto; margin-top: 8px; display: grid; }
.mx-note { font-size: 12px; margin-top: 6px; }
@media (pointer: coarse) { .mx-step { grid-template-columns: 40px minmax(0, 1fr) 40px; } .mx th, .mx td { height: 46px; } }
@media (max-width: 760px) { .mx .mx-rh { min-width: 130px; max-width: 160px; } }
.mx-step { max-width: 164px; margin: 0 auto; }
.mx-none .mx-b[data-d="-1"] { visibility: hidden; }
.st-done { display: grid; justify-items: center; gap: 8px; padding: 18px 8px 8px; text-align: center; }
.st-done .tick { width: 48px; height: 48px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 22px; animation: st-pop .32s cubic-bezier(.2, .8, .2, 1); }
.st-done b { font-size: 17px; }
@keyframes st-pop { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .st-done .tick { animation: none; } }
.pg-metric-wrap { display: grid; gap: 12px; }
.pg-act { width: 100%; justify-content: center; height: 40px; margin-top: 4px; }
.pg-kv + .pg-act { margin-top: 14px; }

/* Active text boxes never get a border, outline or ring (Scott, Nov 4): focus is a soft fill. */
input:focus, textarea:focus, select:focus, [contenteditable]:focus { outline: none; box-shadow: none; }

/* ---------- AI through the Mac helper (mac.js) ---------- */

/* ---------- pages people use every day ---------- */
.pg-top-use { min-height: 0; padding-block: 6px; border-bottom: 0; }
.pg-vsearch { width: 100%; margin: 0 0 10px; }
@media (max-width: 760px) {
  .pg-top-use { display: none; } /* phones: just the page; editing is for a bigger screen */
  .pg-grid > .pg-pin { order: 99; position: sticky; bottom: 8px; z-index: 6; box-shadow: 0 -8px 28px rgba(29, 28, 26, .14); }
  .pg-grid > .pg-pin .pg-metric-wrap { grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
  .pg-grid > .pg-pin .pg-mv { font-size: 24px; }
  .pg-grid > .pg-pin .pg-act { width: auto; margin: 0; padding: 0 14px; }
}

/* ---------- crew screen (crew.js): phone first, big targets ---------- */
.cw { max-width: 640px; margin: 0 auto; min-height: 100%; background: var(--surface); }
.cw-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.cw-who { flex: 1; min-width: 0; display: grid; } .cw-who b { font: 600 18px/1.2 var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-list { padding: 8px 16px 48px; }
.cw-group h2, .cw-done summary { display: flex; align-items: baseline; gap: 8px; font: 600 15px var(--f-ui); margin: 18px 0 8px; }
.cw-done summary { cursor: pointer; list-style: none; color: var(--ink-2); }
.cw-task { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); transition: opacity .2s; }
.cw-task.busy { opacity: .6; }
.cw-chk { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 22px; color: var(--good); display: grid; place-items: center; transition: background .15s, border-color .15s, transform .1s; }
.cw-chk:active { transform: scale(.94); }
.cw-task.cw-is-done .cw-chk { background: var(--good-soft); border-color: transparent; }
.cw-task.cw-is-done .cw-body b { color: var(--ink-3); text-decoration: line-through; }
.cw-body { min-width: 0; display: grid; gap: 4px; align-content: start; } .cw-body b { font-size: 16px; }
.cw-notes, .cw-mine { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; }
.cw-mine { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.cw-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .cw-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cw-acts { display: flex; gap: 8px; margin-top: 6px; } .cw-acts .btn { height: 36px; }
.cw-empty { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 64px 16px; }
.sy-for { flex: none; font-size: 13px; }
.cw-done { text-align: left; }
.cw-done .cw-task { text-align: left; justify-items: stretch; }
.cw-chk { justify-self: start; align-self: start; flex: none; }
.cw-done .cw-acts { justify-content: flex-start; }
.cw-chk { box-sizing: border-box; padding: 0; }
.pg-view-grow { min-height: 120px; }
.pg-view-grow > .scroll { overflow: visible; }
.pg-act .pg-short { display: none; }
@media (max-width: 760px) {
  .pg-grid > .pg-pin .pg-act .pg-long { display: none; }
  .pg-grid > .pg-pin .pg-act .pg-short { display: inline; }
  .pg-grid > .pg-pin .pg-act .pg-long:only-of-type { display: inline; }
}

/* ---------- home with the sidebar ---------- */
.home-main { min-width: 0; height: 100%; overflow-y: auto; }
.home-main .home-in { padding-top: 28px; }
.home-topbar { display: none; }
.nav-item.chat-item .i { color: var(--accent); }
@media (max-width: 760px) {
  .home-topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 4; background: var(--surface); }
  .home-topbar b { font: 600 15px var(--f-display); flex: 1; }
  body { padding-block: 0; }
}
.app-ico.sm { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; flex: none; }
.home-reopen { margin-bottom: -18px; }
.side-foot .save-line { cursor: default; }
.side-foot .save-line:hover { background: none; }
.side-foot .sy-ws span { max-width: none; }

/* suggestion chips: a soft fill, never a dashed accent outline */
.sug { border: 0; background: var(--accent-soft); }
.sug:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }
@media (max-width: 760px) { .side .save .desk-only { display: inline !important; } }
/* a closed sidebar can't be clicked or tabbed into (the edge peek brings it back) */
.shell.side-off:not(.peek) > .side { visibility: hidden; transition: visibility 0s linear .26s; }


/* ---------- Chat (ai.js): a column beside the page, never a card over it ---------- */
:root { --chat-w: 400px; }
.ai-panel { position: fixed; z-index: 48; top: 0; right: 0; bottom: 0; width: var(--chat-w); max-width: 100vw; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) 0;
  transform: translateX(100%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s; }
.ai-panel.open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
#root { transition: margin-right .28s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 1100px) { body.chat-open #root { margin-right: var(--chat-w); } }
@media (max-width: 1099px) { .ai-panel.open { box-shadow: -24px 0 48px -20px rgba(29, 28, 26, .22); } }
@media (max-width: 760px) { .ai-panel { width: 100vw; border-left: 0; padding-left: env(safe-area-inset-left, 0px); } }
@media (prefers-reduced-motion: reduce) { .ai-panel, .ai-panel.open, #root { transition: none; } }

.ai-head { display: flex; align-items: center; gap: 4px; height: 52px; flex: none; padding: 0 10px 0 18px; }
.ai-title { display: flex; align-items: center; gap: 8px; font: 600 15px var(--f-ui); }
.ai-title .i { color: var(--accent); }
.ai-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 16px; }

.ai-empty { margin-top: auto; display: grid; gap: 14px; padding-top: 24px; }
.ai-empty b { font: 600 22px/1.25 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.ai-sugs { display: grid; gap: 2px; }
.ai-sug { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); text-align: left; font-size: 13.5px; line-height: 1.35; transition: background .12s, color .12s; }
.ai-sug span { flex: 1; min-width: 0; }
.ai-sug .i { color: var(--ink-3); opacity: 0; transform: translateX(-4px); transition: opacity .12s, transform .12s; }
.ai-sug:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.ai-sug:hover:not(:disabled) .i { opacity: 1; transform: none; }
.ai-sug:disabled { cursor: default; color: var(--ink-3); }
@media (hover: none) { .ai-sug .i { opacity: 1; transform: none; } }

.ai-msg { font-size: 14px; line-height: 1.55; display: grid; gap: 8px; max-width: 100%; }
.ai-msg.me { justify-self: end; align-self: flex-end; max-width: 85%; background: var(--surface-3); color: var(--ink); padding: 9px 14px; border-radius: 18px 18px 6px 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-text p { margin: 0 0 8px; } .ai-text p:last-child { margin-bottom: 0; } .ai-text ul { margin: 0 0 8px; padding-left: 18px; }
.ai-think { color: var(--ink-3); background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink) 50%, var(--ink-3) 100%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: ai-shimmer 1.6s linear infinite; }
@keyframes ai-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-think { animation: none; -webkit-text-fill-color: currentColor; } }
.ai-acts { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.ai-act { display: flex; gap: 8px; align-items: flex-start; } .ai-act .i { margin-top: 1.5px; width: 15px; height: 15px; color: var(--good); } .ai-act.err .i { color: var(--bad); }
.ai-undo { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; margin-top: 2px; } .ai-undo .i { width: 14px; height: 14px; }

.ai-body > .ai-connect:only-child { margin-top: auto; }
.ai-connect { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.ai-cico { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; color: var(--ink-2); grid-row: span 2; }
.ai-ctext { display: grid; gap: 2px; padding-top: 1px; } .ai-ctext b { font-size: 14px; } .ai-ctext span { color: var(--ink-2); font-size: 13px; }
.ai-connect .btn { grid-column: 2; justify-self: start; margin-top: 8px; }

.ai-form { flex: none; padding: 0 14px 14px; }
.ai-box { display: grid; gap: 2px; padding: 12px 10px 8px 14px; border-radius: 18px; background: var(--surface-2); cursor: text; transition: background .15s; }
.ai-box:focus-within { background: var(--field-focus); }
.ai-box.off { cursor: default; opacity: .7; }
.ai-box textarea { display: block; width: 100%; border: 0; padding: 0 4px 0 0; background: none; resize: none; outline: 0; color: var(--ink); font-size: 14px; line-height: 1.5; min-height: 21px; max-height: 200px; }
.ai-box textarea::placeholder { color: var(--ink-3); }
.ai-row { display: flex; align-items: center; gap: 6px; min-height: 32px; }
.ai-model { height: 28px; max-width: 190px; border: 0; border-radius: 8px; padding: 0 26px 0 8px; margin-left: -6px; background: transparent var(--chev) no-repeat right 8px center / 12px; -webkit-appearance: none; appearance: none; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.ai-model:hover { background-color: var(--surface-3); color: var(--ink); }
.ai-send { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; padding: 0; background: var(--ink); color: var(--surface); transition: background .15s, opacity .15s, transform .1s; }
.ai-send .i { width: 17px; height: 17px; stroke-width: 2; }
.ai-send:active:not(:disabled) { transform: scale(.94); }
.ai-send:disabled { background: var(--surface-3); color: var(--ink-3); cursor: default; }
.ai-sq { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }

/* the sidebar's Chat item: no tag, the spark says it all */
.nav-item.chat-item .cnt { display: none; }

/* a text box with its action inside it (Scott, Nov 4: "action buttons should always be inside their field") */
.in-act { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px 0 12px; border-radius: 10px; background: var(--surface-2); cursor: text; transition: background .15s; }
.in-act:focus-within { background: var(--field-focus); }
.in-act input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; outline: 0; color: var(--ink); text-overflow: ellipsis; }
.in-act input::placeholder { color: var(--ink-3); }
.in-act .btn { flex: none; height: 32px; }
.ai-instant .ai-panel, .ai-instant #root { transition: none !important; }
/* the frame never scrolls sideways, even when focus or code asks it to (overflow: hidden still allows that) */
.shell { overflow: clip; }

/* ---------- pages: pickers that become the record, widgets that wait their turn ---------- */
.pg-grid:not(.editing) > .pg-b.pg-waiting { display: none; }
.pg-grid.editing > .pg-b.pg-waiting { opacity: .7; }
.pk-label { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 6px; }
.pk-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 14px; border-radius: 12px; background: var(--surface-2); cursor: text; transition: background .15s; }
.pk-search:focus-within { background: var(--field-focus); }
.pk-search > .i { color: var(--ink-3); width: 18px; height: 18px; }
.pk-search input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; outline: 0; font-size: 16px; color: var(--ink); }
.pk-search input::placeholder { color: var(--ink-3); }
.pk-search .btn { flex: none; height: 36px; }
.pg-pick .pg-pick-list { top: 54px; }
.pk-chosen { display: flex; align-items: flex-start; gap: 12px; }
.pk-head { flex: 1; min-width: 0; }
.pk-title { font: 600 26px/1.15 var(--f-display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-tools { display: flex; gap: 2px; align-items: center; flex: none; }
.pk-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pk-fact { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; min-width: 0; }
.pk-fk { color: var(--ink-3); }
.pk-fv { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; }
.pk-chosen + .pg-kv { margin-top: 14px; }
.pk-start { display: grid; gap: 4px; }
.pk-start .pk-label { margin-bottom: 2px; }
.pk-go { height: 44px; justify-content: center; font-size: 14.5px; margin-top: 4px; }
.pk-choices { display: grid; gap: 4px; }
.pk-choice { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-align: left; font-weight: 500; transition: background .12s; }
.pk-choice span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-choice .i { color: var(--ink-3); }
.pk-choice:hover { background: var(--surface-3); }
.pk-choice.pk-add { background: none; color: var(--ink-2); font-weight: 400; }
.pk-choice.pk-add:hover { background: var(--surface-2); color: var(--ink); }
.pg-acts { display: grid; gap: 8px; margin-top: 4px; }
.pg-acts .pg-act, .pg-acts .pg-act2 { width: 100%; justify-content: center; height: 40px; margin: 0; }
.pg-kv + .pg-acts { margin-top: 14px; }
/* lists inside a page use the card's width, lined up with its title */
.pg-view .list { max-width: none; margin: 0; padding: 0 0 4px; }
.pg-view .list .li-group:first-child { padding-top: 4px; }
@media (max-width: 760px) {
  .pk-title { font-size: 22px; }
  .pg-grid > .pg-pin .pg-acts { grid-auto-flow: column; gap: 6px; }
  .pg-grid > .pg-pin .pg-acts .pg-act, .pg-grid > .pg-pin .pg-acts .pg-act2 { width: auto; padding: 0 12px; }
  .pg-grid > .pg-pin .pg-act2 .pg-long { display: none; }
  .pg-grid > .pg-pin .pg-act2 .pg-short { display: inline; }
}

/* ---------- guided pages (pages.js renderSteps): one column, one step at a time ---------- */
.st-scroll { background: var(--bg); display: flex; flex-direction: column; }
.st { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 24px 32px; display: grid; gap: 14px; flex: 1 0 auto; align-content: start; }
.st-head { display: flex; align-items: center; gap: 12px; }
.st-head h1 { flex: 1; margin: 0; font: 600 30px/1.1 var(--f-display); letter-spacing: -.025em; }
.st-track { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.st-t { display: grid; gap: 8px; min-width: 0; }
.st-tb { height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .3s; }
.st-t-done .st-tb { background: var(--ink); }
.st-t-current .st-tb { background: var(--accent); }
.st-tl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tl .i { width: 14px; height: 14px; stroke-width: 2.2; color: var(--ink); flex: none; }
.st-n { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px var(--f-ui); background: var(--surface-3); color: var(--ink-3); flex: none; }
.st-t-done .st-tl { color: var(--ink-2); }
.st-t-current .st-tl { color: var(--ink); font-weight: 600; }
.st-t-current .st-n { background: var(--accent); color: var(--accent-ink); }
.st-list { display: grid; gap: 12px; }
.st-step { border: 0; border-radius: 20px; padding: 24px; background: var(--surface); }
.st-step.is-current { box-shadow: 0 1px 2px rgba(29, 28, 26, .06), 0 18px 48px -18px rgba(29, 28, 26, .22); animation: st-rise .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes st-rise { from { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .st-step.is-current { animation: none; } }
.st-step.is-done { padding: 16px 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.st-q { margin: 0 0 4px; font: 600 22px/1.2 var(--f-display); letter-spacing: -.015em; }
.st-q:empty { display: none; }
.st-hint { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.st-step.is-current .st-q + .pg-body, .st-step.is-current .st-q + .st-hint { margin-top: 0; }
.st-step.is-current .st-q:not(:empty) ~ .pg-body > .pk-label, .st-step.is-current .st-q:not(:empty) ~ .pg-body > .pk-start > .pk-label { display: none; }
.st-step.is-current .st-q:not(:empty) ~ .pg-body > .pg-h b { visibility: hidden; }
.st-step.is-current .pg-body { margin-top: 14px; }
.st-step.is-current .st-hint + .pg-body { margin-top: 0; }
.st-step.is-done .pk-title { font-size: 19px; }
.st-step.is-done .pk-label { margin-bottom: 2px; }
.st-step.is-done .pk-facts { margin-top: 10px; gap: 6px; }
.st-step.is-done .pk-fact { height: 26px; font-size: 12.5px; }
.st-step.is-done .pg-kv-ed { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; margin-top: 12px; }
.st-step.is-done .pg-kv-ed > .pg-kvi { display: grid; gap: 4px; align-content: start; min-width: 0; }
.st-step.is-done .pg-kv-ed dt { font-size: 12px; }
.st-step.is-done .pg-kv-ed .inp { max-width: none; }
.st-step .pg-view { height: auto !important; }
.st-step .pg-view > .scroll { overflow: visible; }
/* the bar: total + next move, floating at the bottom of the page */
.st-bar { position: sticky; bottom: 0; z-index: 5; padding: 0 24px calc(16px + env(safe-area-inset-bottom, 0px)); margin-top: auto; pointer-events: none; }
.st-barin { pointer-events: auto; max-width: 760px; margin: 0 auto; border: 0; border-radius: 18px; padding: 12px 12px 12px 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); box-shadow: 0 0 0 1px var(--line-2), 0 18px 44px -12px rgba(29, 28, 26, .28); }
.st-barin .pg-metric-wrap { display: flex; align-items: center; gap: 16px; }
.st-barin .pg-metric { width: auto; flex: 1; min-width: 0; gap: 1px; }
.st-barin .pg-mv { font-size: 24px; }
.st-barin .pg-ml { font-size: 12px; }
.st-barin .pg-acts { display: flex; gap: 8px; margin: 0; }
.st-barin .pg-acts .pg-act, .st-barin .pg-acts .pg-act2 { width: auto; height: 44px; padding: 0 18px; border-radius: 12px; }
.st-barin .pg-act2 { order: -1; }
@media (max-width: 760px) {
  .st { padding: 20px 14px 20px; gap: 10px; }
  .st-head h1 { font-size: 24px; }
  .st-head .btn { display: none; }
  .st-track { margin-bottom: 6px; }
  .st-tl { font-size: 11.5px; }
  .st-tl .st-n { display: none; }
  .st-step { padding: 18px 16px; border-radius: 16px; }
  .st-step.is-done { padding: 14px 16px; }
  .st-q { font-size: 20px; }
  .st-step.is-done .pg-kv-ed { grid-template-columns: minmax(0, 1fr); }
  .st-bar { padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .st-barin { padding: 10px 10px 10px 16px; }
  .st-barin .pg-mv { font-size: 20px; }
  .st-barin .pg-act .pg-long, .st-barin .pg-act2 .pg-long { display: none; }
  .st-barin .pg-act .pg-short, .st-barin .pg-act2 .pg-short { display: inline; }
  .st-barin .pg-acts .pg-act, .st-barin .pg-acts .pg-act2 { padding: 0 14px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-step.is-current { box-shadow: 0 0 0 1px var(--line), 0 18px 48px -18px rgba(0, 0, 0, .6); } :root:not([data-theme="light"]) .st-barin { box-shadow: 0 0 0 1px var(--line), 0 18px 44px -12px rgba(0, 0, 0, .6); } }
:root[data-theme="dark"] .st-step.is-current { box-shadow: 0 0 0 1px var(--line), 0 18px 48px -18px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .st-barin { box-shadow: 0 0 0 1px var(--line), 0 18px 44px -12px rgba(0, 0, 0, .6); }
.pg-act2 .pg-short { display: none; }
.pg-pick > .pk-search { flex: 1; min-width: 0; }
.main:has(.st-scroll) .top .crumb h1 { display: none; }
.st-barin { max-width: 712px; }
.st-step .pgw-view > .pg-h, .st-step.pgw-view .pg-body > .pg-h { display: none; }
.st-step .pg-vsearch { height: 44px; border: 0; border-radius: 12px; background: var(--surface-2); padding: 0 14px; margin-bottom: 8px; }
.st-step .pg-vsearch:focus-within { background: var(--field-focus); }
.st-step .pg-vsearch input { font-size: 15px; }
.st-step .pg-kv-ed .inp { border: 0; background-color: var(--surface-2); height: 36px; border-radius: 10px; }
.st-step .pk-go { margin-top: 10px; }
@media (max-width: 760px) { .st-barin { max-width: none; } }
/* the checklist inside a guided step: no second frame, big round counters, counted rows stand out */
.st-step .pg-view { border: 0; border-radius: 0; overflow: visible; }
.st-step .list .li-group { padding: 18px 0 8px; font-size: 13px; }
.st-step .list .li-group:first-child { padding-top: 6px; }
.st-step .list .li { padding: 12px 12px; margin: 0 -12px; border-bottom: 0; border-radius: 12px; gap: 14px; transition: background .15s; }
.st-step .list .li + .li { box-shadow: 0 -1px 0 var(--line-2); }
.st-step .list .li:hover { background: var(--surface-2); box-shadow: none; }
.st-step .list .li:hover + .li { box-shadow: none; }
.st-step .list .li.li-has { background: var(--accent-soft); box-shadow: none; }
.st-step .list .li.li-has + .li { box-shadow: none; }
.st-step .list .li .tx b { font-size: 15px; font-weight: 500; }
.st-step .list .li.li-has .tx b { font-weight: 600; }
.st-step .fx-step { display: inline-flex; align-items: center; gap: 4px; }
.st-step .fx-step-b { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0; transition: background .12s, transform .1s; }
.st-step .fx-step-b:hover:not(:disabled) { background: var(--surface-3); }
.st-step .fx-step-b:active:not(:disabled) { transform: scale(.92); }
.st-step .fx-step-b:disabled { opacity: 0; pointer-events: none; }
.st-step .li-has .fx-step-b { background: var(--surface); }
.st-step .fx-step-b[data-step="1"] { background: var(--ink); color: var(--surface); }
.st-step .fx-step-b[data-step="1"]:hover { background: color-mix(in srgb, var(--ink) 85%, var(--surface)); }
.st-step .fx-step-n { min-width: 24px; text-align: center; font: 600 16px var(--f-ui); }
.st-step .fx-step-n:empty { min-width: 0; }
/* counters: soft circles; the counted rows carry the colour */
.st-step .fx-step-b[data-step="1"] { background: var(--surface-2); color: var(--ink); }
.st-step .fx-step-b[data-step="1"]:hover { background: var(--surface-3); }
.st-step .li-has .fx-step-b, .st-step .li-has .fx-step-b[data-step="1"] { background: var(--surface); color: var(--ink); }
.st-step .li-has .fx-step-b:hover { background: color-mix(in srgb, var(--surface) 80%, var(--ink) 8%); }
.st-cap { display: none; margin: -6px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
@media (max-width: 760px) {
  .st-track { margin-bottom: 4px; gap: 4px; }
  .st-tl { display: none; }
  .st-cap { display: block; margin: 0 0 6px; }
}
.chk.radio { border-radius: 50%; }

/* ---------- budget as one bar (record widget with a meter) ---------- */
.mt { display: grid; gap: 12px; }
.mt-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mt-v { font: 600 30px/1.1 var(--f-display); letter-spacing: -.02em; }
.mt-l { color: var(--ink-2); font-size: 14px; }
.mt-bar { display: flex; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.mt-seg { height: 100%; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.mt-seg + .mt-seg { box-shadow: -2px 0 0 var(--surface); }
.mt-ink { background: var(--ink); } .mt-accent { background: var(--accent); }
.mt-keys { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.mt-k { display: inline-flex; align-items: center; gap: 6px; } .mt-k b { color: var(--ink); font-weight: 600; }
.mt-k i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mt-of { margin-left: auto; }
.pg-over { color: var(--bad); font-weight: 600; }

/* ---------- list rows: group totals, a store link, a tick ---------- */
.li-group .li-gtot { margin-left: auto; font-weight: 600; color: var(--ink); }
.li-gempty { color: var(--warn); }
.li-open { flex: none; height: 32px; text-decoration: none; color: var(--ink); }
.li-tick { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border: 0; border-radius: 17px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.li-tick .i { width: 15px; height: 15px; stroke-width: 2.2; opacity: .35; }
.li-tick:hover { background: var(--surface-3); color: var(--ink); }
.li-tick.on { background: var(--good-soft); color: var(--good); } .li-tick.on .i { opacity: 1; }
.li .tr .num { font-weight: 600; color: var(--ink); font-size: 14px; }

/* ---------- guided pages: flat sections after the current one, info sections, the button-only bar ---------- */
.st-step.is-open { box-shadow: 0 0 0 1px var(--line-2); }
.st-step.is-info { padding: 20px 24px; }
.st-step.is-info .pg-h { display: none; }
.st-barin { display: flex; align-items: center; gap: 12px; }
.st-barin > .pg-body { flex: 1; min-width: 0; }
.st-barx { display: flex; gap: 8px; flex: none; }
.st-barx:empty { display: none; }
.st-bb.pg-b { border: 0; padding: 0; background: none; border-radius: 0; box-shadow: none; }
.st-bb.pg-waiting { display: none; }
.st-bb .pg-btn { height: 44px; padding: 0 16px; border-radius: 12px; width: auto; }
.st-barbtns { justify-content: space-between; }
.st-barlbl { font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) {
  .mt-v { font-size: 24px; }
  .mt-of { margin-left: 0; }
  .st-barbtns .st-barlbl { display: none; }
  .st-barx { flex: 1; } .st-bb { flex: 1; } .st-bb .pg-btn { width: 100%; justify-content: center; padding: 0 10px; }
  .li .li-open { width: 36px; padding: 0; justify-content: center; gap: 0; } .li .li-open .li-ol { display: none; }
}
/* starting a template: your own data, or sample data */
.ts-blurb { margin: 0 0 14px; color: var(--ink-2); }
.ts-opts { display: grid; gap: 8px; }
.ts-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px 14px 12px; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--ink); text-align: left; transition: background .15s; }
.ts-opt:hover { background: var(--surface-3); }
.ts-opt > .i { color: var(--ink-3); flex: none; }
.ts-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.ts-main .ts-ic { background: var(--accent); color: var(--accent-ink); }
.ts-tx { flex: 1; min-width: 0; display: grid; gap: 2px; } .ts-tx b { font-size: 15px; } .ts-tx span { color: var(--ink-2); font-size: 13px; }

/* ---------- review and approve (steps.js): the total, the budget, then the lines ---------- */
.rv-sum { display: grid; gap: 4px; padding: 4px 0 18px; }
.rv-total { font: 600 40px/1.05 var(--f-display); letter-spacing: -.025em; }
.rv-scope { color: var(--ink-2); font-size: 14px; }
.rv-parts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); } .rv-parts b { color: var(--ink); font-weight: 600; }
.rv-budget { display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); margin-bottom: 18px; }
.rv-bh { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; } .rv-bh span { color: var(--ink-2); } .rv-bh span b { color: var(--ink); }
.rv-budget .mt-bar { background: var(--surface-3); }
.rv-bad { background: var(--bad); }
.rv-over .rv-bh span, .rv-over .rv-bh span b { color: var(--bad); }
.rv-why { margin: 0; color: var(--bad); font-size: 13px; }
.rv-lines { display: grid; }
.rv-gh { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0 6px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); } .rv-gh b { color: var(--ink); font-weight: 600; }
.rv-l { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.rv-ln { flex: 1; min-width: 0; display: grid; } .rv-ln b { font-weight: 500; } .rv-ln span { color: var(--ink-3); font-size: 12.5px; }
.rv-lt { font-weight: 600; white-space: nowrap; }
.rv-go { min-width: 180px; height: 44px; font-size: 14.5px; border-radius: 12px; justify-content: center; }
@media (max-width: 760px) { .rv-total { font-size: 32px; } .rv-go { min-width: 0; flex: 1; } }
.imp-where { margin-left: auto; font-size: 12px; white-space: nowrap; }
/* link buttons in the record panel: a soft fill, never a dashed outline */
.opt-btn { border: 0; background: var(--surface-2); color: var(--ink-2); height: 28px; border-radius: 14px; padding: 0 12px; }
.opt-btn:hover { background: var(--surface-3); color: var(--ink); }
.p-id { font-family: var(--f-ui); }
.p-copied { color: var(--good); }

/* numbers in the everyday screens: the reading font with lined-up digits, never the typewriter face */
.mt .num, .rv-sum .num, .rv-budget .num, .rv-lines .num, .li .tr .num, .li-gtot, .pg-mv, .st-barin .num { font-family: var(--f-ui); font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* list dividers inside a step: straight lines inset to the text */
.st-step .list .li + .li { box-shadow: none; background-image: linear-gradient(var(--line-2), var(--line-2)); background-size: calc(100% - 24px) 1px; background-position: 12px 0; background-repeat: no-repeat; }
.st-step .list .li:hover, .st-step .list .li:hover + .li, .st-step .list .li.li-has, .st-step .list .li.li-has + .li { background-image: none; }
.st-step .list .li:hover { background-color: var(--surface-2); }
.st-step .list .li.li-has { background-color: var(--accent-soft); }
.st-step .pg-view-grow { min-height: 0; }
/* the header's actions on a guided page without a main number */
.st-hx { display: flex; gap: 8px; } .st-hx .pg-btn { height: 38px; width: auto; border-radius: 10px; }
@media (max-width: 760px) { .st-head { flex-wrap: wrap; } .st-hx { order: 3; width: 100%; } .st-hx .st-bb { flex: 1; } .st-hx .pg-btn { width: 100%; justify-content: center; } }
/* a linked name that doesn't fit ends with … */
.ch-row .lnk { max-width: 100%; } .lnk > .linkbtn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* crew phone screen: the circle shows what tapping it does */
.cw-chk:not(.cw-is-done .cw-chk)::after { content: "✓"; color: var(--ink-3); opacity: .35; font-size: 20px; }
.cw-chk:hover { border-color: var(--good); }
.cw-group h2 { font: 600 17px var(--f-display); }

/* import: the same value for every row */
.imp-fills { display: grid; gap: 8px; margin-bottom: 12px; }
.imp-fill { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.imp-fill > span { font-weight: 600; flex: 1; }
.imp-fill select { width: auto; min-width: 220px; }
/* a fresh start's first step */
.pk-emptyp { margin: 0 0 12px; color: var(--ink-2); }
.pk-emptyb { display: flex; gap: 8px; flex-wrap: wrap; } .pk-emptyb .pk-go { flex: 1; min-width: 200px; }

.li-empty { padding: 18px 0 8px; color: var(--ink-3); }
.mt-none { gap: 8px; justify-items: start; } .mt-none .mt-l { margin: 0; } .mt-none .btn { margin-top: 4px; }
.rv-fix { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* label/value pairs: each pair is one block; in a plain list it lays out as two columns */
.pg-kv > .pg-kvi { display: contents; }
.st-step.is-done .pg-kv-ed > .pg-kvi { display: grid; }
