/* Deep-Sky Terminal: restrained production refinement layer. */

:root {
  --void: #02040a;
  --void-2: #071019;
  --void-3: #0c1a28;
  --ink: #f2f7fc;
  --muted: #93aebc;
  --faint: #5c7787;
  --hairline: #1c3242;
  --hairline-bright: #2c4a5e;
  --cyan: #36f6ff;
  --green: #8dff70;
  --amber: #ffd15c;
  --magenta: #ff3fb4;
  --panel: rgba(7, 16, 25, 0.92);
  --panel-2: rgba(12, 26, 40, 0.92);
  --border: #2c4a5e;
  --shadow: 4px 4px 0 #000;
}

body {
  background: var(--void);
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  background:
    linear-gradient(90deg, rgba(54, 246, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(54, 246, 255, 0.022) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.58;
}

.scanlines {
  z-index: 50;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.42;
}

.star-noise {
  opacity: 0.34;
}

:where(a, button, summary, input):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.site-header {
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(2, 4, 10, 0.94);
  box-shadow: none;
  backdrop-filter: blur(14px) saturate(1.05);
}

.site-header::after {
  background: linear-gradient(90deg, var(--cyan), rgba(54, 246, 255, 0.09) 16%, transparent 42%);
  opacity: 0.62;
}

.brand {
  min-height: 64px;
  padding-right: 24px;
  border-right-color: var(--hairline);
  color: var(--ink);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-shadow: none;
}

.site-header .brand-sigil {
  display: none;
}

.site-nav {
  color: var(--muted);
  font-size: 0.44rem;
}

.site-nav a {
  min-height: 64px;
  padding: 0 9px;
}

.site-nav-item > a {
  padding-right: 23px;
}

.site-nav > a:hover,
.site-nav > a:focus-visible,
.site-nav-item:hover > a,
.site-nav-item:focus-within > a {
  background: rgba(54, 246, 255, 0.035);
  color: var(--ink);
}

.site-nav > a[aria-current="page"],
.site-nav-item > a[aria-current="page"] {
  color: var(--cyan);
}

.site-nav a.nav-link-nfts,
.site-nav a.nav-link-nfts:hover,
.site-nav a.nav-link-nfts:focus-visible,
.site-nav a.nav-link-nfts[aria-current="page"],
.site-nav-item-lore:has(.site-nav-caret[aria-expanded="true"]) > a {
  color: var(--magenta);
  background: rgba(255, 63, 180, 0.035);
}

.site-nav-item-lore .site-nav-caret,
.site-nav-item-lore .site-nav-caret:hover,
.site-nav-item-lore .site-nav-caret:focus-visible,
.site-nav-item-lore .site-nav-caret[aria-expanded="true"] {
  color: var(--magenta);
}

.site-nav-submenu {
  width: 250px;
  padding: 8px;
  border: 1px solid var(--hairline-bright);
  border-top: 2px solid var(--cyan);
  background: rgba(7, 16, 25, 0.985);
  box-shadow: 4px 4px 0 #000;
}

.site-nav-item-lore .site-nav-submenu {
  right: 0;
  left: auto;
  border-top-color: var(--magenta);
}

.site-nav .site-nav-submenu a {
  min-height: 38px;
  padding: 10px 12px;
  color: var(--muted);
}

.site-nav .site-nav-submenu a:hover,
.site-nav .site-nav-submenu a:focus-visible {
  padding-left: 16px;
  background: var(--void-3);
  color: var(--cyan);
}

.site-nav-item-lore .site-nav-submenu a:hover,
.site-nav-item-lore .site-nav-submenu a:focus-visible {
  color: var(--magenta);
}

.language-menu {
  margin-left: 10px;
}

.language-menu-toggle {
  min-width: 48px;
  min-height: 34px;
  border-color: var(--hairline-bright);
  background: rgba(248, 251, 255, 0.025);
  box-shadow: none;
}

.language-menu-toggle:hover,
.language-menu-toggle:focus-visible,
.language-menu[open] .language-menu-toggle {
  border-color: var(--cyan);
  color: var(--cyan);
}

.language-menu-list {
  top: calc(100% + 15px);
  min-width: 260px;
  padding: 8px;
  border-color: var(--hairline-bright);
  border-top-color: var(--cyan);
  background: rgba(2, 4, 10, 0.985);
  box-shadow: 4px 4px 0 #000;
}

.language-menu-option {
  font-size: 0.48rem;
}

.hero-stage {
  min-height: clamp(620px, 88svh, 900px);
  padding: 112px 0 52px;
  border-bottom: 1px solid var(--hairline);
}

.hero-bg {
  background-position: center 45%;
  image-rendering: pixelated;
  filter: saturate(0.9) contrast(1.04) brightness(0.84);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(2, 4, 10, 0.72) 0%, rgba(2, 4, 10, 0.26) 42%, rgba(2, 4, 10, 0.54) 76%, var(--void) 100%),
    linear-gradient(90deg, rgba(2, 4, 10, 0.72), rgba(2, 4, 10, 0.08) 62%, rgba(2, 4, 10, 0.3));
}

.hero-content h1 {
  max-width: 24ch;
  font-size: clamp(1.55rem, 3.1vw, 2.55rem);
  line-height: 1.38;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.78);
}

