/* emptyarray.com — [] motif, red/black retro terminal */
:root {
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --bg: #0a0000;
  --bg-panel: #120505;
  --red: #ff0033;
  --red-dim: #990022;
  --red-glow: #ff3355;
  --black: #050505;
  --text: #ffccd5;
  --text-muted: #884455;
  --shadow-primary-hue: 355;
  --shadow-secondary-hue: 0;
  --primary-hue: 0;
  --nav-h: 48px;
  --pixel: 4px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-tiny: 12px;
  /* GitHub-style fenced blocks (dark) */
  --code-bg: #0d1117;
  --code-head-bg: #161b22;
  --code-border: #30363d;
  --code-label: #8b949c;
  --code-text: #e6edf3;
  --code-inline-bg: rgba(110, 118, 129, 0.2);
  --code-inline-border: #30363d;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--bg);
  padding-top: var(--nav-h);
}

a {
  color: var(--red-glow);
  text-decoration: underline;
  text-decoration-color: var(--red-dim);
  text-underline-offset: 2px;
}

a:visited:not(.cybr-btn):not(.brand-link):not(.latest-card) {
  color: #aa5566;
}

a:hover:not(.cybr-btn):not(.brand-link):not(.latest-card),
a:focus-visible:not(.cybr-btn):not(.brand-link):not(.latest-card) {
  color: var(--red);
  text-decoration-color: var(--red-glow);
}

/* CRT / scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12),
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.45;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Thin top bar — full width, cyber buttons */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: var(--nav-h);
  background: linear-gradient(180deg, #1a0508 0%, #0d0203 100%);
  border-bottom: 2px solid var(--red-dim);
  box-shadow: 0 0 20px rgba(255, 0, 51, 0.25);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  height: 100%;
  gap: 8px;
}

.nav-bar__brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-domain__dot {
  color: var(--red-dim);
}

.brand-link {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.brand-logo {
  height: 34px;
  width: auto;
  max-width: 140px;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 5px rgba(255, 0, 51, 0.35));
}

.brand-link.is-active .brand-logo {
  filter: drop-shadow(0 0 10px rgba(255, 0, 51, 0.55));
}

.nav-bar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Cyberpunk glitch button — red theme (inspired by xdega / CodePen) */
.cybr-btn {
  --primary: hsl(var(--primary-hue), 85%, 42%);
  --primary-lightness: 2;
  --color: #ffe0e5;
  --font-size: 13px;
  --label-size: 10px;
  --shadow-secondary: hsl(var(--shadow-secondary-hue), 100%, 55%);
  --shadow-primary: hsl(var(--shadow-primary-hue), 100%, 48%);
  --border: 0px;
  --shimmy-distance: 8;
  --clip-one: polygon(0 2%, 100% 2%, 100% 95%, 95% 95%, 95% 90%, 85% 90%, 85% 95%, 8% 95%, 0 70%);
  --clip-two: polygon(0 78%, 100% 78%, 100% 100%, 95% 100%, 95% 90%, 85% 90%, 85% 100%, 8% 100%, 0 78%);
  --clip-three: polygon(0 44%, 100% 44%, 100% 54%, 95% 54%, 95% 54%, 85% 54%, 85% 54%, 8% 54%, 0 54%);
  --clip-four: polygon(0 0, 100% 0, 100% 0, 95% 0, 95% 0, 85% 0, 85% 0, 8% 0, 0 0);
  font-family: var(--font-sans);
  color: var(--color);
  background: transparent;
  text-transform: uppercase;
  font-size: var(--font-size);
  font-weight: 600;
  outline: transparent;
  letter-spacing: 0.03em;
  position: relative;
  border: 0;
  height: 38px;
  line-height: 34px;
  padding: 0 12px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.cybr-btn:after,
.cybr-btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  clip-path: var(--clip);
  z-index: -1;
}

.cybr-btn:before {
  background: var(--shadow-primary);
  transform: translate(var(--border), 0);
}

.cybr-btn:after {
  background: var(--primary);
}

.cybr-btn__glitch {
  position: absolute;
  top: calc(var(--border) * -1);
  left: calc(var(--border) * -1);
  right: calc(var(--border) * -1);
  bottom: calc(var(--border) * -1);
  background: var(--shadow-primary);
  text-shadow: 2px 2px var(--shadow-primary), -2px -2px var(--shadow-secondary);
  clip-path: var(--clip);
  animation: glitch 2.2s infinite;
  display: none;
  white-space: nowrap;
}

