:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --faint: #ededed;
  --line: #0a0a0a;
  --soft-line: #d9d9d9;
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, "Inter", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #f5f5f5;
    --muted: #9a9a9a;
    --faint: #1c1c1c;
    --line: #f5f5f5;
    --soft-line: #333333;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- shell ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}
.wordmark {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordmark .mark {
  width: 22px; height: 22px;
  border: 2px solid var(--line);
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 13px; line-height: 1;
}
.nav-link {
  text-decoration: none;
  font-size: 15px;
  color: var(--muted);
}
.nav-link:hover { color: var(--fg); }

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 24px 120px;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 0 24px 88px;
}

/* ---------- at home: a link served from the sender's own computer ---------- */
/* The download page adds .home to <html> for those links. The font only downloads when something uses it. */
@font-face {
  font-family: "Scrawl";
  src: url("/fonts/gloria-hallelujah.woff2") format("woff2"); /* Gloria Hallelujah, SIL OFL: /fonts/gloria-hallelujah-OFL.txt */
  font-display: swap;
}
.scrawl { display: none; font-family: "Scrawl", "Comic Sans MS", cursive; font-weight: 400; letter-spacing: 0; color: var(--fg); }
.home .wordmark .at-home { display: inline-block; font-size: 21px; line-height: 1; margin: -10px 0 -10px -4px; transform: rotate(-4deg) translateY(-3px); }
.home footer .puter { display: block; width: fit-content; margin: 0 auto 8px; font-size: 19px; transform: rotate(-4deg); }
footer .tagline { position: relative; display: inline-block; }
footer .slash { display: none; position: absolute; left: -8px; top: 50%; width: calc(100% + 16px); height: 18px; transform: translateY(-50%); overflow: visible; }
.home footer .slash { display: block; }
.slash path { fill: none; stroke: var(--fg); stroke-width: 2.25; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.screen { display: none; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h1 {
  font-size: clamp(30px, 7vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 24px 0 10px;
  font-weight: 700;
}
.lede { color: var(--muted); font-size: 18px; margin: 0 0 36px; }
h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin: 36px 0 12px;
}
.small { font-size: 14px; color: var(--muted); }
.center { text-align: center; }

/* ---------- drop zone ---------- */
.drop {
  border: 2px dashed var(--line);
  border-radius: 24px;
  padding: 64px 24px;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  display: block;
}
.drop:hover, .drop.over { background: var(--faint); }
.drop.over { transform: scale(1.01); }
.drop .big { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.drop .arrow {
  width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
  font-size: 26px;
}
.drop input { display: none; }

/* ---------- file chip ---------- */
.file-chip {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.file-icon {
  width: 44px; height: 52px; flex: none;
  border: 1.5px solid var(--line);
  border-radius: 6px 14px 6px 6px;
  display: grid; place-items: end center;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding-bottom: 6px; text-transform: uppercase;
  overflow: hidden;
  background-size: cover; background-position: center;
}
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  border: 0; background: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; color: var(--muted);
}
.icon-btn:hover { background: var(--faint); color: var(--fg); }
.icon-btn.reveal { width: 44px; height: 44px; margin-right: -10px; flex: none; display: grid; place-items: center; } /* a thumb-sized target */

/* ---------- choice cards ---------- */
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1.5px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s ease;
}
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--line); box-shadow: inset 0 0 0 0.5px var(--line); }
.choice input[type=radio] {
  appearance: none; margin: 3px 0 0; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
}
.choice input[type=radio]:checked::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fg);
}
.choice .title { font-weight: 600; }
.choice .desc { font-size: 14px; color: var(--muted); }
.sub {
  margin-top: 12px; display: none; gap: 8px;
}
.choice:has(> input:checked) .sub { display: grid; }
.sub label {
  display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer;
}
.sub input[type=radio] { width: 16px; height: 16px; margin: 0; }
.sub input[type=radio]:checked::after { width: 8px; height: 8px; }

