:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08111f;
  color: #eef4ff;
  --panel: #111e31;
  --panel-edge: #253956;
  --muted: #9aacc5;
  --accent: #51a8ff;
  --accent-strong: #1679db;
  --success: #62d5a4;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 5%, rgba(35, 111, 190, .24), transparent 34rem),
    linear-gradient(145deg, #07101d, #0b1728 55%, #08111f);
}

a { color: inherit; }
.shell { width: min(960px, calc(100% - 32px)); min-height: 100vh; margin: auto; display: flex; flex-direction: column; }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .08em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: .68rem; letter-spacing: .16em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(145deg, #4bb6ff, #2059ca); font-weight: 900; box-shadow: 0 10px 28px rgba(24, 112, 209, .32); }
main { display: grid; place-items: center; flex: 1; padding: 30px 0 70px; }
.card { width: min(700px, 100%); padding: clamp(28px, 6vw, 56px); border: 1px solid var(--panel-edge); border-radius: 22px; background: linear-gradient(160deg, rgba(21, 38, 61, .97), rgba(12, 25, 43, .97)); box-shadow: 0 28px 80px rgba(0, 0, 0, .35); }
.card.narrow { width: min(480px, 100%); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; letter-spacing: -.035em; }
.narrow h1 { font-size: 2.35rem; }
.lede { margin: 18px 0 32px; color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
.stack-form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #dce8f9; font-size: .88rem; font-weight: 700; }
input[type="text"], input[type="password"] { width: 100%; border: 1px solid #345070; border-radius: 10px; padding: 13px 14px; background: #0a1728; color: white; font: inherit; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(81, 168, 255, .16); }
.file-control { padding: 24px; border: 1px dashed #42668d; border-radius: 14px; background: rgba(5, 16, 31, .42); cursor: pointer; }
.file-control input { max-width: 100%; color: var(--muted); }
.file-control small { color: var(--muted); font-weight: 500; }
button, .download { border: 0; font: inherit; }
.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: white; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 12px 30px rgba(21, 106, 201, .26); }
.primary:disabled { opacity: .7; cursor: wait; }
.processing-note { margin: -4px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.text-button { padding: 8px 0; background: transparent; color: var(--muted); cursor: pointer; }
.text-button:hover, .secondary-link:hover { color: white; }
.messages { position: absolute; top: 86px; align-self: center; width: min(700px, calc(100% - 32px)); }
.message { padding: 12px 16px; border: 1px solid #884456; border-radius: 10px; background: #3a1e2a; color: #ffdce4; }
.result-card { text-align: center; }
.success-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 22px; border-radius: 50%; background: rgba(98, 213, 164, .14); color: var(--success); font-size: 1.8rem; font-weight: 900; }
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0; }
.download { display: grid; gap: 5px; padding: 18px 12px; border: 1px solid #315071; border-radius: 12px; background: #11253d; text-decoration: none; font-weight: 800; }
.download span { color: #b5c5d9; font-size: .75rem; font-weight: 500; }
.download.primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); border-color: transparent; }
.download.primary span { color: #e7f3ff; }
.secondary-link { display: inline-block; color: var(--muted); font-weight: 700; text-underline-offset: 4px; }
footer { padding: 24px 0; color: #71849e; font-size: .78rem; text-align: center; }

@media (max-width: 650px) {
  .shell { width: min(100% - 20px, 960px); }
  .brand-row { padding: 18px 4px; }
  main { padding-top: 10px; }
  .card { padding: 28px 20px; border-radius: 16px; }
  .downloads { grid-template-columns: 1fr; }
  .messages { top: 74px; }
}
