  :root {
    --bg: #060606;
    --panel: #0b0b0b;
    --fg: #ffffff;
    --muted: #a2a2a2;
    --dim: #6a6a6a;
    --faint: #3d3d3d;
    --uni-pink: #ff007a;
    --uni-pink-lt: #ff4da6;
    --line: rgba(255,255,255,0.10);
    --line-soft: rgba(255,255,255,0.06);

    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --display: 'Space Grotesk', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --rail: 260px;
    --headerH: 74px;
  }

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

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.68;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
  }

  ::selection { background: #fff; color: #000; }

  /* faint tube texture — kept far below text contrast */
  .tube {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
  }

  .tube .lines {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0) 0px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0.30) 3px
    );
    mix-blend-mode: multiply;
  }

  .tube .vig {
    position: absolute;
    inset: 0;
    background: radial-gradient(125% 120% at 50% 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.72) 100%);
  }

  /* ---------------- header ---------------- */

  header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 60;
    height: var(--headerH);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 34px);
    background: rgba(9,9,9,0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 1px 24px rgba(0,0,0,0.9);
  }

  /* brand lockup: framed mark + stacked wordmark */
  .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--fg);
  }

  .mark {
    position: relative;
    flex: none;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #161616, #070707);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.16),
      0 3px 14px rgba(0,0,0,0.9);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
  }

  /* corner ticks — bracket the mark like a viewfinder */
  .mark::before,
  .mark::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-color: rgba(255,255,255,0.55);
    border-style: solid;
    transition: border-color 0.22s ease;
  }

  .mark::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
  .mark::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

  .mark img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 9px rgba(255,255,255,0.45));
  }

  .brand:hover .mark {
    border-color: rgba(255,255,255,0.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 22px rgba(255,255,255,0.12);
  }

  .brand:hover .mark::before,
  .brand:hover .mark::after { border-color: #fff; }

  .wordmark { display: flex; flex-direction: column; }

  .wordmark b {
    font-family: var(--display);
    font-weight: 700;
    font-size: 19px;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--fg);
  }

  .wordmark b .uni {
    color: var(--uni-pink);
    text-shadow: 0 0 14px rgba(255, 0, 122, 0.4);
    transition: text-shadow 0.25s ease;
  }

  .brand:hover .wordmark b .uni {
    text-shadow: 0 0 22px rgba(255, 0, 122, 0.75);
  }

  .wordmark > span {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 5px;
    transition: color 0.22s ease;
  }

  .brand:hover .wordmark > span { color: var(--muted); }

  /* now playing — the channel you are currently reading */
  .nowplaying {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 15px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 34vw;
    overflow: hidden;
  }

  .nowplaying .dot {
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 7px rgba(255,255,255,0.85);
    animation: blip 2.4s ease-in-out infinite;
  }

  .nowplaying .np-ch { color: var(--fg); }
  .nowplaying .np-title {
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topnav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 26px);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  /* connect wallet */
  .connect {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    font-family: inherit;
    line-height: 1;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
    text-transform: uppercase;
    color: var(--fg);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.28);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .connect .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--uni-pink);
    box-shadow: 0 0 9px rgba(255, 0, 122, 0.8);
    transition: background 0.2s ease, box-shadow 0.2s ease;
  }

  .connect:hover {
    background: var(--uni-pink);
    color: #fff;
    border-color: var(--uni-pink-lt);
    box-shadow: 0 0 26px rgba(255, 0, 122, 0.5);
  }

  .connect:hover .dot { background: #fff; box-shadow: 0 0 9px rgba(255,255,255,0.9); }
  .connect:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

  .topnav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--fg);
    text-decoration: none;
    line-height: 1;
    /* symmetric so the text centres on the same line as the button */
    padding: 4px 0;
    transition: opacity 0.2s ease;
  }

  /* underline wipes in on hover */
  .topnav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--fg);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
  }

  .topnav a:hover::after { transform: scaleX(1); }

  /* signal / read progress */
  .signal {
    position: fixed;
    top: var(--headerH);
    left: 0;
    height: 2px;
    width: 0%;
    z-index: 61;
    background: linear-gradient(90deg, rgba(255,255,255,0.35), #fff);
    box-shadow: 0 0 12px rgba(255,255,255,0.5);
  }

  /* ---------------- shell ---------------- */

  .shell {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 76px);
    max-width: 1240px;
    margin: 0 auto;
    padding: calc(var(--headerH) + 44px) clamp(18px, 4vw, 44px) 120px;
  }

  /* ---------------- channel rail ---------------- */

  .rail {
    position: sticky;
    top: calc(var(--headerH) + 34px);
    align-self: start;
    max-height: calc(100vh - var(--headerH) - 60px);
    overflow-y: auto;
    /* room so the active blip's glow isn't clipped by the scroll container */
    padding-right: 18px;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
  }

  .rail::-webkit-scrollbar { width: 4px; }
  .rail::-webkit-scrollbar-thumb { background: #262626; }

  .rail-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--faint);
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
  }

  .rail a {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 8px 0 8px 14px;
    color: var(--dim);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    border-left: 1px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
  }

  .rail a .ch {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--faint);
    transition: color 0.18s ease;
  }

  .rail a:hover { color: var(--fg); }
  .rail a:hover .ch { color: var(--muted); }

  .rail a.active {
    color: var(--fg);
    border-left-color: var(--fg);
  }

  .rail a.active .ch { color: var(--fg); }

  /* live blip on the active channel */
  .rail a.active::after {
    content: '';
    position: absolute;
    right: 7px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 7px rgba(255,255,255,0.85), 0 0 14px rgba(255,255,255,0.35);
    animation: blip 2.4s ease-in-out infinite;
  }

  @keyframes blip { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

  .rail-foot {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.9;
    letter-spacing: 0.1em;
    color: var(--faint);
  }

  .rail-foot kbd {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 1px 5px;
  }

  /* ---------------- article ---------------- */

  article { max-width: 74ch; }

  .lede {
    padding-bottom: 44px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
  }

  .eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 20px;
  }

  h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(38px, 6.4vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    background: linear-gradient(180deg, #ffffff 34%, #8f8f8f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 22px;
  }

  .lede p {
    color: var(--muted);
    font-size: clamp(16px, 1.9vw, 19px);
    line-height: 1.62;
    max-width: 62ch;
  }

  .lede p + p { margin-top: 14px; }

  .lede strong { color: var(--fg); font-weight: 500; }

  /* readout strip */
  .readout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    margin: 40px 0 8px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
  }

  .readout div {
    background: var(--panel);
    padding: 16px 18px;
  }

  .readout dt {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 7px;
  }

  .readout dd {
    font-family: var(--display);
    font-weight: 500;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--fg);
  }

  .readout dd small {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--dim);
    margin-top: 3px;
  }

  section { padding-top: 76px; scroll-margin-top: calc(var(--headerH) + 26px); }

  /* broadcast slate header */
  .slate {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
  }

  .slate .num {
    flex: none;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: #000;
    background: var(--fg);
    padding: 4px 9px;
  }

  .slate h2 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(21px, 3vw, 29px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
  }

  .slate .bar {
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
  }

  section p {
    color: var(--muted);
    margin-bottom: 18px;
  }

  section p strong,
  li strong {
    color: var(--fg);
    font-weight: 500;
  }

  /* term-led paragraph */
  .term {
    display: block;
    font-family: var(--display);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg);
    margin-bottom: 6px;
  }

  .block {
    padding-left: 20px;
    border-left: 1px solid var(--line);
    margin-bottom: 26px;
  }

  .block p:last-child { margin-bottom: 0; }

  /* pull quote / key line */
  .key {
    margin: 30px 0;
    padding: 22px 24px;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 2px solid var(--fg);
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(16px, 2.1vw, 20px);
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--fg);
  }

  /* ascii diagram panel */
  figure {
    margin: 34px 0;
    border: 1px solid var(--line-soft);
    background: var(--panel);
  }

  figure pre {
    font-family: var(--mono);
    font-size: clamp(11px, 1.5vw, 13px);
    line-height: 1.72;
    color: var(--muted);
    padding: 26px 24px;
    overflow-x: auto;
    white-space: pre;
  }

  figure pre b { color: var(--fg); font-weight: 500; }

  figcaption {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 11px 24px;
    border-top: 1px solid var(--line-soft);
  }

  /* locked list */
  .locks { list-style: none; margin: 26px 0; }

  .locks li {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--line-soft);
  }

  .locks li:last-child { border-bottom: 1px solid var(--line-soft); }

  .locks .tag {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg);
    border: 1px solid var(--line);
    padding: 3px 0;
    text-align: center;
    margin-top: 3px;
  }

  .locks strong { display: block; color: var(--fg); font-weight: 500; margin-bottom: 4px; }
  .locks span { color: var(--muted); font-size: 15px; }

  /* three-up */
  .trio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px;
    margin: 30px 0;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
  }

  .trio > div { background: var(--panel); padding: 22px 20px; }

  .trio h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.02em;
    margin-bottom: 9px;
  }

  .trio p { font-size: 14.5px; margin: 0; }

  /* closing slate */
  .oneline {
    margin-top: 88px;
    padding: 46px 0 0;
    border-top: 1px solid var(--line);
  }

  .oneline p {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(20px, 3.4vw, 34px);
    line-height: 1.32;
    letter-spacing: -0.025em;
    color: var(--fg);
    max-width: 26ch;
  }

  .oneline .eyebrow { margin-bottom: 18px; }

  .backhome {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 42px;
    padding: 13px 26px;
    border: 1px solid rgba(255,255,255,0.28);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--fg);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .backhome:hover { background: var(--fg); color: #000; border-color: var(--fg); }

  /* ---------------- responsive ---------------- */

  @media (max-width: 940px) {
    .shell {
      grid-template-columns: minmax(0, 1fr);
      gap: 0;
      padding-top: calc(var(--headerH) + 74px);
    }

    /* rail becomes a horizontal channel strip */
    .rail {
      position: fixed;
      top: var(--headerH);
      left: 0; right: 0;
      max-height: none;
      overflow-x: auto;
      overflow-y: hidden;
      display: flex;
      gap: 0;
      padding: 0 14px;
      background: rgba(6,6,6,0.94);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--line);
      z-index: 55;
      scrollbar-width: none;
    }

    .rail::-webkit-scrollbar { display: none; }
    .rail-label, .rail-foot { display: none; }

    .rail a {
      grid-template-columns: auto;
      gap: 0;
      padding: 13px 14px;
      border-left: none;
      border-bottom: 1px solid transparent;
      white-space: nowrap;
      font-size: 12px;
    }

    .rail a .label { display: none; }
    .rail a .ch { font-size: 12px; }
    .rail a.active { border-bottom-color: var(--fg); }
    .rail a.active::after { display: none; }

    .signal { top: calc(var(--headerH) + 45px); }

    .locks li { grid-template-columns: 1fr; gap: 8px; }
    .locks .tag { width: 62px; }
    .slate h2 { white-space: normal; }
  }

  @media (max-width: 1120px) {
    .nowplaying { display: none; }
  }

  @media (max-width: 560px) {
    body { font-size: 15.5px; }
    section { padding-top: 58px; }
    .mark { width: 36px; height: 36px; }
    .mark img { width: 24px; height: 24px; }
    .wordmark b { font-size: 16px; }
    .wordmark > span { font-size: 8px; letter-spacing: 0.24em; }
    .connect { padding: 8px 12px 7px; font-size: 9.5px; letter-spacing: 0.14em; gap: 7px; }
    .topnav { gap: 13px; font-size: 10px; letter-spacing: 0.16em; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; }
  }

