/* SENDWERK visual system.
 *
 * "Vault" aesthetic: an aurora that drifts behind frosted-glass panels, one
 * signal gradient (amber -> orange -> ember) used sparingly for emphasis.
 *
 * Two themes share every rule below; only the variables differ. theme.js sets
 * <html data-theme> before first paint (system setting until the user picks).
 * Without JS the page stays dark, which is the brand default.
 *
 * Everything is self-contained on purpose: the CSP allows no external fonts,
 * images or styles, so effects are CSS and inline SVG only. The grain texture
 * is a data: URI, which img-src permits. */

:root {
  --bg: #0a0a0a;
  --panel: rgba(26, 26, 26, 0.78);
  --panel-solid: #1a1a1a;
  --panel-edge: rgba(255, 255, 255, 0.08);
  --panel-edge-hi: rgba(255, 255, 255, 0.16);
  --field: rgba(255, 255, 255, 0.04);
  --field-hi: rgba(255, 255, 255, 0.07);
  --wash: rgba(255, 255, 255, 0.03);
  --wash-hi: rgba(255, 255, 255, 0.07);
  --dot: rgba(255, 255, 255, 0.09);
  --dot-lit-opacity: 0.8;
  --chip-a: #1d1d1f;
  --chip-b: #0b0b0c;
  --shadow: rgba(0, 0, 0, 0.8);
  --text: #f5f5f5;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --tile: #000000;
  --tile-alt: #101012;
  --tile-dark: #000000;
  --amber: #ffa200;
  --orange: #ff8a00;
  --ember: #ff6a00;
  /* Amber as text or icon ink. Bright amber is unreadable on white, so the light
   * theme darkens this one while gradients keep the bright amber. */
  --accent-ink: #ffa200;
  --signal: linear-gradient(100deg, var(--amber) 0%, var(--orange) 50%, var(--ember) 100%);
  /* Gradient for text and the logo; deeper stops in light so they stay legible. */
  --ink-1: var(--amber);
  --ink-2: var(--orange);
  --ink-3: var(--ember);
  --signal-ink: linear-gradient(100deg, var(--ink-1) 0%, var(--ink-2) 50%, var(--ink-3) 100%);
  --danger: #ff6b7a;
  --danger-ink: #ffc2c8;
  --danger-glow: rgba(255, 107, 122, 0.35);
  --orb-opacity: 0.36;
  --grain-opacity: 0.07;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Inter", -apple-system, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --display: "Exo 2", "Inter", -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-family: var(--sans);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafaf9;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-solid: #ffffff;
  --panel-edge: rgba(0, 0, 0, 0.09);
  --panel-edge-hi: rgba(0, 0, 0, 0.16);
  --field: rgba(255, 255, 255, 0.75);
  --field-hi: #ffffff;
  --wash: rgba(0, 0, 0, 0.03);
  --wash-hi: rgba(0, 0, 0, 0.06);
  --dot: rgba(0, 0, 0, 0.12);
  --dot-lit-opacity: 0.6;
  --chip-a: #ffffff;
  --chip-b: #f5f5f7;
  --shadow: rgba(0, 0, 0, 0.16);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --tile: #ffffff;
  --tile-alt: #f5f5f7;
  --tile-dark: #000000;
  --accent-ink: #a35a00;
  --ink-1: #b86e00;
  --ink-2: #c2410c;
  --ink-3: #9a3412;
  --danger: #d9364a;
  --danger-ink: #a3192b;
  --danger-glow: rgba(217, 54, 74, 0.25);
  --orb-opacity: 0.3;
  --grain-opacity: 0.035;
  color-scheme: light;
}

/* Theme changes cross-fade instead of snapping. */
body, section, .panel, input, select, textarea, ul.transfers li, .notice {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(255, 162, 0, 0.3); }
[hidden] { display: none !important; }

