:root {
  --page-bg: #000;
  --panel-bg: rgba(4, 8, 6, 0.94);
  --panel-soft: rgba(17, 25, 20, 0.94);
  --line: #526057;
  --text: #f1f5f2;
  --muted: #aab5ae;
  --green: #39ff88;
  --green-soft: rgba(57, 255, 136, 0.12);
  --amber: #ffd166;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

main,
.site-footer,
.cookie-banner {
  position: relative;
  z-index: 1;
}

main {
  flex: 1 0 auto;
  pointer-events: none;
}

main a,
main button,
main summary,
.site-footer a,
.cookie-banner button {
  pointer-events: auto;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--green);
}

.hero {
  padding: 6vh 0 2rem;
  text-align: center;
}

.hero img {
  width: 180px;
  max-width: 55%;
  height: auto;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 0.75rem;
  color: var(--green);
  font-size: clamp(2.7rem, 9vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.28);
}

.hero h2 {
  max-width: 900px;
  margin: 0 auto 1rem;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
}

.hero .subtitle {
  max-width: 820px;
  margin: 0 auto 1.6rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.document-meta {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1.6rem;
}

.opening-statement {
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--green);
  background: var(--green-soft);
  font-weight: 700;
  line-height: 1.6;
}

.document-layout {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 3rem;
}

.terminal-box {
  border: 1px solid var(--text);
  background: var(--panel-bg);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.07);
}

.terminal-title {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--text);
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.025em;
}

.manifest-nav {
  position: sticky;
  top: 1rem;
  display: flex;
  align-self: start;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

.manifest-nav .terminal-title {
  flex: 0 0 auto;
}

.manifest-nav nav {
  min-height: 0;
  flex: 1 1 auto;
  padding: 0.9rem;
  overflow-y: auto;
  pointer-events: auto;
}

.manifest-nav ol {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.55rem;
}

.manifest-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  text-decoration: none;
}

.manifest-nav a:hover,
.manifest-nav a:focus-visible,
.manifest-nav a.is-active {
  color: var(--green);
}

.manifest-content {
  padding: clamp(1rem, 3vw, 2rem);
}

.manifest-content section,
.manifest-content .document-note,
.manifest-content .references {
  scroll-margin-top: 1rem;
}

.manifest-content section + section,
.manifest-content section + .references {
  margin-top: 2.6rem;
  padding-top: 2.1rem;
  border-top: 1px dashed var(--line);
}

.manifest-content h2,
.manifest-content h3 {
  color: var(--green);
  font-weight: 700;
}

.manifest-content h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.manifest-content h3 {
  margin: 1.5rem 0 0.8rem;
  font-size: 1.2rem;
}

.manifest-content p,
.manifest-content li {
  line-height: 1.7;
}

.manifest-content p {
  margin-bottom: 1rem;
}

.manifest-content ul,
.manifest-content ol {
  margin-bottom: 1rem;
  padding-left: 1.6rem;
}

.key-statement {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  font-size: 1.05rem;
  font-weight: 700;
}

.observation-note {
  padding: 0.8rem 1rem;
  border: 1px dashed var(--amber);
  color: #fff2c2;
  font-style: italic;
}

.table-responsive {
  margin: 1.4rem 0;
  border: 1px solid var(--line);
}

.manifest-table {
  min-width: 720px;
  margin: 0;
  color: var(--text);
}

.manifest-table > :not(caption) > * > * {
  padding: 0.75rem;
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.manifest-table thead th {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.phases {
  display: grid;
  gap: 0.85rem;
}

.phase {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.checklist {
  display: grid;
  gap: 0.7rem;
  padding-left: 0 !important;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.55rem;
}

.declaration {
  padding: 1.25rem;
  border: 1px solid var(--green);
  background: var(--green-soft);
  font-size: 1.04rem;
  font-weight: 700;
}

.references {
  margin-top: 2.6rem;
  padding-top: 2.1rem;
  border-top: 1px dashed var(--line);
}

.references p {
  padding-left: 1.25rem;
  text-indent: -1.25rem;
}

.document-note {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-style: italic;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 15px 10px;
  border-top: 1px solid #555;
  background: #111;
  color: #ccc;
  text-align: center;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  z-index: 1000;
  display: none;
  width: 100%;
  padding: 10px 20px;
  border-top: 1px solid #555;
  background: #111;
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-button {
  margin: 0.35rem 0 0.35rem 0.75rem;
  padding: 5px 10px;
  border: 1px solid #fff;
  background: #222;
  color: #fff;
  cursor: pointer;
}

.cookie-button:hover,
.cookie-button:focus-visible {
  background: #fff;
  color: #000;
}

.cookie-button.cookie-reject {
  background: #550000;
}

@media (max-width: 991.98px) {
  .document-layout {
    grid-template-columns: 1fr;
  }

  .manifest-nav {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .manifest-nav nav {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 767.98px) {
  .hero {
    padding-top: 3vh;
  }

  .opening-statement {
    text-align: left;
  }

  .manifest-content {
    padding: 1rem;
  }

  .manifest-table {
    font-size: 0.9rem;
  }
}

@media print {
  #particles-js,
  .manifest-nav,
  .cookie-banner,
  .site-footer,
  .hero img {
    display: none !important;
  }

  html,
  body,
  .terminal-box,
  .manifest-table > :not(caption) > * > * {
    background: #fff !important;
    color: #000 !important;
  }

  .hero {
    padding-top: 0;
  }

  .hero h1,
  .manifest-content h2,
  .manifest-content h3,
  a {
    color: #000 !important;
    text-shadow: none !important;
  }

  .document-layout {
    display: block;
  }

  .terminal-box {
    border: 0;
    box-shadow: none;
  }
}
