  *,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Sora", sans-serif;
  background: #f7f6f2;
  color: #1c1c1a;
}

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --border: #e2e0d8;
  --accent: #3b6d11;
  --accent-light: #eaf3de;
  --accent-mid: #639922;
  --text-muted: #888780;
  --text-primary: #1c1c1a;
  --danger: #a32d2d;
  --danger-light: #fcebeb;
  --info: #185fa5;
  --info-light: #e6f1fb;
  --warn: #854f0b;
  --warn-light: #faeeda;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-decoration: none;
}
.btn-primary:hover {
  background: #27500a;
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:disabled {
  background: #b4b2a9;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.tab-pill {
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  font-family: "Sora", sans-serif;
}
.tab-pill.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 109, 17, 0.25);
}
.tab-pill:not(.active):hover {
  background: var(--accent-light);
  color: var(--accent);
}

.fmt-tag {
  padding: 4px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: "DM Mono", monospace;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #c0dd97;
  display: inline-block;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-mid), var(--accent));
  border-radius: 6px;
  transition: width 0.35s ease;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green {
  background: var(--accent-light);
  color: var(--accent);
}
.badge-blue {
  background: var(--info-light);
  color: var(--info);
}

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.slide-up {
  animation: slideUp 0.35s ease;
}

nav {
  background: rgba(247, 246, 242, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

.mono {
  font-family: "DM Mono", monospace;
}

.info-banner {
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.6;
}
.info-banner.blue {
  background: var(--info-light);
  border: 1px solid #b5d4f4;
  color: var(--info);
}
.info-banner.green {
  background: var(--accent-light);
  border: 1px solid #c0dd97;
  color: var(--accent);
}
.info-banner.red {
  background: var(--danger-light);
  border: 1px solid #f7c1c1;
  color: var(--danger);
}

@media (max-width: 640px) {
  .tab-pill {
    padding: 8px 13px;
    font-size: 13px;
  }
}
