/* ============================================================================
   mezboy.com - unified cyberpunk theme for docsify 5
   Replaces cyberpunk.css (v3) + modern-cyber.css (v4).
   Design intent: strong machine-UI identity in the chrome (frames, mono labels,
   neon edges, scan sweep), calm and highly readable in the body copy.
   No web fonts (Google Fonts is unreachable from CN) - system stacks only.
   ========================================================================== */

:root {
  /* Surfaces */
  --void:        #05090f;
  --void-2:      #070d17;
  --panel:       rgba(11, 21, 36, 0.72);
  --panel-solid: #0b1524;
  --panel-hi:    #10203a;

  /* Ink */
  --ink:         #eef8f7;
  --ink-2:       #c8dbdb;
  --ink-3:       #8fa6a8;
  --ink-4:       #62767a;

  /* Neon */
  --cyan:        #39ffe2;
  --cyan-dim:    rgba(57, 255, 226, 0.14);
  --cyan-edge:   rgba(57, 255, 226, 0.34);
  --magenta:     #ff3cac;
  --magenta-dim: rgba(255, 60, 172, 0.13);
  --amber:       #ffcf4d;

  --line:        rgba(120, 190, 200, 0.16);
  --line-strong: rgba(57, 255, 226, 0.4);

  /* Type */
  --font-ui: "Segoe UI Variable Text", "Segoe UI", "HarmonyOS Sans SC", "MiSans",
             "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", ui-monospace,
               SFMono-Regular, Consolas, "Courier New", monospace;
  /* Glyph markers (❯ ◆) are not in every mono face - lead with a symbol font. */
  --font-glyph: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", var(--font-mono);

  /* Layout */
  --sidebar-width: 292px;
  --theme-color: var(--cyan);
}

/* ---------------------------------------------------------------- base ---- */

html, body, input, button, textarea {
  font-family: var(--font-ui);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  color: var(--ink-2);
  background: var(--void);
  font-size: 16px;
}

::selection {
  color: var(--void);
  background: var(--cyan);
}

/* Ambient field: two neon blooms over a cold gradient, slowly drifting. */
body::before {
  position: fixed;
  inset: -10%;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 60, 172, 0.16), transparent 32rem),
    radial-gradient(circle at 16% 80%, rgba(57, 255, 226, 0.13), transparent 36rem),
    linear-gradient(140deg, #071628 0%, #080f1f 46%, #180d22 100%);
  animation: ambient-field 24s ease-in-out infinite alternate;
  will-change: transform;
}

/* CRT scanlines - deliberately faint: identity, not noise. */
body::after {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  content: "";
  opacity: 0.4;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
}

/* Single sweep line crossing the whole viewport every 9s. */
html::after {
  position: fixed;
  z-index: 9999;
  right: 0;
  left: 0;
  height: 90px;
  pointer-events: none;
  content: "";
  background: linear-gradient(
    180deg,
    transparent,
    rgba(57, 255, 226, 0.05) 45%,
    rgba(57, 255, 226, 0.11) 50%,
    rgba(57, 255, 226, 0.05) 55%,
    transparent
  );
  animation: viewport-sweep 9s linear infinite;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 255, 226, 0.35) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.35); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(57, 255, 226, 0.5), rgba(255, 60, 172, 0.42));
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* Docsify top loading bar */
.progress {
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta)) !important;
  box-shadow: 0 0 12px rgba(57, 255, 226, 0.6);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- sidebar ---- */

.sidebar {
  width: var(--sidebar-width);
  padding-top: 0;
  color: var(--ink-3);
  background:
    linear-gradient(180deg, rgba(57, 255, 226, 0.05), transparent 220px),
    rgba(6, 12, 21, 0.93);
  border-right: 1px solid var(--line);
  box-shadow: 14px 0 46px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(120%);
}

/* HUD header strip */
.sidebar::before {
  display: block;
  padding: 15px 20px 13px;
  color: var(--cyan);
  content: "\276F  ANZA  \00B7  ARCHIVE";
  background: rgba(57, 255, 226, 0.05);
  border-bottom: 1px solid var(--line);
  font: 600 11px/1.2 var(--font-glyph);
  letter-spacing: 0.24em;
  text-shadow: 0 0 14px rgba(57, 255, 226, 0.55);
}

