:root {
  --ink: #10231c;
  --ink-soft: #3a5248;
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --white: #fbf8f1;
  --line: rgba(16, 35, 28, 0.12);
  --teal: #0f6e56;
  --teal-2: #15936f;
  --gold: #c9842b;
  --gold-2: #e0b15a;
  --danger: #b42318;
  --ok: #0f6e56;
  --shadow: 0 24px 60px rgba(16, 35, 28, 0.12);
  --radius: 18px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f3eee3;
  --ink-soft: #c9c0b0;
  --paper: #0e1713;
  --paper-2: #16211c;
  --white: #121c18;
  --line: rgba(243, 238, 227, 0.1);
  --teal: #3dcea3;
  --teal-2: #7ee0c0;
  --gold: #e0b15a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 110, 86, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(201, 132, 43, 0.12), transparent 50%),
    var(--paper);
  color: var(--ink);
  letter-spacing: 0.01em;
}

a { color: var(--teal); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 8px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 600;
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--teal), #0a4638);
  color: #fbf8f1;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.nav-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--ink);
  color: var(--white);
  border-color: transparent;
}
[data-theme="dark"] .btn.primary {
  background: var(--teal);
  color: #06241b;
}
.btn.gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: transparent;
  color: #2a1a05;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  padding: 48px 0 28px;
}
.kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--teal);
  font-weight: 600;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 520; letter-spacing: -0.03em; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 0.95; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 48ch; line-height: 1.55; }
.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat { background: var(--paper-2); border-radius: 16px; padding: 12px; }
.stat b { display: block; font-family: var(--serif); font-size: 22px; }
.stat span { color: var(--ink-soft); font-size: 12px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 10px 0 40px; }
.card {
  background: color-mix(in srgb, var(--white) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
}
.card h3 { font-size: 24px; }

.app-shell { display: grid; grid-template-columns: 240px 1fr; gap: 22px; padding: 18px 0 60px; }
.side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 16px;
}
.side a, .side button.linkish {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
}
.side a.active, .side a:hover { background: var(--paper-2); }
.muted { color: var(--ink-soft); font-size: 13px; }

.drop {
  border: 1.5px dashed color-mix(in srgb, var(--teal) 50%, var(--line));
  border-radius: 24px;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--teal) 8%, transparent), transparent);
}
.drop.over { border-style: solid; background: color-mix(in srgb, var(--teal) 14%, var(--white)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
input, select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}
.progress {
  height: 8px;
  background: var(--paper-2);
  border-radius: 99px;
  overflow: hidden;
}
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); width: 0%; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  background: var(--paper-2);
}
.badge.queued { color: var(--gold); }
.badge.processing { color: var(--teal); }
.badge.completed { color: var(--ok); }
.badge.failed, .badge.canceled { color: var(--danger); }

.auth-box {
  width: min(440px, 100%);
  margin: 48px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.flash {
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--danger) 12%, var(--white));
  color: var(--danger);
  margin: 10px 0;
}
.okflash {
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--teal) 12%, var(--white));
}
.preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.preview figure {
  margin: 0;
  background: var(--paper-2);
  border-radius: 16px;
  overflow: hidden;
  min-height: 160px;
  display: grid;
  place-items: center;
}
footer.site {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.hidden { display: none !important; }

@media (max-width: 860px) {
  .hero, .grid-3, .app-shell, .preview { grid-template-columns: 1fr; }
  .side { position: static; }
  h1 { font-size: 42px; }
}
