/* QuickRef.io — quick reference (cheat sheet) pages
   Loaded after shared.css on /reference/* pages only. */

.ref-hero h1 { margin-bottom: 8px; }
.ref-hero .ref-updated { font-size: 12px; color: var(--t3); margin-top: 8px; }

/* On-this-page links */
.ref-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.ref-toc a {
  font-size: 12px; font-weight: 600; color: var(--t2);
  background: var(--white); border: 1px solid var(--bdr); border-radius: 20px;
  padding: 4px 12px; text-decoration: none; transition: all var(--T);
}
.ref-toc a:hover { border-color: var(--accent); color: var(--accent); background: var(--acc-lt); }

/* Tool call-to-action */
.ref-tool { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-color: var(--acc-md); }
.ref-tool p { margin: 0; color: var(--t2); }
.ref-tool .btn { text-decoration: none; }

/* Tables */
.ref-scroll { overflow-x: auto; margin: 0 0 12px; -webkit-overflow-scrolling: touch; }
.ref-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.ref-table th, .ref-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--bdr); }
.ref-table th { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--t3); white-space: nowrap; }
.ref-table td { color: var(--t2); }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-table td:first-child { white-space: nowrap; }
.ref-table code, .info-card li code {
  font-family: var(--mono); font-size: 12px; color: var(--t1);
  background: var(--surf); border: 1px solid var(--bdr); border-radius: 5px; padding: 1px 6px;
}
/* Long values (hashes, Base64) in running text wrap instead of widening the page */
.info-card li code, .info-card p code { word-break: break-all; }
.ref-copy { cursor: pointer; }
.ref-copy:hover { border-color: var(--accent); color: var(--accent); }
.ref-try {
  font-size: 11px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--acc-md); border-radius: 20px; padding: 1px 8px; background: var(--acc-lt);
}
.ref-try:hover { background: var(--accent); color: #fff; }

/* Code blocks */
.ref-pre {
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--t1);
  background: var(--surf); border: 1px solid var(--bdr); border-radius: 9px;
  padding: 12px 14px; margin: 0 0 12px; overflow-x: auto; white-space: pre;
}
.info-card ul.ref-list { margin: 0 0 12px 18px; font-size: 13px; color: var(--t2); line-height: 1.75; }
.info-card .ref-note { font-size: 12px; color: var(--t3); }

/* Reference index cards */
.ref-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ref-card {
  display: block; background: var(--white); border: 1px solid var(--bdr); border-radius: var(--r2);
  padding: 18px; text-decoration: none; box-shadow: var(--sh0); transition: all var(--T);
}
.ref-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.ref-card h2 { font-size: 15px; font-weight: 700; color: var(--t1); margin: 0 0 6px; }
.ref-card p { font-size: 12.5px; color: var(--t3); line-height: 1.6; margin: 0 0 10px; }
.ref-card span { font-size: 12px; font-weight: 600; color: var(--accent); }

@media print {
  .header, .cat-strip, footer, .ref-toc, .ref-tool, .ref-try, .ref-related, .dark-toggle, .toast { display: none !important; }
  .info-card { box-shadow: none; border: 0; padding: 0; margin-bottom: 18px; break-inside: avoid-page; }
  .ref-table th, .ref-table td { border-bottom: 1px solid #ccc; color: #000; }
  .ref-table code, .ref-pre { background: none; border: 1px solid #ccc; color: #000; }
  body { background: #fff; }
}