.cybr-btn:hover .cybr-btn__glitch,
.cybr-btn:focus-visible .cybr-btn__glitch {
  display: block;
}

.cybr-btn__glitch:before {
  content: "";
  position: absolute;
  top: calc(var(--border) * 1);
  right: calc(var(--border) * 1);
  bottom: calc(var(--border) * 1);
  left: calc(var(--border) * 1);
  clip-path: var(--clip);
  background: var(--primary);
  z-index: -1;
}

.cybr-btn {
  --clip: var(--clip-four);
}

@keyframes glitch {
  0% {
    clip-path: var(--clip-one);
  }
  2%,
  8% {
    clip-path: var(--clip-two);
    transform: translate(calc(var(--shimmy-distance) * -1%), 0);
  }
  6% {
    clip-path: var(--clip-two);
    transform: translate(calc(var(--shimmy-distance) * 1%), 0);
  }
  9% {
    clip-path: var(--clip-two);
    transform: translate(0, 0);
  }
  10% {
    clip-path: var(--clip-three);
    transform: translate(calc(var(--shimmy-distance) * 1%), 0);
  }
  13% {
    clip-path: var(--clip-three);
    transform: translate(0, 0);
  }
  14%,
  21% {
    clip-path: var(--clip-four);
    transform: translate(calc(var(--shimmy-distance) * 1%), 0);
  }
  31%,
  61%,
  100% {
    clip-path: var(--clip-four);
  }
}

.cybr-btn.is-active:after {
  background: #330011;
  box-shadow: inset 0 0 12px var(--red);
}

.cybr-btn.is-active {
  color: var(--red-glow);
}

/* Main layout */
main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero__array {
  font-size: clamp(40px, 14vw, 120px);
  line-height: 1.1;
  color: var(--red);
  text-shadow:
    0 0 20px rgba(255, 0, 51, 0.45),
    4px 4px 0 var(--black);
  margin: 0;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.hero__array-bracket {
  display: inline-block;
  animation: bracket-pulse 3s ease-in-out infinite;
}

.hero__array-bracket--r {
  animation-delay: 0.15s;
}

@keyframes bracket-pulse {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.88;
    filter: brightness(1.15);
  }
}

.hero__domain {
  font-family: var(--font-mono);
  font-size: clamp(12px, 2.8vw, 16px);
  color: var(--red-glow);
  margin: 16px 0 20px;
  letter-spacing: 0.12em;
}

.hero__domain span {
  color: var(--text-muted);
}

.hero__tag {
  font-size: var(--fs-small);
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 auto 24px;
}

.hero__code {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  line-height: 1.55;
  color: var(--red-dim);
  white-space: pre;
  overflow-x: auto;
  margin: 24px auto 0;
  opacity: 0.9;
  max-width: 28em;
  text-align: left;
  border-left: 2px solid var(--red-dim);
  padding-left: 12px;
}

.hero__code .kw {
  color: var(--text-muted);
}

.hero__code .name {
  color: var(--red-glow);
}

.panel {
  background: var(--bg-panel);
  border: var(--pixel) solid var(--red-dim);
  box-shadow:
    var(--pixel) var(--pixel) 0 var(--black),
    inset 0 0 30px rgba(255, 0, 40, 0.06);
  padding: 20px;
  margin-bottom: 24px;
}

.panel__title {
  font-size: 1rem;
  color: var(--red-glow);
  margin: 0 0 12px;
  border-bottom: 2px dashed var(--red-dim);
  padding-bottom: 8px;
}

.panel p {
  margin: 0 0 12px;
  color: var(--text);
}

.panel p:last-child {
  margin-bottom: 0;
}

.panel .irc-nick {
  font-family: var(--font-mono);
  color: var(--red-glow);
  font-weight: 600;
}

.panel .irc-channels {
  margin: 0;
  padding-left: 1.25em;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text);
  line-height: 1.55;
}

.panel .irc-channels li {
  margin: 2px 0;
}

/* Home — ONLINE[] three-column grid */
.panel--online .online-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .panel--online .online-grid {
    grid-template-columns: 1fr;
  }
}

.online-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed var(--red-dim);
  box-shadow: inset 0 0 20px rgba(255, 0, 40, 0.04);
  padding: 14px 14px 12px;
  min-width: 0;
}

.online-card__label {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--red-glow);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--red-dim);
}

