/*
 *  Drop – stylesheet.
 *
 *  Brand values come from the admin settings as custom properties
 *  (lib/template.php): --c-main (buttons), --c-light (accents),
 *  --bg-1 / --bg-2 (background glows), --font*.
 *  Light and dark themes only swap the surface tokens below.
 *
 *  Licensed under the GNU AGPLv3, see COPYING.
 */

/* ---- Fonts: Inter (OFL) and Lucide icons (ISC), see media/fonts/ ------ */
@font-face {
  font-family: "DILOHVER Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ebgaramond-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "drop-icons";
  src: url("fonts/icons.woff") format("woff");
  font-display: block;
}

/* ---- Tokens ---------------------------------------------------------- */

:root {
  --c-main: #2459f5;
  --c-light: #22c3ee;
  --bg-1: #7c9cff;
  --bg-2: #5eead4;
  /* The type scale: six steps for everything up to running text and a bit
     above. Titles and display sizes are set where they are drawn. */
  --fs-2xs: 0.625rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --font-stack: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-stack);
  --font-bold: var(--font-stack);
  --font-light: var(--font-stack);

  --bg: #f9fafb;
  --surface: #fff;
  --surface-2: #f6f7f9;
  --surface-3: #f3f4f6;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --brand: var(--c-main);
  --on-brand: #fff;
  --accent: var(--c-light);
  --brand-soft: color-mix(in srgb, var(--c-main) 10%, transparent);
  --ink: #1f2937;
  --on-ink: #fff;
  --danger: #d63939;
  --ok: #2fb344;
  --warn: #f59f00;
  --glow: 0;                    /* the colour glow belongs to the soft look */

  --card-w: 29rem;
  --r-lg: 8px;
  --r-md: 6px;
  --r-sm: 4px;
  --shadow: 0 2px 4px -1px rgba(17, 24, 39, 0.08), 0 4px 6px -1px rgba(17, 24, 39, 0.06);
  --shadow-sm: 0 1px 3px 0 rgba(17, 24, 39, 0.06), 0 1px 2px 0 rgba(17, 24, 39, 0.04);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111827;
    --surface: #1f2937;
    --surface-2: #26303f;
    --surface-3: #2e3c51;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --border: #2e3c51;
    --brand: color-mix(in srgb, var(--c-main) 80%, #fff);
    --brand-soft: color-mix(in srgb, var(--c-main) 22%, transparent);
    --ink: #e5e7eb;
    --on-ink: #111827;
    --shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.45), 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #111827;
  --surface: #1f2937;
  --surface-2: #26303f;
  --surface-3: #2e3c51;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #2e3c51;
  --brand: color-mix(in srgb, var(--c-main) 80%, #fff);
  --brand-soft: color-mix(in srgb, var(--c-main) 22%, transparent);
  --ink: #e5e7eb;
  --on-ink: #111827;
  --shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.45), 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
}

