/* CGTerm 3.0 / html-v2 "Void Phosphor" redesign */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;700;900&family=Share+Tech+Mono&display=swap');

:root {
  --void: #05050c;
  --panel: rgba(12, 14, 28, 0.82);
  --panel-edge: rgba(100, 120, 255, 0.22);
  --text: #b8bcc8;
  --muted: #5c6270;
  --font-ui: "Share Tech Mono", "Consolas", monospace;
  --font-terminal: "JetBrains Mono", "IBM Plex Mono", "SF Mono", "Cascadia Code", "Consolas", monospace;
  --font-display: "Orbitron", sans-serif;
  --radius: 10px;
  --sticky-h: 56px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Themes */
html[data-theme="phosphor"] {
  --accent: #00ff9d;
  --accent-dim: rgba(0, 255, 157, 0.15);
  --glow: rgba(0, 255, 157, 0.45);
  --secondary: #00d4ff;
  --heat: #ff2d95;
}

html[data-theme="amber"] {
  --accent: #ffb020;
  --accent-dim: rgba(255, 176, 32, 0.12);
  --glow: rgba(255, 176, 32, 0.5);
  --secondary: #ff7840;
  --heat: #ffcc66;
}

html[data-theme="violet"] {
  --accent: #c56fff;
  --accent-dim: rgba(197, 111, 255, 0.12);
  --glow: rgba(197, 111, 255, 0.5);
  --secondary: #64f0ff;
  --heat: #ff6fd2;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--void);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10000;
  padding: 10px 18px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* Ambient */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(80, 60, 180, 0.25), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(0, 180, 140, 0.08), transparent),
    linear-gradient(180deg, #070712 0%, var(--void) 40%, #020208 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 2px,
    rgba(0, 0, 0, 0.18) 2px 3px
  );
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  .scanlines { opacity: 0.2; }
}

/* Sticky header */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(5, 5, 12, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-edge);
}
.top-bar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: var(--sticky-h);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.brand__mark {
  font-size: 1.2rem;
  color: var(--heat);
  text-shadow: 0 0 12px var(--glow);
  animation: pulse-mark 3s ease-in-out infinite;
}
@keyframes pulse-mark {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
@media (prefers-reduced-motion: reduce) {
  .brand__mark { animation: none; }
}
.brand__ver {
  font-size: 0.65em;
  color: var(--secondary);
  margin-left: 4px;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  flex: 1;
  justify-content: center;
}
.nav-main a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-main a:hover {
  color: var(--accent);
  border-color: var(--panel-edge);
  background: var(--accent-dim);
}
.nav-main a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-theme {
  font-family: inherit;
  font-size: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  color: var(--accent);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-theme:hover {
  box-shadow: 0 0 20px var(--accent-dim);
}
.btn-theme:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
.btn-gh {
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-gh:hover {
  background: var(--accent);
  color: #000;
}
.btn-gh:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Layout */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  position: relative;
  z-index: 1;
}

section {
  scroll-margin-top: calc(var(--sticky-h) + 16px);
}

.section__h {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--heat);
  letter-spacing: 0.2em;
  margin: 0 0 20px;
  text-shadow: 0 0 24px var(--glow);
}
.section__angle { color: var(--secondary); opacity: 0.8; }
.section__lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin: -8px 0 16px;
}
.section { margin-bottom: 56px; }

/* Hero */
.hero {
  text-align: center;
  padding: 48px 24px 56px;
  margin-bottom: 40px;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel), rgba(8, 10, 24, 0.6));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 20px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), transparent 40%, var(--heat), transparent 70%, var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}
.hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--secondary);
  margin-bottom: 12px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  font-weight: 900;
  margin: 0;
  line-height: 1.05;
  background: linear-gradient(90deg, var(--accent), var(--secondary), var(--heat));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px var(--accent-dim));
}
.hero__three {
  font-weight: 700;
  font-size: 0.55em;
  vertical-align: super;
}
.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  letter-spacing: 0.35em;
  color: var(--secondary);
  margin: 16px 0 8px;
}
.hero__tagline {
  max-width: 52ch;
  margin: 16px auto 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.15s, background 0.15s;
}
.btn:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--accent);
  color: #030308;
  font-weight: 700;
  border-color: var(--accent);
  box-shadow: 0 0 28px var(--accent-dim);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--glow);
}
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--panel-edge);
}
.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.btn--small {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 0.9rem;
}
.btn--dl {
  margin-top: 14px;
  background: linear-gradient(160deg, rgba(30, 40, 80, 0.9), rgba(10, 12, 28, 0.95));
  color: var(--accent);
  border: 2px solid var(--accent);
  font-weight: 600;
}
.btn--dl:hover {
  background: var(--accent);
  color: #000;
}
.btn--dl-ghost {
  background: transparent;
}

/* Panels & cards */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 24px 26px;
  backdrop-filter: blur(8px);
}
.panel strong { color: var(--accent); }
#about .panel > p + p {
  margin-top: 1.15em;
}

.note {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  border-left: 4px solid var(--secondary);
  background: rgba(0, 0, 0, 0.35);
}
.note--info { color: var(--muted); }

.credits {
  margin: 20px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-terminal);
  font-size: 0.9rem;
  line-height: 1.45;
}
.credits__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) 1fr;
  column-gap: 1.25rem;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(100, 120, 255, 0.1);
}
.credits__row:last-of-type {
  border-bottom: none;
  padding-bottom: 2px;
}
.credits__row:first-of-type {
  padding-top: 2px;
}
.credits__k {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: end;
}
.credits__v {
  margin: 0;
  color: var(--text);
}
.credits__note {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 400;
}

.t-glow { color: var(--accent); text-shadow: 0 0 12px var(--glow); }
.t-cyan { color: var(--secondary); }
.t-magenta { color: var(--heat); }
.t-amber { color: #ffcc70; }
.t-phosphor { color: var(--accent); }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.card:hover {
  border-color: rgba(0, 255, 200, 0.35);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
}
.card__h {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--secondary);
  margin: 0 0 10px;
}
.card p {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
}
.card code {
  font-size: 0.85em;
  color: var(--accent);
}

/* Screenshots: centered 4×N grid (4 cols; 8 shots = 2 rows) */
.section--shots .section__h,
.section--shots .section__lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section--shots .section__lead {
  max-width: 42rem;
}

.grid-shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  justify-items: stretch;
  align-items: start;
}

@media (max-width: 900px) {
  .grid-shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .grid-shots {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
  .credits__row {
    grid-template-columns: 1fr;
    row-gap: 4px;
    padding: 10px 0;
  }
  .credits__k {
    text-align: start;
  }
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.shot:hover,
.shot:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-dim);
  outline: none;
}
.shot:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.shot__cap {
  display: block;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--secondary);
}

kbd {
  font-family: inherit;
  font-size: 0.85em;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--panel-edge);
  background: rgba(0, 0, 0, 0.5);
}

/* Lightbox */
.lightbox[hidden] { display: none !important; }
.lightbox:not([hidden]) {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}
.lightbox__fig {
  position: relative;
  margin: 0;
  z-index: 1;
  max-width: 96vw;
  max-height: 92vh;
}
.lightbox__img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border: 2px solid var(--panel-edge);
  border-radius: 8px;
  box-shadow: 0 0 60px var(--accent-dim);
}
.lightbox__x {
  position: absolute;
  top: -48px;
  right: 0;
  font-size: 2.2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: rgba(20, 22, 40, 0.95);
  color: var(--heat);
  cursor: pointer;
  font-family: inherit;
}
.lightbox__x:hover { color: #fff; }
.lightbox__x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Changelog: terminal / NFO panel */
.changelog-terminal {
  margin: 0;
  padding: 0;
  background: linear-gradient(165deg, #0a0c14 0%, #050508 45%, #0a0812 100%);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(0, 255, 200, 0.06) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  font-family: var(--font-terminal);
  font-size: 0.78rem;
  line-height: 1.55;
  max-height: min(72vh, 560px);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(0, 0, 0, 0.55);
  position: relative;
}
.changelog-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 3px
  );
  opacity: 0.4;
}
.changelog-terminal > * {
  position: relative;
  z-index: 1;
}
.changelog-terminal::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.changelog-terminal::-webkit-scrollbar-track {
  background: rgba(12, 14, 24, 0.95);
  border-radius: 6px;
}
.changelog-terminal::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--secondary));
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.35);
}
.changelog-terminal::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.12);
}
.changelog-terminal:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

