:root {
  --subnet-tab-width: 46px;
  --subnet-thumbnail-width: 224px;
  --subnet-edge-offset: 50px;
  color-scheme: dark;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  --space: #040303;
  --space-soft: #0b0908;
  --paper: #eee9e1;
  --paper-muted: #bdb6ad;
  --line: rgba(238, 233, 225, .17);
  --line-strong: rgba(238, 233, 225, .32);
  --ember: #d7a46d;
  --ember-soft: #9a6948;
  --danger: #ffb8ad;
  --gutter: clamp(1.25rem, 5.8vw, 7rem);
  --content: 92rem;
}

* { box-sizing: border-box; }
html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: min(20rem, 100%);
  overflow-x: clip;
  background: var(--space);
  color: var(--paper);
}
html::-webkit-scrollbar { width: .72rem; }
html::-webkit-scrollbar-track {
  background: rgba(140, 137, 132, .16);
  box-shadow: inset 0 0 .38rem rgba(255, 255, 255, .07);
}
html::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb:hover {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 252, 244, .76);
  background-clip: padding-box;
  box-shadow: inset 0 0 .35rem rgba(255, 255, 255, .9), 0 0 .45rem rgba(255, 248, 218, .54);
}
html::-webkit-scrollbar-button:single-button {
  height: .72rem;
  background-color: rgba(140, 137, 132, .12);
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 .22rem rgba(255, 248, 218, .8));
}
html::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image:
    linear-gradient(135deg, transparent 46%, rgba(255, 255, 255, .9) 47% 57%, transparent 58%),
    linear-gradient(225deg, transparent 46%, rgba(255, 255, 255, .9) 47% 57%, transparent 58%);
  background-position: calc(50% - .12rem) 55%, calc(50% + .12rem) 55%;
  background-size: .38rem .38rem;
}
html::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image:
    linear-gradient(45deg, transparent 46%, rgba(255, 255, 255, .9) 47% 57%, transparent 58%),
    linear-gradient(315deg, transparent 46%, rgba(255, 255, 255, .9) 47% 57%, transparent 58%);
  background-position: calc(50% - .12rem) 45%, calc(50% + .12rem) 45%;
  background-size: .38rem .38rem;
}
body::selection { color: var(--space); background: var(--paper); }
a { color: inherit; }

