/* HALLMARK v5 — THE COLLATERAL ASSAY
   An asset enters, receives a policy mark, and exits as hmUSD capacity.
   The system borrows the reference's confidence, rhythm, and responsive
   transformation — never its identity, artwork, copy, or section structure. */

@font-face {
  font-family: 'Hallmark Sans';
  src: url('/assets/fonts/plexsans-var.woff2') format('woff2-variations'),
       url('/assets/fonts/plexsans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hallmark Display';
  src: url('/assets/fonts/plexcond-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hallmark Display';
  src: url('/assets/fonts/plexcond-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hallmark Mono';
  src: url('/assets/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hallmark Mono';
  src: url('/assets/fonts/plexmono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hallmark Mono';
  src: url('/assets/fonts/plexmono-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #090A0F;
  --ink-2: #12141B;
  --ink-3: #1C1F28;
  --paper: #F2F5FF;
  --paper-2: #DCE2F2;
  --muted: #9CA5B8;
  --muted-2: #667084;
  --line: #303540;
  --line-soft: #232731;
  --acid: #C7FF3D;
  --acid-2: #A9E51D;
  --violet: #5546FF;
  --violet-2: #3D30D6;
  --warn: #FFB84D;
  --alarm: #FF6257;
  --sans: 'Hallmark Sans', 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --display: 'Hallmark Display', 'IBM Plex Sans Condensed', 'Hallmark Sans', Arial, sans-serif;
  --mono: 'Hallmark Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --page: 1460px;
  --gutter: clamp(15px, 3vw, 42px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-size: 32px 32px;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 72vh);
  mask-image: linear-gradient(to bottom, #000, transparent 72vh);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.018em;
}
p { margin: 0 0 1em; }
a { color: inherit; }
b, strong { font-weight: 600; }
button {
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--acid);
  font-family: var(--mono);
  font-size: 12px;
}
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

.reg {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* Header: compact utilitarian rail against the oversized page language. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  min-height: 70px;
  padding: 10px var(--gutter);
  background: rgba(9, 10, 15, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}
.brand img { display: block; }
.brand-lockup { display: grid; gap: 3px; min-width: 0; }
.brand-word {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .015em;
  line-height: .9;
}
.brand-sub {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.1vw, 32px);
}
.nav-link {
  position: relative;
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 3px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-link:hover { color: var(--paper); }
.nav-link.is-active { color: var(--paper); }
.nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }
.header-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.chain-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--ink-2);
  font-size: 11px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.chain-chip b { color: var(--paper); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.live-pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--acid);
  border-radius: 50%;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(199,255,61,.6); }
  75%, 100% { box-shadow: 0 0 0 8px rgba(199,255,61,0); }
}
.connect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 17px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--acid);
  font-size: 13.5px;
  font-weight: 650;
  transition: background .2s ease, transform .2s var(--ease);
}
.connect-button:hover { background: var(--paper); border-color: var(--paper); transform: translateY(-2px); }
.connect-button i { font-style: normal; }
.connect-button[data-state='connected'] { color: var(--paper); background: var(--ink-2); border-color: var(--line); }
.connect-button[data-state='wrong'] { color: var(--ink); background: var(--warn); border-color: var(--warn); }
.menu-button {
  display: none;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--paper);
  border: 1px solid var(--line);
  background: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
}

