:root {
  color-scheme: light;
  --ink: #14202b;
  --muted: #65727e;
  --paper: #f4f7f8;
  --white: #ffffff;
  --line: #d7e0e3;
  --navy: #0f2234;
  --blue: #1f6aa5;
  --green: #14825f;
  --gold: #bc8a2c;
  --red: #b93232;
  --steel: #eaf0f2;
  --shadow: 0 18px 48px rgba(16, 31, 43, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.52;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.sms-body {
  min-height: 100vh;
  color: var(--white);
  background: var(--navy);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px clamp(18px, 4vw, 54px);
  color: var(--white);
  background: rgba(9, 20, 31, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  font-size: 1.22rem;
  font-weight: 850;
}

.brand-sub {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  min-height: min(84vh, 760px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 18, 28, 0.94) 0%, rgba(7, 18, 28, 0.72) 37%, rgba(7, 18, 28, 0.22) 76%),
    linear-gradient(0deg, rgba(7, 18, 28, 0.64) 0%, rgba(7, 18, 28, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 112px 0 120px;
}

.kicker,
.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .kicker {
  color: #8ce9cb;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(5rem, 16vw, 12rem);
  line-height: 0.78;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.12rem, 2vw, 1.48rem);
}

.hero-actions,
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 820;
  text-decoration: none;
}

.button.primary {
  color: var(--navy);
  background: var(--white);
}

.button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.hero-rail {
  position: absolute;
  z-index: 3;
  right: clamp(18px, 4vw, 54px);
  bottom: 22px;
  left: clamp(18px, 4vw, 54px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-rail article {
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(10, 23, 35, 0.66);
  backdrop-filter: blur(14px);
}

.hero-rail span,
.meta,
.market-card p,
.trade-box p,
.section-note,
.copy p,
.intro p,
.source-card p,
.step span,
.launch-list li,
.footer-inner span {
  color: var(--muted);
}

.hero-rail span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.hero-rail strong {
  display: block;
  color: var(--white);
  font-size: 0.98rem;
}

.band {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 4vw, 54px);
}

.section-inner {
  width: min(1180px, 100%);
  max-width: 100%;
  margin: 0 auto;
}

.intro {
  padding: 36px clamp(18px, 4vw, 54px);
}

.intro-grid,
.method-layout,
.token-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.intro p,
.section-note,
.copy p {
  margin-bottom: 0;
  font-size: 1rem;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.wallet {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wallet span,
.wallet strong,
.wallet button,
.pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--muted);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 780;
}

#backendStatus.is-live {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

#backendStatus.is-file {
  color: #744d00;
  border-color: #ead2a2;
  background: #fff5dd;
}

#backendStatus.is-readonly {
  color: #155d86;
  border-color: #b9d8e8;
  background: #edf7fb;
}

.wallet strong {
  color: var(--green);
}

.wallet button {
  color: var(--blue);
  cursor: pointer;
}

.board-section {
  background: #eef4f5;
}

.market-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
}

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

.market-card,
.trade-box,
.source-card,
.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(16, 31, 43, 0.04);
}

.market-card {
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 15px;
}

.market-card.is-selected {
  border-color: rgba(20, 130, 95, 0.58);
  box-shadow: inset 4px 0 0 var(--green);
}

.market-card button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.market-head,
.probability-row,
.quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-card h3,
.trade-box h3 {
  margin: 8px 0;
}

.market-card p,
.trade-box p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.probability-row {
  margin-top: 12px;
}

.bar {
  flex: 1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8ea;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--gold));
}

.trade-box {
  min-height: 100%;
  padding: 17px;
}

.bucket-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.bucket {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  background: #f8fbfb;
  cursor: pointer;
  text-align: left;
}

.bucket.is-active {
  border-color: rgba(20, 130, 95, 0.58);
  background: #e7f7f1;
}

.bucket span,
.bucket strong {
  display: block;
}

.bucket span {
  color: var(--muted);
  font-size: 0.76rem;
}

.bucket strong {
  margin-top: 8px;
  font-size: 1.08rem;
}

.quote-row {
  align-items: start;
  margin: 14px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f4f8f8;
}

.quote-row input {
  width: 110px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  color: var(--ink);
  background: var(--white);
}

.trade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trade-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--blue);
  background: #edf5fb;
  font-weight: 820;
  cursor: pointer;
}

.trade-actions button.primary {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.source-band,
.build-band {
  background: var(--white);
}

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

.source-card {
  min-height: 250px;
  padding: 18px;
}

.source-card span {
  display: block;
  margin-bottom: 38px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.source-card a,
.text-link {
  color: #155d86;
  font-weight: 850;
  text-decoration: none;
  border-bottom: 1px solid rgba(21, 93, 134, 0.34);
}

.method-band {
  color: var(--white);
  background: var(--navy);
}

.method-band .eyebrow {
  color: #8ce9cb;
}

.method-band .section-note {
  color: rgba(255, 255, 255, 0.74);
}

.wide {
  max-width: 620px;
}

.workflow {
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  color: var(--ink);
}

.step strong {
  color: var(--green);
}

.token-band {
  background: #f7fafb;
}

.copy {
  border-left: 4px solid var(--green);
  padding-left: 20px;
}

.actions-row {
  margin-top: 16px;
}

.launch-list {
  max-width: 960px;
  margin: 0;
  padding-left: 22px;
}

.launch-list li {
  padding: 11px 0;
  font-size: 1.02rem;
}

footer {
  padding: 24px clamp(18px, 4vw, 54px) 32px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.sms-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.sms-card {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.sms-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
}

.sms-copy {
  padding: 20px;
}

.sms-copy h1 {
  margin-bottom: 10px;
  font-size: clamp(4.4rem, 24vw, 7.4rem);
}

.sms-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 70px;
  }

  .hero-rail,
  .market-layout,
  .intro-grid,
  .method-layout,
  .token-layout {
    grid-template-columns: 1fr;
  }

  .section-title {
    display: block;
  }

  .wallet {
    justify-content: flex-start;
    margin-top: 16px;
  }

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

@media (max-width: 640px) {
  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  nav {
    gap: 9px 13px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: 780px;
  }

  .hero-content {
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    padding-bottom: 250px;
  }

  .lead {
    max-width: 100%;
    font-size: 1.08rem;
    line-height: 1.5;
  }

  h1 {
    font-size: 5.2rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .button,
  .wallet span,
  .wallet strong,
  .wallet button {
    width: 100%;
  }

  .hero-rail,
  .bucket-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .quote-row,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-content,
  .section-inner {
    width: min(358px, calc(100% - 32px));
    max-width: min(358px, calc(100% - 32px));
    margin-left: 16px;
    margin-right: auto;
  }

  .hero-rail {
    right: auto;
    left: 16px;
    width: min(358px, calc(100% - 32px));
    max-width: min(358px, calc(100% - 32px));
  }

  .section,
  .intro {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lead,
  .intro p,
  .copy p,
  .section-note,
  .launch-list li {
    max-width: 100%;
  }
}