@media (min-width: 93.75rem) {
  html { font-size: 1.0666667vw; }
  :root { --subnet-thumbnail-width: clamp(224px, calc(108px + 6.6rem), 244px); }
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: .75rem 1rem;
  background: var(--paper);
  color: var(--space);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  overflow: visible;
  padding: 0 var(--gutter) max(1.5rem, 4svh);
  background: transparent;
}
.hero__art {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: var(--space);
  opacity: 1;
  will-change: opacity;
}
.hero__placeholder,
.hero__detail {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.hero__detail {
  z-index: 1;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(.22, 1, .36, 1);
}
.hero__detail--loaded { opacity: 1; }
.hero__compact-mark { display: none; }

footer a {
  text-decoration: none;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.wordmark {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .13em;
}
.wordmark__dot { color: var(--ember); }
footer a:hover,
footer a:focus-visible { color: var(--paper); }

.hero__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: min(43vw, 46rem);
  padding-block: clamp(5rem, 10svh, 7rem) clamp(3rem, 8svh, 7rem);
}
.kicker,
.section-label,
.panel__eyebrow,
.memo-result__label {
  margin: 0;
  color: var(--paper-muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
}
.kicker { margin: 0 0 1.75rem clamp(.25rem, .35vw, .45rem); color: rgba(238, 233, 225, .82); }
h1,
.hero__compact-mark {
  margin: 0;
  font-size: clamp(3rem, calc(1rem + 5.3vw), 8.5rem);
  font-weight: 300;
  letter-spacing: .075em;
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow:
    0 0 .035em rgb(255 240 219 / .7),
    0 0 .12em rgb(244 223 197 / .7),
    0 0 .36em rgb(205 158 126 / .55),
    0 0 .75em rgb(155 106 78 / .35);
}
h1 { max-width: 100%; scroll-margin-top: calc(clamp(5rem, 10svh, 7rem) + 2.77rem); }
h1 span { display: block; width: max-content; max-width: 100%; overflow-wrap: anywhere; }
h1 span:first-child { margin-bottom: .13em; }
.hero__lead {
  max-width: 35rem;
  margin: clamp(1.75rem, 4vh, 3.25rem) 0 0;
  color: rgba(238, 233, 225, .78);
  font-size: clamp(.88rem, 1.12vw, 1rem);
  line-height: 1.7;
}
.hero__action {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  margin-top: clamp(1.75rem, 4vh, 3rem);
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(238, 233, 225, .55);
  text-decoration: none;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero__action span { color: var(--ember); font-size: 1rem; }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  align-self: flex-end;
  gap: clamp(.75rem, 1.8vw, 2rem);
}
.hero__facts a {
  display: grid;
  /* Reserve the widest brand mark's column for every link, so labels align. */
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  min-width: 0;
  min-height: 44px;
  color: rgba(238, 233, 225, .68);
  font-size: .62rem;
  line-height: 1.5;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero__facts a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: .3em; }
.hero__facts a:focus-visible,
.project-detail:focus-visible,
.project-detail__links a:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}
.hero__facts { text-shadow: 0 1px 3px #000, 0 0 8px #000; }
.hero__facts span { min-width: 0; overflow-wrap: anywhere; }
.hero__facts .hero__fact-icon { justify-self: center; }
.hero__fact-icon { flex: none; width: 24px; height: 24px; object-fit: contain; }
/* The official ICP favicon includes transparent clear space around the wide
   infinity. A 44px box displays its unchanged mark at about 39 × 20px. */
.hero__fact-icon--wide { width: 44px; height: 44px; }

@keyframes hero-art-scroll-fade {
  from { opacity: 1; }
  to { opacity: .14; }
}
@supports (animation-timeline: scroll()) and (animation-range: 0 100svh) {
  .hero__art {
    animation: hero-art-scroll-fade 1ms linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 100svh;
  }
}

main { position: relative; overflow: hidden; }
main::before {
  position: absolute;
  top: 15rem;
  right: -25rem;
  width: 50rem;
  height: 50rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 82, 49, .11), transparent 68%);
  content: "";
  pointer-events: none;
}
.manifesto,
.section,
.instances-note,
footer {
  width: min(var(--content), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}
.manifesto { border-bottom: 1px solid var(--line); }
.manifesto h2,
.section-disclosure__summary h2,
.instances-note h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.4vw, 5.4rem);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1;
}
.section-disclosure__intro {
  margin: 0;
  color: var(--paper-muted);
  font-size: .98rem;
  line-height: 1.75;
}

.section { border-bottom: 1px solid var(--line); }
#network, #complete, #open-deployment { scroll-margin-top: 2rem; }
.completion-guide .pricing { color: var(--paper-muted); }
.completion-guide a { color: var(--paper); text-underline-offset: .25em; }
.completion-guide a:focus-visible,
.memo-result__edit a:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.memo-result__edit { margin: 1rem 0 0; font-size: .75rem; }
.memo-result__edit a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; text-underline-offset: .25em; }
.section-disclosure { min-width: 0; }
.section-disclosure__summary {
  display: block;
  padding-block: 2rem;
  cursor: pointer;
  list-style: none;
}
.section-disclosure__summary::-webkit-details-marker { display: none; }

