:root {
  --paper: #f7f7f5;
  --paper-strong: #ffffff;
  --ink: #110e08;
  --muted: #65655f;
  --faint: #989890;
  --rule: #171715;
  --rule-soft: #cecec6;
  --buy: #ccff00;
  --buy-deep: #b3d000;
  --halt: #cf332d;
  --sans: "Hanken Grotesk", Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --page: min(1440px, calc(100% - 64px));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  letter-spacing: 0;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  min-height: 100svh;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(8, 8, 8, 0.05) calc(100% - 1px)) 0 0 / 80px 100%,
    var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--buy);
  color: var(--ink);
}

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

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
  background: none;
}

:focus-visible {
  outline: 3px solid var(--halt);
  outline-offset: 3px;
}

.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,
main,
footer {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgba(247, 247, 243, 0.96);
}

.header-line {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule-soft);
}

.brand {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
}

.chain {
  color: var(--muted);
  font-size: 11px;
}

.site-header nav {
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  font-size: 11px;
  text-transform: uppercase;
}

.site-header nav a {
  padding-block: 16px;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

.intro {
  min-height: 342px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 72px;
  align-items: end;
  padding: 62px 32px 48px;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 760px;
  font-family: var(--sans);
  font-size: 112px;
  font-weight: 800;
  line-height: 0.82;
  text-transform: uppercase;
}

.intro-brief {
  padding-bottom: 6px;
}

.brief-lead {
  max-width: 490px;
  margin-bottom: 24px;
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}

.live-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.live-strip span {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 14px;
  border-right: 1px solid var(--rule-soft);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.live-strip span:first-child {
  padding-left: 0;
}

.live-strip span:last-child {
  border-right: 0;
}

.live-strip b {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 23px;
  line-height: 1;
}

.brief-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.board {
  border-bottom: 1px solid var(--rule);
}

.board-controls {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) 190px 52px;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}

.amount-control {
  display: flex;
  align-items: stretch;
  border-right: 1px solid var(--rule);
}

.amount-control > span {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--muted);
  font-size: 10px;
}

.amount-control button {
  min-width: 65px;
  padding: 0 14px;
  border-left: 1px solid var(--rule-soft);
  font-weight: 600;
}

.amount-control button:hover,
.amount-control button.active {
  background: var(--buy);
}

.search-control,
.filter-control {
  position: relative;
  display: flex;
  align-items: center;
}

.search-control {
  border-right: 1px solid var(--rule);
}

.search-control i {
  position: absolute;
  left: 18px;
  font-size: 18px;
}

.search-control input {
  width: 100%;
  height: 100%;
  padding: 0 18px 0 48px;
  border: 0;
  background: transparent;
  outline: 0;
}

.search-control input::placeholder {
  color: var(--faint);
}

.filter-control {
  border-right: 1px solid var(--rule);
}

.filter-control select {
  width: 100%;
  height: 100%;
  padding: 0 42px 0 16px;
  border: 0;
  appearance: none;
  background: transparent;
  outline: 0;
  font-size: 11px;
  text-transform: uppercase;
}

.filter-control i {
  position: absolute;
  right: 16px;
  pointer-events: none;
}

.refresh-control {
  display: grid;
  place-items: center;
  font-size: 19px;
}

.refresh-control:hover {
  background: var(--ink);
  color: var(--buy);
}

.refresh-control.loading i {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.board-key {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 0 14px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.board-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.board-key b {
  color: var(--ink);
}

.board-key time {
  margin-left: auto;
}

.state-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.state-dot.on { background: var(--buy); }
.state-dot.thin { background: var(--halt); }
.state-dot.unknown { background: var(--faint); }

.route-head,
.route-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) minmax(160px, 1.05fr) 90px 115px minmax(150px, 0.9fr) 115px 100px;
}

.route-head {
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.route-head span,
.route-row > * {
  padding-inline: 14px;
}

.route-row {
  position: relative;
  min-height: 88px;
  align-items: center;
  border-bottom: 1px solid var(--rule-soft);
  background: rgba(247, 247, 243, 0.82);
}

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

.route-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--faint);
}

.route-row[data-state="on"]::before { background: var(--buy-deep); }
.route-row[data-state="thin"]::before { background: var(--halt); }
.route-row:hover { background: var(--paper-strong); }

.route-community {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.token-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--paper-strong);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
}

.route-row[data-state="on"] .token-mark { box-shadow: inset 0 -6px 0 var(--buy); }
.route-row[data-state="thin"] .token-mark { box-shadow: inset 0 -6px 0 var(--halt); }

.community-name {
  min-width: 0;
}

.community-name strong {
  display: block;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-name span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.community-name .official { color: var(--buy-deep); }

.metric {
  min-width: 0;
}

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

.metric strong {
  overflow: hidden;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.route-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.route-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.route-actions a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 17px;
}

.route-actions a:hover {
  background: var(--ink);
  color: var(--buy);
}

.route-actions a.disabled {
  pointer-events: none;
  opacity: 0.3;
}

.row-loading {
  min-height: 88px;
  display: grid;
  grid-template-columns: 44px 240px 1fr;
  gap: 14px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--rule-soft);
}

