/* =============================================================================
   MUSE · Overview explorations — INTEGRATED styles (consumed by Muse.ovx)
   Namespaced under .ovx / .ox-* / .v-* so nothing collides with the app sheets.
   Rendered inside .thread__inner when the Overview is open.
   ========================================================================== */

.ovx { color: var(--ink); }
.ovx-empty { padding: 60px 20px; text-align: center; color: var(--ink-low); font: 400 14px/1.6 var(--font-ui); }
.ovx h1 { margin: 0; font: 600 27px/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.ox-sub { margin: 6px 0 0; font: 400 13.5px/1.5 var(--font-ui); color: var(--ink-mid); max-width: 560px; }
.ox-eyebrow { display: block; font: 600 10.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 10px; }
.ox-meta { font: 400 12px/1.3 var(--font-mono); color: var(--ink-low); }
.ox-count { font: 600 11px/1 var(--font-mono); color: var(--ink-low); background: var(--sunken); padding: 3px 7px; border-radius: var(--r-pill); margin-left: 2px; }

.ox-chip { display: inline-flex; align-items: center; gap: 4px; flex: none; font: 600 11px/1 var(--font-ui); letter-spacing: .01em; padding: 5px 9px; border-radius: var(--r-pill); background: var(--sunken); color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ox-chip .icon { width: 12px; height: 12px; }
.ox-chip--wip { color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.ox-chip--done { color: var(--ink-2); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.ox-chip--core { color: var(--muse); background: var(--muse-soft); box-shadow: none; font-weight: 500; }

.ox-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 600 13px/1 var(--font-ui); color: var(--ink-2); padding: 10px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.ox-btn:hover { background: var(--hover-strong); transform: translateY(-1px); }
.ox-btn .icon { width: 15px; height: 15px; }
.ox-btn--primary { color: var(--on-accent); background: var(--accent); border-color: transparent; box-shadow: var(--sh-accent); }
.ox-btn--primary:hover { background: var(--accent-hi); }
.ox-btn--lg { font-size: 14px; padding: 13px 20px; }

.ox-bar { display: block; position: relative; width: 100%; height: 7px; border-radius: var(--r-pill); background: var(--sunken); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-soft); flex: none; }
.ox-bar__fill { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent-lo), var(--accent)); }
.ox-bar--sm { height: 5px; }
.blend-row__prog .ox-bar, .b1-resume__foot .ox-bar { flex: 1; width: auto; }

.ox-spine { display: flex; align-items: flex-start; gap: 0; width: 100%; }
.ox-spine__step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; }
.ox-spine__step::before { content: ""; position: absolute; top: 4px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.ox-spine__step:first-child::before { display: none; }
.ox-spine__step.is-past::before, .ox-spine__step.is-now::before { background: var(--accent); }
.ox-spine__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sunken); box-shadow: inset 0 0 0 1.5px var(--line-strong); z-index: 1; }
.ox-spine__step.is-past .ox-spine__dot { background: var(--accent); box-shadow: none; }
.ox-spine__step.is-now .ox-spine__dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ox-spine__lbl { font: 500 9.5px/1 var(--font-mono); color: var(--ink-low); text-transform: uppercase; letter-spacing: .04em; }
.ox-spine__step.is-now .ox-spine__lbl { color: var(--accent); }
.ox-spine__step.is-past .ox-spine__lbl { color: var(--ink-mid); }

.ox-thumbs { display: inline-flex; align-items: center; gap: 6px; }
.ox-thumb { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none; background: var(--sunken); color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ox-thumb .icon { width: 15px; height: 15px; }
.ox-thumb--html { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.ox-thumb--image { background: var(--muse-soft); color: var(--muse); box-shadow: none; }
.ox-thumb--more { font: 600 11px/1 var(--font-mono); color: var(--ink-low); }

.blend-head { margin-bottom: 22px; }
.blend-head h1 { margin: 0; font: 600 var(--h2)/1.1 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.blend-sec__h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 600 13px/1 var(--font-ui); color: var(--ink-2); letter-spacing: .01em; }

/* ═══ S1 · CONTINUE HERO ═══ */
.v-s1 { display: flex; flex-direction: column; gap: 26px; }
.s1-hero { display: grid; grid-template-columns: 1fr 300px; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--line-soft); }
.s1-hero__body { padding: 40px 40px 34px; min-width: 0; }
.s1-hero__title { font-size: 40px; line-height: 1.05; margin-bottom: 16px; }
.s1-hero__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.s1-hero__snippet { margin: 0 0 28px; font: 400 16px/1.6 var(--font-ui); color: var(--ink-2); max-width: 60ch; padding-left: 16px; border-left: 3px solid var(--accent-soft); }
.s1-hero__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.s1-hero__side { background: var(--canvas-2); border-left: 1px solid var(--line); padding: 36px 28px; display: flex; flex-direction: column; gap: 18px; }
.s1-prog__top { display: flex; align-items: baseline; justify-content: space-between; font: 600 13px/1 var(--font-ui); color: var(--ink-2); }
.s1-prog__top span:last-child { font: 600 20px/1 var(--font-display); color: var(--accent); }
.s1-prog__left { font: 400 12px/1.4 var(--font-mono); color: var(--ink-low); margin-top: 2px; }
.s1-recents__h { font: 600 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-low); margin-bottom: 12px; }
.s1-recents__row { display: flex; gap: 10px; flex-wrap: wrap; }
.s1-pill { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 14px; border-radius: var(--r-pill); background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--line-soft); transition: background var(--dur-fast), transform var(--dur-fast); }
.s1-pill:hover { background: var(--hover); transform: translateY(-1px); }
.s1-pill__title { font: 600 13px/1 var(--font-ui); color: var(--ink-2); }
.s1-pill__meta { font: 400 11px/1 var(--font-mono); color: var(--ink-low); }
.s1-pill .icon { width: 13px; height: 13px; color: var(--ink-faint); }

