:root {
  --ink: #13213c;
  --muted: #53627a;
  --paper: #fffdf8;
  --surface: #ffffff;
  --line: #d7deeb;
  --blue: #0b3b8f;
  --blue-deep: #082862;
  --blue-soft: #e8f0ff;
  --gold: #e4ab36;
  --good: #176b46;
  --radius: 14px;
  --shadow: 0 16px 45px rgba(14, 35, 75, 0.09);
  --shell: min(1120px, calc(100vw - 2rem));
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(228, 171, 54, 0.12), transparent 28rem),
    linear-gradient(180deg, #f5f8ff 0, var(--paper) 25rem);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}
a { color: #0b4ba6; text-underline-offset: 0.16em; }
a:hover { color: #082d68; }
a:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  inset-inline-start: 1rem;
  top: -5rem;
  z-index: 2000;
  padding: 0.7rem 1rem;
  color: #071b42;
  background: #fff;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: #fff;
  background: linear-gradient(110deg, var(--blue-deep), var(--blue));
  box-shadow: 0 8px 28px rgba(4, 23, 63, 0.22);
}
.header-row {
  width: var(--shell);
  min-height: 3.5rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand, .main-site {
  color: #fff;
  text-decoration: none;
}
.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-mark { color: #ffd579; }
.main-site { font-size: 0.84rem; opacity: 0.88; }
.locale-switcher {
  direction: ltr;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  background: rgba(2, 22, 63, 0.35);
  border-top: 1px solid rgba(255,255,255,0.16);
}
.locale-track {
  width: max-content;
  min-width: 100%;
  min-height: 3rem;
  padding: 0.42rem max(1rem, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}
.flag-link {
  width: 2.18rem;
  height: 2.18rem;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  line-height: 1;
}
.flag-link:hover { background: rgba(255,255,255,0.14); }
.flag-link[aria-current="page"] {
  color: #071b42;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(228,171,54,0.72);
}
.shell { width: var(--shell); margin: 0 auto; }
main { min-height: 62vh; padding: clamp(2rem, 5vw, 5.4rem) 0 4rem; }
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3.3rem);
  border: 1px solid rgba(11,59,143,0.18);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  width: 14rem;
  height: 14rem;
  inset-inline-end: -6rem;
  top: -7rem;
  border: 2rem solid rgba(11,59,143,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  line-height: 1.15;
  text-wrap: balance;
}
h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 4.5rem); letter-spacing: -0.035em; }
h2 { margin: 0 0 0.9rem; font-size: clamp(1.45rem, 3vw, 2.15rem); }
h3 { margin: 0; font-size: 1.16rem; }
.lead { max-width: 52rem; margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }
.fallback-note {
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border-inline-start: 4px solid var(--gold);
  color: #4b432c;
  background: #fff8e7;
}
.stats {
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}
.stat {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.stat strong { display: block; font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: 0.83rem; }
.catalog-tools { margin: 2rem 0 1rem; }
.search {
  width: min(100%, 38rem);
  padding: 0.85rem 1rem;
  border: 1px solid #aebbd1;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.module-card {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.91);
  box-shadow: 0 8px 22px rgba(14,35,75,0.05);
}
.module-card[hidden] { display: none; }
.module-card a { color: var(--ink); text-decoration-thickness: 0.08em; }
.module-card p { margin: 0.7rem 0 0; color: var(--muted); }
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}
.module-id, .badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.module-id { color: #fff; background: var(--blue); }
.badge { color: #174b34; background: #e6f4ec; border: 1px solid #b8dfc9; }
.back { display: inline-flex; margin-bottom: 1rem; font-weight: 700; }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
.detail-content, .evidence-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 24px rgba(14,35,75,0.05);
}
.detail-content { padding: clamp(1.2rem, 3vw, 2.2rem); }
.detail-section + .detail-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.evidence-panel { position: sticky; top: 8rem; padding: 1rem; }
.evidence-list { margin: 0; display: grid; gap: 0.85rem; }
.evidence-list div { min-width: 0; }
.evidence-list dt { color: var(--muted); font-size: 0.76rem; font-weight: 800; text-transform: uppercase; }
.evidence-list dd { margin: 0.18rem 0 0; overflow-wrap: anywhere; }
code {
  padding: 0.12rem 0.34rem;
  border: 1px solid #d9deea;
  border-radius: 5px;
  color: #27364e;
  background: #f2f4f8;
  overflow-wrap: anywhere;
}
.link-list { padding-inline-start: 1.2rem; }
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,0.74);
}
.footer-inner {
  width: var(--shell);
  margin: 0 auto;
  padding: 1.7rem 0 2.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.footer-inner p { margin: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
[dir="rtl"] .hero::after { inset-inline-end: auto; inset-inline-start: -6rem; }
@media (max-width: 760px) {
  :root { --shell: min(100% - 1.1rem, 1120px); }
  .header-row { min-height: 3.2rem; }
  .main-site { display: none; }
  .locale-track { justify-content: flex-start; padding-inline: 0.6rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid, .detail-layout { grid-template-columns: 1fr; }
  .evidence-panel { position: static; }
  main { padding-top: 1.3rem; }
  .footer-inner { padding-inline: 0.2rem; }
}
@media (max-width: 380px) {
  .hero { padding: 1.15rem; }
  .stats { grid-template-columns: 1fr; }
  .card-top { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
