:root {
  color-scheme: light;
  --page: #f7f4ec;
  --surface: #fffdf8;
  --surface-strong: #f0eadf;
  --ink: #20231f;
  --muted: #666b61;
  --line: #d9d0c2;
  --pine: #24594a;
  --pine-strong: #174235;
  --rust: #a94f2b;
  --gold: #c49332;
  --focus: #2f7f68;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 960px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px clamp(14px, 4vw, 32px) 32px;
  display: grid;
  gap: 14px;
}

.topbar,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(50, 38, 20, 0.08);
}

.topbar {
  border-radius: 8px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel {
  border-radius: 8px;
  padding: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 8vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 0.86rem;
  color: var(--pine-strong);
  text-transform: uppercase;
  letter-spacing: 0;
}

.mode-pill,
.status-pill {
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mode-pill {
  color: var(--rust);
  background: #fff4e8;
}

.section-heading {
  margin-bottom: 14px;
}

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

.drop-zone {
  min-height: 172px;
  border: 1.5px dashed var(--gold);
  border-radius: 8px;
  background: var(--surface-strong);
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  cursor: pointer;
}

.drop-zone:focus-within {
  outline: 3px solid rgba(47, 127, 104, 0.25);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.drop-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pine);
  color: white;
  font-size: 1.8rem;
  line-height: 1;
}

.drop-title {
  margin-top: 10px;
  font-weight: 800;
}

.drop-meta {
  max-width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--pine);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--pine-strong);
}

button:focus-visible {
  outline: 3px solid rgba(47, 127, 104, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  background: #9ea79d;
}

button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--pine-strong);
}

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

.status-list li {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  background: #fbf8f1;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.status-list li.active {
  color: var(--pine-strong);
  border-color: rgba(36, 89, 74, 0.4);
  background: #edf5ef;
}

.status-list li.current {
  box-shadow: inset 0 -4px 0 var(--pine);
}

.status-pill.idle {
  color: var(--muted);
  background: white;
}

.status-pill.completed {
  color: var(--pine-strong);
  background: #edf5ef;
}

.empty-state {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fbf8f1;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf8f1;
  padding: 12px;
}

.metric-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--rust);
}

.metric-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-card {
  grid-column: span 3;
}

.result-card p,
.result-card li {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.result-card p {
  margin-bottom: 0;
}

.result-card ul {
  margin: 0;
  padding-left: 18px;
}

@media (min-width: 740px) {
  .app-shell {
    grid-template-columns: minmax(300px, 0.92fr) minmax(380px, 1.08fr);
    align-content: start;
  }

  .topbar,
  .result-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .result-card,
  .metric-card {
    grid-column: auto;
  }
}