/* ═══ S2 · SINGLE STREAM ═══ */
.v-s2 { max-width: 780px; margin: 0 auto; }
.s2-head { margin-bottom: 24px; }
.s2-list { list-style: none; margin: 0; padding: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-soft); }
.s2-row { display: flex; align-items: center; gap: 18px; padding: 20px 22px; cursor: pointer; background: var(--surface); border-bottom: 1px solid var(--line-soft); transition: background var(--dur-fast) var(--ease-out); }
.s2-row:last-child { border-bottom: 0; }
.s2-row:hover { background: var(--hover); }
.s2-row.is-recent { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.s2-row__lead { flex: 1; min-width: 0; }
.s2-row__title { display: flex; align-items: center; gap: 10px; font: 600 17px/1.3 var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2-tag { flex: none; font: 600 9.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); padding: 4px 7px; border-radius: var(--r-pill); }
.s2-row__meta { font: 400 12.5px/1.3 var(--font-mono); color: var(--ink-low); margin-top: 5px; }
.s2-row__cta { display: inline-flex; align-items: center; gap: 5px; flex: none; opacity: 0; font: 600 12.5px/1 var(--font-ui); color: var(--accent); transition: opacity var(--dur-fast); }
.s2-row__cta .icon { width: 14px; height: 14px; }
.s2-row:hover .s2-row__cta, .s2-row.is-recent .s2-row__cta { opacity: 1; }

/* ═══ S3 · SPOTLIGHT + DECK ═══ */
.v-s3 { display: flex; flex-direction: column; gap: 26px; }
.s3-spot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 44px; border-radius: var(--r-xl); background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--line-soft); }
.s3-spot__title { font-size: 38px; line-height: 1.05; margin: 4px 0 16px; }
.s3-spot__snippet { margin: 0 0 18px; font: 400 16px/1.6 var(--font-ui); color: var(--ink-2); max-width: 54ch; }
.s3-spot__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.s3-spot__r { display: flex; flex-direction: column; align-items: center; gap: 20px; flex: none; }
.s3-spot__ring { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--sunken) 0); position: relative; }
.s3-spot__ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.s3-spot__pct { position: relative; font: 600 32px/1 var(--font-display); color: var(--ink); }
.s3-spot__pct i { font-size: 15px; font-style: normal; color: var(--ink-low); }
.s3-spot__stage { position: relative; font: 500 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-low); margin-top: 4px; }
.s3-deck__h { font: 600 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-low); }
.s3-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.s3-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); cursor: pointer; box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); display: flex; flex-direction: column; gap: 10px; transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.s3-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md), inset 0 0 0 1px var(--line); }
.s3-card__title { font: 600 14.5px/1.35 var(--font-ui); color: var(--ink); }
.s3-card__meta { font: 400 11.5px/1 var(--font-mono); color: var(--ink-low); flex: 1; }