.panel--online .online-card__line {
  margin: 0 0 8px;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.panel--online .online-card__line:last-child {
  margin-bottom: 0;
}

.panel--online .online-card__sub {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 12px 0 6px;
}

.panel--online .online-card .irc-channels {
  margin: 0;
  padding-left: 1.1em;
}

.panel--online .online-card .irc-channels li:last-child {
  margin-bottom: 0;
}

/* Home — LATEST[] teaser row */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .latest-grid {
    grid-template-columns: 1fr;
  }
}

.latest-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 14px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed var(--red-dim);
  box-shadow: inset 0 0 20px rgba(255, 0, 40, 0.04);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.latest-card:hover,
.latest-card:focus-visible {
  border-color: var(--red-glow);
  box-shadow:
    inset 0 0 20px rgba(255, 0, 40, 0.06),
    0 0 14px rgba(255, 0, 51, 0.1);
}

.latest-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.latest-card__label {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--red-dim);
}

.latest-card__title {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--red-glow);
  line-height: 1.45;
}

.latest-card:hover .latest-card__title,
.latest-card:focus-visible .latest-card__title {
  color: var(--red);
}

/* Home — terminal challenge (hacker-box) */
.panel--mission .hacker-box {
  margin-left: auto;
  margin-right: auto;
}

.hacker-box {
  position: relative;
  max-width: 600px;
  width: 100%;
  overflow: hidden;
  padding: 25px;
  background-color: #000;
  border: 3px solid #f00;
  color: #f00;
  font-family: "Courier New", Courier, var(--font-mono);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.hacker-box__content {
  position: relative;
  z-index: 1;
}

.hacker-box .scanline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 2px;
  background: rgba(255, 0, 0, 0.1);
  pointer-events: none;
  animation: hacker-scan 4s linear infinite;
}

@keyframes hacker-scan {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

.hacker-box .status-text,
.hacker-box .mission-text {
  margin: 0 0 8px;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.hacker-box .mission-text {
  margin-bottom: 0;
}

.hacker-box__code {
  margin: 20px 0;
  padding: 15px;
  background: #1a0000;
  border: none;
  border-left: 4px solid #f00;
  color: #ff4d4d;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

.hacker-box .input-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hacker-box .prompt {
  flex-shrink: 0;
  font-size: var(--fs-tiny);
}

.hacker-box #flag-input {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  width: 200px;
  padding: 4px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid #f00;
  color: #f00;
  outline: none;
  font-family: inherit;
  font-size: var(--fs-small);
}

.hacker-box #flag-input::placeholder {
  color: rgba(255, 0, 0, 0.45);
}

.hacker-box #flag-input:focus-visible {
  border-bottom-color: #ff4d4d;
}

.hacker-box__execute {
  flex-shrink: 0;
  padding: 5px 15px;
  border: none;
  background: #f00;
  color: #000;
  font-family: inherit;
  font-size: var(--fs-tiny);
  font-weight: bold;
  cursor: pointer;
}

.hacker-box__execute:hover {
  background: #ff4d4d;
}

.hacker-box__execute:focus-visible {
  outline: 2px solid #ff4d4d;
  outline-offset: 2px;
}

.hacker-box__feedback {
  margin: 15px 0 0;
  min-height: 1.2em;
  font-weight: bold;
  font-size: var(--fs-small);
}

/* old.html — weekly challenge archive: solution block (append at end of hacker-box__content) */
.hacker-box .weekly-challenge-archive__answer {
  margin: 20px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(0, 255, 65, 0.35);
}

.hacker-box .weekly-challenge-archive__answer-label {
  margin: 0 0 8px;
  font-size: var(--fs-small);
  font-weight: bold;
  color: #0f0;
  letter-spacing: 0.04em;
}

.hacker-box .weekly-challenge-archive__answer-body {
  margin: 0 0 8px;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: #ff4d4d;
}

.hacker-box .weekly-challenge-archive__answer-body code {
  color: #0f0;
  background: rgba(0, 40, 0, 0.35);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.hacker-box .weekly-challenge-archive__answer-note {
  margin: 0;
  font-size: var(--fs-tiny);
  line-height: 1.5;
  color: rgba(255, 77, 77, 0.85);
}

/* old.html — collapsible archive entries (details/summary, collapsed by default) */
.old-archive-details {
  margin: 0;
}

.old-archive-summary {
  position: relative;
  list-style: none;
  padding: 0 0 0 1.35rem;
  cursor: pointer;
  user-select: none;
}

.old-archive-summary::-webkit-details-marker {
  display: none;
}

.old-archive-summary::marker {
  content: "";
}

.old-archive-summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0.45em;
  font-size: 0.65rem;
  color: var(--red-glow);
  line-height: 1;
  transition: transform 0.15s ease;
}

