/* The admin pages' layout. Colours and fonts come from the theme
   (/_/theme.css, loaded after this file; see web/themes/). */

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
code { font: inherit; overflow-wrap: anywhere; }
small, .muted { color: var(--dim); }

/* The header stays put while the page scrolls under it. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  border-bottom: 2px solid var(--fg);
  background: var(--surface);
}
/* Jumps to a section (#passkeys, the uploads filter) land below it. */
html { scroll-padding-top: 72px; }
@media (max-width: 640px) { html { scroll-padding-top: 108px; } }
/* Name left, title centred, NAS status right, lined up with main's
   edges. Equal side columns keep the title exactly centred. */
.top-inner {
  max-width: 1168px; /* main's 1200px minus its padding */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px 16px;
}
.top .hello { justify-self: start; }
.top .nas { justify-self: end; text-align: right; }
@media (max-width: 640px) {
  .top-inner { grid-template-columns: 1fr 1fr; }
  .top h1 { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
}
.top h1 {
  margin: 0;
  font: var(--display-weight) calc(34px * var(--display-scale))/1 var(--display);
  letter-spacing: var(--display-tracking);
  text-transform: uppercase;
}
.nas {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1.5px solid currentColor;
}
.nas.ok { color: var(--ok); }
.nas.bad { color: var(--bad); font-weight: 700; }

/* Room at the bottom, so the last thing on a page isn't against the edge. */
main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 96px; }
/* The pages, as in Firewatch: centred buttons under the header, the
   current one filled. */
nav.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 24px; }
nav.tabs a {
  font: 700 11px/1.2 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  border: 1.5px solid var(--fg);
  padding: 10px 20px;
}
nav.tabs a:hover { background: var(--sel); }
nav.tabs a[aria-current="page"] { background: var(--fg); color: var(--surface); }
nav.tabs a:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
/* The data disk, shared by everyone: a thin bar under the tabs and no
   wider than them. .pages is as wide as its tabs; the meter takes that
   width without adding to it. */
.pages { width: fit-content; max-width: 100%; margin: 0 auto; }
.disk { width: 0; min-width: 100%; margin: -8px 0 24px; text-align: center; }
.disk p { margin: 6px 0 0; font-size: 11px; letter-spacing: 0.08em; color: var(--dim); }
.disk progress {
  display: block;
  width: 100%;
  height: 4px;
  appearance: none;
  border: none;
  background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent);
  accent-color: var(--fg);
}
.disk progress::-webkit-progress-bar { background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent); }
.disk progress::-webkit-progress-value { background: var(--fg); }
.disk progress::-moz-progress-bar { background: var(--fg); }
.disk.low p { color: var(--bad); font-weight: 700; }
.disk.low progress { accent-color: var(--bad); }
.disk.low progress::-webkit-progress-value { background: var(--bad); }
.disk.low progress::-moz-progress-bar { background: var(--bad); }
/* New link: receive or send, two buttons like the tabs above. They are
   radios, so the form works without JavaScript. */
fieldset.kind { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
fieldset.kind label { cursor: pointer; }
fieldset.kind input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
fieldset.kind span {
  display: block;
  font: 700 11px/1.2 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1.5px solid var(--fg);
  padding: 10px 20px;
}
fieldset.kind label:hover span { background: var(--sel); }
fieldset.kind input:checked + span { background: var(--fg); color: var(--surface); }
fieldset.kind input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* What doesn't apply to the picked kind goes. */
form.new-link:has(input[name="kind"][value="send"]:checked) .receive-only,
form.new-link:has(input[name="kind"][value="receive"]:checked) .send-only { display: none !important; }
/* A form and a short list don't need the full width the links table
   does: those pages sit in a centred column. */
main.page-new > :not(.pages),
main.page-passkeys > :not(.pages) { max-width: 800px; margin-left: auto; margin-right: auto; }
.hello {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
}
section { margin: 28px 0; }
h2 {
  margin: 0 0 10px;
  font: var(--display-weight) calc(26px * var(--display-scale))/1 var(--display);
  letter-spacing: calc(var(--display-tracking) + 0.01em);
  text-transform: uppercase;
}
h2 .clear { font: 11px var(--body); letter-spacing: 0.12em; margin-left: 8px; text-transform: uppercase; }

.banner { padding: 10px 14px; margin: 0 0 16px; border: 2px solid; background: var(--surface); }
.banner p { margin: 0; }
.banner.error { color: var(--bad); }
.url-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px !important; font-weight: 700; }

