:root {
  --ink: #1b1f2a;
  --ink-soft: #555c6b;
  --line: #e4e7ee;
  --bg: #f7f8fb;
  --card: #ffffff;
  --accent: #3949ab;        /* indigo, family resemblance to the cce site */
  --accent-dark: #283593;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,24,40,.06), 0 6px 20px rgba(20,24,40,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }

/* header */
.site-header {
  background: linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 44px 0 26px;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.site-header h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.01em; }
.lede { margin: 0 0 18px; max-width: 64ch; color: var(--ink-soft); font-size: 17px; }
.actions { margin-bottom: 20px; }

.btn {
  display: inline-block; border-radius: 8px; padding: 10px 16px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { background: #fff; color: var(--accent); border-color: var(--line); font-weight: 600; }
.btn--ghost:hover { border-color: var(--accent); }

.unitnav { display: flex; flex-wrap: wrap; gap: 8px; }
.unitnav a {
  font-size: 13px; text-decoration: none; color: var(--ink-soft);
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px;
}
.unitnav a:hover { color: var(--accent); border-color: var(--accent); }

/* units + grid */
main { padding: 8px 0 40px; }
.unit { padding: 30px 0 6px; scroll-margin-top: 16px; }
.unit__head { display: flex; align-items: baseline; gap: 12px; }
.unit__title { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.unit__count { font-size: 13px; color: var(--ink-soft); }
.unit__blurb { margin: 6px 0 16px; color: var(--ink-soft); max-width: 70ch; }

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

.card { margin: 0; }
.card__open {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  text-align: left; padding: 0; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card__open:hover { transform: translateY(-2px); border-color: #cfd5e6; box-shadow: 0 2px 4px rgba(20,24,40,.08), 0 12px 28px rgba(20,24,40,.10); }
.card__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card__thumb {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #eef1f7 center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.card__thumb--blank {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 26px; letter-spacing: .08em;
  color: #b9c0d6; background: linear-gradient(135deg, #eef1f7, #e3e8f4);
}
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 13px 14px 15px; }
.card__type {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.card__title { font-size: 15px; font-weight: 600; line-height: 1.35; }

.tags { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 11px; color: var(--ink-soft); background: #f1f3f9;
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 50px; color: var(--ink-soft); font-size: 14px; }
.site-footer .muted { color: #8b93a6; font-size: 13px; max-width: 70ch; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(15,18,30,.55); backdrop-filter: blur(2px); }
.lightbox__panel {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: min(960px, 100%); height: min(86vh, 100%);
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.lightbox__bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.lightbox__title { margin: 0; font-size: 15px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__bar-actions { display: flex; align-items: center; gap: 8px; }
.lightbox__close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 0 6px; }
.lightbox__close:hover { color: var(--ink); }
.lightbox__stage { flex: 1; background: #fff; }
.lightbox__stage iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 600px) {
  .lightbox { padding: 0; }
  .lightbox__panel { width: 100%; height: 100%; border-radius: 0; }
  .lightbox__bar-actions .btn--ghost { display: none; } /* keep close reachable on small screens */
}

@media (prefers-reduced-motion: reduce) {
  .card__open { transition: none; }
}