/* The telemetry is a ticker-like proof line, not a second dashboard nav. */
.network-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.32fr);
  background: var(--acid);
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.network-strip > div {
  min-width: 0;
  padding: 11px clamp(12px, 2vw, 28px);
  border-right: 1px solid rgba(9,10,15,.35);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.network-strip > div:last-child { border-right: 0; }
.network-strip span {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  opacity: .64;
  white-space: nowrap;
}
.network-strip b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.strip-note { background: var(--paper); }
.strip-note b { color: var(--violet-2); font-size: 10.5px; }

/* Hero: an editorial proposition facing a literal asset-assay stamp. */
main {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: clamp(18px, 2.8vw, 42px) var(--gutter) clamp(72px, 9vw, 132px);
}
.view-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
  gap: clamp(24px, 4.5vw, 72px);
  align-items: stretch;
  min-height: clamp(390px, 48vw, 610px);
  margin-bottom: clamp(18px, 2.4vw, 34px);
  border-bottom: 1px solid var(--line);
  animation: hero-in .75s var(--ease) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-head-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
  padding: clamp(24px, 4vw, 58px) 0 clamp(30px, 4vw, 58px);
}
.view-head-copy::before {
  content: 'H—4663';
  position: absolute;
  top: 2px;
  left: 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 11px;
}
.view-head .kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-head h1 {
  max-width: 11.8ch;
  color: var(--paper);
  font-size: clamp(64px, 7.9vw, 120px);
  font-weight: 700;
  line-height: .83;
  text-wrap: balance;
}
.view-head .lede {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.55;
}

