:root {
  --bg: #06080d;
  --bg-2: #0b0f16;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.055);
  --border: rgba(255,255,255,0.08);
  --text: #f5f7fb;
  --muted: #9aa4b2;
  --muted-2: #6f7785;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --accent-soft: rgba(79,140,255,0.12);
  --success: #22c55e;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 16px 50px rgba(0,0,0,.34);
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(79,140,255,.10), transparent 24%),
    radial-gradient(circle at 82% 8%, rgba(124,92,255,.11), transparent 22%),
    linear-gradient(180deg, #0a0d13 0%, #06080d 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 70%);
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
.hidden { display:none !important; }
.mono { font-family: "JetBrains Mono", monospace; }

.page-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(6,8,13,.68);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.header-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  min-height: 76px;
}
.brand {
  display:flex;
  align-items:center;
  gap: 14px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 800;
  font-size: 22px;
  color:#fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px rgba(79,140,255,.24);
}
.brand-copy h1 {
  margin:0;
  font-size: 18px;
  letter-spacing: -.04em;
  font-weight: 800;
}
.brand-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}
.btn, .btn-soft, .btn-ghost {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  border: 1px solid var(--border);
  cursor:pointer;
  transition: .18s ease;
  font-size: 13px;
  font-weight: 700;
}
.btn {
  border:none;
  color:#fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.btn-soft, .btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.btn:hover, .btn-soft:hover, .btn-ghost:hover { transform: translateY(-1px); }

.hero {
  padding: 56px 0 24px;
  text-align: center;
}
.eyebrow {
  display:inline-flex;
  align-items:center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: #dce3ee;
  font-size: 12px;
  font-weight: 700;
}
.hero h2 {
  margin: 22px auto 0;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: .98;
  letter-spacing: -.06em;
  font-weight: 800;
}
.hero h2 .accent {
  background: linear-gradient(135deg, #7fb0ff, #8d72ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 18px auto 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}
.hero-actions {
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 22px;
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.upload-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  margin: 26px auto 0;
}
.upload-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.upload-top h3 {
  margin:0;
  font-size: 24px;
  letter-spacing:-.04em;
  font-weight:800;
}
.upload-top p {
  margin:8px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.key-pill {
  max-width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  display:inline-flex;
  align-items:center;
  gap: 10px;
  color: #dbe4f3;
  font-size: 12px;
  font-weight: 700;
}

.drop-zone {
  border-radius: 24px;
  border:1px dashed rgba(255,255,255,.12);
  background: rgba(255,255,255,.025);
  min-height: 200px;
  padding: 28px 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  transition: .18s ease;
}
.drop-zone.dragover {
  border-color: rgba(79,140,255,.4);
  background: rgba(79,140,255,.08);
}
.drop-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display:grid;
  place-items:center;
  font-size: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
}
.drop-zone h4 {
  margin: 16px 0 0;
  font-size: 24px;
  letter-spacing:-.04em;
}
.drop-zone p {
  margin: 10px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.meta-row {
  display:flex;
  gap: 10px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 16px;
}
.meta-pill {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 12px;
  font-weight: 700;
  color:#d7deea;
}

.progress-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--border);
}
.progress-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom: 10px;
}
.progress-head strong {
  font-size: 13px;
  font-weight:800;
}
.progress-head span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.progress-bar {
  width:100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
}
.progress-fill {
  width:0%;
  height:100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(79,140,255,.24);
  transition: width .18s ease;
}

.action-row {
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  margin-top: 16px;
}
.action-row > * { flex: 1 1 180px; }

.result-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border:1px solid rgba(79,140,255,.18);
  background: linear-gradient(180deg, rgba(79,140,255,.10), rgba(255,255,255,.03));
}
.result-box p {
  margin:0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #bfd4ff;
}
.result-link {
  display:block;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0,0,0,.2);
  border:1px solid var(--border);
  color:#fff;
  word-break: break-all;
  font-size: 13px;
}

.docs-grid {
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  margin-top: 30px;
}
.docs-panel {
  border-radius: var(--radius-xl);
  padding: 22px;
}
.docs-panel h3 {
  margin:0;
  font-size: 22px;
  letter-spacing:-.04em;
}
.docs-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.doc-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top:1px solid rgba(255,255,255,.06);
}
.doc-section:first-of-type {
  margin-top: 18px;
  padding-top: 0;
  border-top:none;
}
.doc-section h4 {
  margin:0 0 10px;
  font-size: 14px;
  font-weight:800;
}
.code-block {
  margin:0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(3,6,12,.72);
  border:1px solid rgba(255,255,255,.06);
  color:#dbe7ff;
  font-size: 12px;
  line-height: 1.8;
  overflow:auto;
}
.kv-list {
  display:grid;
  gap:10px;
}
.kv-item {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}
.kv-item strong { font-size: 13px; }
.kv-item span { font-size: 13px; color: var(--muted); text-align:right; }

.footer {
  padding: 40px 0 28px;
  text-align:center;
  color: var(--muted-2);
  font-size: 13px;
}

.toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.toast {
  max-width:min(420px, 92vw);
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--border);
  background: rgba(8,10,15,.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight:700;
  transform: translateX(120%);
  transition: .26s ease;
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: rgba(34,197,94,.22); }
.toast.error { border-color: rgba(239,68,68,.22); }

@media (max-width: 860px) {
  .docs-grid { grid-template-columns: 1fr; }
  .upload-top { flex-direction:column; }
  .header-inner { min-height: unset; padding: 14px 0; align-items:flex-start; flex-direction:column; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 24px, var(--max)); }
  .hero { padding-top: 34px; }
  .hero h2 { font-size: clamp(28px, 10vw, 46px); }
  .hero p { font-size: 15px; }
  .upload-card, .docs-panel { padding: 18px; border-radius: 22px; }
  .drop-zone { min-height: 170px; padding: 22px 14px; }
  .drop-zone h4 { font-size: 20px; }
  .brand-copy p { display:none; }
  .top-actions { width:100%; }
}
