:root {
  --ink: #14213d;
  --muted: #5c667a;
  --paper: #fffaf0;
  --paper-strong: #fff4d6;
  --teal: #00a896;
  --teal-dark: #007f73;
  --coral: #ff6b57;
  --coral-dark: #d94f3d;
  --lemon: #ffd166;
  --sky: #71c7ec;
  --green: #6ccf59;
  --line: rgba(20, 33, 61, 0.14);
  --shadow: 0 24px 80px rgba(20, 33, 61, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Nunito Sans", sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.32), transparent 36%),
    linear-gradient(215deg, rgba(0, 168, 150, 0.2), transparent 42%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 87, 0.22), transparent 34%),
    repeating-linear-gradient(90deg, rgba(20, 33, 61, 0.035) 0 1px, transparent 1px 26px),
    var(--paper);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 68px);
  padding: 38px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 240, 0.92)),
    linear-gradient(120deg, rgba(255, 209, 102, 0.28), rgba(113, 199, 236, 0.16));
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -72px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  content: "";
  background:
    linear-gradient(45deg, transparent 48%, rgba(20, 33, 61, 0.08) 49% 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(20, 33, 61, 0.08) 49% 51%, transparent 52%);
  background-size: 32px 32px;
  transform: rotate(8deg);
}

.brand-mark {
  position: absolute;
  top: 32px;
  right: 34px;
  width: 92px;
  height: 92px;
  transform: rotate(-8deg);
}

.petal {
  position: absolute;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(20, 33, 61, 0.18);
  border-radius: 8px;
}

.petal-a {
  left: 0;
  top: 8px;
  background: var(--teal);
}

.petal-b {
  right: 0;
  top: 22px;
  background: var(--coral);
}

.petal-c {
  left: 20px;
  bottom: 0;
  background: var(--lemon);
}

.intro {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 8px 12px;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(0, 168, 150, 0.12);
  border: 1px solid rgba(0, 168, 150, 0.24);
  border-radius: 8px;
}

h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0;
  max-width: 780px;
}

.summary {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.upload-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.upload-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-top: 6px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(20, 33, 61, 0.08);
}

.upload-card.coral {
  border-top-color: var(--coral);
}

.card-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 54px;
}

.icon-box {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: white;
  place-items: center;
  background: var(--teal);
  border-radius: 8px;
}

.coral .icon-box {
  background: var(--coral);
}

.card-heading h2 {
  margin: 0;
  font-size: 1.12rem;
}

.card-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.drop-zone {
  display: grid;
  min-height: 190px;
  margin: 18px 0 14px;
  padding: 24px;
  text-align: center;
  place-items: center;
  border: 2px dashed rgba(20, 33, 61, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 168, 150, 0.1), rgba(255, 255, 255, 0.3)),
    rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.coral .drop-zone {
  background:
    linear-gradient(135deg, rgba(255, 107, 87, 0.12), rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.48);
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--ink);
  background: rgba(255, 209, 102, 0.24);
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-badge {
  display: inline-flex;
  min-width: 88px;
  justify-content: center;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--lemon);
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 8px;
}

.drop-zone strong {
  font-size: 1.15rem;
}

.drop-zone span:last-child {
  color: var(--muted);
}

.file-row {
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.file-row.is-ready {
  color: var(--teal-dark);
  font-weight: 800;
}

.open-button,
.generate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.open-button {
  width: 100%;
  color: var(--ink);
  font-weight: 800;
  background: white;
  border: 1px solid var(--line);
}

.action-band {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.generate-button {
  min-width: min(100%, 360px);
  padding: 0 24px;
  color: white;
  font-size: 1.08rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--coral), #f28f3b 46%, var(--teal));
  box-shadow: 0 18px 38px rgba(217, 79, 61, 0.28);
}

.generate-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.65;
}

.status-panel {
  position: relative;
  z-index: 1;
  padding: 18px;
  background: rgba(20, 33, 61, 0.92);
  border-radius: var(--radius);
  color: white;
}

.status-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-title h2 {
  margin: 0;
  font-size: 1rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.step span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: var(--ink);
  font-weight: 900;
  place-items: center;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 50%;
}

.step.is-active,
.step.is-done {
  color: white;
  background: rgba(0, 168, 150, 0.36);
}

.step.is-done span {
  background: var(--green);
}

.message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.message div {
  display: grid;
  gap: 2px;
}

.message span {
  color: rgba(255, 255, 255, 0.76);
}

.message.success {
  background: rgba(108, 207, 89, 0.24);
}

.message.error {
  background: rgba(255, 107, 87, 0.28);
}

.audit-panel {
  margin-top: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.audit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.audit-kicker {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.audit-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
}

.audit-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.metric {
  min-height: 78px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.metric strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.84rem;
}

.audit-details {
  display: grid;
  gap: 8px;
}

.audit-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--lemon);
  border-radius: 8px;
}

.audit-item.is-error {
  border-left-color: var(--coral);
}

.audit-item.is-success {
  border-left-color: var(--green);
}

.audit-item b {
  color: white;
}

.audit-item code {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.74);
  font-family: "Nunito Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 680px);
    padding: 10px 0;
  }

  .hero {
    min-height: auto;
    padding: 24px 16px;
  }

  .brand-mark {
    display: none;
  }

  h1 {
    font-size: 3.1rem;
  }

  .upload-grid,
  .steps,
  .audit-metrics {
    grid-template-columns: 1fr;
  }

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

  .drop-zone {
    min-height: 158px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
