/* Portal entry and data room.
   Every size, gap and colour here is read from the Paper file "Nexus · Landing mockup":
   dark values from page 1, white-view values from the page "Portals — white view".
   Values marked "derived" have no white-view artboard in Paper. */

:root {
  --p-line: #FFFFFF14; --p-side-line: #FFFFFF14; --p-row-line: #FFFFFF0F;
  --p-dim: #8E9094;
  --p-active: #2A2B2E; --p-seg: #1C1D1F;
  --p-ring: #FFFFFF24;
  --p-btn-line: #FFFFFF4D; --p-btn-line-2: #FFFFFF73; --p-btn-line-3: #FFFFFF99;
  --p-track: #35363A;
  --p-tag: #2A2B2E; --p-tag-ink: #D5D7DA;
  --p-float: #1C1D1F; --p-float-line: #FFFFFF29; --p-float-shadow: #00000073;
  --p-selected: #22282A; --p-hover: #FFFFFF08;
  --p-ghost-back: #2A2B2E; --p-ghost-line: #FFFFFF47; --p-ghost-back-line: #FFFFFF24; --p-ghost-shadow: #00000080;
  --p-dash: #FFFFFF40; --p-filter-line: #FFFFFF38;
  --p-up: #1F2023;
}
:root[data-theme="light"] {
  --p-line: #1C1D1F1F; --p-side-line: #1C1D1F1A; --p-row-line: #1C1D1F1F;
  --p-dim: #63656A;
  --p-active: #FFFFFF; --p-seg: #E9E9E3;
  --p-ring: #1C1D1F38;
  --p-btn-line: #1C1D1F73; --p-btn-line-2: #1C1D1F73; --p-btn-line-3: #1C1D1F99;
  --p-track: #D9D9D3;
  --p-tag: #E9E9E3; --p-tag-ink: #3D3F43;
  /* derived: Paper has no white-view artboard for the interaction frames */
  --p-float: #FFFFFF; --p-float-line: #1C1D1F29; --p-float-shadow: #1C1D1F2E;
  --p-selected: #E7EEEC; --p-hover: #1C1D1F08;
  --p-ghost-back: #E9E9E3; --p-ghost-line: #1C1D1F47; --p-ghost-back-line: #1C1D1F24; --p-ghost-shadow: #1C1D1F40;
  --p-dash: #1C1D1F40; --p-filter-line: #1C1D1F38;
  --p-up: #F1F1EC;
}

/* Paper's focus state: a 2px ring in the text colour with a 2px gap */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ───────── Choose your portal (Paper: "Client portal 0") ───────── */
.choose { min-height: 100svh; display: flex; flex-direction: column; gap: 72px; padding: 40px 96px; background: var(--page); }
.choose-head { display: flex; align-items: center; justify-content: space-between; }
.choose-head > div { display: flex; align-items: center; gap: 16px; }
.o-chip { display: flex; padding: 5px 12px; border: 1px solid var(--p-ring); border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--label); white-space: nowrap; }
.back-link { font-size: 14px; line-height: 18px; font-weight: 500; }
.choose main { display: flex; flex-direction: column; gap: 48px; }
.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.solid-pill { display: flex; padding: 6px 12px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 12px; line-height: 16px; font-weight: 600; }
.intro h1 { font-size: 56px; line-height: 64px; font-weight: 300; letter-spacing: -0.03em; text-wrap: wrap; }
.intro p { width: 620px; max-width: 100%; font-size: 16px; line-height: 26px; color: var(--muted); }
.roles { display: flex; gap: 20px; }
.role-card { flex: 1 1 0; display: flex; flex-direction: column; justify-content: space-between; gap: 56px; padding: 28px; border-radius: 12px; background: var(--panel); border: 1px solid var(--p-line); text-align: left; transition: transform 200ms var(--ease-out); }
.role-card:focus-visible { border-radius: 12px; }
.role-text { display: flex; flex-direction: column; gap: 14px; }
.role-num { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.role-title { font-size: 28px; line-height: 34px; font-weight: 400; letter-spacing: -0.01em; text-wrap: wrap; }
.role-desc { font-size: 14px; line-height: 22px; color: var(--muted); }
.role-go { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 20px; border-radius: 999px; background: var(--glass); color: var(--glass-ink); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-shine); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 14px; line-height: 18px; font-weight: 600; }
.role-go svg { flex: none; transition: transform 200ms var(--ease-out); }
.role-card:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .role-card:hover .role-go svg { transform: translateX(3px); }
  .back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* ───────── Portal shell ───────── */
