/* Hallmark · shape: app screen · genre: modern-minimal · theme: Dusk (by request, the el zone system of the life, admin and tools apps, set flat and dense) · redesign: full
 * nav: one top bar, the wordmark, the app label, a search field and one action · signature: the file row, one line holding the name, the size, the date and the sources it is stored on, over a status bar of the six figures · states: empty, full, uploading, error
 * axes: dark/grotesk-sans/cool · posture: committed · contrast: pass · finish-review: subagent · 8 findings · 8 resolved · gap: the old figures stood large at the top; on desktop they are now a small status bar by choice (example C) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, the third flat el zone tool after admin and tools; the status bar, the path as the title and the icon actions set this one apart */
/* Hallmark · dismissed 41 · the primary button is the paper colour on an ink fill, the el zone flat primary shared with admin and tools; 15:1 in both themes */
/* Hallmark · dismissed F5 · the ::before is a 4px state dot at the corner of the link icon, not a tinted coin behind it; with the label it says the file is public */
/* Hallmark · answered F2 · the three dots in "checking..." and "uploading..." match the progress strings disk.js and diskdl.js write over them */
/* Hallmark · answered F7 · every field shares one recipe so a password box, a select and the search read as the same control; the pills are 4px progress and storage tracks */
/* Hallmark · reworded "+ Upload" to "Upload", "+ Folder" to "New folder", "Search files..." to "Search files", "settings" to "Settings", "Remember this password - it cannot be recovered" to "Remember this password, it cannot be recovered", "4 files • 1 folders" to "4 files, 1 folder" · 63 names the dot and the glued plus, 19 the dash; titles, buttons and labels are set in sentence case throughout ("Delete File" to "Delete file", "add source" to "Add source") */
/* Hallmark · dropped the random gradient behind the download page, the emoji file icons, .radio-icon and .meta-separator · 2a, 30a and 63 name them; line icons from one sprite and columns stand in */
:root {
  color-scheme: dark;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px;
  --text-xs: 0.75rem; --text-code: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms;
  --container: 1200px; --gutter: var(--space-xl); --pad-x: var(--space-sm); --bar-h: 56px; --ctl-h: 32px; --ctl-h-sm: 28px; --field-h: 36px; --row-h: 38px; --hit: 44px; --switch-w: 36px; --switch-h: 20px;
  --file-cols: var(--space-md) minmax(0, 1fr) 5.5rem 9.5rem minmax(0, 13rem) 6.5rem;
  --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500;
  --color-paper: oklch(17.5% 0.014 268); --color-paper-2: oklch(21% 0.016 268); --color-paper-3: oklch(26% 0.018 268); --color-sunk: oklch(14.5% 0.014 268);
  --color-ink: oklch(96% 0.006 75); --color-ink-2: oklch(85% 0.010 262); --color-muted: oklch(72% 0.016 262);
  --color-rule: oklch(30% 0.016 266); --color-edge: oklch(56% 0.02 266);
  --color-split: oklch(100% 0 0 / 0.07); --color-lift: oklch(100% 0 0 / 0.05); --color-lift-2: oklch(100% 0 0 / 0.1); --color-scrim: oklch(9% 0.02 268 / 0.72);
  --color-accent: oklch(77% 0.10 274); --color-accent-hi: oklch(84% 0.085 274); --color-accent-ink: oklch(19% 0.035 274); --color-accent-dim: oklch(30% 0.05 274); --color-accent-text: var(--color-accent-hi); --color-focus: oklch(80% 0.10 274);
  --color-accent-2: oklch(83% 0.095 62); --color-accent-2-dim: oklch(30% 0.04 62); --color-accent-2-text: var(--color-accent-2);
  --color-error: oklch(76% 0.13 27); --color-error-dim: oklch(27% 0.05 27);
  --primary-bg: var(--color-ink); --primary-bg-hover: var(--color-ink-2); --primary-ink: var(--color-paper);
  --edge: inset 0 0 0 1px var(--color-rule);
  --shadow-pop: 0 32px 64px -24px oklch(8% 0.02 268 / 0.7);
  --font-display: "Wix Madefor Display", ui-sans-serif, system-ui, sans-serif; --font-body: "Wix Madefor Text", ui-sans-serif, system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-card: 10px; --radius-inner: 8px; --radius-chip: 6px; --radius-pill: 999px; --radius-ctl: var(--radius-inner);
  --tracking-display: -0.022em; --display-weight: 500;
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2314162b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.2 8.4 6.9 11l5-5.6'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23b4b8c8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5l3-3'/%3E%3C/svg%3E");
}
:root[data-theme="light"] {
  color-scheme: light;
  --color-paper: oklch(98.6% 0.005 274); --color-paper-2: oklch(96.4% 0.009 274); --color-paper-3: oklch(92.5% 0.016 274); --color-sunk: oklch(99.6% 0.003 274);
  --color-ink: oklch(22% 0.03 268); --color-ink-2: oklch(35% 0.03 268); --color-muted: oklch(46% 0.03 268);
  --color-rule: oklch(89% 0.018 274); --color-edge: oklch(62% 0.03 272);
  --color-split: oklch(22% 0.03 268 / 0.1); --color-lift: oklch(22% 0.03 268 / 0.04); --color-lift-2: oklch(22% 0.03 268 / 0.08); --color-scrim: oklch(22% 0.03 268 / 0.35);
  --color-accent: oklch(44% 0.13 274); --color-accent-hi: oklch(38% 0.13 274); --color-accent-ink: oklch(98% 0.01 274); --color-accent-dim: oklch(93% 0.035 274); --color-accent-text: oklch(40% 0.13 274); --color-focus: oklch(44% 0.13 274);
  --color-accent-2: oklch(72% 0.13 62); --color-accent-2-dim: oklch(93% 0.05 70); --color-accent-2-text: oklch(42% 0.09 55);
  --color-error: oklch(48% 0.17 27); --color-error-dim: oklch(94% 0.03 27);
  --shadow-pop: 0 24px 48px -24px oklch(22% 0.03 268 / 0.28);
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f7f7fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.2 8.4 6.9 11l5-5.6'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23565b72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5l3-3'/%3E%3C/svg%3E");
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule) var(--color-paper); scroll-padding-top: var(--space-3xl); }
body { margin: 0; min-height: 100dvh; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); font-synthesis: none; }
::selection { background: color-mix(in oklab, var(--color-accent) 30%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.15; color: var(--color-ink); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h1 { font-size: var(--text-2xl); } h2, h3 { font-size: var(--text-lg); } h4 { font-size: var(--text-md); letter-spacing: 0; }
p { margin: 0 0 var(--space-xs); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }
small { font-size: var(--text-xs); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; flex-shrink: 0; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: var(--space-md); height: var(--space-md); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-ctl); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.skip:focus-visible { top: var(--space-md); }
.text-muted { color: var(--color-muted); }

/* top bar */
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); border-bottom: 1px solid var(--color-rule); background: var(--color-paper); }
.bar-in { display: flex; align-items: center; gap: var(--space-sm) var(--space-md); width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); min-height: var(--bar-h); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: baseline; gap: var(--space-2xs); margin-right: auto; border-radius: var(--radius-chip); font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); line-height: 1.2; color: var(--color-muted); text-decoration: none; white-space: nowrap; transition: color var(--dur-micro) var(--ease-out); }
.brand b { font-weight: 600; color: var(--color-ink); }
.brand small { margin-left: var(--space-2xs); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; }
a.brand:hover { color: var(--color-ink-2); }
.search-box { position: relative; display: flex; align-items: center; min-width: 0; }
.search-box > .icon { position: absolute; left: var(--space-sm); color: var(--color-muted); }
.search-input { width: 17rem; max-width: 100%; height: var(--ctl-h); padding: 0 var(--space-xl) 0 calc(var(--space-xl) - var(--space-2xs)); border: 1px solid var(--color-edge); border-radius: var(--radius-ctl); background: var(--color-sunk); color: var(--color-ink); font-size: var(--text-sm); transition: border-color var(--dur-micro) var(--ease-out); }
.search-input::placeholder, .form-input::placeholder, .dl-form-input::placeholder { color: var(--color-muted); opacity: 1; }
.search-input:hover { border-color: var(--color-ink-2); }
.search-input:focus-visible { outline-offset: -1px; }
.js-clear-search { position: absolute; right: var(--space-2xs); display: grid; place-items: center; width: var(--space-lg); height: var(--space-lg); padding: 0; border: 0; border-radius: var(--radius-chip); background: transparent; color: var(--color-muted); transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.js-clear-search::after { content: ""; position: absolute; inset: calc((var(--space-lg) - var(--hit)) / 2); }
.js-clear-search:hover { background: var(--color-lift-2); color: var(--color-ink); }
.js-clear-search:active { background: var(--color-lift); }
.search-input:placeholder-shown + .js-clear-search { display: none; }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--ctl-h); padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-ctl); background: transparent; color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-lift); }
.btn:active { background: var(--color-lift-2); transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn .icon { color: var(--color-muted); }
.btn-primary { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-ink); }
.btn-primary:hover, .btn-primary:active { border-color: var(--primary-bg-hover); background: var(--primary-bg-hover); }
.btn-danger { color: var(--color-error); }
.btn-danger:hover, .btn-danger:active { background: var(--color-error-dim); }
.btn-warning { color: var(--color-accent-2-text); }
.btn-warning:hover, .btn-warning:active { background: var(--color-accent-2-dim); }
.btn-sm { min-height: var(--ctl-h); }
.btn-close { position: relative; display: grid; place-items: center; flex-shrink: 0; width: var(--ctl-h); height: var(--ctl-h); padding: 0; border: 0; border-radius: var(--radius-ctl); background: transparent; color: var(--color-muted); transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.btn-close::after { content: ""; position: absolute; inset: calc((var(--ctl-h) - var(--hit)) / 2); }
.btn-close:hover { background: var(--color-lift-2); color: var(--color-ink); }
.btn-close:active { background: var(--color-lift); }

/* the page: the path and the tools on one line, the files, the figures as a status bar */
.disk-container { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; grid-template-areas: "flash" "head" "upload" "files" "stats"; width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); min-height: calc(100dvh - var(--bar-h) - 1px); margin-inline: auto; padding: var(--space-lg) var(--gutter) 0; }
.page-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-lg); min-width: 0; }
.page-title { min-width: 0; }
.page-title h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3xs); min-width: 0; margin-left: calc(-1 * var(--space-xs)); font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.2; }
.breadcrumb-item { padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-chip); color: var(--color-muted); text-decoration: none; transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.breadcrumb-item:last-child { color: var(--color-ink); }
.breadcrumb-item:hover { background: var(--color-lift); color: var(--color-ink); }
.breadcrumb-item:active { background: var(--color-lift-2); }
.breadcrumb-item.drag-over { background: var(--color-accent-dim); color: var(--color-accent-text); }
.breadcrumb-separator { font-family: var(--font-body); font-size: var(--text-sm); color: var(--color-edge); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.sort-dropdown { position: relative; }
.sort-menu { position: absolute; top: calc(100% + var(--space-2xs)); right: 0; z-index: var(--z-dropdown); display: none; min-width: 11rem; padding: var(--space-2xs); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--edge), var(--shadow-pop); }
.sort-menu.show { display: block; }
.sort-option { display: block; width: 100%; min-height: var(--ctl-h); padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-chip); background: transparent; color: var(--color-ink-2); font-size: var(--text-sm); text-align: left; transition: background-color var(--dur-micro) var(--ease-out); }
.sort-option:hover { background: var(--color-lift-2); color: var(--color-ink); }
.sort-option:active { background: var(--color-lift); }
.sort-option:focus-visible { outline-offset: -2px; }
.view-toggle { display: inline-flex; overflow: hidden; border-radius: var(--radius-ctl); box-shadow: var(--edge); }
.view-btn { position: relative; display: grid; place-items: center; width: var(--ctl-h); height: var(--ctl-h); padding: 0; border: 0; background: transparent; color: var(--color-muted); transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.view-btn::after { content: ""; position: absolute; inset: calc((var(--ctl-h) - var(--hit)) / 2) 0; }
.view-btn:hover { color: var(--color-ink); }
.view-btn:active { background: var(--color-lift); }
.view-btn.active { background: var(--color-lift-2); color: var(--color-ink); }
.view-btn:focus-visible { outline-offset: -2px; }

/* files */
.files-section { grid-area: files; min-width: 0; margin: var(--space-sm) calc(-1 * var(--pad-x)) var(--space-2xl); }
.files-cols, .view-list .file-item { display: grid; grid-template-columns: var(--file-cols); align-items: center; column-gap: var(--space-md); padding-inline: var(--pad-x); }
.files-cols { padding-block: var(--space-xs); border-top: 1px solid var(--color-rule); font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.files-section:has(.view-grid) .files-cols { display: none; }
.col-name { grid-column: 1 / 3; }
.col-size { text-align: right; }
.file-item { position: relative; min-width: 0; font-size: var(--text-sm); transition: background-color var(--dur-micro) var(--ease-out); }
.file-item.dragging { opacity: 0.5; }
.folder-item { cursor: pointer; }
.folder-item.drag-over { background: var(--color-accent-dim); box-shadow: inset 0 0 0 1px var(--color-accent); }
.file-icon { position: relative; display: grid; place-items: center; width: var(--space-lg); height: var(--space-lg); margin-inline: calc(-1 * var(--space-2xs)); padding: 0; border: 0; border-radius: var(--radius-chip); background: transparent; color: var(--color-muted); }
.folder-item .file-icon { color: var(--color-ink-2); }
.js-file-icon { transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.js-file-icon::after { content: ""; position: absolute; inset: calc((var(--space-lg) - var(--hit)) / 2); }
.js-file-icon:hover { background: var(--color-lift-2); color: var(--color-ink); }
.js-file-icon:active { background: var(--color-lift); }
.file-title { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.file-name { min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink); }
button.file-name { min-height: var(--ctl-h); padding: 0; border: 0; border-radius: var(--radius-chip); background: transparent; font-size: inherit; text-align: left; }
.folder-item:hover button.file-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.file-badge.encrypted { display: inline-flex; color: var(--color-accent-2-text); }
.folder-count { flex-shrink: 0; font-size: var(--text-xs); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--color-muted); }
.file-badge .icon { width: var(--space-sm); height: var(--space-sm); stroke-width: 1.75; }
.file-meta { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.file-meta > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; align-items: center; gap: var(--space-3xs); }
.btn-icon { position: relative; display: inline-grid; place-items: center; width: var(--ctl-h-sm); height: var(--ctl-h-sm); padding: 0; border: 0; border-radius: var(--radius-chip); background: transparent; color: var(--color-muted); transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.btn-icon::after { content: ""; position: absolute; inset: calc((var(--ctl-h-sm) - var(--hit)) / 2) calc(-1 * var(--space-3xs)); }
.btn-icon:hover { background: var(--color-lift-2); color: var(--color-ink); }
.btn-icon:active { background: var(--color-lift); }
.btn-icon-success { color: var(--color-accent-text); }
.btn-icon-success .icon { stroke-width: 2; }
.btn-icon-success:hover { color: var(--color-accent-text); }
.btn-icon-success::before { content: ""; position: absolute; top: calc(50% - var(--space-sm)); right: calc(50% - var(--space-sm)); width: var(--space-2xs); height: var(--space-2xs); border-radius: 50%; background: currentColor; }
.empty-state { grid-column: 1 / -1; padding: var(--space-3xl) var(--pad-x); font-size: var(--text-sm); text-align: center; color: var(--color-muted); }
.files-section:has(.empty-state) .files-cols { display: none; }
.files-list:has(> .empty-state) { border-top: 1px solid var(--color-rule); }
.empty-state p { margin: 0; }

/* files: list */
.files-list.view-list { border-bottom: 1px solid var(--color-split); }
.view-list .file-item { min-height: var(--row-h); border-top: 1px solid var(--color-split); }
.view-list .file-item:hover { background: var(--color-lift); }
.view-list .file-main, .view-list .file-info, .view-list .file-meta { display: contents; }
.view-list .file-icon { grid-column: 1; grid-row: 1; }
.view-list .file-title { grid-column: 2; grid-row: 1; }
.view-list .file-size, .view-list .folder-size { grid-column: 3; grid-row: 1; text-align: right; }
.view-list .file-date, .view-list .folder-date { grid-column: 4; grid-row: 1; }
.view-list .file-sources { grid-column: 5; grid-row: 1; }
.view-list .file-actions { grid-column: 6; grid-row: 1; justify-content: flex-end; margin-right: calc(-1 * var(--space-2xs)); }

/* files: grid */
.files-list.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); gap: var(--space-sm); padding: var(--space-md) var(--pad-x) 0; border-top: 1px solid var(--color-rule); }
.view-grid .file-item { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-md) var(--space-md) var(--space-xs); border-radius: var(--radius-card); box-shadow: var(--edge); }
.view-grid .file-item:hover { background: var(--color-lift); }
.view-grid .file-main { display: grid; grid-template-columns: var(--space-lg) minmax(0, 1fr); column-gap: var(--space-xs); flex: 1; align-content: start; }
.view-grid .file-info { min-width: 0; }
.view-grid .file-title { min-height: var(--space-lg); }
.view-grid button.file-name { min-height: var(--space-lg); }
.view-grid .file-meta { display: grid; gap: var(--space-3xs); margin-top: var(--space-2xs); font-size: var(--text-xs); }
.view-grid .file-actions { margin-inline: calc(-1 * var(--space-xs)); padding-top: var(--space-2xs); border-top: 1px solid var(--color-split); }
.view-grid .btn-icon { width: var(--ctl-h); height: var(--ctl-h); }

