:root {
  color-scheme: light;
  --blue: #0038b8;
  --blue-dark: #00266f;
  --blue-light: #dce8ff;
  --paper: #f8faff;
  --white: #fff;
  --gold: #d4af37;
  --gold-light: #f5d76e;
  --gold-dark: #76540c;
  --ink: #101a35;
  --muted: #46516d;
  --line: #7b96d5;
  --shadow: 4px 4px 0 rgba(0, 38, 111, 0.2);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 100%;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: #b9cdf8;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
  background-color: #dce8ff;
  background-image:
    linear-gradient(45deg, rgba(0, 56, 184, 0.07) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 56, 184, 0.07) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(212, 175, 55, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(212, 175, 55, 0.08) 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}

a {
  color: #002f99;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: #001d60;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #ffcf24;
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  z-index: 99;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--blue-dark);
  border: 2px solid var(--gold-light);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(100% - 1rem, 66rem);
  margin: 0.5rem auto;
  overflow: hidden;
  background: var(--paper);
  border: 3px ridge #91a9dc;
  box-shadow: 0 0 0 2px var(--blue-dark), 8px 8px 0 rgba(0, 38, 111, 0.2);
}

.ticker {
  position: relative;
  overflow: hidden;
  padding: 0.35rem 0;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  background: var(--blue-dark);
  border-bottom: 2px solid var(--gold);
}

.ticker span {
  display: inline-block;
  padding-inline: 1rem;
  white-space: nowrap;
  animation: ticker-glide 14s ease-in-out infinite alternate;
}

@keyframes ticker-glide {
  from { transform: translateX(-1.5rem); }
  to { transform: translateX(1.5rem); }
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 5rem;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem 1rem;
  text-align: center;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.92), transparent),
    repeating-linear-gradient(0deg, #fff 0 4px, #edf3ff 4px 8px);
  border-bottom: 4px double var(--gold-dark);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.85) 47%, transparent 59%);
  transform: translateX(-120%);
  animation: header-shine 7s ease-in-out infinite;
}

@keyframes header-shine {
  0%, 55% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}

.header-star {
  width: 4.25rem;
  height: 4.25rem;
  margin: auto;
  filter: drop-shadow(2px 2px 0 rgba(0, 38, 111, 0.18));
}

.header-star.mirror {
  transform: scaleX(-1);
}

.brand {
  min-width: 0;
}

.brand-name {
  margin: 0;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 var(--gold), 3px 3px 0 #7c5c13;
  overflow-wrap: anywhere;
}

.brand-tagline {
  margin: 0.55rem 0 0;
  color: var(--blue);
  font-weight: 700;
}

.gold-rule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(100%, 31rem);
  margin: 0.7rem auto 0;
  color: var(--gold-dark);
  font-size: 0.75rem;
}