.chlog-bar {
  margin: 0;
  padding: 14px 18px 10px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
}
.chlog-bar__user {
  color: var(--secondary);
}
.chlog-bar__path {
  color: var(--accent);
}
.chlog-bar__cursor {
  color: var(--heat);
  animation: chlog-blink 1.1s step-end infinite;
}
@keyframes chlog-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chlog-bar__cursor { animation: none; opacity: 1; }
}

.chlog-ascii {
  margin: 0;
  padding: 12px 18px 8px;
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--secondary);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
  white-space: pre;
  overflow-x: auto;
  background: transparent;
  border: none;
}
.chlog-ascii--foot {
  padding-top: 8px;
  padding-bottom: 16px;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-dim);
}

.chlog-head {
  text-align: center;
  padding: 4px 18px 14px;
  border-bottom: 1px solid rgba(255, 45, 149, 0.2);
}
.chlog-head__main {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  color: var(--heat);
  text-shadow: 0 0 20px rgba(255, 45, 149, 0.35);
}
.chlog-head__sub {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.chlog-head__meta {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.chlog-block {
  padding: 14px 18px 10px;
  border-bottom: 1px dashed rgba(100, 120, 255, 0.15);
}
.chlog-block:last-of-type {
  border-bottom: none;
}

.chlog-h {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a0ff;
  text-shadow: 0 0 14px rgba(200, 160, 255, 0.35);
}
html[data-theme="amber"] .chlog-h {
  color: #ffcc70;
  text-shadow: 0 0 14px rgba(255, 200, 100, 0.3);
}

.chlog-intro,
.chlog-prose {
  margin: 0;
  color: #9ec5d6;
  font-size: 0.78rem;
  line-height: 1.6;
}
.chlog-prose {
  margin-top: 8px;
  color: var(--text);
}

.chlog-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.chlog-list li {
  position: relative;
  padding: 6px 12px 6px 14px;
  color: #b4c4d4;
  font-size: 0.78rem;
  line-height: 1.5;
  border-left: 2px solid transparent;
}
.chlog-list li:hover {
  border-left-color: var(--accent-dim);
  background: rgba(0, 255, 157, 0.04);
}

.chlog-tag {
  display: inline-block;
  min-width: 2.2em;
  margin-right: 6px;
  font-weight: 600;
  font-size: 0.74rem;
}
.chlog-tag--plus {
  color: var(--accent);
  text-shadow: 0 0 10px var(--glow);
}
.chlog-tag--warn {
  color: #ffb84d;
  text-shadow: 0 0 10px rgba(255, 184, 77, 0.4);
}

.chlog-code {
  color: var(--secondary);
  font-weight: 500;
}
.chlog-note {
  color: var(--muted);
  font-size: 0.74rem;
}

/* Download */
.grid-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.dl-card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.dl-card__h {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--heat);
  margin: 0 0 6px;
  letter-spacing: 0.1em;
}
.dl-card__meta {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.dl-card p { margin: 0 0 8px; color: var(--text); font-size: 0.95rem; }
.dl-card code { color: var(--accent); }

.code-block {
  text-align: left;
  margin: 14px 0;
  padding: 14px 16px;
  background: #000;
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-x: auto;
  border: 1px solid #1a1a2e;
}

/* Terminal */
.center { text-align: center; }
.term-frame {
  max-width: 720px;
  margin: 24px auto 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}
.term-frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #1e2035, #12141f);
  border-bottom: 1px solid var(--panel-edge);
}
.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.term-dot--r { background: #ff5f57; }
.term-dot--y { background: #febc2e; }
.term-dot--g { background: #28c840; }
.term-frame__title {
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.term-frame__body {
  min-height: 400px;
  background: #000;
}
.term-placeholder {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}
.term-placeholder__cli code {
  color: var(--accent);
  font-size: 0.9rem;
}
.fTelnetContainer {
  width: 100%;
  min-height: 400px;
}

/* Greetz */
.greetz__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 24px;
}
@media (max-width: 768px) {
  .greetz__cols { grid-template-columns: 1fr; }
}
.greetz__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.greetz__list li {
  padding: 4px 0;
  color: var(--secondary);
  font-size: 0.95rem;
  transition: color 0.15s;
}
.greetz__list li:hover { color: var(--accent); }
.greetz__list li.elite {
  margin-top: 8px;
  font-weight: 600;
}
.greetz__bbs {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--panel-edge);
  text-align: center;
  color: var(--muted);
}

/* Footer */
.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 48px;
  text-align: center;
  border-top: 1px solid var(--panel-edge);
}
.friends {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}
.friend {
  display: block;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  min-width: 160px;
  transition: border-color 0.2s, transform 0.2s;
}
.friend:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.friend:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.friend__t {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.friend__d {
  font-size: 0.85rem;
  color: var(--muted);
}
.foot__line {
  color: var(--text);
  margin: 8px 0;
  font-size: 0.95rem;
}
.foot__dim {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

/* FAB */
.fab-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(8, 10, 22, 0.9);
  color: var(--accent);
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.fab-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fab-top:hover {
  background: var(--accent);
  color: #000;
}
.fab-top:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

/* Subtle CRT flicker on hero only */
@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: hero-flicker 10s ease-in-out infinite;
  }
}
@keyframes hero-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.97; }
  94% { opacity: 1; }
}

