:root {
  --bg: #f4efe6;
  --bg-2: #f7d8a8;
  --ink: #19221f;
  --accent: #d85f31;
  --accent-2: #1f6a62;
  --card: #fff9ef;
  --ok: #247a4b;
  --warn: #9a5b00;
  --error: #9d2a1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, var(--bg-2), transparent 38%),
    radial-gradient(circle at 90% 85%, #9bd9c4, transparent 30%), var(--bg);
}

.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 18px 46px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 36%, white);
  right: -48px;
  top: -64px;
  filter: blur(1px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin: 0 0 6px;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem, 3.1vw, 2.9rem);
  margin-bottom: 10px;
}

h2 {
  font-size: 1.5rem;
}

.card {
  background: var(--card);
  border: 2px solid color-mix(in oklab, var(--ink) 12%, white);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 26px rgba(25, 34, 31, 0.08);
  animation: rise 0.5s ease both;
}

.card-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.card-toggle-title {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.toggle-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--accent-2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: color-mix(in oklab, var(--accent-2) 8%, white);
}

.toggle-arrow {
  color: var(--accent-2);
  font-size: 1rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.card.collapsed .toggle-arrow {
  transform: rotate(-90deg);
}

.card-content {
  margin-top: 12px;
}

.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.stack {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.muted {
  color: color-mix(in oklab, var(--ink) 72%, white);
}

.status {
  font-weight: 700;
}

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

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

.form {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 600;
}

input[type="date"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
input[type="number"],
select {
  width: 100%;
  border: 1px solid #ceb99a;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.small {
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid var(--accent-2);
  color: var(--accent-2);
  padding: 10px 14px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
}

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid;
}

.notice.success {
  border-color: color-mix(in oklab, var(--ok) 55%, white);
  background: color-mix(in oklab, var(--ok) 16%, white);
}

.notice.error {
  border-color: color-mix(in oklab, var(--error) 50%, white);
  background: color-mix(in oklab, var(--error) 14%, white);
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.upload-job {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #ceb99a;
}

.debug-results p {
  overflow-wrap: anywhere;
}

.table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid #ceb99a;
  border-radius: 12px;
  background: #fffdf8;
}

.table-actions {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #eadcc7;
}

.table-actions p {
  margin: 0;
}

.dry-run-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  font-size: 0.92rem;
}

.dry-run-table th,
.dry-run-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eadcc7;
  text-align: left;
  white-space: nowrap;
}

.dry-run-table th {
  position: sticky;
  top: 0;
  background: #f9eddc;
  z-index: 1;
  font-weight: 700;
}

.dry-run-table tbody tr:nth-child(even) {
  background: #fffbf3;
}

.dry-run-table tbody tr:hover {
  background: #f5f1e8;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .grid,
  .results {
    grid-template-columns: 1fr;
  }
}
