html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

html:has(dialog:modal) {
  overflow: hidden;
}

:root {
  color-scheme: dark;
  --background: #0d1a28;
  --text: #8ba7bd;
  --blue: #0d8bf2;
  --pink: #f39bcf;
  --ink: #e7f0f8;
  --link: #7bc3ff;
  --surface: #112233;
  --band: #0a1622;
  --line: #344c62;
  --section-gap: 82px;
  --entry-gap: 24px;
  --entry-padding: 36px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

a:hover {
  color: var(--pink);
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

img, svg {
  max-width: 100%;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
}

.main-frame, .band-content {
  width: calc(100% - 56px);
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 0;
}

.main-frame {
  flex: 1 0 auto;
  padding-block: var(--section-gap);
}

.top-band, .bottom-band {
  background: var(--band);
}

.top-band {
  position: static;
  border-bottom: 1px solid var(--line);
}

.top-band > .band-content {
  min-height: 106px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'jump nav'
    'identity nav';
  align-items: center;
  align-content: center;
  column-gap: 24px;
  row-gap: 5px;
  padding-block: 10px;
}

.to-main {
  grid-area: jump;
  justify-self: start;
  font-size: 14px;
  line-height: 1.2;
}

.identity {
  grid-area: identity;
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.identity img {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
}

.site-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.top-band #site-nav {
  grid-area: nav;
  justify-self: end;
}

.nav-row, .nav-panel {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 5px;
}

.nav-row + .nav-row {
  margin-top: 5px;
}

.nav-row > li + li {
  margin-inline-start: 8px;
  padding-inline-start: 8px;
  border-inline-start: 1px solid var(--line);
}

#site-nav a, #site-nav summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 1px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

#site-nav a:hover, #site-nav summary:hover {
  color: var(--pink);
}

#site-nav a[aria-current='page'], #site-nav a[aria-current='true'], #site-nav details:has(a[aria-current='page'], a[aria-current='true']) > summary {
  border-color: var(--pink);
}

#site-nav details {
  position: relative;
}

#site-nav summary {
  list-style: none;
  cursor: pointer;
}

#site-nav summary::-webkit-details-marker {
  display: none;
}

#site-nav details[open] .nav-mark {
  transform: scaleY(-1);
}

.nav-mark, .section-mark, .button-mark {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
}

.nav-panel {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  width: 228px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--band);
}

.nav-trigger, .nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--link);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.nav-trigger {
  grid-area: trigger;
  justify-self: end;
}

.nav-trigger[hidden] {
  display: none;
}

.nav-trigger:hover, .nav-close:hover {
  color: var(--pink);
}

#navigation-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px clamp(14px, 5vw, 42px);
  overflow: auto;
  border: 0;
  background: var(--band);
  color: var(--text);
}

.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px double var(--line);
}

.dialog-bar h2 {
  margin: 0;
  font-size: 24px;
}

#navigation-dialog .nav-row {
  justify-content: flex-start;
}

#navigation-dialog .nav-row + .nav-row {
  margin-top: 12px;
}

#navigation-dialog .nav-row > li:has(details) {
  width: 100%;
}

#navigation-dialog summary {
  justify-content: space-between;
}

#navigation-dialog .nav-panel {
  position: static;
  width: 100%;
  margin-top: 8px;
}