/* ═══ BLENDED — shared row ═══ */
.blend-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r-md); cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.blend-row:hover { background: var(--hover); }
.blend-row__id { flex: 1; min-width: 0; }
.blend-row__title { font: 600 14px/1.3 var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blend-row__meta { font: 400 11.5px/1.3 var(--font-mono); color: var(--ink-low); margin-top: 3px; }
.blend-row__prog { display: flex; align-items: center; gap: 9px; width: 140px; flex: none; }
.blend-row__pct { font: 600 11.5px/1 var(--font-mono); color: var(--ink-mid); flex: none; width: 30px; text-align: right; }
.blend-row__next { display: inline-flex; align-items: center; gap: 5px; flex: none; font: 600 12px/1 var(--font-ui); color: var(--accent); white-space: nowrap; }
.blend-row__next .icon { width: 13px; height: 13px; }
.blend-row__check { color: var(--ink-mid); display: grid; place-items: center; flex: none; }
.blend-row__check .icon { width: 20px; height: 20px; }

/* ═══ B1 · BENTO ═══ */
.b1-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.b1-resume { grid-column: span 2; grid-row: span 2; padding: 24px; border-radius: var(--r-lg); background: radial-gradient(120% 130% at 0% 0%, var(--accent-soft), transparent 55%), var(--surface); box-shadow: var(--sh-md), inset 0 0 0 1px var(--line-soft); display: flex; flex-direction: column; cursor: pointer; }
.b1-resume__title { font: 600 var(--h3)/1.15 var(--font-display); letter-spacing: -0.01em; color: var(--ink); margin-bottom: 10px; }
.b1-resume__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.b1-resume__foot { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.ox-statcard { padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft), inset 0 1px 0 rgba(255,255,255,.03); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 132px; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.ox-statcard:hover { transform: translateY(-2px); box-shadow: var(--sh-md), inset 0 0 0 1px var(--line); }
/* Files is the umbrella count, so it takes the full width of the tile block */
.ox-statcard--wide { grid-column: span 2; }
.ox-statcard__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ox-statcard__ico .icon { width: 17px; height: 17px; }
.ox-statcard__body { display: flex; flex-direction: column; min-width: 0; }
.ox-statcard__n { font: 600 36px/1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ox-statcard__l { font: 500 13px/1.2 var(--font-ui); color: var(--ink-2); margin-top: 6px; }
.ox-statcard__sub { font: 400 10.5px/1.3 var(--font-mono); color: var(--ink-low); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b1-col { grid-column: span 2; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); }
/* v3: hero foot holds file thumbs + the CTA (no fake progress bar) */
.v-b1 .b1-resume__foot { justify-content: space-between; gap: 12px; }

/* HERO RECAP — the last exchange. `margin-bottom:auto` moved here from the meta
   line, so the recap follows the title and the foot still pins to the base. */
.b1-recap { margin: 20px 0 auto; display: flex; flex-direction: column; gap: 10px; max-width: 62ch; }
.b1-recap__line { display: flex; gap: 10px; margin: 0; font: 400 12.5px/1.5 var(--font-ui); color: var(--ink-mid); }
.b1-recap__who { flex: none; width: 36px; font: 600 9.5px/1.9 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.b1-recap__txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b1-recap__line--muse .b1-recap__who { color: var(--accent); }
.b1-recap__line--muse .b1-recap__txt { color: var(--ink-2); }
/* v3: panel header with subtitle */
.b1-col__head { margin-bottom: 16px; }
.b1-col__head .blend-sec__h { margin-bottom: 4px; }
.b1-col__sub { margin: 0; font: 400 11.5px/1.4 var(--font-ui); color: var(--ink-low); }
/* Both bottom panels share a height (grid stretch). Paging bounds each list, so
   the column is a flex stack: the list takes the slack and the pager pins to the
   bottom, which keeps the two pagers on the same baseline. */
.v-b1 .b1-col { display: flex; flex-direction: column; }
.b1-convos, .b1-files { flex: 1; align-content: start; }
.b1-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.b1-pager__txt { font: 400 10.5px/1 var(--font-mono); color: var(--ink-faint); }
.b1-pager__nav { display: flex; gap: 5px; }
.b1-pager__btn { width: 27px; height: 27px; display: grid; place-items: center; cursor: pointer; border: 0; border-radius: 8px; color: var(--ink-mid); background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.b1-pager__btn:hover:not([disabled]) { background: var(--hover); color: var(--ink); }
.b1-pager__btn:active:not([disabled]) { transform: translateY(1px); }

/* ── first-run / empty Overview ──────────────────────────────────────────────
   A designed placeholder: a faint skeleton echo of the bento fades down into the
   invitation, so the screen previews what it becomes instead of reading as broken. */
.v-b1--empty .b1-empty { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 24px 44px; min-height: 400px; }
.b1-empty__art {
  width: 100%; max-width: 720px;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 30px; gap: 12px;
  opacity: .55; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 34%, transparent 90%);
          mask-image: linear-gradient(180deg, #000 0%, #000 34%, transparent 90%);
}
.b1-empty__ghost { position: relative; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft); }
.b1-empty__ghost--hero { grid-column: span 2; grid-row: span 3; background: radial-gradient(120% 130% at 0% 0%, var(--accent-soft), transparent 55%), var(--surface); }
.b1-empty__ghost--stat { grid-column: span 1; grid-row: span 1; }
.b1-empty__ghost--wide { grid-column: span 2; grid-row: span 1; }
.b1-empty__ghost--col  { grid-column: span 2; grid-row: span 2; }
.b1-empty__ghost::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, var(--hover) 50%, transparent 80%); transform: translateX(-100%); animation: b1GhostShimmer 2.8s var(--ease-out) infinite; }
@keyframes b1GhostShimmer { to { transform: translateX(100%); } }

.b1-empty__body { position: relative; margin-top: -42px; max-width: 470px; display: flex; flex-direction: column; align-items: center; }
.b1-empty__title { margin: 0; font: 500 var(--h3)/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.b1-empty__sub { margin: 11px 0 0; font: 400 14px/1.6 var(--font-ui); color: var(--ink-mid); }
.b1-empty__cta { margin-top: 22px; }
.b1-empty__hints { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; }
.b1-empty__hint { display: inline-flex; align-items: center; gap: 8px; font: 400 12.5px/1 var(--font-ui); color: var(--ink-mid); }
.b1-empty__hint-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--ink-low); }
.b1-empty__hint-ico .icon { width: 13px; height: 13px; }
.b1-empty__hint-ico--muse { color: var(--accent); }
.b1-empty__bolt { width: 10px; height: 14px; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .b1-empty__ghost::after { display: none; } }
.b1-pager__btn[disabled] { opacity: .3; cursor: default; }
.b1-pager__btn .icon { width: 14px; height: 14px; }

/* v3 · LEFT — recent conversations. No card per row: the panel is already the card,
   so 1px dividers + negative space do the grouping (and it rhymes with the file
   list beside it). Hierarchy is carried by weight and colour, not by boxes. */
.b1-convos { display: flex; flex-direction: column; }
.b1-convo { padding: 14px 8px; cursor: pointer; border-radius: var(--r-sm); border-bottom: 1px solid var(--line-soft); transition: background var(--dur-fast) var(--ease-out); }
.b1-convo:last-child { border-bottom: 0; }
.b1-convo:hover { background: var(--hover); }
.b1-convo__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.b1-convo__title { margin: 0; flex: 1; min-width: 0; font: 600 14px/1.35 var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the card's actions: absent until you are on the card, like the rail row's */
.b1-convo { position: relative; }
.b1-convo__more { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0;
  border-radius: 9px; cursor: pointer; opacity: 0;
  background: var(--surface); color: var(--ink-mid);
  box-shadow: var(--sh-xs), inset 0 0 0 1px var(--line-soft);
  transition: opacity var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out); }
.b1-convo:hover .b1-convo__more, .b1-convo__more:focus-visible { opacity: 1; }
.b1-convo__more:hover { color: var(--ink); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line); }
.b1-convo__more .icon { width: 17px; height: 17px; }
/* the field takes the title's slot, so nothing on the card shifts */
.b1-convo .rename__field { font: inherit; }
@media (hover: none) { .b1-convo__more { opacity: 1; } }
.b1-convo__when { flex: none; font: 400 10.5px/1 var(--font-mono); color: var(--ink-low); }
/* the snippet is why this list beats the sidebar, so it reads as content (ink-2), not as meta */
.b1-convo__snip { margin: 7px 0 0; font: 400 12.5px/1.55 var(--font-ui); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b1-convo__meta { margin-top: 9px; font: 400 10.5px/1 var(--font-mono); color: var(--ink-faint); }

/* v3 · RIGHT — unified library, tabbed by source (All / Uploaded by me / Generated by Muse) */
.b1-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.b1-tab { cursor: pointer; border: 0; font: 600 11.5px/1 var(--font-ui); color: var(--ink-low); background: transparent; padding: 7px 11px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-soft); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.b1-tab:hover { color: var(--ink-2); background: var(--hover); }
.b1-tab.is-on { color: var(--ink); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
/* a file list: hairline-separated rows, name left, source + date as right-hand columns */
.b1-files { display: flex; flex-direction: column; }
.b1-file { display: flex; align-items: center; gap: 11px; padding: 10px 8px; cursor: pointer; border-radius: var(--r-sm); border-bottom: 1px solid var(--line-soft); transition: background var(--dur-fast) var(--ease-out); }
.b1-file:last-child { border-bottom: 0; }
.b1-file:hover { background: var(--hover); }
.b1-file .ox-thumb { width: 28px; height: 28px; border-radius: 8px; }
.b1-file .ox-thumb .icon { width: 14px; height: 14px; }
.b1-file__id { flex: 1; min-width: 0; }
.b1-file__top { display: flex; align-items: center; gap: 8px; }
.b1-file__name { flex: 1; min-width: 0; font: 600 13px/1.35 var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b1-file__date { flex: none; font: 400 10.5px/1 var(--font-mono); color: var(--ink-low); }
.b1-file__meta { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 3px; font: 400 10.5px/1.3 var(--font-mono); color: var(--ink-faint); }
.b1-file__meta .icon { width: 12px; height: 12px; flex: none; }
.b1-file__kind { flex: none; }
.b1-file__conv { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b1-badge { display: inline-flex; align-items: center; gap: 3px; flex: none; font: 600 9.5px/1 var(--font-ui); color: var(--ink-low); background: var(--sunken); padding: 4px 6px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-soft); }
.b1-badge .icon { width: 10px; height: 10px; }
.b1-badge__bolt { height: 11px; width: auto; display: block; }   /* the PRISM bolt marks Muse — never a sparkle */
.b1-badge--muse { color: var(--accent); background: var(--accent-soft); box-shadow: none; }

/* ═══ B2 · TWO-COLUMN HUB ═══ */
.b2-cols { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.b2-main { padding: 0; }
.b2-item { padding: 18px; border-radius: var(--r-lg); background: var(--surface); margin-bottom: 12px; box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); cursor: pointer; }
.b2-item:hover { box-shadow: var(--sh-md), inset 0 0 0 1px var(--line); }
.b2-item__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.b2-item__title { font: 600 16px/1.3 var(--font-ui); color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b2-item__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }
.b2-item__prog { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.b2-item__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.b2-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
.b2-resume { padding: 20px; border-radius: var(--r-lg); background: radial-gradient(120% 130% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); cursor: pointer; }
.b2-resume__title { font: 600 17px/1.25 var(--font-ui); color: var(--ink); margin: 2px 0 4px; }
.b2-resume .ox-btn { margin-top: 16px; width: 100%; justify-content: center; }
.b2-mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.b2-mini { padding: 14px 12px; border-radius: var(--r-md); background: var(--surface); text-align: center; box-shadow: inset 0 0 0 1px var(--line-soft); }
.b2-mini__n { display: block; font: 600 20px/1 var(--font-display); color: var(--ink); }
.b2-mini__l { display: block; font: 500 10.5px/1.2 var(--font-ui); color: var(--ink-low); margin-top: 5px; }
.b2-done { padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft); }
.b2-done .blend-row { padding: 10px 8px; }

/* ═══ B3 · ACTIVITY TIMELINE ═══ */
.b3-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.b3-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.b3-resume { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: var(--r-lg); margin-bottom: 26px; cursor: pointer; background: radial-gradient(100% 180% at 0% 50%, var(--accent-soft), transparent 55%), var(--surface); box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); }
.b3-resume__txt { display: flex; flex-direction: column; gap: 4px; }
.b3-resume__txt b { font: 600 16px/1.2 var(--font-ui); color: var(--ink); }
.b3-timeline { position: relative; padding-left: 4px; }
.b3-group { margin-bottom: 24px; }
.b3-group__label { font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-low); margin: 0 0 14px 26px; }
.b3-node { position: relative; padding: 0 0 14px 26px; }
.b3-node::before { content: ""; position: absolute; left: 4px; top: 16px; bottom: -14px; width: 2px; background: var(--line); }
.b3-node:last-child::before { display: none; }
.b3-node__dot { position: absolute; left: 0; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); z-index: 1; }
.b3-node.is-done .b3-node__dot { background: var(--ink-faint); box-shadow: 0 0 0 4px var(--sunken); }
.b3-node__card { padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); cursor: pointer; box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.b3-node__card:hover { transform: translateY(-1px); box-shadow: var(--sh-md), inset 0 0 0 1px var(--line); }
.b3-node__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.b3-node__title { font: 600 15px/1.3 var(--font-ui); color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b3-node__meta { font: 400 11.5px/1.3 var(--font-mono); color: var(--ink-low); margin: 6px 0 12px; }
.b3-node__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.b3-node__cta { display: inline-flex; align-items: center; gap: 5px; flex: none; font: 600 12px/1 var(--font-ui); color: var(--accent); white-space: nowrap; }
.b3-node__cta .icon { width: 13px; height: 13px; }

/* ═══ responsive ═══ */
@media (max-width: 900px) {
  .s1-hero { grid-template-columns: 1fr; }
  .s1-hero__side { border-left: 0; border-top: 1px solid var(--line); }
  .b1-grid { grid-template-columns: repeat(2, 1fr); }
  .b1-resume { grid-column: span 2; grid-row: auto; }
  .b1-col { grid-column: span 2; }
  .b2-cols { grid-template-columns: 1fr; }
  .b2-rail { position: static; }
  .s3-spot { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .s1-hero__body { padding: 26px 22px; }
  .s1-hero__title { font-size: 30px; }
  .s3-spot { padding: 26px 22px; }
  .s3-spot__title { font-size: 28px; }

  /* Overview bento on phones. A 1-column collapse overflowed: the "Files" stat card
     kept grid-column:span 2, which spawned a phantom 2nd track (406px + 182px) and
     clipped the hero's button and recap. Stay on the 2-up grid (from the 900px rule)
     and tighten it — the wide card already spans both columns as a full-width row. */
  .ovx h1 { font-size: 23px; }
  .blend-head { margin-bottom: 16px; }
  .b1-grid { gap: 12px; }
  .b1-resume { padding: 20px; }
  .b1-resume__title { font-size: 21px; }
  .b1-recap { margin-top: 16px; }
  .v-b1 .b1-resume__foot { flex-wrap: wrap; row-gap: 14px; }
  .v-b1 .b1-resume__foot .ox-btn { width: 100%; justify-content: center; }
  .ox-statcard { min-height: 104px; padding: 16px; gap: 10px; }
  .ox-statcard__n { font-size: 27px; }
  .b1-col { padding: 16px; }
  /* the file row's top line is tight on phones; drop the date so the name reads
     (recency is already carried by newest-first order + the "when" on convos) */
  .b1-file__date { display: none; }
  .b1-file__name { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ox-btn, .s1-pill, .s3-card, .b3-node__card { transition: none; }
}

/* ============================================================
   PROJECTS INDEX (.px) — the room behind the single nav entry.
   Folders are objects here, so each one is a card that says what
   it holds and when it last moved, not a row in a list.
   ============================================================ */
.px { width: 100%; padding-bottom: 64px; }

/* ── the head: say what this room is, then the tools to work it ───────────── */
.px-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-bottom: 30px; }
.px-head__id { min-width: 240px; }
.px-head__t { margin: 0; font: 600 var(--h2)/1.1 var(--font-display);
  letter-spacing: -0.015em; color: var(--ink); }
.px-head__sub { margin: 9px 0 0; max-width: 52ch; text-wrap: pretty; font: 400 13.5px/1.55 var(--font-ui); color: var(--ink-mid); }
.px-head__acts { display: flex; align-items: center; gap: 8px; }
.px-search { width: 200px; box-sizing: border-box; padding: 10px 14px; border: 0; border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft);
  font: 400 13.5px/1 var(--font-ui); color: var(--ink); }
.px-search::placeholder { color: var(--ink-low); }
.px-search:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.px-sort { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; border-radius: var(--r-md);
  cursor: pointer; background: var(--surface); font: 400 13.5px/1 var(--font-ui); color: var(--ink-low);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: box-shadow var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.px-sort b { font-weight: 600; color: var(--ink); }
.px-sort:hover { color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.px-sort .icon { width: 12px; height: 12px; }
.px-new { display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px 10px 14px; border: 0;
  border-radius: var(--r-pill); cursor: pointer; background: var(--accent-grad); color: var(--on-accent);
  font: 600 13.5px/1 var(--font-ui); box-shadow: var(--sh-accent);
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur-fast) var(--ease-out); }
.px-new:hover { transform: translateY(-1px); filter: brightness(1.06); }
.px-new:active { transform: scale(0.97); }
.px-new .icon { width: 14px; height: 14px; }

/* ── which half of the page you are in ───────────────────────────────────── */
.px-sec { display: flex; align-items: center; gap: 9px; margin: 4px 2px 12px; }
.px-sec + .px-grid { margin-bottom: 30px; }
.px-sec__t { margin: 0; font: 600 12.5px/1 var(--font-ui); letter-spacing: .01em; color: var(--ink-2); }
.px-sec__n { font: 500 11px/1 var(--font-mono); color: var(--ink-low);
  background: var(--sunken); padding: 3px 7px; border-radius: var(--r-pill); }

/* ── a folder, as an object you can pick up ───────────────────────────────
   Flat fills read as diagrams. A card gets a gentle vertical shade and a lit
   top edge, so it sits on the page instead of being printed onto it. */
.px-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 16px; }
.px-card { position: relative; display: flex; flex-direction: column; min-height: 196px;
  padding: 22px 22px 18px; border-radius: var(--r-xl); cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.px-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md), inset 0 0 0 1px var(--line); }
