/* Hylē v4 · workspace lane, Round 2 (files, trash, notifications, feedback, components).
   Compositions: List (files, trash, notifications) · Focus inside the app (feedback) · Specimen (components).
   Share lives in settings.css (Settings rows). Type, colour, radius and elevation come only from system tokens;
   dialogs, member rows, the link box and the forest-plot miniature are in assets/workspace-settings/ws-shared.css. */

/* ================= Shared bits ================= */
.cell-title { color: var(--ink); }
.nowrap { white-space: nowrap; }
.row-check { width: 24px; min-height: 24px; }
.check.row-check .box { margin-top: 0; }
.table-scroll { overflow-x: auto; }

/* Empty / error art in the evidence-thread language */
.art { display: block; width: 220px; max-width: 100%; margin-bottom: 8px; color: var(--ink-3); }
.art svg { width: 100%; height: auto; overflow: visible; }
.art[data-art="sent"] { width: 148px; }
.a-line { stroke: var(--hairline-strong); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.a-fill { fill: var(--raised); }
.a-soft { stroke: var(--ink-4); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.a-thread { stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.a-thread.a-dash { stroke: var(--brand-orange); stroke-dasharray: 4 5; }
.a-node { fill: var(--raised); stroke: var(--accent); stroke-width: 1.75; }
.a-node.a-bad { stroke: var(--brand-orange); }
.a-plus { stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; }
.a-ring { stroke: rgba(255,255,255,.4); stroke-width: 1.5; }
.a-check { stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.state .art + .t-eyebrow { margin-top: 4px; }
.state-sm { padding: 28px 24px; }
.state .state-art.is-brand { width: 64px; height: 64px; border-radius: var(--r-xl); margin-bottom: 14px; }
.state-lg { padding: 72px 24px 80px; }

/* Skeleton rows */
.files-skel { display: flex; flex-direction: column; }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 14px 8px; border-top: 1px solid var(--hairline); }
.sk-row:first-child { border-top: 0; }
.sk-sq { width: 40px; height: 40px; border-radius: var(--r-md); flex: none; }
.sk-col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sk-w { width: 84px; flex: none; }

/* Group label inside a list (Today, This week …): plain text, not a mono eyebrow */
.list-group { display: flex; align-items: baseline; gap: 8px; padding: 22px 8px 8px; border-bottom: 1px solid var(--hairline); font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.list-group:first-child { padding-top: 10px; }
.list-group span { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Toolbar chips that scroll with a fade instead of clipping */
.chip-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 28px; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: none; scroll-snap-align: start; }

/* ================= FILES (List + inspector) ================= */
.ws-files.l-list.has-inspector { grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; }
.ws-toolbar { gap: 8px; }
.ws-toolbar { flex-wrap: nowrap; }
.ws-toolbar .ws-search { flex: 1 1 150px; min-width: 0; max-width: 320px; }
.ws-toolbar .segmented { flex: none; }
.ws-toolbar .select-study { flex: none; }
.ws .app-head-lede { max-width: 92ch; }
.ws-slash { margin-right: 10px; }
.ws-search .control:focus-within .ws-slash { opacity: 0; }
.ws-toolbar .select.compact .select-trigger { background: var(--raised); min-width: 0; }
.ws-toolbar .select .listbox { width: 300px; left: auto; right: 0; }
.ws-toolbar .select-study { margin-left: auto; }
.select-mode { display: none; }
.list-foot { padding: 14px 8px; font-size: var(--fs-small); color: var(--ink-2); }
.list-foot:empty { display: none; }

.frow { grid-template-columns: 24px minmax(0, 1fr) auto 36px; gap: 4px 14px; padding: 10px 12px 10px 8px; cursor: pointer; }
.frow.is-sel { background: var(--accent-tint); box-shadow: inset 2px 0 0 var(--accent); }
.frow.is-checked:not(.is-sel) { background: rgba(20,20,19,.03); }
.frow.is-hashing::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--brand-blue), var(--brand-orange), transparent) no-repeat; background-size: 30% 100%; animation: rule-sheen 1.6s var(--ease-in-out) infinite; }
.frow-main { display: flex; align-items: center; gap: 12px; min-width: 0; width: 100%; text-align: left; border-radius: var(--r-sm); }
.frow-main:focus-visible { outline-offset: 4px; }
.fn { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fsub { display: flex; align-items: center; gap: 6px; }
.fsub .dot { width: 7px; height: 7px; }
.fsub > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .list-row-meta { gap: 16px; }
.frow .m-size { width: 64px; text-align: right; }
.frow .m-when { width: 84px; }
.frow .c-act { display: flex; justify-content: flex-end; }
.frow .c-act .icon-btn { opacity: 0; color: var(--ink-3); transition: opacity var(--d-2), background var(--d-2), color var(--d-2); }
.frow:hover .c-act .icon-btn, .frow:focus-within .c-act .icon-btn, .frow.is-sel .c-act .icon-btn { opacity: 1; }
.frow .c-act .icon-btn:hover { color: var(--danger); background: var(--danger-tint); }
.hashing { color: var(--accent-ink); font-weight: 500; }
.need { color: var(--warning); font-weight: 600; }

/* Inspector: a sticky card on desktop, a bottom sheet at ≤1180 */
.inspector { position: sticky; top: calc(var(--topbar-h) + 16px); padding: 20px; display: flex; flex-direction: column; gap: 18px; min-height: 280px; align-self: start; }
.inspector.is-empty { align-items: center; justify-content: center; text-align: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--hairline); }
.insp-none { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 28ch; }
.insp-none .kico { width: 48px; height: 48px; border-radius: var(--r-lg); }
.insp-head { display: flex; align-items: flex-start; gap: 12px; }
.glyph { width: 48px; height: 48px; padding: 7px; border-radius: var(--r-md); background: var(--sunken); flex: none; display: block; box-shadow: inset 0 0 0 1px rgba(20,20,19,.05); }
.glyph svg { width: 100%; height: 100%; }
.glyph .g0 { fill: var(--brand-blue); } .glyph .g1 { fill: var(--brand-orange); } .glyph .g2 { fill: var(--brand-night); } .glyph .g3 { fill: var(--ink-4); }
.glyph.is-pending { background: linear-gradient(110deg, var(--sunken) 30%, var(--sunken-2) 50%, var(--sunken) 70%); background-size: 200% 100%; animation: sheen-bg 1.2s linear infinite; }
@keyframes sheen-bg { to { background-position: -200% 0; } }
.insp-title { min-width: 0; flex: 1; }
.insp-title h2 { overflow-wrap: anywhere; }
.insp-title p { margin-top: 2px; font-size: var(--fs-small); color: var(--ink-2); }
.insp-close { display: none; margin: -6px -8px 0 0; }
.insp-alert { font-size: var(--fs-small); padding: 10px 12px; overflow: hidden; }
.insp-sec { display: flex; flex-direction: column; gap: 8px; }
.insp-sec > h3 { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.insp-sec > h3 span { font-weight: 400; color: var(--ink-2); }
.insp-meta { display: flex; flex-direction: column; margin: 0; }
.insp-meta > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; border-top: 1px solid var(--hairline); }
.insp-meta dt { margin: 0; font-size: var(--fs-small); color: var(--ink-2); }
.insp-meta dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: var(--fs-ui); color: var(--ink); }
.sha-dd .t-mono { overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.insp-meta .select.compact .select-trigger { min-height: 32px; max-width: 100%; background: var(--sunken); border-color: transparent; box-shadow: none; }
.insp-meta .select.compact .select-trigger:hover { background: var(--sunken-2); }
.insp-meta .select .listbox { min-width: 230px; }
.insp-meta .select-trigger .value.placeholder { color: var(--warning); }
.insp-meta .select[data-study] { flex: 1; min-width: 0; }
.insp-meta .select[data-study] .select-trigger { width: 100%; }
.insp-meta .select[data-study] .listbox { min-width: 280px; }
.insp-actions { display: flex; gap: 8px; justify-content: space-between; padding-top: 4px; }

/* Parsed preview: the first rows as a table, the missing value stays visibly missing */
.ptable-wrap { overflow-x: auto; border-radius: var(--r-md); background: var(--sunken); scrollbar-width: thin; }
.ptable { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.ptable th { padding: 9px 10px 7px; text-align: left; font-weight: 500; color: var(--ink-2); white-space: nowrap; border-bottom: 1px solid var(--hairline-strong); }
.ptable td { padding: 7px 10px; color: var(--ink); white-space: nowrap; border-bottom: 1px solid var(--hairline); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable td.num, .ptable th.num { text-align: right; }
.ptable td.is-gap { color: var(--warning); font-weight: 500; }
.ptable td.is-gap span { display: inline-block; padding: 0 6px; border: 1.5px dashed var(--warning-line); border-radius: var(--r-xs); background: rgba(225,145,54,.06); }
.code { margin: 0; padding: 10px 0; border-radius: var(--r-md); background: var(--sunken); font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.75; letter-spacing: 0; color: var(--ink); overflow: auto; white-space: pre; tab-size: 2; }
.code .ln { display: inline-block; width: 36px; padding-right: 12px; text-align: right; color: var(--ink-3); user-select: none; font-variant-numeric: tabular-nums; }
.note-prev { padding: 12px 14px; border-radius: var(--r-md); background: var(--sunken); display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-ui); line-height: 1.5; color: var(--ink); }
.no-prev { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: var(--r-md); background: var(--sunken); }
.no-prev svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }

/* Drag overlay: the whole page is the drop target; nothing permanent takes room */
.drop-veil { position: fixed; z-index: var(--z-overlay); inset: 0 0 0 var(--sidebar-w); display: grid; place-items: center; padding: 16px; background: rgba(250,249,245,.9); pointer-events: none; }
.drop-veil[hidden] { display: none; }
.drop-veil-frame { position: absolute; inset: 16px; border-radius: var(--r-xl); border: 2px dashed var(--accent); }
.drop-veil-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 36ch; }
.drop-veil-in .field-tile { --tile: 64px; margin-bottom: 6px; }
.drop-veil-in h2 { font-size: var(--fs-heading); font-weight: 600; letter-spacing: var(--ls-heading); }
.drop-veil-in p { font-size: var(--fs-ui); color: var(--ink-2); }
.drop-veil-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.drop-veil-tags span { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-xs); background: var(--sunken-2); color: var(--ink-2); font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500; }
.drop-veil.is-over .drop-veil-frame { background: var(--accent-tint); }
@media (max-width: 1024px) { .drop-veil { inset: 0; } }