.old-archive-details[open] > .old-archive-summary::before {
  transform: rotate(90deg);
}

.old-archive-summary:focus {
  outline: none;
}

.old-archive-summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.old-archive-summary .old-archive-summary__heading {
  margin: 0 0 6px;
}

.old-archive-summary .old-archive-summary__meta {
  margin: 0;
}

.old-archive-details__body {
  padding-top: 16px;
}

/* GitHub-like fenced code (shared with .prose pre) */
.code-block {
  margin: 0 0 12px;
  border: 1px solid var(--code-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.code-block figcaption {
  margin: 0;
}

.code-block__head {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--code-label);
  background: var(--code-head-bg);
  border-bottom: 1px solid var(--code-border);
  user-select: none;
}

.code-block pre,
.code-block__pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--code-text);
  background: var(--code-bg);
  tab-size: 2;
  -moz-tab-size: 2;
}

.code-block pre code,
.code-block__pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
}

/* PayPal return pages (sadface / thanks) — no navbar */
body.page-callback {
  padding-top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.callback-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  max-width: none;
}

.callback-main .mood-face {
  font-size: clamp(56px, 20vw, 160px);
  line-height: 1.05;
  color: var(--red);
  text-shadow:
    0 0 24px rgba(255, 0, 51, 0.5),
    5px 5px 0 var(--black);
  margin: 0 0 40px;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-family: var(--font-sans);
}

.callback-main .mood-face--happy {
  color: var(--red-glow);
  text-shadow:
    0 0 28px rgba(255, 51, 85, 0.45),
    5px 5px 0 var(--black);
}

.callback-home {
  margin-top: 8px;
}

.donate-intro {
  text-align: center;
}

/* PayPal donate — POST to paypal.com/donate, full-page checkout */
#donate-button-container {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.donate-form {
  display: inline-block;
  margin: 0;
}

.donate-form input[type="image"] {
  display: block;
}

/* Article list */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px dashed var(--red-dim);
  padding: 12px 0;
}

.article-list li:last-child {
  border-bottom: 0;
}

.article-list a {
  color: var(--red-glow);
  text-decoration: none;
  font-size: var(--fs-small);
}

.article-list a:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px var(--red);
}

.article-meta {
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin-top: 4px;
}

.articles-filter-wrap {
  margin: 16px 0 8px;
}

.articles-filter-label {
  display: block;
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.articles-count {
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin: 0 0 12px;
}

.home-section--hidden {
  display: none !important;
}

.home-filter-panel .home-filter-hint {
  margin: 0 0 12px;
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.55;
}

.home-filter-panel .filter-pill {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11px;
  font-family: var(--font-mono);
}

/* Videos grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.video-card {
  border: 2px solid var(--red-dim);
  background: var(--black);
  padding: 0;
  overflow: hidden;
}

.video-card__inner {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #111;
}

.video-card__inner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card__cap {
  padding: 10px;
  font-size: var(--fs-tiny);
  color: var(--text-muted);
}

/* Wargames */
.wargame-grid {
  display: grid;
  gap: 12px;
}

.wargame-card {
  display: block;
  padding: 16px;
  border: 2px solid var(--red-dim);
  background: linear-gradient(135deg, #140808 0%, #0a0203 100%);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wargame-card:hover {
  border-color: var(--red);
  box-shadow: 0 0 16px rgba(255, 0, 51, 0.2);
}

.wargame-card h3 {
  font-size: var(--fs-small);
  color: var(--red-glow);
  margin: 0 0 8px;
}

.wargame-card p {
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin: 0;
}

/* Article body */
.prose {
  font-size: var(--fs-small);
  line-height: 1.9;
}

.prose h2 {
  font-size: 1rem;
  color: var(--red-glow);
  margin: 24px 0 12px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--code-text);
  background: var(--code-inline-bg);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--code-inline-border);
}

.prose pre {
  margin: 0 0 12px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--code-text);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  tab-size: 2;
  -moz-tab-size: 2;
}

.prose pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  white-space: pre;
}

.prose ul {
  margin: 0 0 12px 1.2em;
  padding: 0;
}

