/* chem.css — /hoa-chat pages. Builds on hs.css (banner, search, tables, chips).
   No inline styles (CSP default-src 'self'). */

.chem-sub { color: var(--color-text-muted); font-size: 0.875em; }
.chem-formula { font-family: var(--font-mono); white-space: nowrap; }
.chem-table td { vertical-align: top; }

.chem-doc-list, .chem-bucket-list { list-style: none; margin: 0; padding: 0; }
.chem-doc-list li { padding: 8px 0; border-bottom: 1px solid var(--color-border-light); }
.chem-bucket-list { columns: 2 20em; column-gap: 24px; }
.chem-bucket-list li { padding: 3px 0; break-inside: avoid; }
.chem-other-docs { margin-top: 12px; }
.chem-other-docs summary { cursor: pointer; color: var(--color-text-muted); }

.chem-facts { display: grid; grid-template-columns: minmax(9em, max-content) 1fr; gap: 6px 16px; margin: 12px 0 20px; }
.chem-facts dt { font-weight: 600; }
.chem-facts dd { margin: 0; overflow-wrap: anywhere; }

.chem-reg { border: 1px solid var(--color-border-light); border-radius: var(--radius); padding: 4px 16px; margin-bottom: 12px; }
.chem-reg h3 { margin: 10px 0 4px; }

@media (max-width: 640px) {
  .chem-facts { grid-template-columns: 1fr; gap: 2px; }
  .chem-facts dd { margin-bottom: 8px; }
}

/* Appendix-wide requirements on a document page (shown once, linked from detail pages). */
.chem-common { background: var(--color-bg-alt); border-radius: var(--radius); padding: 10px 14px; }

/* "Same appendix" / "same HS code" neighbours on a detail page. */
.chem-related-list { list-style: none; margin: 0; padding: 0; columns: 2 16em; column-gap: 24px; }
.chem-related-list li { padding: 3px 0; break-inside: avoid; }