.px-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* the lit edge: coral on a folder that is carrying files, plain light on one that is not */
.px-card__edge { position: absolute; top: 0; left: 22px; right: 22px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.px-card.is-loaded .px-card__edge {
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .5; }

.px-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 15px; }
.px-card__ico { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: var(--sunken); color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.px-card.is-loaded .px-card__ico { background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-tint); }
.px-card__ico .icon { width: 20px; height: 20px; }

/* Only a folder you have not started wears a tag, and it wears it quietly:
   it is a note to yourself, not a status anyone needs to act on. */
.px-card__tag { flex: none; padding: 4px 10px; border-radius: var(--r-pill);
  font: 500 10px/1.4 var(--font-mono); letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-low); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: opacity var(--dur-fast) var(--ease-out); }
.px-card:hover .px-card__tag { opacity: 0; }   /* it steps aside for the actions */
.px-card__more { position: absolute; top: 20px; right: 20px; width: 30px; height: 30px;
  display: grid; place-items: center; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--surface); color: var(--ink-low); opacity: 0;
  box-shadow: var(--sh-xs), inset 0 0 0 1px var(--line-soft);
  transition: opacity var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.px-card:hover .px-card__more, .px-card__more:focus-visible { opacity: 1; }
.px-card__more:hover { color: var(--ink); }
.px-card__more .icon { width: 16px; height: 16px; }