.hero-copy {
  max-width: 54ch;
  margin-top: 24px;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.08rem;
  line-height: 1.7;
  text-shadow: 0 1px 0 #000;
}

.pixel-button,
.pixel-link {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--cyan);
  background: transparent;
  box-shadow: none;
  color: var(--cyan);
  font-size: 0.6rem;
}

.pixel-button-primary {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--void);
  box-shadow: 4px 4px 0 #000;
}

.pixel-button:hover,
.pixel-button:focus-visible,
.pixel-link:hover,
.pixel-link:focus-visible {
  transform: translate(-2px, -2px);
  border-color: var(--cyan);
  background: rgba(54, 246, 255, 0.08);
  color: var(--cyan);
  box-shadow: 4px 4px 0 #000;
}

.pixel-button-primary:hover,
.pixel-button-primary:focus-visible {
  background: var(--cyan);
  color: var(--void);
  box-shadow: 6px 6px 0 #000;
}

.chapter-strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(2, 4, 10, 0.96);
  box-shadow: none;
}

.chapter-grid {
  gap: 12px;
  padding: 16px 0;
}

.chapter-grid a {
  min-height: 88px;
  padding: 18px 16px;
  border: 1px solid var(--hairline);
  background: var(--void-2);
}

.chapter-grid a:last-child {
  border-right: 1px solid var(--hairline);
}

.chapter-grid a:hover,
.chapter-grid a:focus-visible {
  border-color: var(--hairline-bright);
  background: var(--void-3);
}

.chapter-grid span {
  color: var(--faint);
  font-family: "VT323", monospace;
  font-size: 1.55rem;
  line-height: 1;
}

.chapter-grid strong {
  color: var(--ink);
  font-size: 0.52rem;
}

.section {
  padding-top: 88px;
}

.portal-heading {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}

.portal-heading h2 {
  color: var(--muted);
}

.pixel-kicker,
.tile-label {
  color: var(--cyan);
  font-size: 0.58rem;
}

.pixel-panel {
  border: 1px solid var(--hairline);
  background: var(--void-2);
  box-shadow: 4px 4px 0 #000;
}

.pixel-panel::after {
  content: none;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translate(-2px, -2px);
  border-color: var(--hairline-bright);
  box-shadow: 6px 6px 0 #000;
}

.link-card:hover h3,
.link-card:focus-visible h3 {
  color: var(--cyan);
}

.hub-grid,
.channel-grid,
.archive-grid,
.category-read-grid {
  gap: 24px;
}

.hub-card,
.channel-card,
.archive-card,
.category-read-card {
  padding: 24px;
}

.hub-card h3,
.channel-card h3,
.archive-card h3,
.category-read-card h3 {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.82rem, 1.25vw, 1rem);
  line-height: 1.65;
}

.hub-card p:not(.tile-label),
.channel-card p:not(.tile-label),
.archive-card p:not(.tile-label),
.category-read-card p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.category-shell,
.article-layout {
  padding-top: 112px;
}

.category-layout {
  column-gap: 40px;
  row-gap: 36px;
}

.category-intro {
  gap: 14px;
  padding: 12px 0 18px;
}

.category-intro h1 {
  max-width: 24ch;
  font-size: clamp(1.65rem, 3.5vw, 2.8rem);
  line-height: 1.35;
}

.category-intro p:not(.pixel-kicker) {
  max-width: 64rem;
  color: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.72;
}

.category-feature-art {
  min-height: 380px;
  box-shadow: none;
}

.category-feature-copy {
  padding: 28px;
  background: var(--void-2);
}

.category-feature-copy h2 {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2vw, 1.4rem);
  line-height: 1.6;
  text-shadow: none;
}