.prose li {
  margin-bottom: 6px;
}

.prose ol {
  margin: 0 0 12px 1.2em;
  padding: 0;
}

.prose-table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
  max-width: 100%;
}

.prose table {
  width: 100%;
  min-width: min(100%, 48em);
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.prose th,
.prose td {
  border: 1px solid var(--red-dim);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: rgba(26, 5, 8, 0.85);
  color: var(--red-glow);
  font-weight: 600;
}

/* Shellcraft / terminal-flavored (articles + home panel) */
.panel--shellcraft .shellcraft-home {
  max-width: 42em;
  margin-left: auto;
  margin-right: auto;
}

.shellcraft-home__subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--red-glow);
  margin: 0 0 18px;
  line-height: 1.35;
}

.prose--shellcraft .shellcraft-terminal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 20px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  line-height: 1.45;
  color: var(--red-glow);
  background: linear-gradient(180deg, #080203 0%, #050102 100%);
  border: 1px solid var(--red-dim);
  border-left: 3px solid var(--red);
  box-shadow:
    inset 0 0 28px rgba(255, 0, 40, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.prose--shellcraft .shellcraft-terminal__line {
  display: block;
}

.prose--shellcraft .shellcraft-terminal__line--sub {
  color: var(--text-muted);
}

.prose--shellcraft .shellcraft-terminal__prompt {
  margin-right: 6px;
  color: var(--red-dim);
}

.prose--shellcraft .shellcraft-heading {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-glow);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--red-dim);
}

.prose--shellcraft kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  color: var(--code-text);
  background: var(--code-inline-bg);
  border: 1px solid var(--code-inline-border);
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--code-border);
}

.footer {
  text-align: center;
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  padding: 32px 16px;
  position: relative;
  z-index: 1;
}

.err-msg {
  color: var(--red);
  font-size: var(--fs-tiny);
}

/* Curated links page */
.links-page {
  max-width: 1100px;
}

.links-controls__row {
  margin-bottom: 16px;
}

.links-controls__row:last-of-type {
  margin-bottom: 8px;
}

.links-controls__label {
  display: block;
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.links-search {
  width: 100%;
  max-width: 420px;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  padding: 10px 12px;
  background: var(--black);
  border: 2px solid var(--red-dim);
  color: var(--text);
  border-radius: 0;
}

.links-search::placeholder {
  color: var(--text-muted);
}

.links-search:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red-glow);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-row--tags {
  align-items: flex-start;
}

.filter-pill {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  background: var(--black);
  color: var(--text-muted);
  border: 2px solid var(--red-dim);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.filter-pill:hover {
  color: var(--red-glow);
  border-color: var(--red);
}

.filter-pill--active {
  color: var(--red-glow);
  border-color: var(--red);
  background: #1a0508;
  box-shadow: inset 0 0 12px rgba(255, 0, 51, 0.15);
}

.filter-pill--tag {
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.01em;
}

.filter-clear {
  font-family: var(--font-sans);
  font-size: var(--fs-tiny);
  padding: 6px 10px;
  background: transparent;
  color: var(--red-dim);
  border: 1px dashed var(--red-dim);
  cursor: pointer;
  margin-left: auto;
  align-self: center;
}

.filter-clear:hover {
  color: var(--red-glow);
  border-color: var(--red);
}

.links-count {
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin: 8px 0 0;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.link-card {
  border: 2px solid var(--red-dim);
  background: linear-gradient(165deg, #140808 0%, #0a0203 100%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.link-card:hover {
  border-color: var(--red);
  box-shadow: 0 0 14px rgba(255, 0, 51, 0.12);
}

.link-card__title {
  font-size: var(--fs-small);
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

.link-card__title a {
  color: var(--red-glow);
  text-decoration: none;
}

.link-card__title a:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px var(--red);
}

.link-card__desc {
  font-size: var(--fs-tiny);
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  line-height: 1.55;
}

.link-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--red-dim);
}

.link-card__cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.link-card__tag {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 2px 6px;
  border: 1px solid var(--red-dim);
  background: var(--black);
}

@media (max-width: 640px) {
  .nav-bar {
    flex-direction: column;
    height: auto;
    padding: 8px;
    gap: 8px;
  }

  body {
    padding-top: 0;
  }

  .site-header {
    position: relative;
    height: auto;
  }

  .nav-bar__links {
    justify-content: center;
  }

  .cybr-btn {
    font-size: 12px;
    padding: 0 8px;
  }
}