.sidebar .app-name {
  margin: 18px 0 4px;
  padding: 0 20px;
}

.sidebar .app-name-link img {
  max-width: 96px;
  padding: 7px;
  background: rgba(255, 60, 172, 0.05);
  border: 1px solid rgba(255, 60, 172, 0.22);
  filter: drop-shadow(0 0 14px rgba(255, 54, 95, 0.32));
  transition: border-color 200ms ease, filter 200ms ease;
}

.sidebar .app-name-link:hover img {
  border-color: var(--magenta);
  filter: drop-shadow(0 0 22px rgba(255, 54, 95, 0.6));
}

/* Search box: terminal field */
.search {
  margin: 0;
  padding: 14px 20px 16px !important;
  border-bottom: 1px solid var(--line) !important;
}

.search .input-wrap { position: relative; }

.search input {
  height: 40px;
  padding: 0 12px 0 28px !important;
  color: var(--ink) !important;
  background: rgba(0, 0, 0, 0.42) !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  font: 13px/40px var(--font-mono) !important;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search .input-wrap::before {
  position: absolute;
  top: 50%;
  left: 11px;
  z-index: 1;
  color: var(--cyan);
  content: ">";
  font: 700 13px/1 var(--font-mono);
  transform: translateY(-50%);
}

.search input::placeholder { color: var(--ink-4); }

.search input:focus {
  border-color: var(--line-strong) !important;
  box-shadow: 0 0 0 1px rgba(57, 255, 226, 0.22), 0 0 22px rgba(57, 255, 226, 0.14);
}

.search .clear-button { cursor: pointer; }
.search .clear-button svg circle { fill: rgba(57, 255, 226, 0.25); }

/* Search results */
.search h2 {
  color: var(--cyan) !important;
  font: 600 11px/1.6 var(--font-mono) !important;
  letter-spacing: 0.16em;
}

.search .matching-post {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line) !important;
}

.search p { color: var(--ink-3) !important; font-size: 13px !important; }

.search .search-keyword {
  padding: 0 2px;
  color: var(--void) !important;
  background: var(--cyan);
  font-style: normal;
}

/* Nav list */
.sidebar-nav {
  padding: 10px 14px 40px;
  font-size: 14px;
  line-height: 1.5;
}

.sidebar-nav strong,
.sidebar-nav .group-title,
.sidebar-nav > ul > li > p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 8px;
  padding: 0 6px;
  color: var(--ink-3) !important;
  font: 600 11px/1.4 var(--font-mono) !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-nav strong::before,
.sidebar-nav .group-title::before,
.sidebar-nav > ul > li > p::before {
  width: 3px;
  height: 12px;
  content: "";
  background: var(--magenta);
  box-shadow: 0 0 10px rgba(255, 60, 172, 0.7);
}

.sidebar-nav ul { margin: 0; padding: 0; }
.sidebar-nav li { margin: 1px 0; list-style: none; }

.sidebar-nav a,
.sidebar-nav a:visited {
  position: relative;
  display: block;
  padding: 7px 10px 7px 20px !important;
  color: var(--ink-2) !important;
  border-left: 2px solid transparent;
  font-size: 14px;
  font-weight: 400;
  transition: color 150ms ease, background-color 150ms ease,
              border-color 150ms ease, padding-left 150ms ease;
}