/* Bulk bar: floats on desktop; a dock (full-width opaque bar stacked on the nav) at ≤1024 */
.bulkbar { position: fixed; z-index: var(--z-nav); left: calc(50% + var(--sidebar-w) / 2); bottom: 28px; translate: -50% 0; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 20px; border-radius: var(--r-lg); background: var(--ink); color: #fff; box-shadow: 0 18px 40px -12px rgba(11,24,48,.5); }
.bulkbar[hidden] { display: none; }
.bulk-n { margin-right: 8px; white-space: nowrap; font-size: var(--fs-ui); }
.bulk-n b { font-variant-numeric: tabular-nums; }
.insp-scrim { position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1); background: rgba(11,24,48,.32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.insp-scrim[hidden] { display: none; }

/* ================= TRASH (List) ================= */
.trow { grid-template-columns: 24px 40px minmax(0, 1fr) auto auto auto; gap: 4px 14px; padding: 12px 8px; }
.trow.is-checked { background: var(--accent-tint); }
.trash-tools .segmented { margin-left: auto; }
.tr-sub2 { display: none; }
.tr-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-from { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-2); }
.tr-from .dot { width: 7px; height: 7px; flex: none; }
.tr-from-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-size { display: flex; justify-content: flex-end; white-space: nowrap; font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 56px; }
.tr-when { white-space: nowrap; font-size: var(--fs-small); color: var(--ink-2); width: 120px; }
.tr-act { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.tr-act .btn-quiet-danger { padding: 0 10px; }
.tr-more { display: none; position: relative; }
.trash-menu { right: 0; top: calc(100% + 4px); min-width: 200px; }
.trash-menu .menu-item.is-danger, .trash-menu .menu-item.is-danger svg { color: var(--danger); }

/* ================= NOTIFICATIONS (List + study receipt) ================= */
.ws-inbox.l-list.has-inspector { grid-template-columns: minmax(0, 1fr) 468px; gap: 32px; }
.inbox-bar { display: flex; align-items: center; gap: 12px; }
.inbox-bar .chip-scroll { flex: 1; min-width: 0; }
.inbox-keys { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: var(--fs-small); color: var(--ink-2); }
.nrow-wrap { position: relative; border-bottom: 1px solid var(--hairline); }
.nrow { position: relative; display: grid; grid-template-columns: 8px 40px minmax(0, 1fr); align-items: start; gap: 12px; width: 100%; padding: 14px 12px 14px 4px; text-align: left; transition: background var(--d-2); }
.nrow:hover { background: rgba(20,20,19,.025); }
.nrow:focus-visible { outline-offset: -2px; border-radius: 0; }
.nrow-wrap.is-open .nrow { background: var(--accent-tint); box-shadow: inset 2px 0 0 var(--accent); }
.n-dot { width: 8px; height: 8px; margin-top: 16px; border-radius: 50%; background: transparent; transition: background var(--d-3), transform var(--d-3) var(--ease-out); }
.nrow.is-unread .n-dot { background: var(--accent); }
.nrow.is-unread .n-title { font-weight: 600; }
.n-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.n-title { color: var(--ink); font-size: var(--fs-ui); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-desc); color: var(--ink-2); }
.n-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.n-top .n-title { min-width: 0; }
.n-time { flex: none; white-space: nowrap; font-size: var(--fs-small); color: var(--ink-2); }
.nrow-wrap.is-new::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--brand-blue), var(--brand-orange)); }
.ws-inbox .inspector { padding: 22px; gap: 16px; min-height: 0; }
.n-head { display: flex; gap: 14px; align-items: flex-start; }
.n-head .kico { width: 44px; height: 44px; }
.n-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.n-meta .t-small { color: var(--ink-2); }
.n-meta h2 { margin-top: 2px; }
.n-body { font-size: var(--fs-body); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.n-receipt { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 14px; border-radius: var(--r-md); background: var(--sunken); }
.n-receipt-h { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: var(--fs-ui); font-weight: 600; color: var(--ink); }
.n-receipt-h span { font-weight: 400; color: var(--ink-2); }
.n-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-small); color: var(--ink-2); }
.n-facts li { display: inline-flex; align-items: center; gap: 6px; }
.n-facts svg { width: 14px; height: 14px; color: var(--ink-3); }
.n-facts .gap, .n-facts .gap svg { color: var(--warning); }
.n-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.n-stat { display: flex; flex-direction: column; gap: 2px; }
.n-stat .t-stat { font-size: var(--fs-heading); letter-spacing: -.015em; }
.n-stat span:last-child { font-size: var(--fs-small); color: var(--ink-2); }
.n-link { display: flex; align-items: center; gap: 10px; }
.n-link svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.n-link .t-mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: var(--fs-ui); }
.n-study { display: flex; align-items: center; gap: 8px; padding-top: 2px; font-size: var(--fs-ui); color: var(--ink); }
.n-study .t-mono { color: var(--ink-3); }
.n-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.n-none { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 0; }

