:root {
  color-scheme: light;
  --ink: #1a2930;
  --muted: #4e6269;
  --paper: #f8f9f6;
  --rule: #cdd9d5;
  --accent: #075953;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.7 Inter, system-ui, sans-serif;
}

.container {
  width: min(64rem, 100% - clamp(2.25rem, 6vw, 4rem));
  margin-inline: auto;
}

.page-header {
  color: #fff;
  background:
    radial-gradient(ellipse 34% 42% at -3% -8%, #22c4fffa, #1385ffa9 23%, #1155f56b 52%, transparent 88%),
    radial-gradient(ellipse 48% 45% at 2% 39%, #2371ff94, #1853ef5c 37%, transparent 85%),
    radial-gradient(ellipse 72% 95% at 30% 15%, #1a4ada4d, transparent 78%),
    linear-gradient(110deg, #10378e, #0a2465 48%, #061536);
}

/* The navigation follows the static header used by CyberDax Den. */
.site-nav,
.footer-inner {
  width: min(1180px, 100% - 64px);
  margin-inline: auto;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 78px;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0.11em;
  white-space: nowrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #166aff, #071f6a);
  box-shadow: 0 4px 12px #195fc028;
}

.brand-mark img {
  display: block;
  width: 95%;
  height: 95%;
  object-fit: contain;
  transform: translateX(2px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 29px;
  color: #f4f8ff;
  font-size: 13px;
  font-weight: 650;
}

.nav-links a:not(.nav-portal):hover,
.mobile-menu nav a:not(.nav-portal):hover {
  color: #82ddff;
}

.nav-portal,
.archive-link {
  border: 1px solid #a5caff8c;
  border-radius: 7px;
  background: #ffffff13;
}

.nav-portal {
  padding: 12px 18px;
  white-space: nowrap;
}

.nav-portal:hover,
.archive-link:hover {
  background: #ffffff25;
}

.mobile-menu {
  display: none;
}

.page-heading {
  padding-block: clamp(2.5rem, 8vw, 5rem);
}

h1, h2 {
  font-family: "DM Serif Text", Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
}

h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(2rem, 4.1vw, 3.4375rem);
  font-weight: 810;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 4vw, 2.3rem);
}

.subtitle {
  margin: 0.6rem 0 1.4rem;
  color: #cfddfa;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
}

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

.archive-link {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  color: #fff;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

main {
  flex: 1;
  padding-block: 2.25rem 4rem;
}

.introduction {
  font-size: 1.0625rem;
}

.introduction p {
  margin: 0 0 1rem;
}

.intro-lead {
  font-size: 1.1875rem;
  font-weight: 500;
}

.archive-note {
  padding-inline-start: 1rem;
  border-inline-start: 3px solid #83aaa1;
  color: var(--muted);
}

.archive-search {
  margin-block: 1.75rem;
}

.archive-search label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 650;
}

.search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.search-controls input,
.search-controls button {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid #839b98;
  border-radius: 6px;
  font: inherit;
}

.search-controls input {
  flex: 1 1 16rem;
  min-width: 0;
  color: var(--ink);
  background: #fff;
}

.search-controls button {
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

.search-controls button:disabled {
  opacity: 0.55;
  cursor: default;
}

.search-controls :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#search-status {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.article-list li {
  padding-block: 1rem;
  border-block: 1px solid var(--rule);
}

.article-list time,
.article-list p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.article-list a {
  font-size: 1.15rem;
  font-weight: 650;
}

.article-content {
  font-size: 1.0625rem;
}

.article-back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 650;
}

.article-content > article > header {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 2px solid #177879;
}

.article-content h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.article-content :is(h2, h3, h4) {
  color: #174c58;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.35;
}

#research :is(h1, h2, h3, h4, h5, h6) {
  margin-block: 1.8125rem 0.5rem;
}

#research :is(h1, h2, h3, h4, h5, h6) + p {
  margin-top: 0;
}

#research :is(ul, ol) {
  margin-block: 0.65rem 1.1rem;
  padding-inline-start: 1.5rem;
}

#research li {
  padding-inline-start: 0.25rem;
  margin-block: 0.35rem;
  overflow-wrap: anywhere;
}

#research li::marker {
  color: var(--accent);
}

#research li > p {
  margin-block: 0.35rem;
}

.article-content :is(p, pre) {
  white-space: pre-wrap;
}

.article-content :is(p, a, pre) {
  overflow-wrap: anywhere;
}

.article-content pre {
  padding: 18px;
  border-radius: 6px;
  background: #f2f5f7;
}

.article-content code {
  font-family: Consolas, monospace;
}

.article-content table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
}

.article-content :is(td, th) {
  padding: 8px;
  border: 1px solid #ccd5da;
}

.article-content :is(footer, .metadata) {
  color: #53616b;
  font-size: 0.9rem;
}

.article-content > footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #ccd5da;
}

@media print {
  .article-page > .page-header,
  .article-page > .site-footer,
  .article-back-link {
    display: none;
  }

  .article-content {
    width: 100%;
    padding: 0;
    font-size: 11pt;
  }

  .article-content a {
    color: inherit;
  }
}

.site-footer {
  background: #071329;
  color: #91a5c3;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 85px;
  font-size: 12px;
}

.footer-brand {
  color: #f5faff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  color: #dce9ff;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 1000px) {
  .nav-links {
    gap: 15px;
  }
}

@media (max-width: 760px) {
  .page-header {
    background:
      radial-gradient(ellipse 145% 75% at 0% 0%, #1984ff, #164dda 36%, transparent 78%),
      linear-gradient(135deg, #113b9d, #071631);
  }

  .site-nav,
  .footer-inner {
    width: min(580px, 100% - 36px);
  }

  .footer-inner {
    flex-wrap: wrap;
    padding-block: 25px;
  }

  .footer-brand {
    width: 100%;
  }

  .site-nav {
    min-height: 68px;
    gap: 8px;
  }

  .brand {
    font-size: 18px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu {
    position: relative;
    display: block;
  }

  .mobile-menu summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 10px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu nav {
    position: absolute;
    top: 100%;
    right: 0;
    width: min(290px, 100vw - 36px);
    padding: 9px;
    border: 1px solid #315ca0;
    border-radius: 9px;
    background: #071c52;
    color: #edf7ff;
    box-shadow: 0 14px 24px #07173840;
  }

  .mobile-menu nav a {
    display: block;
    padding: 12px;
    font-size: 13px;
  }

  .mobile-menu .nav-portal {
    margin-top: 6px;
  }
}