.px-card__name { margin: 0 0 7px; font: 600 17.5px/1.22 var(--font-display);
  letter-spacing: -0.015em; color: var(--ink); }
.px-card__brief { flex: 1; margin: 0; font: 400 13px/1.55 var(--font-ui); color: var(--ink-mid); }
.px-card__brief--none { color: var(--ink-faint); font-style: italic; }
/* counts and times are data, so they wear the mono face and stop competing with the prose */
.px-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line-soft);
  font: 400 11px/1.3 var(--font-mono); color: var(--ink-low); }
.px-card__n { display: inline-flex; align-items: center; gap: 6px; }
.px-card__n .icon { width: 12px; height: 12px; color: var(--ink-faint); }
.px-card__when { flex: none; }

/* the way to make one lives among the ones you have */
.px-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 196px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-xl); cursor: pointer;
  background: transparent; color: var(--ink-low); font: 600 13.5px/1 var(--font-ui);
  transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out); }
.px-add__ring { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px currentColor; }
.px-add__ring .icon { width: 15px; height: 15px; }
.px-add:hover { border-color: var(--accent-tint); color: var(--accent); background: var(--accent-soft); }

/* ── nothing filed yet ────────────────────────────────────────────────────── */
.px-none { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 24px;
  text-align: center; font: 400 13px/1.6 var(--font-ui); color: var(--ink-low); }