.home {
  display: grid;
  align-content: start;
  gap: var(--section-gap);
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(ellipse at 94% 28%, #173853 0%, var(--surface) 60%);
}

.welcome p {
  margin: 0 0 16px;
  color: var(--pink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.welcome h1, .entry-page h1 {
  margin: 0;
  font-size: 60px;
  line-height: 1.08;
}

.welcome h1 {
  max-width: 15ch;
}

.welcome-art {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  justify-self: end;
}

.materials {
  display: grid;
  gap: 24px;
  padding-top: 24px;
  border-top: 3px double var(--line);
}

.materials h2, .reference h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  line-height: 1.2;
}

.materials h2 {
  font-size: 30px;
}

#entries {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--entry-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  --preview-height: 72px;
  --stack-width: 432px;
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  grid-template-areas: 'preview copy';
  align-items: center;
  gap: 24px;
  min-width: 0;
  padding: var(--entry-padding);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
  transition: box-shadow 150ms ease;
}

.entry:nth-child(even) {
  --preview-height: 81px;
  --stack-width: 512px;
  grid-template-columns: minmax(0, 1fr) 144px;
  grid-template-areas: 'copy preview';
  background: #142538;
}

.entry:nth-child(3) {
  --preview-height: 67px;
  --stack-width: 400px;
}

@media (hover: hover) {
  .entry:hover {
    box-shadow: inset 0 0 18px #0d8bf22c;
  }
}

.entry-preview {
  grid-area: preview;
  display: grid;
  justify-items: center;
  width: 144px;
  max-width: 100%;
}

.entry-preview img {
  display: block;
  width: auto;
  height: var(--preview-height);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #19354d;
}

.entry-copy {
  grid-area: copy;
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.entry-meta {
  margin: 0;
  color: var(--pink);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.035em;
}

.entry-title, .excerpt {
  display: -webkit-box;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.entry-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.excerpt {
  max-width: 60ch;
}

.entry-action, .reference-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  color: var(--link);
  font-weight: 700;
}

.entry-action {
  margin-top: 4px;
}

.article-main {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  grid-template-areas: 'reference reading';
  align-content: start;
  align-items: start;
  gap: 16px;
}

.entry-page {
  grid-area: reading;
  display: grid;
  gap: 28px;
  min-width: 0;
  width: 100%;
  max-width: 624px;
  margin-left: auto;
  margin-right: auto;
  padding: var(--entry-padding);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.article-heading .entry-meta {
  margin-bottom: 12px;
}

.reading {
  min-width: 0;
  max-width: 100%;
}

.reading p {
  margin: 0 0 1em;
}

.reading h2, .reading h3 {
  margin: 1.35em 0 0.55em;
  line-height: 1.25;
}

.reading h2 {
  font-size: 28px;
}

.reading h3 {
  font-size: 22px;
}

.reading strong, .reading b {
  color: var(--ink);
  font-weight: 700;
}

.reading :is(ul, ol) {
  margin: 0 0 1em;
  padding-inline-start: 1.5em;
}

.reading ul {
  list-style-type: square;
}

.reading li + li {
  margin-top: 0.3em;
}

.reading li > :is(ul, ol) {
  margin-top: 0.35em;
  margin-bottom: 0;
}

.reading li::marker {
  color: var(--pink);
}

.reading blockquote {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-inline-start: 2px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: #1a2d40;
  color: var(--ink);
}

.reading blockquote > :last-child {
  margin-bottom: 0;
}

.reading cite {
  color: var(--text);
  font-size: 0.94em;
  font-style: italic;
}

.reading table {
  width: 100%;
  margin-block: 0.4em 1em;
  border-collapse: collapse;
  text-align: left;
}

.reading th, .reading td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.reading th, .reading caption {
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.reading caption {
  padding-bottom: 8px;
}

.reading > :first-child {
  margin-top: 0;
}

.reading > :last-child {
  margin-bottom: 0;
}

.entry-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 18px;
  border-top: 3px double var(--line);
}

.entry-links a {
  font-weight: 700;
}

.reference {
  grid-area: reference;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--band);
}

.reference h2 {
  font-size: 22px;
}

.reference p {
  margin: 14px 0;
}

.bottom-band {
  border-top: 3px double var(--line);
}

.bottom-band > .band-content {
  padding-block: 22px;
}

.bottom-band p {
  margin: 0;
  font-size: 16px;
}

[data-enter] {
  min-width: 0;
  margin-inline-end: 14px;
}

.entering {
  animation: enter-items 150ms ease-out 100ms backwards;
}

.entering:focus-within {
  animation: none;
}

@keyframes enter-items {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

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

@media (max-width: 900px) {
  .article-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'reading'
      'reference';
    gap: var(--section-gap);
  }

  .reference {
    width: 100%;
    max-width: 624px;
    margin-inline: auto;
  }
}

@media (max-width: 822px) {
  :root {
    --section-gap: 44px;
    --entry-padding: 24px;
  }

  body {
    font-size: 18px;
  }

  .top-band > .band-content {
    min-height: 70px;
    grid-template-areas:
      'jump jump'
      'identity trigger';
    column-gap: 10px;
    row-gap: 4px;
    padding-block: 8px;
  }

  .site-name {
    font-size: 18px;
  }

  .top-band #site-nav {
    grid-area: 3 / 1 / 4 / -1;
    justify-self: stretch;
  }

  .top-band .nav-row {
    justify-content: flex-start;
  }

  .top-band .nav-panel {
    position: static;
    width: min(228px, 100%);
    margin-top: 8px;
  }

  .welcome {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .welcome h1, .entry-page h1 {
    font-size: clamp(28px, 6vw, 40px);
  }

  .welcome-art {
    max-width: 258px;
  }

  .materials h2 {
    font-size: 26px;
  }

  .entry, .entry:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'preview'
      'copy';
    gap: 16px;
  }

  .entry-preview {
    justify-self: center;
    width: 100%;
    max-width: var(--stack-width);
  }

  .entry-preview img {
    width: 100%;
    height: auto;
  }

  .entry-page {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .main-frame, .band-content {
    width: calc(100% - 28px);
  }

  .entry {
    --stack-width: 94%;
  }

  .entry:nth-child(even) {
    --stack-width: 100%;
  }

  .entry:nth-child(3) {
    --stack-width: 88%;
  }
}

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

  .entering {
    animation: none;
  }

  .entry {
    transition: none;
  }
}

/* Site-specific article imagery and category navigation, retaining original design system. */
.welcome-lead {margin-top: 20px !important; max-width: 38ch; color: var(--text) !important; font-size: 18px !important; line-height: 1.5; font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important;}
.welcome-art {border-radius: 14px; aspect-ratio:3/2; object-fit:cover; border:1px solid var(--line);}
.category-links {padding: 12px 0;}
.category-links h2 {font-size:28px; margin:0 0 20px;}
.category-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.category-tile {display:flex;flex-direction:column;gap:9px;padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:14px;color:var(--link);text-decoration:none;}
.category-tile span {font-size:15px;line-height:1.5;color:var(--text);}
.category-tile:hover {border-color:var(--link);}
.entry-preview img {width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;}
.entry-preview a {display:block;width:100%;}
.entry-title a {color:var(--ink);text-decoration:none;}
.entry-title a:hover {color:var(--link);}
.entry-meta {letter-spacing:0;}
.entry-author {font-weight:700;}
.meta-dot {color:var(--text);}
.breadcrumbs {display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:14px;line-height:1.45;margin-bottom:24px;color:var(--text);}
.breadcrumbs a {color:var(--link);}
.article-heading .entry-meta {margin:16px 0 0;}
.article-cover {display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:12px;border:1px solid var(--line);margin-bottom:28px;}
.entry-page {max-width:760px;}
.category-summary {margin:18px 0 0;font-size:18px;color:var(--text);}
.category-entries {display:grid;gap:20px;padding:0 !important;margin:0 !important;list-style:none !important;}
.category-entries .entry {grid-template-columns:144px minmax(0,1fr);grid-template-areas:'preview copy';}
.category-entries .entry-copy {justify-items:start;text-align:left;}
.category-entries li::marker {content:'';}
.entry-links a {max-width:100%;overflow-wrap:anywhere;}
@media(max-width:940px){.category-grid {grid-template-columns:1fr;}}
@media(max-width:822px){.category-entries .entry {grid-template-columns:1fr;grid-template-areas:'preview' 'copy';}.entry-page {max-width:624px;}}
@media(max-width:480px){.breadcrumbs {font-size:13px;}.article-heading h1 {overflow-wrap:anywhere;}}

/* Homepage introduction without the removed generic heading. */
.welcome > div {min-width:0;}
.welcome .welcome-lead {
  max-width:29ch;
  margin:0 !important;
  color:var(--ink) !important;
  font-size:clamp(24px,2.5vw,36px) !important;
  line-height:1.35;
  font-weight:700 !important;
  overflow-wrap:break-word;
}
@media (max-width:822px) {
  .welcome .welcome-lead {max-width:none;}
  .welcome .welcome-art {justify-self:center;max-width:400px;}
}