/* ---------- backdrop: aurora + grain + dot matrix ---------- */

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop .orb {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--orb-opacity);
  will-change: transform;
}
.backdrop .orb.a { background: radial-gradient(circle, #ffa514 0%, transparent 65%); top: -25vmax; left: -15vmax; animation: drift-a 26s ease-in-out infinite alternate; }
.backdrop .orb.b { background: radial-gradient(circle, #ff7a1a 0%, transparent 65%); top: 10vmax; right: -25vmax; animation: drift-b 32s ease-in-out infinite alternate; }
.backdrop .orb.c { background: radial-gradient(circle, #b8450a 0%, transparent 65%); bottom: -35vmax; left: 15vmax; animation: drift-c 38s ease-in-out infinite alternate; }
.backdrop .dots {
  /* Dot matrix: one dot per 18px cell. Three stacked copies share the same
   * pattern so lit dots line up exactly with the faint ones underneath. */
  --dot-color: var(--dot);
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, var(--dot-color) 1.1px, transparent 1.6px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, #000 25%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, #000 25%, transparent 85%);
}
/* A slow diagonal band of light that sweeps the field and lights dots amber. */
.backdrop .dots.scan {
  --dot-color: var(--ink-1);
  opacity: var(--dot-lit-opacity);
  mask-image: linear-gradient(115deg, transparent 40%, #000 50%, transparent 60%);
  -webkit-mask-image: linear-gradient(115deg, transparent 40%, #000 50%, transparent 60%);
  mask-size: 300% 300%;
  -webkit-mask-size: 300% 300%;
  animation: dot-scan 9s linear infinite;
}
@keyframes dot-scan {
  from { mask-position: 100% 100%; -webkit-mask-position: 100% 100%; }
  to { mask-position: 0% 0%; -webkit-mask-position: 0% 0%; }
}
/* Dots under the pointer glow; theme.js feeds the position in. */
.backdrop .dots.lens {
  --dot-color: var(--ink-2);
  opacity: var(--dot-lit-opacity);
  mask-image: radial-gradient(circle 170px at var(--mx, -999px) var(--my, -999px), #000, transparent);
  -webkit-mask-image: radial-gradient(circle 170px at var(--mx, -999px) var(--my, -999px), #000, transparent);
}
.backdrop .grain {
  position: absolute;
  inset: -50%;
  opacity: var(--grain-opacity);
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}

@keyframes drift-a { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-20vmax, 10vmax) scale(0.9); } }
@keyframes drift-c { to { transform: translate(14vmax, -16vmax) scale(1.1); } }
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
}

/* ---------- layout ---------- */

main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }

.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--panel-edge-hi);
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.theme-toggle::after { display: none; }
.theme-toggle:hover { transform: rotate(-12deg); box-shadow: 0 0 24px -6px rgba(255, 162, 0, 0.5); }
.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: transform 0.5s var(--ease), opacity 0.3s;
}
/* Show the moon in dark mode, the sun in light; the other spins away. */
.theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
:root[data-theme="light"] .theme-toggle .sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(255, 162, 0, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 162, 0, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 162, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 162, 0, 0); }
}

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; min-height: calc(100vh - 220px); }
.app-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.app-grid > .stack { display: grid; gap: 24px; }
.narrow { max-width: 560px; margin: 0 auto; }
@media (max-width: 920px) {
  .split, .app-grid { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  /* On small screens the form matters more than the pitch: keep the
   * headline and lede, drop the extras so sign-in sits near the fold. */
  .hero .emblem, .hero .features, .hero .specs { display: none; }
  .hero h1 { margin-top: 16px; }
  .lede { margin-bottom: 0; font-size: 16px; }
}
@media (max-width: 520px) {
  main { padding: 20px 16px 48px; }
  main section, .panel { padding: 22px; }
}

/* ---------- hero ---------- */

.hero { position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--panel-edge-hi);
  border-radius: 999px;
  background: var(--wash);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .tag { padding: 2px 8px; border-radius: 999px; background: var(--signal); color: #06070b; letter-spacing: 0.04em; }
.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(44px, 5.4vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: var(--signal-ink);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }
.lede { font-size: 18px; color: var(--muted); max-width: 30em; margin: 0 0 28px; }
.lede strong { color: var(--text); font-weight: 600; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 14px; align-items: center; font-size: 15px; color: var(--text); }
.features .ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--panel-edge-hi);
  background: linear-gradient(180deg, var(--wash-hi), transparent);
}
.features .ic svg { width: 18px; height: 18px; stroke: var(--accent-ink); }
.features small { display: block; color: var(--muted); font-size: 13px; }

.specs { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 32px; font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }
.specs span::before { content: "▸ "; color: var(--orange); }

/* Cipher emblem: three counter-rotating rings around a lock. */
.emblem { position: relative; width: 132px; height: 132px; margin-bottom: 8px; }
.emblem .ring { position: absolute; inset: 0; border-radius: 50%; }
.emblem .r1 { border: 1px dashed rgba(255, 162, 0, 0.55); animation: spin 22s linear infinite; }
.emblem .r2 { inset: 14px; border: 2px solid transparent; border-top-color: var(--orange); border-right-color: rgba(255, 138, 31, 0.3); animation: spin 7s linear infinite reverse; }
.emblem .r3 { inset: 28px; background: conic-gradient(from 0deg, transparent, rgba(242, 96, 12, 0.55), transparent 40%); animation: spin 4s linear infinite; mask: radial-gradient(circle, transparent 58%, #000 60%); }
.emblem .core {
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--chip-a), var(--chip-b));
  border: 1px solid var(--panel-edge-hi);
  box-shadow: 0 0 40px rgba(255, 138, 31, 0.35), inset 0 0 20px rgba(255, 162, 0, 0.15);
}
.emblem .core svg { width: 22px; height: 22px; stroke: var(--accent-ink); }
.emblem.small { width: 88px; height: 88px; }
.emblem.small .r2 { inset: 9px; }
.emblem.small .r3 { inset: 18px; }
.emblem.small .core { inset: 27px; }
.emblem.small .core svg { width: 16px; height: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- panels ---------- */

main section, .panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px -30px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: rise 0.6s var(--ease) both;
}
/* Gradient hairline along the top edge of each panel. */
main section::before, .panel::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 162, 0, 0.6), rgba(255, 138, 31, 0.6), transparent);
}
.app-grid .stack > section:nth-child(2) { animation-delay: 0.08s; }
.app-grid .stack > section:nth-child(3) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.99); } }

