:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f5f5, #101614);
  --surface: light-dark(#fefffd, #1a2520);
  --canvas-top: light-dark(#eaf0e8, #17231f);
  --sheet-tint: light-dark(#f1f5ee, #202f28);
  --edge-light: light-dark(#ffffffcf, #ffffff0d);
  --surface-shadow: 0 1px 2px light-dark(#19382b0b, #00000030), inset 0 1px 0 var(--edge-light);
  --raised-shadow: 0 2px 3px light-dark(#183b2b0d, #00000038), 0 9px 22px -13px light-dark(#163d2b3b, #00000080), inset 0 1px 0 var(--edge-light);
  --second: light-dark(#f3f5f4, #202a26);
  --line: light-dark(#cfd9d0, #36453d);
  --quiet-line: light-dark(#e2e9e1, #2c3b33);
  --text: light-dark(#17221e, #eef4ef);
  --sub: light-dark(#52645d, #aebfb5);
  --accent: light-dark(#006b59, #84ddbd);
  --mint: light-dark(#e2f4ee, #223b31);
  --bid: light-dark(#08765e, #78d9b2);
  --ask: light-dark(#b23b51, #ff9eac);
  --on-accent: light-dark(#fff, #10271f);
  --on-ask: light-dark(#fff, #341b21);
  --warning-fill: light-dark(#fff0cd, #382d1e);
  --warning-text: light-dark(#754b16, #f1cd91);
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font: 100%/1.4 var(--sans);
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:1rem}
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: linear-gradient(155deg, var(--canvas-top), transparent 57%) no-repeat,
    linear-gradient(var(--canvas-top), var(--bg) 38rem);
  background-size: 100% 32rem, 100% 100%;
}a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:.22rem}
button,select,input{font:inherit;color:inherit}button,select{cursor:pointer}
button,select{background:var(--second);border:1px solid var(--line);border-radius:.38rem}
button:hover,select:hover{border-color:var(--sub)}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
button:disabled,select:disabled{cursor:default;opacity:.7}
[hidden]{display:none!important}
.skip{position:fixed;z-index:2;left:.5rem;top:.5rem;background:var(--accent);color:var(--bg);padding:.8rem}.skip:focus{top:.5rem}

h1,h2,h3,p,dl,dd{margin:0}

.pair-control{min-width:12rem}.pair-control label,.quantity-label{font-size:.87rem;color:var(--sub);display:block;margin-bottom:.5rem}
.select-wrap{position:relative}.select-wrap::after{content:"";width:.48rem;height:.48rem;border-right:1.5px solid var(--sub);border-bottom:1.5px solid var(--sub);transform:rotate(45deg);position:absolute;top:.92rem;right:1rem;pointer-events:none}
select{width:100%;padding:.64rem 2.3rem .64rem .85rem;appearance:none;background:var(--surface);font-size:.98rem;font-weight:620}
.workspace{display:grid;grid-template-columns:minmax(0,1.95fr) minmax(17.5rem,1fr);gap:1rem;align-items:stretch}
.panel{border:1px solid var(--line);border-radius:.78rem;background:var(--surface);box-shadow:var(--surface-shadow);min-width:0}
.depth,.quote,.book,.network{padding:1.35rem 1.5rem}
.panel-heading{display:flex;gap:.75rem;align-items:center;justify-content:space-between}
h2{font-size:1.25rem;letter-spacing:-.035em;line-height:1.15;font-weight:620}
h3{font-size:.98rem;letter-spacing:-.015em}
.metrics-toggle,.side-toggle{display:flex;border-radius:.42rem;border:1px solid var(--line);padding:.15rem;background:var(--bg)}
.metrics-toggle button,.side-toggle button{border:1px solid transparent;color:var(--sub);background:transparent}
.metrics-toggle button{font-size:.84rem;padding:.32rem .64rem}
.metrics-toggle button[aria-pressed=true]{color:var(--text);background:var(--surface);box-shadow:0 1px 3px #121d1b24}

dt{font-size:.87rem;color:var(--sub)}

.bid{color:var(--bid)}.ask{color:var(--ask)}
.depth-box{border-top:1px solid var(--quiet-line);padding-top:1rem}
.plot-labels{display:flex;align-items:center;justify-content:space-between;color:var(--sub);font-size:.82rem;gap:.5rem}
.legend{display:flex;gap:.95rem}.legend span{display:flex;align-items:center;gap:.38rem}.legend span::before{content:"";width:.7rem;height:.15rem;background:currentColor}
#chart{min-height:10rem;margin-top:.5rem}
#chart svg{display:block;overflow:visible;width:100%;height:clamp(10rem,14vw,13.6rem);font-family:var(--mono);font-size:12px}
.chart-empty{color:var(--sub);padding:3.5rem 1rem;text-align:center}
.axis{font-size:.8rem;color:var(--sub);text-align:center}
.quote{background:var(--surface);display:flex;flex-direction:column}
.side-toggle{margin:1.3rem 0;min-height:2.6rem}.side-toggle button{width:50%;font-weight:600}
#buy[aria-pressed=true]{background:var(--bid);color:var(--on-accent)}#sell[aria-pressed=true]{background:var(--ask);color:var(--on-ask)}
.quantity-field{display:flex;align-items:center;border:1px solid var(--line);border-radius:.45rem;background:var(--bg);padding:0 .83rem;gap:.5rem}
.quantity-field:focus-within{border-color:var(--accent)}
.quantity-field input{min-width:0;width:100%;border:0;outline:none;padding:.74rem 0;background:transparent;font-family:var(--mono);font-size:1.15rem}
.quantity-field input:focus-visible{outline:none}.quantity-field:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.quantity-field strong{font-size:.86rem;color:var(--sub)}
.lot,.coverage,.proof,.quote-detail{color:var(--sub);font-size:.84rem;line-height:1.5}
.lot{margin:.4rem 0 .6rem}.estimate>div{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;padding:.42rem 0}
.estimate dd{font-family:var(--mono);text-align:right;font-size:.94rem;overflow-wrap:anywhere}
.estimate .value{border-top:1px solid var(--line);padding-top:.8rem;margin-top:.35rem}.estimate .value dt{color:var(--text);font-weight:580}
.estimate .value dd{font-size:1.04rem;color:var(--accent)}
.quote-detail{margin:.75rem 0;padding-top:.4rem;color:var(--sub)}
.book{grid-column:1/-1}.secondary{color:var(--sub);font-size:.86rem;text-align:right}
.book-sides{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;margin-top:1.3rem}
.book-side{min-width:0}.book-side h3{margin-bottom:.65rem}
table{border-collapse:collapse;table-layout:fixed;width:100%;font-variant-numeric:tabular-nums}
th,td{text-align:right;width:32%;overflow-wrap:anywhere}
th:first-child,td:first-child{text-align:left;width:36%}
thead th{font-weight:530;color:var(--sub);font-size:.86rem;padding:.2rem .4rem .45rem}th small{font-size:.75rem;font-weight:400;color:var(--sub)}
tbody td{font:400 .94rem/1.36 var(--mono);padding:.48rem .4rem;border-top:1px solid var(--quiet-line)}
tbody tr{position:relative;background:linear-gradient(270deg,var(--depth-fill) var(--level-size),transparent var(--level-size))}
#bids{--depth-fill:var(--mint)}#asks{--depth-fill:light-dark(#fbe7e8, #392830)}#bids td:first-child{color:var(--bid)}#asks td:first-child{color:var(--ask)}
td.empty{color:var(--sub)!important;font:inherit;text-align:center;padding:1rem}
.coverage:empty,.proof:empty{display:none}.coverage{margin-top:.55rem}
.network{margin-top:1rem}.source-actions{display:flex;gap:.5rem}.source-actions button:last-of-type{color:var(--accent)}
.identity{margin-top:1.1rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.identity dt{margin-bottom:.35rem}
.identity dd{font-size:.95rem;overflow-wrap:anywhere}.identity .hash{font:.82rem/1.45 var(--mono);grid-column:span 2}
.proof{margin-top:.85rem}.proof a,footer a{color:var(--accent);text-decoration:underline;text-underline-offset:.2rem}
.error{color:var(--warning-text);background:var(--warning-fill);border:1px solid var(--line);border-radius:.5rem;padding:1rem;line-height:1.5;margin-bottom:1rem}
footer{padding:1.4rem .1rem 2.6rem;display:flex;align-items:center;gap:1.4rem;font-size:.85rem}footer span{color:var(--sub);margin-right:auto}

.trade-guide{align-self:flex-start;margin-top:.38rem;color:var(--accent);font-size:.84rem;text-decoration:underline;text-underline-offset:.2rem}
.directory{padding:1.35rem 1.5rem;margin-top:1rem}.directory .panel-heading{flex-wrap:wrap;gap:1rem;margin-bottom:1.15rem}
.search-field input{width:12rem;max-width:100%;background:var(--bg);border:1px solid var(--line);border-radius:.4rem;padding:.58rem .7rem;font-size:.9rem}
.search-field input::placeholder{color:var(--sub);opacity:1}

.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}

.directory tbody tr{background:none}.directory th,.directory td{width:24%}.directory th:first-child,.directory td:first-child{width:28%}.directory td:first-child a{text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:.22rem;display:inline-block;padding:.25rem 0}
.directory-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.84rem;color:var(--sub)}#market-count:not(:empty),#pages:not([hidden]){margin-top:.65rem}
#pages{display:flex;gap:.5rem}#pages button{padding:.45rem .7rem}

.lookup,.block-panel,.detail-panel,.empty-market{margin-top:1rem;padding:1.4rem 1.5rem}
.lookup{display:flex;gap:1rem;align-items:center;justify-content:space-between}
.lookup form{display:flex;gap:.55rem;flex:0 1 40rem}
.lookup input{min-width:0;flex:1;padding:.68rem .85rem;color:var(--text);border:1px solid var(--line);border-radius:.4rem;background:var(--surface)}
.lookup button,.empty-market button,.primary,.compact{padding:.65rem .95rem;white-space:nowrap;background:var(--second)}
.primary,.lookup button,.empty-market button{color:var(--on-accent);background:var(--accent);font-weight:650;border-color:transparent}
.primary:hover,.lookup button:hover,.empty-market button:hover{background:light-dark(#02594f, #b2ecd7)}
.primary:disabled{background:var(--second);color:var(--sub)}

.detail-list{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-top:1rem}
.detail-list:empty{display:none}
.detail-list > div { border-top: 1px solid var(--quiet-line); padding-top: .75rem; min-width: 0 }
.detail-list dt, .mining-metrics dt, .subnet-facts dt { color: var(--sub); font-size: .77rem; }
.detail-panel, .subnet-panel { background: var(--surface) }
#account-fields { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.2rem .9rem }
#account-fields > div:first-child { grid-column: 1/-1 }
#account-fields > div:first-child dd { font-size: .85rem }
#account-fields > div:nth-child(2) dd { color: var(--accent); font-weight: 650 }
#account-fields dd { font-size: clamp(.95rem,1.25vw,1.15rem) }
#account-balances, #block-detail, #transaction-detail { box-shadow: var(--raised-shadow) }

.detail-list dd{font:400 .95rem/1.5 var(--mono);overflow-wrap:anywhere;margin-top:.3rem}
.detail-panel p,.empty-market p,.bridge-status{font-size:.9rem;line-height:1.5;color:var(--sub);margin-top:.7rem}
.detail-panel p:empty,.bridge-status:empty{display:none}
.empty-market button{margin-top:1.25rem}.empty-market h2{font-size:1.45rem}

/* Indexed mainnet history */
.skip:not(:focus){clip-path:inset(50%);pointer-events:none}
.index-note{margin-top:.65rem;font-size:.84rem;line-height:1.5;color:var(--sub)}
.history-content{min-width:0}
.history-subtitle{font-size:1.02rem;font-weight:620;margin:1.5rem 0 .65rem;letter-spacing:-.02em}
.history-panel>.panel-heading{flex-wrap:wrap}
.history-content>.chain-state{margin-top:1rem}
.history-link{color:var(--accent);text-decoration:underline;text-underline-offset:.2em;overflow-wrap:anywhere}
.history-link:hover{color:var(--text)}
.chain-state{display:inline-flex;align-items:center;gap:.34rem;font-size:.76rem;color:var(--sub)}
.chain-state::before{content:"";height:.4rem;width:.4rem;flex:none;border-radius:100%;background:currentColor}
.chain-state.finalized::before{color:var(--bid)}.chain-state.provisional::before{color:#9b611e}.chain-state.orphaned::before{color:var(--ask)}
.mining-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:1rem;padding:.9rem 0;gap:1rem}
.mining-metrics>div{min-width:0}.mining-metrics dd{margin:.42rem 0 0;font:520 1.05rem/1.4 var(--mono);overflow-wrap:anywhere}
.activity-filter{display:inline-flex;gap:.6rem;align-items:center;margin-top:.9rem;font-size:.84rem;color:var(--sub)}
.activity-filter select{width:auto;padding:.46rem .7rem}
.history-rows,.search-matches{list-style:none;padding:0;margin:.75rem 0 0}
.history-row{display:grid;grid-template-columns:minmax(9rem,1.3fr) minmax(5rem,1fr) minmax(6rem,.7fr);align-items:center;gap:.7rem;border-top:1px solid var(--quiet-line);padding:.78rem 0;font-size:.86rem}
.history-row>div{display:grid;gap:.32rem;min-width:0}
.history-row small{color:var(--sub);font-size:.78rem}
.history-row a,.activity-value strong{font-family:var(--mono);font-size:.85rem}
.activity-value{text-align:right;overflow-wrap:anywhere}
.search-matches li,.history-pagination{display:flex;flex-wrap:wrap;align-items:center;gap:.8rem}
.search-matches li{padding:.75rem 0;border-top:1px solid var(--quiet-line)}
.history-pagination{justify-content:flex-end;margin-top:1rem;font-size:.84rem;color:var(--sub)}
.history-pagination button:disabled{opacity:.45}
@media(max-width:42rem){.mining-metrics{grid-template-columns:1fr 1fr}.history-row{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}.activity-value{grid-column:1/-1;text-align:left}.history-row .activity-where{justify-items:end}.history-panel>.panel-heading{gap:.55rem}.history-pagination{justify-content:space-between}}

/* Subnet work explorer */
.rehearsal-entry{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem;padding:1.35rem 1.5rem;margin-top:1rem}
.rehearsal-entry p,.subnet-panel>p,.subnet-details>p,.subnet-details>div>p{margin:.45rem 0;color:var(--sub);font-size:.9rem;line-height:1.55}
.subnet-tools{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.9rem}
.subnet-hero{background:var(--surface);border:1px solid var(--line);border-radius:.8rem;padding:1.55rem 1.6rem}
.subnet-label{display:inline-block;color:var(--accent);font:.84rem var(--mono)}
.subnet-hero h2{font-size:clamp(1.8rem,3.4vw,3rem);letter-spacing:-.055em;line-height:1.12;margin:.6rem 0 1.2rem}
.subnet-facts,.subnet-hero-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:1rem 1.35rem}
.subnet-facts{margin:1rem 0}.subnet-hero-metrics{padding-top:1rem;border-top:1px solid var(--line)}
.subnet-facts dd,.subnet-hero-metrics dd{margin-top:.35rem;font:.91rem/1.48 var(--mono);overflow-wrap:anywhere}
.subnet-panel{padding:1.35rem 1.5rem;margin-top:1rem;min-width:0}
.subnet-panel>.history-link{display:inline-block;margin:.35rem 0}
.subnet-table{overflow-x:auto;margin-top:.9rem}.subnet-table table{width:100%;border-collapse:collapse}
.subnet-table td,.subnet-table th{text-align:left;white-space:normal;padding:.7rem .75rem .7rem 0;overflow-wrap:anywhere}
.subnet-table th{font-weight:530;font-size:.79rem;color:var(--sub);border-bottom:1px solid var(--line)}
.subnet-table td{font:.88rem/1.45 var(--mono);border-bottom:1px solid var(--quiet-line)}
.subnet-address{font:inherit;overflow-wrap:anywhere}
.subnet-details{margin-top:.75rem;padding-top:.8rem;border-top:1px solid var(--line)}
.subnet-details summary{color:var(--accent);cursor:pointer;font-weight:550;font-size:.88rem}
.subnet-details summary:focus-visible{outline:2px solid var(--accent);outline-offset:.2rem}
.stock-intro h2 { margin-bottom: .55rem }
.stock-intro p { max-width: 70ch; color: #e4eee5; line-height: 1.55 }
.stock-walkthrough h2 { margin: 0 0 1rem }
.stock-steps {
  display: flex; gap: .35rem; width: fit-content; max-width: 100%; min-inline-size: 0;
  margin: 0; padding: .24rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--second);
}
.stock-steps label {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 2.7rem; padding: .3rem clamp(.38rem,1.9vw,1.35rem); border-radius: .38rem;
  color: var(--sub); font-size: .86rem; font-weight: 600; cursor: pointer;
}
.stock-steps input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer }
.stock-steps label:has(:checked) { background: var(--accent); color: var(--on-accent) }
.stock-steps label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px }
.stock-step-number { font: .74rem/1 var(--mono); font-variant-numeric: tabular-nums }
.stock-step-content { margin-top: 1.2rem; min-height: 13rem }
.stock-step-content h3 { margin: 0; font-size: 1.18rem }
.stock-step-content > p { max-width: 72ch; margin: .4rem 0 1rem; color: var(--sub); font-size: .92rem; line-height: 1.55 }
.stock-horizon { display: flex; align-items: center; gap: .65rem; width: fit-content; font-size: .85rem; font-weight: 550 }
.stock-horizon select { width: auto; padding: .45rem 1.7rem .45rem .6rem; appearance: auto }
.stock-step-content .subnet-facts {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,10.6rem),1fr));
  max-width: 49rem; margin: 1rem 0; gap: .8rem; padding: .85rem 1rem;
  border: 1px solid var(--quiet-line); border-radius: .45rem; background: var(--sheet-tint);
}
.stock-step-content .subnet-facts dd { font-weight: 600; font-size: 1rem }
.stock-next { padding: .5rem .8rem; color: var(--accent); background: var(--surface); font-size: .87rem; font-weight: 600 }
.stock-full-record { margin-top: 1rem }
.stock-full-record > summary { padding: 1rem 1.4rem; font-weight: 600; color: var(--accent); cursor: pointer }
.stock-full-record > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: .5rem }
.stock-full-record > .subnet-panel { margin: 0; border: 0; border-top: 1px solid var(--quiet-line); border-radius: 0; box-shadow: none }
@media (min-width: 56rem) {
  .stock-walkthrough { display: grid; grid-template-columns: minmax(11rem, .43fr) minmax(0,1.57fr); grid-template-rows: auto 1fr; column-gap: 1.8rem }
  .stock-walkthrough h2 { grid-area: 1 / 1; align-self: start }
  .stock-steps { grid-area: 2 / 1; flex-direction: column; width: 100%; align-self: start }
  .stock-steps label { justify-content: start; padding-inline: .85rem }
  .stock-step-content { grid-area: 1 / 2 / 3 / 3; margin: 0; padding-left: 1.8rem; border-left: 1px solid var(--line) }
}
.position-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:.75rem;margin-top:1rem}
.position-form label{display:grid;gap:.35rem;font-size:.84rem;color:var(--sub);flex:1 1 12rem;min-width:0}
.position-form input{background:var(--bg);border:1px solid var(--line);border-radius:.35rem;padding:.6rem;min-width:0;color:var(--text)}
@media(max-width:42rem){.rehearsal-entry,.subnet-panel,.subnet-hero{padding:1.05rem}.subnet-table td,.subnet-table th{font-size:.77rem}.subnet-facts,.subnet-hero-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.subnet-facts dd,.subnet-hero-metrics dd{font-size:.82rem}}


.nav-icon {
  display: block;
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  color: inherit;
}
.nav-icon::before,
.nav-icon::after {
  content: "";
  display: block;
  position: absolute;
}
.icon-explorer::before {
  inset: 1px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: linear-gradient(currentColor, currentColor) 0 42%/100% 1px
      no-repeat,
    linear-gradient(currentColor, currentColor) 45% 100%/1px 55% no-repeat;
}
.icon-accounts::before {
  width: 5px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  top: 1px;
  left: 5px;
}
.icon-accounts::after {
  width: 13px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 6px 6px 2px 2px;
  bottom: 1px;
  left: 1px;
}
.icon-subnets::before,
.icon-subnets::after {
  width: 10px;
  height: 8px;
  transform: rotate(-31deg) skew(28deg);
  border: 1.5px solid currentColor;
  border-radius: 1px;
  left: 2px;
}
.icon-subnets::before {
  top: 1px;
}
.icon-subnets::after {
  top: 5px;
  border-width: 0 0 1.5px 1.5px;
}
.icon-trade::before,
.icon-trade::after {
  width: 8px;
  height: 5px;
  border: solid currentColor;
  transform: skew(-32deg);
  left: 3px;
}
.icon-trade::before {
  border-width: 1.5px 1.5px 0 0;
  top: 3px;
}
.icon-trade::after {
  border-width: 0 0 1.5px 1.5px;
  bottom: 3px;
}

#ledger dl {
  margin: 0.9rem 0 0;
}
#ledger dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.48rem 0;
  border-top: 1px solid var(--quiet-line);
}
#ledger dt {
  font-size: 0.8rem;
}
#ledger dd {
  font: 0.84rem/1.4 var(--mono);
  text-align: right;
  overflow-wrap: anywhere;
}
#ledger > .inline-action {
  display: inline-block;
  margin-top: 0.7rem;
}
.handoff-progress {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: 0.55rem;
}
.handoff-progress label {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.77rem;
  color: var(--sub);
}
.handoff-progress label strong {
  font: 500 0.81rem var(--mono);
  color: var(--text);
}
.handoff-progress progress {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  height: 0.32rem;
  margin: 0.62rem 0;
  background: var(--quiet-line);
  color: var(--accent);
}
.handoff-progress progress::-webkit-progress-bar {
  background: var(--quiet-line);
}
.handoff-progress progress::-webkit-progress-value {
  background: var(--accent);
}
.handoff-progress progress::-moz-progress-bar {
  background: var(--accent);
}
.handoff-progress p {
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--sub);
}

.network summary {
  padding: 0.95rem 1.25rem;
  cursor: pointer;
}
.network details[open] {
  padding: 0 1.25rem 1.2rem;
}
.network details[open] summary {
  margin: 0 -1.25rem 0.55rem;
}
.network .source-actions {
  justify-content: flex-end;
}
.network .identity {
  margin-top: 0.65rem;
}
.network summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Wait for hostname-based routing before painting either network's data. */
html:not([data-environment]) :is(.navigation, .global-search, #environment-name) { visibility: hidden }
html:not([data-environment]) main > :not(noscript) { display: none }
.bar-inner:has(.global-search[hidden]) .appearance { margin-inline-start: auto }

/* The main routes share a single navigation landmark on desktop and mobile. */
.bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px light-dark(#19382b07,#00000016);
}
.bar-inner, .shell {
  width: min(calc(100% - 4rem), 86rem);
  margin-inline: auto;
}
.bar-inner {
  display: flex;
  min-height: 4.2rem;
  align-items: center;
  gap: clamp(.8rem, 2.3vw, 2.4rem);
}
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.065em;
}
.brand img { width: 32px; height: 32px; margin-right: .55rem; border-radius: .4rem; box-shadow: 0 1px 2px #17372925 }
.brand span { font-weight: 450 }
.brand:hover, .navigation a:hover { text-decoration: none }
.navigation {
  display: flex;
  align-items: center;
  gap: .17rem;
}
.navigation a {
  display: inline-flex;
  align-items: center;
  gap: .43rem;
  min-height: 2.4rem;
  padding: 0 .78rem;
  color: var(--sub);
  border: 1px solid transparent;
  border-radius: .55rem;
  font-size: .84rem;
  font-weight: 580;
}
.navigation a:hover { background: var(--second); color: var(--text) }
.navigation a[aria-current] {
  color: var(--accent);
  background: var(--mint);
  border-color: light-dark(#cde1d5,#3a584c);
  box-shadow: inset 0 1px 0 var(--edge-light);
}
.global-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 30rem;
  margin-left: auto;
  gap: .55rem;
  border: 1px solid var(--line);
  background: var(--second);
  box-shadow: inset 0 1px 2px light-dark(#223e3210,#00000026);
  border-radius: .56rem;
  padding: .28rem;
}
.global-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.global-search input {
  width: 0;
  min-width: 0;
  flex: 1;
  padding: .33rem 0;
  border: 0;
  background: transparent;
  font-size: .84rem;
}
.global-search input:focus-visible { outline: 0 }
.global-search input::placeholder { color: var(--sub) }
.global-search kbd { font: .74rem var(--mono); color: var(--sub); padding: .04rem .3rem; border: 1px solid var(--line); border-radius: .22rem }
.search-guide {
  position: absolute; z-index: 4; inset: calc(100% + .55rem) 0 auto auto;
  width: max(100%, min(22rem, calc(100vw - 1.5rem)));
  max-height: 60dvh; overflow-y: auto;
  padding: .7rem; border: 1px solid var(--line); border-radius: .7rem;
  background: var(--surface); box-shadow: var(--raised-shadow);
}
.search-guide p {
  margin: 0 0 .4rem; padding: 0 .35rem;
  font-size: .71rem; font-weight: 650; color: var(--sub);
}
.search-guide dl { display: grid; grid-template-columns: auto 1fr; gap: .55rem .8rem; padding: .3rem .35rem; margin: 0 }
.search-guide dt, .search-guide strong { font-size: .82rem; font-weight: 600 }
.search-guide dd, .search-guide a span { margin: 0; font-size: .8rem; color: var(--sub); overflow-wrap: anywhere }
.search-guide ul { list-style: none; margin: 0; padding: 0 }
.search-guide a { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .6rem .4rem; border-radius: .38rem }
.search-guide a span { margin-inline-start: auto; text-align: right }
.global-search:not(:has(input:focus)) .search-guide kbd { display: none }
.search-guide a:is(:hover, :focus-visible) { background: var(--mint); text-decoration: none }
.global-search button, .compact, .source-actions button {
  background: var(--surface); padding: .42rem .68rem; font-size: .78rem;
  font-weight: 550; box-shadow: var(--surface-shadow);
}
button:disabled { box-shadow: none }
.search-glyph {
  width: .76rem;
  height: .76rem;
  margin-inline: .55rem .16rem;
  position: relative;
  border: 1.5px solid var(--sub);
  border-radius: 100%;
}
.search-glyph::after { content: ""; position: absolute; right: -.25rem; bottom: -.12rem; width: .37rem; height: 1.5px; transform: rotate(45deg); background: var(--sub) }
.environment-name {
  display: inline-flex; flex: none; align-items: center; gap: .4rem; white-space: nowrap;
  color: var(--accent); background: var(--mint); border: 1px solid var(--line);
  padding: .35rem .57rem; border-radius: .45rem; font: 550 .74rem/1.3 var(--mono);
}
.environment-name::before { content: ""; width: .43rem; height: .43rem; background: currentColor; border-radius: 50% }
.nav-demo-icon { width: .95rem; height: .95rem; flex: none }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: clamp(1.7rem,3vw,2.9rem) 0 1.45rem }
h1 { font-size: clamp(2.1rem, 3.7vw, 3.4rem); font-weight: 600; letter-spacing: -.055em; line-height: 1.1 }
#source-status { margin-top: .55rem; font: .78rem/1.45 var(--mono); color: var(--sub) }
#global-search-error { background: var(--warning-fill); color: var(--warning-text); padding: .6rem 1rem; margin-top: 1rem }
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.72fr);
  gap: .95rem;
}
.block-hero, .overview-facts {
  border-radius: .78rem; min-width: 0; overflow: hidden;
}
.block-hero {
  position: relative; isolation: isolate; min-height: 11.5rem;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 1.4rem clamp(1rem,2vw,1.8rem);
  border: 1px solid #305b47; color: #f7fbf0;
  background: radial-gradient(ellipse at 85% 35%, #315b47, transparent 62%), linear-gradient(110deg,#123a2d,#1a4233 65%,#254836);
  box-shadow: var(--raised-shadow);
}
.head-formation {
  position: absolute; z-index: -1; height: 115%; width: 52%; right: -1%; top: -5%;
  pointer-events: none;
}
#head-label, .overview-facts dt, .block-columns, table thead th {
  font: 500 .7rem/1.35 var(--mono); text-transform: uppercase; letter-spacing: .055em;
}
#head-label { color: #d2e4cb }
#head-height { max-width: 58%; font-size: clamp(2.15rem,3.55vw,3.65rem); font-weight: 580; font-variant-numeric: tabular-nums; line-height: 1.16; letter-spacing: -.065em; overflow-wrap: anywhere }
#head-link {
  margin-top: 1rem; display: inline-flex; align-items: center; gap: .9rem;
  border-radius: .36rem; padding: .34rem .62rem; border: 1px solid #71937a;
  background: #173e31; color: #e0f2b5; font-size: .75rem; font-weight: 570;
}
#head-link:hover { background: #2b513f; text-decoration: none }
#head-link::after, #ledger > a::after { content: " →" }
.overview-facts {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--surface-shadow);
}
.overview-facts dl {
  flex: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  align-content: center; padding-block: 1rem;
}
.overview-facts dl > div { min-width: 0; padding: 0 clamp(.8rem,1.7vw,1.55rem); }
.overview-facts dl > div + div { border-left: 1px solid var(--line) }
.overview-facts dt { display: grid; justify-items: start; gap: .55rem }
.overview-facts svg {
  width: 2.2rem; height: 2.2rem; padding: .36rem; border-radius: .55rem;
  color: var(--accent); background: var(--mint);
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none;
}
.overview-facts dd { margin-top: .5rem; font-size: clamp(1.2rem,2vw,1.88rem); font-weight: 600; line-height: 1.13; letter-spacing: -.045em; overflow-wrap: anywhere }
#finality-note { padding: .65rem clamp(.8rem,1.7vw,1.55rem); border-top: 1px solid var(--quiet-line); background: var(--sheet-tint); color: var(--sub); font-size: .82rem; line-height: 1.5 }
#finality-note strong { color: var(--text); font-weight: 600 }
.chain-grid {
  display: grid;
  grid-template-columns: minmax(0,1.65fr) minmax(0,1fr);
  gap: .85rem;
  margin-top: .85rem;
}
.chain-grid > .panel { margin: 0; padding: 1.2rem 1.3rem }
.chain-grid h2 { font-size: 1.2rem; letter-spacing: -.036em }
.block-panel { box-shadow: var(--raised-shadow) }
.issued-total { font-size: clamp(1.55rem, 2.5vw, 2.2rem); font-weight: 560; line-height: 1.1; letter-spacing: -.05em; overflow-wrap: anywhere }
.issued-total small { color: var(--sub); font: .74rem/1.4 var(--mono); letter-spacing: 0 }
.issued-total { margin-top: .8rem }
.ledger-panel { background: linear-gradient(135deg,var(--sheet-tint),var(--surface) 64%) }
.ledger-panel .inline-action, .inline-action { color: var(--accent); font-size: .86rem; text-decoration: underline; text-underline-offset: .2rem }
.block-columns, .block-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(5rem, .8fr) minmax(0, 3fr) minmax(5.5rem, .9fr) minmax(4.5rem,.65fr);
  gap: 1rem;
  padding: .7rem .85rem;
}
.block-columns { margin-top: .9rem; border-block: 1px solid var(--quiet-line); background: var(--second); color: var(--sub); font-size: .66rem }
.block-columns span:last-child { text-align: right }
.block-row { color: var(--sub); border-bottom: 1px solid var(--quiet-line); font: .8rem/1.45 var(--mono); min-height: 2.75rem }
.block-row:last-child { border: 0 }
.block-row:hover { text-decoration: none; background: var(--mint) }
.block-row strong { color: var(--accent); font-weight: 600 }
.block-row code { font: inherit; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.block-state { justify-self: end; display: inline-flex; gap: .35rem; align-items: center; padding: .2rem .5rem; font: .72rem var(--sans); border-radius: 2rem; color: var(--warning-text); background: var(--warning-fill) }
.block-state::before { content: ""; width: .34rem; height: .34rem; border-radius: 50%; background: currentColor }
.block-state.finalized { color: var(--accent); background: var(--mint) }
.network { padding: 0 }
.network summary { font-size: .9rem; font-weight: 600 }
footer { font-size: .8rem; flex-wrap: wrap }
footer a { color: var(--sub) }
.skip { z-index: 10 }
@media (max-width: 68rem) {
  body { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)) }
  html { scroll-padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)) }
  .navigation {
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .navigation a { flex: 1; max-width: 10rem; flex-direction: column; justify-content: center; gap: .28rem; min-height: 3.8rem; font-size: .65rem }
  .navigation a[aria-current]::after { inset: 0 20% auto; height: 2px }
  .bar-inner, .shell { width: calc(100% - 2rem) }
  .overview { grid-template-columns: minmax(0,1.05fr) minmax(0,1.45fr) }
  .navigation { align-items: stretch; padding-top: .25rem; box-shadow: 0 -3px 15px light-dark(#163a280b,#00000026) }
  .navigation a { position: relative; border-radius: .45rem; min-height: 3.3rem; margin-bottom: .25rem; }
  .navigation a[aria-current] { border-color: transparent; box-shadow: none }
}
@media (max-width: 42rem) {
  .bar-inner, .shell { width: calc(100% - 1.5rem) }
  .bar-inner { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: .65rem .4rem; padding: .75rem 0 }
  .global-search { grid-column: 1/-1; grid-row: 2; width: 100%; max-width: none }
  .appearance { grid-column: 2; grid-row: 1 }
  .environment-name { grid-column: 3; grid-row: 1; justify-self: end; font-size: .69rem }
  .bar .brand { font-size: 1.2rem }
  .bar .brand img { width: 26px; height: 26px; margin-right: .35rem }
  .page-heading { padding: 1.4rem 0 1rem }
  .pair-control { min-width: 0; max-width: 45% }
  .overview { grid-template-columns: 1fr; gap: .65rem }
  .block-hero { min-height: 8.4rem; padding: 1rem }
  .overview-facts dl { padding: .85rem 0 }
  .overview-facts dl > div { padding: 0 .7rem }
  .overview-facts dd { margin-top: .38rem; font-size: clamp(.95rem,3.6vw,1.25rem) }
  .overview-facts dt { gap: .3rem; font-size: .58rem }
  .overview-facts svg { width: 1.75rem; height: 1.75rem; padding: .25rem; border-radius: .45rem }
  #head-label { font-size: .65rem }
  .chain-grid { display: flex; flex-direction: column; gap: .65rem }
  .chain-grid > .panel, .lookup, .detail-panel, .directory { padding: 1rem }
  .lookup { display: block }
  .lookup form { margin-top: .7rem }
  .detail-list { grid-template-columns: 1fr }
  #account-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem }
  .block-columns, .block-row { grid-template-columns: minmax(2.8rem,.9fr) minmax(0,1.4fr) 3.6rem 3.6rem; gap: .35rem; padding-inline: .2rem }
  .block-columns { font-size: .58rem }
  .block-row { font-size: .7rem }
  .block-state { padding: .2rem .3rem; font-size: .65rem }
  .depth, .quote, .book { padding: 1rem }
  .identity { grid-template-columns: repeat(2,minmax(0,1fr)) }
  .directory th, .directory td { font-size: .72rem }
  .directory th small { display: block }
  footer { gap: .75rem }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }

:root[data-theme="light"] { color-scheme: light }
:root[data-theme="dark"] { color-scheme: dark }
.appearance {
  display: inline-flex;
  flex: none;
  gap: .12rem;
  margin: 0;
  padding: .12rem;
  min-inline-size: 0;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--second);
}
.theme-option { position: relative; display: block }
.theme-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.theme-option svg {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  padding: .4rem;
  border-radius: 50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--sub);
  pointer-events: none;
}
.theme-option:hover svg { background: var(--surface) }
.theme-option input:checked + svg { background: var(--mint); color: var(--accent) }
.theme-option input:focus-visible + svg { outline: 2px solid var(--accent); outline-offset: 2px }

