:root {
  --navy: #0b3d55;
  --navy-dark: #082f43;
  --lime: #c9ef45;
  --lime-soft: #eafaad;
  --lime-deep: #b9df36;
  --ink: #18313d;
  --muted: #61727b;
  --label: #47707f;
  --bg: #f5f8f7;
  --line: #dbe4e5;
  --chip: #eaf0f1;
  --red: #dc2626;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 80rem; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .75rem; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: .75rem 1rem; }
.topbar-inner { max-width: 80rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand strong { display: block; color: var(--navy); }
.brand span:not(.logo) { font-size: .75rem; color: var(--muted); }
.logo { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--navy); color: var(--lime); font-weight: 900; }
.toplinks { display: grid; gap: .375rem; font-size: .75rem; font-weight: 700; }
.toplinks a { padding: .5rem .75rem; border-radius: .5rem; text-align: center; text-decoration: none; }
.lime { background: var(--lime); color: var(--navy-dark); }
.navy { background: var(--navy); color: #fff; }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 2.5rem 1rem; }
.eyebrow { margin: 0 0 .5rem; font-size: .75rem; font-weight: 900; letter-spacing: .14em; color: var(--lime); }
.hero h1 { margin: 0; font-size: 2.25rem; font-weight: 900; letter-spacing: -.04em; }
.sub { margin: .75rem 0 0; max-width: 42rem; color: rgba(255,255,255,.75); }
.searchbox { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; max-width: 56rem; margin-top: 1.75rem; padding: 0 1rem; background: #fff; color: var(--ink); border-radius: 1rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,.2); }
.searchbox svg { color: var(--navy); flex: none; }
.searchbox input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; }
.searchbox.flat { margin: 0; flex: 1; max-width: none; box-shadow: 0 1px 2px rgba(0,0,0,.08); border-radius: .75rem; }
.tabs { display: flex; width: 100%; max-width: 36rem; margin-top: 1.25rem; padding: .375rem; background: var(--navy-dark); border-radius: 1rem; }
.tab { flex: 1; min-height: 3rem; padding: 0 1rem; border: 0; border-radius: .75rem; background: transparent; color: #fff; font: inherit; font-size: .875rem; font-weight: 900; cursor: pointer; }
.tab:hover { background: rgba(255,255,255,.1); }
.tab.active { background: var(--lime); color: var(--navy-dark); box-shadow: 0 10px 15px -3px rgba(0,0,0,.2); }

/* Content */
.content { flex: 1; width: 100%; padding: 2rem 1rem; }
.heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.label { margin: 0; font-size: .75rem; font-weight: 900; letter-spacing: .1em; color: var(--label); }
h2 { margin: 0; font-size: 1.875rem; font-weight: 900; color: var(--navy); letter-spacing: -.02em; }
.count { font-size: .875rem; font-weight: 700; color: var(--muted); }

.grid { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .hero h1 { font-size: 3.75rem; } .hero { padding: 3.5rem 2.5rem; } .content, .topbar { padding-left: 2.5rem; padding-right: 2.5rem; } }

.rcard { text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.rcard:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); }
.rcard.urgent { border-color: #fca5a5; }
.ico { display: inline-flex; flex: none; }
.rcard .icon { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .75rem; background: var(--chip); color: var(--navy); }
.rcard.urgent .icon { background: #fee2e2; color: var(--red); }
.pdf-name { display: inline-flex; align-items: center; gap: .75rem; }
.download-title, .pdf-link { display: flex; align-items: center; gap: .5rem; }
.pdf-link { display: inline-flex; }
.rcard h3 { margin: 1.75rem 0 0; font-weight: 900; color: var(--navy); }
.rcard.urgent h3 { color: var(--red); }
.rcard p { margin: .25rem 0 0; font-size: .875rem; color: var(--muted); }

.empty { margin-top: 1.25rem; padding: 3rem; text-align: center; border: 1px dashed #9eb4bc; border-radius: 1rem; }
.empty h3 { margin: 0 0 .5rem; font-size: 1.25rem; font-weight: 900; }
.btn { border: 0; border-radius: .75rem; padding: .6rem 1.1rem; font: inherit; font-weight: 700; cursor: pointer; }
.btn.navy { color: #fff; }
.btn.white { background: #fff; color: var(--navy); }

/* Directory */
.dir-tools { display: flex; gap: 1rem; padding: 1rem; margin-bottom: 1.5rem; background: #eaf0f1; border-radius: 1rem; }
.chips { display: flex; gap: .5rem; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: .25rem; }
.chip { white-space: nowrap; padding: .5rem 1rem; border: 1px solid #b8c8cd; border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-size: .875rem; font-weight: 700; cursor: pointer; }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.download { padding: .75rem; background: var(--lime-soft); border: 2px solid var(--lime-deep); border-radius: 1rem; box-shadow: 0 8px 24px rgba(11,61,85,.12); }
.download-title { margin-bottom: .5rem; font-weight: 900; color: var(--navy-dark); }
.download p { margin: .5rem 0 0; font-weight: 600; color: #36505b; }
.alert { margin-bottom: 1.25rem; padding: 1rem; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; border-radius: .75rem; }
.dcard { display: flex; flex-direction: column; min-height: 10rem; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.badge { align-self: flex-start; padding: .25rem .625rem; border-radius: 999px; background: var(--chip); color: var(--navy); font-size: .6875rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.dcard h3 { margin: 1rem 0 0; font-size: 1.25rem; font-weight: 900; color: var(--navy); }
.dcard .line { margin: .25rem 0 0; font-size: .875rem; }
.dcard .details { margin: .5rem 0 0; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.dcard a, .details a { font-weight: 600; color: var(--navy); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.pdf-link { display: inline-block; margin-top: 1.5rem; font-size: .875rem; font-weight: 700; color: var(--navy); }

/* Viewer */
.overlay { position: fixed; inset: 0; z-index: 50; overflow-y: auto; padding: 1rem; background: rgba(8,47,67,.8); backdrop-filter: blur(4px); }
.viewer-card { max-width: 56rem; margin: 1.5rem auto; padding: 1.75rem; background: #fff; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.4); }
.viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.viewer-head p.muted { margin: .25rem 0 0; }
.close { flex: none; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: #edf2f2; font-size: 1rem; cursor: pointer; }
.docs { display: grid; gap: 1rem; }
.docs figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; }
.docs img { display: block; width: 100%; height: auto; }
.pdf-row { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; padding: 0 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: .75rem; color: var(--navy); font-weight: 900; text-decoration: none; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: auto; padding: 1.5rem 1rem; background: var(--navy-dark); color: rgba(255,255,255,.7); font-size: .875rem; }
@media (min-width: 1024px) { footer { padding-left: 2.5rem; padding-right: 2.5rem; } }
