:root {
  --page-bg: #f4f0e7;
  --ink: #1f1f24;
  --muted: #5f6472;
  --card: rgba(255, 255, 255, 0.78);
  --line: rgba(47, 53, 72, 0.16);
  --accent: #156f7a;
  --accent-strong: #0f5158;
  --good: #157144;
  --warn: #a74f20;
  --bad: #9a2432;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 640px at 10% -10%, rgba(21, 111, 122, 0.2), transparent),
    radial-gradient(900px 700px at 100% 0%, rgba(237, 169, 73, 0.14), transparent),
    var(--page-bg);
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, transparent 35%);
}

.page {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 42px 22px 56px;
}

.hero {
  margin-bottom: 18px;
}

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

.home-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.home-link:hover {
  text-decoration: underline;
}

.pill {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(21, 111, 122, 0.15);
  border: 1px solid rgba(21, 111, 122, 0.3);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2 {
  font-family: "Sora", "Segoe UI", sans-serif;
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 3.9vw, 2.7rem);
}

.lead {
  margin: 14px 0 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.6;
}

.card,
.notes article {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  backdrop-filter: blur(10px);
}

.card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 24px;
  box-shadow: 0 24px 56px -38px rgba(20, 38, 71, 0.45);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

select,
input[type="file"] {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

input[type="file"] {
  padding: 9px 11px;
}

select:focus,
input[type="file"]:focus {
  outline: 2px solid rgba(21, 111, 122, 0.24);
  border-color: rgba(21, 111, 122, 0.5);
}

.dropzone {
  position: relative;
  border: 1px dashed rgba(21, 111, 122, 0.48);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  display: grid;
  gap: 4px;
  justify-items: center;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.95);
}

.dropzone:focus-visible {
  outline: 2px solid rgba(21, 111, 122, 0.24);
  outline-offset: 2px;
}

.dropzone.is-dragover {
  border-color: #0f5158;
  background: rgba(21, 111, 122, 0.12);
  transform: translateY(-1px);
}

.dropzone input[type="file"] {
  display: none;
}

.drop-title {
  margin: 0;
  font-weight: 700;
}

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

.browse-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.browse-btn:hover {
  background: #f9fbfb;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.file-meta {
  margin: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.primary,
.download-link {
  border-radius: 13px;
  min-height: 46px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 18px 30px -24px rgba(21, 111, 122, 0.82);
}

.primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.result {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.status {
  margin: 0;
  font-weight: 700;
}

.status[data-state="idle"] {
  color: var(--muted);
}

.status[data-state="loading"] {
  color: var(--accent-strong);
}

.status[data-state="success"] {
  color: var(--good);
}

.status[data-state="error"] {
  color: var(--bad);
}

.download-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #c06a2b, #9f4415);
  width: fit-content;
  padding: 0 18px;
}

.download-link.is-hidden {
  display: none;
}

.notes {
  margin-top: 16px;
}

.notes article {
  padding: 20px 22px;
}

.notes h2 {
  font-size: 1.12rem;
}

.notes ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .page {
    padding: 28px 16px 38px;
  }

  .hero-top {
    flex-wrap: wrap;
  }

  .card {
    padding: 16px;
  }
}
