/* /terminal/ (scripts/terminal-page.mjs): grouped list of terminal tips, each with a copy box and a link to the full steps.
   Selectors start with .tm-page so the blog's paragraph sizes do not apply. */
.tm-page .tm-warn { margin: 16px 0 32px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--bg-card-subtle); border: 1px solid var(--border-line); font-size: 14px; line-height: 1.5; color: var(--ink-secondary); }
.tm-page .tm-group { margin: 0 0 48px; scroll-margin-top: 90px; }
.tm-page .tm-n { font-size: 14px; color: var(--ink-muted); }
.tm-page .tm-note { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--ink-secondary); }
.tm-page .tm-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.tm-page .tm-item { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 18px; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border-line); }
.tm-page .tm-item[hidden], .tm-page .tm-group[hidden] { display: none; }
.tm-page .tm-item h3 { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 1.25; }
.tm-page .tm-item h3 a { color: var(--ink-primary); text-decoration: none; }
.tm-page .tm-item h3 a:hover { text-decoration: underline; }
.tm-page .tm-item p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-secondary); }
.tm-page .tm-item .pp-win { margin: 0; }
.tm-page .tm-item pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-page .tm-steps { margin-top: auto; font-size: 14px; font-weight: 600; text-decoration: none; }
.tm-page .tm-steps:hover { text-decoration: underline; }
@media (min-width: 760px) {
  .tm-page .tm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* /terminal/cheat-sheet/ (scripts/terminal-sheet.mjs): the one-page sheet. The print rules keep only the sheet, on one A4 page;
   the PDF (npm run terminal-pdf) is that layout. */
.ts-page .ts-sheet { padding: 26px; border-radius: var(--radius-xl); background: var(--bg-card); border: 1px solid var(--border-line); box-shadow: var(--shadow-hard); }
.ts-page .ts-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.ts-page .ts-head h1 { margin: 2px 0 0; font-family: var(--font-display); font-size: 30px; line-height: 1.15; text-align: left; }
.ts-page .ts-sub { margin: 0; max-width: 380px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.ts-page .ts-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.ts-page .ts-card { --ts-bg: var(--cat-image); --ts-ac: var(--cat-image-accent); margin: 0; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--ts-bg); display: flex; flex-direction: column; gap: 6px; }
.ts-page .ts-sec { --ts-bg: var(--cat-video); --ts-ac: var(--cat-video-accent); }
.ts-page .ts-net { --ts-bg: var(--cat-photo); --ts-ac: var(--cat-photo-accent); }
.ts-page .ts-files { --ts-bg: var(--cat-text); --ts-ac: var(--cat-text-accent); }
.ts-page .ts-fun, .ts-page li.ts-keys { --ts-bg: #FFF4D6; --ts-ac: #8A5A00; }
.ts-page .ts-label { margin: 0; font-family: var(--font-display); font-size: 16px; line-height: 1.2; font-weight: 700; color: var(--ts-ac); }
.ts-page .ts-cmd { margin: 0; padding: 7px 9px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.75); font-family: var(--font-mono); font-size: 12px; line-height: 1.45; color: var(--ink-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.ts-page p.ts-keys { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ts-page .ts-keys kbd { padding: 3px 9px; border-radius: 7px; background: #fff; border: 1px solid var(--border-line); font-family: var(--font-mono); font-size: 13px; color: var(--ink-primary); }
.ts-page .ts-keys span { color: var(--ink-muted); }
.ts-page .ts-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-secondary); }
.ts-page .ts-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 14px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-muted); }
.ts-page .ts-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (min-width: 700px) { .ts-page .ts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .ts-page .ts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media print {
  @page { size: A4; margin: 9mm; }
  html, body { background: #fff !important; }
  body > *:not(main), .crumbs, .ts-page .ts-actions { display: none !important; }
  .seo-main, .seo-container, .ts-page { margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; }
  .ts-page .ts-sheet { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .ts-page .ts-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; padding: 12px 13px; gap: 6px; }
  .ts-page .ts-head { margin-bottom: 12px; }
  .ts-page .ts-head h1 { font-size: 28px; }
  .ts-page .ts-sub { font-size: 12px; }
  .ts-page .ts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .ts-page .ts-label { font-size: 14px; }
  .ts-page .ts-cmd { font-size: 10.5px; padding: 6px 8px; }
  .ts-page .ts-keys kbd { font-size: 12px; padding: 3px 8px; }
  .ts-page .ts-note { font-size: 10.5px; line-height: 1.4; }
  .ts-page .ts-foot { font-size: 10px; margin-top: 12px; }
}