.px-none > .icon { width: 26px; height: 26px; color: var(--ink-faint); }
/* Centred copy that wraps to a few lines gets its lines evened out, so the
   last one never ends up holding a single word on its own. */
.px-none span { max-width: 46ch; text-wrap: balance; }
.px-none b { color: var(--ink-2); font-weight: 600; }
.px-none--first { padding: 84px 24px; gap: 0; }
/* the mark, not every icon on the screen: the one in the button stays white */
.px-none--first > .icon { color: var(--accent); }
.px-none__t { margin: 24px 0 0; text-wrap: balance; font: 600 var(--h4)/1.2 var(--font-display);
  letter-spacing: -0.02em; color: var(--ink); }
/* the mark gets a room of its own and a soft light behind it */
.px-none--first > .icon { box-sizing: content-box; width: 32px; height: 32px; padding: 22px;
  border-radius: 24px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-tint),
  0 0 70px var(--accent-soft); }
.px-none--first span { margin-top: 11px; font: 400 14px/1.6 var(--font-ui); color: var(--ink-mid); max-width: 44ch; }
.px-none--first .px-new { margin-top: 26px; padding: 12px 22px 12px 17px; font-size: 14px; }

/* ============================================================
   PROJECT VIEW (.pj) — the inside of a folder.
   Reading order matches intent: what this project IS (the head),
   what you can DO right now (the composer), what you were doing
   (recents), and on the side what Muse always knows here
   (instructions + the files in context).
   Color follows the system: coral only for on/active, amber only
   when context is genuinely close to full. Purple stays reserved
   for voice match. Everything else is ink and surface.
   ============================================================ */
.pj { width: 100%; padding-bottom: 56px; }

/* ── identity ─────────────────────────────────────────────────────────────── */
.pj-head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.pj-ico { flex: none; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: var(--sunken); color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
/* a folder carrying files is live, and its mark says so */
.pj-head.is-loaded .pj-ico { background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-tint); }
.pj-ico .icon { width: 24px; height: 24px; }
.pj-id { flex: 1; min-width: 0; }
.pj-name { display: block; width: 100%; box-sizing: border-box; background: none; border: 0; padding: 2px 2px; margin: 0;
  font: 600 var(--h3)/1.15 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
/* what this folder holds, in the face numbers deserve */
.pj-meta { display: flex; align-items: center; gap: 9px; margin: 5px 0 0 2px;
  font: 400 11.5px/1 var(--font-mono); color: var(--ink-low); }
.pj-meta em { font-style: normal; color: var(--accent); }
.pj-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.pj-name::placeholder { color: var(--ink-faint); }
.pj-name:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.pj-more { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink-low); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.pj-more:hover { background: var(--hover); color: var(--ink); }
.pj-more .icon { width: 18px; height: 18px; }

/* ── the two tracks: the work, and what the work knows ────────────────────── */
.pj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 28px; align-items: start; }
.pj-main { min-width: 0; }

/* the first thing here is a place to start, at full column width */
.pj-composer.composer { max-width: none; }
.pj-under { display: flex; align-items: center; gap: 7px; margin: 11px 2px 0;
  font: 400 12px/1.45 var(--font-ui); color: var(--ink-low); }
.pj-under__bolt { height: 13px; width: auto; flex: none; color: var(--accent); }

