:root {
  color-scheme: light;
  --ink: #15221d;
  --muted: #66736d;
  --paper: #f2f0e9;
  --surface: #fbfaf6;
  --line: #d9ddd5;
  --accent: #ff5b35;
  --accent-dark: #d94120;
  --lime: #dff462;
  --shadow: 0 24px 70px rgb(32 49 41 / 10%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 5%, rgb(223 244 98 / 40%), transparent 25rem),
    linear-gradient(135deg, #f5f3ec 0%, #eeefe8 100%);
}

button,
input {
  font: inherit;
}

button,
.drop-zone {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
.drop-zone:focus-within,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(255 91 53 / 35%);
  outline-offset: 3px;
}

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

.hero {
  position: relative;
  padding: 28px 0 62px;
}

.brand-mark {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-mark span {
  padding: 7px 9px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.brand-mark i {
  color: var(--accent);
  font-size: 18px;
  font-style: normal;
}

.eyebrow,
.step {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 790;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.lede {
  max-width: 640px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 30px 0 0;
  padding: 0;
  color: #45524c;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}

.trust-row span {
  margin-right: 7px;
  color: var(--accent);
}

.workspace,
.result {
  overflow: hidden;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid rgb(21 34 29 / 8%);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 30px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.format-pill {
  padding: 9px 12px;
  border-radius: 999px;
  color: #384416;
  background: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}

.drop-zone {
  display: grid;
  min-height: 270px;
  padding: 38px;
  place-content: center;
  justify-items: center;
  border: 2px dashed #aab3aa;
  border-radius: 20px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    repeating-linear-gradient(45deg, transparent 0 8px, rgb(21 34 29 / 3%) 8px 16px);
  cursor: pointer;
  transition: 180ms ease;
}

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

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-size: 32px;
  font-weight: 300;
  box-shadow: 0 8px 24px rgb(255 91 53 / 28%);
}

.drop-zone strong {
  margin-bottom: 8px;
  font-size: 19px;
}

.drop-zone > span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.file-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.file-panel-head {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: none;
  cursor: pointer;
}

.file-list {
  max-height: 240px;
  margin: 0;
  padding: 6px 18px;
  overflow: auto;
  list-style: none;
}

.file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e9ebe6;
}

.file-list li:last-child {
  border: 0;
}

.file-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.remove-file {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #eceee8;
  cursor: pointer;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 30px;
  align-items: end;
  padding: 28px 0;
}

.settings-row label > span {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 750;
}

.settings-row small {
  color: var(--muted);
  font-weight: 500;
}

.settings-row input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #bcc4bd;
  border-radius: 10px;
  color: var(--ink);
  background: white;
}

.settings-row p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.thought-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: -6px 0 28px;
  padding: 16px;
  border: 1px solid #d4d9d2;
  border-radius: 10px;
  background: #f7f8f4;
  cursor: pointer;
}

.thought-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.thought-option span {
  display: grid;
  gap: 4px;
}

.thought-option strong {
  font-size: 13px;
}

.thought-option small {
  color: var(--muted);
  line-height: 1.5;
}

.primary-button,
.download-button {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: white;
  background: var(--ink);
  font-weight: 750;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button {
  width: 100%;
  padding: 18px 22px;
  border-radius: 12px;
}

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

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

.status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  color: #5d271b;
  background: #ffe3d9;
  font-size: 14px;
}

.status.is-working {
  color: #374318;
  background: #eff8c1;
}

.result {
  margin-top: 22px;
  color: #edf3ef;
  background: var(--ink);
}

.result .step {
  color: var(--lime);
}

.result-heading {
  align-items: center;
}

.download-button {
  padding: 13px 18px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 10px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgb(255 255 255 / 14%);
  border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.metrics div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 28px 0;
}

.metrics strong {
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.metrics span {
  color: #9dacA5;
  font-size: 12px;
}

.preview {
  padding-top: 22px;
}

.preview summary {
  width: fit-content;
  color: #c7d2cc;
  font-size: 13px;
  cursor: pointer;
}

.preview pre {
  max-height: 420px;
  margin: 18px 0 0;
  padding: 18px;
  overflow: auto;
  border-radius: 12px;
  color: #d9f17a;
  background: #0c1411;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

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

footer a {
  color: var(--ink);
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 28px;
  }

  .hero {
    padding-top: 64px;
  }

  .brand-mark {
    right: auto;
    left: 0;
  }

  .settings-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .drop-zone {
    min-height: 230px;
    padding: 24px;
  }

  .result-heading {
    display: block;
  }

  .download-button {
    width: 100%;
    margin-top: 20px;
  }

  .metrics div {
    padding-right: 8px;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  footer {
    display: block;
    line-height: 1.7;
  }
}

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