/* Licences & credits: the dialog in the app (index.html) and the standalone page credits.html.
   Uses the app's colour tokens from style.css when present, with the same values as fallbacks. */

/* ─── dialog shell (index.html) ─── */
.credits-overlay { z-index: 10010; padding: 16px; }
.credits-modal {
  display: flex; flex-direction: column; width: min(980px, 100%); max-height: min(88vh, 100%);
  background: var(--card, #fff); border-radius: var(--radius-lg, 14px); box-shadow: var(--shadow-xl, 0 20px 60px rgba(0, 0, 0, .18));
  border: 1px solid var(--line, #e2e7ed); border-top: 3px solid var(--accent2, #2b7fc4); overflow: hidden; animation: pop .2s ease;
}
.credits-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--line-light, #eef1f5); }
.credits-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--accent, #1a4c7a); }
.credits-body { overflow: auto; padding: 4px 18px 16px; overscroll-behavior: contain; }

/* footer link and phone bottom-bar entry */
.footer .foot-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent, #1a4c7a); cursor: pointer; }
.footer .foot-link:hover { text-decoration: underline; color: var(--accent2, #2b7fc4); }

/* ─── content (shared) ─── */
.cr { font-size: 12.5px; line-height: 1.5; color: var(--ink, #1a2332); }
.cr h3 { margin: 18px 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, #1a4c7a); }
.cr h4 { margin: 10px 0 2px; font-size: 12px; font-weight: 700; color: var(--ink-muted, #64748b); }
.cr a { color: var(--accent2, #2b7fc4); text-decoration: none; overflow-wrap: anywhere; }
.cr a:hover { text-decoration: underline; }
.cr-lead { margin: 12px 0 4px; }
.cr-note { margin: 4px 0 8px; color: var(--ink-muted, #64748b); font-size: 11.5px; }
.cr-scroll { overflow-x: auto; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.cr-table th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-muted, #64748b); padding: 4px 6px; border-bottom: 1px solid var(--line, #e2e7ed); white-space: nowrap; }
.cr-table td { padding: 5px 6px; border-bottom: 1px solid var(--line-light, #eef1f5); vertical-align: top; }
.cr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cr-table td:last-child a { white-space: nowrap; overflow-wrap: normal; }
.cr-refs { margin: 0 0 4px; padding-left: 18px; columns: 2 320px; column-gap: 28px; font-size: 11.5px; }
.cr-refs li { break-inside: avoid; margin: 1px 0; }
.cr-lic { border: 1px solid var(--line-light, #eef1f5); border-radius: var(--radius-sm, 6px); margin: 4px 0; }
.cr-lic summary { cursor: pointer; padding: 5px 9px; font-weight: 600; font-size: 11.5px; color: var(--ink, #1a2332); }
.cr-lic pre { margin: 0; padding: 8px 10px; max-height: 300px; overflow: auto; white-space: pre-wrap; font-size: 10.5px; line-height: 1.4;
  background: var(--zebra, #f7f9fc); border-top: 1px solid var(--line-light, #eef1f5);
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace; }

/* ─── standalone page (credits.html opened directly) ─── */
body.cr-page { margin: 0; padding: 16px; background: #f5f7fa; font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
body.cr-page .cr { max-width: 980px; margin: 0 auto; padding: 4px 20px 20px; background: #fff; border-radius: 14px; border: 1px solid #e2e7ed; }

@media (max-width: 600px) {
  .credits-overlay { padding: 0; }
  .credits-modal { max-height: 100%; height: 100%; border-radius: 0; }
  .credits-body { padding: 4px 12px 16px; }
  body.cr-page { padding: 0; }
  body.cr-page .cr { border-radius: 0; border: 0; padding: 4px 12px 16px; }
}
