:root {
  --bg: #0c0f14;
  --bg-elevated: #141a24;
  --bg-card: #1a2230;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #e8a54b;
  --accent-dim: rgba(232, 165, 75, 0.15);
  --success: #4ade80;
  --pending: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 70% 50% at 10% -5%, rgba(232, 165, 75, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(74, 222, 128, 0.05), transparent);
}

a { color: var(--accent); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 20, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a:hover { color: var(--text); }

.hero { padding: 3rem 1.25rem 2.5rem; text-align: center; }

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.eyebrow a {
  color: var(--accent);
  text-decoration: none;
}

.eyebrow a:hover { text-decoration: underline; }

.footer-lab {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.lead {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section { padding: 2.5rem 1.25rem; }

.section-alt { background: rgba(0, 0, 0, 0.2); }

.section h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.section-lead {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: 0.15s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.btn-primary {
  background: var(--accent);
  color: #1a1208;
  border-color: var(--accent);
}

.btn-outline { background: transparent; }

.btn-secondary { opacity: 0.5; cursor: not-allowed; }

.btn-block { width: 100%; margin-top: 0.5rem; }

.btn-sm { font-size: 0.8rem; padding: 0.4rem 0.75rem; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.demo-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.demo-side {
  padding: 1.25rem;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
}

.demo-side h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }

.ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.56;
  stroke-dashoffset: 326.56;
  transition: stroke-dashoffset 0.5s ease;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.mini-stats { list-style: none; font-size: 0.85rem; margin-bottom: 0.75rem; }

.mini-stats li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.success { background: var(--success); }
.dot.pending { background: var(--pending); }

.demo-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  min-height: 2.5em;
}

.demo-main { padding: 1rem 1.25rem 1.25rem; }

.step-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.step-tab {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.step-tab.active,
.step-tab:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}

.step-panel { display: none; animation: fade 0.25s ease; }

.step-panel.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.step-panel h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.step-panel p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

.demo-input {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  margin-bottom: 0.5rem;
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  margin-bottom: 0.5rem;
  transition: 0.15s ease;
}

.upload-zone.large { padding: 2rem; }

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.file-picked { font-size: 0.85rem; color: var(--success); margin-bottom: 0.5rem; }

.check { font-size: 0.85rem; margin-top: 0.5rem; }

.check.done { color: var(--success); }

.paper-list,
.result-list {
  list-style: none;
  margin: 0.75rem 0;
  max-height: 140px;
  overflow-y: auto;
}

.paper-list li,
.result-list li {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.paper-list li.muted { color: var(--text-muted); font-style: italic; }

.demo-banner {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 8px;
  color: var(--success);
  font-size: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.card-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.card h3 { font-size: 1rem; margin-bottom: 0.35rem; }

.card p { font-size: 0.85rem; color: var(--text-muted); }

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.code-block code { color: var(--text); }

.hint { font-size: 0.85rem; color: var(--text-muted); }

.audience {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.audience li {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }

.toast-stack {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: slide 0.2s ease;
}

@keyframes slide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .demo-layout { grid-template-columns: 1fr; }
  .demo-side { border-right: none; border-bottom: 1px solid var(--border); }
}