/* The ranked directory and the lookup have different jobs on the account index. */
.accounts-layout {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(14.5rem,23%);
  gap: .95rem; align-items: start;
}
#back-accounts:not([hidden]) { display: inline-block; margin-bottom: .8rem }
.accounts-layout > .panel { margin: 0; }
.lookup {
  display: block; padding: 1.15rem;
  background: linear-gradient(145deg,var(--sheet-tint),var(--surface) 72%);
}
.lookup h2 { font-size: 1.13rem }
.lookup form { margin-top: 1rem; display: grid; gap: .52rem }
.lookup form label { font-size: .76rem; color: var(--sub) }
.lookup form input { width: 100%; font-size: .85rem; padding: .62rem .7rem; box-shadow: inset 0 1px 2px #19382b10 }
.lookup form button { justify-self: start; display: inline-flex; gap: 1rem; align-items: center; padding: .52rem .9rem; font-size: .8rem }
.funded-accounts { overflow: hidden; box-shadow: var(--raised-shadow) }
.holder-heading {
  position: relative; padding: 1.3rem 1.45rem;
  background: linear-gradient(115deg, #153b2e, #1d4836 68%, #2c5239);
  color: #f1f8e9;
}
.holder-heading h2 { font-size: 1.45rem }
.holder-heading .compact { color: #f0f7eb; background: #204835; border-color: #62816a; box-shadow: none }
.holder-heading .compact:hover { background: #315a43 }
.holder-summary { display: flex; gap: clamp(1.25rem,4vw,4rem); margin-top: 1.25rem }
.holder-summary div + div { border-left: 1px solid #4e7158; padding-left: clamp(1.25rem,4vw,4rem) }
.holder-summary dt { color: #cadfc8; font: 500 .66rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .045em }
.holder-summary dd { margin-top: .25rem; font-size: clamp(1.4rem,2.4vw,2.1rem); font-variant-numeric: tabular-nums; letter-spacing: -.05em; line-height: 1.15; overflow-wrap: anywhere }
.holder-summary small { font: .7rem/1 var(--mono); letter-spacing: .04em; color: #d5e8c3 }
#funded-status { margin: 0; padding: .68rem 1.45rem; font: .73rem/1.5 var(--mono) }
#funded-table { table-layout: fixed }
#funded-table th, #funded-table td { padding: .77rem .6rem; width: auto }
#funded-table thead { background: var(--second); border-block: 1px solid var(--line) }
#funded-table th { font-size: .63rem; line-height: 1.45 }
#funded-table .holder-rank { width: 4.2rem; white-space: nowrap; text-align: left; padding-left: 1.45rem; color: var(--sub) }
#funded-table .holder-address { text-align: left }
#funded-table .holder-balance { width: 21%; text-align: right }
#funded-table .holder-share { width: 18%; text-align: right; padding-right: 1.45rem }
#funded-table tbody td { font-size: .83rem; font-variant-numeric: tabular-nums }
#funded-table td.holder-balance { font-weight: 650 }
#funded-table td.holder-share::after {
  content: ""; display: block; width: min(5.5rem,100%); height: .2rem;
  margin: .31rem 0 0 auto; border-radius: 1rem;
  background: linear-gradient(to right, var(--accent) var(--holder-weight), var(--line) var(--holder-weight));
}
#funded-table tbody tr { background: none }
#funded-table tbody tr:is(:hover,:focus-within) { background: var(--sheet-tint) }
#balance-sort { padding: .32rem .1rem; border: 0; background: transparent; color: var(--accent); font: inherit; text-transform: inherit; letter-spacing: inherit }
.holder-identity { display: flex; align-items: center; gap: .12rem; min-width: 0 }
.holder-copy { flex: none; display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; padding: 0; background: transparent; color: var(--sub); border: 1px solid transparent }
.holder-copy:is(:hover,:focus-visible) { color: var(--accent); border-color: var(--line); background: var(--surface) }
.holder-id { display: flex; align-items: center; gap: .48rem; min-width: 0; text-decoration: none; color: var(--accent) }
.holder-id:hover { text-decoration: underline }
.holder-id .address-full { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.holder-id .address-short { display: none }
.holder-icon { color: light-dark(#427355,#a7d5b2); background: light-dark(#e3efdd,#304637); display: inline-block; width: 1.65rem; height: 1.65rem; flex: none; border-radius: .42rem }
.holder-icon[data-tone="1"] { color: light-dark(#685789,#bea5df); background: light-dark(#ece7f2,#3e3347) }
.holder-icon[data-tone="2"] { color: light-dark(#88663f,#d9b38e); background: light-dark(#f4e8d9,#493b2e) }
.holder-icon[data-tone="3"] { color: light-dark(#456c89,#9cc9d8); background: light-dark(#dfeef2,#2b4149) }
.holder-icon[data-tone="4"] { color: light-dark(#974e58,#dba3aa); background: light-dark(#f5e4e5,#4b3037) }
.holder-icon[data-tone="5"] { color: light-dark(#667338,#cbd98f); background: light-dark(#eaf0da,#40472c) }
#funded-copy-status { padding: .5rem 1rem; margin: 0; overflow-wrap: anywhere; color: var(--accent) }
#funded-pages { padding: .65rem 1.45rem; border-top: 1px solid var(--line); font: .72rem/1.4 var(--mono) }
.holder-page-actions { display: inline-flex; gap: .35rem }
@media (max-width:68rem) {
  .theme-option svg { width: 2.25rem; height: 2.25rem; padding: .59rem }
}
@media (max-width:60rem) {
  .accounts-layout { grid-template-columns: minmax(0,1fr) minmax(13rem,25%) }
  #funded-table .holder-rank { width: 3rem; padding-left: .8rem }
  .holder-id .address-short { display: flex; min-width: 0; white-space: nowrap; overflow: hidden }
  .address-short .address-prefix { min-width: 0; overflow: hidden }
  .address-short .address-suffix { flex: none }
  .holder-id:has(.address-short) .address-full { display: none }
}
@media (max-width:48rem) {
  .accounts-layout { grid-template-columns: minmax(0,1fr) }
  .accounts-layout .lookup form { grid-template-columns: minmax(0,1fr) auto; gap: .4rem; margin-top: .55rem }
  .lookup form label { grid-column: 1/-1 }
}
@media (max-width:36rem) {
  .overview .head-formation { width: 49%; right: .25rem }
  .holder-heading { padding: .95rem 1rem }
  .holder-heading h2 { font-size: 1.25rem }
  .holder-summary { gap: 1rem; margin-top: .85rem }
  .holder-summary div + div { padding-left: 1rem }
  .holder-summary dt { font-size: .59rem }
  #funded-status { padding: .65rem 1rem; font-size: .69rem }
  #funded-table .holder-rank { width: 2.7rem }
  #funded-table .holder-balance { width: 35%; padding-right: .8rem }
  #funded-table td.holder-balance { font-size: .78rem }
  #funded-table .holder-share { display: none }
  #funded-table th, #funded-table td { padding: .65rem .34rem }
  .holder-icon { width: 1.35rem; height: 1.35rem }
  #funded-pages { padding: .6rem .8rem }
}
@media (max-width:24rem) {
  .bar-inner { grid-template-columns: auto auto minmax(0,1fr); column-gap: .34rem }
  #funded-table .holder-rank { width: 2.4rem; padding-left: .56rem }
  #funded-table .holder-balance { width: 32% }
  .holder-id { gap: .3rem }
  .holder-id .address-short { font-size: .76rem }
  .theme-option svg { width: 1.92rem; height: 2.12rem; padding: .47rem }
}

/* Localnet keeps the same instruments with a distinct, persistent environment marker. */
html[data-environment="localnet"] {
  --demo-ink: light-dark(#6a401e, #f1c98a);
  --demo-line: light-dark(#dfc39b, #66533b);
  --demo-wash: light-dark(#faf1df, #332c21);
  --canvas-top: light-dark(#f3eee5, #22231e);
}
html[data-environment="localnet"] .environment-name {
  border-color: var(--demo-line); color: var(--demo-ink); background: var(--demo-wash);
}
html[data-environment="localnet"] .environment-name::before { border-radius: 1px; transform: rotate(45deg) }
html[data-environment="localnet"] .navigation a[aria-current] {
  color: var(--demo-ink); background: var(--demo-wash); border-color: var(--demo-line);
}
.localnet-context { color: var(--demo-ink); background: var(--demo-wash); border-block: 1px solid var(--demo-line) }
.localnet-context-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .28rem 1rem; width: min(calc(100% - 4rem),86rem); margin-inline: auto;
  padding-block: .42rem; font: .74rem/1.4 var(--mono);
}
.localnet-context a { color: inherit; font: 650 .8rem/1.4 var(--sans); text-decoration: none }
.localnet-context a:hover { text-decoration: underline }
.demo-home { padding-top: clamp(1.3rem,3vw,2.75rem) }
.demo-intro {
  display: flex; align-items: center; min-height: clamp(14rem,21vw,19rem);
  position: relative; isolation: isolate; overflow: hidden; padding: clamp(1.45rem, 4.4vw, 4rem);
  border: 1px solid #454436; border-radius: .85rem; color: #faf6e9;
  background: radial-gradient(ellipse at 85% 48%,#56513b 0,transparent 64%),linear-gradient(105deg,#252d27,#363c2d);
  box-shadow: var(--raised-shadow);
}
.demo-intro-copy { max-width: min(58%,40rem) }
.demo-intro h1 { font-size: clamp(2.65rem,4.9vw,4.6rem); line-height: 1; letter-spacing: -.065em }
.demo-intro p { margin: .9rem 0 0; max-width: 36rem; color: #e2deca; font-size: clamp(.95rem,1.35vw,1.13rem); line-height: 1.5 }
.demo-terrain {
  position: absolute; z-index: -1; right: -4%; width: 53%; height: 135%; top: -17%;
  color: #d6bc80; opacity: .78; pointer-events: none; mask-image: linear-gradient(to right,transparent,black 34%);
}
.demo-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem }
.demo-card {
  display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto 1fr; align-items: start;
  gap: .85rem 1rem; padding: clamp(1.15rem,2.7vw,2.15rem);
}
.demo-card h2 { margin: .15rem 0 .44rem; font-size: clamp(1.3rem,2vw,1.85rem); letter-spacing: -.045em }
.demo-card p { margin: 0; max-width: 30rem; color: var(--sub); line-height: 1.55; font-size: .94rem }
.demo-card-icon {
  display: grid; place-items: center; color: var(--demo-ink); border: 1px solid var(--demo-line);
  background: var(--demo-wash); box-shadow: inset 0 1px 0 var(--edge-light);
  width: 2.7rem; height: 2.7rem; border-radius: .7rem;
}
.demo-card-icon svg { width: 1.35rem; height: 1.35rem }
.demo-card-actions, .demo-source-link { grid-column: 2 }
.demo-card-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .25rem }
.demo-card-actions a {
  display: inline-flex; align-items: center; gap: .65rem; border: 1px solid var(--desk-line,var(--line));
  border-radius: .42rem; background: var(--second); color: var(--text); font-size: .82rem; font-weight: 640;
  padding: .55rem .72rem; text-decoration: none;
}
.demo-card-actions a:hover { border-color: var(--demo-line); background: var(--demo-wash); color: var(--demo-ink) }
.demo-source-link { font-size: .8rem; font-weight: 550; color: var(--sub); justify-self: start }
@media (max-width: 68rem) {
  .localnet-context-inner { width: calc(100% - 2rem) }
}
@media (max-width: 42rem) {
  .localnet-context-inner { width: calc(100% - 1.5rem); font-size: .66rem; gap: .22rem .45rem }
  .localnet-context a { font-size: .71rem }
  .demo-examples { grid-template-columns: 1fr; gap: .65rem; margin-top: .65rem }
  .demo-intro { align-items: end; min-height: 15rem; }
  .demo-intro-copy { max-width: none; }
  .demo-terrain { width: 80%; height: 90%; top: -28%; right: -10%; opacity: .52; mask-image: linear-gradient(to bottom, black, transparent 94%) }
}
@media (max-width: 24rem) {
  .environment-name { font: 620 .68rem/1.3 var(--sans); padding: .3rem .4rem; gap: .3rem }
  .environment-name::before { display: none }
  .localnet-context-inner { font-size: .6rem }
  .demo-card { gap: .7rem; }
  .demo-card-icon { width: 2.1rem; height: 2.1rem }
  .demo-card-actions, .demo-source-link { grid-column: 1/-1 }
  .demo-card-actions a { padding: .52rem .58rem; gap: .4rem }
}