/* Auth cards share one slot; the visible one animates in on each swap. */
.auth-stack > section { margin: 0; }
.auth-stack { position: relative; }
.auth-stack::after {
  content: "";
  position: absolute;
  inset: 10% -6%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 138, 31, 0.18), transparent);
  filter: blur(30px);
}

h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 700; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head .kicker { margin: 0; }
.kicker { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
p { margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 14px; }
code { font-family: var(--mono); font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--field-hi); color: var(--accent-ink); }

/* ---------- forms ---------- */

label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); margin: 18px 0 8px; }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 13px 15px;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { background: var(--field-hi); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(255, 162, 0, 0.55);
  background: rgba(255, 162, 0, 0.04);
  box-shadow: 0 0 0 4px rgba(255, 162, 0, 0.1);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238b91a5' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}
select option { background: var(--panel-solid); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

input.pin, input.code {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.6em;
  text-align: center;
  padding: 16px 0 16px 0.6em;
}

label.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text); cursor: pointer; }
label.check input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--accent-ink); }

/* ---------- buttons ---------- */

button {
  position: relative;
  overflow: hidden;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  margin-top: 22px;
  padding: 13px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--cta);
  color: var(--on-cta);
  cursor: pointer;
  box-shadow: 0 10px 30px -14px var(--cta);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}
button[type="submit"]:not(.danger), button.wide { width: 100%; }
/* Light sweep across primary buttons on hover. */
button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
button:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -14px var(--cta); }
button:hover::after { transform: translateX(120%); }
button:active { transform: translateY(0) scale(0.99); }
button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
button:disabled { opacity: 0.45; cursor: default; transform: none; filter: saturate(0.4); }
button:disabled::after { display: none; }

