/* MaiDraw Support quick reference */
.cheat-hero {
  background: linear-gradient(120deg, var(--alt), var(--bg) 75%);
  border-bottom: 1px solid var(--line);
}
.cheat-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-block: 40px;
}
.cheat-back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.cheat-back:hover { text-decoration: underline; }
.cheat-hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.6rem); }
.cheat-build {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.cheat-build code { font-family: var(--mono); }
.cheat-hero .lead { max-width: 44ch; }
.cheat-actions { margin-top: 20px; }
.cheat-actions [hidden], .cheat-print-heading { display: none; }

.cheat-sketch {
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: radial-gradient(circle, #d5e3e8 1px, transparent 1px) 0 0 / 16px 16px, var(--alt);
  overflow: hidden;
}
.cheat-sketch svg {
  width: min(100%, 286px);
  height: auto;
  padding-block: 8px;
  color: var(--ink);
}
.cheat-sketch-bond { stroke: var(--accent-h); }
.cheat-sketch-atom { fill: var(--accent-h); font: 650 17px var(--font); }
.cheat-sketch figcaption {
  width: 100%;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.cheat-sketch figcaption strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 16px;
}

.cheat-content { padding-bottom: 48px; }
.cheat-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 32px;
}
.cheat-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.cheat-jump a:hover { background: var(--accent-soft); border-color: var(--accent); }
.cheat-sheet section[id] { scroll-margin-top: 88px; }
.cheat-sheet h2 { font-size: 25px; }
.cheat-sheet dl, .cheat-sheet dd { margin: 0; }
.cheat-sheet kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #bccbd3;
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font: 600 .86em/1.4 var(--mono);
  white-space: nowrap;
}
.cheat-intro { margin: 6px 0 14px; color: var(--muted); font-size: 15px; }
.cheat-keys {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cheat-key-group {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--alt);
}
.cheat-key-group h3 { margin-bottom: 8px; font-size: 16px; }
.cheat-key-group dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.5;
}
.cheat-key-group dd { text-align: right; }
.cheat-sheet .cheat-canvas-keys {
  display: grid;
  gap: 6px;
  margin: 14px 0 22px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
  line-height: 1.7;
}
.cheat-canvas-keys > div {
  display: grid;
  grid-template-columns: 10.5em minmax(0, 1fr);
  gap: 8px;
}
.cheat-canvas-keys dt { font-weight: 700; }

.cheat-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cheat-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
}
.cheat-card:target { border-color: var(--accent); }
.cheat-card h2 { margin-bottom: 10px; }
.cheat-card dl > div { padding-block: 8px; }
.cheat-card dl > div + div { border-top: 1px solid var(--line); }
.cheat-card dt { font-weight: 700; font-size: 15px; }
.cheat-card dd { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.cheat-card dd b { color: var(--ink); font-weight: 650; }
.cheat-card dd code { font-family: var(--mono); font-size: .92em; }
.cheat-workflows { margin-top: 16px; }
.cheat-more { margin-top: 18px; color: var(--muted); font-size: 14px; }

@media screen and (max-width: 920px) {
  .cheat-hero-grid { gap: 24px; }
  .cheat-keys { grid-template-columns: 1fr; }
}
@media screen and (max-width: 720px) {
  .cheat-hero-grid, .cheat-cards, .cheat-canvas-keys > div { grid-template-columns: 1fr; }
  .cheat-hero-grid { padding-block: 30px; }
  .cheat-sketch { grid-template-columns: 32% 68%; }
  .cheat-sketch figcaption { padding: 12px; border-top: 0; border-left: 1px solid var(--line); }
  .cheat-jump { margin-block: 16px 22px; }
  .cheat-jump a { min-height: 40px; }
  .cheat-canvas-keys > div { gap: 0; }
  .cheat-card { padding: 16px; }
}

@page { margin: 10mm; }
@media print {
  .site-header, .site-footer, .skip, .preview-bar, .cheat-back, .cheat-actions, .cheat-jump, .cheat-hero .lead, .cheat-more {
    display: none;
  }
  .cheat-sheet, .cheat-sheet h1, .cheat-sheet h2, .cheat-sheet h3,
  .cheat-card dd, .cheat-card dd b, .cheat-build { color: #000; }
  .cheat-sheet .wrap { max-width: none; padding-inline: 0; }
  .cheat-content { padding-bottom: 0; }
  .cheat-hero { background: none; margin-bottom: 4mm; }
  .cheat-hero-grid { grid-template-columns: 1.2fr 1fr; gap: 6mm; padding-block: 0 3mm; }
  .cheat-hero h1 { font-size: 24pt; }
  .cheat-build { margin-top: 2mm; padding: 0; border: 0; font-size: 9pt; }
  .cheat-sketch { grid-template-columns: 28% 72%; background: none; }
  .cheat-sketch svg { padding-block: 0; }
  .cheat-sketch figcaption { padding: 2mm; border: 0; font-size: 8pt; line-height: 1.25; color: #000; }
  .cheat-sketch figcaption strong { font-size: 9pt; }
  .cheat-sheet h2 { font-size: 14pt; }
  .cheat-intro { margin: 1mm 0 2mm; font-size: 9pt; }
  .cheat-keys { gap: 2mm; }
  .cheat-key-group { padding: 2mm; background: none; border-radius: 1mm; }
  .cheat-key-group h3 { margin-bottom: 1mm; font-size: 10pt; }
  .cheat-key-group dl > div { gap: 1mm; padding: .65mm 0; font-size: 8.5pt; line-height: 1.2; }
  .cheat-sheet kbd { padding: 0 1mm; color: #000; }
  .cheat-sheet .cheat-canvas-keys {
    gap: 1mm;
    margin: 2.5mm 0 3mm;
    padding: 1.5mm 2mm;
    border-left: 1pt solid #333;
    background: none;
    font-size: 9pt;
    line-height: 1.35;
  }
  .cheat-canvas-keys > div { grid-template-columns: 9em minmax(0, 1fr); gap: 2mm; }
  .cheat-cards { gap: 2.5mm; }
  .cheat-card { padding: 2mm 3mm; border-radius: 1mm; break-inside: avoid; }
  .cheat-card h2 { margin-bottom: 1mm; }
  .cheat-card dl > div { padding-block: .8mm; }
  .cheat-card dt, .cheat-card dd { font-size: 9.5pt; line-height: 1.25; }
  .cheat-workflows { break-before: page; margin-top: 0; }
  .cheat-print-heading { display: block; margin-bottom: 3mm; font-size: 10pt; }
}
