:root {
  --bg: #0e151a;
  --panel: #162127;
  --panel-soft: #1c282f;
  --ink: #edf3f4;
  --muted: #98adb3;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #1fc8a6;
  --accent-strong: #18a085;
  --success: #88e1a7;
  --error: #ff9f93;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(31, 200, 166, 0.07), transparent 26%),
    linear-gradient(180deg, #121d24 0%, var(--bg) 100%);
  font-family: "Aptos", "Segoe UI", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.page {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 22px 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.masthead-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.masthead-note a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.22);
  text-underline-offset: 2px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 13ch;
  font-size: clamp(1.72rem, 3.3vw, 2.45rem);
  letter-spacing: -0.04em;
}

.subheading,
.card p,
.status,
.limit-copy,
.privacy-note,
.summary-line {
  font-size: 0.92rem;
  line-height: 1.45;
}

.subheading {
  max-width: 58ch;
  margin-top: 8px;
  color: var(--muted);
}

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 14px;
  align-items: stretch;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 38, 45, 0.96), rgba(18, 29, 35, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.intro-card,
.uploader-card {
  min-height: 0;
}

.intro-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.summary-line {
  color: var(--muted);
}

.local-box {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 11px 13px;
  border: 1px solid rgba(31, 200, 166, 0.18);
  border-radius: 14px;
  background: rgba(10, 17, 21, 0.22);
}

.local-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.local-box code {
  display: block;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 0.86rem;
  white-space: normal;
}

.upload-form {
  display: grid;
  gap: 12px;
}

.dropzone {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px dashed rgba(31, 200, 166, 0.5);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(31, 200, 166, 0.08);
}

.dropzone-title {
  font-size: 1.02rem;
  font-weight: 600;
}

.dropzone-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.submit-button {
  width: fit-content;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: #062019;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.download-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(31, 200, 166, 0.32);
  border-radius: 12px;
  background: rgba(31, 200, 166, 0.08);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.selected-file {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}

.meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.limit-copy,
.privacy-note {
  margin: 0;
  color: var(--muted);
}

.status {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

.progress {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  transition: width 180ms ease;
}

.progress.is-indeterminate .progress-bar {
  width: 38%;
  animation: indeterminate-slide 1.1s ease-in-out infinite;
}

.status[data-tone="success"] {
  color: var(--success);
  background: rgba(136, 225, 167, 0.08);
}

.status[data-tone="error"] {
  color: var(--error);
  background: rgba(255, 159, 147, 0.09);
}

@keyframes indeterminate-slide {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(300%);
  }
}

@media (max-width: 900px) {
  .page {
    min-height: auto;
    padding: 18px 0 24px;
  }

  .masthead {
    align-items: start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1080px);
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .dropzone {
    padding: 18px;
  }
}