.gold-rule::before,
.gold-rule::after {
  content: "";
  flex: 1;
  height: 0.35rem;
  background: linear-gradient(#fff4a8, var(--gold), #76540c);
  border: 1px solid #76540c;
}

.site-nav {
  padding: 0.45rem;
  background: #a9c1f4;
  border-bottom: 2px solid var(--blue-dark);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.old-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(#1e65dd 0 48%, #0038b8 48% 52%, #002b8f 52%);
  border: 2px outset #dce8ff;
  box-shadow: 1px 1px 0 #001b50;
}

.site-nav a:hover,
.old-button:hover {
  color: #fff;
  background: linear-gradient(#3378eb, #0038b8);
}

.site-nav a[aria-current="page"] {
  color: #10214a;
  background: linear-gradient(#fff9cf, #e9c653 48%, #b28719 52%, #f1d970);
  border-style: inset;
}

.old-button.secondary {
  color: #0f2455;
  background: linear-gradient(#fff, #dce8ff 49%, #a8c3f7 51%, #eef4ff);
  border-color: #fff #506cac #506cac #fff;
}

main {
  padding: 1rem;
}

.breadcrumbs {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.breadcrumbs span {
  color: var(--blue-dark);
  font-weight: 700;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: 1rem;
  align-items: start;
}

.content-stack,
.side-stack {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.old-panel {
  min-width: 0;
  background: #fff;
  border: 2px solid var(--blue-dark);
  box-shadow: var(--shadow);
}

.panel-title,
.gold-title-bar {
  margin: 0;
  padding: 0.45rem 0.75rem;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.35;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue), #174fca, var(--blue-dark));
  border-bottom: 2px solid var(--gold);
  text-shadow: 1px 1px 0 #001641;
}

.gold-title-bar {
  color: #251b00;
  background: linear-gradient(90deg, #9b7418, #f5d76e 38%, #fff0a1 50%, #d4af37 64%, #9b7418);
  border-bottom-color: #76540c;
  text-shadow: 1px 1px 0 #fff4b5;
}

.panel-body {
  padding: 1rem;
}

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

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

.intro-panel .panel-body {
  background: linear-gradient(135deg, #fff 0 65%, #e9f0ff);
}

.intro-copy {
  font-size: 1.05rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.announcement {
  position: relative;
  padding: 1rem 1rem 1rem 4.6rem;
  color: #152249;
  background: #fff8c9;
  border: 3px double #9b7418;
  box-shadow: var(--shadow);
}

.announcement .announcement-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 2.8rem;
  height: 2.8rem;
  transform: translateY(-50%);
}

.announcement strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #684c00;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.news-list,
.access-steps,
.plain-list {
  margin: 0;
  padding-left: 1.4rem;
}

.news-list li,
.access-steps li,
.plain-list li {
  margin: 0.45rem 0;
}

.news-list li::marker {
  color: var(--gold-dark);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0.25rem 0.5rem;
  color: #fff;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  background: #00266f;
  border: 2px outset #a9c1f4;
}

.badge.gold {
  color: #211800;
  background: linear-gradient(#fff3a2, #d4af37);
  border-color: #fff0a0 #76540c #76540c #fff0a0;
}

.new-label {
  display: inline-block;
  margin-left: 0.35rem;
  color: #b40000;
  font-size: 0.75rem;
  font-weight: 900;
  text-shadow: 1px 1px #fff;
  animation: soft-blink 1.4s steps(2, end) infinite;
}

@keyframes soft-blink {
  50% { opacity: 0.35; }
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

.info-table th {
  width: 42%;
  color: #fff;
  background: var(--blue-dark);
}

.info-table tr:nth-child(even) td {
  background: #edf3ff;
}

.counter-box {
  padding: 0.7rem;
  text-align: center;
  background: #07122e;
  border: 3px ridge #8ba5db;
}

.counter-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #dce8ff;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.counter-digits {
  display: inline-flex;
  gap: 0.12rem;
  color: #ffdc5c;
  font: 700 1.1rem/1 "Courier New", monospace;
}

.counter-digits span {
  padding: 0.15rem 0.25rem;
  background: #101010;
  border: 1px inset #777;
}

.pixel-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.15rem 0;
  color: var(--gold-dark);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
}

.pixel-separator::before,
.pixel-separator::after {
  content: "";
  flex: 1;
  max-width: 9rem;
  height: 0.45rem;
  background: repeating-linear-gradient(90deg, var(--blue) 0 6px, #fff 6px 9px, var(--gold) 9px 15px, #fff 15px 18px);
  border: 1px solid var(--blue-dark);
}

.notice {
  padding: 0.8rem;
  color: #1d2c57;
  background: #edf3ff;
  border: 1px solid #6c8bd0;
  border-left: 0.45rem solid var(--gold);
}

.notice strong {
  color: var(--blue-dark);
}

.faq-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.faq-item {
  padding: 0.8rem;
  background: #f8faff;
  border: 1px solid #88a3dc;
  box-shadow: inset 3px 0 var(--gold);
}

.faq-item dt {
  color: var(--blue-dark);
  font-weight: 700;
}

.faq-item dd {
  margin: 0.25rem 0 0;
}

.page-title {
  margin: 0 0 0.4rem;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.15;
}

.page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.page-heading-box {
  margin-bottom: 1rem;
  padding: 1rem;
  background: linear-gradient(90deg, #fff, #e8f0ff);
  border: 2px solid var(--blue-dark);
  border-top: 0.45rem solid var(--gold);
  box-shadow: var(--shadow);
}

.archive-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.archive-card .file-icon {
  display: grid;
  width: 3rem;
  height: 3.5rem;
  place-items: center;
  color: #fff;
  font: 700 0.7rem/1 "Courier New", monospace;
  background: var(--blue);
  border: 2px outset #a9c1f4;
}

.archive-card h2 {
  margin: 0 0 0.25rem;
  color: var(--blue-dark);
  font-size: 1.2rem;
}

.archive-card p {
  margin: 0;
}

.error-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.error-box {
  width: min(100%, 43rem);
  padding: 0.75rem;
  text-align: center;
  background: #fff;
  border: 5px ridge var(--gold);
  box-shadow: 0 0 0 4px var(--blue-dark), 9px 9px 0 rgba(0,38,111,0.24);
}

.error-inner {
  padding: clamp(1rem, 5vw, 2.2rem);
  background: repeating-linear-gradient(135deg, #f8faff 0 9px, #eaf1ff 9px 18px);
  border: 2px dashed var(--blue);
}

.error-code {
  margin: 0;
  color: var(--blue-dark);
  font: 900 clamp(3.8rem, 18vw, 8rem)/0.9 Georgia, "Times New Roman", serif;
  text-shadow: 3px 3px 0 var(--gold);
}

.error-star {
  width: 5rem;
  margin: 1rem auto;
}

.site-footer {
  padding: 1rem;
  color: #e8efff;
  text-align: center;
  background: var(--blue-dark);
  border-top: 4px double var(--gold);
}

.site-footer p {
  margin: 0.25rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
}

.site-footer a {
  color: #fff3a2;
}

.footer-note {
  font-size: 0.8125rem;
}

@media (max-width: 48rem) {
  .site-shell {
    width: min(100% - 0.5rem, 66rem);
    margin-block: 0.25rem;
    box-shadow: 3px 3px 0 rgba(0, 38, 111, 0.18);
  }

  .site-header {
    grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem;
    gap: 0.45rem;
    padding-inline: 0.6rem;
  }

  .header-star {
    width: 3rem;
    height: 3rem;
  }

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

  .side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 35rem) {
  body {
    line-height: 1.55;
  }

  .site-header {
    grid-template-columns: 2.4rem minmax(0, 1fr) 2.4rem;
    gap: 0.2rem;
  }

  .header-star {
    width: 2.2rem;
    height: 2.2rem;
  }

  .brand-name {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
    text-shadow: 1px 1px 0 #fff, 2px 2px 0 var(--gold);
  }

  .brand-tagline {
    font-size: 0.9rem;
  }

  .site-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav li:last-child {
    grid-column: 1 / -1;
  }

  .site-nav a {
    width: 100%;
    padding-inline: 0.4rem;
  }

  main {
    padding: 0.7rem;
  }

  .panel-body {
    padding: 0.8rem;
  }

  .side-stack {
    grid-template-columns: 1fr;
  }

  .button-row {
    display: grid;
  }

  .old-button {
    width: 100%;
  }

  .announcement {
    padding: 0.8rem;
    text-align: center;
  }

  .announcement .announcement-icon {
    position: static;
    width: 2.5rem;
    margin: 0 auto 0.35rem;
    transform: none;
  }

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

  .info-table,
  .info-table tbody,
  .info-table tr,
  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table th {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-shell,
  .old-panel,
  .announcement,
  .page-heading-box {
    box-shadow: none;
  }

  .site-nav,
  .ticker,
  .site-footer .footer-note {
    display: none;
  }
}
