:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --panel: rgba(15, 23, 42, 0.76);
  --line: rgba(148, 163, 184, 0.17);
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #34d399;
}

* { box-sizing: border-box; }
html { background: #020617; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 82% 5%, rgba(139, 92, 246, 0.2), transparent 32rem),
    radial-gradient(circle at 8% 36%, rgba(34, 211, 238, 0.12), transparent 30rem),
    #020617;
}

button, input, select, textarea { font: inherit; }
.shell { max-width: 1440px; margin: 0 auto; padding: 0 4.5vw; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 14px; letter-spacing: 0.08em; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(34, 211, 238, 0.5); border-radius: 14px; background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(139, 92, 246, 0.2)); font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 0.61rem; }
.runtime-pill { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.78rem; }
.runtime-pill span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #64748b; box-shadow: 0 0 14px currentColor; }
.runtime-pill .online { background: var(--green); }

.hero { min-height: 520px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); align-items: center; gap: 6vw; padding: 72px 0 58px; }
.eyebrow { margin: 0 0 18px; color: var(--cyan); font-size: 0.71rem; font-weight: 750; letter-spacing: 0.2em; }
h1 { max-width: 850px; margin: 0; font-size: clamp(3.15rem, 7vw, 6.6rem); line-height: 0.94; letter-spacing: -0.058em; }
h1 em { color: transparent; font-style: normal; background: linear-gradient(90deg, var(--cyan), #a78bfa); background-clip: text; -webkit-background-clip: text; }
.hero-copy { max-width: 680px; margin: 34px 0 0; color: #cbd5e1; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.7; }
.hero-orbit { position: relative; aspect-ratio: 1; width: min(100%, 390px); justify-self: center; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid rgba(34, 211, 238, 0.28); border-radius: 50%; }
.orbit-one { inset: 7%; transform: rotateX(64deg) rotateZ(12deg); }
.orbit-two { inset: 20%; border-color: rgba(167, 139, 250, 0.4); transform: rotateY(58deg) rotateZ(-18deg); }
.core { width: 116px; height: 116px; display: grid; place-items: center; border-radius: 34px; background: linear-gradient(145deg, rgba(34, 211, 238, 0.24), rgba(139, 92, 246, 0.32)); border: 1px solid rgba(255, 255, 255, 0.24); box-shadow: 0 0 80px rgba(139, 92, 246, 0.34); font-size: 2.2rem; font-weight: 850; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: rgba(2, 6, 23, 0.45); backdrop-filter: blur(18px); }
.metric-card { min-height: 150px; padding: 28px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.metric-card:last-child { border-right: 0; }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; }
.metric-card strong { margin: 12px 0 6px; font-size: 1.45rem; }
.metric-card small { font-size: 0.76rem; }

.workspace { margin: 90px 0 0; padding: 44px; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: 0 35px 90px rgba(0, 0, 0, 0.28); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -0.045em; }
.button { border: 0; border-radius: 12px; padding: 12px 17px; cursor: pointer; font-weight: 720; }
.button.primary { color: #020617; background: linear-gradient(90deg, var(--cyan), #a78bfa); }
.button.secondary { color: var(--ink); border: 1px solid var(--line); background: rgba(15, 23, 42, 0.8); }
.secure-panel { margin-top: 28px; padding: 22px; border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 16px; background: rgba(8, 47, 73, 0.2); }
.secure-panel label { display: block; margin-bottom: 9px; font-size: 0.78rem; color: #cbd5e1; }
.token-row { display: flex; gap: 10px; }
.token-row input { flex: 1; min-width: 0; color: var(--ink); background: #020617; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.privacy-note { margin: 10px 0 0; color: var(--muted); font-size: 0.72rem; }
.pipeline { margin-top: 42px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pipeline > div { min-height: 180px; padding: 26px; background: #0b1224; }
.pipeline span { color: var(--cyan); font-size: 0.72rem; letter-spacing: 0.14em; }
.pipeline strong { display: block; margin: 28px 0 9px; font-size: 1.15rem; }
.pipeline small { color: var(--muted); line-height: 1.55; }
.project-form { margin-top: 28px; padding: 28px; border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 18px; background: rgba(8, 47, 73, 0.14); }
.form-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.form-heading h3 { margin: 0; font-size: 1.7rem; letter-spacing: -0.03em; }
.form-heading > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1.3fr 1fr 0.7fr; gap: 18px; margin-top: 26px; }
.form-grid label { display: flex; flex-direction: column; gap: 8px; color: #cbd5e1; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; color: var(--ink); background: #020617; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.form-grid textarea { resize: vertical; line-height: 1.55; }
.prompt-field { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; }
.form-actions p { margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }
.jobs-panel { margin-top: 28px; color: var(--muted); }
.job { margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(2, 6, 23, 0.58); }
.job strong { color: var(--ink); }
.job-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.status-tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--cyan); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; }
.estimate-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.estimate-value { padding: 11px 12px; background: #080e1d; color: #cbd5e1; font-size: 0.74rem; }
.funding-sufficient { color: var(--green); }
.funding-insufficient { color: #fbbf24; }
.job-details { margin: 12px 0 0; color: var(--muted); font-size: 0.72rem; }
.wallet-warning { margin: 12px 0 0; padding: 10px 12px; border-left: 2px solid #fbbf24; color: #fde68a; background: rgba(120, 53, 15, 0.2); font-size: 0.72rem; line-height: 1.5; }
.job-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.job-actions .button { padding: 9px 12px; font-size: 0.72rem; }
.principles { padding: 110px 0; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.principle-grid strong { font-size: 1.3rem; }
.principle-grid p { color: var(--muted); line-height: 1.7; }
footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 90px; }
  .hero-orbit { display: none; }
  .metrics, .pipeline { grid-template-columns: repeat(2, 1fr); }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .principle-grid { grid-template-columns: 1fr; gap: 18px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid label:first-child, .prompt-field { grid-column: 1 / -1; }
  .estimate-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .shell { padding: 0 20px; }
  .topbar { min-height: 80px; }
  .runtime-pill { display: none; }
  .hero { min-height: 440px; padding: 64px 0 44px; }
  .metrics, .pipeline { grid-template-columns: 1fr; }
  .metric-card, .metric-card:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-card:last-child { border-bottom: 0; }
  .workspace { padding: 24px; margin-top: 60px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .token-row { flex-direction: column; }
  .form-heading, .form-actions { align-items: stretch; flex-direction: column; }
  .form-grid, .estimate-strip { grid-template-columns: 1fr; }
  .form-grid label, .form-grid label:first-child, .prompt-field { grid-column: 1; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}