.sidebar-nav a::before {
  position: absolute;
  left: 8px;
  color: var(--cyan);
  content: "\203A";
  opacity: 0;
  font-family: var(--font-mono);
  transition: opacity 150ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav li.active > a {
  color: var(--cyan) !important;
  background: linear-gradient(90deg, var(--cyan-dim), transparent 70%);
  border-left-color: var(--cyan);
  padding-left: 24px !important;
  text-shadow: 0 0 12px rgba(57, 255, 226, 0.4);
}

.sidebar-nav a:hover::before,
.sidebar-nav li.active > a::before { opacity: 1; }

/* Outbound links get a small departure marker. */
.sidebar-nav a[target="_blank"]::after {
  margin-left: 7px;
  color: var(--ink-4);
  content: "\2197";
  font-size: 11px;
}

/* The domain list is data, not navigation - render it as a machine readout. */
.sidebar-nav a[href*="//www."] {
  color: var(--ink-3) !important;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

/* Plain-text entries (e.g. 未完待续) */
.sidebar-nav ul ul li:not(:has(a)) {
  padding: 4px 10px 4px 20px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 12px;
}

.sidebar-toggle {
  background: rgba(8, 16, 27, 0.9) !important;
  border: 1px solid var(--line-strong);
  border-radius: 0;
}

.sidebar-toggle span { background-color: var(--cyan) !important; }

/* ----------------------------------------------------------------- cover -- */

section.cover {
  position: relative;
  overflow: hidden;
  background: #071322 !important;
}

/* Perspective grid floor + horizon bloom */
section.cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(57, 255, 226, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 226, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(255, 60, 172, 0.22), transparent 26rem),
    radial-gradient(circle at 14% 22%, rgba(57, 255, 226, 0.16), transparent 24rem),
    linear-gradient(150deg, #0a2137 0%, #101733 48%, #27122a 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  transform: perspective(620px) rotateX(62deg) scale(1.7) translateY(22%);
  transform-origin: center bottom;
  animation: grid-drift 24s linear infinite;
  will-change: background-position;
}

/* Two horizon rails */
section.cover::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(57, 255, 226, 0.5), transparent) 0 11% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 60, 172, 0.45), transparent) 0 89% / 100% 1px no-repeat;
  animation: rail-breathe 6s ease-in-out infinite alternate;
}

/* docsify core stretches .cover-main to the full flex row - pin it back. */
section.cover .cover-main {
  width: auto !important;
  max-width: min(720px, 90vw) !important;
  flex: 0 1 auto;
  align-self: center;
}

/* HUD frame drawn on the cover's mask layer. */
section.cover .mask {
  pointer-events: none;
}

section.cover .mask::before,
section.cover .mask::after {
  position: absolute;
  width: 46px;
  height: 46px;
  content: "";
}

section.cover .mask::before {
  top: 24px;
  left: 24px;
  border-top: 2px solid var(--cyan-edge);
  border-left: 2px solid var(--cyan-edge);
}

section.cover .mask::after {
  right: 24px;
  bottom: 24px;
  border-right: 2px solid rgba(255, 60, 172, 0.34);
  border-bottom: 2px solid rgba(255, 60, 172, 0.34);
}

.cover-main {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 0 0 38px !important;
  background: rgba(7, 17, 30, 0.8);
  border: 1px solid var(--cyan-edge);
  border-radius: 0;
  box-shadow:
    inset 0 0 60px rgba(57, 255, 226, 0.05),
    0 0 0 1px rgba(255, 60, 172, 0.09),
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(57, 255, 226, 0.1);
  backdrop-filter: blur(10px) saturate(125%);
}

/* Window title bar */
.cover-main::before {
  display: flex;
  align-items: center;
  padding: 11px 18px;
  color: var(--cyan);
  content: "\25CF ONLINE \00B7 BEIJING \00B7 CN \00B7 SIG 100%";
  background: rgba(57, 255, 226, 0.07);
  border-bottom: 1px solid var(--cyan-edge);
  font: 600 10.5px/1.2 var(--font-mono);
  letter-spacing: 0.18em;
  text-align: left;
  text-shadow: 0 0 12px rgba(57, 255, 226, 0.7);
  animation: status-blink 3.2s ease-in-out infinite;
}

/* Corner bracket, bottom-right */
.cover-main::after {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 22px;
  height: 22px;
  content: "";
  border-right: 2px solid var(--magenta);
  border-bottom: 2px solid var(--magenta);
}

.cover-main > p:first-of-type { margin-top: 30px; }

.cover-main img {
  width: 132px !important;
  height: 132px !important;
  padding: 8px;
  border: 1px solid rgba(255, 60, 172, 0.3);
  filter: drop-shadow(0 0 20px rgba(255, 54, 95, 0.45));
  animation: logo-pulse 6s ease-in-out infinite;
}

