:root {
  --blue: #0052ff;
  --blue-dark: #003ec7;
  --ink: #0a0b0d;
  --muted: #5f6c84;
  --line: #dce3ef;
  --surface: #ffffff;
  --soft: #f3f7ff;
  --green: #14804a;
  --green-soft: #e8f7ef;
  --red: #c93636;
  --red-soft: #fff0f0;
  --shadow: 0 24px 70px rgba(37, 86, 166, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 77% 34%, rgba(0, 82, 255, 0.14), transparent 34%),
    linear-gradient(135deg, #fbfcff 0%, #eef5ff 54%, #dcecff 100%);
  font-family: "Inter", Arial, sans-serif;
  letter-spacing: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

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

.background-mark {
  position: absolute;
  top: 145px;
  left: -210px;
  display: grid;
  place-items: center;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  color: rgba(0, 82, 255, 0.09);
  background: rgba(0, 82, 255, 0.055);
  pointer-events: none;
}

.background-mark span {
  position: relative;
  top: -72px;
  left: 76px;
  font-size: 390px;
  font-weight: 800;
  line-height: 1;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--blue);
  font-size: 24px;
  font-weight: 750;
}

.brand-mark,
.token-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
  padding-bottom: 10px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #16213b;
  font-weight: 600;
}

.developer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 15px;
  border-radius: 7px;
  color: #34425d;
  font-size: 13px;
}

.developer-link strong {
  color: var(--blue);
}

.developer-link:hover {
  background: rgba(255, 255, 255, 0.62);
}

.header-button {
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 26px rgba(45, 76, 125, 0.08);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1050px, calc(100% - 40px));
  margin: 68px auto 0;
  text-align: center;
}

.hero-copy {
  max-width: 750px;
}

.eyebrow,
.panel-kicker,
.card-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.03;
}

.hero-copy > p {
  margin: 0 auto;
  max-width: 670px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
}

.checker-form {
  width: min(790px, 100%);
  margin: 34px auto 22px;
  text-align: left;
}

.checker-form > label {
  display: block;
  margin: 0 0 8px 3px;
  color: #34425d;
  font-size: 13px;
  font-weight: 700;
}

.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 15px 45px rgba(46, 80, 137, 0.12);
}

.address-row input {
  min-width: 0;
  padding: 13px 15px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: "Inter", monospace;
}

.address-row:focus-within {
  outline: 3px solid rgba(0, 82, 255, 0.16);
  border-color: rgba(0, 82, 255, 0.4);
}

.address-row button,
.primary-action {
  border: 0;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.address-row button {
  padding: 13px 22px;
  border-radius: 6px;
}

.address-row button:hover,
.primary-action:hover {
  background: var(--blue-dark);
}

.address-row button:disabled,
.primary-action:disabled {
  opacity: 0.68;
  cursor: wait;
}

.checker-form > p {
  margin: 9px 4px 0;
  color: #71809a;
  font-size: 12px;
}

.allocation-card {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  width: 100%;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: left;
}

.allocation-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  padding: 38px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.card-label {
  margin-bottom: 25px;
  color: #64718a;
}

.token-mark {
  width: 82px;
  height: 82px;
  margin-bottom: 21px;
  border-radius: 50%;
  font-size: 50px;
  padding-bottom: 19px;
  box-shadow: 0 12px 30px rgba(0, 82, 255, 0.24);
}

#token-output {
  font-size: 55px;
  line-height: 1;
}

.token-symbol {
  margin-top: 9px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 650;
}

#range-output {
  margin: 14px 0 0;
  color: #76839a;
  font-size: 13px;
}

.allocation-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 44px;
}

.detail-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 73px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: #53647f;
  border: 1.5px solid #8794a9;
  border-radius: 50%;
  font-weight: 700;
}

.detail-row strong {
  max-width: 230px;
  overflow-wrap: anywhere;
  color: var(--ink);
  text-align: right;
}

.status-pill {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.status-pill.neutral {
  color: #59677d;
  background: #eef1f5;
}

.status-pill.starter {
  color: #875600;
  background: #fff3d2;
}

.status-pill.active,
.status-pill.power {
  color: var(--green);
  background: var(--green-soft);
}

.primary-action {
  width: min(720px, calc(100% - 70px));
  margin-top: 34px;
  padding: 20px 28px;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(0, 82, 255, 0.22);
  font-size: 20px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  color: #6b7891;
  font-size: 13px;
}

.status-line p {
  margin: 0;
}

.status-line.success {
  color: var(--green);
}

.status-line.error {
  color: var(--red);
}

.lock-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.insights,
.model-section {
  width: min(1180px, calc(100% - 40px));
  margin: 110px auto 0;
}

.section-intro {
  max-width: 620px;
  margin-bottom: 32px;
}

.section-intro h2 {
  margin: 8px 0 10px;
  font-size: 34px;
}

.section-intro p {
  color: var(--muted);
  line-height: 1.65;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 20px;
}

.panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.83);
  box-shadow: 0 16px 48px rgba(35, 71, 127, 0.09);
  backdrop-filter: blur(12px);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.panel-heading h3 {
  margin: 5px 0 0;
  font-size: 22px;
}