/* New-link form: destination and label, then the advanced settings
   (expiry, cap, URL) folded away on their defaults, then the message.
   Every field is title / control / hint, so controls on one row line up. */
form.new-link {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 18px;
  align-items: start;
  background: var(--surface);
  border: 2px solid var(--fg);
  padding: 18px;
}
.advanced, .f-message, .f-submit { grid-column: 1 / -1; }
/* The label has the row to itself unless a destination sits beside it. */
fieldset.kind + .f-label,
form.new-link:has(input[name="kind"][value="send"]:checked) .f-label { grid-column: 1 / -1; }
.f-submit { text-align: center; }
.advanced { border: 1.5px dashed var(--fg); }
.advanced[open] { border-style: solid; }
.advanced summary {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.advanced summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.advanced-values { margin-left: 6px; font-weight: 400; color: var(--dim); letter-spacing: 0.1em; }
.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 4px 12px 14px;
}
/* Create button: "Create link" → after creating, "Link copied ✓", which
   reads "Create new link" on hover. Fixed width so it doesn't jump. */
button.create { min-width: 210px; }
button.create .when-done, button.create .when-hover { display: none; }
form.done button.create .when-ready { display: none; }
form.done button.create .when-done { display: inline; }
form.done button.create:hover .when-done,
form.done button.create:focus-visible .when-done { display: none; }
form.done button.create:hover .when-hover,
form.done button.create:focus-visible .when-hover { display: inline; }
button.create:disabled { opacity: 0.6; cursor: progress; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hint { margin: 0; font-size: 11px; line-height: 1.45; color: var(--dim); }
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: var(--bad);
  box-shadow: inset 0 0 0 1px var(--bad);
}
/* A solid tag, so it stands out on blue as much as on off-white. */
.field-error {
  align-self: flex-start;
  margin: 0;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tag-bad-fg);
  background: var(--tag-bad-bg);
}
/* Expiry and cap side by side, the URL on a row of its own: the domain,
   the name and ↻ need the width. */
.f-name { grid-column: 1 / -1; }
@media (max-width: 560px) {
  form.new-link { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .advanced-grid { grid-template-columns: minmax(0, 1fr); }
}

input, select, textarea {
  font: 13px/1.4 var(--body);
  letter-spacing: 0;
  color: inherit;
  background: var(--bg);
  border: 1.5px solid var(--fg);
  border-radius: 0;
  padding: 8px 10px;
  width: 100%;
  min-height: 38px;
}
/* Phones zoom into any field under 16px when it's tapped, and stay
   zoomed: give touch screens 16px fields. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { resize: vertical; }

/* Custom URL: the full domain, never truncated. Side by side when there's
   room, the domain on its own line above the input when there isn't. */
.prefixed { display: flex; align-items: stretch; }
.prefixed > span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1.5px solid var(--fg);
  border-right: none;
  color: var(--dim);
  white-space: nowrap;
}
.prefixed input { flex: 1 1 12em; min-width: 0; }
.prefixed .reroll {
  flex: none;
  border-left: none;
  padding: 0 12px;
  font-size: 15px;
  letter-spacing: 0;
}
@media (max-width: 560px) {
  .prefixed { flex-wrap: wrap; }
  .prefixed > span { flex-basis: 100%; border-right: 1.5px solid var(--fg); border-bottom: none; padding: 6px 10px; }
}