.category-meta span,
.read-index {
  border: 1px solid var(--hairline-bright);
  background: transparent;
}

.category-read-card {
  min-height: 260px;
}

.archive-index-list {
  gap: 0;
  border-bottom: 1px solid var(--hairline);
}

.archive-index-row {
  min-height: 86px;
  border: 0;
  border-top: 1px solid var(--hairline);
  background: transparent;
}

.archive-index-row:hover {
  border-color: var(--hairline);
  background: var(--void-2);
}

.category-search,
.sidebar-panel {
  border: 1px solid var(--hairline);
  background: var(--void-2);
  box-shadow: none;
}

.category-search input {
  border-bottom: 1px solid var(--hairline-bright);
}

.article-layout-single {
  max-width: 1040px;
}

.article-main {
  padding: clamp(22px, 4vw, 48px);
}

.article-main h1 {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1.4rem, 3.2vw, 2.45rem);
  line-height: 1.38;
  text-shadow: none;
}

.article-title-breadcrumb a,
.article-title-breadcrumb [aria-current="page"] {
  min-height: 0;
  padding: 0;
}

.article-meta-bar span {
  padding: 6px 8px;
  border: 1px solid rgba(255, 209, 92, 0.46);
  background: transparent;
}

.article-hero-art {
  margin: 26px 0;
  border: 1px solid var(--hairline-bright);
  box-shadow: none;
}

.article-intro {
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.78;
}

.article-opening-copy {
  border-top: 1px solid var(--hairline);
}

.article-body {
  max-width: 78ch;
}

.article-body h2 {
  padding-top: 28px;
  border-top-color: var(--hairline);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.article-body h3 {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.86rem, 1.5vw, 1.05rem);
  line-height: 1.65;
}

.article-body p,
.article-body li,
.article-opening-copy p {
  color: #afc3cd;
  font-size: 1.02rem;
  line-height: 1.78;
}

.article-body figure,
.article-body table,
.case-brief div,
.file-snapshot {
  border-color: var(--hairline-bright);
}

.site-footer {
  margin-top: 92px;
  padding-top: 44px;
}

.site-footer::before {
  border-top: 1px solid var(--hairline);
  background: rgba(2, 4, 10, 0.94);
  box-shadow: none;
}

.footer-column a {
  border: 0;
  border-top: 1px solid var(--hairline);
  background: transparent;
}

.footer-bottom {
  border-top: 1px solid var(--hairline);
}

.nft-page .pixel-kicker,
.nft-card .tile-label {
  color: var(--magenta);
}

.nft-page .article-main,
.nft-card,
.nft-model-art {
  border-color: rgba(255, 63, 180, 0.38);
}

.nft-page .article-main {
  background:
    linear-gradient(180deg, rgba(255, 63, 180, 0.055), transparent 42%),
    var(--void-2);
}

.nft-model-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.nft-card figure {
  border-bottom: 1px solid rgba(255, 63, 180, 0.28);
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 63, 180, 0.11), transparent 58%),
    var(--void);
}

.nft-card h3 {
  color: var(--ink);
  font-size: 0.76rem;
}

.nft-card p {
  color: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.62;
  text-transform: none;
}

.nft-card:hover,
.nft-card:focus-visible {
  border-color: var(--magenta);
}

.nft-card:hover h3,
.nft-card:focus-visible h3 {
  color: var(--magenta);
}

.nft-opensea-button,
.nft-quiz-button {
  border-color: var(--magenta);
  background: transparent;
  color: var(--magenta);
  box-shadow: none;
}