button.secondary {
  background: var(--wash);
  color: var(--text);
  border: 1px solid var(--panel-edge-hi);
  box-shadow: none;
}
button.secondary::after { background: linear-gradient(110deg, transparent 30%, var(--wash-hi) 50%, transparent 70%); }
button.secondary:hover { background: var(--wash-hi); box-shadow: none; }
button.danger {
  background: linear-gradient(100deg, #ff5f6d, #ff8a5c);
  color: #12060a;
  box-shadow: 0 10px 30px -10px var(--danger-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: auto;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: inherit;
  box-shadow: none;
  border-radius: 4px;
}
button.link::after { display: none; }
button.link:hover { transform: none; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }
.danger-text, button.link.danger-text { color: var(--danger); }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.buttons button { width: auto; flex: 1 1 auto; }
.switch { margin: 22px 0 0; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- notices + status ---------- */

.notice {
  border: 1px solid var(--panel-edge-hi);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0 4px;
  font-size: 14px;
  background: var(--wash);
}
.notice p:last-child { margin-bottom: 0; }
.notice:empty { display: none; }
.notice.danger {
  border-color: rgba(255, 107, 122, 0.4);
  color: var(--danger-ink);
  background: linear-gradient(180deg, rgba(255, 107, 122, 0.1), rgba(255, 107, 122, 0.03));
  box-shadow: 0 0 40px -18px var(--danger-glow);
}
.notice.danger strong { color: var(--text); }
#pin-countdown {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.status { margin-top: 14px; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.status:empty { margin-top: 0; min-height: 0; }
.error { color: var(--danger); }

/* ---------- dropzone ---------- */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  margin: 4px 0 0;
  padding: 40px 20px;
  text-align: center;
  letter-spacing: 0;
  border-radius: var(--radius);
  border: 1.5px dashed var(--panel-edge-hi);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 162, 0, 0.08), transparent 70%),
    var(--wash);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.dropzone:hover, .dropzone.over, .dropzone:focus-within { border-color: rgba(255, 162, 0, 0.6); }
.dropzone.over { transform: scale(1.015); background: radial-gradient(ellipse at 50% 30%, rgba(255, 162, 0, 0.16), transparent 70%), var(--wash); }
.dropzone .drop-ic {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 162, 0, 0.2), rgba(255, 138, 31, 0.08));
  border: 1px solid rgba(255, 162, 0, 0.3);
  box-shadow: 0 0 30px -6px rgba(255, 162, 0, 0.4);
  transition: transform 0.4s var(--ease);
}
.dropzone:hover .drop-ic, .dropzone.over .drop-ic { transform: translateY(-4px); }
.dropzone .drop-ic svg { width: 24px; height: 24px; stroke: var(--accent-ink); }
.drop-title { font-size: 16px; font-weight: 650; color: var(--text); }
.drop-title u { text-decoration-color: var(--accent-ink); text-underline-offset: 4px; }
.drop-sub { font-size: 13px; font-weight: 500; color: var(--faint); }
.dropzone.has-file { border-style: solid; border-color: rgba(255, 162, 0, 0.45); }
.picked { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); font-weight: 600; }
.picked .size { font-family: var(--mono); font-weight: 500; color: var(--accent-ink); font-size: 12px; }

/* Several files or a folder: a short list of what's going, under the dropzone. */
.drop-alt { margin: 8px 0 0; font-size: 13px; color: var(--faint); text-align: center; }
.drop-alt button.link { font-size: 13px; }
.picked-list { list-style: none; margin: 10px 0 0; padding: 10px 14px; border: 1px solid var(--panel-edge); border-radius: 12px; background: var(--wash); display: grid; gap: 6px; font-size: 13px; }
.picked-list li { display: flex; justify-content: space-between; gap: 12px; min-width: 0; color: var(--text); }
.picked-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-list li small { flex: none; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.picked-list li.more { color: var(--faint); }

/* The recipient's list of files in a multi-file transfer. */
.file-list { margin-top: 14px; max-height: 340px; overflow-y: auto; }
.file-list .folder { color: var(--faint); font-weight: 500; }

/* ---------- progress ---------- */

progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--wash-hi);
}
progress::-webkit-progress-bar { background: var(--wash-hi); border-radius: 999px; }
progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--ember), var(--amber));
  background-size: 300% 100%;
  animation: flow 2.2s linear infinite;
  box-shadow: 0 0 16px rgba(255, 162, 0, 0.6);
  transition: width 0.3s var(--ease);
}
progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--ember));
}
@keyframes flow { to { background-position: 300% 0; } }

/* ---------- share link ---------- */

