:root {
  color-scheme: light;
  --ink: #000000;
  --paper: #f4f7ff;
  --panel: #ffffff;
  --line: #98a8ce;
  --deep-blue: #1e346e;
  --mid-blue: #2d4e98;
  --link: #0d2b73;
  --gold: #d1b15f;
  --soft-gold: #f7edd0;
  --soft-border: #d8e0f2;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

@keyframes site-background-drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, 180px, 0);
  }
}

@keyframes page-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  position: relative;
  background-color: #e4ebfb;
  background-image: linear-gradient(180deg, rgba(221, 229, 249, 0.48) 0%, rgba(236, 241, 255, 0.4) 280px, rgba(230, 237, 253, 0.48) 100%);
  background-repeat: no-repeat;
  background-position: center top;
  color: var(--ink);
  font-family: "Nimbus Roman", "Times New Roman", Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: -220px 0;
  background: url("../assets/slackware-background.jpg") left top / auto repeat;
  opacity: 0.72;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: site-background-drift 60s linear infinite alternate;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 1rem auto 1.75rem;
  padding: 1rem 1rem 2rem;
  border: 1px solid #8fa2cf;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(17, 30, 75, 0.18);
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.2s ease;
  animation: page-fade-up 0.7s ease-out both;
}

body.is-page-transitioning .container {
  opacity: 0;
  transform: translateY(10px);
}

h1,
h2 {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid #182f62;
  background: linear-gradient(180deg, var(--mid-blue), var(--deep-blue));
  color: #fff;
  font-size: 1.38rem;
}