.cover-main h1 {
  margin: 22px 0 10px;
  padding: 0 24px;
  color: var(--ink) !important;
  font: 700 clamp(30px, 5.4vw, 58px)/1.02 var(--font-ui);
  letter-spacing: -0.045em;
  animation: chroma-split 7s steps(1, end) infinite;
}

.cover-main h1 a,
.cover-main h1 a:hover {
  color: var(--ink) !important;
  text-decoration: none;
}

/* marked renders the coverpage <small> as its own paragraph, not inside h1. */
.cover-main small,
.cover-main h1 small {
  display: block;
  margin-top: 0;
  color: var(--magenta);
  font: 600 11px/1.6 var(--font-mono);
  letter-spacing: 0.22em;
  text-shadow: 0 0 14px rgba(255, 60, 172, 0.45);
}

.cover-main blockquote {
  max-width: 540px;
  margin: 22px auto !important;
  padding: 0 24px;
  color: var(--ink-2);
  border-left: 0;
  font-size: 15px;
  line-height: 1.85;
}

/* Cover meta list rendered as terminal output */
.cover-main ul {
  display: inline-block;
  margin: 8px auto 26px;
  padding: 14px 22px;
  color: var(--ink-3);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font: 500 11px/2 var(--font-mono);
  letter-spacing: 0.08em;
  list-style: none;
  text-align: left;
}

.cover-main ul li::before {
  margin-right: 10px;
  color: var(--cyan);
  content: "\25B8";
}

/* Primary action: notched neon key */
.cover-main .cover-button,
.cover-main > p:last-child a {
  position: relative;
  display: inline-flex;
  min-width: 210px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--void) !important;
  background: var(--cyan) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: 6px 6px 0 var(--magenta), 0 0 28px rgba(57, 255, 226, 0.3);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 0.2em;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.cover-main .cover-button::after,
.cover-main > p:last-child a::after {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: key-shine 4.5s ease-in-out infinite;
}

.cover-main .cover-button:hover,
.cover-main > p:last-child a:hover {
  background: #7dfff0 !important;
  box-shadow: 2px 2px 0 var(--magenta), 0 0 38px rgba(57, 255, 226, 0.55);
  transform: translate(4px, 4px);
}

/* --------------------------------------------------------------- content -- */

.content { padding-top: 0; }

.markdown-section {
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: 40px auto 64px;
  padding: 52px 56px 46px;
  box-sizing: border-box;
  color: var(--ink-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.04);
  font-size: 16px;
  line-height: 1.82;
  overflow-wrap: anywhere;
  backdrop-filter: blur(14px);
}

/* Frame brackets */
.markdown-section::before,
.markdown-section::after {
  position: absolute;
  width: 20px;
  height: 20px;
  content: "";
  pointer-events: none;
}

.markdown-section::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}

.markdown-section::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--magenta);
  border-bottom: 2px solid var(--magenta);
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.markdown-section h1 { font-size: 34px; }

.markdown-section h2 {
  margin-top: 0;
  padding-bottom: 14px;
  font-size: 29px;
  border-bottom: 1px solid var(--line);
}

.markdown-section h2::before {
  margin-right: 0.4em;
  color: var(--magenta);
  content: "\276F";
  font-family: var(--font-glyph);
  font-size: 0.85em;
  font-weight: 400;
  text-shadow: 0 0 16px rgba(255, 60, 172, 0.65);
}

.markdown-section h3::before {
  margin-right: 0.5em;
  color: var(--cyan);
  content: "\258D";
  font-size: 0.8em;
}

.markdown-section p { margin: 1.1em 0; }

.markdown-section a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(57, 255, 226, 0.28);
  transition: color 140ms ease, border-color 140ms ease, text-shadow 140ms ease;
}

.markdown-section a:hover {
  color: #8ffff0;
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 12px rgba(57, 255, 226, 0.5);
}

/* Quote block as an intercepted transmission */
.markdown-section blockquote {
  position: relative;
  margin: 26px 0;
  padding: 20px 24px 20px 26px;
  color: var(--ink-2);
  background: linear-gradient(90deg, var(--cyan-dim), rgba(57, 255, 226, 0.02) 60%, transparent);
  border: 1px solid rgba(57, 255, 226, 0.16);
  border-left: 3px solid var(--cyan);
  border-radius: 0;
  font-size: 15px;
  line-height: 1.9;
}