/* ============================================================
   shared page chrome for non-docs pages
   ============================================================ */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--headerH) + 64px) clamp(18px, 4vw, 44px) 0;
}

.wrap.tail { padding-bottom: 110px; }

/* page hero */
.phero {
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line-soft);
}

.phero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 34%, #8f8f8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 22px;
}

.phero h1 .pink {
  background-image: linear-gradient(180deg, var(--uni-pink-lt) 18%, var(--uni-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 0, 122, 0.32));
}

.phero p {
  color: var(--muted);
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.62;
  max-width: 60ch;
}

/* section heading, slate style without the channel chip */
.head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 78px 0 26px;
}

.head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.head .bar {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.prose { max-width: 74ch; }
.prose p { color: var(--muted); margin-bottom: 18px; }
.prose p strong { color: var(--fg); font-weight: 500; }
.prose p:last-child { margin-bottom: 0; }

/* panel grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin: 30px 0;
}

.cards > div { background: var(--panel); padding: 26px 24px; }

.cards .k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

.cards h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.cards p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* footer */
footer.site {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}

footer.site .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px clamp(18px, 4vw, 44px) 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.6vw, 32px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

footer.site nav a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer.site nav a:hover { color: var(--fg); }

footer.site .fine {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- grid page ---------- */

.gridwrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
  margin: 34px 0 10px;
}

.canvasbox {
  position: relative;
  border: 1px solid var(--line);
  background: #050505;
  box-shadow: inset 0 0 70px rgba(0,0,0,0.9);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.canvasbox canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
}

.canvasbox .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255,255,255,0.6);
  border-style: solid;
  pointer-events: none;
}

