:root {
  --ink: #202b3d;
  --muted: #667085;
  --navy: #243d8f;
  --navy-deep: #1d347b;
  --blue-soft: #aec6e8;
  --blue-pale: #edf3fb;
  --gold: #9b7a3d;
  --gold-light: #f7f1e4;
  --paper: #f4f6f9;
  --white: #fff;
  --line: #dfe5ee;
  --shadow: 0 14px 38px rgba(35, 61, 143, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
}

a { color: inherit; }

.site-header {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px clamp(20px, 5vw, 72px);
  color: var(--navy);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.identity {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.identity strong, .identity small { display: block; }
.identity strong { font-family: "Libre Baskerville", serif; font-size: 15px; }
.identity small { margin-top: 3px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

.official-logo {
  width: 104px;
  height: 80px;
  display: block;
  object-fit: contain;
  clip-path: inset(2px round 6px);
}

.main-site {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: clamp(32px, 7vw, 100px);
  padding: 30px clamp(20px, 7vw, 110px) 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at 87% 8%, rgba(174, 198, 232, .56), transparent 26%),
    linear-gradient(122deg, #ffffff 0%, #f5f8fc 60%, #e6effa 100%);
  border-bottom: 8px solid var(--blue-soft);
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -170px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(36, 61, 143, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(36,61,143,.025), 0 0 0 110px rgba(36,61,143,.018);
}

.hero-copy, .search-wrap { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

h1, h2, h3 { font-family: "Libre Baskerville", Georgia, serif; }
h1 { max-width: 700px; margin: 0; font-size: clamp(30px, 4vw, 43px); line-height: 1.08; letter-spacing: -.03em; }
.hero-copy > p:last-child { max-width: 600px; margin: 10px 0 0; color: var(--muted); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.5; }

.search-wrap label { display: block; margin-bottom: 10px; color: var(--navy); font-size: 13px; font-weight: 600; }
.search { display: flex; align-items: center; gap: 12px; padding: 0 18px; border: 1px solid #cdd9e8; border-radius: 8px; background: rgba(255,255,255,.88); box-shadow: 0 8px 24px rgba(36,61,143,.07); }
.search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(36,61,143,.1); }
.search span { color: var(--navy); font-size: 27px; transform: rotate(-20deg); }
.search input { width: 100%; height: 48px; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; }
.search input::placeholder { color: #8995a7; }

.library { max-width: none; margin: 0; padding: 52px max(clamp(20px, 5vw, 64px), calc((100vw - 1260px) / 2 + 64px)) 72px; background: #101b67; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.library-heading .eyebrow { color: var(--blue-soft); }
.library-heading h2 { margin: 0; color: var(--white); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.025em; }
#result-count { color: #cbd6ee; font-size: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 26px; }
.filter { padding: 10px 16px; border: 1px solid rgba(255,255,255,.32); border-radius: 99px; color: #e3e9f6; background: rgba(255,255,255,.08); font: 600 13px "DM Sans", sans-serif; cursor: pointer; }
.filter:hover, .filter:focus-visible { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.14); }
.filter.active { border-color: var(--white); color: var(--navy-deep); background: var(--white); }

.document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.document-card { display: grid; grid-template-columns: 58px 1fr; gap: 17px; min-height: 210px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.document-card[hidden] { display: none; }
.document-card:hover { transform: translateY(-3px); border-color: #d2c5ad; box-shadow: var(--shadow); }
.file-mark { width: 50px; height: 62px; display: grid; place-items: end center; padding-bottom: 9px; border-radius: 4px 11px 4px 4px; color: var(--white); background: var(--navy); box-shadow: inset 0 -4px 0 var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.document-content { display: flex; flex-direction: column; }
.category { margin: 0 0 6px; color: var(--navy); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.document-card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.35; }
.document-card h3 + p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 15px; }
.primary-action, .download { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; }
.primary-action { padding: 0 14px; color: var(--white); background: var(--navy); }
.primary-action:hover { background: var(--navy-deep); }
.download { width: 36px; border: 1px solid var(--line); color: var(--navy); background: var(--white); font-size: 17px; }
.download:hover { border-color: var(--gold); background: var(--gold-light); }
.empty-state { padding: 60px 20px; border: 1px dashed #cfc7b8; border-radius: 12px; text-align: center; background: var(--white); }
.empty-state strong { font-family: "Libre Baskerville", serif; font-size: 20px; }
.empty-state p { color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 26px clamp(20px, 7vw, 110px); color: var(--muted); background: var(--white); border-top: 6px solid var(--blue-soft); font-size: 12px; }
footer p { margin: 0; }

@media (max-width: 780px) {
  .main-site { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; align-items: start; padding-top: 28px; }
  .document-grid { grid-template-columns: 1fr; }
  .library-heading { align-items: start; flex-direction: column; gap: 6px; }
  #result-count { margin: 0; }
  footer { flex-direction: column; }
}

@media (max-width: 480px) {
  .identity strong { font-size: 13px; }
  .document-card { grid-template-columns: 48px 1fr; min-height: auto; padding: 18px; }
  .file-mark { width: 43px; height: 53px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