/* the figures: a status bar pinned under the files */
.stats { grid-area: stats; position: sticky; bottom: 0; z-index: var(--z-sticky); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); min-width: 0; margin-inline: calc(-1 * var(--pad-x)); padding-inline: var(--pad-x); border-top: 1px solid var(--color-rule); background: var(--color-paper); }
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-xs); align-items: baseline; padding: var(--space-xs) var(--space-md); font-size: var(--text-xs); line-height: 1.4; font-variant-numeric: tabular-nums; }
.stat + .stat { box-shadow: inset 1px 0 0 var(--color-split); }
.stat:first-child { padding-left: 0; }
.stat-label { font-weight: 500; color: var(--color-muted); }
.stat-value { font-weight: 500; white-space: nowrap; color: var(--color-ink); }
.stat-sub { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-muted); }

/* upload */
.upload-section { grid-area: upload; min-width: 0; }
.upload-in { margin-top: var(--space-sm); padding-block: var(--space-md) var(--space-lg); border-top: 1px solid var(--color-rule); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin: 0 calc(-1 * var(--space-xs)) var(--space-sm) 0; }
.upload-area { padding: var(--space-xl) var(--space-lg); border: 1px dashed var(--color-edge); border-radius: var(--radius-inner); background: var(--color-sunk); color: var(--color-ink-2); cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.upload-area:hover { border-color: var(--color-ink-2); }
.upload-area.drag-over { border-style: solid; border-color: var(--color-accent); background: var(--color-accent-dim); }
.upload-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-xs) var(--space-sm); font-size: var(--text-sm); text-align: center; pointer-events: none; }
.upload-prompt p { margin: 0; }
.upload-icon { color: var(--color-muted); }
.upload-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: var(--space-lg) var(--space-xl); }
.file-preview { align-self: start; max-height: 14rem; overflow-y: auto; border-radius: var(--radius-inner); background: var(--color-sunk); box-shadow: inset 0 0 0 1px var(--color-split); }
.file-preview-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: var(--ctl-h); padding: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); }
.file-preview-item + .file-preview-item { border-top: 1px solid var(--color-split); }
.file-preview-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink); }
.file-preview-size { flex-shrink: 0; font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: var(--color-muted); }
.option-group { min-width: 0; }
.option-label, .form-label, .dl-form-label { display: block; margin-bottom: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.option-hint, .form-hint, .dl-form-hint { display: block; margin-top: var(--space-2xs); font-size: var(--text-xs); line-height: 1.45; color: var(--color-muted); }
.source-checkboxes, .encryption-options-compact { display: grid; }
.source-checkbox, .encryption-radio-option, .checkbox-wrapper { display: flex; align-items: center; gap: var(--space-xs); min-height: var(--ctl-h); font-size: var(--text-sm); color: var(--color-ink-2); cursor: pointer; }
.source-checkbox .source-name { font-weight: 400; color: inherit; }
.radio-label { display: flex; min-width: 0; }
.custom-password-input { margin-top: var(--space-xs); }
.upload-actions, .modal-actions, .form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-xs); margin-top: var(--space-lg); }
.upload-progress { margin-top: var(--space-sm); }
.progress-info, .dl-progress-info { display: flex; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-xs); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-ink-2); }
.progress-bar, .source-progress-bar, .storage-bar-compact, .dl-progress-bar { height: var(--space-2xs); overflow: hidden; border-radius: var(--radius-pill); background: var(--color-paper-3); }
.progress-fill, .source-progress-fill, .storage-fill, .dl-progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--color-accent); }
.storage-fill.storage-warning { background: var(--color-accent-2); }
.storage-fill.storage-full { background: var(--color-error); }