h2 {
  margin-bottom: 0.55rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #b7c6e7;
  background: linear-gradient(180deg, #ffffff, #edf3ff);
  color: #1a3374;
}

h3,
h4 {
  margin-bottom: 0.35rem;
}

a,
.quick-links a {
  color: var(--link);
  text-decoration: underline;
}

a:hover,
a:focus-visible {
  color: #4e2468;
}

section {
  margin-bottom: 1.2rem;
  animation: page-fade-up 0.7s ease-out both;
}

section:nth-of-type(1) {
  animation-delay: 0.06s;
}

section:nth-of-type(2) {
  animation-delay: 0.12s;
}

section:nth-of-type(3) {
  animation-delay: 0.18s;
}

section:nth-of-type(4) {
  animation-delay: 0.24s;
}

section:nth-of-type(5) {
  animation-delay: 0.3s;
}

.site-header {
  display: flex;
  align-items: center;
  border: 1px solid #bdcae8;
  background: #f3f7ff;
  padding: 0.45rem 0.55rem;
  animation: page-fade-up 0.6s ease-out both;
}

.site-header h1 {
  margin: 0;
  flex: 1;
}

.subtitle {
  margin-top: 0.35rem;
  border-left: 4px solid var(--gold);
  background: #f8fbff;
  padding: 0.2rem 0.5rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.home-hero-copy {
  display: grid;
  gap: 0.45rem;
}

.home-hero-lead {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid #c2d0eb;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 246, 255, 0.84));
  color: #1b376f;
  font-weight: 700;
}

.home-hero-side {
  display: grid;
  gap: 0.55rem;
}

.home-hero-points {
  margin: 0;
}

.home-grid {
  display: grid;
  gap: 1rem;
}

.home-grid--two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-grid--main {
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
}

.home-panel {
  display: grid;
  gap: 0.75rem;
}

.home-panel-intro {
  margin: 0;
  color: #29467f;
}

.home-panel--compact {
  align-content: start;
}

.home-notes-list {
  margin: 0;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.quick-links a {
  border: 1px solid #334f93;
  background: linear-gradient(180deg, #ffffff, #e1e9ff);
  box-shadow: inset 0 0 0 1px #ffffff;
  padding: 0.32rem 0.52rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  background: linear-gradient(180deg, #fff9e0, #f0ddb0);
  color: #4a2b00;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(30, 52, 110, 0.16), inset 0 0 0 1px #fff7df;
}

.hub-link-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.4rem;
}

.hub-link-item {
  margin: 0;
}

.hub-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: 1px solid #334f93;
  background: linear-gradient(180deg, #ffffff, #e1e9ff);
  box-shadow: inset 0 0 0 1px #ffffff;
  padding: 0.38rem 0.55rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--link);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hub-link-button:hover,
.hub-link-button:focus-visible {
  background: linear-gradient(180deg, #fff9e0, #f0ddb0);
  color: #4a2b00;
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(30, 52, 110, 0.15), inset 0 0 0 1px #fff7df;
}

.hub-link-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.legal-disclaimer {
  border-top: 1px solid #c5d2ee;
  padding-top: 0.75rem;
  color: #273860;
}

.legal-disclaimer p {
  margin: 0.4rem 0 0;
}

#wiki-content {
  display: grid;
  gap: 1rem;
}

.wiki-card,
.guide-card,
.vm-shell,
.archive-shell,
.archive-card,
.tree-card {
  border: 1px solid #bfd0ef;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.wiki-card,
.guide-card,
.vm-shell,
.archive-shell,
.tree-card {
  padding: 0.95rem;
}

.wiki-page-card {
  display: grid;
  gap: 1rem;
}

.wiki-section-card {
  border: 1px solid #d4ddf0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.9));
  padding: 0.95rem;
}

.wiki-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid #c6d3ed;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 239, 255, 0.88));
  padding: 1rem;
}

.wiki-hero-media {
  display: grid;
  place-items: center;
  min-height: 260px;
  aspect-ratio: 16 / 10;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid #cfdaef;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(235, 241, 255, 0.82)),
    linear-gradient(180deg, rgba(219, 228, 250, 0.5), rgba(245, 248, 255, 0.72));
}

.wiki-hero-image {
  display: block;
  filter: drop-shadow(0 10px 16px rgba(20, 38, 96, 0.16));
}

.wiki-hero-image--screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.wiki-hero-image--logo {
  width: min(100%, 240px);
  max-height: 200px;
  object-fit: contain;
}

.wiki-hero-body {
  display: grid;
  gap: 0.85rem;
}

.wiki-hero-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.wiki-hero-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.wiki-hero-title-group {
  min-width: 0;
}

.wiki-hero-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #173571;
  font-size: 1.65rem;
}

.wiki-hero-summary,
.wiki-hero-overview {
  margin: 0;
}

.wiki-hero-summary {
  color: #243e79;
  font-weight: 700;
}

.wiki-hero-facts {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.wiki-hero-fact {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #ccd7ee;
  background: rgba(255, 255, 255, 0.72);
}

.wiki-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.wiki-hero-action {
  width: auto;
  min-width: 180px;
  justify-content: center;
}

.wiki-card,
.guide-card,
.vm-shell,
.archive-shell,
.archive-card,
.tree-card,
.wiki-nav,
.tree-nav,
.tree-toolbar {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wiki-card:hover,
.guide-card:hover,
.vm-shell:hover,
.archive-shell:hover,
.archive-card:hover,
.tree-card:hover,
.wiki-nav:hover,
.tree-nav:hover,
.tree-toolbar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(30, 52, 110, 0.08);
  border-color: #a7b9e0;
}

.archive-card {
  padding: 0.8rem;
}

.vm-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.vm-controls select,
.vm-controls button,
.vm-controls a {
  min-height: 40px;
}

.vm-controls select {
  min-width: 260px;
  padding: 0.3rem 0.45rem;
}

.vm-controls a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d5deef;
  padding: 0.35rem 0.55rem;
  background: #fff;
}

.vm-status {
  color: #444;
  margin: 0 0 0.7rem;
}

.vm-frame-wrap {
  border: 1px solid #d8dff0;
  background: #f3f6fd;
}

#vm-frame {
  width: 100%;
  min-height: 620px;
  border: 0;
}

.guide-card pre,
.wiki-card pre {
  margin: 0.35rem 0 0.65rem;
  padding: 0.5rem;
  background: #f2f6ff;
  border: 1px solid #ccd8f1;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.guide-table-wrap {
  overflow-x: auto;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.guide-table th,
.guide-table td {
  border: 1px solid #d6deef;
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

.guide-table thead th {
  background: #eef4ff;
}

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.contributor-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #c8d5ef;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(239, 244, 255, 0.92));
  box-shadow: 0 10px 24px rgba(22, 39, 93, 0.08);
  overflow: hidden;
}

.contributor-card--wide {
  grid-column: 1 / -1;
}

.contributor-photo {
  width: 100%;
  height: 260px;
  object-fit: contain;
  object-position: center top;
  padding: 0.75rem;
  background: linear-gradient(180deg, #edf3ff, #f8fbff);
  border-bottom: 1px solid #d7e1f4;
}

.contributor-body {
  padding: 0.9rem;
}

.contributor-body h3 {
  margin: 0.15rem 0 0.5rem;
}

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

.contributor-tag {
  margin: 0;
  color: #294a8e;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.archive-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.archive-controls button {
  border: 1px solid #cad6ef;
  background: #fff;
  padding: 0.55rem 0.75rem;
  min-height: 42px;
  cursor: pointer;
}

.archive-controls button:hover {
  background: #f2f6ff;
}

#year-slider {
  width: 100%;
  margin: 0.6rem 0 0.9rem;
  min-height: 36px;
}

.archive-topline {
  margin-bottom: 0.6rem;
}

.archive-year {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.archive-title {
  margin: 0.1rem 0 0;
  font-weight: 700;
}

.archive-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid #d7e0f2;
  margin-bottom: 0.6rem;
  background: #f2f5fb;
}

.archive-image-landscape {
  max-height: 360px;
}

.archive-image-portrait {
  max-height: 560px;
}

.archive-image-square {
  max-height: 420px;
}

.archive-image-lowres {
  image-rendering: auto;
  background: #fafafa;
}

.archive-image-fallback {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: #666;
}

.archive-caption {
  color: #333;
  border-top: 1px solid #e5ecf8;
  padding-top: 0.5rem;
  margin-top: 0.9rem;
}

.archive-fun-fact {
  margin: 0.7rem 0 0;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid #8aa4d6;
  background: #f5f8ff;
}

.wiki-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
}

.wiki-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.wiki-nav {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.7rem;
  position: sticky;
  top: 0.75rem;
}

.wiki-nav h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.wiki-nav ul {
  padding-left: 1rem;
}

.wiki-nav li {
  margin-bottom: 0.25rem;
}

.wiki-nav a[aria-current="page"] {
  font-weight: 700;
}

.wiki-page-shell > p {
  margin: 0.4rem 0;
}

.wiki-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--soft-border);
}

