:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-muted: #f8f7f3;
  --line: #d9dce3;
  --text: #202733;
  --muted: #626b78;
  --brand: #334e8c;
  --brand-dark: #243866;
  --accent: #a76412;
  --primary-text: #ffffff;
  --shadow: 0 12px 28px rgba(32, 39, 51, 0.08);
  color: var(--text);
  background: var(--bg);
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151a24;
  --surface: #1e2532;
  --surface-muted: #252e3d;
  --line: #354051;
  --text: #f0f3f8;
  --muted: #abb5c5;
  --brand: #8eabe8;
  --brand-dark: #c3d1f4;
  --accent: #e3aa55;
  --primary-text: #151a24;
  --shadow: 0 14px 32px rgba(4, 8, 15, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #151a24;
    --surface: #1e2532;
    --surface-muted: #252e3d;
    --line: #354051;
    --text: #f0f3f8;
    --muted: #abb5c5;
    --brand: #8eabe8;
    --brand-dark: #c3d1f4;
    --accent: #e3aa55;
    --primary-text: #151a24;
    --shadow: 0 14px 32px rgba(4, 8, 15, 0.3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  background: var(--bg);
}

a { color: #17628f; }

.site-header {
  border-bottom: 1px solid rgba(35, 78, 112, 0.13);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.site-nav, main, footer {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.site-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #234e70;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary-text);
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(35, 78, 112, 0.2);
}

.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: #38566d; font-weight: 750; text-decoration: none; }
.nav-links .nav-primary { padding: 10px 15px; border-radius: 999px; color: #fff; background: #285f87; }

main { padding: 74px 0 44px; }
.hero { max-width: 820px; margin-bottom: 44px; }

.eyebrow, .section-label {
  margin: 0 0 10px;
  color: #e66f47;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2 { font-family: Georgia, "Times New Roman", serif; color: #17374f; }
h1 { max-width: 760px; margin: 0; font-size: clamp(2.7rem, 7vw, 5.5rem); line-height: 0.98; letter-spacing: -0.045em; }
h2 { margin: 0 0 14px; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.15; }

.hero-copy {
  max-width: 760px;
  margin: 24px 0 0;
  color: #4d6477;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid #b9cad7;
  border-radius: 999px;
  color: #234e70;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 800;
  text-decoration: none;
}

.button-primary { border-color: #285f87; color: #fff; background: #285f87; box-shadow: 0 10px 24px rgba(40, 95, 135, 0.2); }

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid #d6e0e8;
  border-radius: 22px;
  background: #d6e0e8;
}

.facts article { min-width: 0; padding: 20px; background: rgba(255, 255, 255, 0.94); }
.facts span { display: block; margin-bottom: 7px; color: #718596; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.facts strong { display: block; overflow-wrap: anywhere; color: #234e70; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.content-card {
  min-width: 0;
  padding: clamp(23px, 4vw, 34px);
  border: 1px solid #d8e2ea;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(35, 78, 112, 0.07);
}

.content-card-wide { grid-column: 1 / -1; }
.content-card p, .content-card li, blockquote { line-height: 1.65; }
.content-card p:last-child { margin-bottom: 0; }

.citation-block { padding: 18px 20px; border-left: 4px solid var(--accent); border-radius: 4px 14px 14px 4px; background: #f6f8fa; }
.citation-block p { margin: 0; }
.note { color: #607487; font-size: 0.93rem; }
.citation-block, .citation-block a, .note, .note a { overflow-wrap: anywhere; }

pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 20px;
  border-radius: 14px;
  color: #eaf4fb;
  background: #17374f;
  font: 0.88rem/1.65 "Cascadia Code", Consolas, monospace;
  white-space: pre;
}

blockquote { margin: 22px 0 0; padding: 18px 20px; border-left: 4px solid #78a4c3; color: #415c70; background: #f4f8fb; }
.text-link { display: inline-block; margin-top: 8px; font-weight: 850; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 44px;
  border-top: 1px solid #d6e0e8;
  color: #64798a;
  font-size: 0.9rem;
}

footer p { margin: 0; }
footer a { font-weight: 750; }
a:focus-visible { outline: 3px solid rgba(230, 111, 71, 0.45); outline-offset: 3px; }

@media (max-width: 760px) {
  main { padding-top: 48px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .content-card-wide { grid-column: auto; }
  footer { flex-direction: column; }
}

@media (max-width: 500px) {
  .site-nav, main, footer { width: min(100% - 22px, 1080px); }
  .site-nav { min-height: 66px; }
  .brand > span:last-child { display: none; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.9rem; }
  .nav-links .nav-primary { padding: 9px 13px; }
  .facts { grid-template-columns: 1fr; }
  .facts article { padding: 16px 18px; }
  .content-card { border-radius: 18px; }
  pre { margin-inline: -10px; padding: 16px; font-size: 0.77rem; }
}

/* Final European institutional component mapping. */
a { color: var(--brand); }
.site-header { border-color: var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.brand, .nav-links a, h1, h2, .facts strong { color: var(--brand-dark); }
.brand-mark { color: var(--primary-text); background: var(--accent); box-shadow: none; }
.nav-links .nav-primary, .button-primary { border-color: var(--brand); color: var(--primary-text); background: var(--brand); box-shadow: none; }
.eyebrow, .section-label { color: var(--accent); }
.hero-copy, .note, footer, blockquote { color: var(--muted); }
.button { border-color: var(--line); color: var(--brand-dark); background: var(--surface); }
.facts { border-color: var(--line); background: var(--line); }
.facts article, .content-card { background: var(--surface); }
.facts span { color: var(--muted); }
.content-card { border-color: var(--line); box-shadow: var(--shadow); }
.citation-block { border-left-color: var(--accent); background: var(--surface-muted); }
pre { color: var(--text); background: var(--surface-muted); border: 1px solid var(--line); }
blockquote { border-left-color: var(--brand); background: var(--surface-muted); }
footer { border-color: var(--line); }
a:focus-visible { outline-color: var(--accent); }
