@font-face { font-family: "Commissioner"; src: url("/assets/Commissioner-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/assets/Commissioner-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/assets/Commissioner-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }

/* ACV palette, dark: Black #111111 ground, Off-white #F2EDE7 ink, Sand #D8D2C8, Sage #909990 */
:root {
  --bg: #111111;
  --surface: #191918;
  --surface-2: #1f1f1d;
  --ink: #F2EDE7;
  --ink-2: rgba(242, 237, 231, .62);
  --ink-3: rgba(242, 237, 231, .40);
  --line: rgba(216, 210, 200, .12);
  --line-2: rgba(216, 210, 200, .22);
  --sand: #D8D2C8;
  --sage: #909990;
  --bad: #d9907f;
  --radius: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
::selection { background: rgba(144, 153, 144, .4); }

.page {
  min-height: 100dvh;
  max-width: 540px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.top { padding: 8px 0 40px; }
/* The logo file is black on transparent: invert it to off-white. */
.logo { width: min(220px, 60vw); height: auto; display: block; filter: invert(94%) sepia(6%) saturate(240%) hue-rotate(345deg); }

main { flex: 1; }
h1 {
  font: 300 clamp(36px, 9.5vw, 48px)/1.05 "Commissioner", system-ui, sans-serif;
  margin: 0 0 12px; letter-spacing: -.03em;
}
.lead { margin: 0 0 32px; color: var(--ink-2); max-width: 36ch; }

/* One entrance for the whole column on load, nothing staggered per field. */
main { animation: enter 420ms var(--ease-out) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

.field { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--ink-2); margin-bottom: 8px; }
input[type="text"] {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font-size: 16px; /* 16px keeps iOS from zooming in */
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  outline: none; caret-color: var(--sand);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input[type="text"]::placeholder { color: var(--ink-3); }
input[type="text"]:focus { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(144, 153, 144, .18); }
input[aria-invalid="true"] { border-color: rgba(217, 144, 127, .6); }
input:disabled { opacity: .55; }

.drop {
  margin-top: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 156px; padding: 24px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface);
  color: var(--ink-2); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}
.drop svg { width: 28px; height: 28px; color: var(--ink); transition: transform 200ms var(--ease-out); }
.drop:active { transform: scale(0.985); }
.drop.over { background: var(--surface-2); border-color: var(--sage); }
.drop.over svg { transform: translateY(-3px); }
@media (hover: hover) and (pointer: fine) {
  .drop:hover { background: var(--surface-2); border-color: rgba(216, 210, 200, .32); }
  .drop:hover svg { transform: translateY(-2px); }
}
.drop:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.drop[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.drop-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .drop-desk { display: none; }
  .drop-touch { display: inline; }
}

.hint { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }
.muted { color: var(--ink-2); }

.list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.item {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), border-color 150ms ease;
  @starting-style { opacity: 0; transform: translateY(6px); }
}
.item .row { display: flex; align-items: center; gap: 12px; }
.item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.item .sz { font-size: 13px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item .x {
  border: 0; background: transparent; width: 40px; height: 40px; margin: -10px -10px -10px 0; border-radius: 50%;
  cursor: pointer; color: var(--ink-3); font-size: 20px; line-height: 1;
  transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.item .x:active { transform: scale(0.9); }
@media (hover: hover) and (pointer: fine) { .item .x:hover { background: var(--surface-2); color: var(--ink); } }
.item .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; }
.item .eta { color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .msg { font-size: 13px; margin-top: 8px; color: var(--bad); }
.item.ok .meta .st { color: var(--sage); }
.item.bad { border-color: rgba(217, 144, 127, .35); }
.item .retry {
  margin-top: 10px; border: 1px solid var(--line-2); background: transparent; border-radius: 999px;
  padding: 6px 16px; min-height: 38px; font-size: 14px; cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.item .retry:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .item .retry:hover { background: var(--surface-2); } }

/* Progress: scaleX on the compositor, linear because it is constant motion. */
.bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.bar i {
  display: block; height: 100%; width: 100%; background: var(--ink); border-radius: inherit;
  transform: scaleX(0); transform-origin: left center; transition: transform 250ms linear, background-color 200ms ease;
}
.item.ok .bar i { background: var(--sage); }

.overall {
  margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(6px); }
}
.overall .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.overall .hint { margin-top: 10px; }

.error {
  margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius);
  background: rgba(217, 144, 127, .08); border: 1px solid rgba(217, 144, 127, .22); color: var(--bad); font-size: 14px;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(-4px); }
}

.ts { margin-top: 20px; }
.ts:empty { margin-top: 0; }

.btn {
  margin-top: 24px; width: 100%; min-height: 56px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 16px; font-weight: 500; letter-spacing: .01em;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), opacity 200ms ease, background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #fffaf4; } }
.btn:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--surface-2); } }

.done {
  margin-top: 8px; padding: 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(8px) scale(0.98); }
}
.done h2 { font: 300 34px/1.1 "Commissioner", system-ui, sans-serif; letter-spacing: -.025em; margin: 0 0 8px; }
.done p { margin: 0; color: var(--ink-2); }

.foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.foot a { color: inherit; text-underline-offset: 3px; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--ink); } }

/* Reduced motion: keep fades, drop movement. */
@media (prefers-reduced-motion: reduce) {
  main { animation: fade 200ms ease both; }
  .item, .overall, .error, .done { @starting-style { transform: none; } }
  .drop, .btn, .item .x, .item .retry { transition-property: background-color, border-color, opacity, color; }
  .drop svg { transition: none; }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Heavy glass (Andreas, 26/11/2026) ----------
   A fixed light field sits behind everything so the blur has colour to catch.
   Only the two big panels use backdrop-filter; everything inside is plain translucency (cheap on phones). */
:root {
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .20);
}
body { position: relative; isolation: isolate; }
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34vmax 30vmax at 22% 30%, rgba(144, 153, 144, .85), transparent 68%),
    radial-gradient(30vmax 28vmax at 82% 48%, rgba(216, 210, 200, .50), transparent 66%),
    radial-gradient(40vmax 34vmax at 34% 78%, rgba(144, 153, 144, .60), transparent 70%),
    radial-gradient(24vmax 20vmax at 88% 90%, rgba(242, 237, 231, .26), transparent 68%),
    var(--bg);
}
/* Fine grain so the gradients do not band. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glass {
  position: relative;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(40px) saturate(170%);
  backdrop-filter: blur(40px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, .25),
    0 40px 80px -24px rgba(0, 0, 0, .65),
    0 2px 8px rgba(0, 0, 0, .25);
}
/* Specular edge along the top. */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 38%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass > :first-child { margin-top: 0; }
.done.glass { padding: 32px 24px; }
.glass .btn { margin-top: 20px; }

/* Controls inside the panel: translucent, no extra blur. */
input[type="text"], .drop, .item, .overall { background: var(--surface); border-color: var(--line); }
input[type="text"]:focus { background: rgba(255, 255, 255, .07); border-color: var(--line-2); }
.btn { box-shadow: 0 8px 24px -8px rgba(242, 237, 231, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { box-shadow: none; background: rgba(255, 255, 255, .04); }
.foot { border-top-color: rgba(255, 255, 255, .08); }

/* Without backdrop-filter support: a solid enough panel to stay readable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(28, 29, 27, .92); }
}
@media (max-width: 420px) {
  .glass { padding: 20px 16px; border-radius: 24px; }
}