.app { min-height: 100svh; display: flex; background: var(--app); font-size: 13px; line-height: 16px; }
.side { position: sticky; top: 0; flex: none; width: 272px; height: 100svh; overflow-y: auto; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 28px 16px 20px; background: var(--sidebar); border-right: 1px solid var(--p-side-line); }
.side-top { display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; flex-direction: column; gap: 6px; padding: 0 10px; }
.brand .logo { width: 129px; height: 30px; }
.brand p { font-weight: 500; color: var(--muted); }
.case { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--p-line); }
.case b { font-weight: 700; }
.case span { color: var(--muted); }
.search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--p-line); color: var(--p-dim); text-align: left; }
.search svg { flex: none; color: var(--muted); }
.search:focus-visible { border-radius: 12px; }

.tree { display: flex; flex-direction: column; gap: 2px; }
.nav-item, .nav-sub { display: flex; align-items: center; width: 100%; border-radius: 8px; text-align: left; }
.nav-item { justify-content: space-between; gap: 10px; padding: 8px 10px; font-weight: 600; }
.nav-item.is-tall { padding-block: 9px; }
.nav-sub { gap: 10px; padding: 9px 10px 9px 22px; font-weight: 500; color: var(--label); }
.nav-sub i { flex: none; width: 14px; height: 11px; border-radius: 2px; background: var(--c); }
.nav-sub > span:nth-of-type(1) { flex: 1 1 0; }
.tree .n { flex: none; font-weight: 500; color: var(--p-dim); }
.nav-sub .n { width: 30px; text-align: right; }
.app[data-role="buyer"] .tree .n { width: 20px; }
.nav-sub .lock { flex: none; display: flex; justify-content: flex-end; width: 16px; color: var(--p-dim); }
.nav-item[aria-current="page"], .nav-sub[aria-current="true"] { background: var(--p-active); }
.nav-sub[aria-current="true"] { color: var(--ink); font-weight: 600; }
.app[data-role="buyer"] .nav-sub[aria-current="true"] .n { color: var(--label); }
.badge { flex: none; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; background: var(--teal); color: var(--teal-ink); font-size: 12px; font-weight: 700; }
.switch { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; border-top: 1px solid var(--p-line); font-weight: 500; color: var(--muted); }
.switch svg { flex: none; }
.side-foot { padding: 16px 10px 0; border-top: 1px solid var(--p-line); font-size: 13px; line-height: 18px; color: var(--p-dim); }
.side-foot b { font-weight: 700; color: var(--ink); }
.side-extra { display: none; }

.main { flex: 1 1 0; min-width: 0; min-height: 100svh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; flex: none; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; border-bottom: 1px solid var(--p-line); background: var(--app); }
.m-brand { display: none; }
.crumbs { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--p-dim); white-space: pre; }
.crumbs b { font-weight: 600; color: var(--ink); }
/* Segmented control. The thumb is three pieces moved with transforms only, so it can
   slide and change width without animating layout. */
.seg { position: relative; display: flex; padding: 4px; border-radius: 999px; background: var(--p-seg); }
.seg button { position: relative; padding: 6px 16px; border-radius: 999px; font-weight: 500; color: var(--label); white-space: nowrap; }
.seg button[aria-pressed="true"] { font-weight: 600; color: var(--ink); }
.seg-thumb { position: absolute; left: 0; top: 4px; height: 28px; pointer-events: none; }
.seg-thumb i { position: absolute; left: 0; top: 0; height: 28px; background: var(--p-active); transform-origin: 0 0; transition: transform 250ms var(--ease-in-out); }
.seg-thumb i:nth-child(1), .seg-thumb i:nth-child(3) { width: 28px; border-radius: 999px; }
.seg-thumb i:nth-child(2) { width: 100px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.round-btn { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--p-ring); transition: transform 150ms ease-out; }
.round-btn:active, .avatar:active { transform: scale(0.96); }
.round-btn .dot { position: absolute; left: 28px; top: 9px; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
.avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 12px; font-weight: 700; transition: transform 150ms ease-out; }
.round-btn:focus-visible, .avatar:focus-visible, .seg button:focus-visible, .pbtn:focus-visible, .sbtn:focus-visible { border-radius: 999px; }
.menu-btn { display: none; flex-direction: column; gap: 5px; }
.menu-btn i { width: 16px; height: 1.5px; background: var(--ink); }

