:root {
  --bg: #edf4ff;
  --paper: #ffffff;
  --forest: #0c438c;
  --forest-deep: #072b5d;
  --gold: #5fa3ff;
  --ink: #132033;
  --muted: #516175;
  --line: #c8d8f0;
  --accent: #2d74d1;
  --shadow: 0 18px 40px rgba(7, 43, 93, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.archive-shell {
  margin: 0;
  font-family: "Source Sans 3", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(95, 163, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #dfeeff 0%, var(--bg) 36%, #f7fbff 100%);
}

.archive-shell a {
  color: var(--forest);
}

.archive-shell a:hover,
.archive-shell a:focus {
  color: var(--accent);
}

.topbar {
  background: linear-gradient(135deg, rgba(7, 43, 93, 0.98), rgba(12, 67, 140, 0.94));
  color: #fff;
  border-bottom: 4px solid var(--gold);
}

.topbar-inner,
.content,
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}

.brand-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px;
  box-shadow: 0 10px 24px rgba(3, 18, 43, 0.28);
  flex-shrink: 0;
}

.brand-kicker {
  display: block;
  font-family: "Bitter", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.nav span {
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
}

.nav span {
  background: rgba(95, 163, 255, 0.2);
  border-color: rgba(215, 232, 255, 0.42);
}

.nav-toggle {
  display: none;
}

.nav-toggle-button {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
}

.nav-toggle-icon {
  display: inline-grid;
  gap: 4px;
}

.nav-toggle-icon span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle-text {
  line-height: 1;
}

.hero {
  padding: 44px 0 24px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(233, 243, 255, 0.95));
  border: 1px solid rgba(12, 67, 140, 0.1);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
}

.hero-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.hero-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(12, 67, 140, 0.1), rgba(95, 163, 255, 0.2));
  border: 1px solid rgba(12, 67, 140, 0.12);
  box-shadow: 0 16px 32px rgba(7, 43, 93, 0.08);
}

.hero-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 67, 140, 0.08);
  color: var(--forest);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.archive-shell h1,
.archive-shell h2,
.archive-shell h3 {
  margin: 0 0 12px;
  font-family: "Bitter", Georgia, serif;
  line-height: 1.15;
  color: var(--forest-deep);
}

.archive-shell h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.archive-shell h2 {
  font-size: clamp(1.45rem, 2.1vw, 2rem);
}

.hero-copy p,
.legacy-card p,
.note-card p,
.legacy-content p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button-primary {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 10px 24px rgba(12, 67, 140, 0.24);
}

.button-secondary {
  background: #fff;
  color: var(--forest-deep);
  border: 1px solid rgba(12, 67, 140, 0.18);
}

.hero-media {
  position: relative;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(7, 43, 93, 0.08), rgba(7, 43, 93, 0.34)),
    var(--hero-image) center/cover no-repeat;
}

.hero-badge {
  position: absolute;
  right: 20px;
  bottom: 20px;
  background: rgba(7, 43, 93, 0.88);
  color: #fff;
  padding: 14px 16px;
  border-radius: 18px;
  max-width: 260px;
  box-shadow: 0 12px 30px rgba(7, 43, 93, 0.3);
}

.hero-badge strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.section {
  padding: 20px 0 24px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.legacy-card,
.note-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.legacy-content {
  margin-top: 18px;
  overflow-x: visible;
}

.legacy-content > div:first-child,
.legacy-content .RichTextElement > div {
  display: grid;
  gap: 12px;
}

.legacy-content,
.legacy-content div,
.legacy-content p,
.legacy-content span,
.legacy-content strong,
.legacy-content em,
.legacy-content a,
.legacy-content font {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legacy-content p,
.legacy-content span,
.legacy-content strong,
.legacy-content em,
.legacy-content a,
.legacy-content font {
  white-space: normal !important;
}

.legacy-content img,
.legacy-content table,
.legacy-content pre {
  max-width: 100%;
}

.legacy-content table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  background: #fff;
  border-collapse: collapse;
  table-layout: auto !important;
  font-size: 0.96rem;
}

.legacy-content tr,
.legacy-content col,
.legacy-content colgroup {
  width: auto !important;
}

.legacy-content td,
.legacy-content th {
  padding: 6px 8px;
  white-space: normal !important;
  width: auto !important;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legacy-content pre {
  white-space: pre-wrap;
  background: rgba(12, 67, 140, 0.04);
  border: 1px solid rgba(12, 67, 140, 0.08);
  border-radius: 16px;
  padding: 18px;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

.legacy-content span,
.legacy-content font {
  max-width: 100%;
}

.legacy-content .first.graphic-container,
.legacy-content .graphic-container {
  max-width: 100%;
}

.archive-divider {
  border: 0;
  border-top: 2px solid rgba(12, 67, 140, 0.45);
  margin: 12px 0;
}

.note-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.note-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 67, 140, 0.05);
  border: 1px solid rgba(12, 67, 140, 0.08);
}

.note-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--forest-deep);
}

.footer {
  padding: 34px 0 48px;
}

.footer-inner {
  color: var(--muted);
  font-size: 0.98rem;
  text-align: center;
}

@media (max-width: 920px) {
  .hero-card,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .content,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .hero-copy,
  .legacy-card,
  .note-card {
    padding: 20px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .hero-lockup {
    align-items: flex-start;
  }

  .hero-logo-wrap {
    width: 78px;
    height: 78px;
    border-radius: 20px;
  }

  .hero-logo {
    width: 62px;
    height: 62px;
  }

  .nav-toggle-button {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 8px;
  }

  .nav-toggle:checked ~ .nav {
    display: flex;
  }

  .nav a,
  .nav span,
  .button {
    width: 100%;
  }
}