/* ---- Base ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  /* --fs-t and --fs-h are the administration's type sizes (s42_theme_css), 1 = as drawn here. */
  font: calc(0.875rem * var(--fs-t, 1))/1.5714 var(--font);
  font-feature-settings: "cv11", "ss03";
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
/* Two soft colour glows behind everything. */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  pointer-events: none;
  opacity: var(--glow);
}
body::before { top: -35vmax; right: -20vmax; background: radial-gradient(closest-side, var(--bg-1), transparent); }
body::after { bottom: -40vmax; left: -25vmax; background: radial-gradient(closest-side, var(--bg-2), transparent); }
/* Download pages with an uploaded picture: full-bleed wallpaper, no glows. */
body.has-wallpaper { background-size: cover; background-position: center; background-attachment: fixed; }
body.has-wallpaper::before, body.has-wallpaper::after { display: none; }
body.has-wallpaper .card { box-shadow: 0 24px 60px rgba(8, 12, 30, 0.25); }
body.has-wallpaper :is(.header, .footer, .logo__word, .nav-link, .header .icon-btn, .footer a) { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
body.has-wallpaper .logo__mark { color: #fff; }
body.has-wallpaper .logo__mark path { stroke: var(--brand); }

h1, h2, h3 { margin: 0; font-family: var(--font-bold); font-weight: 600; line-height: 1.25; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.muted { color: var(--text-muted); }

/* The portal keeps the existing upload card and adds the two ways in beside it. */
.portal-page .hero { align-items: start; }
.portal-page .hero__text { padding-top: 1.5rem; min-width: 0; }
.portal-page .hero__title { text-wrap: balance; }
.portal-page .hero__title .portal-script { display: block; margin-top: 0.15em; font: italic 400 0.85em/1.1 "DILOHVER Garamond", Georgia, serif; letter-spacing: 0; color: var(--brand); }
.portal-start { margin-top: 2rem; }
.portal-start h2, .portal-guest h2 { font-size: 1.125rem; }
.portal-start > p, .portal-guest > p { margin-top: 0.65rem; max-width: 52ch; }
.portal-start > .btn { margin-top: 1.15rem; max-width: 100%; white-space: normal; }
.portal-start > .link-btn { margin-top: 0.9rem; }
.portal-steps { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-left: 1.25rem; margin: 1.25rem 0 0.75rem; font-size: var(--fs-sm); }
.portal-steps li { padding-left: 0.1rem; }
.portal-note { margin: 0.9rem 0; max-width: 60ch; color: var(--text-muted); font-size: var(--fs-base); line-height: 1.6; }
.portal-guest { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.portal-guest > .link-btn { margin-top: 0.8rem; }
.field__hint { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; }
.portal-admins { display: grid; gap: 0.75rem; margin: 1rem 0 1.75rem; }
.portal-admins > div { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; }
.portal-admins span { overflow-wrap: anywhere; }
#users td small { display: block; color: var(--text-muted); overflow-wrap: anywhere; }
@media (max-width: 959px) {
  .portal-page .hero__text { padding-top: 0; width: min(100%, 36rem); text-align: left; }
  .portal-page .hero__lead { margin-left: 0; }
  .portal-start > .btn { width: 100%; }
  .portal-steps { gap: 0.45rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.note { margin-top: 0.6rem; }
.note summary { display: inline-flex; align-items: center; gap: 0.4rem; list-style: none; cursor: pointer; font-size: var(--fs-base); }
.note summary::-webkit-details-marker { display: none; }
.note[open] { display: grid; gap: 0.5rem; }

/* Answers to a file request's questions, on the download page. */
.answers { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; margin: 0; font-size: var(--fs-base); }
.answers dt { color: var(--text-muted); }
.answers dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Administration: sections that fold (js/admin.js) ----------------- */

/* min-width 0: in the panel's column a wrapper may otherwise not shrink below
   its widest line (a cron path), and the panel scrolls sideways on a phone. */
.fold-body { min-width: 0; display: flex; flex-direction: column; gap: inherit; }
.fold-head { cursor: pointer; user-select: none; }
.fold-head::after {
  content: "\e06d"; font: 0.85em/1 "drop-icons"; margin-left: 0.4rem; display: inline-block;
  color: var(--text-muted); transition: transform 0.15s;
}
.is-folded > .fold-head::after, .fold-head.is-folded::after { transform: rotate(-90deg); }
fieldset.is-folded > :not(legend) { display: none; }
.panel__title--fold { display: flex; align-items: center; gap: 0.6rem; }
.fold-all { margin-left: auto; font-size: var(--fs-base); font-weight: 400; }
.row--sizes { grid-template-columns: 1fr 5.5rem 5.5rem; }
.row--sizes input { width: 100%; }

/* ---- Tooltips (s42_tip) ---------------------------------------------- */

/* A "?" beside a control; its explanation shows on hover and on keyboard
   focus (a tap on a phone focuses it). CSS only. <html data-tips="off">
   – administration → Interface – hides them all. */
.tip {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 1.05rem; height: 1.05rem; margin-left: 0.35rem; vertical-align: middle;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-muted); font: 600 var(--fs-2xs)/1 var(--font); cursor: help;
}
.tip:hover, .tip:focus-visible { color: var(--brand); border-color: var(--brand); outline: none; }
.tip::after {
  content: attr(data-tip); position: absolute; z-index: 60; bottom: calc(100% + 8px); left: 50%;
  width: max-content; max-width: min(18rem, 78vw); padding: 0.5rem 0.65rem; transform: translateX(-50%);
  border-radius: var(--r-md); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow);
  font: 400 var(--fs-sm)/1.45 var(--font); text-align: left; white-space: normal; letter-spacing: 0;
  /* Not drawn at all until shown: a transparent bubble still counts as
     overflow, and near an edge it made whole panels scroll sideways. */
  display: none; pointer-events: none;
}
.tip:hover::after, .tip:focus::after { display: block; }
[data-tips="off"] .tip { display: none; }

/* ---- Direct transfer (direct.php) ------------------------------------ */

.direct__lead { margin: -0.4rem 0 0.4rem; color: var(--text-muted); }
.direct__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.direct__list li { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.6rem; align-items: center; }
.direct__list .bar { grid-column: 1 / -1; }
.direct__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.direct__size, .direct__total { color: var(--text-muted); font-size: var(--fs-base); font-variant-numeric: tabular-nums; }
.direct__qr { display: grid; place-items: center; }
.direct__qr svg { width: 180px; height: 180px; }
.direct__status { margin: 0; text-align: center; color: var(--text-muted); }
.direct__entry { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; font-size: var(--fs-base); }
.copy-row { display: flex; gap: 0.5rem; }
.copy-row .input { flex: 1; min-width: 0; }

/* ---- Icons (Lucide icon font) --------------------------------------- */

.i {
  display: inline-block;
  flex: none;
  font: normal 400 1.15em/1 "drop-icons";
  speak: never;
  -webkit-font-smoothing: antialiased;
  vertical-align: -0.15em;
}
.i--upload::before    { content: "\e19e"; }
.i--download::before  { content: "\e0b2"; }
.i--check::before     { content: "\e06c"; }
.i--x::before         { content: "\e1b2"; }
.i--trash::before     { content: "\e18e"; }
.i--eye::before       { content: "\e0ba"; }
.i--copy::before      { content: "\e09e"; }
.i--external::before  { content: "\e0b9"; }
.i--mail::before      { content: "\e10f"; }
.i--lock::before      { content: "\e10b"; }
.i--clock::before     { content: "\e087"; }
.i--alert::before     { content: "\e193"; }
.i--plus::before      { content: "\e13d"; }
.i--inbox::before     { content: "\e0f7"; }
.i--unlink::before    { content: "\e19c"; }
.i--chevron::before   { content: "\e06d"; }
.i--key::before       { content: "\e4a3"; }
.i--list::before      { content: "\e106"; }
.i--settings::before  { content: "\e154"; }
.i--shield::before    { content: "\e1ff"; }
.i--folder::before    { content: "\e0d7"; }
.i--link::before      { content: "\e102"; }
.i--sliders::before   { content: "\e29a"; }
.i--bell::before      { content: "\e059"; }
.i--arrow::before     { content: "\e049"; }
.i--edit::before      { content: "\e1f9"; }
.i--logout::before    { content: "\e10e"; }
.i--login::before     { content: "\e10d"; }
.i--file::before      { content: "\e0c0"; }
.i--user::before      { content: "\e19f"; }
.i--users::before     { content: "\e1a4"; }
.i--storage::before   { content: "\e0ed"; }
.i--palette::before   { content: "\e1dd"; }
.i--dashboard::before { content: "\e1c1"; }
.i--files::before     { content: "\e0cf"; }
.i--send::before      { content: "\e152"; }
.i--theme::before     { content: "\e11e"; }
:root[data-theme="dark"] .i--theme::before { content: "\e178"; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i--theme::before { content: "\e178"; }
}

/* ---- Page frame ------------------------------------------------------ */

.page {
  /* The pages a visitor meets stay readable: a line of text that runs the
     full width of a 27" screen is hard to follow. The pages people work in
     all day carry tables and forms, not prose, and get the room (page--wide,
     set by the template for the administration, the drive and the lists). */
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}
.page--wide { max-width: 1560px; }
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* At least this high; a tall logo or room above it (--logo-pad) makes it grow instead of spilling out. */
  min-height: 64px;
}
.logo { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text); margin-top: var(--logo-pad, 0px); }
/* --logo-h is the height the administration chose; without it a logo keeps its own size up to 40 px. */
.logo img { display: block; width: auto; height: var(--logo-h, auto); max-height: var(--logo-h, 40px); max-width: calc(var(--logo-h, 40px) * 5); }
/* Two uploaded logos: the dark one wherever the surface is dark – the dark theme, and a picture behind the page. */
.logo .logo__dark, :root[data-theme="dark"] .logo .logo__light, body.has-wallpaper .logo .logo__light { display: none; }
:root[data-theme="dark"] .logo .logo__dark, body.has-wallpaper .logo .logo__dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .logo__light { display: none; }
  :root:not([data-theme="light"]) .logo .logo__dark { display: block; }
}
.logo__builtin { display: inline-flex; align-items: center; gap: 0.5rem; }
.logo__mark { width: 30px; height: 30px; color: var(--brand); }
.logo__word { font: 600 1.35rem/1 var(--font-bold); letter-spacing: -0.02em; }
.header__nav { display: flex; align-items: center; gap: 0.35rem; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  height: 34px; padding: 0 0.7rem;
  border: 0; border-radius: var(--r-md); background: none;
  font-weight: 500; font-size: var(--fs-base); color: var(--text-muted); text-decoration: none;
  transition: background 0.15s;
}
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.avatar {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; margin-left: 0.25rem;
  border-radius: var(--r-md); background: var(--brand); color: var(--on-brand);
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
}
.main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 0 2.5rem; }
.footer { display: flex; justify-content: center; gap: 1.25rem; padding: 1rem 0 1.5rem; font-size: var(--fs-sm); color: var(--text-muted); }
.footer a { display: inline-flex; align-items: center; min-height: 24px; text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---- Hero (upload page) --------------------------------------------- */

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--card-w));
  gap: 4rem;
  align-items: center;
}
.hero--card-only { grid-template-columns: minmax(0, var(--card-w)); justify-content: center; }
.hero__title {
  font: 700 calc(clamp(2rem, 2.2vw + 1.3rem, 3.1rem) * var(--fs-h, 1))/1.1 var(--font-bold);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__accent { color: var(--brand); }
.hero__lead { margin-top: 1.1rem; max-width: 30rem; font-size: var(--fs-md); color: var(--text-muted); }
.hero__points { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.hero__points li { display: flex; align-items: center; gap: 0.7rem; font-weight: 500; }
.hero__points .i {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); color: var(--brand); font-size: var(--fs-md);
}
.hero .eyebrow { margin-bottom: 0.6rem; }
.hero__panel { width: 100%; }

/* ---- Cards ------------------------------------------------------------ */

.card {
  width: 100%;
  max-width: var(--card-w);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: rise 0.35s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card__head { display: flex; flex-direction: column; gap: 0.35rem; }
.card__title { font-size: calc(1.25rem * var(--fs-h, 1)); font-weight: 600; letter-spacing: -0.01em; }
.card__lead { color: var(--text-muted); }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.fineprint { font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }
.fineprint a, .link { display: inline-flex; align-items: center; min-height: 24px; color: var(--brand); font-weight: 600; text-decoration: none; }
.fineprint a:hover, .link:hover { text-decoration: underline; }
.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.btn-row > .btn { flex: 1 1 auto; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.page-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.015em; }
.page-lead { color: var(--text-muted); margin-top: 0.3rem; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted); font-size: var(--fs-sm); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth { max-width: 26rem; }

/* ---- Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 38px; padding: 0 0.9rem;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-weight: 500; font-size: var(--fs-base); line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, filter 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.btn--primary:hover { filter: brightness(0.93); }
.btn--dark { background: var(--ink); color: var(--on-ink); }
.btn--dark:hover { filter: brightness(1.2); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { height: 44px; font-size: var(--fs-md); padding: 0 1.2rem; }
.btn--sm { height: 30px; padding: 0 0.7rem; font-size: var(--fs-sm); }
.btn--file { position: relative; overflow: hidden; }
.btn--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn .i--arrow { transition: transform 0.15s; }
.btn:hover .i--arrow { transform: translateX(3px); }
.link-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0; border: 0; background: none;
  font-weight: 600; font-size: var(--fs-base); color: var(--brand); cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border: 0; border-radius: var(--r-md); background: none;
  color: var(--text-muted); text-decoration: none; font-size: var(--fs-md);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn--sm { width: 28px; height: 28px; font-size: var(--fs-md); }
.icon-btn--danger:hover { color: var(--danger); }

/* ---- Form elements ---------------------------------------------------- */

.input, .field input, .field select, .field textarea {
  width: 100%;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .chips:focus-within {
  outline: none; border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 0.25rem var(--brand-soft);
}
.input::placeholder, .field input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.input[readonly], .field input[readonly] { color: var(--text-muted); }
select.input, .field select {
  appearance: none;
  padding-right: 2.4rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.8rem center / 1rem;
}
textarea.input, .field textarea { resize: vertical; min-height: 4.5rem; }
.input--inline { width: auto; min-width: 10rem; min-height: 34px; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.input--code { text-align: center; font-size: 1.6rem; letter-spacing: 0.5em; font-weight: 700; font-variant-numeric: tabular-nums; }
.is-muted { opacity: 0.5; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); }
/* Hints and facts name paths and addresses; those may break anywhere rather than push a phone's page sideways. */
.form__hint { font-size: var(--fs-base); color: var(--text-muted); overflow-wrap: anywhere; }

.switch { display: inline-flex; align-items: center; min-height: 24px; gap: 0.75rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: relative; display: inline-flex; align-items: center; gap: 0.55rem; }
.switch span::before {
  content: ""; flex: none; order: -2;
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border);
  transition: background 0.2s;
}
.switch span::after {
  content: ""; position: absolute; left: 3px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--ease);
}
.switch input:checked + span::before { background: var(--brand); box-shadow: none; }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span::before { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.7; cursor: default; }
.switch .i { color: var(--text-muted); }

.check { display: flex; align-items: center; min-height: 24px; gap: 0.55rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }

.alert { padding: 0.7rem 0.9rem; border-radius: var(--r-md); font-size: var(--fs-base); border: 1px solid transparent; }
.alert--error { background: color-mix(in srgb, var(--danger) 9%, transparent); border-color: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.alert--ok { background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.alert--warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.e2e-note { display: flex; align-items: flex-start; gap: 0.55rem; font-size: var(--fs-base); }
.e2e-note .i { margin-top: 0.1rem; }

.card__subtitle { margin-top: 1.6rem; font-size: calc(1.05rem * var(--fs-h, 1)); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 0.5rem 0; }
.chart__day { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 100%; }
.chart__bar { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--surface-3); }
.chart__bar--up { background: var(--brand); }
.chart__bar--down { background: var(--accent); }
.chart__legend { display: flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); color: var(--text-muted); }
.chart__key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart__key--up { background: var(--brand); }
.chart__key--down { background: var(--accent); margin-left: 0.8rem; }
.consent { font-size: var(--fs-base); color: var(--text-muted); text-align: left; white-space: pre-line; }
.footer__lang select { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.qr { display: grid; place-items: center; padding: 0.6rem; }
.qr svg { border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.badge-line { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.badge-line:empty { display: none; }
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.5rem; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: var(--fs-xs); font-weight: 500;
}
.badge--ok { background: color-mix(in srgb, var(--ok) 11%, transparent); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.badge--brand { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand); }

/* ---- Upload: steps, dropzone, files ---------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem; }
.steps__item {
  flex: 1; display: flex; align-items: center; gap: 0.45rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
}
.steps__item span {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); font-size: var(--fs-xs); font-weight: 600;
}
.steps__item::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--surface-3); }
.steps__item:last-child::after { display: none; }
.steps__item.is-active, .steps__item.is-done { color: var(--text); }
.steps__item.is-active span { background: var(--brand); color: var(--on-brand); }
.steps__item.is-done span { background: var(--brand-soft); color: var(--brand); }
.steps__item.is-done::after { background: var(--brand); }

.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  min-height: 15rem; padding: 1.5rem;
  border: 1px dashed #d1d5db; border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-within, body.is-dragging .dropzone {
  border-color: var(--brand); background: var(--brand-soft);
}
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
  pointer-events: none;
}
.dropzone:hover .dropzone__icon, body.is-dragging .dropzone__icon { transform: scale(1.06) rotate(90deg); }
.dropzone__text { pointer-events: none; }
.dropzone__title { font-size: var(--fs-md); font-weight: 600; }
.dropzone__hint { color: var(--text-muted); font-size: var(--fs-base); }
.dropzone__folder { position: relative; z-index: 1; }
.dropzone--compact { min-height: 0; flex-direction: row; justify-content: flex-start; padding: 0.75rem 0.9rem; text-align: left; }
.dropzone--compact .dropzone__icon { width: 40px; height: 40px; font-size: var(--fs-lg); }
.dropzone--compact .dropzone__title { font-size: var(--fs-md); }
.dropzone--compact .dropzone__folder { margin-left: auto; }

/* "…or paste a share link": the server fetches it instead of the browser. */
.from-link { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.6rem; }
.from-link .input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 30rem) { .from-link { flex-wrap: wrap; } .from-link .btn { width: 100%; } }

.list-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: var(--fs-base); }
.files { list-style: none; margin: 0; padding: 0; max-height: 17rem; overflow-y: auto; }
.file { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--border); }
.file:last-child { border-bottom: 0; }
.file__badge, .file__thumb {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--brand-soft); color: var(--brand);
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.02em; overflow: hidden;
}
.file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file__sum { font-family: ui-monospace, monospace; font-size: var(--fs-xs); color: var(--text-muted); }
.file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file__size { color: var(--text-muted); font-size: var(--fs-base); font-variant-numeric: tabular-nums; white-space: nowrap; }
.files--compact .file { padding: 0.4rem 0; }
.files--compact .file__badge { width: 32px; height: 32px; }

