:root {
      color-scheme: dark;
      --bg: #050806;
      --panel: rgba(8, 15, 10, 0.88);
      --panel-hard: #07100b;
      --acid: #b8ff00;
      --green: #00ff99;
      --pink: #ff3df2;
      --cyan: #00e7ff;
      --yellow: #fff200;
      --red: #ff2945;
      --paper: #d8d66f;
      --dead: #7f896f;
      --line: rgba(184, 255, 0, 0.28);
      --max: 1420px;
      --mono: "Courier New", Courier, ui-monospace, monospace;
    }

    * { box-sizing: border-box; }
    html { min-height: 100%; background: #000; scroll-behavior: smooth; }
    body {
      min-height: 100vh;
      margin: 0;
      color: var(--green);
      font-family: var(--mono);
      background:
        linear-gradient(rgba(0, 255, 153, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 153, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 10% 12%, rgba(255, 61, 242, 0.23), transparent 22rem),
        radial-gradient(circle at 88% 35%, rgba(184, 255, 0, 0.17), transparent 25rem),
        radial-gradient(circle at 48% 100%, rgba(0, 231, 255, 0.08), transparent 27rem),
        linear-gradient(135deg, #120013 0%, #031209 48%, #000 100%);
      background-size: 31px 31px, 31px 31px, auto, auto, auto, auto;
      overflow-x: hidden;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 50;
      pointer-events: none;
      background:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 4px),
        linear-gradient(90deg, transparent, rgba(0,0,0,0.3), transparent);
      opacity: .54;
      mix-blend-mode: screen;
    }

    body::after { display: none; }

    a { color: inherit; }
    button, input { font: inherit; }
    ::selection { color: #000; background: var(--yellow); }

    .site-shell {
      width: min(var(--max), calc(100vw - 2rem));
      margin: 0 auto;
      padding: 3.5rem 0 3rem;
      position: relative;
    }

    .masthead {
      position: relative;
      min-height: 32rem;
      border: 3px ridge var(--acid);
      background:
        linear-gradient(100deg, rgba(0,0,0,.74), rgba(3,18,9,.78) 58%, rgba(26,0,25,.7)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 9px);
      box-shadow:
        11px 11px 0 rgba(255, 61, 242, .28),
        -6px -5px 0 rgba(0, 231, 255, .18),
        0 0 3rem rgba(184, 255, 0, .13);
      overflow: hidden;
      transform: rotate(-.16deg);
    }

    .masthead::before { display: none; }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: .72rem 1rem;
      border-bottom: 1px dashed var(--paper);
      background: rgba(0,0,0,.44);
      color: var(--paper);
      font-size: .72rem;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .status {
      display: inline-flex;
      gap: .5rem;
      align-items: center;
    }

    .status::before {
      content: "";
      width: .62rem;
      height: .62rem;
      background: var(--green);
      box-shadow: 0 0 .8rem var(--green);
      animation: pulse 1.6s steps(2, end) infinite;
    }

    .terminal-trigger {
      appearance: none;
      border: 2px outset var(--paper);
      padding: .48rem .72rem;
      color: #000;
      background: var(--cyan);
      font-weight: 900;
      cursor: pointer;
      text-transform: uppercase;
      box-shadow: 4px 4px 0 rgba(255,61,242,.46);
    }

    .terminal-trigger:hover,
    .terminal-trigger:focus-visible {
      background: var(--yellow);
      transform: translate(-1px, -1px);
    }

    .hero-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr);
      gap: clamp(2rem, 4vw, 4rem);
      align-items: center;
      min-height: 27rem;
      padding: clamp(2rem, 4vw, 3.6rem) clamp(1.2rem, 5vw, 4.5rem) 2.6rem;
    }

    .hero-copy { position: relative; z-index: 2; }

    .eyebrow {
      margin: 0 0 .65rem;
      color: var(--paper);
      font-size: clamp(.66rem, 1.1vw, .82rem);
      letter-spacing: .11em;
      text-transform: uppercase;
    }

    h1, h2, h3 { margin: 0; font-weight: 900; text-transform: uppercase; }

    h1 {
      width: fit-content;
      max-width: 100%;
      color: var(--yellow);
      font-size: clamp(3.15rem, 6.8vw, 6.4rem);
      line-height: .86;
      letter-spacing: -.085em;
      text-shadow: 5px 0 var(--pink), -4px 0 var(--cyan), 0 0 1.8rem rgba(255,242,0,.24);
      animation: title-damage 3.2s steps(2, end) infinite;
    }

    .signal-line {
      margin: 1rem 0 1.05rem;
      max-width: 46rem;
      color: var(--cyan);
      font-size: clamp(.84rem, 1.35vw, 1.04rem);
      line-height: 1.5;
      text-transform: lowercase;
    }

    .lead {
      max-width: 61ch;
      margin: 0;
      color: #e3e19a;
      font-size: clamp(.96rem, 1.25vw, 1.08rem);
      line-height: 1.65;
    }

    .hero-controls {
      display: flex;
      flex-wrap: wrap;
      gap: .8rem;
      margin-top: 1.6rem;
    }

    .hero-controls .terminal-trigger { padding: .72rem 1rem; }

    .text-link {
      display: inline-flex;
      align-items: center;
      padding: .72rem .9rem;
      border: 1px dashed var(--paper);
      color: var(--yellow);
      background: rgba(0,0,0,.28);
      font-weight: 900;
      text-decoration: none;
      text-transform: uppercase;
    }

    .text-link:hover,
    .text-link:focus-visible { color: var(--cyan); border-color: var(--cyan); }

    .hero-collage {
      position: relative;
      min-height: 19rem;
      z-index: 2;
    }

    .scrap {
      position: absolute;
      padding: .68rem .78rem;
      border: 2px solid currentColor;
      background: rgba(0,0,0,.86);
      box-shadow: 5px 5px 0 rgba(0,0,0,.48);
      font-size: .69rem;
      line-height: 1.42;
      text-transform: uppercase;
    }

    .scrap strong { display: block; margin-bottom: .3rem; color: var(--yellow); font-size: .82rem; }
    .scrap:nth-child(1) { top: .8rem; left: 2%; width: 72%; color: var(--green); transform: rotate(-2deg); }
    .scrap:nth-child(2) { top: 6.7rem; right: 1%; width: 68%; color: var(--cyan); transform: rotate(1.6deg); }
    .scrap:nth-child(3) { bottom: .8rem; left: 9%; width: 76%; color: var(--pink); transform: rotate(-.8deg); }

    .marquee {
      overflow: hidden;
      border-top: 1px dashed var(--paper);
      background: #160016;
      color: var(--yellow);
      font-size: .75rem;
      padding: .28rem 0;
      white-space: nowrap;
    }

    .marquee span {
      display: inline-block;
      min-width: 100%;
      animation: crawl 31s linear infinite;
    }

    .signal-board {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 1rem;
      margin-top: 2rem;
    }

    .fragment {
      position: relative;
      padding: 1.25rem 1.25rem 1.35rem;
      border: 1px dashed var(--line);
      background:
        linear-gradient(135deg, rgba(0,0,0,.64), rgba(8,22,13,.8)),
        repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 6px);
      min-height: 11.75rem;
      overflow: hidden;
    }

    .fragment::after {
      content: attr(data-code);
      position: absolute;
      right: .65rem;
      bottom: .45rem;
      color: rgba(216,214,111,.22);
      font-size: 2.3rem;
      font-weight: 900;
      letter-spacing: -.08em;
      pointer-events: none;
    }

    .fragment h2,
    .fragment h3 {
      color: var(--cyan);
      font-size: clamp(1.05rem, 2vw, 1.7rem);
      line-height: 1.02;
      text-shadow: 2px 0 rgba(255,61,242,.7);
    }

    .fragment p {
      position: relative;
      z-index: 1;
      max-width: 62ch;
      margin: .85rem 0 0;
      color: var(--paper);
      font-size: .9rem;
      line-height: 1.55;
    }

    .fragment a {
      position: relative;
      z-index: 2;
      display: inline-block;
      margin-top: 1rem;
      color: var(--yellow);
      font-weight: 900;
      text-decoration: underline dashed;
      text-underline-offset: .22em;
    }

    .fragment-wide { grid-column: span 7; }
    .fragment-narrow { grid-column: span 5; }
    .fragment-third { grid-column: span 4; }
    .fragment-culture { border-color: rgba(255,61,242,.55); }
    .fragment-platform { border-color: rgba(184,255,0,.5); }

    .manifesto {
      margin: 1.8rem 0 0;
      padding: clamp(1.5rem, 4vw, 3rem);
      border-left: 5px solid var(--yellow);
      border-right: 1px dashed rgba(255,242,0,.4);
      background: rgba(20, 0, 19, .68);
      transform: rotate(.12deg);
    }

    .manifesto p {
      margin: 0;
      color: #f2efa3;
      font-size: clamp(1.08rem, 2.2vw, 1.75rem);
      line-height: 1.45;
      font-weight: 700;
    }

    .manifesto strong { color: var(--cyan); }

    footer {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
      margin-top: 1.5rem;
      padding: .9rem 0;
      color: var(--dead);
      font-size: .72rem;
      text-transform: uppercase;
    }

    dialog {
      width: min(1500px, calc(100vw - 1.2rem));
      height: min(900px, calc(100svh - 1.2rem));
      max-width: none;
      max-height: none;
      padding: 0;
      border: 3px ridge var(--acid);
      color: var(--green);
      background: var(--panel-hard);
      box-shadow: 12px 12px 0 rgba(255,61,242,.38), -5px -4px 0 rgba(0,231,255,.24);
      overflow: hidden;
    }

    dialog::backdrop {
      background: rgba(0,0,0,.82);
      backdrop-filter: blur(4px);
    }

    .terminal-window {
      display: flex;
      flex-direction: column;
      height: 100%;
      background: #070b07;
    }

    .terminal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: .72rem .9rem;
      border-bottom: 3px double var(--acid);
      color: var(--paper);
      background: rgba(0,0,0,.78);
      text-transform: uppercase;
      font-size: .74rem;
    }

    .terminal-frame {
      display: block;
      width: 100%;
      min-height: 0;
      flex: 1;
      border: 0;
      background: #000;
    }

    .close-terminal {
      appearance: none;
      border: 2px outset var(--paper);
      color: #000;
      background: var(--red);
      padding: .32rem .55rem;
      font-weight: 900;
      cursor: pointer;
    }

    .close-terminal:hover,
    .close-terminal:focus-visible {
      background: var(--yellow);
    }

    .noscript {
      border: 1px dashed var(--yellow);
      padding: .8rem;
      margin-top: 1rem;
      color: var(--paper);
    }

    @keyframes pulse { 50% { opacity: .35; } }
    @keyframes crawl { to { transform: translateX(-55%); } }
    @keyframes title-damage {
      0%, 92%, 100% { transform: translate(0); filter: none; }
      93% { transform: translate(3px, -1px); filter: saturate(1.8); }
      95% { transform: translate(-2px, 1px); }
      97% { transform: translate(1px); }
    }

    @media (max-width: 920px) {
      .site-shell { width: min(100% - 1rem, var(--max)); padding-top: 2.8rem; }
      .masthead { min-height: auto; transform: none; }
      .masthead::before { display: none; }
      .hero-grid { grid-template-columns: 1fr; min-height: auto; padding: 2.4rem 1.1rem 2rem; }
      .hero-collage { min-height: 17rem; }
      .fragment-wide, .fragment-narrow, .fragment-third { grid-column: 1 / -1; }
      .signal-board { grid-template-columns: 1fr; }
    }

    @media (max-width: 600px) {
      body::after { max-width: calc(100vw - 1rem); overflow: hidden; white-space: nowrap; font-size: .55rem; }
      .topbar { align-items: flex-start; }
      .topbar .status { max-width: 60%; }
      h1 { font-size: clamp(2.85rem, 15vw, 4.7rem); }
      .signal-line { font-size: .84rem; }
      .lead { font-size: .94rem; }
      .hero-collage { min-height: 20rem; }
      .scrap:nth-child(1) { width: 91%; }
      .scrap:nth-child(2) { width: 88%; top: 7.5rem; }
      .scrap:nth-child(3) { width: 92%; left: 2%; }
      dialog { width: 100vw; height: 100svh; border-width: 2px; }
    }

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

/* Single-scroll terminal modal. */
body:has(#goatnet-terminal[open]) {
  overflow: hidden;
}

#goatnet-terminal .terminal-window {
  min-height: 0;
  overflow: hidden;
}

#goatnet-terminal .terminal-frame {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