button {
  font: 700 10px/1.2 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  border: 1.5px solid var(--fg);
  border-radius: 0;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover { background: var(--sel); }
/* A link that looks like a button (Download). */
a.button {
  display: inline-block;
  font: 700 10px/1.2 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  border: 1.5px solid var(--fg);
  padding: 6px 12px;
  text-align: center;
}
a.button:hover { background: var(--sel); }
button.primary { background: var(--fg); color: var(--surface); padding: 10px 20px; font-size: 11px; }
button.primary:hover { background: var(--dim); border-color: var(--dim); }
button.danger { color: var(--bad); border-color: var(--bad); }
button.danger.solid { background: var(--bad); color: var(--surface); padding: 10px 20px; font-size: 11px; }
button.danger.solid:hover { opacity: 0.85; }
button.small { padding: 2px 8px; }

.scroll { overflow-x: auto; background: var(--surface); border: 2px solid var(--fg); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--fg);
}
tbody tr:last-child td { border-bottom: none; }
/* The picked link stands out: tinted, with a bar down its left edge. */
tr.selected { background: color-mix(in srgb, var(--tint, var(--fg)) 24%, transparent); }
table.links tr.selected td.link-cell { box-shadow: inset 6px 0 0 var(--fg); }
/* On the desktop table a link's whole row picks it (its uploads, and
   their zip buttons, below); on phones' cards only its label does. Same
   width as the cards' breakpoint below, and as admin.js. Hovering shows
   it: a lighter tint, a thinner bar, the label underlined. */
@media (min-width: 1101px) {
  table.links tbody tr { cursor: pointer; }
  table.links tbody tr:not(.selected):hover { background: color-mix(in srgb, var(--tint, var(--fg)) 14%, transparent); }
  table.links tbody tr:not(.selected):hover td.link-cell { box-shadow: inset 4px 0 0 var(--fg); }
  table.links tbody tr:hover a.link-label { text-decoration: underline; }
}
tr.revoked, tr.expired { opacity: 0.55; }

/* Links: the label (bold) sits above the URL in one wide column. */
td.link-cell { min-width: 280px; width: 40%; }
table.log td[data-label="Link"] { min-width: 190px; }
table.log td.state { min-width: 170px; }
.link-label { display: block; font-weight: 700; overflow-wrap: anywhere; margin-bottom: 2px; text-decoration: none; }
.link-label:hover { text-decoration: underline; }
/* "3 files · 51 MB": picks the link like the row, without looking like a
   separate link. */
