:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #65727e;
  --line: #dbe3e6;
  --surface: #ffffff;
  --wash: #f4f8f7;
  --accent: #0b766f;
  --accent-dark: #075b56;
  --accent-soft: #dff2ef;
  --danger: #a93434;
  --shadow: 0 18px 55px rgba(23, 48, 55, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(115, 190, 180, 0.16), transparent 28rem),
    linear-gradient(180deg, #f9fbfa 0%, #eef4f3 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 34px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 19px;
  color: white;
  background: linear-gradient(145deg, #11948a, #075f59);
  box-shadow: 0 12px 28px rgba(11, 118, 111, 0.25);
  font-family: Georgia, serif;
  font-size: 36px;
  font-style: italic;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.intro {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.card {
  padding: 30px;
  border: 1px solid rgba(210, 222, 224, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.inputs-card {
  grid-row: span 2;
}

.section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 25px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.step {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.16rem;
  letter-spacing: -0.015em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.45;
}

.drop-zone {
  display: flex;
  min-height: 176px;
  padding: 28px;
  border: 1.5px dashed #a8bfbd;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  background: #f7fbfa;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #eef8f6;
  transform: translateY(-1px);
}

.drop-zone input,
.text-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.drop-zone:focus-within {
  outline: 3px solid rgba(11, 118, 111, 0.18);
  outline-offset: 3px;
}

.upload-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 13px;
  border-radius: 14px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}

.upload-icon svg,
.primary-button svg,
footer svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.drop-zone > span:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--wash);
  font-size: 0.82rem;
}

.file-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
}

.names-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 23px 0 8px;
  font-size: 0.86rem;
  font-weight: 750;
}

.text-file-button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  cursor: pointer;
  background: white;
  font-size: 0.75rem;
  font-weight: 750;
}

textarea,
select,
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea:focus,
select:focus,
input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 118, 111, 0.12);
}

textarea {
  min-height: 164px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.55;
}

.field-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #3a464f;
  font-size: 0.79rem;
  font-weight: 700;
}

.field select,
.field input[type="number"] {
  height: 42px;
  padding: 0 11px;
  font-size: 0.87rem;
  font-weight: 500;
}

.number-suffix {
  position: relative;
}

.number-suffix input {
  padding-right: 34px !important;
}

.number-suffix > span {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--muted);
  transform: translateY(-50%);
  font-weight: 500;
}

.range-field {
  grid-column: 1 / -1;
}

.range-field > span {
  display: flex;
  justify-content: space-between;
}

output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.toggle-row {
  display: flex;
  min-height: 55px;
  padding: 10px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.toggle-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toggle-row strong {
  font-size: 0.81rem;
}

.toggle-row small {
  color: var(--muted);
  font-size: 0.7rem;
}

input[role="switch"] {
  width: 38px;
  height: 22px;
  margin: 0;
  flex: 0 0 auto;
  appearance: none;
  border-radius: 999px;
  cursor: pointer;
  background: #cbd5d8;
  transition: background 150ms ease;
}

input[role="switch"]::after {
  display: block;
  width: 16px;
  height: 16px;
  margin: 3px;
  border-radius: 50%;
  content: "";
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

input[role="switch"]:checked {
  background: var(--accent);
}

input[role="switch"]:checked::after {
  transform: translateX(16px);
}

input[role="switch"]:focus-visible {
  outline: 3px solid rgba(11, 118, 111, 0.2);
  outline-offset: 2px;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 51px;
  border: 0;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  cursor: pointer;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(11, 118, 111, 0.2);
  font-weight: 750;
  transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.progress-panel {
  margin-top: 20px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
}

progress::-webkit-progress-bar {
  background: var(--accent-soft);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.message {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  line-height: 1.45;
}

.message.error {
  color: var(--danger);
}

footer {
  display: flex;
  padding: 25px 4px 0;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.74rem;
}

footer span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #3e5b59;
  font-weight: 700;
}

footer svg {
  width: 16px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .shell {
    padding-top: 38px;
  }

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

  .inputs-card {
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1120px);
  }

  .hero {
    align-items: flex-start;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 29px;
  }

  .intro {
    font-size: 0.88rem;
  }

  .card {
    padding: 23px 19px;
    border-radius: 17px;
  }

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

  .range-field {
    grid-column: auto;
  }

  footer {
    align-items: center;
    flex-direction: column;
    gap: 8px;
  }
}

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