/* /cheats/* – topic cards with their commands, layered on style.css */
body.cheats {
  --c-line: var(--border);
  --c-muted: var(--muted);
  --c-file: var(--soft);
  --c-mono: var(--mono);
}
body.cheats.dark-mode {
  --c-file: #141417;
}

.cheat-meta { margin: 0 0 24px; font-size: 0.9rem; color: var(--c-muted); letter-spacing: 0.05ch; }

/* /cheats: the list of sheets */
.cheat-list { list-style: none; margin: 4px 0 0; padding: 0; }
.cheat-list li { padding: 8px 0; font-size: 1.1rem; }
/* a version line wraps only between its parts, at the | */
.cheat-meta .m, .cheat-list .m { white-space: nowrap; }
.cheat-list li > span { display: block; margin-top: 2px; font-size: 0.85rem; color: var(--c-muted); letter-spacing: 0.05ch; }

/* at most 4 columns, each at least 24rem: 4 on wide screens, down to 1 on phones */
.cheat-grid { columns: 24rem 4; column-gap: 18px; }
.cheat {
  break-inside: avoid; margin: 0 0 18px; padding: 12px 14px 8px;
  border: 1px solid var(--c-line); border-radius: 6px;
}
.cheat h3 { margin: 0 0 8px; font-size: 1.1rem; letter-spacing: 0.05ch; }
.cheat h3::after { content: " \\"; }
.cheat ul { list-style: none; margin: 0; padding: 0; }
.cheat li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1.5ch; padding: 4px 0; }
.cheat code { font-family: var(--c-mono); font-size: 0.875rem; line-height: 1.5; }
/* commands wrap between words only, so --dry-run never splits at its hyphen */
.cheat li code > span { white-space: nowrap; }
.cheat li code > span.long { white-space: normal; overflow-wrap: anywhere; }
.cheat li > span { margin-left: auto; font-size: 0.8125rem; line-height: 1.5; color: var(--c-muted); text-align: right; }
.cheat li > span::before { content: "# "; }

.cheat-file { margin: 2px 0 8px; }
.cheat-file figcaption { margin: 0 0 4px; font-size: 0.8125rem; color: var(--c-muted); }
.cheat-file pre {
  margin: 0; padding: 10px 12px; overflow-x: auto;
  background: var(--c-file); border: 1px solid var(--c-line); border-radius: 4px;
}
.cheat-file code { font-size: 0.8125rem; line-height: 1.55; }

@media (max-width: 600px) {
  .cheat-meta, .cheat-list { text-align: center; padding: 0 8px; }
  .cheat { padding: 10px 12px 6px; }
  .cheat code { font-size: 0.84rem; }
  .cheat-file pre { padding: 8px; }
  .cheat-file code { font-size: 0.78rem; }
  .cheat li > span { font-size: 0.8rem; }
}
