:root {
  --paper: #ffffff;
  --ink: #111214;
  --mute: #5f646b;
  --line: #e4e6ea;
  --soft: #f5f6f8;
  --accent: #3d5afe;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0f1012; --ink: #f2f3f5; --mute: #9aa0a8; --line: #26292e; --soft: #17191c; --accent: #8c9aff; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
code, pre { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.masthead, .howto, .filters, .grid, .foot { width: min(1200px, 100%); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .masthead, .howto, .filters, .grid, .foot { padding-inline: 32px; } }

.masthead { padding-block: 56px 32px; }
.kicker { color: var(--mute); font-size: 14px; }
.masthead h1 { margin: 8px 0 12px; font-size: clamp(40px, 7vw, 72px); line-height: 1; letter-spacing: -.035em; }
.intro { max-width: 62ch; color: var(--mute); font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; }
.btn:hover { border-color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.howto { display: grid; gap: 12px; padding-block: 8px 32px; }
.howto h2 { font-size: 18px; }
.howto pre { margin: 0; padding: 16px; overflow-x: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.howto p { color: var(--mute); max-width: 70ch; }
.howto p code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }

.filters { display: flex; gap: 8px; padding-block: 16px 20px; }
.filters button, .actions button { font: inherit; font-size: 14px; color: inherit; background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.grid { display: grid; grid-auto-flow: dense; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding-bottom: 56px; }
.entry { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: clip; background: var(--paper); }
.entry[hidden] { display: none; }
@media (min-width: 720px) { .entry-template { grid-column: span 2; } }
.frame { aspect-ratio: 4 / 3; background: var(--soft); border-bottom: 1px solid var(--line); }
.entry-template .frame { aspect-ratio: 16 / 9; }
.frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.info { display: grid; gap: 8px; align-content: start; padding: 16px; }
.info h3 { font-size: 18px; }
.info h3 a { text-decoration: none; }
.info h3 a:hover { text-decoration: underline; }
.info p { color: var(--mute); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--mute); }
.credit { font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.actions a { font-size: 14px; padding: 6px 4px; }

.foot { padding-block: 24px 48px; border-top: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.foot p { max-width: 80ch; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