.row-loading i,
.row-loading span {
  display: block;
  height: 12px;
  background: linear-gradient(90deg, #deded7, #f4f4ef, #deded7) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.row-loading i {
  width: 44px;
  height: 44px;
}

.row-loading span:nth-child(2) { max-width: 240px; }

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.empty-state {
  padding: 48px 14px;
  color: var(--muted);
  text-align: center;
}

.embed-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.72fr);
  gap: 80px;
  align-items: center;
  padding: 78px 32px;
  border-bottom: 1px solid var(--rule);
}

.section-copy h2,
.policy h2 {
  max-width: 700px;
  font-family: var(--sans);
  font-size: 66px;
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.section-copy > p:not(.kicker) {
  max-width: 660px;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.25;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.section-actions a:first-child {
  padding-bottom: 5px;
  border-bottom: 2px solid var(--ink);
}

.embed-preview {
  border: 1px solid var(--rule);
  background: var(--ink);
}

.preview-label {
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #343432;
  color: #a7a7a0;
  font-size: 9px;
}

.embed-preview iframe {
  width: 100%;
  height: 360px;
  display: block;
  border: 0;
}

.policy {
  padding: 72px 32px 88px;
  border-bottom: 1px solid var(--rule);
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 46px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.policy-grid p {
  min-height: 150px;
  padding: 20px 22px;
  border-right: 1px solid var(--rule-soft);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.25;
}

.policy-grid p:first-child { padding-left: 0; }
.policy-grid p:last-child { border-right: 0; }
.policy-grid b {
  display: block;
  margin-bottom: 16px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
}

footer {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1180px) {
  :root { --page: calc(100% - 32px); }
  .intro { gap: 40px; padding-inline: 16px; }
  .intro h1 { font-size: 88px; }
  .route-head,
  .route-row {
    grid-template-columns: minmax(230px, 1.45fr) minmax(150px, 1fr) 82px 105px minmax(140px, 0.9fr) 96px 92px;
  }
  .board-controls { grid-template-columns: 1fr 1fr 180px 52px; }
  .amount-control > span { display: none; }
  .amount-control button { flex: 1; }
}

@media (max-width: 900px) {
  :root { --page: 100%; }
  body { background: var(--paper); }
  .site-header { padding-inline: 16px; }
  .site-header nav { justify-content: flex-start; gap: 20px; overflow-x: auto; }
  .intro {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding: 48px 20px 38px;
  }
  .intro h1 { font-size: 74px; }
  .brief-lead { font-size: 23px; }
  .board-controls {
    grid-template-columns: 1fr 52px;
  }
  .amount-control {
    grid-column: 1 / -1;
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .search-control { min-height: 58px; }
  .filter-control { display: none; }
  .board-key { overflow-x: auto; white-space: nowrap; }
  .board-key { scrollbar-width: none; }
  .board-key::-webkit-scrollbar { display: none; }
  .board-key time { display: none; }
  .route-head { display: none; }
  .route-row {
    min-height: 154px;
    grid-template-columns: minmax(0, 1fr) 110px 86px;
    grid-template-areas:
      "community community actions"
      "path output output"
      "fee cost depth";
    gap: 13px 0;
    padding-block: 16px;
  }
  .route-community { grid-area: community; }
  .route-path { grid-area: path; }
  .route-fee { grid-area: fee; }
  .route-cost { grid-area: cost; }
  .route-output { grid-area: output; text-align: right; }
  .route-depth { grid-area: depth; text-align: right; }
  .route-actions { grid-area: actions; }
  .route-row > * { padding-inline: 14px; }
  .embed-section {
    grid-template-columns: 1fr;
    gap: 46px;
    padding: 64px 20px;
  }
  .section-copy h2,
  .policy h2 { font-size: 52px; }
  .policy { padding: 64px 20px; }
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .policy-grid p:nth-child(2) { border-right: 0; }
  .policy-grid p:nth-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
  footer { padding-inline: 20px; }
}

@media (max-width: 560px) {
  .chain { font-size: 9px; }
  .site-header nav { gap: 17px; }
  .site-header nav a { font-size: 9px; }
  .intro h1 { font-size: 50px; }
  .live-strip span { padding-inline: 8px; }
  .live-strip span:first-child { padding-left: 0; }
  .live-strip b { font-size: 19px; }
  .board-key { gap: 18px; }
  .route-row {
    grid-template-columns: minmax(0, 1fr) 94px 75px;
  }
  .token-mark { width: 40px; height: 40px; }
  .route-community { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .community-name strong { font-size: 16px; }
  .route-actions a { width: 34px; height: 34px; }
  .section-copy h2,
  .policy h2 { font-size: 39px; }
  .embed-preview iframe { height: 380px; }
  .policy-grid { grid-template-columns: 1fr; }
  .policy-grid p,
  .policy-grid p:first-child {
    min-height: 0;
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule-soft);
  }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
}

@media (max-width: 400px) {
  .intro h1 { font-size: 47px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