#share { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--panel-edge); animation: rise 0.6s var(--ease) both; }
.share-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 6px; }
.check-badge {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 20px rgba(255, 162, 0, 0.5);
}
.check-badge svg { width: 14px; height: 14px; stroke: #06070b; }
.share-note { margin-top: 8px; }
.link-box {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 162, 0, 0.35);
  background: rgba(255, 162, 0, 0.05);
  box-shadow: 0 0 40px -16px rgba(255, 162, 0, 0.5);
}
.link-box input { border: 0; background: transparent; font-family: var(--mono); font-size: 12.5px; color: var(--accent-ink); box-shadow: none; padding: 10px; }
.link-box button { margin-top: 0; width: auto; white-space: nowrap; padding: 10px 18px; }

/* ---------- transfer list ---------- */

ul.transfers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.transfers li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--panel-edge);
  background: var(--wash);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
  animation: rise 0.5s var(--ease) both;
}
ul.transfers li:hover { border-color: var(--panel-edge-hi); background: var(--wash-hi); transform: translateX(2px); }
ul.transfers li > div { min-width: 0; flex: 1; }
.name { font-weight: 650; overflow-wrap: anywhere; font-size: 15px; }
.meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.meta .sep { color: var(--faint); }
ul.transfers button { margin-top: 0; padding: 8px 14px; font-size: 13px; width: auto; flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--panel-edge-hi);
  color: var(--muted);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ready { color: var(--accent-ink); border-color: rgba(255, 162, 0, 0.35); }
.pill.uploading { color: var(--orange); border-color: rgba(255, 138, 31, 0.35); }
.pill.uploading::before { animation: blink 1s infinite; }
.pill.purging, .pill.purged { color: var(--faint); }
@keyframes blink { 50% { opacity: 0.2; } }

.empty {
  text-align: center;
  padding: 26px 12px;
  border: 1px dashed var(--panel-edge-hi);
  border-radius: 14px;
  color: var(--faint);
  font-size: 14px;
}

/* ---------- account ---------- */

.who { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--signal);
  color: #06070b;
  font-weight: 800;
  font-size: 16px;
}
.who p { margin: 0; overflow-wrap: anywhere; }
#account-buttons button { margin-top: 18px; }

/* ---------- recipient file card ---------- */