/* checks, radios, switches */
input[type="checkbox"], input[type="radio"] { appearance: none; flex-shrink: 0; width: var(--space-md); height: var(--space-md); margin: 0; border: 1px solid var(--color-edge); border-radius: var(--space-2xs); background: var(--color-sunk) center / contain no-repeat; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--color-ink-2); }
input[type="checkbox"]:checked { border-color: var(--color-accent); background-color: var(--color-accent); background-image: var(--i-tick); }
input[type="radio"]:checked { border-color: var(--color-accent); background-color: var(--color-accent); box-shadow: inset 0 0 0 3px var(--color-sunk); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }
.theme-switch, .source-toggle { position: relative; display: inline-flex; flex-shrink: 0; width: var(--switch-w); height: var(--switch-h); cursor: pointer; }
.theme-switch input, .source-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; opacity: 0; }
.theme-slider, .toggle-slider { position: absolute; inset: 0; border-radius: var(--radius-pill); background: var(--color-paper-3); box-shadow: inset 0 0 0 1px var(--color-edge); transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.theme-slider::before, .toggle-slider::before { content: ""; position: absolute; inset: var(--space-3xs) auto var(--space-3xs) var(--space-3xs); width: calc(var(--switch-h) - 2 * var(--space-3xs)); border-radius: 50%; background: var(--color-ink-2); transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.theme-switch::after, .source-toggle::after { content: ""; position: absolute; inset: calc((var(--switch-h) - var(--hit)) / 2) calc(-1 * var(--space-2xs)); }
input:checked + .theme-slider, input:checked + .toggle-slider { background: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
input:checked + .theme-slider::before, input:checked + .toggle-slider::before { background: var(--color-accent-ink); transform: translateX(calc(var(--switch-w) - var(--switch-h))); }
input:focus-visible + .theme-slider, input:focus-visible + .toggle-slider { outline: 2px solid var(--color-focus); outline-offset: 2px; }
input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }
.toggle-row { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }

/* fields */
.form-group { margin-bottom: var(--space-md); }
.form-group:has(> .checkbox-wrapper) > .form-label { display: none; }
.form-input, .dl-form-input { display: block; width: 100%; min-height: var(--field-h); padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--color-edge); border-radius: var(--radius-inner); background-color: var(--color-sunk); color: var(--color-ink); font-size: var(--text-sm); line-height: 1.4; transition: border-color var(--dur-micro) var(--ease-out); }
.form-input:hover, .dl-form-input:hover { border-color: var(--color-ink-2); }
.form-input:focus-visible, .dl-form-input:focus-visible { outline-offset: -1px; }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-input[readonly] { color: var(--color-ink-2); }
select.form-input, select.dl-form-input { appearance: none; padding-right: var(--space-xl); background-image: var(--i-chev); background-repeat: no-repeat; background-position: right var(--space-sm) center; background-size: var(--space-sm); cursor: pointer; }
select.form-input option, select.dl-form-input option { background: var(--color-paper-2); color: var(--color-ink); }
textarea.form-input { min-height: calc(var(--field-h) * 2.5); padding-block: var(--space-xs); resize: vertical; }
.password-input-wrapper, .custom-password-input-wrapper, .dl-password-wrapper { display: flex; align-items: center; gap: var(--space-3xs); padding-right: var(--space-2xs); border: 1px solid var(--color-edge); border-radius: var(--radius-inner); background: var(--color-sunk); transition: border-color var(--dur-micro) var(--ease-out); }
.password-input-wrapper:hover, .custom-password-input-wrapper:hover, .dl-password-wrapper:hover { border-color: var(--color-ink-2); }
.password-input-wrapper:has(input:focus-visible), .custom-password-input-wrapper:has(input:focus-visible), .dl-password-wrapper:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.password-input-wrapper .form-input, .custom-password-input-wrapper .form-input, .dl-password-wrapper .dl-form-input { flex: 1; min-width: 0; min-height: calc(var(--field-h) - 2px); border: 0; background: transparent; }
.password-input-wrapper .form-input:focus-visible, .custom-password-input-wrapper .form-input:focus-visible, .dl-password-wrapper .dl-form-input:focus-visible { outline: 0; }
.password-toggle-btn, .password-default-btn, .dl-password-toggle { position: relative; flex-shrink: 0; min-height: calc(var(--field-h) - var(--space-xs)); padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-chip); background: transparent; color: var(--color-muted); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.password-toggle-btn::after, .password-default-btn::after, .dl-password-toggle::after { content: ""; position: absolute; inset: calc((var(--field-h) - var(--space-xs) - var(--hit)) / 2) 0; }
.password-toggle-btn:hover, .password-default-btn:hover, .dl-password-toggle:hover { background: var(--color-lift-2); color: var(--color-ink); }
.password-toggle-btn:active, .password-default-btn:active, .dl-password-toggle:active { background: var(--color-lift); }
.password-btn-custom-indicator { pointer-events: none; }
.indicator-badge, .indicator-badge-small, .source-auth-status, .dl-file-badge { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: calc(var(--space-md) + var(--space-2xs)); padding: 0 var(--space-xs); border-radius: var(--radius-pill); background: var(--color-accent-dim); font-size: var(--text-xs); font-weight: 500; line-height: 1; white-space: nowrap; color: var(--color-accent-text); }
.custom-password-indicator, .upload-custom-password-indicator { margin-left: var(--space-2xs); }

/* dialogs */
.modal, .dl-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: none; align-items: center; justify-content: center; padding: var(--space-md); background: var(--color-scrim); }
.modal.active { display: flex; }
#sourceSelectModal { z-index: calc(var(--z-modal) + 10); }
#errorModal, #warningModal { z-index: calc(var(--z-modal) + 20); }
.modal-content, .dl-modal-content { width: min(100%, 28rem); max-height: calc(100dvh - 2 * var(--space-md)); overflow-y: auto; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); box-shadow: var(--edge), var(--shadow-pop); }
.modal-content.modal-large { width: min(100%, 38rem); }
.modal-content > h3, .dl-modal-content > h2 { margin-bottom: var(--space-sm); }
.modal-content p, .dl-modal-content p { font-size: var(--text-sm); color: var(--color-ink-2); overflow-wrap: anywhere; }
.modal-content p.text-muted { color: var(--color-muted); }
.modal-content p strong { font-weight: 500; color: var(--color-ink); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin: calc(-1 * var(--space-2xs)) calc(-1 * var(--space-xs)) var(--space-md) 0; }
.modal-content > .form-group { margin: var(--space-sm) 0 0; }
.modal-content > .password-input-wrapper { margin-top: var(--space-md); }
.modal-danger { justify-content: flex-start; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-split); }
.settings-section + .modal-danger { margin-top: 0; }
.share-link-container { display: flex; align-items: center; gap: var(--space-xs); margin-block: var(--space-sm); }
.share-link-container .form-input { flex: 1; min-width: 0; font-family: var(--font-code); font-size: var(--text-code); }
.share-link-container .btn, .file-name-input-group .btn { min-height: var(--field-h); }
.share-note { margin-top: var(--space-sm); font-size: var(--text-xs); }
.file-name-input-group { display: flex; align-items: center; gap: var(--space-xs); }
.file-name-input-group .form-input { flex: 1; min-width: 0; }
.source-select-list { display: grid; gap: var(--space-xs); margin-top: var(--space-md); }
.source-select-list > p:empty { display: none; }
.source-select-item { display: flex; align-items: center; min-height: var(--hit); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-inner); box-shadow: var(--edge); font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.source-select-item:hover { background: var(--color-lift); }
.source-select-item:active { background: var(--color-lift-2); }
.source-select-info { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); width: 100%; }
.source-select-type { font-weight: 500; }
.source-select-parts { font-size: var(--text-xs); color: var(--color-muted); }
.loading-state, .error-state, .preview-loading { padding-block: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.error-state, .preview-error { font-size: var(--text-sm); color: var(--color-error); }
.modal .upload-progress { margin-top: var(--space-md); }
.modal .empty-state { padding: var(--space-sm) 0; }

/* settings: a side sheet */
#settingsModal { align-items: stretch; justify-content: flex-end; padding: 0; }
#settingsModal .modal-content { width: min(100%, 30rem); max-height: none; border-radius: 0; box-shadow: inset 1px 0 0 var(--color-rule), var(--shadow-pop); }
.settings-section { padding-block: var(--space-lg); border-top: 1px solid var(--color-split); }
.modal-header + .settings-section { padding-top: var(--space-md); }
.settings-section:last-child { padding-bottom: 0; }
.settings-section > h4, .settings-section > p { margin-bottom: var(--space-sm); }
.theme-setting { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.theme-setting-info, .custom-password-setting-info { display: grid; gap: var(--space-3xs); min-width: 0; }
.theme-setting-label, .custom-password-setting-label { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }
.theme-setting-description, .custom-password-setting-description { font-size: var(--text-xs); color: var(--color-muted); }
.custom-password-setting { display: grid; gap: var(--space-sm); }
.custom-password-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.source-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2xs) var(--space-md); padding-block: var(--space-sm); }
.source-item + .source-item { border-top: 1px solid var(--color-split); }
.sources-list > .source-item:first-child, .file-sources-list > .source-item:first-child { padding-top: 0; }
.source-info { display: contents; }
.source-name { grid-column: 1; min-width: 0; font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); overflow-wrap: anywhere; }
.source-meta, .source-info .storage-bar-compact, .source-progress { grid-column: 1 / -1; }
.source-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }
.storage-compact { font-variant-numeric: tabular-nums; }
.source-auth-status.checking { background: transparent; box-shadow: var(--edge); color: var(--color-muted); }
.source-auth-status.not-authorized, .source-auth-status.error { background: var(--color-error-dim); color: var(--color-error); }
.source-info .storage-bar-compact { margin-top: var(--space-2xs); }
.source-actions { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-3xs); min-height: var(--ctl-h); margin-right: calc(-1 * var(--space-sm)); }
.source-actions .btn { border-color: transparent; color: var(--color-ink-2); }
.source-actions .btn:hover { background: var(--color-lift-2); color: var(--color-ink); }
.source-actions .btn-primary { background: transparent; color: var(--color-accent-2-text); }
.source-actions .btn-primary:hover { background: var(--color-accent-2-dim); color: var(--color-accent-2-text); }
.source-actions .btn-danger, .source-actions .btn-danger:hover { color: var(--color-error); }
.source-actions .btn-danger:hover { background: var(--color-error-dim); }
.file-sources-list .source-actions { margin-right: 0; }
.source-progress { display: none; align-items: center; gap: var(--space-sm); margin-top: var(--space-2xs); }
.source-progress-text { flex-shrink: 0; min-width: 9rem; font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: var(--color-muted); }
.source-progress-bar { flex: 1; }

