:root {
  --paper: #f7f8f3;
  --ink: #151511;
  --muted: #666a63;
  --line: #d9ddd2;
  --card: rgba(255, 255, 252, 0.88);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.project-page {
  width: min(980px, calc(100% - 34px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.project-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.back-link:hover,
.back-link:focus-visible {
  border-bottom-color: rgba(21, 21, 17, 0.28);
  outline: none;
}

.project-name {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 0.94;
}

.project-summary {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.project-panel {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 16px 42px rgba(20, 26, 18, 0.08);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.panel-title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-status {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.panel-body {
  padding: 18px;
}

.ai-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.56);
  padding: 14px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.spectrum {
  height: 50px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(46, 141, 114, 0.26), rgba(127, 85, 199, 0.26)),
    rgba(255, 255, 255, 0.58);
  position: relative;
}

.needle {
  position: absolute;
  top: -6px;
  width: 2px;
  height: 62px;
  border-radius: 2px;
  background: #7058d6;
  transition: left 320ms var(--ease);
}

.ai-labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.choices {
  display: grid;
  gap: 8px;
}

.choices button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease);
}

.choices button:hover {
  transform: translateY(-1px);
}

.choices button.is-selected {
  border-color: rgba(112, 88, 214, 0.55);
  background: rgba(112, 88, 214, 0.08);
}

.result-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #5e46c8;
  border: 1px solid rgba(112, 88, 214, 0.3);
  background: rgba(112, 88, 214, 0.11);
}

.chain-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.chain-toolbar input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #ffffff;
}

.chain-feed {
  display: grid;
  gap: 8px;
}

.tx-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
}

.tx-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #3f7fca;
  font-size: 12px;
}

.tx-msg {
  color: var(--ink);
  font-size: 14px;
}

.tx-time {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .project-page {
    width: min(560px, calc(100% - 22px));
    padding-top: 26px;
  }

  .project-top {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .project-summary {
    font-size: 15px;
  }

  .panel-body {
    padding: 12px;
  }

  .ai-layout {
    grid-template-columns: 1fr;
  }

  .tx-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