@media (max-width: 640px) {
  .nav-main {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
  .top-bar__inner {
    justify-content: space-between;
  }
}

/* ============================================================= *
 *  C64 boot intro                                               *
 * ============================================================= */
.boot { display: none; }
.boot--run {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #3b30a0;                 /* C64 background blue */
  --c64-fg: #8a7fe0;                   /* C64 light blue */
  animation: boot-power 0.5s ease-out;
}
.is-booting { overflow: hidden; }
.boot__crt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 8vh, 90px) 16px;
  overflow: hidden;
}
.boot__crt::after {                    /* scanlines + vignette over the boot screen */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.16) 2px 4px),
    radial-gradient(ellipse 90% 80% at 50% 50%, transparent 55%, rgba(0,0,0,0.55));
}
.boot__screen {
  margin: 0;
  width: min(640px, 100%);
  color: var(--c64-fg);
  font-family: "Share Tech Mono", "Consolas", monospace;
  font-size: clamp(0.78rem, 2.6vw, 1.15rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(138, 127, 224, 0.55);
}
.boot__screen::after {                 /* blinking block cursor */
  content: "\2588";
  animation: boot-blink 1s step-end infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }
.boot__skip {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 2;
  padding: 8px 14px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--c64-fg);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--c64-fg);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s;
}
.boot__skip:hover, .boot__skip:focus-visible { opacity: 1; outline: none; }
@keyframes boot-power {                /* CRT switch-on: thin line expands to full */
  0%   { transform: scaleY(0.004); filter: brightness(3); }
  40%  { transform: scaleY(0.02);  filter: brightness(2.2); }
  100% { transform: scaleY(1);     filter: brightness(1); }
}
.boot--flash { background: #f4f1ff !important; transition: background 0.12s; }
.boot--flash .boot__crt, .boot--flash .boot__skip { opacity: 0; }
.boot--off { animation: boot-off 0.6s ease-in forwards; }
@keyframes boot-off {                  /* CRT power-off: collapse to a line, then a dot */
  0%   { transform: scale(1, 1); opacity: 1; background: #f4f1ff; }
  35%  { transform: scale(1, 0.006); opacity: 1; background: #fff; }
  75%  { transform: scale(0.12, 0.004); opacity: 1; background: #fff; }
  100% { transform: scale(0, 0); opacity: 0; background: #fff; }
}