@media (max-width: 1240px) {
  .music-toggle {
    display: none;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 10px;
    min-height: 64px;
    padding: 0 18px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 64px;
    padding-right: 0;
    overflow: hidden;
    border-right: 0;
    text-overflow: clip;
  }

  .brand > span:last-child {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    min-height: 34px;
    margin: 0;
    border: 1px solid var(--hairline-bright);
    background: transparent;
    box-shadow: none;
  }

  .language-menu {
    grid-column: 3;
    grid-row: 1;
    margin-left: 0;
  }

  .site-nav {
    order: 6;
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition: max-height 200ms ease, opacity 160ms ease, visibility 160ms ease, padding 160ms ease;
  }

  .site-header.nav-open .site-nav {
    max-height: calc(100vh - 64px);
    padding: 8px 0 14px;
    overflow-y: auto;
    border-top-color: var(--hairline);
    opacity: 1;
    visibility: visible;
  }

  .site-nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    width: 100%;
  }

  .site-nav a {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid var(--hairline);
  }

  .site-nav-item > a {
    padding-right: 12px;
  }

  .site-nav-caret {
    position: static;
    width: 44px;
    height: auto;
    min-height: 44px;
    border-left: 1px solid var(--hairline);
    transform: none;
  }

  .site-nav-submenu,
  .site-nav-item:nth-child(3) .site-nav-submenu,
  .site-nav-item-lore .site-nav-submenu {
    position: static;
    grid-column: 1 / -1;
    width: calc(100% - 16px);
    margin: 2px 0 8px 16px;
    padding: 3px 0 3px 10px;
    border: 0;
    border-left: 1px solid var(--cyan);
    background: rgba(0, 0, 0, 0.16);
    box-shadow: none;
  }

  .site-nav-item-lore .site-nav-submenu {
    border-left-color: var(--magenta);
  }

  .site-nav .site-nav-submenu a {
    min-height: 36px;
    padding: 8px 10px;
    border-bottom: 0;
  }

  .language-menu-list {
    top: calc(100% + 15px);
  }

  .channel-grid,
  .hub-grid,
  .archive-grid,
  .nft-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 18px;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 8px;
    padding: 0 10px;
  }

  .brand {
    max-width: 100%;
    font-size: clamp(0.46rem, 2.2vw, 0.6rem);
    white-space: nowrap;
  }

  .nav-toggle {
    min-width: 0;
    padding: 7px 8px;
    font-size: 0.4rem;
  }

  .language-menu-toggle {
    min-width: 42px;
    padding: 6px;
  }

  .language-menu-list {
    right: -2px;
    width: min(280px, calc(100vw - 20px));
    min-width: 0;
  }

  .hero-stage {
    min-height: 620px;
    padding: 116px 0 52px;
  }

  .hero-content h1 {
    max-width: 24ch;
    font-size: clamp(1.05rem, 4.8vw, 1.48rem);
    line-height: 1.5;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .chapter-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .chapter-grid a {
    min-width: min(76vw, 260px);
    scroll-snap-align: start;
  }

  .category-shell,
  .article-layout {
    padding-top: 96px;
  }

  .category-intro h1,
  .article-main h1 {
    font-size: clamp(1.15rem, 5.3vw, 1.75rem);
    line-height: 1.5;
  }

  .category-feature-art {
    min-height: 280px;
  }

  .article-main,
  .hub-card,
  .channel-card,
  .archive-card,
  .category-read-card {
    padding: 20px;
  }

  .article-body h2 {
    font-size: 0.96rem;
  }

  .article-body h3 {
    font-size: 0.82rem;
  }

  .article-body p,
  .article-body li,
  .article-intro,
  .article-opening-copy p {
    font-size: 0.98rem;
  }

  .site-footer {
    margin-top: 72px;
  }
}

@media (max-width: 520px) {
  .channel-grid,
  .hub-grid,
  .archive-grid,
  .category-read-grid,
  .nft-model-grid,
  .related-nft-grid,
  .nft-trait-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: clamp(0.42rem, 2vw, 0.52rem);
  }

  .nav-toggle::before {
    margin-right: 5px;
  }

  .nav-toggle {
    font-size: 0;
  }

  .nav-toggle::after {
    content: "MENU";
    font-size: 0.38rem;
  }

  .hero-actions,
  .pixel-button,
  .pixel-link {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .site-header {
    column-gap: 6px;
    padding: 0 8px;
  }

  .brand {
    font-size: 0.39rem;
  }

  .language-menu-toggle {
    min-width: 38px;
  }
}

@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;
  }
}

/* Full mockup parity pass -------------------------------------------------- */

.music-toggle {
  display: none !important;
}

@media (min-width: 1241px) {
  .site-header {
    min-height: 72px;
    gap: 18px;
    padding: 0 clamp(24px, 3vw, 48px);
  }

  .brand {
    min-height: 72px;
    padding-right: 28px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .site-nav {
    align-items: stretch;
    margin-left: auto;
    font-size: 0.58rem;
    line-height: 1.6;
  }

  .site-nav a {
    min-height: 72px;
    padding: 0 11px;
  }

  .site-nav-item > a {
    padding-right: 28px;
  }

  .site-nav-caret {
    right: 8px;
    width: 14px;
  }

  .language-menu {
    margin-left: 2px;
  }

  .language-menu-toggle {
    min-width: 52px;
    min-height: 38px;
  }
}

@media (max-width: 1240px) {
  .brand {
    font-size: 0.6rem;
  }

  .brand > span:last-child {
    overflow: visible;
    text-overflow: clip;
  }

  .nav-toggle {
    min-width: 76px;
    min-height: 40px;
    font-size: 0.46rem;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: clamp(0.48rem, 2.25vw, 0.58rem);
  }

  .nav-toggle {
    min-width: 54px;
  }
}

@media (max-width: 360px) {
  .brand {
    font-size: 0.45rem;
  }
}

.terminal-section-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
  color: var(--faint);
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.terminal-section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.latest-archive-list {
  border-bottom: 1px solid var(--hairline);
}

.latest-archive-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 78px;
  padding: 15px 8px;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
}