.markdown-section blockquote::after {
  position: absolute;
  top: 8px;
  right: 12px;
  color: rgba(57, 255, 226, 0.34);
  content: "\25C6  TRANSMISSION";
  font: 600 9.5px/1 var(--font-glyph);
  letter-spacing: 0.16em;
}

.markdown-section blockquote p { margin: 0; }

/* Code */
.markdown-section code,
.markdown-section pre,
.markdown-section pre > code,
.markdown-section output {
  font-family: var(--font-mono) !important;
}

.markdown-section p > code,
.markdown-section li > code {
  padding: 2px 6px;
  color: #ff96d3;
  background: var(--magenta-dim);
  border: 1px solid rgba(255, 60, 172, 0.22);
  border-radius: 0;
  font-size: 0.88em;
}

.markdown-section pre {
  margin: 24px 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid var(--line);
}

.markdown-section pre > code {
  padding: 20px !important;
  color: var(--ink-2);
  background: transparent !important;
  font-size: 13.5px;
  line-height: 1.75;
}

.markdown-section pre::after {
  padding: 3px 9px;
  color: var(--void) !important;
  background: var(--cyan) !important;
  border-radius: 0 !important;
  font: 600 10px/1 var(--font-mono) !important;
  letter-spacing: 0.1em;
  opacity: 1 !important;
}

/* Tables */
.markdown-section table {
  display: table;
  width: 100%;
  border: 1px solid var(--line);
  border-collapse: collapse;
}

.markdown-section th {
  color: var(--cyan);
  background: rgba(57, 255, 226, 0.06);
  border: 1px solid var(--line);
  font: 600 12px/1.6 var(--font-mono);
  letter-spacing: 0.08em;
  text-align: left;
}

.markdown-section td {
  border: 1px solid var(--line);
  font-size: 14.5px;
}

.markdown-section tr:nth-child(even) td { background: rgba(255, 255, 255, 0.018); }

.markdown-section hr {
  height: 1px;
  margin: 34px 0;
  background: linear-gradient(90deg, var(--cyan-edge), rgba(255, 60, 172, 0.24), transparent);
  border: 0;
}

.markdown-section img {
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.markdown-section ul li::marker { color: var(--cyan); }
.markdown-section ol li::marker { color: var(--magenta); font-family: var(--font-mono); }

/* Heading anchors */
.markdown-section .anchor span { color: inherit; }
.markdown-section h2:hover .anchor span,
.markdown-section h3:hover .anchor span { color: var(--cyan); }

/* ------------------------------------------------------- weibo panel ------ */

.signal-panel {
  position: relative;
  overflow: hidden;
  margin: 36px 0 24px;
  background: var(--panel-solid);
  border: 1px solid rgba(57, 255, 226, 0.22);
  border-radius: 0;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.36), 0 0 30px rgba(57, 255, 226, 0.07);
}

.signal-panel__bar {
  display: flex;
  min-height: 46px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--cyan);
  background: rgba(57, 255, 226, 0.06);
  border-bottom: 1px solid var(--line);
  font: 600 11px/1.2 var(--font-mono);
  letter-spacing: 0.15em;
}

.signal-panel__status::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  content: "";
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
  animation: status-blink 2s ease-in-out infinite;
}

.signal-panel__bar a {
  color: var(--magenta) !important;
  border-bottom: 0 !important;
  font-weight: 700;
}

.signal-panel__bar a:hover { text-shadow: 0 0 14px rgba(255, 60, 172, 0.7); }

/* The embed is third-party and always light; dim it so it stops shouting,
   and restore it on hover when you actually want to read it. */
.signal-panel iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 550px;
  background: #fff;
  border: 0;
  filter: brightness(0.86) contrast(1.04) saturate(0.88);
  transition: filter 220ms ease;
}

.signal-panel:hover iframe { filter: none; }

.signal-panel__fallback {
  margin: 0 !important;
  padding: 12px 16px;
  color: var(--ink-4);
  background: rgba(0, 0, 0, 0.42);
  border-top: 1px solid var(--line);
  font: 11.5px/1.7 var(--font-mono);
}