.wiki-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.wiki-page-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wiki-page-title-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.wiki-card p {
  margin-top: 0.4rem;
}

.wiki-iso-link {
  margin: 0.35rem 0 0.6rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #c7d3ec;
  background: #f4f8ff;
}

.wiki-toc {
  border: 1px solid #c7d3ec;
  background: #f7faff;
  padding: 0.75rem;
  margin: 0.8rem 0 1rem;
}

.wiki-toc-list {
  list-style: none;
  padding-left: 0;
  columns: 2;
  column-gap: 1.25rem;
}

.wiki-toc-item {
  break-inside: avoid;
  margin-bottom: 0.45rem;
}

.wiki-toc-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
}

.wiki-card ul {
  margin-bottom: 1rem;
}

.tree-toolbar {
  border: 1px solid #c6d2ec;
  background: #f6f9ff;
  padding: 0.75rem;
  margin-bottom: 0.9rem;
}

.tree-toolbar label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.tree-toolbar input {
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 0.55rem;
  border: 1px solid #9db0dc;
}

.tree-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tree-nav {
  border: 1px solid #c6d2ec;
  background: #f6f9ff;
  padding: 0.75rem;
  position: sticky;
  top: 0.75rem;
}

.tree-nav h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.tree-nav ul {
  margin: 0;
  padding-left: 1rem;
}

.tree-content {
  display: grid;
  gap: 1rem;
}

.tree-card h3 {
  margin: 0 0 0.35rem;
}

.tree-figure {
  margin: 0.7rem 0 0;
}

.tree-image {
  width: 100%;
  min-height: 240px;
  border: 1px solid #c7d3ec;
  background: #f3f7ff;
}

.tree-figure figcaption {
  margin-top: 0.45rem;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.5rem;
}

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

  body,
  .container,
  .site-header,
  section {
    animation: none;
  }

  .quick-links a,
  .hub-link-button,
  .wiki-card,
  .guide-card,
  .vm-shell,
  .archive-shell,
  .archive-card,
  .tree-card,
  .wiki-nav,
  .tree-nav,
  .tree-toolbar {
    transition: none;
  }

  .quick-links a:hover,
  .quick-links a:focus-visible,
  .hub-link-button:hover,
  .hub-link-button:focus-visible,
  .wiki-card:hover,
  .guide-card:hover,
  .vm-shell:hover,
  .archive-shell:hover,
  .archive-card:hover,
  .tree-card:hover,
  .wiki-nav:hover,
  .tree-nav:hover,
  .tree-toolbar:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  .home-hero,
  .home-grid--two-up,
  .home-grid--main {
    grid-template-columns: 1fr;
  }

  .container {
    max-width: 100%;
    margin: 0;
    padding: 1rem 0.8rem 2rem;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  h1 {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.05rem;
  }

  .subtitle {
    margin-top: 0.12rem;
  }

  .quick-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-links a {
    text-align: center;
    padding: 0.65rem 0.7rem;
  }

  .hub-link-button {
    padding: 0.5rem 0.6rem;
  }

  .wiki-card,
  .guide-card,
  .archive-shell,
  .archive-card,
  .tree-card {
    padding: 0.75rem;
  }

  .archive-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .archive-controls button {
    width: 100%;
  }

  .archive-image-landscape,
  .archive-image-square,
  .archive-image-portrait,
  .archive-image {
    max-height: 300px;
  }

  .wiki-layout,
  .tree-layout {
    grid-template-columns: 1fr;
  }

  .wiki-hero {
    grid-template-columns: 1fr;
  }

  .wiki-hero-facts {
    grid-template-columns: 1fr;
  }

  .wiki-nav,
  .tree-nav {
    position: static;
  }

  ul,
  ol {
    padding-left: 1rem;
  }

  .guide-table {
    min-width: 520px;
  }

  .guide-table th,
  .guide-table td {
    font-size: 0.92rem;
  }

  .contributors-grid {
    grid-template-columns: 1fr;
  }

  .contributor-photo {
    height: 220px;
    padding: 0.55rem;
  }

  .vm-controls {
    align-items: stretch;
  }

  .vm-controls select,
  .vm-controls button,
  .vm-controls a {
    width: 100%;
  }

  #vm-frame {
    min-height: 520px;
  }

  .wiki-toc-list {
    columns: 1;
  }
}
