:root {
  --paper: #f4f1eb;        /* the warm white page */
  --card: #fffdf9;         /* the upload card */
  --ink: #1c1b19;          /* titles and figures */
  --muted: #8c867b;        /* small print */
  --line: #e6e0d5;         /* hairlines, the rail still to go */
  --accent: #e0592a;       /* the single accent: the coil, the rail behind it, the check */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: "JetBrains Mono Variable", ui-monospace, monospace; }

.stage {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 2vh 14px;
}

.loader {
  width: min(470px, 92vw);
  background: var(--card);
  border: 1px solid #ebe5da;
  border-radius: min(22px, 4.6vh);
  padding: min(20px, 3.6vh) min(22px, 5vw) min(16px, 3vh);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(40, 30, 10, .05), 0 10px 24px -16px rgba(40, 30, 10, .18), 0 30px 60px -30px rgba(40, 30, 10, .3);
  display: flex;
  flex-direction: column;
  gap: min(12px, 2.2vh);
}

.loader__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.loader__title { min-width: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--muted);
}

.eyebrow__icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  font-size: clamp(15px, min(4.4vw, 3.4vh), 20px);
  font-weight: 640;
  font-variation-settings: "wdth" 94;
  letter-spacing: -.015em;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1 .mono { font-size: .86em; font-weight: 520; letter-spacing: -.02em; }

.pct {
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: clamp(24px, min(7vw, 5.6vh), 34px);
  font-weight: 520;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  text-align: right;
  min-width: 3.4ch;
}

.pct i { font-style: normal; color: var(--muted); font-size: .52em; margin-left: 1px; }

.coil {
  display: block;
  width: 100%;
  height: auto;
  max-height: 30vh;
  overflow: visible;
  touch-action: pan-y;
}

.rail {
  stroke: var(--line);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.rail--done { stroke: var(--accent); opacity: .35; }

.strand {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strand--front { stroke: var(--accent); stroke-width: 1.6; }
.strand--back { stroke: var(--accent); stroke-width: 1.15; opacity: .42; }

.done__ring { fill: var(--accent); }

.done__tick {
  fill: none;
  stroke: #fffdf9;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.loader__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #f0ebe2;
  padding-top: min(10px, 1.8vh);
  font-size: 12.5px;
  color: var(--muted);
}

.size .mono { font-size: 11.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.size .mono + .mono, .size > .mono:last-child { color: var(--muted); }

.status {
  font-weight: 560;
  white-space: nowrap;
}

.status.is-done { color: var(--accent); }
