:root{
  /* Tinted blue rather than near-white, so the white cards read as objects
     sitting on the page instead of dissolving into it. */
  --bg:#EFF4FD;
  --surface:#FFFFFF;
  --ink:#16161D;
  --muted:#6B7085;
  /* Hairlines instead of the old 2px black outlines. At twelve cards a page the
     heavy borders and hard offset shadows stacked into a very loud grid. */
  --line:#E9E9F0;
  --line-strong:#DCDCE6;
  --blue:#4C6FFF;
  --blue-soft:#EEF2FF;
  --pink:#FF4D8D;
  --pink-soft:#FFE6F0;
  --r:12px;
  --r-sm:8px;
  --r-pill:999px;
  --shadow-sm:0 1px 2px rgba(22,22,45,.05),0 1px 3px rgba(22,22,45,.04);
  --shadow-md:0 4px 14px rgba(22,22,45,.07),0 1px 3px rgba(22,22,45,.05);
  --shadow-lg:0 16px 40px rgba(22,22,45,.14),0 3px 10px rgba(22,22,45,.07);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--bg);color:var(--ink);
  font-family:"DM Sans",system-ui,sans-serif;
  font-size:16px;line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}

/* ---------- top bar ---------- */
.topbar{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:12px 24px;color:var(--ink);
  /* Translucent rather than a solid blue slab: the bar stays legible while the
     grid scrolls under it, and it stops competing with the cards for attention. */
  background:rgba(239,244,253,.82);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.logo{
  display:flex;align-items:center;gap:10px;
  font-family:"Space Grotesk",sans-serif;font-weight:700;
  font-size:20px;letter-spacing:-.01em;text-decoration:none;
}
.logo-mark{
  width:22px;height:22px;border-radius:6px;display:inline-block;
  background:linear-gradient(135deg,var(--pink),var(--blue));
}
.topbar-right{display:flex;align-items:center;gap:10px}
#search{
  font:inherit;font-size:14.5px;padding:8px 14px;width:min(340px,45vw);color:var(--ink);
  background:var(--surface);border:1px solid var(--line-strong);
  border-radius:var(--r-pill);box-shadow:var(--shadow-sm);
  transition:border-color .15s,box-shadow .15s;
}
#search::placeholder{color:#A2A5B8}
#search:focus{
  outline:none;border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(76,111,255,.14);
}
.gh{
  font-weight:600;font-size:14px;text-decoration:none;white-space:nowrap;color:var(--ink);
  padding:8px 14px;background:var(--surface);border:1px solid var(--line-strong);
  border-radius:var(--r-pill);box-shadow:var(--shadow-sm);
  transition:border-color .15s,box-shadow .15s;
}
.gh:hover{border-color:#C4C4D2;box-shadow:var(--shadow-md)}

/* ---------- intro ---------- */
main{max-width:1400px;margin:0 auto;padding:0 24px 64px}
.intro{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:32px;
  align-items:start;padding:56px 0 40px;
}
.intro h1{
  font-family:"Space Grotesk",sans-serif;font-weight:700;
  font-size:clamp(34px,4.6vw,56px);line-height:1.14;letter-spacing:-.025em;
}
/* An underline band rather than a padded block, so the highlight can never
   overlap the line beneath it however tight the leading is. */
.intro h1 em{font-style:normal;background:linear-gradient(transparent 62%,#FF8DA1 62%)}
.intro p{max-width:60ch;margin-top:22px;font-size:17px;color:#3A3A52}
.intro .meta{font-size:15px;color:var(--muted)}
.intro-deco{display:grid;grid-template-columns:repeat(3,30px);gap:10px;padding-top:14px}
.chip{width:30px;height:30px;border-radius:9px;box-shadow:var(--shadow-sm)}
.c1{background:var(--pink)}
/* Not --blue-soft: on the tinted blue page it is the same colour as the
   background and the chip disappears. */
.c2{background:#C3D4FF}
.c3{background:var(--pink-soft)}
.c4{background:var(--blue)}
.c5{background:#B388FF}
.c6{background:#5BD1F0}

/* ---------- filters ---------- */
/* One flat wrap of sixteen pills read as noise. The categories already carry a
   "group" field, so each group gets its own labelled row and the eye has
   somewhere to rest between them. */
.filters{display:flex;flex-direction:column;gap:14px;padding:4px 0 24px}
.filter-group{display:flex;align-items:flex-start;gap:16px}
.filter-label{
  /* Wide enough that the longest group name ("Cloud & DevOps") stays on one line. */
  flex:none;width:124px;padding-top:7px;
  font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:#9A9DB0;
}
.filter-row{display:flex;flex-wrap:wrap;gap:8px;flex:1;min-width:0}
.filters button{
  font:inherit;font-weight:500;font-size:13.5px;cursor:pointer;
  display:flex;align-items:center;gap:7px;
  padding:6px 13px;background:var(--surface);color:var(--ink);
  border:1px solid var(--line-strong);border-radius:var(--r-pill);
  transition:background .15s,border-color .15s,color .15s;
}
.filters button:hover{background:#F4F4F8;border-color:#C9C9D8}
.filters button[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.filters .swatch{width:9px;height:9px;border-radius:50%;flex:none}
.filters .n{opacity:.5;font-size:12.5px;font-variant-numeric:tabular-nums}
.count{font-size:14px;color:var(--muted);padding-bottom:18px}

/* ---------- grid ---------- */
/* Fixed 4 columns so a page is always a tidy 4x3 block of 12. */
.grid{
  display:grid;gap:24px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.card{
  display:flex;flex-direction:column;cursor:pointer;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);box-shadow:var(--shadow-sm);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);border-color:var(--line-strong)}
/* Presses in under the cursor, so the click that opens the modal is acknowledged
   before the modal itself arrives. */
.card:active{transform:translateY(-1px) scale(.994);box-shadow:var(--shadow-md);transition-duration:.06s}
.shot{
  position:relative;aspect-ratio:16/10;overflow:hidden;
  border-bottom:1px solid var(--line);background:var(--blue-soft);
}
.shot img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.badge{
  font-size:10.5px;font-weight:600;letter-spacing:.02em;
  padding:3px 9px;border-radius:var(--r-pill);
  /* Category names run long; shrink and ellipsise rather than push the row wide. */
  min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.versions{
  position:absolute;top:10px;right:10px;
  background:rgba(255,255,255,.9);backdrop-filter:blur(6px);color:var(--muted);
  font-size:11px;font-weight:600;padding:3px 9px;
  border-radius:var(--r-pill);box-shadow:var(--shadow-sm);
}
.body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:9px;flex:1}
.name-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.name{
  font-family:"Space Grotesk",sans-serif;font-weight:600;font-size:13px;
  letter-spacing:.06em;text-transform:uppercase;color:var(--muted);flex:none;
}
.headline{
  font-family:"Space Grotesk",sans-serif;font-weight:700;
  font-size:19px;line-height:1.22;letter-spacing:-.015em;
}
.sub{font-size:14px;color:#5A5A74;line-height:1.5}
.card-foot{
  margin-top:auto;padding-top:12px;display:flex;justify-content:space-between;gap:10px;
  font-size:12.5px;color:var(--muted);border-top:1px solid var(--line);
}
.card-foot a{font-weight:600;text-decoration:none;color:var(--blue)}
.card-foot a:hover{text-decoration:underline}
.empty{padding:48px 0;font-size:17px;color:var(--muted)}

/* ---------- pager ---------- */
.pager{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;padding:36px 0 0}
.pager button{
  font:inherit;font-weight:600;font-size:14px;cursor:pointer;
  min-width:38px;padding:7px 12px;background:var(--surface);color:var(--ink);
  border:1px solid var(--line-strong);border-radius:var(--r-sm);
  transition:background .15s,border-color .15s;
}
.pager button:hover:not(:disabled){background:#F4F4F8;border-color:#C9C9D8}
.pager button[aria-current=page]{background:var(--ink);color:#fff;border-color:var(--ink)}
.pager button:disabled{opacity:.4;cursor:default}

/* ---------- modal ---------- */
.modal{
  position:fixed;inset:0;z-index:100;display:grid;place-items:center;
  padding:24px;background:rgba(22,22,45,.4);backdrop-filter:blur(4px);overflow:auto;
  opacity:0;transition:opacity .14s ease-in;
}
/* display:grid outranks the hidden attribute's own display:none. */
.modal[hidden]{display:none}
.modal.open{opacity:1;transition:opacity .2s ease-out}
.modal-card{
  position:relative;width:min(880px,100%);max-height:90vh;overflow:auto;
  background:var(--surface);border:1px solid var(--line);
  border-radius:16px;box-shadow:var(--shadow-lg);padding:32px;
  /* Resting state doubles as the exit state: short, ease-in, no overshoot, so
     dismissing feels immediate rather than like the entrance played backwards. */
  /* Mostly scale, barely any travel: the card should look like it pops toward you,
     not like it slides up from below. */
  transform:translateY(6px) scale(.92);opacity:0;
  transition:transform .14s ease-in,opacity .14s ease-in;
}
.modal.open .modal-card{
  transform:none;opacity:1;
  /* Back-out curve — shoots past full size and springs back. Short duration and a
     faster opacity ramp so the card is already visible while it is still expanding;
     fading in over the whole motion is what made it read as a gentle ease. */
  transition:transform .28s cubic-bezier(.34,1.56,.64,1),opacity .12s ease-out;
}
@media (prefers-reduced-motion:reduce){
  .modal,.modal.open,.modal-card,.modal.open .modal-card{transition:none}
}
.modal-close{
  position:absolute;top:16px;right:16px;cursor:pointer;font:inherit;font-weight:600;
  width:32px;height:32px;color:var(--muted);
  background:var(--surface);border:1px solid var(--line-strong);border-radius:50%;
  transition:background .15s,color .15s;
}
.modal-close:hover{background:#F4F4F8;color:var(--ink)}
.modal h2{font-family:"Space Grotesk",sans-serif;font-size:28px;letter-spacing:-.02em}
.modal .url{font-size:14px;color:var(--muted);word-break:break-all}
.version{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.version:first-of-type{border-top:none}
.version-date{
  display:inline-block;font-size:11.5px;font-weight:600;
  letter-spacing:.04em;padding:3px 10px;margin-bottom:12px;
  border-radius:var(--r-pill);
}
.version h3{font-family:"Space Grotesk",sans-serif;font-size:22px;line-height:1.24;margin-bottom:8px}
.version p{font-size:15px;color:#5A5A74;max-width:62ch}
.version img{
  width:100%;margin-top:16px;display:block;
  border:1px solid var(--line);border-radius:var(--r-sm);box-shadow:var(--shadow-md);
}
.current{font-size:12px;font-weight:600;color:var(--pink);margin-left:8px}

footer{
  border-top:1px solid var(--line);background:var(--surface);
  padding:26px 24px;font-size:14px;color:var(--muted);
}
footer p{max-width:1400px;margin:0 auto}

@media (max-width:1180px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:900px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:720px){
  .intro{grid-template-columns:1fr}
  .intro-deco{grid-template-columns:repeat(6,26px)}
  .topbar{flex-wrap:wrap}
  /* The label gutter costs too much of a narrow screen: stack instead. */
  .filter-group{flex-direction:column;gap:8px}
  .filter-label{width:auto;padding-top:0}
}
@media (max-width:620px){.grid{grid-template-columns:1fr}}