.canvasbox .c1 { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.canvasbox .c2 { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.gridside {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.gridside div { background: var(--panel); padding: 16px 18px; }

.gridside dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 7px;
}

.gridside dd {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg);
}

.gridside dd small {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--dim);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 14px;
}

/* ---------- charts ---------- */

.chart {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  margin: 30px 0;
}

.chart svg { display: block; width: 100%; height: auto; }

.chart figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- flow ---------- */

.flow {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin: 30px 0;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flow > div {
  background: var(--panel);
  padding: 24px 22px;
  position: relative;
}

.flow .step {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--faint);
  margin-bottom: 12px;
}

.flow h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 9px;
}

.flow p { color: var(--muted); font-size: 14px; margin: 0; }

.flow .burn h3 { color: var(--uni-pink); }

/* split panels: two immutability-style lists */
.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin: 30px 0;
}

@media (max-width: 860px) {
  .gridwrap { grid-template-columns: minmax(0, 1fr); }
  .head h2 { white-space: normal; }
  .wrap { padding-top: calc(var(--headerH) + 40px); }
}

/* ============================================================
   ambient aura — magenta / violet / white blooms, per banner.png
   ============================================================ */

body::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    /* pink, low left — the anchor bloom */
    radial-gradient(36% 42% at 12% 86%, rgba(255, 0, 122, 0.34), transparent 68%),
    /* pink, mid right */
    radial-gradient(30% 34% at 92% 54%, rgba(255, 45, 143, 0.22), transparent 70%),
    /* pink, upper left */
    radial-gradient(28% 32% at 28% 6%, rgba(255, 45, 143, 0.18), transparent 70%),
    /* violet, upper right */
    radial-gradient(32% 38% at 84% 12%, rgba(150, 70, 255, 0.20), transparent 68%),
    /* white core haze */
    radial-gradient(26% 30% at 62% 60%, rgba(255, 255, 255, 0.10), transparent 70%),
    /* white, low right */
    radial-gradient(24% 28% at 78% 92%, rgba(255, 255, 255, 0.07), transparent 72%),
    /* white, upper left wash */
    radial-gradient(22% 26% at 16% 22%, rgba(255, 255, 255, 0.055), transparent 72%);
  filter: blur(34px);
  animation: aura 34s ease-in-out infinite alternate;
}

