:root {
  /* warm charcoal palette, Chrome-dark inspired */
  --bg: #1f2225; --panel: #292c30; --input: #34383e; --line: #3a3f45;
  --fg: #c8ccd1; --mut: #979ca2; --accent: #e0654f;
  --fw: #b48cf0; --sv: #57b96c; --misc: #d8a64c;
  --pad: clamp(1rem, 4vw, 4rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* full-width sections with responsive side padding */
.hero { padding: 3rem var(--pad) 1.25rem; }
.hero h1 { margin: 0 0 .5rem; font-size: 2.4rem; letter-spacing: -.02em; }
.hero p { margin: .25rem 0; color: var(--mut); max-width: 80ch; line-height: 1.55; }
.hero .links a { margin-right: .25rem; }
.search { margin-top: 1.25rem; }
.search input {
  width: 100%; max-width: 520px; padding: .7rem 1rem; font-size: 1rem;
  color: var(--fg); background: var(--input); border: 1px solid var(--line); border-radius: 10px;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 101, 79, .3); }

main { padding: 0 var(--pad) 3rem; }
.group-sec { margin-top: 2.5rem; }
.group { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mut);
  border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin: 0 0 1.5rem; }
.group .gc { color: var(--fg); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 .55rem; font-size: .8rem; margin-left: .4rem; }

/* bigger cards: 3 per row, then 2, then 1 as the screen narrows */
.grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card-link { display: block; text-decoration: none; color: inherit; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .15s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.thumb { position: relative; aspect-ratio: 16/10; background: #fff; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.thumb .ph { display: none; }
.thumb.noshot { background: linear-gradient(135deg, #2f3338, #23262a); }
.thumb.noshot .ph { display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--mut); font-size: 1.3rem; font-weight: 600; padding: 1rem; text-align: center; }
.cap { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .8rem 1rem; border-top: 1px solid var(--line); }
.cap .name { font-weight: 600; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut);
  border: 1px solid var(--line); border-radius: 999px; padding: .12rem .5rem; white-space: nowrap; }
.tag.html { color: var(--sv); } .tag.body { color: var(--accent); } .tag.source { color: var(--fw); }

/* detail page */
.top { padding: 1.25rem var(--pad); }
.home { text-decoration: none; }
.detail { padding: 0 var(--pad) 2rem; display: grid; grid-template-columns: 340px 1fr;
  gap: 2rem; align-items: start; }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } }
.meta h1 { font-size: 1.7rem; margin: .6rem 0 .4rem; letter-spacing: -.01em; }
.meta .blurb { color: var(--mut); line-height: 1.55; }
.meta .folder code { background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: .15rem .4rem; font-size: .85rem; }
.meta .rights { color: var(--mut); font-size: .85rem; border-left: 2px solid var(--line); padding-left: .6rem; }
.badge { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  border-radius: 999px; padding: .12rem .5rem; border: 1px solid var(--line); margin-right: .35rem; }
.badge.framework { color: var(--fw); } .badge.server { color: var(--sv); }
.badge.misc { color: var(--misc); } .badge.type { color: var(--mut); }
.links { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin-top: 1.25rem; }
.links a { text-decoration: none; }
.repo { display: inline-flex; align-items: center; gap: .45rem; color: var(--fg);
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: .45rem .8rem; }
.repo:hover { border-color: var(--accent); color: var(--accent); }
.repo svg { display: block; }
.stage { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stage iframe { width: 100%; height: 80vh; border: 0; display: block; background: #fff; }

.foot { padding: 2rem var(--pad) 3rem; color: var(--mut); font-size: .82rem; line-height: 1.5;
  border-top: 1px solid var(--line); }