.inline-input {
  border: 0; border-bottom: 1.5px solid var(--line);
  background: transparent; width: 64px;
  font-family: var(--mono); padding: 0 2px; outline: none;
}

.note {
  margin-top: 10px;
  font-size: 14px;
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 12px;
  color: var(--muted);
}

/* ---------- inputs ---------- */
.field {
  display: flex; align-items: center;
  border: 1.5px solid var(--soft-line);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .15s ease;
}
.field:focus-within { border-color: var(--line); }
.field .prefix { color: var(--muted); font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.field input, textarea {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: transparent;
  padding: 13px 0;
}
.field input.mono { font-family: var(--mono); font-size: 14px; }
textarea {
  width: 100%;
  border: 1.5px solid var(--soft-line);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 84px;
}
textarea:focus { border-color: var(--line); }

.toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 4px 0;
}
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 99px;
  transition: background .15s ease;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--fg); transition: transform .15s ease, background .15s ease;
}
.switch input:checked + span { background: var(--fg); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--bg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line);
  background: var(--fg); color: var(--bg);
  border-radius: 99px;
  padding: 14px 26px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s ease, opacity .15s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--faint); opacity: 1; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 16px; font-size: 14px; }
.actions { display: grid; gap: 10px; margin-top: 36px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- link box ---------- */
.linkbox {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 10px 18px;
}
.linkbox code {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.summary { margin: 28px 0 0; padding: 0; list-style: none; }
.summary li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--soft-line);
  font-size: 15px;
}
.summary li span:first-child { color: var(--muted); }

.meter { height: 8px; border-radius: 99px; background: var(--faint); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; background: var(--fg); border-radius: 99px; }

/* ---------- download page ---------- */
.from {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--muted);
  margin-top: 16px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.preview {
  border: 1.5px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.preview .peek {
  aspect-ratio: 16 / 8;
  background:
    repeating-linear-gradient(45deg, var(--faint) 0 10px, transparent 10px 20px);
  display: grid; place-items: center;
  border-bottom: 1.5px solid var(--line);
}
.preview .peek .contents {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--mono); font-size: 13px;
  line-height: 1.7;
}
.preview .body { padding: 18px 20px 20px; }
.preview .name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.tag {
  font-size: 12px; font-family: var(--mono);
  border: 1px solid var(--soft-line);
  border-radius: 99px; padding: 2px 10px;
}
.preview p { margin: 0; color: var(--muted); font-size: 15px; }
.preview .stamp { font-size: 13px; color: var(--muted); margin: -4px 0 10px; cursor: default; }

.price { text-align: center; margin: 36px 0 8px; }
.price .amount {
  font-family: var(--mono); font-weight: 700;
  font-size: 44px; letter-spacing: -0.03em; line-height: 1.1;
}
.whatfor summary {
  list-style: none; cursor: pointer;
  display: inline-block; margin-top: 4px;
  font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.whatfor summary::-webkit-details-marker { display: none; }
.whatfor summary:hover { color: var(--fg); }
.whatfor[open] summary { color: var(--fg); }
.whatfor .receipt { text-align: left; animation: fade .2s ease; }

.receipt {
  margin-top: 12px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  font-family: var(--mono);
  font-size: 14px;
}
.receipt .line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding: 8px 0;
}
.receipt .line .who { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-family: var(--sans); }
.receipt .total {
  border-top: 1.5px dashed var(--line);
  margin-top: 8px; padding-top: 14px;
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 16px;
}
.receipt .bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; margin: 4px 0 14px; gap: 2px; }
.receipt .bar i { display: block; height: 100%; }
.receipt .bar i:nth-child(1) { background: var(--fg); }
.receipt .bar i:nth-child(2) { background: repeating-linear-gradient(90deg, var(--fg) 0 2px, transparent 2px 5px); }
.receipt .bar i:nth-child(3) { background: transparent; border: 1.5px solid var(--fg); border-radius: 0 99px 99px 0; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.key.k1 { background: var(--fg); }
.key.k2 { background: repeating-linear-gradient(90deg, var(--fg) 0 2px, transparent 2px 4px); }
.key.k3 { border: 1.5px solid var(--fg); }

.forward {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 20px; padding: 16px;
  border-radius: var(--radius);
  background: var(--faint);
  cursor: pointer;
}
.forward input {
  appearance: none; margin: 2px 0 0; flex: none;
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--line);
  display: grid; place-items: center; cursor: pointer;
}
.forward input:checked { background: var(--fg); }
.forward input:checked::after { content: "✓"; color: var(--bg); font-size: 13px; font-weight: 700; }

