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

    :root {
      --g:   #00ff88;
      --g2:  #00cc66;
      --g3:  #008844;
      --g4:  #004422;
      --y:   #ffcc00;
      --c:   #00ccff;
      --r:   #ff4455;
      --w:   #d0ffe8;
      --bg:  #030d08;
      --f:   'JetBrains Mono', 'Courier New', monospace;
    }

    html, body {
      height: 100%;
      background: var(--bg);
      color: var(--g);
      font-family: var(--f);
      font-size: 14px;
      overflow: hidden;
    }

    #wrap {
      position: relative;
      display: flex;
      flex-direction: column;
      height: 100vh;
      max-width: 860px;
      margin: 0 auto;
      padding: 0 22px;
    }

    /* ── output ── */
    #out {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 22px 0 8px;
    }
    #out::-webkit-scrollbar { width: 3px; }
    #out::-webkit-scrollbar-thumb { background: var(--g4); }

    /* ── lines ── */
    .L  { display: block; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
    .b  { height: 0.85em; }          /* blank */
    .d  { color: var(--g2); }         /* dim */
    .m  { color: var(--g3); }         /* muted */
    .bo { color: var(--g); font-weight:700; } /* bold */
    .y  { color: var(--y); }
    .c  { color: var(--c); }
    .r  { color: var(--r); }
    .w  { color: var(--w); }
    .e  { color: var(--g3); }         /* echo */
    .h  { color: var(--g); font-weight:700; letter-spacing:.08em; } /* section heading */
    .lnk { text-decoration: none; cursor: pointer; }
    .lnk:hover { text-decoration: underline; color: var(--c); }

    /* ── clickable command rows ── */
    .CR {
      display: flex;
      line-height: 1.8;
      cursor: pointer;
      border-radius: 3px;
      transition: background .1s;
    }
    .CR:hover { background: rgba(0,255,136,.07); }
    .CR:focus-visible { outline: 1px solid var(--g3); background: rgba(0,255,136,.07); }
    .CK { color: var(--y); font-weight:700; min-width:120px; flex-shrink:0; padding-left:2px; }
    .CD { color: #8ecfaa; }

    /* ── input bar ── */
    #bar {
      display: flex;
      align-items: center;
      border-top: 2px solid var(--g);
      background: rgba(0,255,136,.04);
      padding: 11px 4px 15px;
      flex-shrink: 0;
      gap: 6px;
      cursor: text;
    }
    #bar:focus-within { background: rgba(0,255,136,.07); }

    #pfx {
      color: var(--g);
      font-weight: 700;
      user-select: none;
      flex-shrink: 0;
      white-space: nowrap;
      text-shadow: 0 0 8px #00ff8877;
    }

    #inp {
      flex: 1; min-width: 0;
      background: transparent; border: none; outline: none;
      color: var(--g); font-family: var(--f); font-size: 14px;
      caret-color: var(--g);
    }
    #inp::placeholder { color: var(--g3); font-style: italic; }

    /* ── scanlines ── */
    #sl {
      pointer-events: none;
      position: fixed; inset: 0;
      background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0,0,0,.13) 2px, rgba(0,0,0,.13) 4px
      );
      z-index: 10;
    }

    /* ── animations ── */
    @keyframes fi { from{opacity:0;transform:translateY(3px)} to{opacity:1;transform:none} }
    @keyframes gl { 0%,100%{text-shadow:0 0 5px #00ff88,0 0 10px #00ff8844} 50%{text-shadow:0 0 14px #00ff88,0 0 28px #00ff8888} }
    .L  { animation: fi .1s ease-out both; }
    .GL { animation: gl 3.5s ease-in-out infinite, fi .15s ease-out both; color:var(--g); font-weight:700; font-size:1.6em; word-break:keep-all; overflow-wrap:normal; }

    @media (max-width:480px) {
      html,body { font-size:10px; }
      #wrap { padding:0 8px; }
      .CK { min-width:75px; }
      .CD { display:none; }
    }
    @media (min-width:481px) and (max-width:620px) {
      html,body { font-size:11px; }
      #wrap { padding:0 10px; }
      .CK { min-width:95px; }
    }
    @media (min-width:621px) and (max-width:860px) {
      html,body { font-size:12px; }
      #wrap { padding:0 16px; }
      .CK { min-width:110px; }
    }
  .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;}

  /* ── logo bar ── */
  #logo-bar {
    flex-shrink: 0;
    padding: 12px 0 10px;
    border-bottom: 1px solid rgba(0,255,136,.10);
    display: flex;
    align-items: center;
    gap: 12px;
  }
  #logo-wrapper {
    position: relative;
    height: 34px;
    display: inline-flex;
    align-items: center;
    isolation: isolate;
  }
  #logo-wrapper::after {
    content: '';
    position: absolute; inset: 0;
    background: #00ff88;
    mix-blend-mode: color;
    pointer-events: none;
  }
  #logo-bar img {
    height: 34px;
    display: block;
    filter: grayscale(1) brightness(1.7) contrast(1.1) drop-shadow(0 0 8px rgba(0,255,136,.45));
    mix-blend-mode: screen;
  }
  @media (max-width:480px) {
    #logo-bar img { height: 26px; }
    #logo-bar { padding: 8px 0 7px; }
  }

  /* ── nav strip ── */
  #nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 5px 0 6px;
    border-bottom: 1px solid rgba(0,255,136,.08);
    scrollbar-width: none;
  }
  #nav::-webkit-scrollbar { display: none; }
  .NV {
    color: var(--g3);
    font-size: 0.8em;
    padding: 2px 8px 2px 4px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: .04em;
    transition: color .15s;
    flex-shrink: 0;
    border-radius: 2px;
    user-select: none;
  }
  .NV:hover { color: var(--g2); }
  .NV.active { color: var(--g); font-weight: 700; }
  .NV-sep { color: var(--g4); font-size: 0.8em; flex-shrink: 0; }
  #nav-home {
    margin-left: auto;
    padding-left: 12px;
    color: var(--g2);
    font-size: 0.8em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    transition: color .15s;
  }
  #nav-home:hover { color: var(--y); }
