:root {
  color-scheme: light;
  --ink: #0d0f14;
  --ink-soft: #1e2430;
  --muted: #5a6476;
  --paper: #f6f4ef;
  --card: #ffffff;
  --accent: #ff7a59;
  --accent-dark: #e85d3f;
  --mint: #8ef0c8;
  --sky: #89b7ff;
  --sun: #f6cc4b;
  --shadow: 0 16px 50px rgba(13, 15, 20, 0.1);
  --radius: 24px;
  --border: 1px solid rgba(13, 15, 20, 0.08);
  font-family: "Space Grotesk", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff5e9 0%, #f6f4ef 38%, #edf3ff 100%);
  color: var(--ink);
}

.page {
  position: relative;
  min-height: 100vh;
}

.orbital {
  position: fixed;
  inset: -20vh -20vw auto auto;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(246, 204, 75, 0.35), rgba(137, 183, 255, 0.1) 60%, transparent 70%);
  filter: blur(0);
  pointer-events: none;
  z-index: 0;
  animation: float 18s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-40px, 30px, 0);
  }
}

header.hero {
  position: relative;
  padding: 64px clamp(24px, 6vw, 80px) 40px;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: end;
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

h1,
h2 {
  font-family: "Fraunces", serif;
}

h1 {
  font-size: clamp(32px, 4vw, 56px);
  margin: 0 0 12px;
}

.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button,
.file-label {
  font-family: "Space Grotesk", sans-serif;
  border-radius: 999px;
  border: none;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
.file-label:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

button.ghost,
.file-label {
  background: transparent;
  border: 1px solid rgba(13, 15, 20, 0.2);
  color: var(--ink);
}

.stats {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.stats .metric {
  display: grid;
  gap: 6px;
}

.stats .metric span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stats .metric strong {
  font-size: 26px;
}

main {
  padding: 0 clamp(24px, 6vw, 80px) 80px;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.panel-header {
  padding: 24px 24px 0;
}

.panel-header h2 {
  margin: 0 0 8px;
}

.panel-header p {
  margin: 0 0 16px;
  color: var(--muted);
}

.panel-body {
  padding: 0 24px 24px;
  display: grid;
  gap: 16px;
}

.card {
  background: #fbfaf7;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(13, 15, 20, 0.08);
  display: grid;
  gap: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
}

.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(137, 183, 255, 0.2);
  color: #20508f;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(142, 240, 200, 0.3);
  color: #0b6b4e;
  font-weight: 600;
}

.list {
  display: grid;
  gap: 12px;
}

.match-card {
  border-left: 4px solid var(--accent);
}

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

.match-actions button {
  padding: 6px 14px;
  font-size: 12px;
}

.form {
  gap: 12px;
}

.form label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(13, 15, 20, 0.15);
  background: #fff;
  font-family: "Space Grotesk", sans-serif;
}

.inline {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.file-label input {
  display: none;
}

#json-preview {
  background: #0d0f14;
  color: #f6f4ef;
  border-radius: 16px;
  padding: 16px;
  font-size: 12px;
  max-height: 240px;
  overflow: auto;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

.signal {
  display: grid;
  gap: 10px;
}

.signal strong {
  font-size: 16px;
}

.signal span {
  color: var(--muted);
  font-size: 14px;
}

.alert {
  background: rgba(255, 122, 89, 0.14);
  border-radius: 14px;
  padding: 12px;
}

@media (max-width: 720px) {
  header.hero {
    padding-top: 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
