/* ---------- Claude-inspired theme ---------- */
:root {
  --bg: #faf9f5;
  --bg-elev: #ffffff;
  --bg-soft: #f3f1ea;
  --ink: #1a1a1a;
  --ink-2: #3d3d3a;
  --ink-3: #6b6a64;
  --ink-4: #9a988f;
  --line: #e8e6dc;
  --line-2: #d9d6c7;
  --accent: #c96442;
  --accent-soft: #f0d9cd;
  --accent-ink: #8a3d22;
  --ok: #4f7a4a;
  --ok-soft: #e3ecdf;
  --warn: #b87333;
  --err: #b8473a;
  --err-soft: #f3dad5;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow: 0 1px 3px rgba(26, 26, 26, 0.06), 0 1px 2px rgba(26, 26, 26, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-family: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}

.hero .tagline {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* ---------- SEO Card ---------- */
.seo-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .seo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.field span em {
  font-style: normal;
  color: var(--ink-4);
  font-weight: 400;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.field input::placeholder {
  color: var(--ink-4);
}

.field input:focus {
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.12);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.toggle-label {
  font-size: 14px;
  color: var(--ink-2);
}

.toggle {
  position: relative;
  display: inline-block;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle .track {
  display: inline-block;
  width: 38px;
  height: 22px;
  background: var(--line-2);
  border-radius: 999px;
  transition: background 0.15s;
  position: relative;
}

.toggle .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .track {
  background: var(--accent);
}

.toggle input:checked + .track .thumb {
  transform: translateX(16px);
}

.toggle input:focus-visible + .track {
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.18);
}

/* ---------- Specs ---------- */
.specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 720px) {
  .specs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.spec {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.spec h3 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.spec p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.folder-icon {
  margin-right: 4px;
}

/* ---------- Dropzone ---------- */
.dropzone {
  position: relative;
  border: 2px dashed var(--line-2);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  outline: none;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background: #fdfaf6;
}

.dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dz-title {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
}

.dz-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- Queue ---------- */
.queue {
  margin-top: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.queue.hidden,
.hidden {
  display: none !important;
}

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

.queue-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-3);
  flex-wrap: wrap;
}

.queue-stats strong {
  color: var(--ink);
  font-weight: 600;
}

.stat-failed strong {
  color: var(--err);
}

.queue-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  border-color: var(--line-2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.file-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.file-row:last-child {
  border-bottom: none;
}

.file-status {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.status-pending {
  background: var(--bg-soft);
  color: var(--ink-4);
}

.status-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  animation: pulse 1.2s ease-in-out infinite;
}

.status-done {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-failed {
  background: var(--err-soft);
  color: var(--err);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.file-meta {
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-detail {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.file-detail .err-text {
  color: var(--err);
}

.file-size {
  text-align: right;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.file-size .saved {
  color: var(--ok);
  font-weight: 500;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-4);
}