.section-disclosure__summary:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
.section-disclosure__summary h2 {
  overflow-wrap: anywhere;
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 3.9fr) 1rem;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}
.section-disclosure__summary .section-label { margin: 0; }
.section-disclosure__body { padding-bottom: clamp(2rem, 4vw, 4rem); }
.section-disclosure__intro { margin-bottom: 2rem; }
.section-disclosure__indicator {
  display: block;
  width: .65rem;
  height: .65rem;
  justify-self: end;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.section-disclosure[open] > summary .section-disclosure__indicator { transform: rotate(225deg); }
@media (prefers-reduced-motion: reduce) {
  .section-disclosure__indicator { transition: none; }
}

.network-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.panel { min-width: 0; padding: clamp(1.5rem, 3.4vw, 3.5rem); background: rgba(10, 8, 7, .92); }
.panel__topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--paper-muted);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.status__light { width: .35rem; height: .35rem; border-radius: 50%; background: var(--ember); box-shadow: 0 0 .65rem var(--ember); }
.field {
  display: grid;
  gap: .65rem;
  color: var(--paper-muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}
.field--select { margin: 2rem 0; }
input,
select {
  width: 100%;
  min-height: 3.5rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: rgba(238, 233, 225, .035);
  color: var(--paper);
  padding: .85rem 1rem;
  font: inherit;
  font-size: .94rem;
  letter-spacing: 0;
  text-transform: none;
}
select { cursor: pointer; }
input::placeholder { color: rgba(238, 233, 225, .35); }
input:hover,
select:hover { border-color: rgba(238, 233, 225, .55); }
input:focus-visible,
select:focus-visible { border-color: var(--ember); box-shadow: 0 1px 0 var(--ember); }
input:disabled,
select:disabled { cursor: not-allowed; opacity: .45; }
.instance-info {
  overflow-wrap: anywhere;
  color: var(--paper-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .72rem;
  line-height: 1.9;
}
.instance-info strong { color: var(--paper); font-family: Inter, "Helvetica Neue", Arial, sans-serif; font-size: .9rem; font-weight: 500; }
.pricing { padding-block: 1.1rem; color: var(--paper); font-size: .88rem; line-height: 1.75; }
.pricing p { margin: 1.1rem 0; }
.pricing strong { color: var(--ember); font-weight: 500; }
.pricing.error { color: var(--danger); }
.panel__note { margin: 1.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--paper-muted); font-size: .78rem; line-height: 1.7; }

.builder-card {
  display: grid;
  grid-template-columns: minmax(12rem, .65fr) minmax(0, 1.55fr);
  column-gap: clamp(2rem, 7vw, 8rem);
  padding: clamp(1.5rem, 4vw, 4.5rem);
  background: var(--paper);
  color: var(--space);
}
.builder-card__intro { padding-right: clamp(0rem, 2vw, 2rem); }
.builder-card .panel__eyebrow { color: #6e665d; }
.builder-card__intro > p:last-child { margin: 1.5rem 0 0; color: #5c554e; font-size: .88rem; line-height: 1.75; }
form { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.75rem; }
.builder-card .field { color: #5e5750; }
.builder-card input,
.builder-card select { border-color: rgba(4, 3, 3, .28); background: rgba(4, 3, 3, .035); color: var(--space); }
.builder-card input::placeholder { color: rgba(4, 3, 3, .38); }
.builder-card input:hover,
.builder-card select:hover { border-color: rgba(4, 3, 3, .58); }
.builder-card input:focus-visible,
.builder-card select:focus-visible { border-color: #8a5c3d; box-shadow: 0 1px 0 #8a5c3d; }
.field--wide { grid-column: 1 / -1; }
.account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; grid-column: 1 / -1; }
.account-fields[hidden],
.range-fields[hidden],
#single-field[hidden] { display: none; }
.range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.memo {
  display: block;
  min-height: 4rem;
  margin-top: 1rem;
  padding: 1.15rem 1.25rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  background: rgba(4, 3, 3, .6);
  color: var(--paper);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .82rem;
  line-height: 1.55;
}
.help { min-height: 1.5em; margin: 1rem 0 0; color: var(--paper-muted); font-size: .75rem; line-height: 1.6; }
.help.error { color: var(--danger); }
.builder-card__footnote { grid-column: 2; margin: 2.25rem 0 0; color: #6e665d; font-size: .72rem; line-height: 1.7; }
.builder-card__footnote a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--space); text-underline-offset: .25em; }
.builder-card__footnote a:focus-visible { outline: 2px solid var(--space); outline-offset: 4px; }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle { min-height: 23rem; padding: clamp(1.5rem, 3.6vw, 3.75rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle__number { margin: 0 0 clamp(3rem, 8vw, 8rem); color: var(--ember); font-size: .65rem; letter-spacing: .16em; }
.principle h3 { margin: 0 0 1.25rem; font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 400; }
.principle > p:last-child { max-width: 34rem; margin: 0; color: var(--paper-muted); font-size: .88rem; line-height: 1.75; }
code { color: #e6c8a6; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em; }

.instances-note { border-bottom: 1px solid var(--line); }
.project-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; padding-block: 2.5rem; border-top: 1px solid var(--line); scroll-margin-top: 2rem; }
.project-detail h3 { display: flex; align-items: center; gap: 1rem; }
@media (max-width: 56rem) { .project-detail { grid-template-columns: 1fr; } }
.project-detail h3 { margin: 0; font-size: clamp(1.7rem, 2.6vw, 2.8rem); font-weight: 300; line-height: 1.15; letter-spacing: -.025em; }
.project-detail h3 .hero__fact-icon { width: 32px; height: 32px; }
.project-detail h3 .hero__fact-icon--wide { width: 52px; height: 52px; }
.project-detail h3 span { min-width: 0; overflow-wrap: anywhere; }
.project-detail p { max-width: 65ch; margin: 0 0 1rem; color: var(--paper-muted); font-size: .98rem; line-height: 1.75; }
.project-detail p:last-child { margin-bottom: 0; }
.project-detail__links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; padding-top: .5rem; }
.project-detail__links a { color: var(--paper); text-underline-offset: .25em; }
.project-detail__links a:hover { color: var(--ember); }
footer { position: relative; isolation: isolate; display: flex; min-height: 9rem; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); color: var(--paper-muted); }
footer::before { position: absolute; inset: 0; z-index: -1; background: rgba(4, 3, 3, .94); box-shadow: 0 0 0 100vmax rgba(4, 3, 3, .94); clip-path: inset(0 -100vmax); content: ""; }
footer p { margin: 0; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }

@media (max-width: 64rem) {
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; }
  .network-grid { grid-template-columns: 1fr; }
  .builder-card { grid-template-columns: 1fr; }
  .builder-card__intro { margin-bottom: 3rem; }
  .builder-card__footnote { grid-column: 1; }
  }

@media (max-width: 81.25rem), (max-aspect-ratio: 1/1) {
  /* Restore the pre-counter art-first layout (41e088f): its cropped height is
     941 / (1672 * .7) of the viewport width. The large title, lead and CTA must
     begin below that artwork; shrinking this space makes them cover the ring.
     The ledger gets its own first-row region, so it does not move down with them. */
  .hero {
    --hero-art-height: calc(100vw * 941 / (1672 * .7));
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(var(--hero-art-height), auto) auto auto;
    min-height: 0; padding-top: 0; overflow: visible; background: transparent;
  }
  .hero__art {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: calc(1672 * .7) / 941;
    margin: 0;
  }
  .hero__detail { object-position: 100% 50%; }
  .hero__body { width: 100%; padding-block: 0 clamp(2.5rem, 8svh, 5rem); }
  .hero__facts { align-self: stretch; padding-bottom: 1.5rem; }
  h1 { font-size: clamp(2.75rem, calc(1rem + 8.9vw), 5.25rem); }
  .hero__lead { max-width: 40rem; }
}

@supports (animation-timeline: scroll()) and (animation-range: 0 100svh) {
  @media (max-width: 81.25rem), (max-aspect-ratio: 1/1) {
    .hero__art { animation-range: 0 80.398vw; }
  }
}

/* Use the SAME eligibility as the art-first layout. The former landscape-only
   condition hid EVH on near-square/tall windows regardless of heading tolerance. */
@media (max-width: 81.25rem), (max-aspect-ratio: 1/1) {
  .hero__compact-mark {
    position: absolute;
    top: var(--gutter);
    left: var(--gutter);
    padding-bottom: .21em;
    z-index: 2;
    color: var(--paper);
    text-decoration: none;
    text-shadow:
      0 0 .035em rgb(255 240 219 / .48),
      0 0 .12em rgb(244 223 197 / .45),
      0 0 .36em rgb(205 158 126 / .34),
      0 0 .75em rgb(155 106 78 / .2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .hero__compact-arrow {
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% - .075em);
    height: .18em;
    /* Keep the glow on an unclipped wrapper. Applying filter to the clipped
       polygon itself clips away the halo that should match the lettering. */
    filter:
      drop-shadow(0 0 .035em rgb(255 240 219 / .48))
      drop-shadow(0 0 .12em rgb(244 223 197 / .45))
      drop-shadow(0 0 .36em rgb(205 158 126 / .34))
      drop-shadow(0 0 .75em rgb(155 106 78 / .2));
    transition: filter .45s ease-out;
    pointer-events: auto;
  }
  .hero__compact-arrow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--paper);
    clip-path: polygon(0 0, 100% 0, 100% 28%, 50% 100%, 0 28%);
  }
  /* EVH fits the dark corner without covering the ring. Width/aspect alone
     cannot prove the full title is below view (tall viewports, zoom and reflow).
     Keep the observer gate: a bounded bottom-edge title reveal is tolerated;
     a substantially visible full heading replaces the compact brand. */
  /* Keep display gated by JS so no-script and observer failures stay closed.
     Opacity smooths real viewport/zoom transitions; visibility waits for the
     fade while JS removes the hidden link from focus/accessibility immediately. */
  .hero__compact-mark--ready {
    display: block;
    transition: opacity .7s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .7s, text-shadow .45s ease-out;
  }
  .hero__compact-mark--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .hero__compact-mark:focus-visible {
    outline: 1px solid var(--paper);
    outline-offset: .2em;
  }
  .hero__compact-mark:is(:hover, :focus-visible) {
    text-shadow:
      0 0 .035em rgb(255 240 219 / .67),
      0 0 .12em rgb(244 223 197 / .64),
      0 0 .36em rgb(205 158 126 / .48),
      0 0 .75em rgb(155 106 78 / .3);
  }
  .hero__compact-mark:is(:hover, :focus-visible) .hero__compact-arrow {
    filter:
      drop-shadow(0 0 .035em rgb(255 240 219 / .67))
      drop-shadow(0 0 .12em rgb(244 223 197 / .64))
      drop-shadow(0 0 .36em rgb(205 158 126 / .48))
      drop-shadow(0 0 .75em rgb(155 106 78 / .3));
  }
}

@media (max-width: 44rem) {
  :root { --gutter: 1.25rem; }
  .hero__facts { grid-template-columns: 1fr; gap: .7rem; }
  .section-disclosure__summary h2 { grid-template-columns: minmax(0, 1fr) 1rem; gap: 1rem; }
  .section-disclosure__summary .section-label { grid-column: 1; }
  .section-disclosure__title { grid-column: 1; }
  .section-disclosure__summary h2 > .section-disclosure__indicator { grid-column: 2; grid-row: 1 / span 2; }
  .panel { padding: 1.35rem; }
  .panel__topline { align-items: flex-start; }
  form,
  .account-fields,
  .range-fields { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .builder-card { padding: 1.35rem; }
  .principles { grid-template-columns: 1fr; }
  .principle { min-height: 19rem; }
  footer { flex-wrap: wrap; padding-block: 2rem; }
  footer p { order: 3; width: 100%; }
}

@media (forced-colors: active), (prefers-contrast: more) {
  h1 { text-shadow: none; }
  .hero__art { display: none; }
  .hero { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__detail { transition: none; }
  .hero__compact-mark--ready,
  .hero__compact-arrow { transition: none; }
}

/* Unboxed lower-right typography: above the fourth hero link on wide desktop, in a separate
   artwork region on compact screens. Long values/errors expand normal flow. */
.hero__stat-region { display: contents; }
.hero__bottom { display: flex; flex-direction: column; gap: 1.25rem; margin-top: auto; min-width: 0; }
.ledger-stat { align-self: flex-end; width: min(100%, 40rem); text-align: right; text-shadow: 0 1px 2px rgb(0 0 0 / .98), 0 0 8px rgb(0 0 0 / .95), 0 0 20px rgb(0 0 0 / .82), 0 0 36px rgb(0 0 0 / .6); }
.ledger-stat h2 {
  margin: 0;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--paper-muted);
  letter-spacing: .13em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  /* The small label crosses the brightest part of the artwork. Give it a
     tighter, denser shadow than the larger rate and total without adding a panel. */
  text-shadow:
    -1px -1px 1px #000,
    1px -1px 1px #000,
    -1px 1px 1px #000,
    1px 1px 1px #000,
    0 2px 4px #000,
    0 0 10px #000,
    0 0 22px #000,
    0 0 40px rgb(0 0 0 / .95);
}
.ledger-stat__reading { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: .25rem .8rem; margin: .35rem 0; font-variant-numeric: tabular-nums; }
.ledger-stat__number { margin: 0; min-height: 1.15em; max-width: 100%; font-size: clamp(2rem, 4.1vw, 4rem); font-weight: 400; line-height: 1.15; overflow-wrap: anywhere; }
#ledger-rate { text-align: right; min-width: 9ch; min-height: 1.5em; color: var(--paper-muted); font-size: .95rem; overflow-wrap: anywhere; max-width: 100%; }
#ledger-status, #ledger-checked { margin: .35rem 0; font-size: .72rem; line-height: 1.5; color: var(--paper-muted); overflow-wrap: anywhere; }
/* Reserve two notice lines even when its paragraph is hidden: showing/clearing
   a transient warning must not move the bottom-aligned count or its label. */
.ledger-stat__notice { min-height: 3em; font-size: .72rem; line-height: 1.5; }
#ledger-status { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 81.251rem) and (min-aspect-ratio: 1/1) {
  .hero__body { padding-bottom: 1rem; }
}
@media (max-width: 81.25rem), (max-aspect-ratio: 1/1) {
  .hero__body { padding-bottom: 1.5rem; }
  .hero__facts { padding-bottom: 0; }
}
@media (max-width: 44rem) {
  .hero__lead { margin-top: 1rem; }
  .hero__action { margin-top: 1rem; }
  .hero__bottom { gap: 1rem; }
  .hero__facts { text-align: left; }
  .hero__facts a { justify-content: flex-start; }
  .kicker { margin-bottom: 1rem; }
}
/* Compact artwork is separate from the full-text flow on every compact size,
   not just short landscape. Keep the counter in the artwork’s lower-right first
   view; long values/errors grow the row rather than colliding with body text. */
@media (max-width: 81.25rem), (max-aspect-ratio: 1/1) {
  .hero__bottom { display: contents; }
  .hero__stat-region {
    grid-row: 1; grid-column: 1; align-self: start;
    display: flex; flex-direction: column; justify-content: flex-end;
    min-width: 0; min-height: min(var(--hero-art-height), 100svh);
    padding-block: 6rem clamp(2rem, 7svh, 4rem);
  }
  .hero__body { grid-row: 2; grid-column: 1; margin-top: 2rem; }
  .hero__facts { grid-row: 3; grid-column: 1; }
}

/* On narrow portrait screens the artwork is shallow relative to the viewport.
   Keep the statistic close to that artwork's lower edge instead of leaving a
   large empty band below it. The flex region still caps its bottom at the SVG,
   so the count cannot drift into the full title and body flow. */
@media (max-width: 44rem) and (max-aspect-ratio: 1/1) {
  .hero__stat-region { padding-bottom: clamp(.25rem, 1svh, .75rem); }
}

.operating-status { margin: 1.5rem 0 2rem; padding-block: 1.25rem; border-block: 1px solid var(--line); }
.operating-status__heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; }
.operating-status h3 { margin: 0; font-size: .72rem; color: var(--paper-muted); letter-spacing: .1em; text-transform: uppercase; }
#operating-tier { color: var(--ember); font-size: .9rem; }
.operating-status p { margin: .65rem 0 0; line-height: 1.6; font-size: .78rem; overflow-wrap: anywhere; }
.operating-status__balance { display: flex; align-items: baseline; gap: .65rem; flex-wrap: wrap; color: var(--paper-muted); }
#operating-balance { color: var(--paper); font-size: clamp(1.6rem, 3vw, 2.25rem); font-variant-numeric: tabular-nums; }
.operating-status progress { display: block; width: 100%; height: .45rem; margin-top: 1rem; border: 0; accent-color: var(--ember); background: var(--line); }
.operating-status progress[hidden] { display: none; }
.operating-status progress::-webkit-progress-bar { background: var(--line); }
.operating-status progress::-webkit-progress-value { background: var(--ember); }
.operating-status .operating-status__note { color: var(--paper-muted); font-size: .67rem; }

