:root {
  --lime: #ECB707;          /* Even7 gold (accent) */
  --lime-soft: #F5CB3E;
  --blue: #ECB707;          /* gold (count pill, date, hover) */
  --ink: #F5F1E6;           /* light text on navy */
  --paper: #002E3A;         /* Even7 navy background */
  --muted: rgba(245, 241, 230, 0.62);
  --card: #0C3A46;          /* elevated navy panel */
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.site h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.site p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.count {
  background: var(--blue);
  color: var(--paper);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11, 47, 168, 0.22);
  border-color: var(--blue);
}

.card .cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #013a49, #002028);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.badge {
  background: var(--lime);
  color: #002E3A;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.card .body { padding: 18px 18px 22px; }
.card h2 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card .desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.card .date { margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--blue); }

.empty {
  background: var(--card);
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow);
}

footer.site {
  margin-top: 56px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* Viewer (PDF/PPTX) */
body.viewer { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
}
.viewer-bar a.back { color: var(--lime); text-decoration: none; font-weight: 600; font-size: 14px; }
.viewer-bar h1 { font-size: 15px; font-weight: 600; margin: 0; flex: 1; }
.viewer-bar a.dl {
  color: var(--ink); background: var(--lime); padding: 6px 14px;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 13px;
}
.viewer-frame { flex: 1; border: 0; width: 100%; background: #333; }