.file-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--panel-edge-hi);
  background: linear-gradient(160deg, rgba(255, 162, 0, 0.07), rgba(242, 96, 12, 0.05));
}
.file-ic {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--chip-a), var(--chip-b));
  border: 1px solid var(--panel-edge-hi);
  box-shadow: 0 10px 30px -10px rgba(255, 138, 31, 0.5);
}
.file-ic svg { width: 22px; height: 22px; stroke: var(--accent-ink); }
.file-card h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.file-card p { margin: 2px 0 0; font-family: var(--mono); font-size: 12.5px; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Multi-line message on the request form; same field look as inputs. */
textarea { resize: vertical; min-height: 64px; font: inherit; line-height: 1.5; }

/* ---------- marketing sections ---------- */

.band { margin-top: 112px; scroll-margin-top: 24px; }
.band-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.band-head h2 { margin: 8px 0 12px; font-size: clamp(32px, 4.4vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
.band-head h2 em { font-style: normal; background: var(--signal-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.band-head p { margin: 0; color: var(--muted); font-size: 17px; }
.band .kicker { color: var(--accent-ink); font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; }

/* Comparison table. Scrolls sideways on phones instead of squashing. */
.table-wrap { overflow-x: auto; padding: 0; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.compare th, table.compare td { padding: 15px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--panel-edge); }
table.compare thead th { font-size: 13px; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
table.compare thead th.us { color: var(--accent-ink); }
table.compare tbody th { font-weight: 600; width: 22%; }
table.compare td.us { background: rgba(255, 162, 0, 0.05); color: var(--text); font-weight: 500; }
table.compare tr:last-child th, table.compare tr:last-child td { border-bottom: none; }
table.compare small { display: block; margin-top: 3px; color: var(--faint); font-size: 12px; }
.yes { color: var(--accent-ink); font-weight: 700; }
.no { color: var(--faint); }
.fineprint { margin-top: 16px; color: var(--faint); font-size: 12.5px; }
.fair { margin-top: 24px; }
.fair h3 { margin: 0 0 8px; font-size: 16px; }
.fair ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

/* Pricing tiers. */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.tier { display: flex; flex-direction: column; padding: 30px; }
.tier.featured { border-color: rgba(255, 162, 0, 0.5); box-shadow: 0 0 60px -20px rgba(255, 162, 0, 0.45), 0 30px 80px -30px var(--shadow); }
.tier h3 { display: flex; align-items: center; justify-content: space-between; margin: 0; font-size: 18px; }
.tier .price { margin: 18px 0 4px; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tier .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier .billing { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.tier ul { flex: 1; margin: 0 0 24px; padding: 0; list-style: none; }
.tier li { position: relative; padding: 7px 0 7px 26px; font-size: 14px; border-top: 1px solid var(--panel-edge); }
.tier li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg); }
.tier a.button { display: block; text-align: center; text-decoration: none; }
.badge { padding: 3px 9px; border-radius: 999px; background: var(--signal); color: #1c1000; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }

a.button {
  display: inline-block;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  background: var(--signal);
  color: #1c1000;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(255, 138, 31, 0.6);
}
a.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--panel-edge-hi); box-shadow: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* FAQ uses native <details> so it needs no script. */
.faq { display: grid; gap: 12px; }
.faq details { padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent-ink); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* Compare and pricing open like the homepage: centred, oversized, short. */
.page-hero { max-width: 900px; margin: 0 auto; padding: 56px 0 8px; text-align: center; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { margin: 18px 0 0; font-size: clamp(44px, 7vw, 88px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
.page-hero h1 em { font-style: normal; background: var(--signal-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero .lede { max-width: 34em; margin: 20px auto 0; font-size: clamp(17px, 2vw, 22px); }

@media (max-width: 920px) {
  .tiers { grid-template-columns: 1fr; }
  .band { margin-top: 80px; }
}
.band.band-tight { margin-top: 48px; }
#sent-list:not(:empty) { margin-top: 16px; }

/* Plan and storage held, in the Account panel. */
.usage { margin: 18px 0 6px; padding: 16px; border: 1px solid var(--panel-edge); border-radius: var(--radius-sm); background: var(--wash); }
.usage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.usage progress { margin: 12px 0 8px; }
.usage p { margin: 0; font-size: 13px; }
.usage a { color: var(--accent-ink); }

/* ---------- shared accents ---------- */

/* Solid accent for primary buttons, matching the marketing pages' amber. */
:root { --cta: #ffa200; --on-cta: #1c1000; }
:root[data-theme="light"] { --cta: #a85d00; --on-cta: #ffffff; }

/* ---------- sign-in page ---------- */

.auth-page { max-width: 440px; margin: 0 auto; }
.auth-head { margin-bottom: 28px; text-align: center; }
.auth-glyph { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: var(--signal); }
.auth-glyph svg { width: 28px; height: 28px; stroke: #1c1000; }
.headline-sm { margin: 0 auto; font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; }
.tile-sub { max-width: 34em; margin: 14px auto 0; color: var(--muted); font-size: 17px; line-height: 1.4; }

/* ---------- preview (download page) ----------
 * A large viewer over a dimmed page. The file fills what's left under the
 * header; images and video keep their shape. */
dialog.preview {
  width: min(1100px, 94vw);
  height: min(860px, 90vh);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  background: var(--panel-solid, #1c1c1e);
  color: var(--text);
  overflow: hidden;
}
dialog.preview[open] { display: flex; flex-direction: column; }
dialog.preview::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--panel-edge); }
.preview-title { flex: 1; min-width: 0; }
.preview-title h3 { margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.preview-title p { margin: 2px 0 0; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.preview-head button { width: auto; min-width: 38px; margin: 0; padding: 8px 12px; font-size: 13px; }
.preview-body { position: relative; display: grid; flex: 1; place-items: center; min-height: 0; overflow: auto; background: var(--wash); }
.preview-body progress { width: min(320px, 70%); }
.preview-msg { margin: 0 0 10px; color: var(--muted); font-size: 14px; text-align: center; }
.preview-image, .preview-video { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-audio { width: min(520px, 90%); }
.preview-pdf { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-text { align-self: stretch; justify-self: stretch; margin: 0; padding: 18px 20px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-note { margin: 0; padding: 8px 14px; border-top: 1px solid var(--panel-edge); color: var(--faint); font-size: 12px; }
#preview-button { margin-top: 10px; }
@media (max-width: 600px) {
  dialog.preview { width: 100vw; height: 100svh; border-radius: 0; }
}
