:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #66736f;
  --line: #d7ded9;
  --panel: #ffffff;
  --page: #f3f6f4;
  --accent: #0c7f72;
  --accent-strong: #075f55;
  --accent-soft: #dff3ee;
  --warn: #9c4d0a;
  --shadow: 0 18px 60px rgba(18, 39, 33, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(12, 127, 114, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(155, 90, 34, 0.12), transparent 34%),
    var(--page);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-copy,
.hero-note,
.ad-band,
.site-footer {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 222, 217, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(12, 127, 114, 0.12), rgba(255, 255, 255, 0.95) 58%),
    rgba(255, 255, 255, 0.94);
}

.hero-note {
  padding: 22px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-points span {
  padding: 8px 12px;
  border: 1px solid #cde2dc;
  border-radius: 999px;
  background: #f3fbf8;
  font-size: 13px;
  font-weight: 700;
}

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

.ad-band {
  margin-bottom: 18px;
  padding: 14px 18px 18px;
}

.ad-band-head {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.ad-slot {
  min-height: 110px;
  display: grid;
  place-items: center;
  border: 1px dashed #c7d6d1;
  border-radius: 8px;
  background: #f9fbfa;
}

.ad-slot ins {
  display: block;
  width: 100%;
  min-height: 110px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel,
.results {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 222, 217, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.brand-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.mark {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  grid-template-rows: repeat(3, 8px);
  gap: 5px;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  align-content: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10221e;
}

.mark span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #d9fff5;
}

.mark span:nth-child(2) {
  background: #7ee0d0;
}

.mark span:nth-child(3) {
  background: #f0a84f;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.tool-title {
  font-size: 24px;
  line-height: 1.2;
}

.brand-row p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 310px;
  padding: 32px;
  text-align: center;
  border: 1px dashed #9fb3ad;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(90deg, #e5ece8 0 18px, #f8faf8 18px 30px);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone strong {
  font-size: 22px;
  letter-spacing: 0;
}

.drop-zone small {
  color: var(--muted);
}

.drop-icon {
  width: 74px;
  height: 52px;
  border: 3px solid #17322c;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 12%, rgba(23, 50, 44, 0.14) 12% 20%, transparent 20% 80%, rgba(23, 50, 44, 0.14) 80% 88%, transparent 88%),
    #ffffff;
  box-shadow: 0 12px 32px rgba(18, 39, 33, 0.14);
}

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

.file-item,
.result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.file-name,
.result-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.file-size,
.result-size {
  color: var(--muted);
  font-size: 13px;
}

.result-item.pending {
  background: #f4f8f6;
}

.controls-panel {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.control-group {
  display: grid;
  gap: 8px;
}

.control-group label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.preset-note {
  min-height: 74px;
  padding: 12px;
  color: #28423c;
  background: var(--accent-soft);
  border: 1px solid #b8ddd5;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.primary-action,
.ghost-action,
.download-action {
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
}

.primary-action {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--accent);
  font-weight: 750;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.primary-action:disabled,
.ghost-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-icon {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.primary-action.running .button-icon {
  animation: spin 850ms linear infinite;
}

.progress-card {
  display: grid;
  gap: 10px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  background: #e6ece8;
  border-radius: 999px;
}

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

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

.results {
  margin-top: 18px;
  padding: 18px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  text-decoration: none;
}

.legal-shell {
  padding-top: 40px;
}

.legal-panel {
  max-width: 820px;
  margin: 0 auto;
}

.legal-panel h1 {
  margin-bottom: 14px;
}

.legal-panel p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-action {
  min-width: 76px;
  padding: 0 14px;
  color: var(--accent-strong);
  background: #edf7f4;
}

.result-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 0 14px;
  color: #ffffff;
  background: #17322c;
  text-decoration: none;
  font-weight: 700;
}

.skip-action {
  min-height: 38px;
  min-width: 72px;
  padding: 0 12px;
  color: #7a3d08;
  background: #fff1df;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.result-item.skipped {
  opacity: 0.72;
}

.error {
  color: var(--warn);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slide-progress {
  0% {
    transform: translateX(-110%);
  }

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

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 22px, 720px);
    padding: 14px 0;
  }

  .hero-band {
    grid-template-columns: 1fr;
  }

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

  .controls-panel {
    position: static;
  }

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

@media (max-width: 520px) {
  .panel,
  .results {
    padding: 14px;
  }

  .brand-row {
    align-items: flex-start;
  }

  h1 {
    font-size: 23px;
  }

  .control-grid,
  .file-item,
  .result-item {
    grid-template-columns: 1fr;
  }

  .results-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .result-actions {
    justify-content: stretch;
  }

  .result-actions .ghost-action {
    flex: 1 1 auto;
  }
}