/* ================= FEEDBACK (Focus inside the app) ================= */
.fb-col { width: min(560px, 100%); margin: 0 auto; padding-top: clamp(0px, 3vh, 28px); display: flex; flex-direction: column; gap: 24px; }
.fb-head { display: flex; flex-direction: column; gap: 10px; }
.fb-head p { font-size: var(--fs-body); color: var(--ink-2); max-width: 52ch; }
.fb-head p a { color: var(--accent-ink); font-weight: 500; }
.fb-head p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fb-form { display: flex; flex-direction: column; gap: 20px; }
.fb-block { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-kinds .chip { min-height: var(--ctl-md); padding: 0 12px; gap: 7px; font-size: var(--fs-ui); }
.fb-kinds .chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fld.fb-block:not(.is-invalid) .fld-hint { display: none; }
.fb-form { --kind: var(--danger); }
.fb-hints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fb-hints .chip { font-weight: 500; color: var(--ink-2); background: transparent; border-style: dashed; }
.fb-hints .chip:hover { color: var(--ink); border-color: var(--ink-3); }
.fb-hints .chip svg { width: 12px; height: 12px; }
.fb-control { align-items: stretch; }
.fb-control:focus-within { border-color: var(--kind); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kind) 22%, transparent); }
.kd { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--kd, var(--ink-3)); }
.chip[data-kind="problem"] { --kd: #d9604f; } .chip[data-kind="citation"] { --kd: var(--brand-orange); } .chip[data-kind="idea"] { --kd: #2fb597; } .chip[data-kind="question"] { --kd: #4d9bf0; }
.fb-control textarea { font-size: var(--fs-body); min-height: 148px; }
.fld-label .t-small { margin-left: auto; }
.fld-hint .hint-msg { color: var(--danger); }
.fb-tools { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.fb-shot { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.fb-shot[hidden] { display: none; }
.fb-shot img { width: 56px; height: 40px; object-fit: cover; border-radius: var(--r-sm); background: var(--sunken); box-shadow: 0 0 0 1px var(--hairline); }
.fb-shot-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fb-shot-meta b { font-size: var(--fs-small); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.fb-shot-meta span { font-size: var(--fs-small); color: var(--ink-2); }
.fb-count { margin-left: auto; font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fb-foot { display: flex; align-items: center; gap: 12px; }
.fb-foot .grow { flex: 1; }
.fb-foot .btn-ghost { margin-left: -12px; }
.fb-kbd { display: inline-flex; gap: 3px; align-items: center; font-size: var(--fs-small); color: var(--ink-2); }
.fb-alert { order: -1; }
.fb-recv { border-top: 1px solid var(--hairline); padding-top: 4px; }
.fb-recv .disclose { margin-top: 0; border-top: 0; padding-top: 0; }
.fb-recv .disclose-btn { font-weight: 600; color: var(--ink); }
.fb-recv .disclose-sum { font-size: var(--fs-small); color: var(--ink-2); font-weight: 400; }
.fb-recv-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 8px; }
.ticket { position: relative; padding: 18px 18px 16px 22px; border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--e-1); display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.ticket::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ticket, var(--danger)); transition: background var(--d-3); }
.ticket-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-small); color: var(--ink-2); }
.ticket-title { font-size: var(--fs-ui); line-height: 1.5; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.ticket-title .ink-3 { font-weight: 400; }
.ticket-ctx { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--hairline-strong); font-size: var(--fs-small); color: var(--ink-2); }
.ticket-ctx li { display: flex; align-items: center; gap: 8px; }
.ticket-ctx svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.ticket-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-shot { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink-2); font-size: var(--fs-small); }
.ticket-shot svg { width: 14px; height: 14px; }
.attach { display: flex; flex-direction: column; }
.attach-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--hairline); }
.attach-row:first-child { border-top: 0; }
.attach-row .grow { display: flex; flex-direction: column; min-width: 0; }
.attach-row .t-small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.attach-row .switch { flex-direction: row-reverse; justify-content: space-between; width: 100%; gap: 12px; }
.fb-sent { width: min(560px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-top: clamp(8px, 6vh, 56px); }
.fb-sent[hidden], .fb-form[hidden], .fb-head[hidden] { display: none; }
.fb-sent .field-panel { display: flex; flex-direction: column; gap: 10px; min-height: 260px; justify-content: flex-end; padding: 28px; }
.fb-sent .field-panel .t-title { color: #fff; max-width: 14ch; }
.fb-sent .field-panel p { max-width: 38ch; font-size: var(--fs-ui); color: var(--on-dark); }
.fb-sent .field-panel b { color: #fff; font-weight: 600; }
.sent-ico { position: absolute; right: 24px; top: 24px; width: 72px; height: 72px; }
.sent-ref { display: inline-flex; align-items: center; gap: 12px; padding: 4px 4px 4px 16px; align-self: flex-start; border-radius: var(--r-md); background: var(--sunken); font-size: var(--fs-small); color: var(--ink-2); }
.sent-ref .t-mono { color: var(--ink); font-size: var(--fs-ui); }
.sent-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= COMPONENTS (Specimen) ================= */
body.is-specimen .app-side, body.is-specimen .app-top, body.is-specimen .bottom-nav { display: none; }
body.is-specimen .app { grid-template-columns: minmax(0, 1fr); }
body.is-specimen .app-main { max-width: none; padding: 0; }
.spec-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0 var(--gutter); background: var(--paper); border-bottom: 1px solid var(--hairline); }
.spec-bar-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.spec-bar-brand .field-tile { --tile: 28px; }
.spec-bar-brand small { padding-left: 12px; border-left: 1px solid var(--hairline-strong); font-size: var(--fs-small); color: var(--ink-2); }
.spec-bar-links { display: flex; align-items: center; gap: 8px; }
.l-specimen { min-height: calc(100dvh - 64px); }
.l-specimen .spec-canvas { padding: clamp(24px, 4vh, 48px) var(--gutter) 96px; gap: 20px; }
.spec-head { width: min(760px, 100%); display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.spec-head p { font-size: var(--fs-body); color: var(--ink-2); max-width: 56ch; }
.spec-sheet { width: min(760px, 100%); border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--e-2); scroll-margin-top: 24px; overflow: hidden; }
.spec-sheet > header { display: flex; align-items: baseline; gap: 14px; padding: 18px 24px 14px; border-bottom: 1px solid var(--hairline); }
.spec-sheet > header h2 { font-size: var(--fs-heading); font-weight: var(--fw-heading); letter-spacing: var(--ls-heading); }
.spec-sheet > header p { margin-left: auto; max-width: 40ch; text-align: right; font-size: var(--fs-desc); color: var(--ink-2); }
.spec-sheet .spec-num { font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.spec-body { display: flex; flex-direction: column; gap: 20px; padding: 22px 24px 24px; min-width: 0; }
.spec-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spec-group { display: flex; flex-direction: column; gap: 10px; }
.spec-group > .t-small { font-weight: 600; color: var(--ink-2); }
.spec-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.spec-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 0; border-block: 1px solid var(--hairline); }
.spec-stack { display: flex; flex-direction: column; gap: 14px; }
.spec-trace { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunken); font-size: var(--fs-desc); color: var(--ink-2); min-height: 92px; }
.spec-trace li { display: flex; align-items: baseline; gap: 10px; }
.spec-trace li::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--ink-4); transform: translateY(-1px); }
.spec-trace li:first-child { color: var(--ink); font-weight: 500; }
.spec-trace li:first-child::before { background: var(--accent); }
.bench-stage { overflow: hidden; min-height: 230px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.bench-stage .card-head { padding: 14px 18px; }
.bench-rows li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--hairline); }
.bench-rows .grow { display: flex; flex-direction: column; gap: 2px; }
.bench-when { width: 56px; text-align: right; }
.bd-field { margin-top: 16px; }
.sheet-list { margin: 8px 0 20px; }
.sw-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.sw-list { display: flex; flex-direction: column; margin-top: 8px; }
.sw-group > .t-small { font-weight: 600; color: var(--ink-2); }
.sw { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 40px; border-bottom: 1px solid var(--hairline); font-size: var(--fs-ui); }
.sw-chip { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--sw); box-shadow: inset 0 0 0 1px rgba(20,20,19,.1); }
.sw .t-mono { color: var(--ink-3); }
.field-marks { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 4px; }
.field-marks li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--fs-ui); }
.spec-rail .rail-index { display: flex; flex-direction: column; gap: 2px; }
.spec-rail h2 { font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.spec-rail .rail-index a { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); font-size: var(--fs-ui); font-weight: 500; color: var(--ink-2); transition: color var(--d-2), background var(--d-2); }
.spec-rail .rail-index a span { font-size: var(--fs-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.spec-rail .rail-index a:hover { color: var(--ink); background: rgba(20,20,19,.04); }
.spec-rail .rail-index a[aria-current="true"] { color: var(--ink); background: var(--raised); box-shadow: var(--e-1); }
.spec-rail .rail-note { font-size: var(--fs-desc); color: var(--ink-2); line-height: 1.5; }
.spec-rail .rail-keys { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-small); color: var(--ink-2); }
.spec-rail .rail-keys li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.l-specimen .spec-rail { top: 0; height: 100dvh; max-height: 100dvh; }
.spec-jump { display: none; }

/* ================= Responsive ================= */
@media (hover: none) { .frow .c-act .icon-btn { opacity: 1; } }
@media (max-width: 1280px) {
  .ws-files.l-list.has-inspector { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
  .ws-inbox.l-list.has-inspector { grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; }
}
@media (max-width: 1180px) {
  .ws-files.l-list.has-inspector, .ws-inbox.l-list.has-inspector { grid-template-columns: minmax(0, 1fr); }
  .inspector { position: fixed; z-index: var(--z-drawer); left: 0; right: 0; bottom: 0; top: auto; max-height: 86dvh; overflow: auto; min-height: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--e-4); translate: 0 105%; transition: translate var(--d-4) var(--ease-out); }
  .inspector.is-open { translate: 0 0; }
  .inspector.is-empty { box-shadow: var(--e-4); background: var(--raised); }
  .inspector::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--hairline-strong); margin: 0 auto 4px; }
  .insp-close { display: inline-grid; }
  .frow .m-when, .tr-when { display: none; }
  .tr-sub2 { display: block; }
  .l-specimen { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .bulkbar { left: 0; right: 0; bottom: 0; translate: none; border-radius: 0; padding: 8px var(--gutter) calc(8px + var(--dock-inset, 0px)); justify-content: space-between; }
  .bulkbar .btn-light { flex: 1; }
}
@media (max-width: 860px) {
  .l-specimen .spec-rail { order: -1; position: sticky; top: 0; height: auto; z-index: var(--z-sticky); max-height: none; padding: 8px var(--gutter); border-left: 0; border-bottom: 1px solid var(--hairline); border-top: 0; flex-direction: row; gap: 0; background: var(--paper); }
  .spec-rail .rail-index, .spec-rail h2, .spec-rail .rail-note, .spec-rail .rail-keys { display: none; }
  .spec-jump { display: block; width: 100%; }
  .spec-jump .select-trigger { min-height: 44px; }
  .spec-sheet > header { flex-direction: column; gap: 4px; }
  .spec-sheet > header p { margin-left: 0; text-align: left; max-width: none; }
}
@media (max-width: 640px) {
  .select-mode { display: inline-flex; }
  .ws-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-bottom: 8px; }
  .ws-toolbar .ws-search { grid-column: 1; grid-row: 1; max-width: none; }
  .ws-toolbar .select-mode { grid-column: 2; grid-row: 1; }
  .ws-toolbar .segmented { grid-column: 1; grid-row: 2; display: grid; min-width: 0; }
  .ws-toolbar .segmented button { padding: 0 6px; }
  .ws-toolbar .select-study { grid-column: 2; grid-row: 2; margin-left: 0; }
  .ws-toolbar .select .value { max-width: 11ch; }
  .ws-toolbar .select .listbox { width: min(300px, calc(100vw - 48px)); left: auto; right: 0; }
  .ws-slash { display: none; }
  .frow { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 0; }
  .frow .row-check { display: none; }
  .ws-files.is-selecting .frow { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .ws-files.is-selecting .frow .row-check { display: inline-flex; width: 44px; min-height: 44px; justify-content: center; align-items: center; }
  .frow .list-row-meta { grid-column: auto; }
  .frow .m-size { width: auto; font-size: var(--fs-small); }
  .frow .c-act { display: none; }
  .frow-main { min-height: 48px; }
  .inspector { padding-inline: 16px; }
  .bulkbar { padding-left: var(--gutter); }
  .trow { grid-template-columns: minmax(0, 1fr) auto auto; padding: 10px 0; gap: 2px 8px; }
  .trow .check { display: none; }
  .trash-tools .row-check { display: none; }
  .trow .kico, .tr-size { display: none; }
  .tr-act .btn-quiet-danger { display: none; }
  .tr-more { display: block; }
  .tr-act .btn-secondary svg { display: none; }
  .nrow { padding-right: 4px; }
  .n-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .inbox-bar { gap: 8px; }
  .inbox-keys { display: none; }
  .fb-col { gap: 20px; }
  .fb-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-foot .btn-ghost { margin-left: 0; }
  .fb-kinds .chip { min-height: 48px; justify-content: center; padding: 0 10px; font-size: var(--fs-ui); }
  .fb-control textarea { min-height: 112px; }
  .lede-more, .fb-hints { display: none; }
  .spec-head p { display: none; }
  .spec-trace { min-height: 0; }
  .fb-foot { flex-wrap: wrap; }
  .fb-kbd, .fb-foot .grow { display: none; }
  .fb-foot .btn-primary { flex: 1; order: -1; }
  .fb-foot .btn-ghost { flex: 1; }
  .fb-sent .field-panel { min-height: 220px; padding: 22px; }
  .sent-actions .btn { flex: 1; }
  .spec-body { padding: 18px 16px 20px; }
  .spec-sheet > header { padding: 16px 16px 12px; }
  .spec-cols, .spec-cols-3, .sw-row { grid-template-columns: 1fr; gap: 20px; }
  .spec-row .btn { flex: 1 1 auto; }
  .bench-when { display: none; }
  .spec-bar-links .btn-ghost { display: none; }
  .spec-bar-brand small { display: none; }
}

