
:root {
  --navy: #0b1f3a;
  --navy-mid: #14375f;
  --gold: #d4a017;
  --gold-bright: #fffa3c;
  --cream: #f7f3ea;
  --paper: #ffffff;
  --ink: #1b2430;
  --muted: #4a5564;
  --link: #1f6b3a;
  --link-hover: #0f4a26;
  --alert: #b00000;
  --line: #d7d0c2;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(11, 31, 58, 0.10);
  --max: 74rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212,160,23,0.12), transparent 28%),
    linear-gradient(180deg, #e9eef5 0%, var(--cream) 38%, #efe8da 100%);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.65;
}
a { color: var(--link); }
a:visited { color: #155a86; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
.wrap { width: min(100% - 2rem, var(--max)); margin: 0 auto; }
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
  border-bottom: 4px solid var(--gold);
  box-shadow: var(--shadow);
}
.site-header .wrap { padding: 1.35rem 0 1.1rem; }
.brand-row {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}
.brand-row img.hero-img {
  width: min(280px, 100%);
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: #fff;
}
.brand-row img.hero-flag { width: min(120px, 40%); border-radius: 8px; }
.brand {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 3.6vw, 2.25rem);
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  text-transform: uppercase;
  line-height: 1.25;
}
.tagline {
  margin: 0;
  color: #f3f6fb;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.85rem;
  margin-top: 1rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 0.92rem;
}
.nav a {
  color: #ffe27a;
  text-decoration: none;
  padding: 0.28rem 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
.layout {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.15rem 0 2.5rem;
}
.layout.single { grid-template-columns: 1fr; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 1.6rem);
}
.sidebar h2 {
  margin: 0 0 0.85rem;
  text-align: center;
  color: var(--navy);
  font-size: 1.2rem;
}
.side-links, .library-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}
.side-links li {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #ebe4d7;
}
.side-links li:last-child { border-bottom: 0; padding-bottom: 0; }
.flag-callout {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
}
.flag-callout img { width: 100px; height: auto; }
.content h1, .content h2, .content .page-title {
  margin: 0 0 0.8rem;
  color: var(--navy);
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  line-height: 1.25;
}
.content h2 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); margin-top: 1.4rem; }
.content h2:first-child, .content h1:first-child { margin-top: 0; }
.content p { margin: 0 0 1rem; }
.content li { margin: 0 0 0.55rem; }
.content hr { border: 0; border-top: 2px solid #2a62b7; margin: 1.15rem 0; }
.content blockquote, .quote-block {
  background: #f8fafc;
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  border-radius: 0 10px 10px 0;
}
.portrait {
  float: left;
  margin: 0 1rem 0.6rem 0;
  width: 110px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(11,31,58,0.12);
}
.reps-card { overflow: auto; margin: 0 0 1.25rem; }
.reps-card img { width: 110px; height: auto; }
.site-footer {
  background: var(--navy);
  color: #d7deea;
  border-top: 4px solid var(--gold);
  padding: 1.2rem 0 1.6rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 0.95rem;
}
.site-footer a { color: #ffe27a; }
.site-footer .wrap { text-align: center; }
.site-footer p { margin: 0.4rem 0; }
.library {
  margin-top: 0.85rem;
  text-align: left;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.25rem 1rem;
  font-size: 0.88rem;
}
.pin-row { margin-top: 0.7rem; text-align: center; }
.pin-row img { vertical-align: middle; }
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.4rem 0.7rem; z-index: 10; }

.content { overflow-wrap: break-word; word-wrap: break-word; }
.content table { width: 100% !important; max-width: 100%; border-collapse: collapse; }
.content td, .content th { width: auto !important; }
.content, .content p, .content font, .content li, .content td {
  overflow-wrap: anywhere;
  word-wrap: break-word;
  max-width: 100%;
}
.content font[size="5"] { font-size: 1.12rem; }
.content font[size="6"] { font-size: 1.28rem; }
.content font[size="7"] { font-size: clamp(1.45rem, 4.5vw, 2rem); }
.card { overflow: visible; }

.content font { line-height: 1.5; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .main { order: 1; }
  .portrait { float: none; display: block; margin: 0 auto 0.75rem; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 1.2rem, var(--max)); }
  .card { padding: 1rem; }
  .nav { justify-content: flex-start; }
}

/* SEO: retagged headings keep their original typography. */
.content h1.legacy-heading,
.content h2.legacy-heading {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: inherit;
  letter-spacing: inherit;
  text-transform: none;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