/* ---- Upload: options -------------------------------------------------- */

.options { display: flex; flex-direction: column; gap: 0.85rem; }
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  height: 32px; border-radius: var(--r-sm); font-weight: 500; font-size: var(--fs-base); color: var(--text-muted);
  cursor: pointer; transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }
.segmented input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.chips {
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
  min-height: 38px; padding: 0.3rem 0.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: text;
}
.chips input { flex: 1 1 6rem; min-width: 6rem; border: 0; background: none; padding: 0.3rem 0.4rem; outline: none; }
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.2rem 0.15rem 0.5rem; border-radius: var(--r-sm);
  background: var(--brand-soft); color: var(--brand); font-size: var(--fs-sm); font-weight: 500;
}
.chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: var(--r-sm); background: none; color: inherit; }
.chip button:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.chip--bad { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.option { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 40px; }
.option__label { display: inline-flex; align-items: center; gap: 0.55rem; }
.option__label .i { color: var(--text-muted); }
.option__more { padding-left: 3.1rem; }
.option__hint { font-size: var(--fs-sm); color: var(--text-muted); padding-left: 3.1rem; margin-top: -0.4rem; }
.more { border-top: 1px solid var(--border); padding-top: 0.5rem; }
.more summary {
  display: flex; align-items: center; gap: 0.55rem; min-height: 40px;
  list-style: none; cursor: pointer; font-weight: 600;
}
.more summary::-webkit-details-marker { display: none; }
.more summary .i { color: var(--text-muted); }
.more summary .i--chevron { margin-left: auto; transition: transform 0.2s; }
.more[open] summary .i--chevron { transform: rotate(180deg); }
.more__body { display: flex; flex-direction: column; gap: 0.7rem; padding: 0.4rem 0 0.2rem; }

/* ---- Upload: progress ----------------------------------------------- */

.progress { align-items: center; text-align: center; }
.fill { position: relative; width: 176px; height: 176px; }
/* positioned, so that it lies above the glow of the aurora behind it */
.fill svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.fill__track { fill: none; stroke: var(--surface-3); stroke-width: 6; }
.fill__ring {
  fill: none; stroke: url(#fill-grad); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 465; stroke-dashoffset: calc(465 * (1 - var(--p)));
  transform: rotate(-90deg); transform-origin: 80px 80px;
  transition: stroke-dashoffset 0.6s var(--ease);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--brand) 25%, transparent));
}
.fill__bg { fill: var(--surface-2); }
.fill__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--text);
}
/* What moves is the administration's choice (data-anim). "ring" is the quiet
   one: a heavier ring and nothing else. The other three add one thing each. */
.fill__orbit { display: none; }
.fill[data-anim="ring"] :is(.fill__track, .fill__ring) { stroke-width: 9; }
/* orbit: three satellites on the ring, each at its own pace */
.fill[data-anim="orbit"] .fill__orbit { display: block; }
.fill__orbit circle { fill: var(--brand); transform-origin: 80px 80px; }
.fill__orbit circle:nth-child(2) { fill: var(--accent); }
/* the animations only on the style that is shown, so a hidden one costs nothing */
.fill[data-anim="orbit"] .fill__orbit circle { animation: fill-spin 2.6s linear infinite; }
.fill[data-anim="orbit"] .fill__orbit circle:nth-child(2) { animation-duration: 4.1s; animation-direction: reverse; }
.fill[data-anim="orbit"] .fill__orbit circle:nth-child(3) { animation-duration: 6.3s; }
/* dial: track and ring seen through sixty strokes */
.fill[data-anim="dial"] :is(.fill__track, .fill__ring) { stroke-width: 12; stroke-linecap: butt; mask: url(#fill-ticks); filter: none; }
/* aurora: light travelling round a fine ring – a blurred sweep of the two
   brand colours, cut to a band by the mask, and a slower one against it so
   the glow never repeats itself exactly */
.fill[data-anim="aurora"] :is(.fill__track, .fill__ring) { stroke-width: 3.5; }
.fill[data-anim="aurora"] .fill__track { stroke: color-mix(in srgb, var(--surface-3) 60%, transparent); }
.fill__aurora { display: none; }
.fill[data-anim="aurora"]::before, .fill[data-anim="aurora"] .fill__aurora {
  content: ""; display: block; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 30%, var(--accent) 58%, var(--brand) 86%, transparent);
  -webkit-mask: radial-gradient(closest-side, transparent 64%, #000 74%, #000 92%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 64%, #000 74%, #000 92%, transparent 100%);
  filter: blur(8px); opacity: 0.8;
  animation: fill-spin 3.4s linear infinite;
}
.fill[data-anim="aurora"] .fill__aurora { opacity: 0.45; animation-duration: 5.9s; animation-direction: reverse; }
@keyframes fill-spin { to { transform: rotate(360deg); } }
/* The circle arrives instead of appearing. */
.progress:not([hidden]) .fill { animation: pop 0.5s var(--ease) both; }
/* A file is done: the circle answers with a beat and a ring that leaves it. */
.fill::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  border: 2px solid var(--brand); opacity: 0; pointer-events: none;
}
.fill.is-tick::after { animation: tick-ring 0.6s ease-out; }
.fill.is-tick svg { animation: tick 0.35s var(--ease); }
@keyframes tick { 50% { transform: scale(1.045); } }
@keyframes tick-ring { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.28); opacity: 0; } }
/* Everything is up and the server puts the transfer together. That can take
   a while with large files, and a ring standing still at 100% looks broken –
   so a piece of it keeps going round until the answer is there. */
.fill.is-finishing .fill__ring {
  stroke-dasharray: 120 345; stroke-dashoffset: 0; transition: none;
  animation: orbit 1.1s linear infinite;
}
@keyframes orbit { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }

/* Success: the check pops in, confetti bursts around it. */
.celebrate { position: relative; display: grid; place-items: center; }
.celebrate.is-on .status__icon { animation: pop 0.55s var(--ease) both; }
.celebrate.is-on .status__icon .i { animation: pop 0.45s 0.18s var(--ease) both; }
.celebrate__burst { position: absolute; inset: 50% auto auto 50%; pointer-events: none; }
.celebrate__burst i {
  position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 2px; opacity: 0;
  background: var(--accent);
}
.celebrate__burst i:nth-child(3n) { background: var(--brand); border-radius: 50%; }
.celebrate__burst i:nth-child(3n+1) { background: var(--ok); width: 6px; height: 10px; }
.celebrate.is-on .celebrate__burst i { animation: burst 0.9s 0.1s var(--ease) both; }
.celebrate__burst i:nth-child(1) { --a: 0deg; }   .celebrate__burst i:nth-child(2) { --a: 30deg; }
.celebrate__burst i:nth-child(3) { --a: 60deg; }  .celebrate__burst i:nth-child(4) { --a: 90deg; }
.celebrate__burst i:nth-child(5) { --a: 120deg; } .celebrate__burst i:nth-child(6) { --a: 150deg; }
.celebrate__burst i:nth-child(7) { --a: 180deg; } .celebrate__burst i:nth-child(8) { --a: 210deg; }
.celebrate__burst i:nth-child(9) { --a: 240deg; } .celebrate__burst i:nth-child(10) { --a: 270deg; }
.celebrate__burst i:nth-child(11) { --a: 300deg; } .celebrate__burst i:nth-child(12) { --a: 330deg; }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes burst {
  0% { transform: rotate(var(--a)) translateY(0) scale(0.6); opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(-72px) rotate(200deg) scale(1); opacity: 0; }
}

/* Files slide in when added; the dropzone ripples while dragging. */
#file-list .file { animation: slidein 0.28s var(--ease) both; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } }
body.is-dragging .dropzone--breathe { animation: breathe 1.3s ease-in-out infinite; }
@keyframes breathe {
  50% { transform: scale(1.012); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 14%, transparent); }
}
body.is-dragging .dropzone__icon::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--brand); animation: ripple 1.1s ease-out infinite;
}
.dropzone__icon { position: relative; }
@keyframes ripple { from { transform: scale(0.9); opacity: 0.8; } to { transform: scale(1.7); opacity: 0; } }
.progress__meta { font-variant-numeric: tabular-nums; }
.progress__meta--muted { color: var(--text-muted); font-size: var(--fs-base); margin-top: -0.7rem; }
.progress__current { width: 100%; }
.progress__file { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-base); color: var(--text-muted); margin-bottom: 0.35rem; }
.progress__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 6px; border-radius: var(--r-sm); background: var(--surface-3); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width 0.2s; }
.progress-line { display: flex; flex-direction: column; gap: 0.35rem; font-size: var(--fs-base); color: var(--text-muted); }

/* ---- Status screens and results -------------------------------------- */