.outbound-links {
  display: flex;
  gap: 8px;
}

.outbound-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.metric-grid article {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 103px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.metric-grid article:nth-child(2n) {
  border-right: 0;
}

.metric-grid article:nth-child(n + 3) {
  border-bottom: 0;
}

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

.metric-grid strong {
  font-size: 22px;
}

.score-breakdown {
  margin-top: 24px;
}

.verification-note {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  line-height: 1.6;
}

.breakdown-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
}

.breakdown-bars {
  display: grid;
  gap: 12px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 118px minmax(80px, 1fr) 46px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5eaf2;
}

.bar-fill {
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.breakdown-row strong {
  color: var(--ink);
  text-align: right;
}

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

.source-list {
  display: grid;
}

.source-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.source-row:last-child {
  border-bottom: 0;
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.source-dot.waiting {
  background: #aeb7c6;
}

.source-dot.live {
  background: #19a661;
  box-shadow: 0 0 0 4px rgba(25, 166, 97, 0.11);
}

.source-dot.failed {
  background: #e24848;
}

.source-row div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.source-row small,
.source-row > span:last-child,
.source-note {
  color: var(--muted);
  font-size: 11px;
}

.source-row > span:last-child {
  font-weight: 700;
}

.source-note {
  margin: 20px 0 0;
  padding: 15px;
  border-radius: 6px;
  background: var(--soft);
  line-height: 1.55;
}

.model-section {
  margin-top: 80px;
}

.section-intro.compact {
  margin-bottom: 22px;
}

.model-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 42px rgba(35, 71, 127, 0.08);
}

.model-controls label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.model-controls label:last-child {
  border-right: 0;
}

.model-controls select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.model-controls select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  width: min(1180px, calc(100% - 40px));
  margin: 70px auto 0;
  padding: 26px 0 40px;
  border-top: 1px solid rgba(112, 134, 170, 0.24);
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--blue);
  font-weight: 700;
}

@media (max-width: 850px) {
  .hero {
    margin-top: 38px;
  }

  .allocation-card,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .allocation-primary {
    min-height: 320px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .allocation-details {
    padding: 18px 30px;
  }

  .model-controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .model-controls label:nth-child(2) {
    border-right: 0;
  }

  .model-controls label:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .site-header {
    width: calc(100% - 30px);
    padding: 18px 0;
  }

  .brand {
    gap: 9px;
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .site-header nav {
    gap: 13px;
    font-size: 13px;
  }

  .developer-link {
    padding: 9px 8px;
  }

  .developer-link > span:first-child {
    display: none;
  }

  .header-button {
    display: none;
  }

  .background-mark {
    top: 180px;
    left: -235px;
    width: 500px;
    height: 500px;
  }

  .background-mark span {
    top: -53px;
    left: 82px;
    font-size: 290px;
  }

  .hero,
  .insights,
  .model-section {
    width: calc(100% - 24px);
  }

  h1 {
    max-width: 100%;
    font-size: 37px;
    overflow-wrap: break-word;
  }

  .hero-copy > p {
    font-size: 17px;
  }

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

  .address-row button {
    width: 100%;
  }

  .allocation-primary {
    min-height: 300px;
    padding: 30px 20px;
  }

  #token-output {
    font-size: 46px;
  }

  .allocation-details {
    padding: 12px 20px;
  }

  .detail-row {
    grid-template-columns: 28px minmax(0, 1fr) minmax(80px, auto);
    min-height: 67px;
    font-size: 13px;
  }

  .primary-action {
    width: 100%;
    margin-top: 22px;
  }

  .status-line {
    align-items: flex-start;
    padding: 12px 4px;
    text-align: left;
    line-height: 1.5;
  }

  .insights {
    margin-top: 75px;
  }

  .section-intro h2 {
    font-size: 28px;
  }

  .panel {
    padding: 20px 16px;
  }

  .panel-heading {
    flex-direction: column;
  }

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

  .metric-grid article:nth-child(2n) {
    border-right: 0;
  }

  .metric-grid article:nth-child(n + 3) {
    border-bottom: 0;
  }

  .breakdown-row {
    grid-template-columns: 96px minmax(70px, 1fr) 42px;
    gap: 8px;
  }

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

  .model-controls label {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .model-controls label:last-child {
    border-bottom: 0;
  }

  footer {
    flex-direction: column;
    margin-top: 50px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .allocation-card,
  .checker-form,
  .hero-copy {
    animation: rise 520ms ease both;
  }

  .allocation-card {
    animation-delay: 120ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
