/* The theme library page. Built on styles.css; the cards themselves are
   generated from themes/*.yaml by scripts/build-themes.mjs. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.themes-intro {
  padding: 64px 0 40px;
  max-width: 760px;
}
.themes-intro .eyebrow {
  margin: 0 0 22px;
}
.themes-intro h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}
.themes-intro h1 em {
  font-family: 'Gelasio', serif;
  font-weight: 400;
  color: var(--accent);
}
.themes-lede {
  margin: 24px 0 0;
  font-size: 18px;
  color: var(--muted);
  max-width: 62ch;
}
.themes-library {
  padding: 8px 0 64px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.theme-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--surface);
  scroll-margin-top: 24px;
}
.theme-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
/* A miniature of the app: sidebar, page, lines of text, a selected row and
   the accent, painted from the theme's own values (--t-* on the element). */
.theme-mini {
  display: flex;
  height: 118px;
  background: var(--t-background);
}
.theme-mini + .theme-mini {
  border-left: 1px solid var(--border);
}
.mini-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 36%;
  padding: 14px 8px;
  background: var(--t-surface);
  border-right: 1px solid var(--t-border);
}
.mini-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
}
.mini-line {
  display: block;
  height: 6px;
  border-radius: 3px;
}
.mini-line.short {
  width: 60%;
}
.mini-text {
  height: 8px;
  width: 80%;
  background: var(--t-text);
}
.mini-muted {
  background: var(--t-text-muted);
}
.mini-faint {
  background: var(--t-text-faint);
}
.mini-row {
  display: block;
  height: 14px;
  border-radius: 3px;
  background: var(--t-accent-soft);
}
.mini-accent {
  display: block;
  width: 38px;
  height: 12px;
  margin-top: auto;
  border-radius: 6px;
  background: var(--t-accent);
}
.theme-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 20px 22px;
}
.theme-body h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.theme-description {
  margin: 0 0 10px;
  color: var(--muted);
}
.theme-traits {
  margin: 0 0 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.theme-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: auto;
}
.theme-actions .btn {
  min-height: 44px;
  padding: 10px 18px;
}
.themes-make {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.themes-make-copy .eyebrow {
  margin: 0 0 20px;
}
.themes-make-copy h2 {
  margin: 0 0 24px;
}
.themes-make-copy > p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 57ch;
}
.themes-rules {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
}
.themes-rules li {
  margin: 0 0 10px;
}
.themes-rules strong {
  color: var(--fg);
}
.themes-boundary {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.themes-rules code,
.themes-example {
  font-family: 'IBM Plex Mono', monospace;
}
.themes-example {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
}
@media (max-width: 860px) {
  .themes-make {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 760px) {
  .themes-intro {
    padding: 36px 0 28px;
  }
  .theme-grid {
    grid-template-columns: 1fr;
  }
  .themes-make {
    padding: 40px 0;
  }
}
