:root { --ease-out: cubic-bezier(0.2, 0.6, 0.3, 1); }   /* used by every transition here; it was never defined, so they all snapped */
* { margin: 0; padding: 0; box-sizing: border-box; }
    ::-webkit-scrollbar { display: none; }
    html { scrollbar-width: none; -webkit-text-size-adjust: 100%; }

    @keyframes crt-flicker {
      0%, 100% { opacity: 1; }
      10% { opacity: 0.997; }
      30% { opacity: 0.995; }
      50% { opacity: 0.998; }
      70% { opacity: 0.993; }
      90% { opacity: 0.999; }
    }

    body {
      background: #0d0a09;
      justify-content: flex-start;
      color: #c4b5a0;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      font-family: 'JetBrains Mono', monospace;
      padding: clamp(1.2rem, 3vh, 2.5rem) 1.25rem 3rem;
      position: relative;
      animation: crt-flicker 0.15s infinite;
    }

    body::after {
      content: '';
      position: fixed;
      inset: -2%;
      border-radius: 50% / 3%;
      box-shadow: inset 0 0 60px 10px rgba(10, 8, 6, 0.3);
      pointer-events: none;
      z-index: 98;
    }

    /* Wallpaper lifted from the homepage: same circuit weave, printed once, no growth animation */
    #bg {
      position: absolute;
      top: 0; left: 0;
      width: 100%;
      font-family: 'JetBrains Mono', monospace;
      font-size: 14px;
      line-height: 1.2;
      color: #141010;
      white-space: pre;
      overflow: hidden;
      z-index: -1;
      pointer-events: none;
    }

    .scanlines {
      position: fixed; inset: 0; pointer-events: none; z-index: 97;
      background: repeating-linear-gradient(
        0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.08) 3px
      );
    }

    main { width: min(560px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; }

    [data-boot] { visibility: hidden; }
    [data-boot].quick { visibility: visible; animation: quick-in 200ms var(--ease-out) both; }
    @keyframes quick-in { from { opacity: 0; } to { opacity: 1; } }
    /* The first seal: a vector now, so it is bounded by the box rather than by a
       font size guessed from the viewport. max-height keeps it whole on a short screen. */
    svg#first { width: min(100%, 32rem); max-height: 46vh; margin: 0.9rem auto 0; }
    .lede.one { margin-top: 0.8rem; font-size: clamp(0.78rem, 1.7vh, 0.92rem); color: #9a8d7c; max-width: 56ch; }
    /* phones: smaller title and lede, so the Seal and the button fit under them on one screen */
    @media (max-width: 640px) {
      h1 { font-size: 1.45rem; margin: 0.1rem 0 0.3rem; }
      .lede.one { margin-top: 0.5rem; font-size: 0.72rem; line-height: 1.45; }
    }
    .lede.one + .row { margin-top: 1.6rem; }
    .hint.soon { margin-top: 0.7rem; color: #5c5044; }
    .lede.one a.link { font-size: inherit; }
    /* links inside the lede read as links: full ink, a solid underline, brighter on hover */
    .lede.one a.link { color: #e8dcc6; border-bottom: 1px solid #9a8d7c; }
    .lede.one a.link:hover { color: #fff1dc; border-bottom-color: #e8dcc6; }

    h1 {
      font-family: 'VT323', monospace;
      font-weight: 400;
      font-size: clamp(1.7rem, 4.2vh, 2.6rem);
      letter-spacing: 0.08em;
      color: #c4b5a0;
      text-shadow: 0 0 12px rgba(196, 181, 160, 0.25);
      margin: 0.25rem 0 0.5rem;
      line-height: 1.1; height: 1.1em; overflow: visible;
      opacity: 0; transition: opacity 500ms ease-out;   /* hidden until VT323 is in: the fallback font drew it big, then it snapped small */   /* a fixed box: neither the late VT323 nor the scramble glyphs (taller fallback fonts) may move the page */
    }
    html.vt h1 { opacity: 1; }
    /* Same bracket language as the remi.gg menu: [ Bio ] */
    h1::before { content: '[ '; color: #6b5f52; text-shadow: none; }
    h1::after  { content: ' ]'; color: #6b5f52; text-shadow: none; }

    .lede {
      margin-top: 0.7rem;
      font-size: clamp(0.68rem, 1.55vh, 0.86rem);
      line-height: 1.55;
      color: #9a8d7c;
      max-width: 60ch;
      width: 100%;
      text-align: center;
    }
    .lede.soon { color: #5c5044; font-size: 0.72rem; }

    .lede b { color: #c4b5a0; font-weight: 400; }

    form { margin-top: 2.2rem; width: 100%; }

    .term {
      width: 100%;
      background: rgba(4, 3, 2, 0.9);
      border: 1px solid #3a322b;
      transition: border-color 0.15s;
    }
    .term:focus-within { border-color: #6b5f52; }
    .term-bar {
      display: flex;
      justify-content: space-between;
      padding: 0.45rem 0.8rem;
      font-size: 0.65rem;
      letter-spacing: 0.06em;
      color: #4d4239;
      border-bottom: 1px solid #221c18;
      user-select: none;
    }
    .term-body { position: relative; }
    .prompt {
      position: absolute;
      left: 1rem; top: 1rem;
      color: #6b5f52;
      font-size: 0.95rem;
      line-height: 1.7;
      pointer-events: none;
    }
    textarea {
      display: block;
      width: 100%;
      min-height: 7rem;
      background: transparent;
      color: #c4b5a0;
      border: 0;
      padding: 1rem 1rem 1rem 2.2rem;
      font: inherit;
      font-size: 0.95rem;
      line-height: 1.7;
      text-align: left;
      resize: vertical;
      outline: none;
      caret-color: #c4b5a0;
      caret-shape: block;
    }
    textarea::placeholder { color: #4d4239; }
    textarea:focus::placeholder { color: transparent; }

    .row {
      margin-top: 0.75rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1.25rem;
    }

    .hint { font-size: 0.7rem; color: #5c5044; }

    button {
      background: transparent;
      color: #c4b5a0;
      border: 1px solid #6b5f52;
      padding: 0.55rem 1.1rem;
      font: inherit;
      font-size: 0.8rem;
      letter-spacing: 0.12em;
      text-transform: none;                 /* sentence case everywhere */
      cursor: pointer;
      transition: background 150ms var(--ease-out), color 150ms var(--ease-out), transform 160ms var(--ease-out);
    }
    button:focus-visible { background: #c4b5a0; color: #0d0a09; outline: none; }
    button:active:not(:disabled) { transform: scale(0.97); }
    button:disabled { opacity: 0.35; cursor: default; background: transparent; color: #c4b5a0; }
    .cta {
      display: inline-block; margin-top: clamp(0.8rem, 2vh, 1.6rem);
      color: #c4b5a0; border: 1px solid #6b5f52; padding: 0.7rem 1.5rem;
      font-size: clamp(0.72rem, 1.5vh, 0.85rem); letter-spacing: 0.12em; text-decoration: none;
      transition: background 150ms var(--ease-out), color 150ms var(--ease-out), transform 160ms var(--ease-out);
    }
    /* the hover fills left to right, quick, like a bar filling */
    a.cta { background: linear-gradient(#c4b5a0, #c4b5a0) no-repeat left center / 0% 100%; transition: background-size 140ms cubic-bezier(0.25, 0.8, 0.3, 1), color 90ms linear 30ms, transform 160ms var(--ease-out); }   /* fast and soft: a flash, not a crawl */
    a.cta:focus-visible { background-size: 100% 100%; color: #0d0a09; outline: none; }
    a.cta:active { transform: scale(0.97); }
    .cta.soon { border: 1px solid #6b5f52; color: #c4b5a0; opacity: 0.5; cursor: default; pointer-events: none; }   /* locked until the contract is live */

    #write { display: flex; flex-direction: column; align-items: center; width: 100%; transition: opacity 0.25s; }
    #write.fading { opacity: 0; }
    #write.door { min-height: calc(100vh - 8rem); justify-content: center; }

    #result {
      width: 100%;
      min-height: calc(100vh - 9rem);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    #result[hidden] { display: none; }

    svg#seal, svg#art { width: min(100%, 30rem); max-height: 52vh; margin: 0 auto; }
    svg#art[hidden] { display: none; }

    pre {
      font-family: 'JetBrains Mono', monospace;
      font-size: clamp(0.78rem, 3.1vw, 1.1rem);
      line-height: 1.35;
      white-space: pre;
      text-align: center;
      color: #c4b5a0;
      text-shadow: 0 0 10px rgba(196, 181, 160, 0.18);
      overflow-x: auto;
      max-width: 100%;
    }

    .actions {
      margin-top: 2.25rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.9rem;
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
    }
    .actions.show { opacity: 1; transform: none; }
    .actions .hint { min-height: 1em; }

    a.link, button.link {
  text-decoration: none;
      color: #8a7d6c; border: 0; padding: 0; letter-spacing: 0; text-transform: none;
      font-size: 0.7rem; border-bottom: 1px solid #3a322b; background: transparent;
    }
    a.link, button.link { transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 160ms var(--ease-out); }
    a.link:active, button.link:active { transform: scale(0.97); }

    footer {
      margin-top: 4rem;
      font-size: 0.7rem;
      color: #5c5044;
    }
    footer a { color: #6b5f52; text-decoration: none; border-bottom: 1px solid #2a241f; transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out); }

    @media (hover: hover) and (pointer: fine) {
      button:hover:not(:disabled) { background: #c4b5a0; color: #0d0a09; }
      a.cta:hover { background-size: 100% 100%; color: #0d0a09; }
      a.link:hover, button.link:hover { color: #c4b5a0; background: transparent; border-bottom-color: #c4b5a0; }
      footer a:hover { color: #c4b5a0; border-bottom-color: #c4b5a0; }
    }

    @media (prefers-reduced-motion: reduce) {
      body { animation: none; }
      .actions { transition: opacity 200ms ease; transform: none; }
    }

/* Loading veil: full-viewport block wall, removed from the DOM once it has crumbled */
#veil {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.2;
  color: #3a322b;
  white-space: pre;
  overflow: hidden;
  z-index: 96;
  pointer-events: none;
}

/* Keep count: one dim line under the Write message button, and the button's border is the bar (entropy.js keepFrame) */
#keepbar {
  margin: 0.55rem auto 0;
  min-height: 1em;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: #5c5044;
  white-space: nowrap;
}
#keepbar b { color: #9a8d7c; font-weight: 400; }
.cta.keepframe { position: relative; border-color: transparent; }
.cta.keepframe svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cta.keepframe path { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.cta.keepframe .ktrack { stroke: #2a231e; }
.cta.keepframe .kfill { stroke: #c4b5a0; }
.cta.keepframe .ksheen { stroke-width: 1.6; }
.cta.keepframe clipPath rect { transition: x 600ms cubic-bezier(0.2, 0.6, 0.3, 1), y 600ms cubic-bezier(0.2, 0.6, 0.3, 1), width 600ms cubic-bezier(0.2, 0.6, 0.3, 1), height 600ms cubic-bezier(0.2, 0.6, 0.3, 1); }
@media (hover: hover) and (pointer: fine) {
  /* hover inverts with the button: the minted part goes dark, the rest bright */
  a.cta.keepframe:hover .kfill { stroke: #0d0a09; }
  a.cta.keepframe:hover .ksheen { opacity: 0; }
  a.cta.keepframe:hover .ktrack { stroke: #fff1dc; }
}

/* --- vector seal ---------------------------------------------------------
   The art is an <svg> built in entropy.js, not a block of text. It sizes by its
   own aspect ratio, so the frame lands inside a phone viewport instead of
   running off the right of it, and no font gets a say in whether the grid lines
   up. Colour, weight and glow are kept the same as the text form it replaces. */
svg.seal {
  display: block;
  width: 100%;
  height: auto;
  color: #c4b5a0;
}
svg.seal .line {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.seal .fill { fill: currentColor; stroke: none; }
svg.seal .rule { fill: none; stroke: currentColor; stroke-width: 1.1; }
svg.seal .blk { fill: currentColor; }
svg.seal .mark, svg.seal .rule, svg.seal .blk {
  transform-box: fill-box;
  transform-origin: center;
}
/* Held back until the reveal is over: a filter over 90 animating nodes is work a
   phone does not need while they are moving. */
svg.seal.lit { filter: drop-shadow(0 0 2px rgba(196, 181, 160, 0.5)); }

/* Print and crumble both run off per-node animation-delay set in JS, so the
   compositor carries them instead of a script repainting every frame. */
@keyframes sig-in {
  0%   { opacity: 0; }
  20%  { opacity: 0.85; }
  35%  { opacity: 0.15; }
  55%  { opacity: 0.7; }
  70%  { opacity: 0.3; }
  100% { opacity: 1; }
}
/* The slab thins rather than shrinks — the same four steps the text form walks
   down through █ ▓ ▒ ░, so a block wall reads as a block wall coming apart. */
@keyframes sig-blk {
  0%   { opacity: 1; }
  30%  { opacity: 0.75; }
  55%  { opacity: 0.5; }
  80%  { opacity: 0.25; }
  100% { opacity: 0; }
}
/* Glitch out, no scaling and no twitching: a glyph thins in hard cuts, like the
   text form walking down █ ▓ ▒ ░, with one small slip sideways near the end.
   steps() so every change is a cut, not a fade. --jx from JS, per part. */
@keyframes sig-out {
  0%   { opacity: 1;    transform: none; }
  25%  { opacity: 0.6;  transform: none; }
  45%  { opacity: 0.85; transform: none; }
  60%  { opacity: 0.35; transform: none; }
  75%  { opacity: 0.5;  transform: translate(var(--jx, 1.5px), 0); }
  88%  { opacity: 0.15; transform: none; }
  100% { opacity: 0;    transform: none; }
}
svg.seal.printing .mark,
svg.seal.printing .rule { animation: sig-in 300ms cubic-bezier(0.2, 0.6, 0.3, 1) both; }
/* bloom: the minted token's own load, a slow fade from the centre out */
svg.seal.printing.bloom .mark,
svg.seal.printing.bloom .rule { animation: seal-bloom 600ms ease-out both; }
@keyframes seal-bloom { from { opacity: 0; } to { opacity: 1; } }
svg.seal .blocks .blk { animation: sig-blk 440ms cubic-bezier(0.4, 0, 0.7, 0.4) both; }
svg.seal.gone .mark { animation: sig-out 420ms steps(1, end) both; }
/* A frame piece is a hairline — its fill-box has no height, so scaling it means
   nothing. It thins out in place instead, one piece at a time. */
@keyframes sig-fade {
  0%   { opacity: 1; }
  30%  { opacity: 0.4; }
  50%  { opacity: 0.75; }
  100% { opacity: 0; }
}
svg.seal.gone .rule { animation: sig-fade 420ms steps(1, end) both; }
/* A seal should not burn down in a background tab. */
svg.seal.held .mark,
svg.seal.held .rule,
svg.seal.held .blk,
svg.seal.held .w { animation-play-state: paused; }

/* The light (entropy.js lightSeal): hot copies of the glyphs, invisible at rest, lit for 0.7 s of every 5 s cycle,
   each on its own delay along the route. Same colour and timing as the minted token's animation. */
svg.seal .w { color: #fff1dc; opacity: 0; animation: seal-wave 5000ms ease-in-out infinite backwards; }
@keyframes seal-wave { 0% { opacity: 0; } 5.6% { opacity: 1; } 14%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  svg.seal .mark, svg.seal .rule, svg.seal .blk, svg.seal .w { animation: none !important; }
}

/* phones: the title stays on one line (it wrapped and its "]" landed in the text); the corner pills give way to a
   small in-flow row under the title, part of the layout from the first frame */
.pnav { display: none; }
@media (max-width: 640px) {
  h1, #logo { white-space: nowrap; font-size: min(1.6rem, 6.4vw) !important; }
  .corner, .corner-r { display: none !important; }
  .pnav { display: flex; justify-content: center; gap: 1.6rem; margin: 0 0 0.4rem; font: 0.72rem 'JetBrains Mono', monospace; letter-spacing: 0.12em; }
  .pnav a { color: #a39584; text-decoration: none; }
  .pnav a::before { content: '[ '; color: #6b5f52; } .pnav a::after { content: ' ]'; color: #6b5f52; }
}