/* The loading surface stays outside the iframe transform. */
.subnet-section__embed {
  position: relative;
  width: 100%;
  background: var(--space-soft);
}
.subnet-section__embed[data-scaled] { height: var(--subnet-height); }
.subnet-section__embed[data-scaled] .subnet-section__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 760px;
  transform-origin: top left;
  transform: scale(var(--subnet-scale));
}
.subnet-section__frame {
  display: block;
  width: 100%;
  height: 520px;
  border: 1px solid var(--line-strong);
  background: var(--space-soft);
}
.subnet-section__sources { margin: 0; color: var(--paper-muted); font-size: .85rem; line-height: 1.7; }
.subnet-section__sources a { text-underline-offset: .25em; }
.subnet-section__status { margin-top: 1rem; color: var(--paper-muted); font-size: .85rem; line-height: 1.7; }
.subnet-section__status:empty { display: none; }
.subnet-section__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  background: var(--space-soft);
  color: var(--paper-muted);
  font-size: .85rem;
  pointer-events: none;
}
.subnet-section__loading[hidden] { display: none; }
@media (scripting: none) {
  .subnet-section__loading { display: none; }
}
.subnet-section__indicator {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: subnet-loading 1.2s linear infinite;
}
@keyframes subnet-loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .subnet-section__indicator { animation: none; }
}
@media (forced-colors: active) {
  .subnet-section__frame, .subnet-section__loading { border-color: CanvasText; }
  .subnet-section__loading { background: Canvas; color: CanvasText; }
  .subnet-section__indicator { border-color: GrayText; border-top-color: Highlight; }
}