/* preview */
.modal-content.modal-preview { display: flex; flex-direction: column; width: min(100%, 64rem); padding: 0; overflow: hidden; }
.modal-preview .modal-header { margin: 0; padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg); border-bottom: 1px solid var(--color-split); }
.preview-container { flex: 1; display: grid; place-items: center; min-height: 20rem; padding: var(--space-lg); overflow: auto; background: var(--color-sunk); }
.preview-container img, .preview-container video { max-width: 100%; max-height: 70dvh; border-radius: var(--radius-inner); object-fit: contain; }
.preview-container audio { width: min(100%, 36rem); }
.preview-container pre { justify-self: stretch; align-self: start; max-width: 100%; margin: 0; font-family: var(--font-code); font-size: var(--text-code); line-height: 1.6; color: var(--color-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-unsupported { display: grid; justify-items: center; gap: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }

/* notices */
.alert { grid-area: flash; margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: var(--color-paper-3); font-size: var(--text-sm); color: var(--color-ink); }
.alert-success { background: var(--color-accent-dim); color: var(--color-accent-text); }
.alert-danger, .alert-error { background: var(--color-error-dim); color: var(--color-error); }
.alert-warning, .alert-info { background: var(--color-accent-2-dim); color: var(--color-accent-2-text); }
.notification { position: fixed; top: calc(var(--bar-h) + var(--space-md)); right: var(--space-md); z-index: var(--z-toast); max-width: calc(100% - 2 * var(--space-md)); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-inner); background: var(--color-paper-3); box-shadow: var(--edge), var(--shadow-pop); font-size: var(--text-sm); color: var(--color-ink); animation: toast-in var(--dur-short) var(--ease-out); }
.notification.is-leaving { opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
@keyframes toast-in { from { opacity: 0; transform: translateY(calc(-1 * var(--space-xs))); } }

/* the public download page */
.dl-container { display: grid; place-items: center; min-height: calc(100dvh - var(--bar-h) - 1px); padding: var(--space-xl) var(--gutter) var(--space-3xl); }
.dl-content { width: min(100%, 27rem); }
.dl-file-card { padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--edge); }
.dl-file-head { display: grid; grid-template-columns: var(--space-lg) minmax(0, 1fr); column-gap: var(--space-sm); align-items: start; }
.dl-file-icon { display: grid; place-items: center; height: calc(var(--text-xl) * 1.15); color: var(--color-muted); }
.dl-file-icon .icon { width: calc(var(--space-md) + var(--space-2xs)); height: calc(var(--space-md) + var(--space-2xs)); }
.dl-file-name { font-size: var(--text-xl); }
.dl-file-details { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin-top: var(--space-xs); }
.dl-file-size { font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-muted); }
.dl-file-badge.dl-encrypted { background: var(--color-accent-2-dim); color: var(--color-accent-2-text); }
.dl-file-badge .icon { width: var(--space-sm); height: var(--space-sm); }
.dl-download-section { display: grid; gap: var(--space-md); margin-top: var(--space-lg); }
.dl-form-input { min-height: var(--hit); font-size: var(--text-md); }
.dl-password-wrapper .dl-form-input { min-height: calc(var(--hit) - 2px); }
.dl-password-toggle { min-height: calc(var(--hit) - var(--space-xs)); padding-inline: var(--space-sm); }
.dl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--hit); padding: 0 var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-ctl); background: transparent; color: var(--color-ink); font-size: var(--text-md); font-weight: 500; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.dl-btn-primary { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-ink); }
.dl-btn-primary:hover:not(:disabled), .dl-btn-primary:active:not(:disabled) { border-color: var(--primary-bg-hover); background: var(--primary-bg-hover); }
.dl-btn:active:not(:disabled) { transform: translateY(1px); }
.dl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dl-download-section .dl-btn { width: 100%; }
.dl-progress { margin-top: var(--space-md); }
.dl-modal-actions { display: flex; justify-content: flex-end; margin-top: var(--space-lg); }