.status, .result { align-items: center; text-align: center; }
.status__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: 1.75rem;
}
.status__icon--check { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.status__icon--alert, .status__icon--trash { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.status__title { font-size: calc(1.25rem * var(--fs-h, 1)); font-weight: 600; letter-spacing: -0.01em; }
.status__text { color: var(--text-muted); }
.copy { display: flex; gap: 0.5rem; width: 100%; }
.copy__url { flex: 1; min-width: 0; font-size: var(--fs-base); }
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.5rem; width: 100%; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.7rem 0.3rem; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.action:hover { background: var(--surface-2); border-color: #d1d5db; }
.action .i { font-size: 1.25rem; color: var(--brand); }
.action--danger .i { color: var(--danger); }
.result .files { width: 100%; text-align: left; }
.message {
  margin: 0; padding: 0.9rem 1.1rem;
  border-radius: var(--r-md); background: var(--surface-2);
  border-left: 3px solid var(--brand); white-space: pre-line;
}
.message:empty { display: none; }
.download .btn--lg { margin-top: 0.2rem; }
.download .badge-line { justify-content: flex-start; }
.wide-page .main, .admin-page .main { justify-content: flex-start; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3rem 1rem; color: var(--text-muted); }

/* ---- My transfers ---------------------------------------------------- */

.transfers { width: 100%; max-width: 1100px; display: flex; flex-direction: column; gap: 1.25rem; align-self: center; }
.transfers__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.transfer-list { display: flex; flex-direction: column; gap: 0.75rem; }
.transfer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center;
  padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.transfer.is-gone { opacity: 0.55; }
.transfer__title { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer__meta { font-size: var(--fs-sm); color: var(--text-muted); }
.transfer__badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.transfer__badges:empty { display: none; }
.transfer__stats { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.transfer__dl { font-weight: 600; color: var(--text); }
.transfer__log { grid-column: 1 / -1; list-style: none; margin: 0.25rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.3rem; font-size: var(--fs-sm); }
.transfer__log li { display: flex; align-items: center; gap: 0.5rem; }
.transfer__log .i { color: var(--text-muted); }
.transfer__log-who { font-weight: 600; }
.transfer__log-when { color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.transfer__actions { display: flex; }
.transfer__actions label.icon-btn { cursor: pointer; }
.transfer__progress { grid-column: 1 / -1; margin-top: 0.5rem; }
.transfer__edit {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.8rem; align-items: end;
  padding-top: 0.9rem; border-top: 1px solid var(--border);
}
.transfer__edit .btn-row { grid-column: 1 / -1; justify-content: flex-end; }
.transfer__edit .btn-row > .btn { flex: 0 0 auto; }

/* ---- Terms, installer ----------------------------------------------- */

.tos { max-width: 46rem; }
.tos__title { font-size: calc(1.6rem * var(--fs-h, 1)); }
.tos__text { white-space: pre-line; color: var(--text-muted); font-size: var(--fs-base); }
.install { width: 100%; max-width: 34rem; display: flex; flex-direction: column; gap: 1.2rem; }
.install .steps__item b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .install .steps__item b { display: none; } }
.install__card { max-width: none; }
.install__title { font-size: 1.35rem; }
.install__form { display: flex; flex-direction: column; gap: 1rem; }
.install__nav { display: flex; justify-content: space-between; gap: 0.6rem; }
.install__done { display: flex; flex-direction: column; gap: 0.6rem; }
.install__link { color: var(--brand); font-weight: 600; }

/* ---- Admin ------------------------------------------------------------ */

.admin { width: 100%; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.tabs { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.tabs__tab {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.75rem; border-radius: var(--r-md);
  font-weight: 500; font-size: var(--fs-base); text-decoration: none; color: var(--text-muted);
}
.tabs__tab .i { font-size: var(--fs-md); }
.tabs__tab:hover { background: var(--surface-3); color: var(--text); }
.tabs__tab.is-active { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: calc(0.5rem - 1px) calc(0.75rem - 1px); }
.tabs__tab.is-active .i { color: var(--brand); }
.tabs__logout { margin-top: 0.75rem; }
.admin__content { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.panel {
  padding: 1.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 1.2rem;
}
.panel__title { font-size: calc(1.15rem * var(--fs-h, 1)); font-weight: 600; }
.panel__subtitle { font-size: calc(1rem * var(--fs-h, 1)); font-weight: 600; margin-top: 0.6rem; }
.panel__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.panel__info { display: flex; flex-direction: column; gap: 0.5rem; color: var(--text-muted); font-size: var(--fs-base); }
.panel__info pre { margin: 0; padding: 0.9rem 1rem; background: var(--surface-2); border-radius: var(--r-md); overflow-x: auto; color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.75rem; }
.stat { padding: 0.8rem 0.9rem; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 0.2rem; }
.stat__value { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--fs-sm); color: var(--text-muted); }
.toolbar { display: flex; gap: 0.5rem; }
.toolbar .input { flex: 1; }
.toolbar__info { font-size: var(--fs-sm); color: var(--text-muted); margin-top: -0.6rem; }
.table-wrap { margin: 0 -0.5rem; }
/* Fixed layout: the columns share the panel, so a long name is cut off
   instead of pushing the table wider than the page. */
.table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--fs-base); }
/* Shares, not fixed widths: whatever the panel is wide, the columns fit into
   it, and a hidden column hands its share to the others. */
.table th.table__num { width: 10%; }
.table th.table__date { width: 11%; }
.table th.table__flags { width: 6%; }
.table th.table__tiny { width: 7%; }
.table th.table__id { width: 10%; }
.table th.table__from { width: 9%; }
.table th.table__actions { width: 14%; }
.table th.table__wide { width: 30%; }
.table th {
  padding: 0.55rem 0.4rem; text-align: left; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.table td { padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table:not(.table--form) tbody tr:hover { background: var(--surface-2); }
.table a { text-decoration: none; }
.table__sort.is-asc::after { content: " ↑"; }
.table__sort.is-desc::after { content: " ↓"; }
.table__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table__name { max-width: 18rem; }
/* Everything that can be long is cut off instead of widening the row. */
.table td, .table th { overflow: hidden; text-overflow: ellipsis; }
.table td select, .table td .input--inline { max-width: 100%; }
.table th { white-space: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Long ids and addresses are cut off so that a row never widens the panel. */
.table td code { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.table__owner { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table__date { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.table__date small { display: block; color: var(--text-muted); }
@media (max-width: 1100px) {
  .table__hide-md { display: none; }
}
@media (max-width: 900px) {
  .table__hide-sm { display: none; }
}
/* Below this a row of nine columns cannot be read: every row becomes a card
   and each value keeps the column title from its data-label. */
@media (max-width: 720px) {
  .table, .table tbody, .table tr, .table td { display: block; width: auto; max-width: none; }
  .table thead { display: none; }
  .table tr { border-bottom: 1px solid var(--border); padding: 0.55rem 0; }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 0.18rem 0.5rem; display: flex; gap: 0.7rem; align-items: baseline; text-align: left; white-space: normal; }
  .table td::before {
    content: attr(data-label); flex: 0 0 5.5rem; color: var(--text-muted);
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  }
  .table td:not([data-label])::before { content: none; }
  .table td:empty { display: none; }          /* a value that is not there needs no title */
  .table td > * { min-width: 0; }
  .table td, .table td small, .table td code { overflow-wrap: anywhere; }
  .table__num { text-align: left; }
  .table__hide-md, .table__hide-sm { display: flex; }   /* a card has room for everything */
  .table__empty { display: block; }
  .table__empty::before { content: none; }
  .table__name a, .table__name span, .table__owner { display: inline; }
  /* The cell is a flex row, so the second line has to ask for one. */
  .table td { flex-wrap: wrap; }
  .table__name small { flex: 1 0 calc(100% - 5.5rem); margin-left: 5.5rem; }
  .table td code { max-width: 100%; }
  .table--form td input, .table--form td select { width: 100%; }
}
/* On a narrow phone even a short title is too much beside the value. */
@media (max-width: 360px) {
  .table td { display: block; }
  .table td::before { display: block; margin-bottom: 0.1rem; }
  .table__name small { flex-basis: 100%; margin-left: 0; }
}
.table__name a, .table__name span { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table__name small { display: block; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table__empty { text-align: center; color: var(--text-muted); padding: 2rem !important; }
/* Flex, not inline-block: the white space between the little forms would
   otherwise widen the column by a button. */
.table td.table__actions { display: flex; align-items: center; padding-left: 0.2rem; padding-right: 0.2rem; }
.table__actions form { margin: 0; }
.table__log { display: inline-block; }
.table__log summary { list-style: none; cursor: pointer; color: var(--text-muted); display: inline-block; margin-left: 0.3rem; }
.table__log summary::-webkit-details-marker { display: none; }
.table__log div { white-space: nowrap; text-align: left; font-size: var(--fs-sm); }
.table__log small { color: var(--text-muted); }
.table__flags .flag { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 0.3rem; margin-right: 0.2rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-xs); font-weight: 600; }
/* Every file of every transfer, grouped by the transfer it went out with. */
.transfers__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.transfers__bar .input { max-width: 18rem; }
.group { margin-bottom: 1rem; }
.group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin-bottom: 0.35rem; }
.group__title { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group__meta { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---- The bell, and what happened -------------------------------------- */
.nav-link--bell { position: relative; }
.bell-count {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 3px;
  display: grid; place-items: center; border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font-size: var(--fs-2xs); font-weight: 800; line-height: 1;
}
.news { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; }
.news__item { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.news__item:last-child { border-bottom: 0; }
.news__icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-muted); }
.news__item.is-new .news__icon { background: var(--brand); color: var(--on-brand); }
.news__text { flex: 1; min-width: 0; font-size: var(--fs-base); }
.news__text a { text-decoration: none; }
.news__text a:hover { text-decoration: underline; }
.news__text small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.news__when { flex: 0 0 auto; font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .news__when { display: none; } }

/* ---- My files --------------------------------------------------------- */
.files-page { display: flex; flex-direction: column; gap: 0.9rem; }
.fs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.fs-bar__right { display: flex; align-items: center; gap: 0.8rem; }
.fs-quota { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fs-quota.is-full { color: var(--danger); font-weight: 600; }
.fs-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.fs-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.fs-item:last-child { border-bottom: 0; }
.fs-item:hover { background: var(--surface-2); }
.fs-item.is-picked { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.fs-tick { flex: 0 0 auto; width: 16px; height: 16px; }
.fs-badge {
  flex: 0 0 auto; width: 34px; height: 34px; display: inline-grid; place-items: center; overflow: hidden;
  border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.02em; color: var(--text-muted);
}
.fs-badge--dir { color: var(--brand); font-size: var(--fs-md); }
.fs-badge--thumb img { width: 100%; height: 100%; object-fit: cover; }
.fs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fs-name a { text-decoration: none; }
.fs-name a:hover { text-decoration: underline; }
.fs-size, .fs-when { flex: 0 0 auto; font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fs-size { min-width: 5rem; text-align: right; }
.fs-when { min-width: 9.5rem; text-align: right; }
.fs-row-actions { flex: 0 0 auto; display: flex; gap: 2px; }
.fs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; border-radius: var(--r-md); background: var(--surface-2); }
.fs-actions .is-danger { color: var(--danger); }
.fs-empty { color: var(--text-muted); text-align: center; padding: 2rem 0; }
.fs-shared { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.7rem; border-radius: var(--r-md); background: var(--surface-2); }
.fs-shared p { margin: 0; flex: 1 1 100%; font-size: var(--fs-base); }
.fs-shared .input { flex: 1; min-width: 12rem; }
.fs-drop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); backdrop-filter: blur(2px); }
.fs-drop span { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.4rem; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
@media (max-width: 720px) {
  .fs-when { display: none; }
  .fs-size { min-width: 4rem; }
}

/* ---- Browsing the folders of a transfer ------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-bottom: 0.6rem; font-size: var(--fs-sm); }
.crumbs a { display: inline-flex; align-items: center; min-height: 24px; gap: 0.3rem; text-decoration: none; color: var(--text-muted); padding: 0.1rem 0.35rem; border-radius: var(--r-sm); }
.crumbs a:hover { background: var(--surface-2); color: var(--text); }
.crumbs [aria-current] { font-weight: 600; color: var(--text); }
.crumbs__sep { color: var(--text-muted); opacity: 0.5; }
.file--dir .file__name a { text-decoration: none; font-weight: 600; }
.file--dir:hover { background: var(--surface-2); }
.file__badge--dir { display: inline-grid; place-items: center; color: var(--brand); background: var(--surface-2); text-decoration: none; }

/* The step-up card: it must be the first thing on the page, not a detail. */
.reauth { border: 2px solid var(--brand); margin-bottom: 1rem; }
.reauth .row-between { gap: 0.6rem; }
.reauth input { flex: 1; }

/* ---- Comments on a transfer ------------------------------------------ */
.comments { margin-top: 1.4rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.comments__title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.8rem; font-size: var(--fs-md); font-weight: 600; }
.comments__list { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; max-height: 22rem; overflow-y: auto; }
.comment { background: var(--surface-2); border-radius: var(--r-md); padding: 0.6rem 0.75rem; }
.comment--none { background: none; padding: 0.2rem 0; color: var(--text-muted); font-size: var(--fs-base); }
.comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 0.25rem; }
.comment__who { font-weight: 600; color: var(--text); }
.comment__file { background: var(--surface-3); border-radius: var(--r-sm); padding: 0.05rem 0.4rem; font-variant-numeric: tabular-nums; }
.comment__when { margin-left: auto; }
.comment__text { margin: 0; font-size: var(--fs-base); line-height: 1.5; overflow-wrap: anywhere; }
.comments__about { margin: 0 0 0.4rem; font-size: var(--fs-sm); color: var(--text-muted); }
.comments__form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.comments__form textarea { flex: 1 1 14rem; min-width: 0; resize: vertical; }
.viewer__bar .btn--sm { margin-left: 0.6rem; }

.pagination { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: var(--r-md); text-decoration: none; font-weight: 600; font-size: var(--fs-base); }
.pagination a:hover { background: var(--surface-3); }
.pagination .is-current { background: var(--brand); color: var(--on-brand); }
.form { display: flex; flex-direction: column; gap: 1.1rem; }
/* Two columns at most. Three fit on a wide screen and read badly: the eye has
   to travel too far from a label to the next one, and a group of four fields
   becomes 3 + 1 with two holes in it. */
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem;
              align-items: start; }
@media (max-width: 52rem) { .form__grid { grid-template-columns: 1fr; } }
/* A box is as tall as what is in it. Stretching a short group to match a long
   one next to it leaves a hand's width of empty border. */
.form__grid > .form__group { align-self: start; }
/* A number is never 600 pixels wide, however much room the column has. */
.form input[type="number"] { max-width: 11rem; }
.form__group { margin: 0; padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.form__group legend {
  padding: 0 0.35rem; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted);
}
.form__group h3 { font-size: var(--fs-md); }
.form__group h3 small { font-weight: 500; color: var(--text-muted); font-size: var(--fs-sm); margin-left: 0.3rem; }
.form__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.form .row { display: grid; grid-template-columns: 1fr auto 5.5rem; align-items: center; gap: 0.6rem; }
.form .row input[type="color"] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); background: none; }
.form__group--wide { grid-column: 1 / -1; }
.form .row--pair { grid-template-columns: 1fr 44px 44px; }
.form .row--head { color: var(--text-muted); font-size: var(--fs-sm); }
.form .row output { font-family: ui-monospace, monospace; font-size: var(--fs-base); color: var(--text-muted); }
.image-slot__preview { display: grid; place-items: center; min-height: 80px; padding: 0.75rem; border-radius: var(--r-sm); background: var(--surface-2); }
.image-slot__preview img { max-width: 100%; max-height: 64px; }
.image-slot__form { display: inline-block; margin-right: 0.6rem; }
.admin__flash { margin: 0; }
.texts__list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.texts__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0.75rem; align-items: center; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); }
.texts__row:last-child { border-bottom: 0; }
.texts__row.is-last-prominent { border-bottom: 3px solid var(--surface-3); }
.texts__row.is-changed { background: var(--brand-soft); }
.texts__source { font-size: var(--fs-base); color: var(--text-muted); overflow-wrap: anywhere; }
.texts__row input, .texts__row textarea { width: 100%; min-height: 38px; padding: 0.45rem 0.7rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.texts__row textarea { resize: vertical; }
.texts__save { position: sticky; bottom: 0.75rem; }
@media (max-width: 700px) { .texts__row { grid-template-columns: 1fr; gap: 0.3rem; } }
.code-inline { padding: 0.15rem 0.4rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: 0.85em; overflow-wrap: anywhere; }

/* ---- Small screens --------------------------------------------------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 1.75rem; justify-items: center; text-align: center; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__points { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; margin-top: 1.2rem; }
  .hero__points li { font-size: var(--fs-base); }
  .hero__points .i { width: 28px; height: 28px; font-size: var(--fs-base); }
  .hero__panel { max-width: var(--card-w); text-align: left; }
  .admin { grid-template-columns: 1fr; }
  .tabs { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 0.25rem; }
  .tabs__tab { white-space: nowrap; }
  .tabs__logout { margin: 0 0 0 auto; }
}
@media (max-width: 600px) {
  .page { padding: 0 1rem; }
  .header { min-height: 64px; }
  .nav-link span { display: none; }
  .nav-link { padding: 0 0.6rem; }
  .hero__title { font-size: calc(2.1rem * var(--fs-h, 1)); }
  .hero__lead { font-size: var(--fs-md); }
  .hero__points { display: none; }
  .card { padding: 1.25rem; }
  .dropzone:not(.dropzone--compact) { min-height: 12rem; }
  .option__more, .option__hint { padding-left: 0; }
  .transfer { grid-template-columns: 1fr auto; }
  .transfer__stats { grid-column: 1 / -1; flex-direction: row; gap: 1rem; order: 3; }
  .panel { padding: 1.2rem; }
  .steps__item { font-size: var(--fs-xs); }
}
@media print {
  body::before, body::after { display: none; }
  .card { box-shadow: none; }
}

/* Receive widget: index.php?r=<id>&embed=1 inside an iframe on another site. */
.embed-page { background: transparent; }
.embed-page::before, .embed-page::after { display: none; }   /* the host page provides the background */
.embed-page .header,
.embed-page .footer { display: none; }
.embed-page .page { padding: 0.9rem; min-height: 0; }
.embed-page .hero__panel { max-width: none; }
.widget__title { margin: 0 0 0.7rem; font-family: var(--font-bold); font-weight: 600; font-size: var(--fs-md); }

/* ---- Plans and subscription (billing.php) ---------------------------- */

.plan-usage { list-style: none; margin: 0.2rem 0 0.9rem; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.plan-usage li { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-base); }
.plan-usage span { color: var(--text-muted); }
.plan-bar { margin-bottom: 1rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.4rem auto 0; max-width: 60rem; }
.plan {
  display: flex; flex-direction: column; gap: 0.7rem; padding: 1.3rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.plan--current { border-color: var(--c-main); }
.plan__name { margin: 0; font-family: var(--font-bold); font-weight: 600; font-size: var(--fs-lg); }
.plan__price { margin: -0.3rem 0 0; color: var(--c-main); font-family: var(--font-bold); font-weight: 600; font-size: 1.4rem; }
.plan__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: var(--fs-base); color: var(--text-muted); }
.plan__points li::before { content: "✓"; color: var(--c-main); margin-right: 0.45rem; }
.plan .btn, .plan .badge { margin-top: auto; }
.fineprint--center { text-align: center; }
.brand-preview { display: flex; align-items: center; gap: 0.9rem; margin: -0.4rem 0 0; }
.brand-preview img { max-height: 48px; max-width: 180px; border-radius: var(--r-sm); }
.table--form th, .table--form td { padding: 0.3rem 0.35rem; font-size: var(--fs-sm); }
.table--form input[type="text"], .table--form input[type="number"], .table--form select { width: 100%; min-width: 3rem; padding: 0.3rem 0.4rem; font-size: var(--fs-sm); }
.table--form input[type="checkbox"] { margin: 0 auto; display: block; }

/* Release notes of a pending update (admin → Settings). */
.release-notes { margin: 0.2rem 0 0.9rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.release-notes summary { padding: 0.6rem 0.9rem; cursor: pointer; font-family: var(--font-bold); }
.release-notes__body { max-height: 20rem; overflow-y: auto; padding: 0 0.9rem 0.9rem; font-size: var(--fs-base); line-height: 1.55; }

/* ---- Admin overview: what is switched on ----------------------------- */

/* Two at most, like every other group of boxes in here: four columns of
   name-and-value turn a summary into a spreadsheet. */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin: 0.4rem 0 0.4rem;
            align-items: start; }
@media (max-width: 52rem) { .features { grid-template-columns: 1fr; } }
.feature-group { padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.feature-group__title { margin: 0 0 0.5rem; font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feature a {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: baseline; gap: 0.55rem;
  padding: 0.35rem 0; color: inherit; text-decoration: none; border-radius: var(--r-sm);
}
.feature a:hover { background: var(--surface-2); }
.feature__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); align-self: center; }
.feature--on .feature__dot { background: var(--c-main); }
.feature__label { font-size: var(--fs-base); }
.feature__value { font-size: var(--fs-sm); color: var(--text-muted); text-align: right; overflow: hidden; text-overflow: ellipsis; max-width: 11rem; white-space: nowrap; }
.feature--on .feature__value { color: var(--text); font-weight: 600; }
.sysinfo { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0.8rem 0 0; font-size: var(--fs-base); }
.sysinfo dt { color: var(--text-muted); }
.sysinfo dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }

/* Team members on the account page. */
.member-list { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.member-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0.7rem; background: var(--surface-2); border-radius: var(--r-md); font-size: var(--fs-base); }
.member-list form { margin: 0; }
.member__name { display: flex; align-items: center; gap: 0.5rem; overflow: hidden; text-overflow: ellipsis; }
.member-list--tight li { padding: 0.15rem 0; font-size: var(--fs-sm); background: none; justify-content: flex-start; gap: 0.35rem; }
.member-list--tight { gap: 0.1rem; margin-bottom: 0.35rem; }
input[type="color"] { max-width: 5rem; padding: 0.2rem; }
.transfer__people { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0 0; }
.transfer__people .chip { cursor: pointer; border: 0; font: inherit; }
.transfer__log li.is-view { color: var(--text-muted); }

/* Health check on the admin overview. */
.doctor { list-style: none; margin: 0.3rem 0 0.6rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); gap: 0.3rem 1rem; }
.doctor__item { display: grid; grid-template-columns: 18px 1fr; gap: 0.2rem 0.6rem; align-items: baseline; padding: 0.35rem 0; font-size: var(--fs-base); }
.doctor__item .i { color: var(--ok); }
.doctor__item--warn .i { color: var(--warn); }
.doctor__item--error .i { color: var(--danger); }
.doctor__title { font-weight: 600; }
.doctor__detail { grid-column: 2; color: var(--text-muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.icon-btn.is-on { color: var(--brand); background: var(--brand-soft); }

/* ---- Viewer: looking at a file without leaving the page --------------- */

body.is-previewing { overflow: hidden; }
.viewer {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1rem; background: rgba(8, 12, 30, 0.82); backdrop-filter: blur(6px);
}
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #fff; }
.viewer__title { margin: 0; font-family: var(--font-bold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__bar .icon-btn { color: #fff; }
.viewer__bar .icon-btn:hover { background: rgba(255, 255, 255, 0.15); }
.viewer__stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.viewer__stage > * { max-width: 100%; max-height: 100%; border-radius: var(--r-md); }
.viewer__stage img, .viewer__stage video { object-fit: contain; background: #000; }
.viewer__stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer__stage audio { width: min(28rem, 100%); }
.viewer__text {
  width: 100%; height: 100%; margin: 0; padding: 1rem; overflow: auto; background: var(--surface);
  color: var(--text); font-size: var(--fs-base); white-space: pre-wrap; word-break: break-word;
}
.file__path { display: block; color: var(--text-muted); font-weight: 400; font-size: var(--fs-xs); }

/* ---- The other design: "soft" ----------------------------------------
   Two looks share one style sheet. The base above is "flat": small radii,
   hairlines, quiet shadows – the workbench look of a Tabler dashboard.
   What follows restores Drop's original "soft" look: round, glossy, with
   big shadows and a colour glow behind the page. The admin picks one
   (Design → Look), it lands on <html data-design>.
   ponytail: overrides, not a second style sheet – one file stays one file. */

:root[data-design="soft"] {
  --bg: #f4f6fb;
  --surface-2: #f3f5f9;
  --surface-3: #e8ecf3;
  --text: #0c1322;
  --text-muted: #5d6679;
  --border: #e2e7ef;
  --ink: #0c1322;
  --glow: 0.45;
  --r-lg: 24px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 48px -16px rgba(16, 24, 40, 0.16);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 2px 8px -2px rgba(16, 24, 40, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root[data-design="soft"]:not([data-theme="light"]) {
    --bg: #0a0d14;
    --surface: #121824;
    --surface-2: #19202e;
    --surface-3: #232c3c;
    --text: #eef2f8;
    --text-muted: #98a2b4;
    --border: #252f41;
    --ink: #eef2f8;
    --on-ink: #0c1322;
    --glow: 0.16;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -16px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-design="soft"][data-theme="dark"] {
  --bg: #0a0d14;
  --surface: #121824;
  --surface-2: #19202e;
  --surface-3: #232c3c;
  --text: #eef2f8;
  --text-muted: #98a2b4;
  --border: #252f41;
  --ink: #eef2f8;
  --on-ink: #0c1322;
  --glow: 0.16;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -16px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
}

[data-design="soft"] body { font-size: calc(0.9375rem * var(--fs-t, 1)); }
[data-design="soft"] :is(h1, h2, h3) { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
[data-design="soft"] .header { min-height: 76px; }
[data-design="soft"] .logo__word { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.045em; }
[data-design="soft"] .nav-link { height: 38px; padding: 0 0.85rem; border-radius: 999px; font-weight: 600; font-size: var(--fs-base); color: var(--text); }
[data-design="soft"] .avatar { width: 36px; height: 36px; border-radius: 50%; font-size: var(--fs-base); font-weight: 700; }
[data-design="soft"] .hero__title { font-size: calc(clamp(2.2rem, 2.5vw + 1.4rem, 3.7rem) * var(--fs-h, 1)); font-weight: 800; line-height: 1.04; letter-spacing: -0.04em; }
[data-design="soft"] .hero__accent {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-design="soft"] .hero__lead { font-size: var(--fs-lg); }
[data-design="soft"] .hero__points .i { border: 0; border-radius: 10px; box-shadow: var(--shadow-sm); }
[data-design="soft"] .card { padding: 1.75rem; box-shadow: var(--shadow); }
[data-design="soft"] .card__title, [data-design="soft"] .status__title { font-size: calc(1.45rem * var(--fs-h, 1)); font-weight: 700; letter-spacing: -0.025em; }
[data-design="soft"] .page-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.035em; }
[data-design="soft"] .eyebrow { font-weight: 700; letter-spacing: 0.08em; color: var(--brand); }
[data-design="soft"] .btn { height: 44px; padding: 0 1.3rem; border-radius: 999px; font-weight: 650; font-size: var(--fs-base); }
[data-design="soft"] .btn--primary { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
[data-design="soft"] .btn--primary:hover { filter: brightness(1.08); }
[data-design="soft"] .btn--lg { height: 52px; font-size: var(--fs-md); }
[data-design="soft"] .btn--sm { height: 36px; padding: 0 1rem; font-size: var(--fs-base); }
[data-design="soft"] .icon-btn { width: 38px; height: 38px; border-radius: 999px; }
[data-design="soft"] .icon-btn--sm { width: 32px; height: 32px; }
[data-design="soft"] :is(.input, .field input, .field select, .field textarea) {
  min-height: 46px; padding: 0.65rem 0.95rem; background: var(--surface-2);
}
[data-design="soft"] :is(.input, .field input, .field select, .field textarea):focus,
[data-design="soft"] .chips:focus-within { box-shadow: 0 0 0 4px var(--brand-soft); }
[data-design="soft"] .input--inline { min-height: 40px; }
[data-design="soft"] .alert { border: 0; }
[data-design="soft"] .badge { padding: 0.25rem 0.65rem; border: 0; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
[data-design="soft"] .segmented { gap: 4px; padding: 4px; border-radius: 999px; }
[data-design="soft"] .segmented span { height: 38px; border-radius: 999px; font-weight: 600; font-size: var(--fs-base); }
[data-design="soft"] .chips { min-height: 46px; padding: 0.4rem 0.5rem; background: var(--surface-2); }
[data-design="soft"] .chip { padding: 0.2rem 0.25rem 0.2rem 0.65rem; border-radius: 999px; font-size: var(--fs-base); font-weight: 600; }
[data-design="soft"] .chip button { width: 22px; height: 22px; border-radius: 50%; }
[data-design="soft"] .dropzone { border: 2px dashed var(--border); border-radius: 20px; }
[data-design="soft"] .dropzone__icon {
  width: 64px; height: 64px; font-size: 1.7rem;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 90%, transparent);
}
[data-design="soft"] .dropzone__title { font-size: var(--fs-lg); font-weight: 700; }
[data-design="soft"] .bar { border-radius: 999px; }
[data-design="soft"] .bar span { background: linear-gradient(90deg, var(--brand), var(--accent)); }
[data-design="soft"] .message { border-left-color: var(--accent); }
[data-design="soft"] .transfer { padding: 1rem 1.1rem; border-radius: 18px; }
[data-design="soft"] .tabs__tab { padding: 0.6rem 0.85rem; border-radius: 12px; font-weight: 600; font-size: var(--fs-base); }
[data-design="soft"] .tabs__tab.is-active { border: 0; padding: 0.6rem 0.85rem; box-shadow: var(--shadow-sm); }
[data-design="soft"] .panel { padding: 1.75rem; }
[data-design="soft"] .panel__title { font-size: calc(1.35rem * var(--fs-h, 1)); font-weight: 700; }
[data-design="soft"] .stat { border: 0; background: var(--surface-2); }
[data-design="soft"] .stat__value { font-size: 1.55rem; font-weight: 700; }
[data-design="soft"] .table th { font-weight: 700; }
[data-design="soft"] .table tbody tr:hover { background: none; }
[data-design="soft"] .feature-group { border: 0; background: var(--surface-2); }
[data-design="soft"] .form__group legend { font-size: var(--fs-base); letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 700; }
[data-design="soft"] .pagination :is(a, span) { min-width: 34px; height: 34px; border-radius: 10px; }
[data-design="soft"] .fs-drop span { border-radius: 999px; }
@media (max-width: 600px) {
  [data-design="soft"] .card { border-radius: 20px; }
}

/* ---- Picking several rows at once ------------------------------------- */
.table th.table__pick { width: 3%; }
.table__pick { text-align: center; }
.table__pick input { width: 1rem; height: 1rem; accent-color: var(--brand); }
.bulk {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-bottom: 0.6rem; padding: 0.5rem 0.7rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
}
.bulk__count { font-size: var(--fs-base); font-weight: 600; margin-right: 0.3rem; }
.bulk .is-danger { color: var(--danger); }
@media (max-width: 720px) {
  .table td.table__pick { display: flex; }
  .table td.table__pick::before { content: attr(aria-label); }
}

/* ---- The delivery receipt (receipt.php) ------------------------------- */
.receipt { width: 100%; max-width: 60rem; align-self: center; display: flex; flex-direction: column; gap: 1rem; }
.sheet {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 2rem; display: flex; flex-direction: column; gap: 1.2rem;
}
.sheet__head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.sheet__title { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.sheet__by { font-size: var(--fs-base); color: var(--text-muted); text-align: right; }
.sheet__part { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.sheet__part:first-of-type { border-top: 0; }
.sheet__sub { margin: 0.6rem 0 0; font-size: var(--fs-base); font-weight: 600; }
.sheet__foot { border-top: 1px solid var(--border); padding-top: 0.8rem; font-size: var(--fs-sm); }
.sheet .table td code { font-size: var(--fs-xs); }
@media print {
  .no-print, .header, .footer { display: none !important; }
  .page, .main { display: block; padding: 0; }
  .sheet { border: 0; padding: 0; box-shadow: none; }
  .sheet .table { font-size: var(--fs-xs); }
  .sheet .table td code { font-size: var(--fs-2xs); overflow-wrap: anywhere; }
  a[href]::after { content: ""; }
}
.fs-path { display: block; font-size: var(--fs-xs); color: var(--text-muted); text-decoration: none; }
.fs-path:hover { color: var(--brand); text-decoration: underline; }
.fs-bar__right #fs-find { max-width: 14rem; }
.keep { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.keep .field__label { margin: 0; }

/* ---- The workbench frame (lib/template.php, s42_app_frame) ------------
   Signed in, on a page people work in: the navigation becomes a light
   sidebar, the content gets a breadcrumb bar and the whole width – the
   GitLab arrangement churz uses. The active line is a bar on the left over a
   brand tint. Below 900px the sidebar folds back into the plain header, so a
   phone keeps one row of icons instead of a drawer to open.
   ponytail: the header's own markup, rearranged by CSS – no second navigation to keep in step. */
.nav-link__side, .header__who, .crumbs { display: none; }
.header__me { display: contents; }
.header__sub:empty { display: none; }
@media (max-width: 900px) {
  .page--app .header { flex-wrap: wrap; height: auto; min-height: 64px; }
  .page--app .header__nav { flex-wrap: wrap; }
  .page--app .header__sub { order: 9; flex: 1 0 100%; padding-bottom: 0.5rem; }
  .page--app .header__sub .tabs { position: static; flex-direction: row; overflow-x: auto; }
  .page--app .header__sub .tabs__tab { white-space: nowrap; }
}
@media (min-width: 901px) {
  .page--app {
    --r-md: 4px; --r-sm: 4px;
    max-width: none; padding: 0; background: var(--surface);
    display: grid; grid-template-columns: 256px minmax(0, 1fr); grid-template-rows: 1fr auto;
  }
  .page--app .header {
    grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.75rem;
    padding: 0.7rem 0.6rem; background: var(--surface-2); border-right: 1px solid var(--border);
  }
  .page--app .logo { padding: 0.2rem 0.4rem 0.4rem; }
  .page--app .logo__mark { width: 28px; height: 28px; }
  .page--app .logo__word { font-size: var(--fs-lg); font-weight: 700; }
  .page--app .header__nav { flex: 1; flex-direction: column; align-items: stretch; gap: 1px; }
  .page--app .nav-link {
    width: 100%; height: 34px; justify-content: flex-start; gap: 0.7rem; padding: 0 0.6rem;
    border-radius: 4px; color: var(--text); font-weight: 400; font-size: var(--fs-base);
  }
  .page--app .nav-link .i { width: 1.1rem; color: var(--text-muted); }
  .page--app .nav-link:hover { background: var(--surface-3); }
  .page--app :is(.nav-link, .tabs__tab, .header__who)[aria-current="page"],
  .page--app .header .tabs__tab.is-active {
    background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; color: var(--text);
  }
  .page--app .nav-link[aria-current="page"] .i { color: var(--brand); }
  .page--app .nav-link__side { display: inline; font-style: normal; }
  /* The admin sections belong under "Admin", so it moves to the end of the list; its bar goes to the section. */
  .page--app .nav-link--bell { order: 1; }
  .page--app .nav-link[href$="admin.php"] { order: 2; }
  .page--app .header__sub { order: 3; }
  .page--app .header__me { order: 4; }
  .page--app .header__nav:has(.header__sub .tabs) .nav-link[aria-current="page"] { background: none; box-shadow: none; }
  .page--app .bell-count { position: static; margin-left: auto; }
  /* The admin sections hang under "Admin" as a second level, without icons. */
  .page--app .header__sub .tabs { position: static; gap: 1px; }
  .page--app .header__sub .tabs__tab {
    padding: 0.4rem 0.6rem 0.4rem 2.4rem; border: 0; border-radius: 4px;
    font-weight: 400; font-size: var(--fs-base); color: var(--text);
  }
  .page--app .header__sub .tabs__tab .i { display: none; }
  .page--app .header__sub .tabs__tab:hover { background: var(--surface-3); }
  .page--app .header__sub .tabs__logout { margin: 0.5rem 0 0 0.6rem; }
  .page--app .header__me {
    display: flex; align-items: center; gap: 0.6rem; margin-top: auto;
    padding: 0.75rem 0.4rem 0.1rem; border-top: 1px solid var(--border);
  }
  .page--app .avatar { flex: none; margin: 0; border-radius: 4px; }
  .page--app .header__who {
    display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 0.15rem 0.4rem;
    border-radius: 4px; text-decoration: none; line-height: 1.3;
  }
  .page--app .header__who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page--app .header__who small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page--app .header__who:hover { background: var(--surface-3); }
  .page--app .main { justify-content: flex-start; padding: 0 2rem 2.5rem; }
  .page--app .crumbs {
    display: flex; align-self: stretch; align-items: center; gap: 0.5rem;
    height: 49px; margin: 0 -2rem 1.75rem; padding: 0 2rem;
    border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-base);
  }
  .page--app .crumbs a { text-decoration: none; } .page--app .crumbs a:hover { color: var(--text); }
  .page--app .crumbs b { color: var(--text); font-weight: 600; }
  .page--app .admin { grid-template-columns: minmax(0, 1fr); }
  .page--app .page-title { font-size: 1.75rem; font-weight: 700; }
  .page--app .panel__title { font-size: calc(1.3rem * var(--fs-h, 1)); font-weight: 700; }
  .page--app .panel { box-shadow: none; }
  .page--app .footer { justify-content: flex-start; padding: 1rem 2rem 1.5rem; }
}

/* ---- The start page in the soft look: a slanted colour field ------------
   The soft look's two glows become one field behind the top of the start
   page, cut off at a slant – the arrangement of the project's own site. Its
   colours are the admin's (--bg-1, --bg-2, --c-light), so a brand changes
   the field with it. A download picture or the widget keep their own
   background, and the other pages keep the glows. */
[data-design="soft"] body.upload-page:not(.embed-page):not(.has-wallpaper)::after { display: none; }
[data-design="soft"] body.upload-page:not(.embed-page):not(.has-wallpaper)::before {
  position: absolute; inset: 0 0 auto; width: auto; height: max(88vh, 44rem); border-radius: 0; opacity: 1;
  background:
    radial-gradient(45vw 45vw at 5% 5%, color-mix(in srgb, var(--c-main) 65%, #fff), transparent 70%),
    radial-gradient(45vw 45vw at 95% 0%, var(--bg-2), transparent 70%),
    radial-gradient(40vw 40vw at 55% 100%, var(--bg-1), transparent 70%),
    color-mix(in srgb, var(--c-light) 55%, #fff);
  background-size: 140% 140%;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
  animation: drop-drift 28s ease-in-out infinite alternate;
}
@keyframes drop-drift { from { background-position: 0% 0%; } to { background-position: 100% 60%; } }
@media (prefers-color-scheme: dark) {
  [data-design="soft"]:not([data-theme="light"]) body.upload-page:not(.embed-page):not(.has-wallpaper)::before { opacity: 0.35; }
}
[data-design="soft"][data-theme="dark"] body.upload-page:not(.embed-page):not(.has-wallpaper)::before { opacity: 0.35; }
[data-design="soft"] .upload-page .hero__title { font-size: calc(clamp(2.6rem, 4.4vw + 0.8rem, 5rem) * var(--fs-h, 1)); font-weight: 800; line-height: 1.02; }
[data-design="soft"] .upload-page .hero__accent {
  display: block; background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: color-mix(in srgb, var(--c-main) 70%, var(--text));   /* dark enough on the light field */
}
[data-design="soft"] .upload-page .hero__lead { color: var(--text); font-size: var(--fs-lg); max-width: 32rem; }
[data-design="soft"] .upload-page .hero__points li { font-weight: 500; }
[data-design="soft"] .upload-page .hero__points .i {
  width: auto; height: auto; border: 0; background: none; box-shadow: none; color: color-mix(in srgb, var(--c-main) 70%, var(--text));
}
[data-design="soft"] .upload-page .hero__panel .card {
  border: 0; box-shadow: 0 50px 100px -20px rgba(10, 26, 58, 0.25), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
}

/* ======================================================================
 * DILOHVER Corporate Design Override - transfer.dilohver.de
 *
 * Source for brand colors: dilohver.de / Elementor kit post-17.css.
 * Adaptation: ONLY CSS variables and discreet upload card accent.
 * No application logic, JS, PHP or original selectors were removed.
 *
 * IMPORTANT: The four color values with !important intentionally override
 * brand colors dynamically emitted by the Drop admin interface. Remove the
 * !important rules to let Drop admin control them again.
 * ====================================================================== */

:root {
  /* Original Dilohver corporate colors. */
  --dilohver-navy: #15314F;
  --dilohver-blue: #2A619C;
  --dilohver-gold: #C29D3E;
  --dilohver-cream: #F6F5F1;
  --dilohver-beige: #ECE7DD;
  --dilohver-ink: #14110F;
  --dilohver-muted: #46617F;

  /* Drop branding properties (may also be set in the admin panel). */
  --c-main: #15314F !important;
  --c-light: #2A619C !important;
  --bg-1: #F6F5F1 !important;
  --bg-2: #ECE7DD !important;

  /* Flat/light surfaces, typography and interactive controls. */
  --bg: var(--dilohver-cream);
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --surface-3: #F2F1EC;
  --text: var(--dilohver-ink);
  --text-muted: var(--dilohver-muted);
  --border: #E7E0D3;
  --brand: var(--c-main);
  --accent: var(--c-light);
  --brand-soft: color-mix(in srgb, var(--c-main) 10%, transparent);
  --ink: var(--dilohver-navy);
  --on-ink: #FFFFFF;
}

/* Drop's optional "soft" look defines its own light-surface variables.
   Keep them synchronized with the Dilohver palette. Drop's more specific
   dark-mode selectors continue to override these for dark mode. */
:root[data-design="soft"] {
  --bg: var(--dilohver-cream);
  --surface-2: #FAF9F6;
  --surface-3: #F2F1EC;
  --text: var(--dilohver-ink);
  --text-muted: var(--dilohver-muted);
  --border: #E7E0D3;
  --ink: var(--dilohver-navy);
}

/* The original drop zone has a hardcoded neutral border in flat mode. */
.dropzone {
  border-color: var(--border);
}

/* Restrained brand-gold detail on the public upload card.
   Gold is not used for text because it lacks sufficient contrast on white. */
.upload-page .hero__panel .card {
  border-top: 2px solid var(--dilohver-gold);
}

.portal-page .portal-note { color: var(--text); }
[data-design="soft"] .portal-page .hero__title { font-size: calc(clamp(2.35rem, 3.4vw + 1rem, 4.25rem) * var(--fs-h, 1)); }
:root:root[data-theme="dark"] {
  --text-muted: #b3c2d4;
  --brand: #a5caed;
  --on-brand: #102a43;
}
:root[data-theme="dark"] .logo img:not(.logo__dark) { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo img:not(.logo__dark) { filter: brightness(0) invert(1); }
  :root:root:not([data-theme="light"]) {
    --text-muted: #b3c2d4;
    --brand: #a5caed;
    --on-brand: #102a43;
  }
}
@media (max-width: 900px) {
  .page--app .header__nav { min-width: 0; max-width: 100%; flex: 1 1 100%; }
  .page--app .header__sub { min-width: 0; max-width: 100%; }
  .page--app .header__sub .tabs { max-width: 100%; }
}
@media (max-width: 420px) {
  .header { column-gap: 0.5rem; }
  .header > .logo { min-width: 0; flex-shrink: 1; }
  .header > .logo img { max-width: min(160px, calc(100vw - 220px)); max-height: 36px; height: auto; }
}