a.usage { text-decoration: none; }
.link-url { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.link-url code { overflow-wrap: anywhere; }
td.file { overflow-wrap: anywhere; min-width: 180px; font-weight: 700; }
td.actions { white-space: nowrap; text-align: right; width: 1%; }
td.actions > form { display: inline; }
/* Actions stacked, one per line, so the column stays narrow. */
td.actions > button, td.actions > form, td.actions > a.button { display: block; margin: 0 0 6px auto; }
td.actions > form button, td.actions > button, td.actions > a.button { width: 100%; }
td.actions > :last-child { margin-bottom: 0; }
/* Dialogs live in this cell too; keep them centred whatever the rules
   above say about the cell's children. */
td.actions > dialog.modal { margin: auto; }

/* Size cap, changed straight from the table. */
/* "Saved" sits just under the dropdown, out of the layout, so showing it
   never resizes the table. The cell's bottom padding leaves it room. */
.cap-form { display: inline-block; position: relative; }
.cap-form select { width: auto; min-height: 0; padding: 3px 6px; font-size: 12px; }
td[data-label="Cap"] { padding-bottom: 16px; }
.saved {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Message dialog. The form fills the dialog, so a click that lands on the
   dialog element itself can only be on the backdrop. */
dialog.modal {
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--surface);
  color: var(--fg);
  white-space: normal;
  text-align: left;
}
dialog.modal::backdrop { background: color-mix(in srgb, var(--shade) 55%, transparent); }
dialog.modal > form, dialog.modal > .modal-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; margin: 0; }
.message-readonly {
  margin: 0;
  padding: 10px 12px;
  border: 1.5px dashed var(--fg);
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}
.confirm-text { margin: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.modal-actions button, .modal-actions a.button { padding: 10px 20px; font-size: 11px; }
dialog.modal h3 {
  margin: 0;
  font: var(--display-weight) calc(28px * var(--display-scale))/1 var(--display);
  letter-spacing: calc(var(--display-tracking) + 0.01em);
  text-transform: uppercase;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.stack small { display: block; }
/* Dates come as "dd/mm/yy\nhh:mm": keep that line break, and no other. */
td[data-label="Created"], td[data-label="Expires"], td[data-label="Started"],
td[data-label="Completed"], td[data-label="Pulled to NAS"], td[data-label="Kept until"],
td[data-label="Downloaded"],
td[data-label="Added"], td[data-label="Last used"] { white-space: pre; }
td[data-label="Delivery"] { white-space: pre-line; }
/* Keeps "3 files" and "51 MB" whole; the cell may break between them. */
.nw { white-space: nowrap; }
.pill {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1px 8px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}
.pill.revoked, .pill.expired { color: var(--dim); }
/* Not downloaded yet: a solid tag, the thing to look for in a long list. */
.pill.new { color: var(--surface); background: var(--fg); border-color: var(--fg); }
/* Receive or send, in the links table: plain text with an arrow. */
.kind-tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
tr.state-failed td.state, tr.state-abandoned td.state { color: var(--bad); }

/* Download mode, above the uploads: zip of what's new, zip of
   everything, and the new-only view. */
.downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 2px solid var(--fg);
  background: var(--surface);
}
.downloads form { margin: 0; }
.downloads button { padding: 10px 16px; }
.downloads button:disabled { opacity: 0.55; cursor: default; }
/* Everything / New only: two buttons, the shown one filled. */
.downloads .show {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.downloads .show a.button { padding: 10px 16px; }
.downloads .show a.button[aria-current="true"] { background: var(--fg); color: var(--surface); }
@media (max-width: 560px) {
  .downloads form, .downloads button { width: 100%; }
  .downloads .show { margin-left: 0; }
}

/* The zip being packed, then downloaded: pinned bottom right, above
   whatever is scrolled under it. */
.zip-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 2px solid var(--fg);
  background: var(--surface);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--shade) 25%, transparent);
}
.zip-panel[hidden] { display: none; }
.zip-panel p { margin: 0; }
.zip-title { font-weight: 700; overflow-wrap: anywhere; }
.zip-text { font-size: 11px; line-height: 1.45; color: var(--dim); }
.zip-panel.failed .zip-text { color: var(--bad); font-weight: 700; }
.zip-panel progress {
  width: 100%;
  height: 6px;
  appearance: none;
  border: none;
  background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent);
  accent-color: var(--fg);
}
.zip-panel progress::-webkit-progress-bar { background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent); }
.zip-panel progress::-webkit-progress-value { background: var(--fg); }
.zip-panel progress::-moz-progress-bar { background: var(--fg); }
.zip-actions { display: flex; justify-content: flex-end; gap: 8px; }
.zip-panel [hidden] { display: none; }

/* Phones and tablets: each row becomes a card, every value labelled. */
@media (max-width: 1100px) {
  .scroll { overflow: visible; background: none; border: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards thead { display: none; }
  table.cards tr {
    background: var(--surface);
    border: 2px solid var(--fg);
    margin-bottom: 10px;
    padding: 6px 0;
  }
  table.cards tr.selected { background: color-mix(in srgb, var(--tint, var(--fg)) 20%, var(--surface)); }
  table.cards td { border: none; padding: 4px 12px; min-width: 0; }
  table.cards td[data-label] { display: flex; gap: 12px; align-items: baseline; }
  table.cards td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 8.5em;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
  }
  table.cards td.link-cell, table.cards td.file { padding-top: 8px; padding-bottom: 8px; }
  table.cards td.actions { text-align: left; white-space: normal; padding-top: 8px; width: auto; }
  table.cards td.actions > button, table.cards td.actions > form, table.cards td.actions > a.button { display: inline-block; margin: 0 6px 0 0; }
  table.cards td.actions > form button, table.cards td.actions > button, table.cards td.actions > a.button { width: auto; }
  table.cards td[data-label="Cap"] { padding-bottom: 16px; }
}

/* Short values stay on one line in the wide table layout. */
@media (min-width: 1101px) {
  td[data-label="Cap"], td[data-label="Size"] { white-space: nowrap; }
}

/* Sign-in and passkey-creation pages: one framed box, centred, with the
   TRANSFER wordmark on top. */
