:root {
  color-scheme: dark;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: #eeedff;
  background: #0c0e1c;
  --panel: #16192d;
  --panel-deep: #101328;
  --line: #343951;
  --muted: #afb4d0;
  --accent: #c1afff;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 65% 0%, #262049, transparent 650px); }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #111327; }
.header-inner, .brand, nav { display: flex; align-items: center; }
.header-inner { justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { gap: 11px; text-decoration: none; font-weight: 740; letter-spacing: -.025em; }
nav { gap: 23px; }
nav a { color: var(--muted); font-size: .9rem; text-decoration: none; font-weight: 600; }
nav a:hover, .footer a:hover { color: var(--accent); }
.nav-upload { color: var(--accent); border: 1px solid #665c97; border-radius: 7px; padding: 8px 13px; }
.nav-upload:hover { background: #26214a; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 3; padding: 10px 15px; background: var(--accent); color: #1b1332; transform: translateY(-160%); }
.skip:focus { transform: none; }

.intro {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 300px;
  overflow: hidden;
  margin: 34px 0 22px;
  padding: 40px clamp(22px, 4.5vw, 55px);
  border: 1px solid #4e4d79;
  border-radius: 17px;
  background: linear-gradient(110deg, #212855, #151331 62%);
}
.intro-copy { position: relative; z-index: 1; }
.vault-art {
  position: absolute;
  inset: 0 0 0 44%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 62% 54%, #8661ff63, transparent 55%),
    linear-gradient(#9c8cff32 1px, transparent 1px),
    linear-gradient(90deg, #9c8cff32 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  mask-image: linear-gradient(to right, transparent, black 36%);
  pointer-events: none;
}
.vault-stack {
  position: absolute;
  top: 53%;
  left: 61%;
  display: grid;
  width: 154px;
  height: 154px;
  transform: translate(-50%, -50%);
}
.vault-layer {
  grid-area: 1 / 1;
  border: 1px solid #c3a6ff;
  border-radius: 16px;
  background: linear-gradient(135deg, #827adebb, #332365 70%);
  box-shadow: 5px 5px 0 #49428e, 6px 6px 0 #9a85ec, 0 0 28px #9872ff55;
  transform: translateY(41px) rotateX(56deg) rotateZ(-45deg);
}
.vault-layer:nth-child(2) { transform: translateY(1px) rotateX(56deg) rotateZ(-45deg); }
.vault-top {
  background: linear-gradient(135deg, #b6c6ff, #805de3);
  box-shadow: 5px 5px 0 #6551b3, 6px 6px 0 #d1b9ff, 0 0 30px #a28aff77;
  transform: translateY(-39px) rotateX(56deg) rotateZ(-45deg);
}
.vault-top span {
  position: absolute;
  inset: 22px;
  border: 1px solid #28215fa8;
  border-radius: 6px;
  background: repeating-linear-gradient(0deg, transparent 0 12px, #28215f60 13px, transparent 14px);
}
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--accent); font: 600 .83rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.signal { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.intro h1 { margin: 10px 0 12px; font-size: clamp(2.25rem, 7.1vw, 5.5rem); line-height: 1.05; letter-spacing: -.074em; }
.intro h1 span { color: var(--accent); }
.intro p { margin: 0; max-width: 375px; color: var(--muted); font-size: 1.06rem; line-height: 1.65; }
.preview-notice { margin: 0 0 18px; padding: 12px 15px; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--panel); color: var(--muted); line-height: 1.5; }
.preview-notice code { color: var(--accent); font-family: var(--mono); }

.upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .36fr); gap: 16px; }
.panel, .archive-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.upload-panel, .quota-panel { padding: 22px; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.035em; }
.panel-hint { font-size: .85rem; color: var(--muted); text-align: right; }
.drop-zone { display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 18px; margin-top: 14px; border: 1px dashed #626b9a; border-radius: 9px; background: var(--panel-deep); }
.drop-zone.is-over { background: #26214a; border-color: var(--accent); }
.drop-glyph { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 9px; background: #282449; color: var(--accent); flex: none; }
svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.drop-text { min-width: 0; flex: 1; }
.drop-text strong, .drop-text span { display: block; }
.drop-text span { margin-top: 3px; color: var(--muted); font-size: .875rem; }
.button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button:disabled { cursor: default; opacity: .55; }
.primary { background: var(--accent); color: #1b1332; }
.primary:hover:not(:disabled) { background: #dbcbff; }
.secondary { border-color: #474c71; background: #1d203a; color: #eeedff; }
.secondary:hover:not(:disabled) { border-color: #747aa7; background: #27294d; }
.quota-panel { min-height: 157px; background: linear-gradient(135deg, #26244c, var(--panel) 75%); }
.quota-panel .eyebrow { margin: 0; }
.quota-number { margin: 5px 0 1px; font: 700 1.85rem/1.1 var(--mono); }
.quota-number span { color: var(--muted); font-size: 1.05rem; }
.quota-label, .quota-reset { color: var(--muted); font-size: .82rem; margin: 0; }
.quota-meter { display: flex; gap: 5px; margin: 11px 0 8px; }
.quota-meter span { flex: 1; height: 4px; border-radius: 8px; background: #363950; }
.quota-meter span.available { background: var(--accent); }

.feedback { margin-top: 13px; color: var(--muted); font-size: .9rem; }
.is-error { color: #ffafaa; }
.queue { list-style: none; padding: 0; margin: 13px 0 0; }
.queue li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.queue strong { overflow-wrap: anywhere; font-size: .9rem; }
.queue small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.queue .is-error { color: #ffafaa; }
.queue button, .queue a { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px; font-size: .85rem; }
.queue progress { grid-column: 1 / -1; margin-top: 6px; height: 7px; width: 100%; accent-color: var(--accent); }
.queue-actions { margin-top: 12px; }

.archive { margin-top: 43px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { font-size: 1.56rem; }
.search { width: min(100%, 280px); display: flex; align-items: center; gap: 8px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search svg { flex: none; width: 19px; height: 19px; }
.search input { border: 0; outline: 0; color: #eeedff; background: transparent; width: 100%; padding: 10px 0; font-size: .95rem; }
.search input::placeholder { color: var(--muted); }
.search input:disabled { opacity: .65; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th, td { text-align: left; padding: 12px 17px; border-bottom: 1px solid var(--line); }
th { font: 600 .79rem var(--mono); letter-spacing: .045em; text-transform: uppercase; color: var(--muted); }
th:nth-child(2) { width: 105px; }
th:nth-child(3) { width: 160px; }
th:last-child { width: 115px; }
td { color: var(--muted); font-size: .9rem; }
td:first-child { font-weight: 650; color: #eeedff; overflow-wrap: anywhere; }
td:last-child { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
.file-name { display: flex; align-items: center; gap: 10px; }
.file-name svg { flex: none; color: #aebaff; width: 20px; height: 20px; }
.file-download { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.archive-status { padding: 34px 18px; text-align: center; color: var(--muted); }
.archive-actions { padding: 11px 17px; text-align: center; border-top: 1px solid var(--line); }
.footer { margin-top: 36px; padding-block: 18px 27px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.footer a { text-underline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .intro { min-height: 240px; margin-top: 24px; padding-block: 33px; }
  .vault-stack { transform: translate(-50%, -50%) scale(.74); }
  .upload-grid { grid-template-columns: minmax(0, 1fr); }
  .upload-panel, .quota-panel { padding: 17px; }
  .archive { margin-top: 30px; }
  th, td { padding-inline: 12px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  th:nth-child(2) { width: 80px; }
  th:last-child { width: 86px; }
}
@media (max-width: 540px) {
  .intro { align-items: start; min-height: 296px; padding-bottom: 120px; }
  .vault-art { inset: auto 0 0; height: 132px; mask-image: linear-gradient(to bottom, transparent, black 45%); }
  .vault-stack { top: 56%; left: 50%; transform: translate(-50%, -50%) scale(.55); }
}
@media (max-width: 390px) {
  .header-inner { min-height: 62px; }
  nav { gap: 12px; }
  .brand img { width: 29px; height: 29px; }
  .drop-zone { flex-wrap: wrap; }
  .drop-zone .button { width: 100%; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
}
