:root {
  --ink: #20243a;
  --ink-soft: #545a70;
  --petrol-950: #000033;
  --petrol-900: #00004d;
  --petrol-800: #000066;
  --petrol-700: #1b2f86;
  --petrol-100: #dce2f3;
  --orange: #e8c547;
  --orange-dark: #947813;
  --orange-soft: #fff8d6;
  --olive: #6f7895;
  --paper: #ffffff;
  --sand: #eceef4;
  --line: #c0c0c0;
  --white: #ffffff;
  --shadow: 0 8px 20px rgba(0, 0, 51, 0.1);
  --radius: 3px;
  --content: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--petrol-950);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(0, 0, 102, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 102, 0.025) 1px, transparent 1px),
    var(--sand);
  background-size: 24px 24px;
  font-family: "Aptos", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--petrol-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--orange-dark); }

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

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  color: var(--white);
  background: var(--petrol-950);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.archive-strip {
  padding: 0.46rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: #f7e4d5;
  background: var(--petrol-950);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.masthead { background: var(--paper); }

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2rem), var(--content));
  min-height: 92px;
  margin: 0 auto;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--petrol-950);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 54px;
  height: 46px;
  border: 3px solid var(--petrol-800);
  border-radius: 2px;
  background: var(--orange-soft);
}

.brand-mark::before {
  position: absolute;
  top: -10px;
  left: 14px;
  width: 20px;
  height: 10px;
  border: 3px solid var(--petrol-800);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  content: "";
}

.brand-mark::after {
  position: absolute;
  top: 18px;
  left: -3px;
  width: 54px;
  border-top: 3px solid var(--petrol-800);
  content: "";
}