.latest-archive-row:hover,
.latest-archive-row:focus-visible {
  background: var(--void-2);
}

.latest-archive-row strong {
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.6;
}

.latest-archive-row em {
  color: var(--faint);
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  font-style: normal;
}

.register-chip {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid currentColor;
  color: var(--cyan);
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.register-chip.account {
  color: var(--amber);
}

.register-chip.analysis {
  color: var(--green);
}

.register-chip.lore {
  color: var(--magenta);
}

.home-lore-band {
  margin-top: 96px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--void-2);
}

.home-lore-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.home-lore-copy h2 {
  margin: 20px 0 16px;
  font-family: "Press Start 2P", monospace;
  font-size: 1.12rem;
  line-height: 1.6;
}

.home-lore-copy p {
  max-width: 58ch;
  margin-bottom: 24px;
  color: var(--muted);
}

.lore-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--magenta);
  color: var(--magenta);
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lore-button:hover,
.lore-button:focus-visible {
  background: rgba(255, 63, 180, 0.09);
  color: var(--magenta);
}

.home-lore-frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-lore-frame {
  margin: 0;
  padding: 2px;
  border: 1px solid var(--hairline);
  background: var(--void);
}

.home-lore-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  image-rendering: pixelated;
}

.home-lore-frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px 5px;
  color: var(--faint);
  font-family: "VT323", monospace;
  font-size: 1rem;
}

/* Category template */

.category-layout {
  display: block;
}

.category-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 76px;
  min-width: 0;
  width: 100%;
}

.category-sidebar {
  display: none;
}

.category-intro {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 12px 0 0;
  border-bottom: 1px solid var(--hairline);
}

.category-intro .category-breadcrumb {
  margin: 0 0 18px;
}

.category-intro h1 {
  margin-bottom: 18px;
}

.category-intro > p:not(.pixel-kicker) {
  max-width: 66ch;
  margin-bottom: 34px;
}

.category-tabs {
  display: flex;
  gap: 12px;
  padding: 0 0 30px;
  overflow-x: auto;
  scrollbar-color: var(--hairline-bright) transparent;
  scrollbar-width: thin;
}

.category-tabs a {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

.category-tabs a:first-child {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--void);
  box-shadow: 3px 3px 0 #000;
}

.category-tabs a:hover,
.category-tabs a:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.category-tabs a:first-child:hover,
.category-tabs a:first-child:focus-visible {
  color: var(--void);
}

.category-feature {
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  min-height: 420px;
  border: 1px solid var(--cyan);
  box-shadow: 6px 6px 0 #000;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.category-feature-art {
  min-height: 420px;
}

.category-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 4vw, 46px);
  background: var(--void-2);
}

.category-feature-copy h2 {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.65;
}

.category-read-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-read-card {
  min-height: 280px;
}

.archive-index-row {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 38%);
  min-height: 76px;
}

/* Article template */

.post-page .article-layout-single {
  max-width: 1180px;
}

