/* downloads@1 — Community file share · vanta / cobalt / uranium / frosted glass */
:root {
  --dl-void: #000000;
  --dl-vanta: #050508;
  --dl-cobalt: #1e4ed8;
  --dl-cobalt-hot: #3d8cff;
  --dl-uranium: #e6ff2a;
  --dl-ink: #e8eef8;
  --dl-muted: #7a8aa8;
  --dl-glass: rgb(0 12 36 / 0.55);
  --dl-border: rgb(30 78 216 / 0.55);
}

* { box-sizing: border-box; }

body.dl-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgb(30 78 216 / 0.28), transparent 55%),
    var(--dl-void);
  color: var(--dl-ink);
  font-family: "Sora", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dl-shell {
  width: min(920px, 94vw);
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.dl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dl-brand {
  font-family: "Big Shoulders Display", Impact, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--dl-ink);
}
.dl-brand span { color: var(--dl-uranium); }

.dl-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dl-nav a {
  color: var(--dl-cobalt-hot);
  text-decoration: none;
  border-bottom: 1px solid rgb(30 78 216 / 0.4);
  padding-bottom: 2px;
}
.dl-nav a:hover { color: var(--dl-uranium); border-bottom-color: var(--dl-uranium); }

.dl-main h1 {
  margin: 0;
  font-family: "Big Shoulders Display", Impact, sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 0.04em;
  text-shadow: 0 0 30px rgb(30 78 216 / 0.55);
}
.dl-lede {
  margin: 0.5rem 0 1.5rem;
  color: var(--dl-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dl-panel {
  background: var(--dl-glass);
  border: 1px solid var(--dl-border);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.55), 0 0 40px rgb(30 78 216 / 0.2);
  margin-bottom: 1.1rem;
}

.dl-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dl-status {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--dl-muted);
}

.dl-btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid rgb(30 78 216 / 0.55);
  background: rgb(0 20 60 / 0.65);
  color: var(--dl-cobalt-hot);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.dl-btn:hover, .dl-btn:focus-visible {
  color: var(--dl-uranium);
  border-color: var(--dl-uranium);
  box-shadow: 0 0 18px rgb(225 255 0 / 0.25);
  outline: none;
}
.dl-btn.primary {
  background: var(--dl-uranium);
  color: #000;
  border-color: var(--dl-uranium);
  font-weight: 600;
}
.dl-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.dl-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgb(0 0 0 / 0.35);
  border: 1px solid rgb(30 78 216 / 0.35);
}
.dl-list a {
  color: var(--dl-ink);
  text-decoration: none;
  font-weight: 500;
}
.dl-list a:hover { color: var(--dl-uranium); }
.dl-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  color: var(--dl-muted);
  white-space: nowrap;
}
.dl-empty {
  color: var(--dl-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.dl-upload h2 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dl-cobalt-hot);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.dl-hint {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: var(--dl-muted);
  line-height: 1.45;
}
.dl-hint code {
  color: var(--dl-uranium);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

#dl-form {
  display: grid;
  gap: 0.75rem;
}
.dl-file, .dl-note {
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--dl-muted);
}
.dl-file input[type="file"],
.dl-note input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dl-border);
  background: rgb(0 0 0 / 0.45);
  color: var(--dl-ink);
  font: inherit;
}
.dl-note input:focus,
.dl-file input:focus {
  outline: none;
  border-color: var(--dl-uranium);
  box-shadow: 0 0 0 1px rgb(225 255 0 / 0.25);
}

.dl-msg {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--dl-cobalt-hot);
}
.dl-msg.err { color: #ff6b6b; }
.dl-msg.ok { color: var(--dl-uranium); }

.dl-foot {
  margin-top: 1.5rem;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--dl-muted);
}

/* In-SPA overlay (optional mount) */
#hector-downloads-overlay {
  position: fixed;
  inset: 0;
  z-index: 99980;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(0 0 0 / 0.55);
  padding: 1rem;
}
#hector-downloads-overlay[hidden] { display: none !important; }
#hector-downloads-overlay .dl-overlay-card {
  width: min(560px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  background: var(--dl-glass);
  border: 1px solid var(--dl-border);
  border-radius: 16px 16px 12px 12px;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.7), 0 0 40px rgb(30 78 216 / 0.3);
  padding: 1rem 1.1rem 1.2rem;
  color: var(--dl-ink);
  font-family: "Sora", system-ui, sans-serif;
}