.brand-name {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-tag {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead-note {
  max-width: 330px;
  margin: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--petrol-800);
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}

.primary-nav {
  border-top: 1px solid var(--line);
  border-bottom: 4px solid #c0c0c0;
  background: var(--petrol-800);
}

.primary-nav ul {
  display: flex;
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.primary-nav li { border-right: 1px solid rgba(255, 255, 255, 0.14); }
.primary-nav li:first-child { border-left: 1px solid rgba(255, 255, 255, 0.14); }

.primary-nav a {
  display: block;
  padding: 0.78rem 1.1rem;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(8, 37, 45, 0.58);
}

.page-wrap {
  display: grid;
  grid-template-areas: "side main";
  grid-template-columns: 220px minmax(0, 1fr);
  width: min(calc(100% - 2rem), var(--content));
  margin: 2rem auto 3.5rem;
  gap: 1.5rem;
  align-items: start;
}

.content-card {
  grid-area: main;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--petrol-800);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.title-band {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(115deg, #ffffff 0 70%, #e7eaf4 70% 100%);
}

.title-band::after {
  position: absolute;
  right: 1.4rem;
  bottom: -8px;
  width: 72px;
  height: 16px;
  background: repeating-linear-gradient(90deg, var(--petrol-800) 0 12px, transparent 12px 18px);
  content: "";
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--petrol-700);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  color: var(--petrol-950);
  line-height: 1.16;
  text-wrap: balance;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -0.045em;
}

h2 {
  margin: 2.4rem 0 0.8rem;
  padding-bottom: 0.48rem;
  border-bottom: 2px solid var(--petrol-100);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.025em;
}

h2::before {
  display: inline-block;
  width: 8px;
  height: 0.92em;
  margin-right: 0.55rem;
  background: var(--petrol-800);
  content: "";
}

h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.18rem;
}

p { margin: 0 0 1.15rem; }

.article-body {
  padding: clamp(1.45rem, 4vw, 2.7rem);
}

.article-body > p:first-child {
  color: #28464f;
  font-size: 1.08rem;
}

.article-body ul,
.article-body ol {
  margin: 1.2rem 0 1.6rem;
  padding: 1.1rem 1.2rem 1.1rem 2.6rem;
  border-left: 5px solid var(--petrol-700);
  background: #f2f4fa;
}

.article-body li { margin: 0.4rem 0; padding-left: 0.2rem; }

.article-body a[href^="https://"]::after {
  content: " ↗";
  font-size: 0.78em;
  text-decoration: none;
}

.editorial-image {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #dce2f3;
}

.editorial-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.editorial-image figcaption {
  padding: 0.65rem 1rem;
  color: var(--ink-soft);
  background: #f0f1f6;
  font-size: 0.78rem;
  line-height: 1.4;
}

.article-body .editorial-image {
  margin: 1.35rem 0 1.8rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.sidebar {
  grid-area: side;
  display: grid;
  gap: 1rem;
}

.side-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 5px 14px rgba(0, 0, 51, 0.08);
}

.side-panel h2 {
  margin: 0;
  padding: 0.8rem 1rem;
  border: 0;
  color: var(--white);
  background: var(--petrol-800);
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-panel h2::before { display: none; }

.side-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-panel li + li { border-top: 1px dotted var(--line); }

.side-panel a {
  display: block;
  padding: 0.72rem 1rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.side-panel a::before {
  margin-right: 0.55rem;
  color: var(--petrol-800);
  content: "›";
}

.side-panel a:hover,
.side-panel a[aria-current="page"] { background: var(--orange-soft); }

.archive-table {
  width: 100%;
  margin: 1.2rem 0 1.7rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.archive-table th,
.archive-table td {
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.archive-table th {
  color: var(--white);
  background: var(--petrol-800);
}

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

.utility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.2rem 0 1.6rem;
  gap: 0.8rem;
}

.utility-grid section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--petrol-800);
  background: #f8f9fc;
}

.utility-grid h3 { margin-top: 0; }

.archive-note { padding: 1rem; }

.archive-note p {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.55;
}

.archive-note p:last-child { margin-bottom: 0; }

.print-guide {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-bottom: 3px solid var(--orange-dark);
  border-radius: 4px;
  color: var(--white);
  background: var(--orange);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.print-guide:hover { background: var(--orange-dark); }

.site-footer {
  color: #dbe7e8;
  background: var(--petrol-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 2.4rem 0;
  gap: 2rem;
}

.site-footer h2 {
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0;
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer h2::before { display: none; }

.site-footer p,
.site-footer li,
.site-footer a {
  color: #dbe7e8;
  font-size: 0.84rem;
  line-height: 1.55;
}

.site-footer p { margin: 0; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0.28rem 0; }

.copyright {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #afc5c9;
  font-size: 0.78rem;
  text-align: center;
}

.not-found {
  min-height: 52vh;
  text-align: center;
}

.not-found .title-band { padding-block: 4rem; }
.not-found .article-body { max-width: 680px; margin: 0 auto; }

.home-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.5rem 0;
  padding: 0;
  gap: 0.7rem;
  list-style: none;
}

.home-index a {
  display: block;
  min-height: 100%;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--orange);
  border-radius: 4px;
  background: #f8f5ed;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

@media (max-width: 900px) {
  .page-wrap { grid-template-areas: "main" "side"; grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-panel:first-child { grid-row: span 2; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .masthead-inner { min-height: 88px; }
  .masthead-note { display: none; }
  .brand-mark { width: 44px; height: 38px; }
  .brand-mark::after { top: 15px; width: 44px; }
  .brand-mark::before { left: 10px; }
  .primary-nav { overflow-x: auto; }
  .primary-nav ul { width: max-content; min-width: 100%; }
  .primary-nav a { padding: 0.72rem 0.82rem; font-size: 0.82rem; }
  .page-wrap { width: min(calc(100% - 1rem), var(--content)); margin-top: 1rem; }
  .title-band { background: var(--paper); }
  .sidebar { grid-template-columns: 1fr; }
  .side-panel:first-child { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .home-index { grid-template-columns: 1fr; }
  .utility-grid { grid-template-columns: 1fr; }
  .archive-table { display: block; overflow-x: auto; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .archive-strip, .masthead-note, .primary-nav, .sidebar, .site-footer, .skip-link { display: none; }
  .masthead-inner { min-height: auto; padding: 1rem 0; }
  .page-wrap { display: block; width: 100%; margin: 0; }
  .content-card { border: 0; box-shadow: none; }
  a { color: #000; }
}

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