.post-page .article-main {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.post-page .article-main::after {
  content: none;
}

.post-page .article-main > .pixel-kicker {
  order: 0;
  margin-bottom: 18px;
}

.post-page .article-title-breadcrumb {
  order: 1;
  margin-bottom: 24px;
  color: var(--faint);
  font-family: "VT323", monospace;
  font-size: 1.1rem;
}

.post-page .article-main > h1 {
  order: 2;
  max-width: 28ch;
  margin-bottom: 22px;
}

.post-page .article-meta-bar {
  order: 3;
}

.post-page .article-main > .article-intro {
  order: 4;
  max-width: 64ch;
  margin: 0 0 24px;
  color: var(--muted);
}

.post-page .file-snapshot {
  order: 5;
  margin: 0 0 32px;
  border-width: 1px;
  background: var(--void-2);
}

.post-page .article-hero-art {
  order: 6;
  margin: 12px 0 48px;
}

.post-page .article-opening-copy {
  order: 7;
  width: min(100%, 76ch);
  margin-right: auto;
  margin-left: auto;
}

.post-page .article-body {
  order: 8;
  width: min(100%, 76ch);
  margin-right: auto;
  margin-left: auto;
}

.post-page .article-brief,
.post-page .article-facts,
.post-page .article-source-trail,
.post-page .article-related {
  order: 9;
}

.post-page .article-body blockquote {
  margin: 38px 0;
  padding: 8px 0 8px 24px;
  border-left: 2px solid var(--cyan);
  color: var(--ink);
  font-family: "VT323", monospace;
  font-size: 1.5rem;
  line-height: 1.45;
}

.post-page .article-body table {
  background: var(--void-2);
}

.post-page .article-body figure {
  margin: 40px 0;
  padding: 2px;
  background: var(--void-2);
}

.post-eldans-notes-1 .article-main > .pixel-kicker,
.post-eldans-notes-1 .article-main a,
.post-eldans-notes-1 .article-body h2 {
  color: var(--magenta);
}

.post-eldans-notes-1 .file-snapshot,
.post-eldans-notes-1 .article-hero-art,
.post-eldans-notes-1 .article-body blockquote {
  border-color: var(--magenta);
}

/* Lore archive template */

.lore-archive-header {
  padding: 112px 0 0;
  border-bottom: 1px solid var(--hairline);
}

.lore-archive-header .lore-archive-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--page-gutter) 38px;
}

.lore-archive-path {
  margin-bottom: 18px;
  color: var(--magenta);
  font-family: "VT323", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.lore-archive-header h1 {
  max-width: 26ch;
  margin: 20px 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.45;
}

.lore-archive-intro {
  max-width: 67ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.lore-archive-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.lore-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.lore-tabs a {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  line-height: 1.5;
  text-transform: uppercase;
}

.lore-tabs a:first-child {
  border-color: var(--magenta);
  background: var(--magenta);
  color: var(--void);
  box-shadow: 3px 3px 0 #000;
}

.lore-archive-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.lore-archive-summary {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 0 var(--page-gutter);
}

.lore-archive-summary .file-snapshot {
  border-color: rgba(255, 63, 180, 0.45);
}

.featured-artifact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.artifact-card {
  display: block;
  padding: 2px;
  border: 1px solid rgba(255, 63, 180, 0.38);
  background: var(--void-2);
  color: var(--ink);
  box-shadow: 4px 4px 0 #000;
}

.artifact-card:hover,
.artifact-card:focus-visible {
  transform: translate(-2px, -2px);
  border-color: var(--magenta);
  box-shadow: 6px 6px 0 #000;
}

.artifact-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 63, 180, 0.3);
  background: var(--void);
}

.artifact-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  image-rendering: pixelated;
}

.artifact-card-copy {
  padding: 15px 13px 13px;
}

.artifact-card h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  line-height: 1.65;
}

.artifact-card:hover h3,
.artifact-card:focus-visible h3 {
  color: var(--magenta);
}

.artifact-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-family: "VT323", monospace;
  font-size: 1rem;
}

.community-access {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--magenta);
  background: var(--void-2);
  box-shadow: 6px 6px 0 #000;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.community-access h2 {
  max-width: 34ch;
  margin: 20px 0 16px;
  font-family: "Press Start 2P", monospace;
  font-size: 1.05rem;
  line-height: 1.65;
}

.community-access p {
  max-width: 64ch;
  margin-bottom: 24px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .home-lore-band-inner,
  .category-feature {
    grid-template-columns: 1fr;
  }

  .category-read-grid,
  .featured-artifact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-feature-art {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .latest-archive-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }

  .latest-archive-row .register-chip {
    display: none;
  }

  .home-lore-band-inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .category-main {
    gap: 56px;
  }

  .category-feature-art {
    min-height: 280px;
  }

  .category-read-grid,
  .featured-artifact-grid {
    grid-template-columns: 1fr;
  }

  .archive-index-row {
    grid-template-columns: 1fr;
  }

  .lore-archive-header {
    padding-top: 96px;
  }

  .lore-archive-toolbar,
  .lore-archive-actions {
    align-items: stretch;
    width: 100%;
  }

  .lore-tabs {
    width: 100%;
  }

  .lore-archive-actions .pixel-button {
    flex: 1 1 220px;
  }
}
