:root {
  color-scheme: light;
  --bg: #f8faf9;
  --panel: #ffffff;
  --ink: #111816;
  --muted: #66706c;
  --line: #dfe6e3;
  --blue: #286ef0;
  --green: #20a46b;
  --soft-blue: #edf4ff;
  --soft-green: #edf8f2;
  --shadow: 0 24px 70px rgba(17, 24, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(40, 110, 240, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42rem);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(223, 230, 227, 0.78);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(17, 24, 22, 0.2);
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(17, 24, 22, 0.18) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(17, 24, 22, 0.18) 45% 55%, transparent 55%),
    var(--soft-green);
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover,
.site-footer a:hover,
.chat-topbar a:hover,
.card-header a:hover {
  color: var(--blue);
}

main {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.chat-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-content: center;
  gap: 34px;
  padding: 54px 0 72px;
}

.hero-copy {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.hero-text {
  margin: 0 auto;
  max-width: 590px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.chat-shell,
.updates-card,
.runtime-card,
.token-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.chat-shell {
  overflow: hidden;
}

.chat-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.chat-label {
  margin-bottom: 3px;
  font-weight: 750;
}

.chat-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-status span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
}

.chat-topbar a,
.card-header a {
  color: var(--muted);
  font-size: 14px;
}

.chat-log {
  min-height: 260px;
  max-height: 410px;
  overflow: auto;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(17, 24, 22, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 22, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.message {
  display: flex;
  gap: 14px;
  max-width: 820px;
  margin-bottom: 18px;
}

.message p {
  margin-bottom: 10px;
  color: #2c3531;
  line-height: 1.6;
}

.user-message {
  margin-left: auto;
  flex-direction: row-reverse;
}

.user-message p {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--soft-blue);
}

.avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-weight: 800;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-row a,
.prompt-row button,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.source-row a {
  padding: 8px 11px;
}

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px 18px;
}

.prompt-row button {
  padding: 9px 13px;
}

.prompt-row button:hover,
.source-row a:hover {
  border-color: rgba(40, 110, 240, 0.32);
  color: var(--blue);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-form input {
  min-width: 0;
  padding: 16px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.chat-form button,
.wallet-row button,
.trade-actions button,
.chip-help {
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
}

.chat-form button {
  padding: 0 20px;
}

.pds-section,
.options-section,
.content-grid,
.token-section {
  margin: 80px 0;
  scroll-margin-top: 96px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading > p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.65;
}

.pds-board {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
}

.pds-lead,
.pds-stack article,
.pds-map article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pds-lead {
  min-height: 340px;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(17, 24, 22, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 22, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 36px 36px;
}

.pds-lead h3 {
  max-width: 680px;
  margin: 16px 0 16px;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.02;
}

.pds-lead p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.7;
}

.label {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pds-stack {
  display: grid;
  gap: 12px;
}

.pds-stack article {
  min-height: 104px;
  padding: 18px;
}

.pds-stack strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 24px;
  line-height: 1;
}

.pds-stack p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pds-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.pds-map article {
  padding: 22px;
}

.pds-map h3 {
  margin-bottom: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
}

.link-list a::after {
  content: "↗";
  color: var(--muted);
  font-weight: 600;
}

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

.option-card,
.diagnosis-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.option-card {
  display: grid;
  align-content: start;
  min-height: 430px;
  padding: 24px;
}

.featured-option {
  background:
    linear-gradient(135deg, rgba(40, 110, 240, 0.08), transparent 34%),
    #fff;
  border-color: rgba(40, 110, 240, 0.22);
}

.option-kicker {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.option-card h3 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.03;
}

.option-card p {
  color: var(--muted);
  line-height: 1.65;
}

.option-card ul {
  display: grid;
  gap: 10px;
  margin: 12px 0 24px;
  padding: 0;
  list-style: none;
}

.option-card li {
  position: relative;
  padding-left: 18px;
  color: #2c3531;
  line-height: 1.5;
}

.option-card li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.option-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin-top: auto;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
}

.featured-option a {
  background: var(--blue);
}

.diagnosis-panel {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  margin-top: 16px;
  padding: 24px;
}

.diagnosis-panel h3 {
  font-size: 24px;
  line-height: 1.12;
}

.diagnosis-panel p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.content-grid .section-heading {
  grid-column: 1 / -1;
}

.updates-card,
runtime-card {
  padding: 22px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.post-card {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.post-card p {
  margin-bottom: 8px;
  line-height: 1.55;
}

.post-card span,
.quiet-copy,
.disclaimer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pill {
  padding: 6px 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-grid div {
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.metric-grid strong,
.metric-grid span {
  display: block;
}

.metric-grid strong {
  margin-bottom: 8px;
  font-size: 26px;
}

.metric-grid span {
  color: var(--muted);
  font-size: 13px;
}

.quiet-copy {
  margin: 16px 0 0;
}

.token-section {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 22px;
  padding: 28px;
}

.token-copy {
  align-self: center;
}

.token-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.trade-panel {
  display: grid;
  gap: 14px;
}

.wallet-row,
.trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet-row button,
.trade-actions button,
.chip-help {
  min-height: 46px;
}

.wallet-row .secondary,
.trade-actions button:first-child,
.chip-help {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.chart-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(17, 24, 22, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 22, 0.045) 1px, transparent 1px),
    #fbfcfc;
  background-size: 38px 38px;
}

.chart-line {
  position: absolute;
  inset: 46px 28px 45px;
  border-bottom: 3px solid var(--green);
  border-radius: 50%;
  transform: skewY(-8deg);
}

.chart-bars {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  height: 48px;
}

.chart-bars span {
  width: 8%;
  border-radius: 3px 3px 0 0;
  background: rgba(32, 164, 107, 0.22);
}

.chart-bars span:nth-child(2n) {
  height: 60%;
}

.chart-bars span:nth-child(2n + 1) {
  height: 38%;
}

.chart-bars span:nth-child(4),
.chart-bars span:nth-child(8) {
  height: 88%;
}

.trade-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--bg);
}

.tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.tabs .active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(17, 24, 22, 0.08);
}

.trade-box label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.amount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.amount-row input {
  min-width: 0;
  padding: 13px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.amount-row span {
  padding-right: 13px;
  color: var(--muted);
  font-weight: 800;
}

.chip-help {
  width: 100%;
}

.site-footer {
  justify-content: space-between;
  width: min(1180px, 90vw);
  min-height: 86px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 850px) {
  .site-header {
    padding: 0 20px;
  }

  .nav-links {
    gap: 12px;
    font-size: 13px;
  }

  main,
  .site-footer {
    width: min(100% - 32px, 1180px);
  }

  .chat-hero {
    padding-top: 36px;
  }

  .chat-topbar,
  .content-grid,
  .token-section,
  .site-footer {
    display: block;
  }

  .chat-topbar a {
    display: inline-block;
    margin-top: 10px;
  }

  .pds-board,
  .pds-map,
  .option-grid,
  .diagnosis-panel,
  .metric-grid,
  .wallet-row,
  .trade-actions {
    grid-template-columns: 1fr;
  }

  .updates-card,
  .runtime-card,
  .token-copy {
    margin-bottom: 16px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form button {
    min-height: 48px;
  }

  .site-footer {
    padding: 24px 0;
  }

  .site-footer a {
    display: block;
    margin-top: 8px;
  }
}