.content { flex: 1 1 0; display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 1168px; padding: 32px 36px 0; }
.app[data-role="buyer"] .content { gap: 28px; padding-top: 36px; }
.app[data-view="overview"] .content { padding-bottom: 48px; }
.title { display: flex; flex-direction: column; gap: 4px; }
.title h1 { font-size: 40px; line-height: 48px; font-weight: 300; letter-spacing: -0.02em; text-wrap: wrap; }
.title .serif { font-size: 21px; line-height: 28px; }
.actions { display: flex; gap: 10px; padding-top: 14px; }
.pbtn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap; transition: transform 150ms ease-out; }
.pbtn svg { flex: none; }
.pbtn:active, .sbtn:active { transform: scale(0.97); }
.pbtn.is-solid { background: var(--glass); color: var(--glass-ink); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-shine); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pbtn.is-line { border: 1px solid var(--p-btn-line); }
.access, .filters { display: none; }

/* Five-stage tracker */
.tracker { display: flex; gap: 8px; }
.stage-cap { display: none; }
.stage { flex: 1 1 0; display: flex; flex-direction: column; gap: 9px; font-weight: 500; color: var(--p-dim); }
.stage i { height: 3px; border-radius: 2px; background: var(--p-track); }
.stage.is-on { font-weight: 600; color: var(--ink); }
.stage.is-on i { background: var(--btn); }