/* Sidebar: Trash sits under Project files (contextual child) */
.side-link.side-sub { margin-left: 22px; min-height: 32px; font-weight: 400; }
.side-link.side-sub svg { width: 16px; height: 16px; }
.side-link.is-parent { color: var(--ink); }
.side-link.is-parent svg { color: var(--ink-2); }

.l-list.has-inspector.ws-files.is-solo, .l-list.has-inspector.ws-inbox.is-solo { grid-template-columns: minmax(0, 1fr); }
.is-solo > .inspector { display: none; }

/* Restore: the row flies to the list it returns to */
.fly-chip { position: fixed; z-index: 120; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 8px 14px; border-radius: var(--r-md); background: var(--raised); box-shadow: var(--e-3); font-size: var(--fs-ui); font-weight: 600; color: var(--ink); pointer-events: none; white-space: nowrap; transform-origin: 0 50%; }
.fly-chip span { overflow: hidden; text-overflow: ellipsis; }
.fly-chip svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }


/* =====================================================================================================
   Round 4B · workspace lane: calmer lists, one signature per page, phone task first
   ===================================================================================================== */
/* header actions that collapse to icons on the phone */
@media (min-width: 1025px) { .hb-trash { display: none; } }
@media (max-width: 640px) {
  .ws .app-head { flex-wrap: nowrap; align-items: center; }
  .ws .app-head-title { flex: 1 1 auto; }
  .ws .app-head-actions { width: auto; margin-left: auto; flex: none; gap: 4px; }
  .ws .app-head-actions > .btn { flex: none; width: 44px; padding: 0; }
  .ws .app-head-actions .hb-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- FILES ---------- */
@media (min-width: 1181px) { .ws-files.l-list.has-inspector { grid-template-columns: minmax(0, 1fr) 372px; gap: 28px; } }
/* selection appears on hover, focus or in Select mode, never as a column of empty boxes */
.frow .row-check { opacity: 0; transition: opacity var(--d-2); }
.frow:hover .row-check, .frow:focus-within .row-check, .frow.is-checked .row-check, .ws-files.is-selecting .frow .row-check { opacity: 1; }
@media (hover: none) { .frow .row-check { opacity: 1; } }
.frow { border-radius: var(--r-md); border-bottom: 0; margin-top: 2px; }
.frow:hover { background: rgba(20,20,19,.025); }
.frow.is-sel { background: var(--raised); box-shadow: var(--e-1); }
.frow .m-go { display: none; width: 18px; height: 18px; color: var(--ink-3); }
.fgroup { display: flex; align-items: center; gap: 8px; padding: 22px 8px 8px; margin-bottom: 2px; border-bottom: 1px solid var(--hairline); font-size: var(--fs-small); color: var(--ink-2); }
.fgroup:first-child { padding-top: 6px; }
.fgroup b { font-size: var(--fs-ui); font-weight: 600; color: var(--ink); }
.fgroup .t-mono { font-size: var(--fs-mono); color: var(--ink-2); }
.fgroup .fg-n { margin-left: auto; font-variant-numeric: tabular-nums; }
.fgroup .dot { width: 8px; height: 8px; }
.fcols { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fcols span { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r-xs); background: var(--sunken); font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--ink-2); }
.frow.is-sel .fcols span { background: var(--accent-tint); color: var(--accent-ink); }
.fdrop { display: flex; align-items: center; gap: 16px; width: 100%; margin-top: 20px; padding: 18px 20px; border-radius: var(--r-lg); border: 1.5px dashed var(--hairline-strong); background: transparent; text-align: left; color: var(--ink-2); transition: border-color var(--d-2), background var(--d-2), color var(--d-2); }
.fdrop:hover { border-color: var(--accent); background: var(--accent-tint); color: var(--ink); }
.fdrop-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--raised); box-shadow: var(--e-1); color: var(--accent-ink); }
.fdrop-ico svg { width: 20px; height: 20px; }
.fdrop-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fdrop-t b { font-size: var(--fs-ui); font-weight: 600; color: var(--ink); }
.fdrop-t span { font-size: var(--fs-desc); color: var(--ink-2); }
.ws-files .inspector { box-shadow: var(--e-2); }
.insp-actions .btn-quiet-danger { color: var(--ink-2); }
.insp-actions .btn-quiet-danger:hover { color: var(--danger); }

/* ---------- TRASH ---------- */
.ws-trashlist .list-main { max-width: 1000px; }
.trow { grid-template-columns: 24px 40px minmax(0, 1fr) 96px 156px auto; gap: 4px 16px; padding: 12px 8px; border-radius: var(--r-md); }
.trow .row-check { opacity: 0; transition: opacity var(--d-2); }
.trow:hover .row-check, .trow:focus-within .row-check, .trow.is-checked .row-check, .ws-trashlist:has(.trow.is-checked) .row-check { opacity: 1; }
@media (hover: none) { .trow .row-check { opacity: 1; } }
.tr-size { justify-content: flex-start; min-width: 0; }
.tr-when { width: auto; }
.tr-act .btn-quiet-danger { display: none; }
.tr-more { display: block; }
.tr-act { gap: 4px; }
.trash-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding: 14px 16px; border-radius: var(--r-md); background: var(--sunken); font-size: var(--fs-desc); line-height: var(--lh-desc); color: var(--ink-2); max-width: 72ch; }
.trash-note svg { width: 16px; height: 16px; margin-top: 3px; flex: none; color: var(--ink-3); }
.ws-trash .app-head-actions .btn-quiet-danger { box-shadow: none; }