/* Native open/name remains authoritative. Engines without interpolation fade,
   and engines without details-content retain an instantaneous native fallback. */
@supports selector(::details-content) {
  .section-disclosure > .section-disclosure__body {
    opacity: 0;
  }
  .section-disclosure[open] > .section-disclosure__body {
    opacity: 1;
    transition: opacity 280ms ease-in-out;
  }
  @starting-style {
    .section-disclosure[open] > .section-disclosure__body { opacity: 0; }
  }
  @supports (interpolate-size: allow-keywords) {
    .section-disclosure::details-content {
      interpolate-size: allow-keywords;
      block-size: 0;
      overflow: clip;
      transition: block-size 300ms ease-in-out, content-visibility 300ms allow-discrete;
    }
    .section-disclosure[open]::details-content { block-size: auto; }
    .section-disclosure > .section-disclosure__body { transition: opacity 280ms ease-in-out; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .section-disclosure::details-content,
  .section-disclosure > .section-disclosure__body,
  .section-disclosure[open] > .section-disclosure__body { transition: none; }
}
.subnet-widget {
  position: fixed; inset: auto auto max(var(--subnet-edge-offset), env(safe-area-inset-bottom)) 0;
  margin: 0; padding: 0 0 0 env(safe-area-inset-left); width: calc(var(--subnet-thumbnail-width) + env(safe-area-inset-left)); max-width: 100vw;
  border: 1px solid var(--line-strong); background: var(--space); color: var(--paper); z-index: 10;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(var(--subnet-edge-offset), env(safe-area-inset-bottom))); overflow: auto;
}
.subnet-widget:not([open]) { display: none; }
/* Preserve full touch targets in exceptionally short/zoomed non-modal views. */
.subnet-widget:not([data-mode="expanded"]) { scrollbar-width: none; }
.subnet-widget__toolbar { display: flex; align-items: center; gap: .375rem; padding: 0 6px 0 14px; background: var(--space); }
.subnet-widget__toolbar h2 { flex: 1; min-width: 0; margin: 0; font-size: .65rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }
.subnet-widget button { min-width: 44px; min-height: 44px; padding: .5rem; border: 0; background: transparent; color: inherit; font: inherit; font-size: .75rem; cursor: pointer; }
.subnet-widget button:focus-visible, .subnet-widget a:focus-visible { outline: 2px solid var(--ember); outline-offset: -3px; }
.subnet-widget[data-mode="thumbnail"] {
  --preview-scale: .30;
  --preview-width: calc(600px * var(--preview-scale));
  --preview-height: calc(520px * var(--preview-scale));
}
.subnet-widget[data-mode="thumbnail"] .subnet-widget__toolbar { flex-wrap: wrap; justify-content: flex-end; gap: 2px; padding-right: 2px; }
.subnet-widget[data-mode="thumbnail"] .subnet-widget__toolbar h2 { flex-basis: max-content; }
.subnet-widget[data-mode="thumbnail"] .subnet-widget__toolbar button { flex: none; }
@media (max-width: 218px) { .subnet-widget[data-mode="thumbnail"] .subnet-widget__toolbar h2 { flex-basis: 100%; } }
@media (max-width: 184px) { .subnet-widget[data-mode="thumbnail"] { --preview-scale: .25; } }
.subnet-widget[data-mode="thumbnail"] .subnet-section__embed { width: var(--preview-width); height: var(--preview-height); margin: 0 auto 12px; overflow: hidden; pointer-events: none; }
.subnet-widget[data-mode="thumbnail"] .subnet-section__frame { width: 600px; height: 520px; max-width: none; transform: scale(var(--preview-scale)); transform-origin: top left; pointer-events: none; }
.subnet-widget[data-mode="thumbnail"] .subnet-section__loading { inset: 0 0 12px; width: var(--preview-width); margin-inline: auto; padding: .5rem; }
.subnet-widget[data-mode="thumbnail"] .subnet-section__indicator { width: 18px; height: 18px; }
/* The toolbar's single Maximise button also owns the thumbnail hit surface. */
.subnet-widget[data-mode="thumbnail"] .subnet-minimise { position: relative; z-index: 2; }
.subnet-widget[data-mode="thumbnail"] .subnet-maximise::after { content: ""; position: absolute; inset: auto 0 0; height: calc(var(--preview-height) + 12px); z-index: 1; }
.subnet-widget:not([data-mode="expanded"]) .subnet-widget__attribution,
.subnet-widget[data-mode="minimised"] .subnet-widget__toolbar,
.subnet-widget:not([data-mode="minimised"]) .subnet-tab-trigger,
.subnet-widget[data-mode="thumbnail"] .subnet-restore,
.subnet-widget[data-mode="expanded"] .subnet-maximise { display: none; }
.subnet-widget__preview { position: relative; display: flow-root; }
.subnet-widget[data-mode="minimised"] { width: calc(var(--subnet-tab-width) + env(safe-area-inset-left)); }
.subnet-widget[data-mode="minimised"] .subnet-widget__preview { display: none; }
.subnet-widget .subnet-tab-trigger { display: flex; align-items: center; justify-content: center; width: 100%; padding: 16px 0; font-size: .6rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }
.subnet-tab-trigger span { writing-mode: vertical-rl; transform: rotate(180deg); }
@media (max-height: 320px) { :root { --subnet-edge-offset: 12px; } }
/* Leave room for the compact EVH shortcut when zoom leaves no space beside it. */
@media (max-width: 218px) and (max-height: 360px) {
  .subnet-widget[data-mode="thumbnail"] {
    --subnet-edge-offset: 12px;
    max-height: calc(100dvh - max(84px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  }
}
.subnet-control-icon { position: relative; display: inline-block; width: 12px; height: 10px; border: 1px solid currentColor; }
.subnet-control-icon--minimise { height: 0; border: 0; border-top: 1px solid currentColor; vertical-align: middle; }
.subnet-control-icon--restore::before { content: ""; position: absolute; width: 10px; height: 8px; left: 2px; top: -4px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; }
.subnet-widget[data-mode="expanded"] {
  inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  margin: auto;
  width: min(66.667vw, 1200px);
  padding: 0;
  max-width: none;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  overflow: auto;
}
.subnet-widget[data-mode="expanded"] .subnet-widget__toolbar { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.subnet-widget[data-mode="expanded"] .subnet-widget__toolbar h2 { font-size: .75rem; }
@media (max-width: 900px) { .subnet-widget[data-mode="expanded"] { width: calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right))); } }
@media (max-width: 200px) {
  .subnet-widget[data-mode="expanded"] .subnet-widget__toolbar { flex-wrap: wrap; justify-content: flex-end; padding-top: .5rem; }
  .subnet-widget[data-mode="expanded"] .subnet-widget__toolbar h2 { flex-basis: 100%; }
}
.subnet-widget__attribution { padding: 1rem; }
.subnet-widget::backdrop { background: rgb(0 0 0 / .8); }
/* A zoomed landscape window can put the edge panel beside the compact shortcut. */
@media (max-height: 320px) and (min-width: 400px) and (min-aspect-ratio: 1/1) {
  body:has(> .subnet-widget[open][data-mode="minimised"]) .hero__compact-mark { left: max(var(--gutter), calc(var(--subnet-tab-width) + env(safe-area-inset-left) + 12px)); }
  body:has(> .subnet-widget[open][data-mode="thumbnail"]) .hero__compact-mark { left: max(var(--gutter), calc(var(--subnet-thumbnail-width) + env(safe-area-inset-left) + 12px)); }
}
.subnet-fallback { margin: 1rem var(--gutter); }
@media (forced-colors: active) { .subnet-widget { border-color: CanvasText; } }