body.auth { min-height: 100vh; }
.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-panel {
  width: 100%;
  max-width: 440px;
  border: 2px solid var(--fg);
  background: var(--surface);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}
.auth-logo {
  margin: 0;
  font: var(--display-weight) calc(clamp(48px, 10vw, 75px) * var(--display-scale))/0.9 var(--display);
  letter-spacing: calc(var(--display-tracking) - 0.01em);
  text-transform: uppercase;
}
.auth-panel h2 { margin: 0; }
.auth-panel p { margin: 0; line-height: 1.6; }
.auth-panel button.primary { align-self: center; min-width: 240px; }
.auth-error { color: var(--bad); font-weight: 700; }

/* Header, right side: NAS status (NAS mode) and Sign out. */
.top-right { justify-self: end; display: flex; align-items: center; gap: 12px; }
/* The light/dark switch, last on the right as in Firewatch: in the
   header's very corner where there's room beside the centred row. */
.top #theme { padding: 3px 8px; }
@media (min-width: 1360px) { .top #theme { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); } }
.top-right form { margin: 0; }

/* People & passkeys */
.person { margin-bottom: 36px; }
.person:last-child { margin-bottom: 0; }
.person-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.person-head h3 { margin: 0; font: var(--display-weight) calc(22px * var(--display-scale))/1 var(--display); letter-spacing: calc(var(--display-tracking) + 0.01em); text-transform: uppercase; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.person-actions form { margin: 0; }

/* A picked send link: the files offered on its page, with a drop zone
   here to add more. */
.shared-box {
  border: 1.5px solid var(--fg);
  background: var(--surface);
  padding: 16px 18px 18px;
  margin-bottom: 28px;
}
.shared-box h2 small { font: 11px var(--body); letter-spacing: 0.08em; text-transform: none; }
.shared-box > .hint { margin-bottom: 14px; }
.files-zone {
  border: 1.5px dashed var(--fg);
  padding: 28px 16px 24px;
  text-align: center;
  cursor: pointer;
}
.files-zone:hover, .files-zone:focus-visible, .files-zone.over {
  border-style: solid;
  outline: none;
  background: var(--sel);
}
.files-zone p { margin: 0; }
.files-zone .zone-title {
  font: var(--display-weight) calc(30px * var(--display-scale))/1 var(--display);
  letter-spacing: var(--display-tracking);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sending { list-style: none; margin: 0; padding: 0; }
.sending:not(:empty) { margin-top: 12px; }
.sending li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4px 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 13px;
}
.sending .name { overflow-wrap: anywhere; font-weight: 700; }
.sending .status { color: var(--dim); font-size: 11px; white-space: nowrap; }
.sending li.error .status { color: var(--bad); white-space: normal; }
.sending progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 4px;
  appearance: none;
  border: none;
  background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent);
}
.sending progress::-webkit-progress-bar { background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent); }
.sending progress::-webkit-progress-value { background: var(--fg); }
.sending progress::-moz-progress-bar { background: var(--fg); }
.sending li.done progress { display: none; }
.shared-files { margin-top: 14px; }

/* The New link form's files, picked before the link exists. */
.f-files { grid-column: 1 / -1; }
.f-files[hidden] { display: none; }
.f-files .files-zone { padding: 18px 16px 16px; }
.f-files .files-zone .zone-title { font-size: 24px; margin-bottom: 2px; }
.f-files > .hint { margin-top: 8px; }
.queued { list-style: none; margin: 0; padding: 0; }
.queued:not(:empty) { margin-top: 8px; }
.queued li {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  font-size: 13px;
}
.queued .name { flex: 1; overflow-wrap: anywhere; font-weight: 700; }
.queued .size { color: var(--dim); font-size: 11px; white-space: nowrap; }

/* Rows folded under a table (inactive links, earlier uploads); the arrow
   under it unfolds them. */
tbody.folded[hidden] { display: none !important; }
.show-folded { margin: 8px 0 0; text-align: center; }
.toggle-fold .arrow { display: inline-block; transition: transform 0.15s; }
.toggle-fold[aria-expanded="true"] .arrow { transform: rotate(180deg); }

/* A section title with its action on the right (People: + Add user). */
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