.block { display: flex; flex-direction: column; gap: 16px; }
.block h2, .panel h2 { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: 0; text-wrap: wrap; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.block-head > span { font-weight: 500; color: var(--p-dim); text-align: right; }

/* ───────── Requests and offers ───────── */
.panels { display: flex; gap: 24px; }
.panel { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.panel-list { display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--p-line); }
.card.is-offer { gap: 10px; }
.card-avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: #CDBF9F; color: #1C1D1F; font-weight: 700; }
.card-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-text p { font-size: 14px; line-height: 18px; font-weight: 500; }
.card-text p b, .card.is-offer .card-text p { font-weight: 700; }
.card-text span { color: var(--p-dim); }
.card-btns { display: contents; }
.sbtn { flex: none; display: flex; justify-content: center; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--p-btn-line); font-weight: 600; white-space: nowrap; transition: transform 150ms ease-out; }
.sbtn.is-strong { border-color: var(--p-btn-line-2); }
.card.is-offer .sbtn, .card.is-offer .state { padding-inline: 14px; }
.state { flex: none; display: flex; padding: 8px 16px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.state.is-teal { background: var(--teal); color: var(--teal-ink); }
.state.is-neutral { background: var(--p-tag); color: var(--p-tag-ink); }
.text-btn { flex: none; font-weight: 500; color: var(--label); text-decoration: underline 1px; text-underline-position: from-font; }

/* ───────── Files ───────── */
.files-block { flex: 1 1 0; gap: 14px; min-height: 0; }
.table { flex: 1 1 0; display: flex; flex-direction: column; min-height: 338px; padding: 6px 12px 96px; background: var(--panel); border: 1px solid var(--p-line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.t-head, .t-row { display: flex; align-items: center; gap: 14px; padding: 13px 8px; }
.t-head { padding-block: 12px; border-bottom: 1px solid var(--p-line); font-weight: 500; color: var(--p-dim); }
.t-row { border-bottom: 1px solid var(--p-row-line); border-radius: 8px; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: opacity 200ms ease; }
.t-row[aria-selected="true"] { background: var(--p-selected); }
.t-row[aria-selected="true"] .name { font-weight: 600; }
.t-row.is-lifted { opacity: 0.4; }
.t-row.is-new { animation: row-in 280ms var(--ease-out); }
@keyframes row-in { from { opacity: 0; transform: translateY(-8px); } }
.t-head .name, .t-row .name { flex: 1 1 0; min-width: 0; }
.t-row .name { font-size: 14px; line-height: 18px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-row .sub { display: none; }
.c { flex: none; font-weight: 500; }
.t-row .c { color: var(--label); }
.c.by { width: 170px; } .c.added { width: 110px; } .c.size { width: 90px; text-align: right; }
.c.cat { width: 160px; display: flex; align-items: center; gap: 8px; }
.c.cat i { flex: none; width: 6px; height: 6px; border-radius: 999px; background: var(--c); }
.c.status { width: 90px; display: flex; }
.table.is-buyer { padding-inline: 20px; }
.table.is-buyer .t-row { padding-block: 15px; }
.table.is-buyer .t-head, .table.is-buyer .t-row { gap: 0; }
.table.is-buyer .c.added { width: 120px; }
.tag { display: flex; padding: 4px 9px; border-radius: 4px; background: var(--p-tag); color: var(--p-tag-ink); font-size: 12px; line-height: 16px; font-weight: 600; }
.tag.is-new { background: var(--teal); color: var(--teal-ink); }
/* Checkbox: 18px box, 44px hit area */
.check { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--p-dim); }
.check::before { content: ""; position: absolute; inset: -14px; }
.check svg { opacity: 0; transform: scale(0.6); transition: opacity 120ms ease, transform 150ms var(--ease-out); }
.check svg path { stroke: var(--btn-ink); }
.check[aria-checked="true"] { background: var(--btn); border-color: var(--btn); }
.check[aria-checked="true"] svg { opacity: 1; transform: none; }
.check:focus-visible { border-radius: 4px; }
/* Upload in progress (Paper: "States" → Loading and upload) */
.up { display: block; width: 110px; height: 4px; border-radius: 2px; background: var(--p-track); overflow: clip; }
.up i { display: block; height: 100%; border-radius: 2px; background: var(--ink); transform-origin: 0 50%; animation: upload 1400ms linear both; }
@keyframes upload { from { transform: scaleX(0); } }
.t-row.is-uploading .c.size { color: var(--ink); font-weight: 600; }
/* Empty folder (Paper: "States" → Empty) */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 20px 8px 0; padding: 28px 20px; border-radius: 12px; border: 1px dashed var(--p-dash); text-align: center; }
.empty.is-buyer { gap: 10px; border: 1px solid var(--p-line); }
.empty b { font-size: 15px; line-height: 18px; font-weight: 600; }
.empty p { max-width: 320px; font-size: 13px; line-height: 20px; color: var(--muted); }
.empty .pbtn { height: 44px; padding-block: 0; }
@media (hover: hover) and (pointer: fine) {
  .t-row:not([aria-selected="true"]):hover, .nav-item:not([aria-current="page"]):hover, .nav-sub:not([aria-current="true"]):hover, .menu button:not(:disabled):hover { background: var(--p-hover); }
  .switch:hover, .text-btn:hover { color: var(--ink); }
}

/* Floating action bar (Paper: "Interaction 1 · Select files"): rises 12px and fades in */
.bar { position: fixed; left: calc(272px + (100% - 272px) / 2 - 36px); bottom: 22px; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 22px; border-radius: 999px; background: var(--p-float); border: 1px solid var(--p-float-line); box-shadow: 0 12px 32px var(--p-float-shadow); font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease-in; }
.bar.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; transition: opacity 200ms ease, transform 240ms var(--ease-out); }
.bar .sep { flex: none; width: 1px; height: 20px; background: var(--p-float-line); }
.bar .pbtn { height: 44px; padding: 0 18px; }
.bar .x { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; color: var(--label); }
.menu-wrap { position: relative; }
/* The menu grows out of its trigger, not from the centre */
.menu { position: absolute; left: 0; bottom: calc(100% + 10px); min-width: 200px; padding: 6px; border-radius: 12px; background: var(--p-float); border: 1px solid var(--p-float-line); box-shadow: 0 12px 32px var(--p-float-shadow); transform-origin: 24px 100%; opacity: 0; transform: scale(0.95); pointer-events: none; transition: opacity 140ms ease, transform 140ms ease-in; }
.menu.is-on { opacity: 1; transform: scale(1); pointer-events: auto; transition: opacity 180ms ease, transform 200ms var(--ease-out); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; text-align: left; }
.menu button i { flex: none; width: 14px; height: 11px; border-radius: 2px; background: var(--c); }
.menu button:disabled { opacity: 0.4; cursor: default; }

/* Drag stack (Paper: "Interaction 2 · Drag to folder"). The pointer sits where Paper draws the cursor. */
.ghost { position: fixed; left: 0; top: 0; z-index: 50; width: 250px; height: 64px; pointer-events: none; }
.ghost i, .ghost div { position: absolute; width: 240px; height: 52px; border-radius: 8px; transform-origin: 0 0; animation: lift 180ms var(--ease-out) both; }
.ghost i { left: 8px; top: 8px; rotate: 3deg; background: var(--p-ghost-back); border: 1px solid var(--p-ghost-back-line); }
.ghost div { left: 0; top: 0; rotate: -2deg; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--p-float); border: 1px solid var(--p-ghost-line); box-shadow: 0 12px 28px var(--p-ghost-shadow); font-size: 13px; line-height: 16px; font-weight: 600; }
.ghost svg { flex: none; }
.ghost span { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghost b { flex: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 12px; font-weight: 700; }
@keyframes lift { from { opacity: 0; transform: scale(0.95); } }
body.is-dragging, body.is-dragging * { cursor: default !important; }

/* Toast (Paper: "Interaction 3 · Moved, with undo"). Overrides the base.css toast, which sits bottom right. */
.toasts { top: 76px; right: 36px; bottom: auto; gap: 10px; }
.toast { width: 380px; max-width: calc(100vw - 32px); min-height: 62px; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--p-float); border: 1px solid var(--p-float-line); box-shadow: 0 12px 32px var(--p-float-shadow); font-size: 14px; line-height: 18px; font-weight: 500; animation: toast-drop 260ms var(--ease-out) both; }
.toast.is-out { animation: toast-lift 160ms ease-in both; }
.toast .dot { flex: none; width: 22px; height: 22px; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2L5 8.7L9.5 3.5' fill='none' stroke='%23DCEBF6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 11px no-repeat; }
.toast > span:nth-child(2) { flex: 1 1 0; }
.toast b { font-weight: 700; }
.toast button { flex: none; min-height: 0; height: 44px; padding: 0 18px; border: 1px solid var(--p-btn-line); font-size: 14px; line-height: 18px; font-weight: 600; }
@keyframes toast-drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toast-lift { to { opacity: 0; transform: translateY(-6px); } }