@keyframes aura {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2.5%, -2%, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

.btn-inline {
  display: inline-block;
  margin-top: 6px;
  padding: 11px 20px;
  border: 1px solid rgba(255,255,255,0.28);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-inline:hover { background: #fff; color: #000; }

/* ============================================================
   responsive: mobile nav drawer + overflow guards
   ============================================================ */

html, body { max-width: 100%; overflow-x: hidden; }
img, svg, canvas, video { max-width: 100%; }

.navtoggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.24);
  cursor: pointer;
  padding: 0;
}

.navtoggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.navtoggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navtoggle.open span:nth-child(2) { opacity: 0; }
.navtoggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .navtoggle { display: flex; }

  header .topnav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 14px;
    background: rgba(8,8,8,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 18px 40px rgba(0,0,0,0.85);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: calc(100dvh - var(--headerH));
    overflow-y: auto;
  }

  header .topnav.open { opacity: 1; transform: none; pointer-events: auto; }

  header .topnav a {
    padding: 15px clamp(16px, 4vw, 30px);
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  header .topnav a::after { display: none; }

  header .topnav .connect {
    margin: 14px clamp(16px, 4vw, 30px) 2px;
    justify-content: center;
    padding: 14px 18px;
  }
}

/* readable measure and spacing on small screens */
@media (max-width: 620px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .phero h1 { font-size: clamp(32px, 10vw, 48px); }
  .cards > div, .trio > div, .flow > div { padding: 20px 18px; }
  .readout div { padding: 14px 15px; }
  .locks li { grid-template-columns: 1fr; }
  footer.site .inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  figure pre { padding: 18px 16px; }
}

/* very small phones */
@media (max-width: 380px) {
  body { font-size: 15px; }
  .brand .wordmark b { font-size: 15px; }
  .mark { width: 34px; height: 34px; }
  .mark img { width: 22px; height: 22px; }
}

/* wide screens: keep the measure sane, let the shell breathe */
@media (min-width: 1500px) {
  .wrap, footer.site .inner { max-width: 1320px; }
  .shell { max-width: 1400px; }
}

/* touch targets: nothing tappable under ~44px on phones */
@media (max-width: 620px) {
  footer.site nav { gap: 0; width: 100%; flex-direction: column; }
  footer.site nav a {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .cards p a, .prose a { display: inline-block; padding: 6px 0; }
  .rail a { padding-top: 15px; padding-bottom: 15px; }
}