.pay-with { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.pay-with label {
  border: 1.5px solid var(--soft-line); border-radius: 12px;
  padding: 10px 6px; text-align: center; font-size: 14px; cursor: pointer;
}
.pay-with label small { display: block; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.pay-with label:has(input:checked) { border-color: var(--line); box-shadow: inset 0 0 0 0.5px var(--line); }
.pay-with input { display: none; }

.banner {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; gap: 14px; align-items: center;
}
.banner .emoji { font-size: 26px; }

.big-check {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
  font-size: 40px; margin: 40px auto 8px;
}
.progress { height: 4px; background: var(--faint); border-radius: 99px; overflow: hidden; margin: 28px 0 8px; }
.progress i { display: block; height: 100%; width: 0; background: var(--fg); animation: load 2.4s ease forwards; }
@keyframes load { to { width: 100%; } }

.lock {
  width: 72px; height: 72px; border-radius: 22px;
  border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 30px;
  margin: 32px 0 8px;
}

/* ---------- sending ---------- */
.sendstat { display: flex; justify-content: space-between; align-items: baseline; margin: 36px 0 4px; }
.big-pct { font-family: var(--mono); font-weight: 700; font-size: 44px; letter-spacing: -0.03em; }

.steps { list-style: none; margin: 28px 0 0; padding: 0; }
.steps li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 0 12px 32px; position: relative;
  border-bottom: 1px solid var(--soft-line); color: var(--muted);
}
.steps li b { font-weight: 600; }
.steps li span { font-family: var(--mono); font-size: 13px; }
.steps li::before {
  content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--soft-line);
  box-sizing: border-box;
}
.steps li.now { color: var(--fg); }
.steps li.now::before { border-color: var(--fg); border-top-color: transparent; animation: spin 1s linear infinite; }
.steps li.did { color: var(--fg); }
.steps li.did::before { content: "✓"; background: var(--fg); color: var(--bg); border-color: var(--fg); font-size: 10px; display: grid; place-items: center; font-weight: 700; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.btn.off { opacity: .35; pointer-events: none; }

/* ---------- account ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  border: 1.5px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-family: var(--mono); }
.stat.wide { grid-column: 1 / -1; }
.files { list-style: none; margin: 0; padding: 0; }
.files li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 14px 0; border-bottom: 1px solid var(--soft-line);
  align-items: center;
}
.files .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .fsub { font-size: 13px; color: var(--muted); font-family: var(--mono); grid-column: 1; }
.files .right { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.pill {
  display: inline-block; font-size: 12px;
  border: 1px solid var(--line); border-radius: 99px; padding: 1px 10px;
}
.pill.solid { background: var(--fg); color: var(--bg); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--fg); color: var(--bg);
  padding: 10px 18px; border-radius: 99px; font-size: 14px;
  opacity: 0; transition: all .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 420px) {
  main { padding: 16px 16px 120px; }
  header { padding: 18px 16px; }
  .stats { grid-template-columns: 1fr; }
}

/* ---------- app additions ---------- */
[hidden] { display: none !important; }
.error { color: var(--fg); border-left: 2px solid var(--fg); padding: 2px 0 2px 12px; margin-top: 12px; font-size: 14px; }
.field.bad { border-color: var(--fg); }
.preview .peek img, .preview .peek video { width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.preview .peek audio { width: 80%; }
.resume-list { display: grid; gap: 10px; margin-top: 28px; }
.files a { text-decoration: none; }