/* ---------- NOTIFICATIONS ---------- */
.n-ico[data-tone="ok"] { background: var(--success-tint); color: var(--success); }
.n-ico[data-tone="warn"] { background: var(--warning-tint); color: var(--warning); }
.n-ico[data-tone="info"] { background: var(--accent-tint); color: var(--accent-ink); }
.n-ico[data-tone="wait"] { background: var(--sunken); color: var(--ink-2); }
.n-ico[data-tone="quiet"] { background: var(--sunken); color: var(--ink-2); }
.inbox-keys .kbd { min-width: 24px; height: 24px; font-size: var(--fs-small); color: var(--ink-2); }
.ws-inbox .inspector { box-shadow: var(--e-2); }
.n-actions .btn { min-width: 128px; }

/* ---------- FEEDBACK: the form and the report it becomes, side by side ---------- */
.fb-kinds .chip { border-radius: var(--r-md); }
@media (min-width: 1100px) {
  .fb-col { width: min(1040px, 100%); }
  .fb-head { max-width: 600px; }
  .fb-form { display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: 48px; row-gap: 20px; align-items: start; }
  .fb-form > :not(.fb-recv):not(.fb-alert) { grid-column: 1; }
  .fb-form > .fb-alert { grid-column: 1 / -1; }
  .fb-recv { grid-column: 2; grid-row: 1 / span 5; position: sticky; top: calc(var(--topbar-h) + 20px); border-top: 0; padding: 18px; border-radius: var(--r-xl); background: var(--sunken); }
  .fb-recv .disclose-btn { pointer-events: none; padding: 0 0 12px; min-height: 0; }
  .fb-recv .disclose-btn svg { display: none; }
  .fb-recv-body { padding: 0; }
  .fb-recv .ticket { box-shadow: var(--e-2); }
  .fb-recv .attach { padding: 4px 4px 0; }
}

