:root {
  --navy: #1e3a5f;
  --navy-deep: #12263f;
  --ink: #1a1f26;
  --muted: #5c6673;
  --cream: #f3efe6;
  --sand: #e8e0d2;
  --accent: #c45c26;
  --white: #fffcf7;
  --danger: #b42318;
  --radius: 2px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(30, 58, 95, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(196, 92, 38, 0.12), transparent 50%),
    linear-gradient(165deg, #efe8db 0%, #f3efe6 40%, #e4ebe8 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1.25rem 3rem;
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-mark {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

.brand h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.15rem, 6vw, 2.85rem);
  line-height: 1.15;
  color: var(--navy-deep);
}

.lede {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 36rem;
}

.lede code {
  font-size: 0.92em;
  color: var(--navy);
  background: rgba(30, 58, 95, 0.08);
  padding: 0.1em 0.35em;
}

.panel {
  background: var(--white);
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-left: 4px solid var(--navy);
  padding: 1.5rem;
  animation: panel-in 0.55s ease 0.15s both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.path-line {
  margin: 0 0 1.25rem;
  word-break: break-all;
}

.path-line code {
  font-size: 0.9rem;
  color: var(--navy-deep);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 9.5rem;
  padding: 1.25rem;
  border: 1.5px dashed rgba(30, 58, 95, 0.35);
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.03), transparent);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--navy);
  background: rgba(30, 58, 95, 0.06);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.drop-title {
  font-weight: 600;
  color: var(--navy-deep);
}

.drop-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

.file-name {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn.primary {
  width: 100%;
  background: var(--navy);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: var(--navy-deep);
}

.btn.primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(30, 58, 95, 0.2);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hint {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.error {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  background: #fcebeb;
  border-left: 3px solid var(--danger);
  color: #791f1f;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.foot {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.foot p {
  margin: 0;
}

@media (max-width: 520px) {
  .panel {
    padding: 1.15rem;
  }
}