.signal-panel__fallback code {
  color: var(--amber) !important;
  background: rgba(255, 207, 77, 0.1) !important;
  border-color: rgba(255, 207, 77, 0.24) !important;
}

/* ---------------------------------------------------------------- footer -- */

.markdown-section footer {
  display: block;
  margin-top: 30px;
  padding-top: 18px;
  color: var(--ink-4);
  border-top: 1px dashed var(--line);
  font: 11.5px/1.9 var(--font-mono);
  text-align: center;
}

.markdown-section footer::before {
  display: block;
  margin-bottom: 8px;
  color: rgba(57, 255, 226, 0.3);
  content: "\25C6  END OF TRANSMISSION  \25C6";
  font-family: var(--font-glyph);
  letter-spacing: 0.2em;
}

.markdown-section footer a { border-bottom: 0 !important; }

.markdown-section footer .footer-line,
.markdown-section footer .footer-beian {
  display: block;
}

/* ICP filing number - required by law, so it stays legible rather than hidden. */
.markdown-section footer .footer-beian {
  margin-top: 10px;
}

.markdown-section footer .footer-beian a {
  display: inline-block;
  padding: 3px 11px;
  color: var(--ink-3) !important;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line) !important;
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.markdown-section footer .footer-beian a:hover {
  color: var(--cyan) !important;
  background: var(--cyan-dim);
  border-color: var(--line-strong) !important;
}

/* ------------------------------------------------------------- keyframes -- */

@keyframes ambient-field {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.04); }
  50%  { transform: translate3d(2%, 1.5%, 0) scale(1.09); }
  100% { transform: translate3d(-1%, 2%, 0) scale(1.06); }
}

@keyframes viewport-sweep {
  0%   { top: -90px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 48px, 48px 0, 0 0, 0 0, 0 0; }
}

@keyframes rail-breathe {
  from { opacity: 0.45; }
  to   { opacity: 1; }
}

@keyframes status-blink {
  0%, 100% { opacity: 0.62; }
  50%      { opacity: 1; }
}

@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(255, 54, 95, 0.32)); transform: translateY(0); }
  50%      { filter: drop-shadow(0 0 26px rgba(255, 54, 95, 0.55)); transform: translateY(-4px); }
}

@keyframes key-shine {
  0%, 62%   { left: -60%; }
  85%, 100% { left: 130%; }
}

/* Chromatic aberration that only fires for a few frames - a tic, not a strobe. */
@keyframes chroma-split {
  0%, 89%   { text-shadow: 2px 0 rgba(255, 60, 172, 0.32), -2px 0 rgba(57, 255, 226, 0.26); }
  90%       { text-shadow: 7px 0 rgba(255, 60, 172, 0.7), -6px 0 rgba(57, 255, 226, 0.6); }
  92%       { text-shadow: -5px 0 rgba(255, 60, 172, 0.6), 5px 0 rgba(57, 255, 226, 0.55); }
  94%       { text-shadow: 3px 2px rgba(255, 60, 172, 0.5), -3px -2px rgba(57, 255, 226, 0.45); }
  96%, 100% { text-shadow: 2px 0 rgba(255, 60, 172, 0.32), -2px 0 rgba(57, 255, 226, 0.26); }
}

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

@media (max-width: 768px) {
  .cover-main {
    width: calc(100vw - 26px);
    padding-bottom: 30px !important;
  }

  .cover-main::before { letter-spacing: 0.1em; font-size: 9.5px; }

  .cover-main img { width: 98px !important; height: 98px !important; }

  .cover-main h1 { padding: 0 16px; font-size: 32px; }

  .cover-main blockquote { padding: 0 16px; font-size: 14px; }

  .cover-main ul { margin-right: 14px; margin-left: 14px; padding: 12px 16px; }

  .markdown-section {
    width: calc(100% - 16px);
    max-width: 100%;
    margin: 12px 8px 40px;
    padding: 34px 20px 36px;
  }

  .markdown-section h2 { font-size: 23px; }

  .signal-panel__bar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .signal-panel iframe { height: 460px; }

  html::after { display: none; }
}

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

  html::after { display: none; }
  body::after { opacity: 0.2; }
}
