:root {
  --blue: #0052D9;
  --ink: #171b24;
  --muted: #5f6675;
  --line: #e1e6ee;
  --soft: #f8fbff;
  --white: #fff;
  --green: #07865f;
  --code: #101828;
}

* { box-sizing: border-box; }

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

a { color: inherit; }

.topbar {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px 22px;
  border-bottom: 0;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: visible;
}

.top-tabs {
  width: min(560px, 100%);
  min-width: 0;
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  min-height: 58px;
  padding: 0 12px;
  border: 1px solid rgba(0, 82, 217, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow:
    0 16px 34px rgba(0, 82, 217, .10),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(17, 27, 44, .05);
}

.top-tabs::-webkit-scrollbar {
  display: none;
}

.top-tabs a {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #a5abb4;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.top-tabs a span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.top-tabs a i {
  line-height: 1;
}

.top-tabs a:hover {
  color: var(--blue);
  background: #eef4ff;
}

.top-tabs a.is-active {
  color: #fff;
  background: var(--blue);
  transform: translateY(11px) scale(1.18);
  box-shadow:
    0 14px 28px rgba(0, 82, 217, .28),
    0 0 0 8px #fff,
    0 0 0 10px rgba(0, 82, 217, .10);
  z-index: 2;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 20px 28px;
}

.hero {
  text-align: center;
  padding: 22px 0 34px;
  border-bottom: 1px solid var(--line);
}

.hero-logo {
  width: 82px;
  height: 82px;
  display: block;
  margin: 0 auto 16px;
}

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

h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12;
  margin: 0 auto;
  max-width: 760px;
  letter-spacing: 0;
}

.lede {
  color: var(--muted);
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.72;
  max-width: 720px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}

.hero-stats span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 7px;
  vertical-align: 2px;
}

.hero-url {
  margin: 20px auto 0;
  max-width: 700px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
}

.hero-url span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.primary-action,
.ghost-action {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-action {
  color: var(--white);
  background: var(--blue);
}

.ghost-action {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

code {
  display: block;
  color: var(--code);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  overflow-x: auto;
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.content-shell {
  padding-top: 24px;
}

.content {
  min-height: 420px;
  transition: opacity .18s ease, transform .18s ease;
}

.content.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
}

.section-title span {
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tile,
.wide {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: var(--white);
}

.tile img {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 14px;
}

.tile h3,
.wide h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.tile p,
.wide p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.content-section {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.content-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.content-section h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.content-section p {
  color: var(--muted);
  line-height: 1.68;
  margin: 0 0 14px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.mini-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.metric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.code-stack {
  display: grid;
  gap: 10px;
}

.label-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

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

.resource-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.resource-row strong {
  font-size: 14px;
}

.detail-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  border-top: 1px solid var(--line);
}

.detail-row:first-child {
  border-top: 0;
}

.detail-row span {
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--line);
}

.detail-row span:first-child {
  border-left: 0;
  color: var(--ink);
  font-weight: 750;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f7f1;
  color: var(--green);
  font-weight: 800;
  font-size: 12px;
  margin-left: 8px;
}

.footer {
  max-width: 980px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 18px 20px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.footer-icp {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.footer-icp:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .topbar {
    min-height: 86px;
    padding: 14px 14px 18px;
  }

  .top-tabs {
    width: 100%;
    flex: 0 0 auto;
    overflow-x: auto;
    justify-content: flex-start;
    min-height: 52px;
    padding: 0 10px;
  }

  .top-tabs a {
    width: 48px;
    height: 48px;
    font-size: 19px;
  }

  .top-tabs a.is-active {
    transform: translateY(10px) scale(1.14);
    box-shadow:
      0 10px 22px rgba(0, 82, 217, .26),
      0 0 0 7px #fff,
      0 0 0 9px rgba(0, 82, 217, .10);
  }

  main {
    padding: 24px 16px;
  }

  .hero {
    text-align: left;
    padding-top: 20px;
  }

  .hero-logo {
    margin-left: 0;
    margin-right: 0;
    width: 76px;
    height: 76px;
  }

  .hero-stats {
    justify-content: flex-start;
    gap: 10px 18px;
  }

  .hero-url {
    grid-template-columns: 1fr;
  }

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

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .resource-row {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
  }

  .detail-row span {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-row span:first-child {
    border-top: 0;
  }

  .section-title {
    display: block;
  }

  .section-title span {
    display: block;
    margin-top: 6px;
  }

  .footer {
    flex-direction: column;
  }
}