/* ---------- COMPONENTS: precise tools, less framing ---------- */
.spec-tabs { display: none; }
.l-specimen .spec-canvas { gap: 16px; }
.spec-head, .spec-sheet { width: min(860px, 100%); }
.spec-sheet { box-shadow: var(--e-1); }
.spec-sheet > header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 12px; row-gap: 2px; padding: 16px 22px 14px; }
.spec-sheet > header p { grid-column: 2; margin-left: 0; max-width: 64ch; text-align: left; }
.spec-body { padding: 18px 22px 22px; gap: 18px; }
.spec-trace { min-height: 0; }
.spec-st { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.spec-st figcaption { font-size: var(--fs-small); color: var(--ink-2); }
@media (max-width: 860px) {
  .spec-tabs { display: flex; gap: 0; justify-content: space-between; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .spec-tabs::-webkit-scrollbar { display: none; }
  .spec-tabs a { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: var(--fs-ui); font-weight: 500; color: var(--ink-2); }
  .spec-tabs a[aria-current="true"] { color: var(--ink); font-weight: 600; }
  .spec-tabs a[aria-current="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--ink); }
  .l-specimen .spec-rail { padding-block: 0; }
  .spec-rail > div, .spec-rail > .rail-note { display: none; }
}
@media (max-width: 640px) {
  .spec-row .btn { flex: 0 0 auto; }
  .spec-sheet > header { grid-template-columns: auto minmax(0, 1fr); }
  .spec-sheet > header p { grid-column: 1 / -1; }
}

/* ---------- phone: task first ---------- */
@media (max-width: 1180px) { .frow .m-go { display: block; } }
@media (max-width: 640px) {
  .ws-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .ws-toolbar .segmented { grid-column: 1 / -1; }
  .ws-toolbar .select-study { display: none; }
  .fgroup { padding-inline: 0; }
  .fgroup .fg-n { display: none; }
  .frow { border-radius: 0; margin-top: 0; border-bottom: 1px solid var(--hairline); }
  .frow.is-sel { box-shadow: none; background: transparent; }
  .fcols span:nth-child(n+4) { display: none; }
  .fdrop { padding: 14px 16px; margin-top: 16px; }
  .trow { grid-template-columns: minmax(0, 1fr) auto auto; }
  .trash-note { margin-top: 16px; }
  .inbox-bar .chip-scroll { -webkit-mask: none; mask: none; padding-right: 0; }
  .inbox-bar .chip { padding: 0 11px; min-width: 48px; justify-content: center; }
  .inbox-bar .c-opt { display: none; }
  .n-top { flex-direction: column; align-items: flex-start; gap: 0; }
  .n-time { order: 2; margin-top: 2px; }
  .n-actions .btn { flex: 1; min-width: 0; }
}

@media (max-width: 640px) { .ws-toolbar .select-mode { box-shadow: inset 0 0 0 1px var(--hairline-strong); background: var(--raised); } }
@media (max-width: 640px) { .ws .app-head-actions .hb-trash .hb-l { display: none; } }
/* desktop: the checkbox takes the place of the type mark on hover, focus or selection (no empty column) */
@media (min-width: 641px) {
  .frow, .trow { position: relative; }
  .frow { grid-template-columns: minmax(0, 1fr) auto 36px; padding-left: 8px; }
  .trow { grid-template-columns: 40px minmax(0, 1fr) 96px 156px auto; }
  .frow .row-check, .trow .row-check { position: absolute; z-index: 2; left: 8px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; min-height: 40px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--raised); box-shadow: var(--e-1); }
  .frow:hover .kico, .frow:focus-within .kico, .frow.is-checked .kico, .ws-files.is-selecting .frow .kico,
  .trow:hover .kico, .trow:focus-within .kico, .trow.is-checked .kico { opacity: 0; }
  .ws-trashlist .trash-tools .row-check { opacity: 1; }
}
/* inbox filters: counts only where they help (Unread); the header already says how many are unread */
.inbox-bar .c-opt { display: none; }

.list-main:has(.trash-tools[hidden]) .trash-note { display: none; }


/* =====================================================================================================
   AUDIT FIX · STAGE B · settings lane: trash, notifications, feedback, components.
   Every rule is scoped by data-view so files.html (app-core lane, same stylesheet) is untouched.
   ===================================================================================================== */
:is([data-view="trash"], [data-view="notifications"], [data-view="feedback"], [data-view="components"]) .switch .track { width: 40px; height: 24px; background: #dcd8ce; box-shadow: inset 0 0 0 1px rgba(20,20,19,.42); }
:is([data-view="trash"], [data-view="notifications"], [data-view="feedback"], [data-view="components"]) .switch .track::after { width: 18px; height: 18px; box-shadow: 0 1px 2px rgba(20,20,19,.3); }
:is([data-view="trash"], [data-view="notifications"], [data-view="feedback"], [data-view="components"]) .switch input:checked + .track { background: var(--accent); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
:is([data-view="trash"], [data-view="notifications"], [data-view="feedback"], [data-view="components"]) .switch input:checked + .track::after { transform: translateX(16px); }
:is([data-view="trash"], [data-view="components"]) .segmented { background: #ebe8e0; }
:is([data-view="trash"], [data-view="components"]) .segmented button { color: #3f3e39; }
:is([data-view="trash"], [data-view="components"]) .segmented button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.kbd-ico svg { width: 13px; height: 13px; stroke-width: 2; }
.kbd-pair { display: inline-flex; gap: 3px; }
.ws .app-head-lede { max-width: 68ch; font-size: 15px; }

/* ---------------- TRASH ---------------- */
[data-view="trash"] .ws-trashlist .list-main { max-width: none; }
[data-view="trash"] .app-head-actions .btn { --btn-h: 36px; }
[data-view="trash"] .app-head-actions .btn-quiet-danger { box-shadow: inset 0 0 0 1px rgba(181,71,58,.32); background: var(--raised); }
[data-view="trash"] .tr-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) 112px 148px 132px; gap: 16px; padding: 0 8px 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6b675e; border-bottom: 1px solid rgba(20,20,19,.08); }
[data-view="trash"] .tr-head span:nth-child(1) { visibility: hidden; }
@media (min-width: 641px) { [data-view="trash"] .trow { grid-template-columns: 40px minmax(0, 1fr) 112px 148px 132px; gap: 4px 16px; } }
[data-view="trash"] .trow { border-radius: 0; border-bottom: 1px solid rgba(20,20,19,.07); }
[data-view="trash"] .tr-lead { width: 40px; height: 40px; background: none; display: grid; place-items: center; }
[data-view="trash"] .tr-lead .field-glyph { --s: 40px; }
[data-view="trash"] .tr-lead .file-badge { --s: 40px; }
[data-view="trash"] .list-row-title { font-weight: 600; }
[data-view="trash"] .tr-ext { font-weight: 500; color: #625e56; }
[data-view="trash"] .tr-from-t { white-space: normal; overflow: visible; }
[data-view="trash"] .tr-none { color: var(--ink-3); }
[data-view="trash"] .badge-draft { background: #efede7; color: #4e4b45; box-shadow: inset 0 0 0 1px rgba(20,20,19,.1); }
[data-view="trash"] .tr-act { justify-content: flex-end; }
[data-view="trash"] .tr-restore { --btn-h: 32px; padding: 0 10px; box-shadow: none; color: var(--ink); font-weight: 500; }
[data-view="trash"] .tr-restore:hover { background: rgba(20,20,19,.06); }
[data-view="trash"] .list-group { display: flex; align-items: center; gap: 8px; margin: 0; padding: 20px 8px 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b675e; border: 0; }
[data-view="trash"] .list-group .lg-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--sunken); font-size: 12px; letter-spacing: 0; color: var(--ink-2); }
[data-view="trash"] .trash-note { max-width: none; margin-top: 20px; padding: 12px 14px; font-size: 14px; line-height: 1.5; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(20,20,19,.07); }
[data-view="trash"] .trash-tools { padding-inline: 8px; border-radius: 12px; }
@media (min-width: 641px) {
  [data-view="trash"] .trow .row-check { opacity: 0; }
  [data-view="trash"] .trow:hover .row-check, [data-view="trash"] .trow:focus-within .row-check, [data-view="trash"] .trow.is-checked .row-check, [data-view="trash"] .ws-trashlist:has(.trow.is-checked) .row-check { opacity: 1; }
  [data-view="trash"] .ws-trashlist:has(.trow.is-checked) .trow .kico { opacity: 0; }
}
@media (max-width: 640px) {
  [data-view="trash"] .ws .app-head, [data-view="trash"] .app-head { flex-wrap: wrap; }
  [data-view="trash"] .app-head-title { flex-direction: column; align-items: flex-start; gap: 2px; }
  [data-view="trash"] .app-head-actions { width: 100%; margin: 12px 0 0; gap: 8px; }
  [data-view="trash"] .app-head-actions > .btn { flex: 1; width: auto; padding: 0 12px; --btn-h: 44px; }
  [data-view="trash"] .app-head-actions .hb-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  [data-view="trash"] .tr-head { display: none; }
  [data-view="trash"] .trash-tools [data-sel-label] { display: none; }
  [data-view="trash"] .trash-tools .segmented { flex: 1; margin-left: 8px; }
  [data-view="trash"] .trash-tools { padding-inline: 0; }
  [data-view="trash"] .trow { grid-template-columns: 36px minmax(0, 1fr) auto 44px; gap: 2px 12px; padding: 12px 0; }
  [data-view="trash"] .trow .row-check { display: none; }
  [data-view="trash"] .tr-lead, [data-view="trash"] .tr-lead .field-glyph, [data-view="trash"] .tr-lead .file-badge { --s: 36px; width: 36px; height: 36px; }
  [data-view="trash"] .tr-size, [data-view="trash"] .tr-when { display: none; }
  [data-view="trash"] .tr-from { display: flex; }
  [data-view="trash"] .tr-sub2 { display: block; }
  [data-view="trash"] .tr-act { display: contents; }
  [data-view="trash"] .tr-restore { grid-column: 3; grid-row: 1; align-self: center; --btn-h: 44px; padding: 0 10px; color: var(--accent-ink); font-weight: 600; }
  [data-view="trash"] .tr-restore svg { display: none; }
  [data-view="trash"] .tr-more { grid-column: 4; grid-row: 1; align-self: center; }
  [data-view="trash"] .tr-more .icon-btn { width: 44px; height: 44px; color: #3f3c38; }
  [data-view="trash"] .list-group { padding: 18px 0 6px; }
}

/* ---------------- NOTIFICATIONS ---------------- */
[data-view="notifications"] .app-head-meta [data-unread-meta] { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--accent-tint); font-size: 13px; font-weight: 600; color: var(--accent-ink); }
[data-view="notifications"] .app-head-title { align-items: center; }
[data-view="notifications"] .list-group { margin: 0; padding: 20px 4px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b675e; border: 0; }
[data-view="notifications"] .nrow { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 14px 12px; }
[data-view="notifications"] .n-dot { position: absolute; left: 41px; top: 12px; z-index: 1; width: 10px; height: 10px; margin: 0; box-shadow: 0 0 0 2px var(--paper); }
[data-view="notifications"] .nrow-wrap.is-open .n-dot { box-shadow: 0 0 0 2px #eef4fb; }
[data-view="notifications"] .n-ico[data-tone="wait"], [data-view="notifications"] .n-ico[data-tone="quiet"] { background: #ebe8e0; color: #3f3c38; }
[data-view="notifications"] .n-ico[data-tone="ok"] { color: #0f5e3c; }
[data-view="notifications"] .n-ico[data-tone="warn"] { color: #7a4d0e; }
[data-view="notifications"] .nrow:not(.is-unread) .n-title { color: #3d3d3a; }
[data-view="notifications"] .n-snip { font-size: 14px; line-height: 1.5; }
[data-view="notifications"] .nrow-wrap.is-new::before { background: var(--accent); }
[data-view="notifications"] .ws-inbox .inspector .stepper { margin-top: -2px; }
[data-view="notifications"] .icon-btn.bell { background: rgba(20,20,19,.06); color: var(--ink); }
@media (max-width: 640px) {
  [data-view="notifications"] .app-head { flex-wrap: wrap; row-gap: 6px; }
  [data-view="notifications"] .app-head-title { flex-wrap: nowrap; }
  [data-view="notifications"] .app-head-actions > .btn { width: 44px; height: 44px; box-shadow: none; background: transparent; border-radius: 10px; }
  [data-view="notifications"] .app-head-actions > .btn:hover { background: rgba(20,20,19,.05); }
  [data-view="notifications"] .app-head-lede { display: block; flex-basis: 100%; margin-top: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
  [data-view="notifications"] .nrow { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  [data-view="notifications"] .n-dot { left: 29px; top: 9px; }
  [data-view="notifications"] .n-top { flex-direction: row; align-items: baseline; gap: 8px; }
  [data-view="notifications"] .n-time { order: 0; margin: 0 0 0 auto; font-size: 12px; color: #6f6c64; }
  [data-view="notifications"] .n-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
  [data-view="notifications"] .list-group { padding: 18px 0 4px; }
  [data-view="notifications"] .inbox-bar .chip { min-height: 36px; }
  [data-view="notifications"] .inbox-bar { border-bottom: 0; }
}

/* ---------------- FEEDBACK ---------------- */
[data-view="feedback"] .fb-kinds .chip { border-color: rgba(20,20,19,.2); }
[data-view="feedback"] .fb-kinds .chip[aria-checked="true"] { background: rgba(20,20,19,.05); border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); color: var(--ink); font-weight: 600; }
[data-view="feedback"] .fb-hints .chip { min-height: 32px; border-style: solid; border-color: #ddd8cc; background: #fffcf7; color: #3f3c38; font-size: 13px; }
[data-view="feedback"] .fb-hints .chip svg { color: var(--ink-3); }
[data-view="feedback"] .fb-control { position: relative; box-shadow: inset 0 0 0 1px rgba(20,20,19,.24); }
[data-view="feedback"] .fb-control textarea { padding-bottom: 34px; }
[data-view="feedback"] .fb-control .fb-count { position: absolute; right: 12px; bottom: 9px; margin: 0; font-size: 12px; color: #6b665f; pointer-events: none; }
[data-view="feedback"] .btn-primary.is-idle { background: #d9d5cc; color: #6b675e; box-shadow: none; }
[data-view="feedback"] .fb-foot .btn-ghost:disabled { opacity: .45; }
[data-view="feedback"] .ticket::before { display: none; }
[data-view="feedback"] .ticket { padding: 16px 18px; }
[data-view="feedback"] .ticket-top > span:first-child { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
[data-view="feedback"] .ticket-top > span:first-child::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ticket, var(--danger)); }
[data-view="feedback"] .ticket-ctx { border-top: 1px solid rgba(20,20,19,.08); padding-top: 12px; }
@media (min-width: 1100px) {
  [data-view="feedback"] .fb-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 48px; row-gap: 20px; align-items: start; width: min(1060px, 100%); }
  [data-view="feedback"] .fb-head { grid-column: 1; grid-row: 1; }
  [data-view="feedback"] .fb-form { display: contents; }
  [data-view="feedback"] .fb-form > :not(.fb-recv) { grid-column: 1; }
  [data-view="feedback"] .fb-recv { grid-column: 2; grid-row: 1 / span 6; align-self: start; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.62); box-shadow: inset 0 0 0 1px rgba(20,20,19,.08); }
  [data-view="feedback"] .fb-sent { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  [data-view="feedback"] .fb-col { padding-top: 8px; gap: 20px; }
  [data-view="feedback"] .fb-head p { font-size: 15px; line-height: 1.5; max-width: 34ch; }
  [data-view="feedback"] .fb-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-view="feedback"] .fb-kinds .chip { justify-content: flex-start; min-height: 48px; padding: 8px 12px; white-space: normal; text-align: left; line-height: 1.25; border-radius: 12px; }
  [data-view="feedback"] .fb-control textarea { min-height: 136px; }
  [data-view="feedback"] .fb-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  [data-view="feedback"] .fb-foot .grow, [data-view="feedback"] .fb-kbd { display: none; }
  [data-view="feedback"] .fb-foot [data-send] { order: -1; --btn-h: 48px; justify-content: center; }
  [data-view="feedback"] .fb-foot .btn-ghost { margin: 0; justify-self: center; --btn-h: 44px; }
  [data-view="feedback"] .fb-recv .disclose-btn { min-height: 52px; padding: 0 14px; border-radius: 12px; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(20,20,19,.1); }
  [data-view="feedback"] .fb-recv .disclose-sum { color: #3f3d38; font-weight: 500; }
  [data-view="feedback"] .fb-recv { border-top: 0; padding-top: 0; }
}

/* ---------------- COMPONENTS (behaviour bench) ---------------- */
.spec-eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink-2); }
[data-view="components"] .spec-head .t-title { font-size: clamp(36px, 4vw, 52px); line-height: 1.12; }
[data-view="components"] .spec-head { gap: 10px; }
[data-view="components"] .spec-head p:not(.spec-eyebrow) { max-width: 60ch; }
[data-view="components"] .spec-sheet > header { grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: center; }
[data-view="components"] .spec-sheet > header p { grid-column: 2; max-width: 66ch; text-wrap: pretty; }
[data-view="components"] .spec-sheet .spec-num { display: inline-grid; place-items: center; width: 28px; height: 22px; border-radius: 6px; background: var(--sunken); font-size: 12px; color: var(--ink-2); }
[data-view="components"] .spec-sheet > header h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
[data-view="components"] #overlays .spec-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
[data-view="components"] #overlays .spec-row .btn { justify-content: flex-start; --btn-h: 44px; }
[data-view="components"] #overlays .kbd-pair { margin-left: auto; }
.spec-trace-h { margin-bottom: -10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b675e; }
[data-view="components"] .spec-trace { font-family: var(--font-mono); font-size: 13px; background: #f3f1ea; box-shadow: inset 0 0 0 1px rgba(20,20,19,.06); }
[data-view="components"] [data-bench-state] { width: auto; max-width: 520px; }
.bench-all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bench-cell { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bench-cell figcaption { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b675e; }
.bench-mini { min-height: 196px; border-radius: 12px; background: var(--raised); box-shadow: inset 0 0 0 1px rgba(20,20,19,.09); overflow: hidden; }
.bench-mini .state { padding: 18px 16px; gap: 6px; }
.bench-mini .state .t-heading { font-size: 15px; }
.bench-mini .state p { font-size: 13px; }
.bench-mini .state-art { transform: scale(.8); margin-bottom: -6px; }
.bench-mini .bench-rows li { padding: 10px 12px; gap: 10px; }
.bench-mini .bench-rows li > :last-child { display: none; }
.bench-mini .card-head { padding: 10px 12px; }
.bench-mini .bench-rows .field-glyph { --s: 28px; }
[data-view="components"] .bench-rows .field-glyph { flex: none; }
[data-view="components"] .bench-stage > .card-head, [data-view="components"] .bench-stage > .bench-rows { margin-inline: 0; }
[data-view="components"] #buttons .spec-row { align-items: flex-end; }
[data-view="components"] #buttons .btn-ghost { outline: 1px dashed rgba(20,20,19,.24); outline-offset: -1px; }
[data-view="components"] .spec-st .btn { min-width: 148px; justify-content: center; }
[data-view="components"] .spec-st .btn.is-loading.is-labelled { color: #fff !important; padding-left: 40px; }
[data-view="components"] .spec-st .btn.is-loading.is-labelled::after { left: 14px; width: 14px; height: 14px; }
[data-view="components"] .spec-st .btn-secondary:disabled { background: #f3f1ea; box-shadow: none; color: #9a958b; opacity: 1; }
.spec-lab { margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b675e; }
[data-view="components"] .check .box { box-shadow: inset 0 0 0 1.5px #8f8a80; }
[data-view="components"] .check input:checked + .box { box-shadow: none; }
[data-view="components"] .sw-chip { width: 32px; height: 32px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(20,20,19,.16), 0 0 0 3px #efece4; }
[data-view="components"] .sw .t-mono { font-size: 12px; letter-spacing: 0; color: var(--ink-2); }
[data-view="components"] .field-marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 24px; padding-top: 14px; border-top: 1px solid rgba(20,20,19,.08); }
[data-view="components"] .field-marks li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 34px; font-size: 14px; color: var(--ink); }
[data-view="components"] .field-marks .dot { width: 10px; height: 10px; }
[data-view="components"] .field-marks .t-mono { font-size: 12px; letter-spacing: 0; color: var(--ink-2); }
[data-view="components"] .spec-rail .rail-index a[aria-current="true"] { background: transparent; box-shadow: inset 2px 0 0 var(--ink); border-radius: 0 6px 6px 0; font-weight: 600; }
[data-view="components"] .spec-rail .rail-note { font-size: 13px; line-height: 1.55; color: #67635b; max-width: 28ch; padding-top: 16px; border-top: 1px solid rgba(20,20,19,.08); }
@media (max-width: 860px) {
  [data-view="components"] .spec-tabs { justify-content: flex-start; gap: 4px; }
  [data-view="components"] .spec-tabs a { padding: 0 12px; }
}
@media (max-width: 640px) {
  [data-view="components"] .spec-sheet > header p { grid-column: 2; }
  [data-view="components"] #overlays .spec-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-view="components"] #overlays .spec-row .btn:first-child, [data-view="components"] #overlays .spec-row .btn:last-child { grid-column: 1 / -1; }
  [data-view="components"] #overlays .kbd-pair { display: none; }
  .bench-all { grid-template-columns: minmax(0, 1fr); }
  [data-view="components"] [data-bench-state] { width: 100%; max-width: none; }
  [data-view="components"] [data-bench-state] button { padding: 0 6px; min-height: 44px; }
  [data-view="components"] #buttons .spec-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  [data-view="components"] #buttons .spec-row > .btn { width: 100%; }
  [data-view="components"] .spec-st { width: 100%; }
  [data-view="components"] .spec-st .btn { width: 100%; min-width: 0; }
  [data-view="components"] .field-marks { grid-template-columns: minmax(0, 1fr); }
  [data-view="components"] .spec-stack label { min-height: 44px; }
}

[data-view="notifications"] .nrow:not(.is-unread) .n-dot { box-shadow: none; }
@media (max-width: 640px) {
  [data-view="trash"] .trow { grid-template-columns: 36px minmax(0, 1fr) auto 44px; grid-template-areas: "lead title restore more" "lead meta meta meta"; row-gap: 2px; }
  [data-view="trash"] .tr-lead { grid-area: lead; align-self: start; margin-top: 2px; }
  [data-view="trash"] .tr-main { display: contents; }
  [data-view="trash"] .tr-main .list-row-title { grid-area: title; align-self: center; white-space: normal; overflow: visible; line-height: 1.3; }
  [data-view="trash"] .tr-from { grid-area: meta; font-size: 13px; }
  [data-view="trash"] .tr-sub2 { display: none; }
  [data-view="trash"] .tr-restore { grid-area: restore; }
  [data-view="trash"] .tr-more { grid-area: more; }
  [data-view="notifications"] .app-head-meta { display: none; }
  [data-view="notifications"] .app-head { flex-wrap: wrap; }
  [data-view="notifications"] .app-head-title { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 640px) { [data-view="notifications"] .app-head-actions > .btn { border-color: transparent; } }


/* =====================================================================================================
   Audit-fix B · app-core lane · Project files rows (scoped to the files page; the rest of this file is the workspace lane's).
   Each row: a typed document badge, the name, its rights basis as a chip that never shrinks, schema chips (CSV columns,
   JSON keys) in one token, and a fixed meta track. Group heads carry the study's field glyph.
   ===================================================================================================== */
[data-page="files"] .frow { --fc: var(--accent); grid-template-columns: minmax(0, 1fr) auto 36px; min-height: 68px; align-items: center; }
[data-page="files"] .frow.has-cols { min-height: 88px; }
[data-page="files"] .frow[data-f="bio"] { --fc: var(--field-bio); } [data-page="files"] .frow[data-f="quant"] { --fc: var(--field-quant); } [data-page="files"] .frow[data-f="policy"] { --fc: var(--field-policy); } [data-page="files"] .frow[data-f="aiml"] { --fc: var(--field-aiml); }
[data-page="files"] .frow.is-sel { background: var(--raised); box-shadow: inset 3px 0 0 var(--fc), 0 0 0 1px rgba(20,20,19,.08), 0 6px 16px -10px rgba(11,24,48,.22); }
[data-page="files"] .frow:hover:not(.is-sel) { background: rgba(20,20,19,.03); }
[data-page="files"] .frow-main { align-items: flex-start; gap: 14px; }
[data-page="files"] .fkico { width: 40px; height: 44px; display: grid; place-items: center; flex: none; background: transparent; box-shadow: none; border-radius: 0; }
[data-page="files"] .fkico .file-badge { --s: 40px; }
[data-page="files"] .fn { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 1px; }
[data-page="files"] .frow .list-row-title { font-size: var(--fs-row); line-height: 22px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; padding-bottom: 1px; }
[data-page="files"] .fsub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-small); line-height: 18px; color: var(--ink-2); white-space: normal; overflow: visible; }
[data-page="files"] .fsub-t { white-space: nowrap; }
[data-page="files"] .rchip { display: inline-flex; flex: none; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
[data-page="files"] .rchip svg { width: 12px; height: 12px; }
[data-page="files"] .rchip[data-r="licensed"] { background: rgba(225,145,54,.14); color: #7a4509; }
[data-page="files"] .rchip[data-r="open"] { background: transparent; color: #0b6157; box-shadow: inset 0 0 0 1px rgba(13,111,98,.4); font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; }
[data-page="files"] .fcols { margin-top: 2px; gap: 4px; }
[data-page="files"] .fcols span { height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(16,108,202,.08); color: #0f4f96; font-size: 12px; font-weight: 500; }
[data-page="files"] .frow.is-sel .fcols span { background: rgba(16,108,202,.12); }
[data-page="files"] .frow .list-row-meta { align-self: center; gap: 14px; }
[data-page="files"] .frow .m-size { width: 64px; font-variant-numeric: tabular-nums; color: var(--ink); }
[data-page="files"] .frow .m-when { width: 84px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
[data-page="files"] .fgroup { gap: 10px; padding: 24px 6px 10px; border-bottom: 0; }
[data-page="files"] .fgroup:first-child { padding-top: 8px; }
[data-page="files"] .fgroup .field-glyph { --s: 28px; border-radius: 8px; }
[data-page="files"] .fg-t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
[data-page="files"] .fgroup b { font-size: var(--fs-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline-end: .14em; }
[data-page="files"] .fgroup .t-mono { font-size: 11px; color: var(--ink-3); flex: none; }
[data-page="files"] .fgroup .fg-n { flex: none; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(20,20,19,.05); font-size: 12px; white-space: nowrap; }
[data-page="files"] .fdrop { min-height: 76px; padding: 14px 18px; border-radius: 12px; border: 1.5px dashed #c9c4b8; background: rgba(20,20,19,.02); }
[data-page="files"] .fdrop:hover { border-style: solid; }
[data-page="files"] .fdrop-t b { text-decoration: underline; text-decoration-color: rgba(20,20,19,.25); text-underline-offset: 3px; }
/* preview table in the inspector: fits its column, numbers aligned, nothing cut */
[data-page="files"] .ptable { table-layout: fixed; font-size: 12px; }
[data-page="files"] .ptable th, [data-page="files"] .ptable td { padding: 7px 6px; overflow: hidden; text-overflow: ellipsis; }
[data-page="files"] .ptable td.is-gap { overflow: visible; }
[data-page="files"] .ptable th.num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; text-overflow: clip; }
[data-page="files"] .ptable th:first-child, [data-page="files"] .ptable td:first-child { width: 30%; }
[data-page="files"] .ptable th { background: rgba(20,20,19,.04); font-weight: 600; color: var(--ink-2); }
[data-page="files"] .ptable td.num, [data-page="files"] .ptable td.is-gap { overflow: visible; }
[data-page="files"] .ptable th.num { font-family: var(--font-mono); font-size: 11px; }
@media (min-width: 641px) {
  [data-page="files"] .frow:hover .fkico, [data-page="files"] .frow:focus-within .fkico, [data-page="files"] .frow.is-checked .fkico { opacity: 0; }
}
@media (max-width: 640px) {
  [data-page="files"] .frow { grid-template-columns: minmax(0, 1fr) 76px; align-items: start; padding: 12px 0; min-height: 0; }
  [data-page="files"] .frow.has-cols { min-height: 0; }
  [data-page="files"] .frow-main { gap: 12px; }
  [data-page="files"] .fkico { width: 36px; height: 40px; margin-top: 1px; }
  [data-page="files"] .fkico .file-badge { --s: 36px; }
  [data-page="files"] .frow .list-row-meta { flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 2px; }
  [data-page="files"] .frow .m-size { width: auto; font-size: 13px; }
  [data-page="files"] .frow .m-when { display: block; width: auto; font-size: 12px; }
  [data-page="files"] .frow .m-go { display: none; }
  [data-page="files"] .fcols span:nth-child(n+4) { display: none; }
  [data-page="files"] .fgroup { padding: 22px 0 8px; }
  [data-page="files"] .fgroup .fg-n { margin-left: auto; display: inline-flex; }
}


[data-view="feedback"] .btn-primary.is-idle { opacity: 1; }
@media (max-width: 640px) { [data-view="notifications"] .inbox-bar .chip { min-height: 44px; } }

[data-view="notifications"] .n-title { line-height: 1.45; padding-block: 1px; padding-inline-end: .14em; }
.tr-back { display: none; }
@media (max-width: 640px) {
  [data-view="trash"] .tr-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -8px 0 -4px -6px; padding: 0 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
  [data-view="trash"] .tr-back svg { width: 16px; height: 16px; }
}
/* audit fix B · trash: selection is a visible column on desktop (the select-all box has rows to act on) */
@media (min-width: 641px) {
  [data-view="trash"] .tr-head, [data-view="trash"] .trow { grid-template-columns: 24px 40px minmax(0, 1fr) 112px 148px 132px; }
  [data-view="trash"] .tr-head span:nth-child(2) { visibility: hidden; }
  [data-view="trash"] .trow .row-check, [data-view="trash"] .trow:hover .row-check { position: static; translate: none; width: 24px; height: 24px; min-height: 24px; opacity: 1; background: none; box-shadow: none; }
  [data-view="trash"] .trow:hover .kico, [data-view="trash"] .trow:focus-within .kico, [data-view="trash"] .trow.is-checked .kico, [data-view="trash"] .ws-trashlist:has(.trow.is-checked) .trow .kico { opacity: 1; }
  [data-view="trash"] .trash-tools { padding-left: 8px; }
}

/* Token swatches use the same variables without injected style attributes. */
.sw-chip[data-swatch="paper"]{--sw:var(--paper)}
.sw-chip[data-swatch="surface"]{--sw:var(--surface)}
.sw-chip[data-swatch="raised"]{--sw:var(--raised)}
.sw-chip[data-swatch="sunken"]{--sw:var(--sunken)}
.sw-chip[data-swatch="ink"]{--sw:var(--ink)}
.sw-chip[data-swatch="ink-2"]{--sw:var(--ink-2)}
.sw-chip[data-swatch="ink-3"]{--sw:var(--ink-3)}
.sw-chip[data-swatch="hairline"]{--sw:var(--hairline)}
.sw-chip[data-swatch="brand-blue"]{--sw:var(--brand-blue)}
.sw-chip[data-swatch="brand-orange"]{--sw:var(--brand-orange)}
.sw-chip[data-swatch="brand-night"]{--sw:var(--brand-night)}
.sw-chip[data-swatch="accent-ink"]{--sw:var(--accent-ink)}
.sw-chip[data-swatch="success"]{--sw:var(--success)}
.sw-chip[data-swatch="warning"]{--sw:var(--warning)}
.sw-chip[data-swatch="danger"]{--sw:var(--danger)}
.sw-chip[data-swatch="info"]{--sw:var(--info)}
