:root {
  color-scheme: dark;
  --bg: #07100d;
  --surface: #0d1b16;
  --surface-2: #12251d;
  --line: #294137;
  --text: #eef9f3;
  --muted: #9eb6aa;
  --green: #56f39a;
  --green-2: #1ecf73;
  --amber: #f1c75b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(42, 154, 100, .14), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, select, textarea { font: inherit; }

.site-header, main, footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { font-size: 1.18rem; font-weight: 800; letter-spacing: -.03em; }
.alpha, .eyebrow, .task-kind {
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.hero { padding: 92px 0 70px; }
.eyebrow { margin: 0 0 16px; }
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 6.3rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.lead {
  max-width: 760px;
  margin: 30px 0 42px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.request-form {
  padding: 24px;
  background: linear-gradient(145deg, rgba(18, 37, 29, .96), rgba(10, 23, 18, .96));
  border: 1px solid var(--line);
  border-radius: 20px;
}
.request-form > label { display: block; margin-bottom: 12px; font-weight: 750; }
textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 18px;
  color: var(--text);
  background: rgba(3, 11, 8, .7);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}
textarea:focus, select:focus, button:focus-visible { border-color: var(--green); box-shadow: 0 0 0 3px rgba(86, 243, 154, .17); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.form-actions label { color: var(--muted); }
select, button {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
select { padding: 0 38px 0 13px; color: var(--text); background: var(--surface); }
button {
  margin-left: auto;
  padding: 0 22px;
  color: #031008;
  background: var(--green);
  border-color: var(--green);
  font-weight: 850;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: wait; }
.status-message { min-height: 1.5em; margin: 12px 0 0; color: var(--muted); }

.network, .plan { padding: 64px 0; border-top: 1px solid var(--line); }
h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.045em; }
.network-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 34px 0 18px; background: var(--line); border: 1px solid var(--line); }
.network-stats div { padding: 22px; background: var(--surface); }
.network-stats dt { color: var(--muted); font-size: .86rem; }
.network-stats dd { margin: 6px 0 0; font-size: 2rem; font-weight: 850; }
.network-note, .bootstrap-note { color: var(--muted); }

.plan-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.plan-state { color: var(--amber); }
.plan-prompt { margin: 28px 0 40px; font-size: 1.15rem; color: var(--muted); }
.pyramid { display: flex; flex-direction: column; gap: 16px; }
.pyramid-level { display: grid; gap: 12px; justify-content: center; }
.level-0 { grid-template-columns: minmax(260px, 480px); }
.level-1 { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
.level-2 { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.task {
  min-height: 128px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.task h3 { margin: 9px 0; font-size: 1rem; line-height: 1.35; }
.task-status { margin: 0; color: var(--muted); font-size: .84rem; }
.task-compute { margin: 12px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.task-awaiting_provider { border-color: rgba(241, 199, 91, .44); }
.task-awaiting_provider .task-status { color: var(--amber); }
.task-leased, .task-running { border-color: rgba(86, 243, 154, .55); }
.task-succeeded { border-color: rgba(86, 243, 154, .25); }
.planning-placeholder { padding: 32px; text-align: center; color: var(--amber); border: 1px dashed var(--line); border-radius: 14px; }
.result-panel { margin-top: 36px; padding: 26px; background: var(--surface-2); border: 1px solid var(--green-2); border-radius: 16px; }
.result-panel h3 { margin: 0 0 18px; font-size: 1.4rem; }
.final-answer { white-space: pre-wrap; line-height: 1.72; }
.final-hash { margin: 20px 0 0; color: var(--muted); font-family: ui-monospace, monospace; font-size: .72rem; overflow-wrap: anywhere; }
.bootstrap-note { margin-top: 24px; }

footer {
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 820px) {
  .hero { padding-top: 64px; }
  .network-stats { grid-template-columns: repeat(2, 1fr); }
  .level-1, .level-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 24px, 1160px); }
  .alpha { display: none; }
  .hero { padding: 48px 0; }
  h1 { font-size: clamp(2.45rem, 14vw, 4.1rem); }
  .request-form { padding: 16px; }
  .form-actions { align-items: stretch; flex-wrap: wrap; }
  .form-actions label { width: 100%; }
  select, button { width: 100%; margin-left: 0; }
  .network-stats, .level-1, .level-2 { grid-template-columns: 1fr; }
  .plan-heading, footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}