.route-field {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  padding: clamp(18px, 2.5vw, 34px);
  color: var(--ink);
  background: var(--acid);
  border-radius: 0 0 72px 0;
  isolation: isolate;
}
.route-field::before {
  content: 'hm';
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: -52px;
  color: transparent;
  -webkit-text-stroke: 2px rgba(9,10,15,.18);
  font-family: var(--display);
  font-size: clamp(190px, 22vw, 340px);
  font-weight: 700;
  line-height: 1;
}
.route-field::after {
  content: 'ASSET → POLICY → CAPACITY';
  position: absolute;
  right: 22px;
  bottom: 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  writing-mode: vertical-rl;
}
.route-field-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
}
.route-field-head b { color: var(--violet-2); font-family: var(--mono); font-weight: 600; letter-spacing: 0; }
.route-track {
  display: grid;
  grid-template-columns: auto minmax(12px, 1fr) auto minmax(12px, 1fr) auto;
  align-items: start;
  margin: auto 0;
  padding-right: 16px;
}
.route-node {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
  animation: node-in .65s var(--ease) both;
}
.route-node:nth-of-type(3) { animation-delay: .12s; }
.route-node:nth-of-type(5) { animation-delay: .24s; }
@keyframes node-in {
  from { opacity: 0; transform: scale(.72) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
.route-node i {
  display: grid;
  place-items: center;
  width: clamp(36px, 4.2vw, 56px);
  height: clamp(36px, 4.2vw, 56px);
  margin-bottom: 8px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
}
.route-node i::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--ink);
  transform: rotate(45deg);
}
.route-node b { color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.route-node small { color: rgba(9,10,15,.65); font-size: 9.5px; white-space: nowrap; }
.route-node.is-live i { color: var(--paper); background: var(--ink); }
.route-node.is-live i::after { background: var(--acid); }
.route-node.is-output i { border-color: var(--violet); background: var(--violet); }
.route-node.is-output i::after { background: var(--paper); }
.route-node.is-output b { color: var(--violet-2); }
.route-link {
  height: 2px;
  margin-top: clamp(18px, 2.1vw, 28px);
  background: var(--ink);
  transform-origin: left;
  animation: route-grow .8s .35s var(--ease) both;
}
@keyframes route-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.seal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 550;
}
.seal::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.seal[data-tone='verify'] { color: var(--acid); border-color: rgba(199,255,61,.48); }
.seal[data-tone='warn'] { color: var(--warn); border-color: rgba(255,184,77,.5); }
.seal[data-tone='seal'] { color: #AAA3FF; border-color: rgba(85,70,255,.6); }

.grid { display: grid; gap: clamp(12px, 1.4vw, 20px); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.credit { grid-template-columns: minmax(0, 1.4fr) minmax(330px, .82fr); align-items: start; }

/* Cards are editorial blocks with a single exaggerated corner, not a bento kit. */
.card {
  --card-bg: var(--ink-2);
  --card-fg: var(--paper);
  --card-muted: var(--muted);
  --card-line: var(--line);
  min-width: 0;
  overflow: hidden;
  color: var(--card-fg);
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 0 0 30px 0;
  animation: card-in .65s var(--ease) both;
  transition: transform .32s var(--ease), border-color .2s ease;
}
.card:nth-child(2) { animation-delay: .06s; }
.card:nth-child(3) { animation-delay: .12s; }
.card:nth-child(4) { animation-delay: .18s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.card:hover { border-color: var(--card-fg); transform: translateY(-3px); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 15px clamp(16px, 2vw, 24px);
  color: var(--card-fg);
  border-bottom: 1px solid var(--card-line);
}
.card-head h2, .card-head h3 {
  color: inherit;
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 600;
  letter-spacing: -.01em;
}
.card-body { padding: clamp(17px, 2.2vw, 30px); }
.card-foot {
  padding: 13px clamp(16px, 2vw, 24px);
  color: var(--card-muted);
  border-top: 1px solid var(--card-line);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

/* A meaningful three-material product stage: assay / wallet / policy. */
main[data-view='credit'] .grid.credit > .card:first-child {
  --card-bg: var(--acid);
  --card-fg: var(--ink);
  --card-muted: rgba(9,10,15,.63);
  --card-line: rgba(9,10,15,.28);
  min-height: 660px;
  border-radius: 0 0 54px 0;
}
main[data-view='credit'] .grid.credit > .grid > .card:first-child {
  --card-bg: var(--paper);
  --card-fg: var(--ink);
  --card-muted: #596273;
  --card-line: rgba(9,10,15,.2);
  border-radius: 0 0 0 40px;
}
main[data-view='credit'] .grid.credit > .grid > .card:last-child {
  --card-bg: var(--violet);
  --card-fg: var(--paper);
  --card-muted: #C6C2FF;
  --card-line: rgba(242,245,255,.25);
  border-radius: 40px 0 0 0;
}

/* KPI runs become a color score, while data registers stay sober. */
main[data-view='reserves'] > .grid.four .card:nth-child(1),
main[data-view='chain'] > .grid.four .card:nth-child(1) {
  --card-bg: var(--acid); --card-fg: var(--ink); --card-muted: rgba(9,10,15,.62); --card-line: rgba(9,10,15,.25);
}
main[data-view='reserves'] > .grid.four .card:nth-child(2),
main[data-view='chain'] > .grid.four .card:nth-child(2) {
  --card-bg: var(--paper); --card-fg: var(--ink); --card-muted: #596273; --card-line: rgba(9,10,15,.2);
}
main[data-view='reserves'] > .grid.four .card:nth-child(3),
main[data-view='chain'] > .grid.four .card:nth-child(3) {
  --card-bg: var(--violet); --card-fg: var(--paper); --card-muted: #C6C2FF; --card-line: rgba(242,245,255,.25);
}
main[data-view='reserves'] > .grid.four .card,
main[data-view='chain'] > .grid.four .card { min-height: 220px; }

.metric { display: grid; gap: 8px; min-width: 0; }
.metric .label { color: var(--card-muted); }
.metric .value {
  max-width: 100%;
  color: var(--card-fg);
  font-family: var(--mono);
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
}
.metric .value.is-long { font-size: clamp(18px, 2.6vw, 36px); }
.metric .value.is-very-long { font-size: clamp(15px, 2.15vw, 29px); }
.metric .sub { color: var(--card-muted); font-size: 12.5px; }
.metric.seal-figure .value { color: inherit; }

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  color: var(--card-fg);
  border-bottom: 1px solid var(--card-line);
  font-size: 13.5px;
}
.stat-row:last-child { border-bottom: 0; }
.stat-row dt { min-width: 0; color: var(--card-muted); }
.stat-row dd {
  margin: 0;
  color: inherit;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}
dl { margin: 0; }

.field { display: grid; gap: 8px; margin-bottom: 18px; min-width: 0; }
.field .label { color: var(--card-muted); }
.control {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 13px 14px;
  color: var(--card-fg);
  background: transparent;
  border: 1px solid var(--card-line);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
}
.control:hover { border-color: var(--card-fg); }
.control:focus-visible { border-color: var(--violet); outline-color: var(--violet); }
input.control { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; }
select.control {
  appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 49%, currentColor 50%);
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 8px 8px;
}
input[type='range'] { width: 100%; accent-color: var(--violet); }
.hint { color: var(--card-muted, var(--muted-2)); font-size: 12.5px; line-height: 1.5; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  color: var(--paper);
  background: var(--violet);
  border: 1px solid var(--violet);
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  transition: transform .22s var(--ease), background .2s ease;
}
.button:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
/* On the acid panel a translucent disabled state loses too much contrast, so the
   inert CTA stays a solid dark plate: clearly a button, clearly not clickable. */
.button:disabled { color: rgba(242,245,255,.72); background: var(--ink-3); border-color: var(--ink-3); cursor: not-allowed; }
.button.ghost { color: var(--card-fg, var(--paper)); background: transparent; border-color: var(--card-line, var(--line)); }
.button.ghost:hover:not(:disabled) { color: var(--paper); background: var(--violet); border-color: var(--violet); }

.table-wrap { overflow-x: auto; }
table.register {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  color: var(--card-fg);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
table.register th {
  padding: 11px 13px;
  color: var(--card-muted);
  border-bottom: 1px solid var(--card-line);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .045em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
table.register td {
  padding: 13px;
  color: var(--card-muted);
  border-bottom: 1px solid var(--card-line);
  vertical-align: baseline;
}
table.register tbody tr { transition: background .15s ease; }
table.register tbody tr:hover { background: rgba(199,255,61,.07); }
table.register tbody tr:hover td { color: var(--card-fg); }
table.register .num { font-family: var(--mono); font-size: 12.5px; text-align: right; }
table.register .sym { color: var(--card-fg); font-family: var(--mono); font-weight: 600; }
table.register .asset-name { display: block; color: var(--card-muted); font-family: var(--sans); font-size: 12px; }

.tier-tag {
  display: inline-block;
  padding: 3px 8px;
  color: var(--card-muted);
  background: transparent;
  border: 1px solid var(--card-line);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tier-tag[data-tier='cash'] { color: var(--acid); border-color: rgba(199,255,61,.48); }
.tier-tag[data-tier='core'] { color: #AAA3FF; border-color: rgba(85,70,255,.65); }
.tier-tag[data-tier='listed'] { color: var(--warn); border-color: rgba(255,184,77,.55); }
.tier-tag[data-tier='margin'] { color: var(--alarm); border-color: rgba(255,98,87,.55); }

.gauge { display: grid; gap: 8px; }
dl + .gauge { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--card-line); }
.gauge-track { position: relative; height: 10px; background: rgba(9,10,15,.18); border: 1px solid var(--card-line); }
.gauge-fill { position: absolute; inset: 0 auto 0 0; background: var(--violet); }
.gauge-fill[data-tone='verify'] { background: var(--violet); }
.gauge-fill[data-tone='warn'] { background: var(--warn); }
.gauge-kink { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--alarm); }
.gauge-scale { display: flex; justify-content: space-between; color: var(--card-muted); font-family: var(--mono); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.curve-plot { display: block; width: 100%; height: auto; }

.state-block {
  display: grid;
  gap: 8px;
  padding: clamp(30px, 4vw, 54px) 20px;
  color: var(--card-muted);
  border: 1px solid var(--card-line);
  text-align: center;
  font-size: 13.5px;
}
.state-block::before {
  content: 'H';
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  color: var(--paper);
  background: var(--violet);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}
.state-block b { color: var(--card-fg); font-family: var(--display); font-size: 18px; font-weight: 600; }
.alert {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  color: var(--card-muted);
  border: 1px solid var(--card-line);
  border-left: 6px solid var(--violet);
  font-size: 13.5px;
}
.alert b { color: var(--card-fg); }
.alert[data-tone='warn'] { border-left-color: var(--warn); }
.alert[data-tone='verify'] { border-left-color: var(--acid); }
.skeleton-line {
  height: 12px;
  margin-bottom: 9px;
  background: var(--line);
  transform-origin: left;
  animation: loading 1.2s ease-in-out infinite alternate;
}
.skeleton-line.short { width: 58%; }
.skeleton-line.tall { height: 46px; }
@keyframes loading { from { opacity: .3; transform: scaleX(.68); } to { opacity: .85; transform: scaleX(1); } }
.loading-shell { display: grid; gap: 10px; padding: 40px 0; }

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9,10,15,.86);
  backdrop-filter: blur(12px);
}
.modal {
  width: min(460px, 100%);
  max-height: min(86vh, 660px);
  overflow: auto;
  color: var(--paper);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 0 0 44px 0;
  animation: modal-in .42s var(--ease) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 24px; font-weight: 600; }
.modal-close { color: var(--muted); font-size: 13px; font-weight: 550; }
.modal-close:hover { color: var(--acid); }
.modal-body { padding: 18px 20px 24px; }
.wallet-option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin-bottom: 9px;
  padding: 13px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}
.wallet-option:hover { color: var(--ink); background: var(--acid); border-color: var(--acid); }
.wallet-option img, .wallet-option .fallback-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; object-fit: contain; border: 1px solid currentColor; font-size: 13px; font-weight: 650; }
.wallet-option .name { min-width: 0; font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
.wallet-option .rdns { color: var(--muted); font-family: var(--mono); font-size: 10px; overflow-wrap: anywhere; }
.wallet-option:hover .rdns { color: rgba(9,10,15,.62); }
.account-lines { display: grid; gap: 10px; }

.prose { max-width: 74ch; color: var(--muted); }
.prose h3 { margin: 44px 0 12px; color: var(--paper); font-size: clamp(30px, 3vw, 46px); font-weight: 600; }
.prose h4 { margin: 25px 0 8px; color: var(--paper); font-family: var(--display); font-size: 19px; font-weight: 600; }
.prose b { color: var(--paper); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose code { padding: 2px 6px; color: var(--paper); background: var(--ink-2); border: 1px solid var(--line); font-family: var(--mono); font-size: .88em; overflow-wrap: anywhere; }
.pull {
  margin: 0 0 30px;
  padding: clamp(20px, 3vw, 34px);
  color: var(--ink);
  background: var(--acid);
  border-radius: 0 0 40px 0;
  font-family: var(--sans);
  font-size: clamp(21px, 2.35vw, 34px);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.faq-item { border-bottom: 1px solid var(--card-line); }
.faq-item summary { padding: 15px 2px; color: var(--card-fg); cursor: pointer; font-size: 14.5px; font-weight: 550; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+ '; color: var(--acid); }
.faq-item[open] summary::before { content: '– '; }
.faq-item .faq-answer { padding: 0 2px 16px; color: var(--card-muted); font-size: 14.5px; }

.site-footer { overflow: hidden; padding: 0 0 30px; color: var(--paper); background: var(--violet); border-top: 1px solid var(--paper); }
.footer-signal { display: flex; height: 8px; }
.footer-signal span { flex: 1; }
.footer-signal span:nth-child(1) { background: var(--acid); }
.footer-signal span:nth-child(2) { flex: 0 0 12%; background: var(--paper); }
.footer-signal span:nth-child(3) { flex: 0 0 22%; background: var(--ink); }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 38px var(--gutter) 18px;
}
.footer-lockup b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .01em; }
.footer-lockup span { color: #C6C2FF; font-size: 11px; font-weight: 550; }
.footer-note { max-width: 42ch; margin-top: 12px; color: var(--paper-2); font-size: 13.5px; }
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col .label { color: #C6C2FF; }
.footer-col a, .footer-col span { color: var(--paper-2); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--acid); }
.footer-giant {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 18px var(--gutter) 0;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(76px, 16.7vw, 252px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .68;
  white-space: nowrap;
  transform: translateY(12%);
}
.footer-legal { width: min(100%, var(--page)); margin: 38px auto 0; padding: 16px var(--gutter) 0; color: #C6C2FF; border-top: 1px solid rgba(242,245,255,.24); font-size: 11.5px; line-height: 1.55; }

@media (max-width: 1120px) {
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.credit { grid-template-columns: minmax(0, 1fr); }
  main[data-view='credit'] .grid.credit > .card:first-child { min-height: 0; }
  .network-strip { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2fr); }
  .network-strip > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .network-strip b { text-align: left; }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .menu-button { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; animation: menu-in .3s var(--ease) both; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .nav-link { padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-link::after { right: auto; width: 52px; }
  .header-actions { grid-column: 3; }
  .view-head { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .view-head-copy { min-height: 420px; }
  .route-field { width: 100%; min-height: 360px; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  body::before { background-size: 24px 24px; }
  .site-header { gap: 9px; min-height: 62px; padding: 9px 12px; }
  .brand { gap: 9px; }
  .brand img { width: 34px; height: 34px; }
  .brand-word { font-size: 18px; }
  .brand-sub { display: none; }
  .chain-chip { padding: 7px; font-size: 9.5px; }
  .chain-chip span:not(.live-pulse) { display: none; }
  .connect-button { min-height: 38px; padding: 8px 10px; font-size: 11px; }
  .menu-button { min-height: 38px; padding: 8px 9px; font-size: 11px; }
  .network-strip {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .network-strip::-webkit-scrollbar { display: none; }
  .network-strip > div { flex: 0 0 154px; padding: 9px 12px; }
  /* The hmUSD cell carries the longest string in the ticker; give it enough
     basis to stay on one line inside the horizontal scroller. */
  .network-strip > .strip-note { flex-basis: 250px; }
  main { padding-top: 12px; }
  .view-head { gap: 12px; margin-bottom: 14px; }
  .view-head-copy { min-height: 350px; padding: 46px 0 26px; }
  .view-head h1 { max-width: 12ch; font-size: clamp(45px, 14.5vw, 66px); line-height: .87; }
  .view-head .lede { font-size: 14.5px; }
  .route-field { min-height: 300px; padding: 18px; border-radius: 0 0 50px 0; }
  .route-field::before { bottom: -35px; font-size: 180px; }
  .route-field::after { right: 14px; bottom: 16px; }
  .route-track { padding-right: 12px; }
  .route-node i { width: 40px; height: 40px; }
  .route-node small { display: none; }
  .route-link { margin-top: 20px; }
  .grid.four { grid-template-columns: minmax(0, 1fr); }
  main[data-view='reserves'] > .grid.four .card,
  main[data-view='chain'] > .grid.four .card { min-height: 165px; }
  .card { border-radius: 0 0 24px 0; }
  .card:hover { transform: none; }
  .metric .value { font-size: 30px; }
  .metric .value.is-long { font-size: 25px; }
  .metric .value.is-very-long { font-size: 21px; }
  .modal-scrim { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 88vh; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 32px 0 0 0; }
  .footer-giant { padding-top: 28px; font-size: 22vw; }
}

@media (max-width: 430px) {
  .chain-chip { display: none; }
  .brand { flex: 1 1 auto; }
  .header-actions { min-width: 0; }
  .connect-button { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .connect-button i { display: none; }
  .view-head-copy { min-height: 320px; }
  .view-head h1 { font-size: clamp(40px, 13.6vw, 56px); }
  .route-field { min-height: 270px; }
  .route-field-head { font-size: 9.5px; }
  .route-node b { font-size: 9.5px; }
}

@media (max-width: 350px) {
  .brand-word { font-size: 16px; }
  .connect-button, .menu-button { padding-inline: 7px; font-size: 9.5px; }
  .view-head h1 { font-size: 41px; }
  .route-field { padding-inline: 13px; }
  .route-field::after { display: none; }
  .route-track { padding-right: 0; }
  .route-node i { width: 34px; height: 34px; }
  .route-link { margin-top: 17px; }
  .stat-row { gap: 9px; font-size: 12.5px; }
  .stat-row dd { font-size: 11.5px; }
}

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