:root {
  --site-bg: #f6f7f9;
  --site-surface: #ffffff;
  --site-border: #e2e5ea;
  --site-text: #1a1d23;
  --site-muted: #697086;
  --site-accent: #2563eb;
  --site-radius: 10px;
  --site-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --site-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --site-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --site-bg: #0e1116;
    --site-surface: #161a21;
    --site-border: #272d38;
    --site-text: #e6e9ef;
    --site-muted: #8b93a7;
    --site-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--site-sans);
  background: var(--site-bg);
  color: var(--site-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 16px 80px;
}

.site-head { margin-bottom: 40px; }
.site-head h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.02em; }
.site-head p { margin: 0; color: var(--site-muted); font-size: 15px; }

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

.theme-card {
  display: flex;
  flex-direction: column;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  box-shadow: var(--site-shadow);
  overflow: hidden;
}

.theme-card__swatch { height: 6px; }

.theme-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.theme-card__body h2 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.theme-card__body p { margin: 0 0 16px; color: var(--site-muted); font-size: 13.5px; flex: 1; }

.theme-card__links { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 7px;
  border: 1px solid var(--site-border);
  color: var(--site-text);
  background: transparent;
  transition: background .12s ease, border-color .12s ease;
}
.btn-link:hover { background: var(--site-bg); }
.btn-link--primary { background: var(--site-accent); border-color: var(--site-accent); color: #fff; }
.btn-link--primary:hover { filter: brightness(1.06); background: var(--site-accent); }

.theme-card__pages {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--site-border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
}
.theme-card__pages a { color: var(--site-muted); text-decoration: none; }
.theme-card__pages a:hover { color: var(--site-accent); text-decoration: underline; }

.site-empty {
  border: 1px dashed var(--site-border);
  border-radius: var(--site-radius);
  padding: 40px;
  text-align: center;
  color: var(--site-muted);
}
