:root {
  --bg: #071222;
  --bg-soft: #0d1c30;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-2: rgba(249, 251, 255, 0.88);
  --line: #d4dceb;
  --line-strong: #bbc7dd;
  --text: #14233b;
  --text-soft: #4f607f;
  --brand: #1f4f98;
  --brand-strong: #163d76;
  --shadow: 0 28px 70px rgba(8, 19, 37, 0.22);
  --radius: 18px;
}

@font-face {
  font-family: "Manrope";
  src: url("https://fonts.cdnfonts.com/s/109819/Manrope-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("https://fonts.cdnfonts.com/s/15044/JetBrainsMono-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(165deg, var(--bg), var(--bg-soft));
  color: var(--text);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.1px;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 95% 5%, rgba(95, 130, 181, 0.2), transparent 54%),
    radial-gradient(1000px 650px at 10% 90%, rgba(255, 255, 255, 0.1), transparent 60%);
  pointer-events: none;
}

.shell {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 42px 22px 30px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand { display: flex; gap: 14px; align-items: center; }
.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f8ff;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(150deg, #285ca9, #163d76);
  box-shadow: 0 12px 24px rgba(20, 49, 92, 0.36);
}

.title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #f4f7ff;
}

.subtitle {
  max-width: 56ch;
  margin-top: 5px;
  color: rgba(234, 241, 255, 0.78);
  font-size: 13px;
}

.hero {
  margin-bottom: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(243, 247, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(232, 240, 255, 0.74);
}

.hero-title {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.2;
  color: #f8fbff;
}

.hero-text {
  margin: 0;
  max-width: 76ch;
  font-size: 14px;
  color: rgba(229, 238, 255, 0.82);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 16px;
}

.panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #1b2d49;
}

.hint {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.drop {
  position: relative;
  border-radius: 14px;
  border: 1px dashed #95a8cb;
  background: #f7faff;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.drop:hover {
  border-color: #4f78b9;
  background: #f2f7ff;
}

.drop:focus { outline: none; box-shadow: 0 0 0 4px rgba(43, 94, 170, 0.2); }
.drop.drag {
  border-color: #2d5fae;
  background: #e9f1ff;
  transform: translateY(-1px);
}

.file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-inner { text-align: center; padding: 18px 10px; }
.drop-hero { font-weight: 800; font-size: 14px; color: #1b3152; }
.drop-sub { color: #4c6184; font-size: 12px; margin-top: 4px; }
.drop-note { color: #62769a; font-size: 11px; margin-top: 10px; }

.row { display: flex; gap: 10px; margin-top: 12px; }
.btn {
  appearance: none;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #22365a;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:hover { border-color: var(--line-strong); background: #f8fbff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: #193f79;
  color: #f3f7ff;
}
.btn.primary:hover { background: linear-gradient(135deg, #265cae, #19417d); }
.btn.small { padding: 8px 10px; font-size: 12px; }

.status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f4;
}

.k {
  color: #6f80a0;
  font-size: 12px;
  font-weight: 700;
}

.v { font-size: 12px; text-align: right; color: #324a70; }
.muted { color: #5f7398; }
.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty {
  border: 1px solid #dce5f3;
  background: #f6f9ff;
  border-radius: 14px;
  padding: 18px;
}

.empty-title {
  font-weight: 800;
  font-size: 14px;
  color: #1f3254;
}

.empty-sub {
  color: #587096;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.45;
}

.code {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d8e2f2;
  background: #0f1c30;
  color: #d4e1ff;
  overflow: auto;
  max-height: 520px;
  font-size: 12px;
  line-height: 1.45;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.code.subtle {
  background: #11223a;
  color: #d8e4ff;
}

.hidden { display: none; }

.raw {
  margin-top: 12px;
  border-top: 1px solid #e4eaf5;
  padding-top: 12px;
}

.raw summary {
  cursor: pointer;
  color: #516688;
  font-size: 12px;
  user-select: none;
}

.raw summary:hover { color: #334f79; }

.foot {
  margin-top: 16px;
  color: rgba(227, 236, 255, 0.74);
  font-size: 12px;
}

@media (max-width: 980px) {
  .top { flex-direction: column; align-items: flex-start; }
  .hero-title { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
}