/* narrower: where a file is stored moves under its name */
@media (max-width: 68rem) {
  :root { --file-cols: var(--space-md) minmax(0, 1fr) 5rem 9.5rem 6.5rem; --row-h: 48px; }
  .col-sources { display: none; }
  .view-list .file-item { grid-template-rows: auto auto; align-content: center; }
  .view-list .file-icon, .view-list .file-size, .view-list .folder-size, .view-list .file-date, .view-list .folder-date, .view-list .file-actions { grid-row: 1 / 3; }
  .view-list .file-title { align-self: end; }
  .view-list button.file-name { min-height: var(--space-lg); }
  .view-list .folder-item .file-title { align-self: center; }
  .view-list .folder-item .file-icon, .view-list .folder-item .folder-size, .view-list .folder-item .folder-date, .view-list .folder-item .file-actions { grid-row: 1; }
  .view-list .folder-item { grid-template-rows: auto; }
  .view-list .file-sources { grid-column: 2; grid-row: 2; justify-self: start; align-self: start; max-width: 100%; font-size: var(--text-xs); }
  .view-list .file-actions { grid-column: 5; }
}
@media (max-width: 62rem) {
  .upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-preview { grid-column: 1 / -1; }
  .form-input, .search-input { font-size: var(--text-md); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3n + 1) { padding-left: 0; box-shadow: none; }
  .stat:nth-child(n + 4) { border-top: 1px solid var(--color-split); }
}
@media (max-width: 48rem) {
  :root { --gutter: var(--space-md); --pad-x: 0px; }
  .bar-in { flex-wrap: wrap; padding-block: var(--space-xs); }
  .search-box { order: 3; flex: 1 0 100%; }
  .search-input { width: 100%; height: var(--hit); }
  .toolbar { width: 100%; }
  .toolbar .sort-dropdown { margin-left: auto; }
  .sort-menu { right: auto; left: 0; }
  .files-cols { display: none; }
  .files-list.view-list { border-top: 1px solid var(--color-rule); }
  .disk-container { grid-template-rows: none; grid-template-areas: "flash" "head" "stats" "upload" "files"; min-height: 0; }
  .stats { position: static; margin: var(--space-md) 0 0; padding-inline: 0; border-bottom: 1px solid var(--color-rule); }
  .files-section { margin-bottom: var(--space-2xl); }
  .view-list .file-item { grid-template-columns: var(--space-md) minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--space-sm); row-gap: var(--space-3xs); padding-block: var(--space-xs); }
  .view-list .folder-item { grid-template-rows: auto auto; }
  .view-list .file-icon, .view-list .folder-item .file-icon { grid-row: 1; }
  .view-list .file-title, .view-list .folder-item .file-title { align-self: end; }
  .view-list .file-meta { grid-column: 2; grid-row: 2; align-self: start; display: flex; flex-wrap: wrap; gap: 0 var(--space-sm); min-width: 0; font-size: var(--text-xs); }
  .view-list .file-meta > span { grid-column: auto; grid-row: auto; text-align: left; font-size: inherit; }
  .view-list .file-meta > span:empty { display: none; }
  .view-list .file-actions, .view-list .folder-item .file-actions { grid-column: 3; grid-row: 1 / 3; margin: 0 calc(-1 * var(--space-sm)) 0 0; }
  .btn-icon, .view-grid .btn-icon { width: calc(var(--hit) - var(--space-2xs)); height: var(--hit); }
  .upload-grid { grid-template-columns: minmax(0, 1fr); }
  .upload-actions .btn, .modal-actions .btn { min-height: var(--hit); }
  .modal-content, .dl-modal-content, .dl-file-card { padding: var(--space-md); }
  .source-select-item, .source-checkbox, .encryption-radio-option, .checkbox-wrapper { min-height: var(--hit); }
  .stat { padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-sm); }
  .stat-label { grid-column: 1 / -1; }
  .stat:nth-child(3n + 1) { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Hallmark · first step: a new account has no sources, so the empty file area says what to connect and opens settings */
.first-step { display: grid; justify-items: center; gap: var(--space-sm); }
.first-step h2 { margin: 0; font-size: var(--text-lg); color: var(--color-ink); }
.first-step p { max-width: 46ch; color: var(--color-ink-2); }
.first-step .btn { margin-top: var(--space-xs); }

/* Hallmark · welcome (signed out): what disk is, set as three file-style rows, then log in or register */
.welcome { width: 100%; max-width: calc(48rem + 2 * var(--gutter)); margin-inline: auto; padding: var(--space-3xl) var(--gutter) var(--space-2xl); }
.welcome-head h1 { max-width: 20ch; margin: 0 0 var(--space-sm); font-size: var(--text-2xl); }
.welcome-head p { max-width: 52ch; margin: 0; color: var(--color-ink-2); }
.welcome-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-lg); }
.welcome-rows { margin: var(--space-2xl) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--color-rule); }
.welcome-rows li { display: grid; grid-template-columns: auto minmax(0, 14rem) minmax(0, 1fr); align-items: baseline; gap: var(--space-md); padding: var(--space-md) var(--pad-x); border-bottom: 1px solid var(--color-rule); }
.welcome-rows .icon { align-self: center; color: var(--color-muted); }
.welcome-row-name { font-weight: 500; color: var(--color-ink); }
.welcome-row-text { font-size: var(--text-sm); color: var(--color-ink-2); }
.welcome-foot { margin: var(--space-xl) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 40rem) {
  .welcome { padding-top: var(--space-2xl); }
  .welcome-rows li { grid-template-columns: auto minmax(0, 1fr); }
  .welcome-row-text { grid-column: 2; }
}