.scrim { display: none; }

/* ───────── Narrow desktop ───────── */
@media (max-width: 1180px) {
  .choose { padding: 32px 40px; gap: 56px; }
  .roles { flex-wrap: wrap; }
  .role-card { flex-basis: 280px; }
  .panels { flex-direction: column; }
  .folders { margin-right: -36px; padding-right: 36px; overflow-x: auto; scrollbar-width: none; }
  .folders::-webkit-scrollbar { display: none; }
  .c.by { width: 120px; }
}

/* ───────── Phone (Paper: "Phone — Seller portal" and "Phone — Buyer portal · Data room") ───────── */
@media (max-width: 700px) {
  .choose { padding: 24px 20px 40px; gap: 40px; }
  .choose-head .logo { width: 120px; height: 28px; }
  .choose-head .o-chip { display: none; }
  .intro h1 { font-size: 34px; line-height: 40px; }
  .roles { flex-direction: column; }
  .role-card { flex: none; gap: 32px; padding: 20px; }

  .app { display: block; }
  .side { position: fixed; z-index: 31; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform 200ms ease-in, visibility 0s 200ms; }
  .app.is-menu .side { transform: none; visibility: visible; transition: transform 260ms var(--ease-out); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: #00000080; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  .app.is-menu .scrim { opacity: 1; pointer-events: auto; }
  .side-extra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; }

  .top { height: auto; padding: 12px 16px 12px 20px; }
  .m-brand { display: flex; flex-direction: column; gap: 2px; font-weight: 500; color: var(--muted); }
  .m-brand .logo { width: 120px; height: 28px; }
  .crumbs, .seg, .top-right .o-chip, .top-right [data-theme-toggle], .avatar { display: none; }
  .top-right { gap: 8px; }
  .top-right .round-btn svg { width: 18px; height: 18px; }
  .round-btn .dot { left: auto; right: 10px; top: 10px; }
  .menu-btn { display: flex; }

  .content, .app[data-role="buyer"] .content { gap: 20px; padding: 24px 20px 0; }
  .title h1 { font-size: 34px; line-height: 40px; }
  .title .serif { font-size: 18px; line-height: 24px; }
  .actions { flex-direction: column; padding-top: 16px; }
  .actions .pbtn { height: 52px; padding-block: 0; font-size: 16px; line-height: 20px; }
  .actions .pbtn svg { display: none; }
  .app[data-role="buyer"] .access { display: block; font-size: 13px; line-height: 20px; color: var(--muted); }
  .access b { font-weight: 700; color: var(--ink); }
  .app[data-role="buyer"] .filters { display: flex; gap: 8px; margin-right: -20px; padding-right: 20px; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--p-filter-line); font-size: 14px; line-height: 18px; font-weight: 500; }
  .filters button[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); font-weight: 600; }

  .tracker { flex-wrap: wrap; gap: 4px; row-gap: 10px; }
  .stage-cap { display: flex; justify-content: space-between; flex: 0 0 100%; font-weight: 600; }
  .stage-cap span + span { font-weight: 500; color: var(--muted); }
  .stage span { display: none; }

  .block { gap: 20px; }
  .folders { gap: 12px; margin-right: -20px; padding-right: 20px; }

  .panels { gap: 20px; }
  .panel { gap: 20px; }
  .panel .block-head > span { display: none; }
  .card { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .card-avatar { display: none; }
  .card-text { flex-basis: 100%; }
  .card-text p { font-size: 15px; }
  .card.is-open { order: -1; }
  .card.is-open .card-text span { display: none; }
  .card-btns { display: flex; gap: 8px; flex: 1 1 100%; }
  .card-btns .sbtn { flex: 1 1 0; align-items: center; height: 44px; padding-block: 0; font-size: 14px; line-height: 18px; }
  .card-btns .sbtn.is-strong { flex-grow: 2; border-color: var(--p-btn-line-3); }
  .card-btns .text-btn { flex: none; align-self: center; padding: 0 8px; }

  /* Files become a plain list, as in the buyer phone artboard */
  .files-block { gap: 20px; }
  .files-block .block-head > span { display: none; }
  .table, .table.is-buyer { min-height: 0; padding: 0 0 120px; background: none; border: 0; border-radius: 0; }
  .t-head { padding: 0 0 12px; border: 0; }
  .t-head > :not(.check) { display: none; }
  .table.is-buyer .t-head { display: none; }
  .t-row, .table.is-buyer .t-row { min-height: 60px; padding: 0; gap: 14px; border-bottom: 0; border-top: 1px solid var(--p-line); border-radius: 0; }
  .t-row .name { display: flex; flex-direction: column; gap: 3px; font-size: 15px; white-space: normal; }
  .t-row .sub { display: block; font-size: 13px; line-height: 16px; font-weight: 400; color: var(--p-dim); }
  .t-row .c { display: none; }
  .t-row .c.status, .t-row.is-uploading .c.by { display: flex; width: auto; }
  .up { width: 72px; }
  .empty { margin: 0; }

  .bar { left: 50%; bottom: 16px; gap: 8px; padding-left: 16px; }
  .bar .pbtn { padding: 0 14px; }
  .bar .pbtn svg { display: none; }
  .toasts { top: 84px; right: 16px; left: 16px; justify-items: stretch; }
  .toast { width: auto; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .folder:hover .f-front, .folder:hover .f-sheet, .folder.is-target .f-front, .folder.is-target .f-sheet { transform: none; }
}
