/* Shared cheat-sheet stylesheet for /course/<tool> "Cheat sheet" sections.
   A cheat sheet is a single self-contained HTML page (served from /static and
   shown in an iframe) that links this file and sets its tool's accent:

     <link rel="stylesheet" href="/cheatsheet.css" />
     <style>:root{ --accent:#8b5cf6; --accent2:#a78bfa; }</style>

   Structure: <h1> + .subtitle, then <h2> sections containing .cmd-table /
   .card grids / pre code blocks / .note callouts / .pill badges. One source of
   truth for the look so every tool's cheat sheet is visually consistent. */

:root {
  --bg: #0f0f13;
  --surface: #1a1a22;
  --surface2: #24242e;
  --border: #2e2e3a;
  --text: #e2e2ee;
  --dim: #8888aa;
  --accent: #8b5cf6;   /* overridden per tool */
  --accent2: #a78bfa;  /* overridden per tool */
  --green: #4ade80;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --code-bg: #111118;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.6;
  padding: 24px 20px 48px; max-width: 900px; margin: 0 auto;
}
h1 { font-size: 1.4rem; font-weight: 700; color: var(--accent2); margin-bottom: 4px; }
.subtitle { color: var(--dim); font-size: 0.85rem; margin-bottom: 28px; }
h2 {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin: 32px 0 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 5px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.card-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.card-title { font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
.card-body { color: var(--dim); font-size: 0.82rem; }
pre, code { font-family: 'Menlo', 'Consolas', 'JetBrains Mono', monospace; font-size: 0.8rem; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; overflow-x: auto; color: var(--text); line-height: 1.55; margin: 4px 0 8px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 3px; }
.cmd-table { width: 100%; border-collapse: collapse; }
.cmd-table th { text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); padding: 6px 10px; border-bottom: 1px solid var(--border); }
.cmd-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table td:first-child { white-space: nowrap; }
code.hi { color: var(--accent2); }
.pill { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; border-radius: 4px; padding: 2px 7px; }
.pill-green { background: rgba(74,222,128,.15); color: var(--green); }
.pill-amber { background: rgba(251,191,36,.15); color: var(--amber); }
.pill-blue  { background: rgba(96,165,250,.15);  color: var(--blue);  }
.note { font-size: 0.78rem; color: var(--dim); background: var(--surface2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 5px 5px 0; margin: 10px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .two-col, .grid { grid-template-columns: 1fr; } }