/* ── recents ──────────────────────────────────────────────────────────────── */
.pj-recents { margin-top: 34px; }
.pj-sec { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.pj-sec__t { margin: 0; font: 600 13px/1.2 var(--font-ui); color: var(--ink-2); }
.pj-sec__n { font: 600 11px/1 var(--font-mono); color: var(--ink-low);
  background: var(--sunken); padding: 3px 6px; border-radius: 6px; }
/* Recents is a list of things to open, not a set of objects. It carries no
   fill, no shadow and no border: a hairline divides the items and hover is the
   only surface it ever shows. That is what keeps three levels legible on this
   page: the composer is the action and gets the most weight, instructions and
   context are cards because they hold standing state, and this is navigation.
   Made every row a card once and the page flattened into one texture. */
.pj-rows { display: flex; flex-direction: column; }
.pj-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: transparent; padding: 13px 10px; border-radius: var(--r-sm);
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur-fast) var(--ease-out); }
.pj-row:last-child { border-bottom: 0; }   /* the rule divides, it does not close the list */
.pj-row:hover { background: var(--hover); }
.pj-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pj-row__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pj-row__name { font: 600 14px/1.3 var(--font-ui); color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-row__snip { font: 400 12px/1.35 var(--font-ui); color: var(--ink-low);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-row__files { flex: none; display: inline-flex; align-items: center; gap: 4px;
  font: 500 11px/1 var(--font-mono); color: var(--ink-low); }
.pj-row__files .icon { width: 12px; height: 12px; color: var(--ink-faint); }
.pj-row__when { flex: none; font: 400 10.5px/1 var(--font-mono); color: var(--ink-low); }

/* ── the side: what Muse always knows in this project ─────────────────────── */
.pj-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 8px; }
.pj-card { position: relative; border-radius: var(--r-lg); padding: 18px 19px 19px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line-soft); }
.pj-card__h { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.pj-card__t { flex: 1; margin: 0; font: 600 13px/1.2 var(--font-ui); color: var(--ink); }
.pj-card__acts { flex: none; display: flex; gap: 4px; }
.pj-mini { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 8px;
  cursor: pointer; background: transparent; color: var(--ink-low);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.pj-mini:hover { background: var(--hover); color: var(--ink); }
.pj-mini.is-on { background: var(--accent-soft); color: var(--accent); }
.pj-mini .icon { width: 14px; height: 14px; }

/* instructions: a field that looks like text until you want to change it */
.pj-brief { display: block; box-sizing: border-box; width: 100%; resize: none; overflow: hidden;
  margin: 0; padding: 9px 11px; border: 0; border-radius: var(--r-sm);
  background: transparent; font: 400 13px/1.55 var(--font-ui); color: var(--ink-2);
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.pj-brief:hover { background: var(--sunken); }
.pj-brief::placeholder { color: var(--ink-faint); }
.pj-brief:focus { outline: none; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }

/* how full the context is. Quiet while there is room: a meter that shouts at
   2% teaches you to ignore it. */
.pj-filter { width: 100%; box-sizing: border-box; margin-bottom: 11px; padding: 8px 11px;
  border: 0; border-radius: var(--r-sm); background: var(--sunken);
  font: 400 12.5px/1.3 var(--font-ui); color: var(--ink); }
.pj-filter:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.pj-meter { display: flex; flex-direction: column; gap: 7px; margin: -2px 0 13px; }
.pj-meter__track { display: block; height: 4px; border-radius: 2px; background: var(--sunken); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-soft); }
.pj-meter__fill { display: block; height: 100%; border-radius: 2px; background: var(--ink-low);
  transition: width var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.pj-meter.is-high .pj-meter__fill { background: var(--warn); }
.pj-meter.is-full .pj-meter__fill { background: var(--accent); }
.pj-meter__label { font: 400 11.5px/1 var(--font-ui); color: var(--ink-low); }
.pj-meter.is-high .pj-meter__label { color: var(--warn-ink); }

/* context files, one per line in a narrow rail */
.pj-side .pj-cards { display: block; }

.pj-side .pj-empty { padding: 20px 12px; }
.pj-side .b1-pager { margin-top: 10px; }

/* ── where a file came from: Muse made it, or you brought it ──────────────── */
.pj-src { flex: none; display: inline-flex; align-items: center; font: 700 9.5px/1 var(--font-mono); letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 5px; border-radius: 5px; }
.pj-src--muse { color: var(--accent); background: var(--accent-soft); }
.pj-src--you { color: var(--ink-mid); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line-soft); }

/* ── a file in context ────────────────────────────────────────────────────── */
.pj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
/* A file in context is a row with a thumbnail, not a card. It already lives
   inside the Context card, and a card inside a card gives you two borders and
   two shadows describing one object. The system says the same thing about its
   artifact tile: it is a button, not a card.
   min-width:0 because a grid item refuses to shrink below its content, and one
   long filename would stretch the track past the rail with the ellipsis never
   getting a chance to fire. */
.pj-fcard { position: relative; min-width: 0; box-sizing: border-box; display: flex; align-items: center; gap: 11px;
  padding: 9px 8px; border-radius: var(--r-sm); background: transparent; cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur-fast) var(--ease-out); }
.pj-fcard:last-of-type { border-bottom: 0; }   /* the rule divides, it does not close */
.pj-fcard:hover { background: var(--hover); }
.pj-fcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pj-fcard__thumb { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; }
.pj-fcard__thumb .icon { width: 17px; height: 17px; }
.pj-fcard__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pj-fcard__name { font: 600 13.5px/1.3 var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; padding-right: 18px; }
.pj-fcard__meta { display: flex; align-items: center; gap: 6px; min-width: 0; font: 400 11px/1.3 var(--font-mono); color: var(--ink-low); }
.pj-fcard__metatext { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-fcard__from { display: flex; align-items: center; gap: 5px; min-width: 0; font: 500 11px/1.2 var(--font-ui); color: var(--ink-low); }
.pj-fcard__from .icon { width: 12px; height: 12px; flex: none; color: var(--ink-faint); }
.pj-fcard__from span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-fcard__x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center;
  border: 0; border-radius: 7px; cursor: pointer; background: transparent; color: var(--ink-low); opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.pj-fcard:hover .pj-fcard__x, .pj-fcard__x:focus-visible { opacity: 1; }
.pj-fcard__x:hover { color: var(--ink); background: var(--hover); }
.pj-fcard__x .icon { width: 14px; height: 14px; }
.pj-file__thumb { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; }
.pj-file__thumb .icon { width: 17px; height: 17px; }
.pj-cx__box { width: 20px; height: 20px; flex: none; border-radius: 6px; display: grid; place-items: center;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.pj-cx__box .icon { width: 13px; height: 13px; color: var(--on-accent); opacity: 0; transform: scale(0.4);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring); }
/* picked: the box fills and the check springs in. Without these two rules the
   box can never look ticked, so selecting a file reads as nothing happening. */
.fpk-row.is-on .pj-cx__box { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.fpk-row.is-on .pj-cx__box .icon { opacity: 1; transform: none; }

/* ── drop files straight onto the context panel ───────────────────────────── */
.pj-drop { position: absolute; inset: 5px; z-index: 4; display: none; place-items: center; border-radius: var(--r-lg);
  background: var(--glass-strong); backdrop-filter: blur(3px); }
.pj-card--ctx.is-drop { box-shadow: var(--sh-md), inset 0 0 0 2px var(--accent); }
.pj-card--ctx.is-drop .pj-drop { display: grid; }
.pj-drop__card { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--sh-md); font: 600 12.5px/1 var(--font-ui); color: var(--ink); }
.pj-drop__card .icon { width: 18px; height: 18px; color: var(--accent); }

/* ── nothing here yet ─────────────────────────────────────────────────────── */
.pj-empty { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 30px 20px 26px;
  text-align: center; font: 400 12.5px/1.55 var(--font-ui); color: var(--ink-low); }
.pj-empty .icon { width: 22px; height: 22px; color: var(--ink-faint); }
.pj-empty span { max-width: 30ch; text-wrap: balance; }
.pj-empty b { color: var(--ink-2); font-weight: 600; }

/* ── narrow: the side rail becomes a second block under the work ──────────── */
@media (max-width: 980px) {
  .pj-grid { grid-template-columns: 1fr; gap: 22px; }
  .pj-side { position: static; }
  .pj-side .pj-cards { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
}

/* topbar breadcrumb back to a project (a conversation opened from a project) */
/* topbar breadcrumb trail: [folder] Project  ›  Conversation (current, emphasised) */
.topbar__name--crumb { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar__crumb-link { flex: none; max-width: 44%; display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer;
  margin-left: -6px; padding: 3px 7px; border-radius: 7px; background: none;
  font: 500 13px/1.2 var(--font-ui); color: var(--ink-mid);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.topbar__crumb-link .icon { width: 14px; height: 14px; flex: none; color: var(--ink-low); }
.topbar__crumb-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__crumb-link:hover { color: var(--accent); background: var(--hover); }
.topbar__crumb-link:hover .icon { color: var(--accent); }
.topbar__crumb-sep { flex: none; display: inline-flex; color: var(--ink-faint); }
.topbar__crumb-sep .icon { width: 13px; height: 13px; }
.topbar__crumb-cur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 15px/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }

/* ── Library picker modal (.fpk): add existing files to the project context ── */
.fpk-scrim { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 24px;
  background: var(--scrim); backdrop-filter: blur(3px); animation: fpk-fade var(--dur-fast) var(--ease-out); }
.fpk { width: min(560px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--line);
  overflow: hidden; animation: fpk-in var(--dur-base) var(--ease-spring); }
.fpk__head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line-soft); }
.fpk__ttl { flex: 1; display: flex; flex-direction: column; gap: 3px; font: 600 17px/1.15 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.fpk__sub { font: 400 12px/1.3 var(--font-ui); color: var(--ink-low); }
.fpk__x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; cursor: pointer;
  background: none; color: var(--ink-low); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.fpk__x:hover { background: var(--hover); color: var(--ink); }
.fpk__x .icon { width: 18px; height: 18px; }
.fpk__search { display: flex; align-items: center; gap: 9px; margin: 14px 20px 0; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: box-shadow var(--dur-fast) var(--ease-out); }
.fpk__search:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.fpk__search .icon { width: 15px; height: 15px; flex: none; color: var(--ink-low); }
.fpk__search input { flex: 1; min-width: 0; border: 0; background: none; font: 400 14px/1.3 var(--font-ui); color: var(--ink); }
.fpk__search input::placeholder { color: var(--ink-faint); }
.fpk__search input:focus { outline: none; }
.fpk__tabs { display: flex; gap: 4px; padding: 12px 20px 4px; }
.fpk__tab { border: 0; background: none; cursor: pointer; padding: 6px 11px; border-radius: var(--r-pill);
  font: 500 12px/1 var(--font-ui); color: var(--ink-low);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.fpk__tab:hover { color: var(--ink); background: var(--hover); }
.fpk__tab.is-on { color: var(--ink); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line-soft); }
.fpk__list { flex: 1; min-height: 140px; overflow-y: auto; padding: 6px 12px 8px; }
.fpk-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 11px; cursor: pointer;
  background: none; text-align: left; transition: background var(--dur-fast) var(--ease-out); }
.fpk-row:hover { background: var(--hover); }
.fpk-row__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fpk-row__name { font: 500 13px/1.3 var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpk-row__meta { font: 400 11px/1.3 var(--font-mono); color: var(--ink-low); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpk__empty { padding: 44px 16px; text-align: center; font: 400 13px/1.5 var(--font-ui); color: var(--ink-low); }
.fpk__foot { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line-soft); }
.fpk__upload { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 8px 13px 8px 11px; border-radius: var(--r-pill); font: 600 12px/1 var(--font-ui); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.fpk__upload .icon { width: 14px; height: 14px; color: var(--ink-low); }
.fpk__upload:hover { background: var(--hover); color: var(--ink); }
.fpk__count { flex: 1; text-align: right; font: 400 12px/1 var(--font-mono); color: var(--ink-low); }
.fpk__done { flex: none; padding: 10px 20px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: 600 13px/1 var(--font-ui); color: var(--on-accent); background: var(--accent-grad); box-shadow: var(--sh-accent);
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out); }
.fpk__done:hover { transform: translateY(-1px); filter: brightness(1.05); }
.fpk__done:active { transform: translateY(0); }
@keyframes fpk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fpk-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* responsive: panels stack, then the top hero + tiles stack too */
@media (max-width: 820px) {
  .pj-cols { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .pj-top { flex-direction: column; }
  .pj-tiles { flex-direction: row; width: auto; }
}
@media (max-width: 560px) {
  .fpk { max-height: 90vh; }
  .fpk-scrim { padding: 12px; }
}
@media (max-width: 480px) {
  .pj-name { font-size: 23px; }
  .pj-tiles { flex-direction: column; }
}
