/* Chemical ID / Chemical Profile workspace. It stays inside the normal app
   shell so Command Dashboard navigation remains available throughout. */
.layout:has(#lookup.active) > .content-area,
.layout:has(#lookup.active) #lookup.active {
  width: 100%;
  min-width: 0;
}

/* Chemical profiles are document-length reference pages; keep scrolling on the page. */
#lookup.active:has(#chemical-id-results:not([hidden])),
#lookup.active:has(#chemical-id-results:not([hidden])) #chemical-id-results,
#lookup.active:has(#chemical-id-results:not([hidden])) .chemical-profile-shell {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

#lookup.active:has(#chemical-id-results:not([hidden])) .chemical-profile-content {
  max-height: none !important;
  overflow: visible !important;
}

@media (min-width: 701px) {
  /* The profile is a long reference document, so it must participate in the
     normal page flow instead of being constrained by the lookup grid. */
  .layout:has(#lookup.active) #lookup.active:has(#chemical-id-results:not([hidden])) {
    display: block !important;
    min-height: 0 !important;
  }

  .layout:has(#lookup.active) #lookup.active:has(#chemical-id-results:not([hidden])) > #chemical-id-results {
    width: 100% !important;
  }
}

@media (min-width: 720px) {
  .layout:has(#lookup.active) #lookup.active {
    grid-template-rows: auto !important;
    align-content: start !important;
  }

  .layout:has(#lookup.active) > .content-area {
    overflow: visible !important;
  }
}

#chemical-id-results .chemical-profile-meta-item[data-field="hazard-class"] .chemical-profile-meta-value {
  display: grid;
  gap: 3px;
  white-space: pre-line;
}

#chemical-id-results .chemical-profile-toolbar-actions { align-items: center; }

#chemical-id-results .chemical-profile-toolbar-actions .chemical-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#chemical-id-results .chemical-profile-toolbar-actions .chem-compare,
#chemical-id-results .chemical-profile-toolbar-actions .chemical-profile-plume {
  min-width: 128px;
}

@media (min-width: 761px) {
  #chem-compare.view.active { display: block !important; min-height: 100%; overflow: visible !important; }
  #chem-compare.view.active .chemcompare-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}

.layout:has(#lookup.active) #lookup.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  background: #e5e7eb;
}

.layout:has(#lookup.active) #lookup.active > .chemical-id-search-card {
  width: 100%;
  height: auto;
  min-height: 280px;
}

#lookup.active > .chemical-id-search-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: clamp(10px, 1.35vh, 16px);
  min-width: 0;
  min-height: 280px;
  margin: 0;
  padding: clamp(20px, 2.3vw, 30px);
  overflow: hidden;
  border: 1px solid #2f5f86;
  border-radius: 16px;
  color: #f8fafc;
  background-color: #061a2e;
  background-image:
    linear-gradient(90deg, rgba(3, 20, 35, 0.91) 0%, rgba(4, 26, 45, 0.67) 48%, rgba(4, 26, 45, 0.18) 100%),
    linear-gradient(180deg, rgba(44, 137, 196, 0.08), rgba(6, 26, 46, 0.26)),
    url("assets/chemical-id-search-background-v2.webp");
  background-position: center, center, center 46%;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

.chemical-search-brand {
  position: relative;
  z-index: 1;
  width: min(235px, 50%);
}

.chemical-search-brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.chemical-search-brand .chemical-search-brand__white-hazmat,
.chemical-search-brand .chemical-search-brand__white-subtitle {
  position: absolute;
  inset: 0;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.chemical-search-brand .chemical-search-brand__white-hazmat {
  clip-path: inset(29% 18.5% 41% 25.5%);
}

.chemical-search-brand .chemical-search-brand__white-subtitle {
  clip-path: inset(58% 19% 30% 25.5%);
}

.chemical-search-hero-copy {
  position: relative;
  z-index: 1;
  padding-top: 4px;
}

.chemical-search-hero-copy h1 {
  max-width: 480px;
  margin: 0;
  color: #f8fafc;
  font-family: var(--hazmatiq-font-heading);
  font-size: clamp(2rem, 3.2vw, 3.35rem);
  font-weight: 850;
  letter-spacing: 0.025em;
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.55);
}

#lookup .chemical-id-search-content {
  position: relative;
  z-index: 3;
  width: min(980px, 100%);
  margin: 0;
  padding: 10px;
  border: 1px solid #39739e;
  border-radius: 12px;
  color: #f8fafc;
  background: rgba(229, 231, 235, 0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(7px);
}

#lookup .chemical-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 132px);
  gap: 12px;
}

#lookup .chemical-search-input-wrap::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  border: 3px solid #0b1f33;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

#lookup .chemical-search-input-wrap::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(50% + 7px);
  left: 31px;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: #0b1f33;
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

#lookup .chemical-id-search-card #chemical-search {
  min-height: 48px;
  padding: 11px 15px 11px 48px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #0b1f33;
  background: #f1f5f9;
  font-size: 0.92rem;
}

#lookup .chemical-id-search-card #chemical-search:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(var(--gold-rgb), 0.42);
  outline-offset: 1px;
}

#lookup .chemical-id-search-card #chemical-search::placeholder { color: #64748b; opacity: 1; }

#lookup #chemical-lookup-btn {
  min-height: 48px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: #071f36;
  background: linear-gradient(180deg, var(--gold), var(--gold));
  font-size: 1rem;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(var(--gold-rgb), 0.28);
}

#lookup #save-my-chemical-btn { display: none; }

.chemical-search-examples {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 9px;
  padding-top: 8px;
  overflow-x: auto;
  border-top: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.68rem;
  scrollbar-width: none;
}

.chemical-search-examples button {
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid #244d6e;
  border-radius: 999px;
  color: #0b1f33;
  background: #f8fafc;
  font-size: 0.66rem;
  white-space: nowrap;
  cursor: pointer;
}

.chemical-search-assurance-grid small,
.chemical-search-trust-grid small {
  display: block;
  color: #9eb7cb;
  font-size: clamp(0.57rem, 0.7vw, 0.7rem);
  line-height: 1.35;
}

.chemical-search-assurance-grid,
.chemical-search-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px 10px;
  border: 1px solid #2f5f86;
  border-radius: 9px;
  background: rgba(5, 29, 49, 0.95);
}

.chemical-search-assurance-grid article,
.chemical-search-trust-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid rgba(47, 95, 134, 0.55);
}

.chemical-search-assurance-grid article:last-child,
.chemical-search-trust-grid article:last-child { border-right: 0; }

.chemical-search-assurance-grid article > span,
.chemical-search-trust-grid article > span {
  color: #53a9ff;
  font-size: 1.8rem;
  line-height: 1;
}

.chemical-search-assurance-grid article:first-child > span { color: var(--gold); }
.chemical-search-assurance-grid strong,
.chemical-search-trust-grid strong { display: block; font-size: 0.72rem; }

#lookup.active > #chemical-id-results {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow: visible;
  border: 1px solid #2f5f86;
  border-radius: 16px;
  color: #f8fafc;
  background: #061a2e;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

#chemical-id-results .chemical-profile-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  height: auto;
  margin: 0;
}

#chemical-id-results .chemical-profile-toolbar {
  grid-template-columns: auto minmax(140px, 1fr) auto;
  min-height: 40px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #061a2e;
}

#chemical-id-results .chemical-profile-toolbar-actions {
  gap: 6px;
  padding: 0;
  background: transparent;
}

#chemical-id-results #open-guided-response-btn {
  border-color: #70d59b;
  color: #fff;
  background: #2e7d4f;
}

#chemical-id-results #open-guided-response-btn:hover,
#chemical-id-results #open-guided-response-btn:focus-visible {
  border-color: #9aebba;
  background: #38965f;
}

.hazard-profile-page .chemical-profile-export-menu {
  position: relative;
}

#chemical-id-results .chemical-profile-export-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: 190px;
  padding: 6px;
  border: 1px solid #39739e;
  border-radius: 7px;
  background: #061a2e;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
}

#chemical-id-results .chemical-profile-export-options[hidden] {
  display: none;
}

#chemical-id-results .chemical-profile-export-options button {
  width: 100%;
  min-height: 34px;
  border-color: transparent;
  color: #071f36;
  background: #d7dce1;
  text-align: left;
}

#chemical-id-results .chemical-profile-export-options button:hover,
#chemical-id-results .chemical-profile-export-options button:focus-visible {
  border-color: #2f5f86;
  color: #071f36;
  background: #e5e7eb;
}

#chemical-id-results #profile-export-btn {
  border-color: #9aa7b3;
  color: #071f36;
  background: #d7dce1;
}

#chemical-id-results #profile-export-btn:hover,
#chemical-id-results #profile-export-btn:focus-visible {
  border-color: #2f5f86;
  color: #071f36;
  background: #e5e7eb;
}

#chemical-id-results #chemical-profile-print-export-btn {
  border: 1px solid #9aa7b3;
  color: #172536;
  background: #d7dce1;
}

#chemical-id-results #chemical-profile-print-export-btn:hover,
#chemical-id-results #chemical-profile-print-export-btn:focus-visible {
  border-color: #2f5f86;
  color: #071f36;
  background: #f1f4f6;
  outline: 2px solid rgba(46, 140, 255, 0.35);
  outline-offset: 2px;
}

.chemical-profile-print-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid #55718a;
  border-radius: 16px;
  color: #102a43;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(2, 15, 27, 0.38);
}

.chemical-profile-print-dialog::backdrop {
  background: rgba(3, 17, 30, 0.7);
}

.chemical-profile-print-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.chemical-profile-print-heading h2,
.chemical-profile-print-form p {
  margin: 0;
}

.chemical-profile-print-heading h2 {
  color: #102a43;
  font-family: var(--hazmatiq-font-heading);
  font-size: 1.35rem;
}

.chemical-profile-print-instructions,
.chemical-profile-print-status {
  color: #425466;
  line-height: 1.45;
}

.chemical-profile-print-form fieldset {
  display: grid;
  gap: 8px;
  min-inline-size: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #c7d1db;
  border-radius: 12px;
}

.chemical-profile-print-form legend {
  padding-inline: 5px;
  color: #102a43;
  font-weight: 800;
}

.chemical-profile-print-pages {
  display: grid;
  gap: 6px;
  padding-left: 24px;
}

.chemical-profile-print-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #d5dde5;
  border-radius: 9px;
  color: #102a43;
  background: #fff;
  cursor: pointer;
}

.chemical-profile-print-option:hover,
.chemical-profile-print-option:focus-within {
  border-color: #2f5f86;
  background: #eef5fa;
}

.chemical-profile-print-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #24597f;
}

.chemical-profile-print-option span {
  display: grid;
  gap: 2px;
  line-height: 1.3;
}

.chemical-profile-print-option small {
  color: #5b6876;
  font-size: 0.8rem;
}

.chemical-profile-print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.chemical-profile-print-root {
  display: none;
}

#chemical-id-results .chemical-profile-toolbar button {
  min-height: 30px;
  padding: 5px 9px;
  border-color: #2f5f86;
  border-radius: 5px;
  font-size: 0.64rem;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-header-card {
  grid-template-columns: minmax(118px, 17%) minmax(0, 1fr) minmax(165px, 24%);
  grid-template-areas:
    "placard heading hazard"
    "placard summary hazard"
    "placard meta hazard";
  gap: 5px 14px;
  min-height: 172px;
  padding: 10px 12px;
  border-radius: 8px;
}

#chemical-id-results .chemical-nfpa-placard {
  min-width: 0;
  padding: 6px;
  border-color: #204f72;
  border-radius: 6px;
  background: rgba(4, 24, 42, 0.72);
}

#chemical-id-results .chemical-nfpa-placard figcaption { display: none; }
#chemical-id-results .chemical-nfpa-placard small {
  font-size: 0.76rem;
  line-height: 1.35;
}

#chemical-id-results .chemical-nfpa-placard small:empty { display: none; }

#chemical-id-results .chemical-nfpa-placard[data-state="missing"] small::before {
  content: "NFPA 704: ";
}

#chemical-id-results .nfpa-704-diamond {
  grid-template-columns: repeat(2, 46px);
  grid-template-rows: repeat(2, 46px);
}

#chemical-id-results .nfpa-704-cell > b { font-size: 1.4rem; }

#chemical-id-results .chemical-profile-header-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

#chemical-id-results .chemical-profile-header-top > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#chemical-id-results .chemical-profile-header-top .eyebrow { display: none; }

#chemical-id-results #chemical-name {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-status-chip {
  min-height: 22px;
  padding: 2px 7px;
  color: #8ce3a9;
  border-color: #2e7d4f;
  border-radius: 4px;
  background: rgba(24, 88, 52, 0.38);
  font-size: 0.55rem;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-summary {
  margin: 0;
  color: #d4e0eb;
  font-size: 0.9rem;
  line-height: 1.5;
}

#chemical-id-results .chemical-profile-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

#chemical-id-results .chemical-profile-meta-item {
  display: grid;
  grid-template-rows: auto minmax(2.4rem, 1fr);
  align-items: start;
  min-width: 0;
  min-height: 82px;
  padding: 8px 6px;
  border: 1px solid #2f5f86;
  border-radius: 5px;
  background: #0a2943;
  text-align: center;
}

#chemical-id-results .chemical-profile-meta-title,
#chemical-id-results .chemical-profile-meta-value { display: block; }

#chemical-id-results .chemical-profile-meta-title {
  align-self: start;
  text-align: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-meta-value {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin-top: 0;
  text-align: center;
  overflow-wrap: anywhere;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.35;
}

#chemical-id-results .chemical-profile-meta-item[data-field="un-na"] .chemical-profile-meta-value {
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 400;
}

#chemical-id-results .chemical-profile-meta-item[data-field="erg-guide"] .chemical-profile-meta-value {
  color: #ff8a1c;
  font-size: 1.35rem;
  font-weight: 400;
}

#chemical-id-results .chemical-profile-meta-item[data-field="ppe-recommendation"] {
  grid-column: span 2;
}

#chemical-id-results .chemical-profile-meta-item[data-field="ppe-recommendation"] .chemical-profile-meta-value {
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
}

.chemical-hazard-overview {
  grid-area: hazard;
  align-self: stretch;
  min-width: 0;
  padding: 10px;
  border: 1px solid #2f5f86;
  border-radius: 7px;
  background: rgba(4, 24, 42, 0.75);
}

.chemical-hazard-overview > strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chemical-hazard-overview ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chemical-hazard-overview li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  color: #e3edf6;
  font-size: 0.86rem;
  line-height: 1.45;
}

.hazard-profile-page .chemical-hazard-overview .chemical-profile-icon {
  width: 17px;
  height: 17px;
  color: var(--gold);
}

#chemical-id-results .chemical-profile-layout {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 0;
  background: transparent;
}

#chemical-id-results .chemical-profile-tabs {
  position: static;
  grid-template-columns: repeat(8, minmax(88px, 1fr));
  gap: 2px;
  padding: 0;
  overflow-x: auto;
  border-radius: 6px;
  background: #082943;
}

#chemical-id-results .chemical-profile-tab {
  min-height: 35px;
  padding: 5px 4px;
  border: 0;
  border-radius: 5px;
  color: #d5e3ef;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-tab .chemical-profile-icon { display: none; }

#chemical-id-results .chemical-profile-tab.active {
  color: #071f36;
  background: linear-gradient(180deg, var(--gold), var(--gold));
}

#chemical-id-results .chemical-profile-content-card,
#chemical-id-results .chemical-profile-content {
  min-height: 0;
  height: 100%;
}

#chemical-id-results .chemical-profile-content,
#chemical-id-results .chemical-profile-content[data-active-tab="overview"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  max-height: none;
  padding: 14px;
  overflow-y: visible;
  border: 0;
  background: #e5e7eb;
}

#chemical-id-results .chemical-profile-content[data-active-tab="properties"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#chemical-id-results .chemical-profile-content[data-active-tab="properties"] > [data-section="chemical-properties"] {
  grid-column: 1;
}

#chemical-id-results .chemical-profile-content[data-active-tab="properties"] > [data-section="flammability-energy"] {
  grid-column: 2;
}

#chemical-id-results .chemical-profile-content[data-active-tab="properties"] > [data-section="synonyms-notes"] {
  grid-column: 3;
}

#chemical-id-results .chemical-profile-content[data-active-tab="properties"] > [data-section="reactivity"] {
  grid-column: 1 / -1;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] {
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
  align-items: stretch;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="isolation-distances"],
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="erg-notes"],
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-table,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-summary {
  grid-column: 1 / -1;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="fire-behavior"],
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="fire-response"] {
  grid-column: 1;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="reactivity-profile"],
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="stability-and-decomposition"] {
  grid-column: 2;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="reactivity-profile"] .chemical-profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="reactivity-profile"] .chemical-profile-row {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  #chemical-id-results .chemical-profile-content[data-active-tab="response"] {
    grid-template-columns: 1fr;
  }

  #chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section],
  #chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-table,
  #chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-summary {
    grid-column: 1;
  }

  #chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section="reactivity-profile"] .chemical-profile-grid {
    grid-template-columns: 1fr;
  }
}

#chemical-id-results .chemical-profile-section,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 11px;
  height: auto;
  min-height: 0;
  padding: 14px;
  border: 1px solid #2f5f86;
  border-top: 1px solid #2f5f86;
  border-radius: 7px;
  color: #f8fafc;
  background: linear-gradient(180deg, #0d2c47, #08243b);
  box-shadow: none;
}

#chemical-id-results .chemical-profile-section h4,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-section h4 {
  align-self: start;
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-section h4 .chemical-profile-icon {
  width: 21px;
  height: 21px;
  color: #fff;
}

#chemical-id-results .chemical-profile-grid {
  width: 100%;
  gap: 7px;
}

#chemical-id-results .chemical-profile-section > .chemical-profile-list,
#chemical-id-results .chemical-profile-section > .chemical-profile-grid,
#chemical-id-results .chemical-profile-section > .erg-profile-table-wrap {
  align-self: start;
  width: 100%;
  min-width: 0;
}

#chemical-id-results .chemical-profile-row,
#chemical-id-results .chemical-profile-list-row,
#chemical-id-results .chemical-profile-value-list li,
#chemical-id-results .chemical-treatment-column li,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list-row,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-value-list li,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-treatment-column li {
  min-height: 0;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid rgba(47, 95, 134, 0.38);
  border-radius: 0;
  color: #e5eef6;
  background: transparent;
  font-size: 0.9rem;
  line-height: 1.5;
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row > span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row strong,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-value-list,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list-row strong,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list-row span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list {
  color: #e5eef6;
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row > span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list-row strong {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
}

#chemical-id-results .chemical-profile-meta-title,
#chemical-id-results .chemical-treatment-column h5,
#chemical-id-results .chemical-hazard-overview > strong {
  color: #fff;
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row strong,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list-row span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-value-list,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-list {
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.5;
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row[data-field="primary-hazard"] > span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row[data-field="primary-hazard"] > strong {
  color: var(--gold);
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row[data-field="idlh"] > span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row[data-field="idlh"] > strong {
  color: #ff5a5f;
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row[data-field="erg-guide"] > span,
#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-row[data-field="erg-guide"] > strong {
  color: #ff8a1c;
}

#chemical-id-results .chemical-profile-list { gap: 7px; }

#chemical-id-results .chemical-profile-content[data-active-tab="overview"] .chemical-profile-list.compact-columns {
  grid-template-columns: 1fr;
}

#chemical-id-results .ppe-recommendation-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.ppe-recommendation-status {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: #071f36;
}

.ppe-recommendation-status > span {
  color: var(--yellow);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ppe-recommendation-status > strong {
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 400;
}

.ppe-recommendation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.ppe-recommendation-summary > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid #2f5f86;
  border-radius: 6px;
  background: #0a2943;
}

.ppe-recommendation-summary dt,
.ppe-recommendation-list-section h5 {
  margin: 0 0 3px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ppe-recommendation-summary dd { margin: 0; color: #f8fafc; font-size: 0.9rem; line-height: 1.45; }
.ppe-recommendation-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ppe-recommendation-list-section { min-width: 0; padding: 8px; border: 1px solid #2f5f86; border-radius: 6px; background: #0a2943; }
.ppe-recommendation-list-section ul { margin: 0; padding-left: 17px; color: #e5eef6; font-size: 0.86rem; line-height: 1.45; }
.ppe-recommendation-list-section li + li { margin-top: 3px; }

.ppe-source-details {
  border: 1px solid #2f5f86;
  border-radius: 6px;
  background: #071f36;
}

.ppe-source-details > summary { padding: 8px 10px; color: #fff; cursor: pointer; font-size: 0.84rem; font-weight: 800; }
.ppe-source-details-content { display: grid; gap: 7px; padding: 0 8px 8px; color: #e5eef6; }
.ppe-recommendation-disclaimer { margin: 0; color: #dce6ee; font-size: 0.78rem; line-height: 1.45; }

#chemical-id-results .chemical-profile-source-summary {
  order: 50;
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-radius: 7px;
  color: #aebfd0;
  background: #08243b;
  font-size: 0.8rem;
  line-height: 1.45;
}

#chemical-id-results .chemical-profile-source-summary p { color: #8fa8bd; }

#chemical-id-results .chemical-profile-source-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(150px, 1fr));
  gap: 8px;
  margin: 9px 0 0;
}

#chemical-id-results .chemical-profile-source-status-grid > div {
  min-width: 0;
  padding: 8px 10px;
  border-left: 1px solid #2f5f86;
}

#chemical-id-results .chemical-profile-source-status-grid > div:first-child { border-left: 0; }

#chemical-id-results .chemical-profile-source-status-grid dt {
  color: #8fbcea;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-source-status-grid dd {
  margin: 3px 0 0;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 400;
}

@media (min-width: 1200px) {
  .layout:has(#lookup.active) #lookup.active:has(#chemical-id-results:not([hidden])) {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 10px;
    overflow: visible;
    background: #e5e7eb;
  }

  #lookup.active:has(#chemical-id-results:not([hidden])) > .chemical-id-search-card {
    width: 100%;
    height: auto;
    min-height: 280px;
    border-radius: 16px;
  }

  #lookup.active:has(#chemical-id-results:not([hidden])) > #chemical-id-results {
    width: 100%;
    height: auto;
    min-height: 0;
    border-radius: 16px;
  }
}

@media (max-width: 1199px) {
  #lookup.active {
    display: flex;
    flex-direction: column;
  }

  #lookup.active > .chemical-id-search-card,
  #lookup.active > #chemical-id-results { min-height: auto; }
  #chemical-id-results .chemical-profile-shell { height: auto; }
  #chemical-id-results .chemical-profile-content { max-height: none; }
}

@media (max-width: 900px) {
  #chemical-id-results .chemical-profile-toolbar { grid-template-columns: 1fr; }
  #chemical-id-results .chemical-profile-toolbar-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
  #chemical-id-results .chemical-profile-export-menu,
  #chemical-id-results .chemical-profile-export-menu > button { width: 100%; }
}

/* Hazard Profile runtime layout contract. Keep this final and right-panel
   scoped so older responsive rules cannot detach the NFPA placard or collapse
   the tab workspace after a search result is rendered. */
#chemical-id-results[hidden] { display: none !important; }
#chemical-id-results:not([hidden]) {
  display: block;
  min-width: 0;
  min-height: 0;
}

#chemical-id-results .chemical-results-header { display: none !important; }

#chemical-id-results .chemical-profile-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  grid-template-areas:
    "profile-toolbar"
    "profile-identity"
    "profile-workspace"
    "profile-footer" !important;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#chemical-id-results .chemical-profile-toolbar { grid-area: profile-toolbar; }

#chemical-id-results .chemical-profile-header-card {
  grid-area: profile-identity;
  display: grid !important;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

#chemical-id-results .chemical-nfpa-placard {
  grid-area: placard !important;
  position: static !important;
  inset: auto !important;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 150px;
  margin: 0 !important;
}

#chemical-id-results .chemical-profile-header-top { grid-area: heading !important; }
#chemical-id-results .chemical-profile-summary { grid-area: summary !important; }
#chemical-id-results .chemical-profile-meta { grid-area: meta !important; }
#chemical-id-results .chemical-hazard-overview { grid-area: hazard !important; }

#chemical-id-results .chemical-profile-layout {
  grid-area: profile-workspace;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#chemical-id-results .chemical-profile-tabs {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 0;
  min-height: 40px;
  overflow-x: auto;
  overflow-y: hidden;
}

#chemical-id-results .chemical-profile-content-card {
  display: block !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#chemical-id-results .chemical-profile-content {
  display: grid !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

#chemical-id-results .chemical-profile-footer { grid-area: profile-footer; }

@media (min-width: 901px) {
  #chemical-id-results .chemical-profile-header-card {
    grid-template-columns: minmax(118px, 16%) minmax(0, 1fr) minmax(175px, 25%) !important;
    grid-template-areas:
      "placard heading hazard"
      "placard summary hazard"
      "placard meta hazard" !important;
    align-items: stretch;
    gap: 5px 12px;
  }
}

@media (max-width: 900px) {
  #chemical-id-results .chemical-profile-shell {
    height: auto;
    min-height: 720px;
    overflow: visible;
  }

  #chemical-id-results .chemical-profile-header-card {
    grid-template-columns: minmax(104px, 140px) minmax(0, 1fr) !important;
    grid-template-areas:
      "placard heading"
      "placard summary"
      "meta meta"
      "hazard hazard" !important;
  }

  #chemical-id-results .chemical-profile-layout,
  #chemical-id-results .chemical-profile-content-card { min-height: 480px; }
}

@media (max-width: 760px) {
  #lookup.active > .chemical-id-search-card { padding-inline: 18px; }
  .chemical-search-brand { width: min(285px, 80%); }
  .chemical-search-assurance-grid,
  .chemical-search-trust-grid { grid-template-columns: 1fr 1fr; gap: 12px 0; }
  .chemical-search-assurance-grid article:nth-child(2),
  .chemical-search-trust-grid article:nth-child(2) { border-right: 0; }
  #chemical-id-results .chemical-profile-header-card {
    grid-template-columns: 1fr;
    grid-template-areas: "placard" "heading" "summary" "meta" "hazard";
  }
  #chemical-id-results .chemical-profile-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #chemical-id-results .chemical-profile-content,
  #chemical-id-results .chemical-profile-content[data-active-tab="overview"],
  #chemical-id-results .chemical-profile-content[data-active-tab="properties"] { grid-template-columns: 1fr; }

  #chemical-id-results .chemical-profile-content[data-active-tab="properties"] > [data-section] {
    grid-column: 1;
  }

  .ppe-recommendation-summary,
  .ppe-recommendation-support { grid-template-columns: 1fr; }

  #chemical-id-results .chemical-profile-source-status-grid { grid-template-columns: 1fr; }
  #chemical-id-results .chemical-profile-source-status-grid > div {
    padding-inline: 0;
    border-left: 0;
  }
}

/* Hazard ID command console — cinematic single-search workspace. */
.layout:has(#lookup.active) > .content-area,
.layout:has(#lookup.active) #lookup.active {
  width: 100%;
  min-width: 0;
  background: #071a2e;
}

.layout:has(#lookup.active) #lookup.active {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: max-content max-content max-content max-content !important;
  align-content: start;
  gap: clamp(18px, 2vw, 28px) !important;
  padding: 0 10px 10px !important;
}

#lookup > .hazard-id-page-hero {
  grid-column: 1 !important;
  grid-row: 1 !important;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: clamp(140px, 13vw, 180px) !important;
  margin: 0 !important;
  padding: clamp(18px, 2.5vw, 36px) !important;
  overflow: hidden;
  border: 1px solid rgba(72, 130, 174, 0.72) !important;
  border-radius: 18px;
  background-image:
    linear-gradient(90deg, rgba(3, 17, 31, 0.98) 0%, rgba(4, 27, 47, 0.82) 42%, rgba(5, 30, 49, 0.2) 72%),
    url("assets/hazard-id-level-b-hero-v2.webp") !important;
  background-position: center, center 56% !important;
  background-size: cover !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#lookup > .hazard-id-page-hero::before {
  z-index: 0;
  inset: -30px;
  background-image:
    linear-gradient(rgba(105, 174, 225, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 174, 225, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.64) 56%, transparent 88%);
  animation: hazardBlueprintDrift 40s linear infinite;
}

#lookup > .hazard-id-page-hero::after {
  display: block;
  z-index: 0;
  inset: -30% -10%;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 74% 44%, rgba(95, 184, 255, 0.2), transparent 26%);
  box-shadow: none;
  content: "";
  transform: none;
  animation: hazardHeroLight 16s ease-in-out infinite alternate;
}

.hazard-id-hero-atmosphere {
  position: absolute;
  z-index: 1;
  inset: -20%;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.44) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(var(--gold-rgb), 0.34) 0 1px, transparent 1.8px);
  background-position: 0 0, 42px 66px;
  background-size: 94px 94px, 137px 137px;
  opacity: 0.2;
  animation: hazardParticleDrift 30s linear infinite;
  pointer-events: none;
}

#lookup > .hazard-id-page-hero .hazmat-page-hero-content {
  position: relative;
  z-index: 2;
  display: block;
  width: min(620px, 58%);
  margin: 0;
  text-align: left;
}

#lookup > .hazard-id-page-hero .hazmat-hero-title {
  margin: 0;
  color: #fff;
  font-family: Impact, "Agency FB", "DIN Condensed", "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
  font-weight: 950;
  letter-spacing: 0.075em;
  line-height: 0.88;
  text-align: left;
  text-shadow: 4px 5px 0 rgba(1, 12, 22, 0.94), 0 0 24px rgba(65, 155, 226, 0.3);
  transform: skewX(-5deg) scaleX(0.95);
  transform-origin: left center;
}

#lookup > .hazard-id-page-hero .hazmat-hero-subtitle {
  display: flex;
  justify-content: space-between;
  gap: clamp(8px, 1.4vw, 22px);
  width: min(100%, 520px);
  margin: 10px 0 0;
  color: var(--gold) !important;
  font: 900 clamp(1.05rem, 1.6vw, 1.45rem)/1.05 "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.9);
}

#lookup > .hazard-id-command-console.chemical-id-search-card {
  grid-column: 1 !important;
  grid-row: 2 !important;
  display: grid !important;
  grid-template-rows: auto auto auto;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
  border: 1px solid #315f82;
  border-radius: 16px;
  background: #061a2e !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hazard-search-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #315f82;
  background: rgba(3, 23, 40, 0.74);
}

.hazard-search-tab {
  min-height: 54px;
  padding: 11px 18px;
  border: 0;
  border-right: 1px solid #315f82;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: 900 clamp(1rem, 1.5vw, 1.3rem)/1 var(--hazmatiq-font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.hazard-search-tab:last-child { border-right: 0; }
.hazard-search-tab:hover,
.hazard-search-tab:focus-visible { background: rgba(46, 140, 255, 0.12); box-shadow: inset 0 -3px 0 #6bb8ff; }
.hazard-search-tab.active { background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.2), rgba(var(--gold-rgb), 0.06)); color: var(--gold); box-shadow: inset 0 -4px 0 var(--gold), 0 0 22px rgba(var(--gold-rgb), 0.08); }

.hazard-search-command-body {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 2vw, 26px);
}

.hazard-search-mode-copy { display: grid; gap: 5px; }
.hazard-search-mode-copy .eyebrow { margin: 0; color: var(--gold); font-size: 0.83rem; font-weight: 900; letter-spacing: 0.16em; }
.hazard-search-mode-copy h2 { margin: 0; color: #fff; font-size: clamp(1.5rem, 2.2vw, 2rem); }
.hazard-search-mode-copy > p:last-child { margin: 0; color: #fff; font-size: 1rem; line-height: 1.5; }

#lookup .hazard-unified-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

#lookup .hazard-unified-search-form .chemical-search-input-wrap::before,
#lookup .hazard-unified-search-form .chemical-search-input-wrap::after {
  content: none;
  display: none;
}

#lookup .hazard-unified-search-form #chemical-search {
  width: 100%;
  min-height: 74px;
  padding: 16px 22px;
  border: 2px solid #417ca8;
  border-radius: 13px;
  background: #f1f5f9;
  color: #071f36;
  caret-color: #071f36;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 700;
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.38);
}

#lookup .hazard-unified-search-form #chemical-search::placeholder { color: #334155; opacity: 1; }
#lookup .hazard-unified-search-form #chemical-search:focus { border-color: var(--gold); outline: 3px solid rgba(var(--gold-rgb), 0.18); }
#lookup .hazard-unified-search-form > .primary-btn {
  min-width: 176px;
  min-height: 74px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold), var(--gold));
  color: #171006;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 -5px 0 var(--gold), 0 6px 0 var(--gold), 0 12px 22px rgba(var(--gold-rgb), 0.24);
}

#lookup .hazard-unified-search-form > .primary-btn:hover,
#lookup .hazard-unified-search-form > .primary-btn:focus-visible {
  box-shadow: inset 0 -5px 0 var(--gold), 0 8px 0 var(--gold), 0 0 0 3px rgba(var(--gold-rgb), 0.18), 0 0 28px rgba(var(--gold-rgb), 0.35);
  transform: translateY(-2px);
}

#lookup .hazard-unified-search-form > .primary-btn:active {
  box-shadow: inset 0 -3px 0 var(--gold), 0 2px 0 var(--gold), 0 5px 12px rgba(var(--gold-rgb), 0.2);
  transform: translateY(3px);
}

#lookup .hazard-search-examples { min-height: 34px; color: #fff; font-size: 1rem; }
#lookup .hazard-search-examples button {
  min-height: 34px;
  padding: 6px 12px;
  border: 2px solid #477c9f;
  border-bottom-width: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #123f62, #09233b);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 3px 0 #041522, 0 6px 12px rgba(2, 15, 29, .24);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
#lookup .hazard-search-examples button:hover,
#lookup .hazard-search-examples button:focus-visible {
  border-color: #79c7ef;
  background: linear-gradient(180deg, #1b527d, #0d3151);
  box-shadow: 0 4px 0 #041522, 0 0 0 2px rgba(121, 199, 239, .16), 0 8px 16px rgba(2, 15, 29, .3);
  outline: none;
  transform: translateY(-1px);
}
#lookup .hazard-search-examples button:active {
  box-shadow: 0 1px 0 #041522, 0 3px 7px rgba(2, 15, 29, .25);
  transform: translateY(2px);
}
#lookup .chemical-search-status { min-height: 24px; margin: 0; color: #fff; font-size: 1rem; }

#lookup .hazard-unified-suggestions {
  z-index: 20;
  top: calc(100% + 7px);
  max-height: 410px;
  overflow-y: auto;
  border: 1px solid #3e769f;
  border-radius: 11px;
  background: #071f35;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48);
  animation: hazardResultsIn 180ms ease-out;
}

#lookup .hazard-unified-suggestions .hazard-search-result-card { min-height: 82px; padding: 13px 16px; border: 0; border-bottom: 1px solid #2c5879; border-radius: 0; background: #0c2742; }
#lookup .hazard-unified-suggestions .hazard-search-result-card strong { color: #fff; font-size: 1rem; }
#lookup .hazard-unified-suggestions .hazard-search-result-card small { color: #fff; font-size: 0.82rem; }

.hazard-workflow-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid #315f82;
  list-style: none;
}

.hazard-workflow-rail li {
  position: relative;
  padding: 15px 28px 15px 18px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-align: center;
  text-transform: uppercase;
}
.hazard-workflow-rail li:not(:last-child)::after { position: absolute; top: 50%; right: -6px; color: var(--gold); content: "›"; font-size: 1.65rem; transform: translateY(-54%); }

#lookup > .hazard-id-empty-profile,
#lookup > #chemical-id-results,
#lookup > .hazard-profile-results {
  grid-column: 1 !important;
  grid-row: 3 !important;
  width: 100% !important;
  margin: 0 !important;
  animation: hazardProfileIn 300ms ease-out;
}

#lookup > #facility-inventory { grid-column: 1 !important; grid-row: 4 !important; }

#lookup .hazard-id-empty-profile {
  min-height: 380px;
  padding: 44px;
  border: 1px solid #315f82;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 44%, rgba(46, 140, 255, 0.16), transparent 27%),
    linear-gradient(145deg, #0c2742, #061d32);
  color: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

#lookup .hazard-id-empty-profile > span { width: 112px; height: 112px; border: 2px solid var(--gold); background: repeating-radial-gradient(circle, rgba(46, 140, 255, 0.14) 0 9px, transparent 10px 18px); color: var(--gold); font-size: 2.25rem; box-shadow: 0 0 38px rgba(46, 140, 255, 0.3); transform: rotate(45deg); }
#lookup .hazard-id-empty-profile > span::first-letter { transform: rotate(-45deg); }
#lookup .hazard-id-empty-profile .eyebrow { color: var(--gold); font-size: 1rem; letter-spacing: 0.16em; }
#lookup .hazard-id-empty-profile h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.7rem); }
#lookup .hazard-id-empty-profile p:last-child { color: #fff; font-size: 1rem; }

#lookup .chemical-profile-shell { border-color: #315f82; border-radius: 16px; background: #071a2e; }
#lookup .chemical-profile-toolbar,
#lookup .hazard-profile-toolbar { position: sticky; z-index: 12; top: 0; border: 1px solid #315f82; border-radius: 11px; background: rgba(5, 27, 47, 0.96); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26); backdrop-filter: blur(12px); }
#lookup .chemical-profile-toolbar {
  position: static;
  z-index: auto;
  top: auto;
}
#lookup .hazard-profile-toolbar { grid-template-columns: auto 1fr auto; padding: 9px; }
.hazard-profile-page .hazard-profile-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#lookup .hazard-profile-toolbar-actions button { min-height: 46px; }
#lookup .hazard-profile-plume-btn { border-color: #ef4b52; background: linear-gradient(180deg, #dc2830, #a90e15); color: #fff; }
#lookup .chemical-profile-header-card,
#lookup .chemical-profile-content-card { border-color: #315f82; background: #0c2742; color: #fff; }
#lookup .chemical-profile-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#lookup .hazard-source-fact-card { border-color: #315f82; background: linear-gradient(150deg, #0d3151, #081f35); color: #fff; transition: transform 180ms ease, box-shadow 180ms ease; }
#lookup .hazard-source-fact-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); }
#lookup .hazard-source-fact-card p,
#lookup .hazard-source-fact-card small { color: #fff; font-size: 1rem; }

.app-shell:has(#lookup.active) .command-header { grid-template-rows: 200px 72px; }
.app-shell:has(#lookup.active) .command-header .hazmat-command-identity,
.app-shell:has(#lookup.active) .command-header .hazmat-command-identity .brand,
.app-shell:has(#lookup.active) .command-header .command-brand-home,
.app-shell:has(#lookup.active) .command-header .brand-logo-command {
  width: clamp(676px, 55vw, 1066px);
  height: 200px;
}

#lookup .chemical-profile-content-card p,
#lookup .chemical-profile-content-card li,
#lookup .chemical-profile-content-card dd { color: #fff; font-size: 1rem; }
#lookup .chemical-profile-content-card h3 { color: #fff; font-size: clamp(1.35rem, 2vw, 1.75rem); }

.hazard-profile-page .hazard-profile-limitations { padding: 16px 18px; border: 1px solid var(--gold); border-radius: 10px; background: rgba(var(--gold-rgb), 0.2); color: #fff; }
.hazard-profile-page .hazard-profile-limitations h3 { margin: 0 0 9px; color: var(--gold); }
.hazard-profile-page .hazard-profile-limitations ul { display: grid; gap: 7px; margin: 0; padding-left: 22px; }
.hazard-profile-page .hazard-profile-limitations li { color: #fff; font-size: 1rem; line-height: 1.45; }

@keyframes hazardBlueprintDrift { to { background-position: 76px 38px, 76px 38px; } }
@keyframes hazardParticleDrift { to { transform: translate3d(70px, -46px, 0); } }
@keyframes hazardHeroLight { from { opacity: 0.45; transform: translateX(-2%); } to { opacity: 0.9; transform: translateX(3%); } }
@keyframes hazardResultsIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hazardProfileIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .app-shell:has(#lookup.active) .command-header { grid-template-rows: 172px auto; }
  .app-shell:has(#lookup.active) .command-header .hazmat-command-identity,
  .app-shell:has(#lookup.active) .command-header .hazmat-command-identity .brand,
  .app-shell:has(#lookup.active) .command-header .command-brand-home,
  .app-shell:has(#lookup.active) .command-header .brand-logo-command { height: 172px; }
  #lookup > .hazard-id-page-hero { min-height: 140px !important; background-position: center, 62% 56% !important; }
  #lookup > .hazard-id-page-hero .hazmat-page-hero-content { width: min(540px, 72%); }
  #lookup .hazard-profile-toolbar { grid-template-columns: 1fr; }
  .hazard-profile-toolbar-actions { justify-content: stretch; }
  .hazard-profile-toolbar-actions button { flex: 1; }
}

@media (max-width: 620px) {
  .app-shell:has(#lookup.active) .command-header { grid-template-rows: 146px auto; }
  .app-shell:has(#lookup.active) .command-header .hazmat-command-identity,
  .app-shell:has(#lookup.active) .command-header .hazmat-command-identity .brand,
  .app-shell:has(#lookup.active) .command-header .command-brand-home,
  .app-shell:has(#lookup.active) .command-header .brand-logo-command { width: 100%; height: 146px; }
  #lookup > .hazard-id-page-hero { min-height: 112px !important; padding: 16px 20px !important; background-position: center, 68% center !important; }
  #lookup > .hazard-id-page-hero .hazmat-page-hero-content { width: 82%; }
  #lookup > .hazard-id-page-hero .hazmat-hero-title { font-size: 2.75rem; }
  #lookup > .hazard-id-page-hero .hazmat-hero-subtitle { gap: 7px; width: 100%; margin-top: 8px; font-size: 0.78rem; letter-spacing: 0.025em; }
  .hazard-search-tab { min-height: 58px; padding: 10px 6px; font-size: 0.78rem; }
  /* Maintain a wide query field and compact search action on narrow phones. */
  #lookup .hazard-unified-search-form {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 8px;
  }
  #lookup .hazard-unified-search-form .chemical-search-input-wrap { min-width: 0; }
  #lookup .hazard-unified-search-form #chemical-search {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  #lookup .hazard-unified-search-form > .primary-btn {
    width: 100%;
    min-width: 0;
    padding-inline: 4px;
    font-size: clamp(0.75rem, 3vw, 1rem);
    letter-spacing: 0.025em;
  }
  .hazard-workflow-rail { grid-template-columns: 1fr; }
  .hazard-workflow-rail li { padding: 9px; }
  .hazard-workflow-rail li:not(:last-child)::after { top: auto; right: 50%; bottom: -11px; transform: translateX(50%) rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  #lookup > .hazard-id-page-hero::before,
  #lookup > .hazard-id-page-hero::after,
  .hazard-id-hero-atmosphere,
  #lookup > .hazard-id-empty-profile,
  #lookup > #chemical-id-results,
  #lookup > .hazard-profile-results,
  #lookup .hazard-unified-suggestions { animation: none; }
}

@media print {
  body.printing-chemical-profile #incident-report-summary,
  body.printing-chemical-profile #incident-report-summary * {
    visibility: hidden;
  }

  body.printing-chemical-profile #chemical-id-results,
  body.printing-chemical-profile #chemical-id-results * {
    visibility: hidden !important;
  }

  body.printing-chemical-profile #chemical-profile-print-root,
  body.printing-chemical-profile #chemical-profile-print-root * {
    visibility: visible !important;
  }

  body.printing-chemical-profile #chemical-profile-print-root {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    color: #111;
    background: #fff;
    display: block !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-header {
    padding: 0 0 14px;
    border-bottom: 2px solid #111;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-eyebrow {
    margin: 0 0 3px;
    color: #333;
    font-size: 9pt;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.printing-chemical-profile #chemical-profile-print-root h1 {
    max-width: 100%;
    margin: 0 0 10px;
    color: #000;
    font-size: 24pt;
    line-height: 1.08;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.printing-chemical-profile #chemical-profile-print-root h2 {
    margin: 0 0 8px;
    color: #000;
    font-size: 15pt;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-identifiers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
    margin: 0 0 10px;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-identifiers div {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 7px;
    border-bottom: 1px solid #bbb;
    padding: 3px 0;
  }

  body.printing-chemical-profile #chemical-profile-print-root dt {
    color: #333;
    font-weight: 800;
  }

  body.printing-chemical-profile #chemical-profile-print-root dd {
    margin: 0;
    overflow-wrap: anywhere;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-summary,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-date {
    margin: 6px 0;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-overview {
    margin: 12px 0 0;
    padding: 8px 10px;
    border: 1px solid #777;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-overview ul {
    margin: 0;
    padding-left: 18px;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-content {
    display: block !important;
    margin: 0;
    padding: 0;
    color: #111;
    background: #fff;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-page {
    break-before: page;
    padding-top: 18px;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-page:first-child {
    break-before: auto;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-section,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-source-summary,
  body.printing-chemical-profile #chemical-profile-print-root .hybrid-decon-section {
    display: block !important;
    margin: 0 0 12px;
    padding: 9px 11px;
    border: 1px solid #777;
    border-top: 3px solid #111;
    border-radius: 0;
    color: #111;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-section h4,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-source-summary summary {
    color: #000;
    font-size: 11pt;
    font-weight: 800;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-row,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-list-row,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-value-list li,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-treatment-column li {
    color: #111;
    background: #fff;
    border-color: #bbb;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-row > span,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-list-row strong,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-list-row span,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-list,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-row strong {
    color: #111;
  }

  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-sources {
    display: grid;
    gap: 3px;
    margin-top: 18px;
    padding-top: 8px;
    border-top: 2px solid #111;
    color: #111;
    break-inside: avoid;
  }
}

/* Cross-platform plume actions use the responder-green schema. */
#lookup .hazard-profile-plume-btn,
#lookup #open-plume-btn {
  border-color: #238a4b !important;
  color: #fff !important;
  background: linear-gradient(180deg, #146733, #10552b) !important;
}

#lookup .hazard-profile-plume-btn:hover,
#lookup #open-plume-btn:hover {
  border-color: #5ed487 !important;
  background: linear-gradient(180deg, #35ac62, #1c7a42) !important;
}

/* HAZARD ID command workspace — the search stays live at left while the
   selected source-backed profile uses the full right side of the viewport. */
.hazard-id-hero-logo {
  display: block;
  width: clamp(170px, 19vw, 250px);
  height: auto;
  margin: 0 0 clamp(9px, 1.4vh, 16px);
  object-fit: contain;
  object-position: left center;
}

#lookup .chemical-results-header { display: none; }

#lookup #open-plume-btn {
  order: 20;
  margin-left: auto;
  border-color: var(--gold) !important;
  color: #07111c !important;
  background: linear-gradient(180deg, var(--gold), var(--gold)) !important;
  box-shadow: 0 0 18px rgba(var(--gold-rgb), 0.2);
}

#lookup #open-plume-btn:hover,
#lookup #open-plume-btn:focus-visible {
  border-color: var(--gold) !important;
  background: linear-gradient(180deg, var(--gold), var(--gold)) !important;
}

@media (min-width: 1181px) {
  .app-shell:has(#lookup.view.active) {
    height: 100dvh;
    min-height: 0;
    padding: var(--app-top-space, 8px);
    overflow: hidden;
    background: #020b14;
  }

  .app-shell:has(#lookup.view.active) > .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    height: 100%;
    min-height: 0;
  }

  .app-shell:has(#lookup.view.active) .content-area {
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  #lookup.view.active {
    display: grid !important;
    grid-template-columns: minmax(350px, 42%) minmax(0, 58%) !important;
    grid-template-rows: minmax(290px, 44%) minmax(0, 56%) !important;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 0;
    background:
      radial-gradient(circle at 77% 28%, transparent 0 82px, rgba(46, 140, 255, 0.075) 83px 84px, transparent 85px 142px, rgba(46, 140, 255, 0.055) 143px 144px, transparent 145px),
      linear-gradient(rgba(77, 152, 204, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(77, 152, 204, 0.045) 1px, transparent 1px),
      radial-gradient(circle at 74% 20%, rgba(23, 105, 166, 0.11), transparent 34%),
      linear-gradient(135deg, #010810, #031526 55%, #020b14);
    background-size: auto, 32px 32px, 32px 32px, auto, auto;
  }

  #lookup > .hazard-id-page-hero {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid;
    min-width: 0;
    min-height: 0 !important;
    height: 100%;
    margin: 0 !important;
    padding: clamp(16px, 2vw, 28px) !important;
    place-items: start;
    overflow: hidden;
    border: 0 !important;
    border-right: 1px solid rgba(49, 111, 154, 0.55) !important;
    border-bottom: 1px solid rgba(49, 111, 154, 0.55) !important;
    border-radius: 0;
    background:
      linear-gradient(90deg, rgba(2, 13, 24, 0.95) 0%, rgba(3, 22, 38, 0.75) 48%, rgba(3, 22, 38, 0.16) 100%),
      linear-gradient(0deg, rgba(2, 13, 24, 0.78), transparent 54%),
      url("assets/chemical-id-search-background-v2.webp") 62% center / cover no-repeat !important;
    box-shadow: none;
  }

  #lookup > .hazard-id-page-hero .hazmat-page-hero-content {
    z-index: 2;
    align-self: start;
    justify-self: start;
    width: min(92%, 520px);
    margin: 0;
    padding: 0;
    text-align: left;
  }

  #lookup > .hazard-id-page-hero .internal-command-title-row {
    justify-content: flex-start;
    width: 100%;
    margin: 0 0 10px;
  }

  #lookup > .hazard-id-page-hero .hazmat-hero-title {
    font-size: clamp(2.35rem, 3.8vw, 4.5rem);
    line-height: 0.92;
    white-space: nowrap;
  }

  #lookup > .hazard-id-page-hero .hazmat-hero-subtitle {
    justify-content: flex-start;
    gap: clamp(6px, 0.75vw, 12px);
    width: calc(100% - 84px);
    margin: 0 0 0 84px;
    color: #e7f1f9;
    font-size: clamp(0.62rem, 0.72vw, 0.82rem);
    line-height: 1.15;
    letter-spacing: 0.035em;
    white-space: nowrap;
    text-align: left;
  }

  #lookup > .hazard-id-command-console.chemical-id-search-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
    grid-template-rows: auto minmax(0, 1fr);
    align-self: stretch;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    border: 0;
    border-right: 1px solid rgba(49, 111, 154, 0.55);
    border-radius: 0;
    background: linear-gradient(155deg, rgba(5, 31, 51, 0.62), rgba(2, 14, 25, 0.4));
    box-shadow: none;
  }

  #lookup .hazard-search-tabs {
    min-height: 52px;
    border-bottom: 1px solid #235777;
    border-radius: 0;
    background: rgba(3, 19, 33, 0.62);
  }

  #lookup .hazard-search-tab {
    min-height: 52px;
    padding: 8px 6px;
    border-radius: 0;
    font-size: clamp(0.82rem, 0.9vw, 1.02rem);
    font-weight: 950;
    letter-spacing: 0.035em;
  }

  #lookup .hazard-search-tab.active,
  #lookup .hazard-search-tab[aria-selected="true"] {
    border-color: var(--gold) !important;
    color: #07111c !important;
    background: var(--gold-surface) !important;
    box-shadow: inset 0 -4px 0 var(--gold), 0 0 22px rgba(var(--gold-rgb), 0.22) !important;
  }

  #lookup .hazard-search-command-body {
    display: grid;
    align-content: start;
    gap: clamp(8px, 1vh, 12px);
    min-height: 0;
    height: auto;
    padding: clamp(13px, 1.6vw, 22px);
    overflow: visible;
  }

  #lookup .hazard-search-mode-copy {
    display: grid;
    gap: 5px;
  }

  #lookup .hazard-search-mode-copy > * { margin: 0; }
  #lookup .hazard-search-mode-copy h2 { font-size: clamp(1.35rem, 1.7vw, 2rem); }
  #lookup .hazard-search-mode-copy > p:last-child { font-size: clamp(0.78rem, 0.9vw, 0.95rem); line-height: 1.35; }

  #lookup .hazard-unified-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: calc(100% + 12px);
    margin-inline: -6px;
  }

  #lookup .hazard-unified-search-form input,
  #lookup .hazard-unified-search-form > .primary-btn {
    min-height: 44px;
  }

  #lookup .hazard-unified-search-form input { padding-block: 9px; }

  #lookup .hazard-search-examples {
    min-height: 0;
    gap: 4px;
    font-size: 0.76rem;
  }

  #lookup .hazard-search-examples button {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  #lookup .chemical-search-status {
    min-height: 18px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  #lookup > .hazard-id-empty-profile,
  #lookup > #chemical-id-results,
  #lookup > .hazard-profile-results,
  #lookup > #facility-inventory {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    align-self: stretch;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0 !important;
    border-radius: 0;
  }

  #lookup > .hazard-id-empty-profile {
    padding: clamp(30px, 5vw, 80px);
    border: 0;
    background:
      radial-gradient(circle at 50% 40%, rgba(46, 140, 255, 0.15), transparent 26%),
      linear-gradient(145deg, rgba(6, 30, 51, 0.48), rgba(2, 11, 20, 0.3));
  }

  #lookup > #facility-inventory {
    padding: clamp(18px, 2vw, 28px);
    overflow-y: auto;
    border: 0;
    background: rgba(5, 26, 44, 0.52);
  }

  #lookup > #chemical-id-results,
  #lookup > .hazard-profile-results {
    overflow: hidden;
    background: transparent;
  }

  #lookup .chemical-profile-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 7px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: linear-gradient(155deg, rgba(3, 23, 40, 0.44), rgba(2, 11, 20, 0.28));
  }

  #lookup .chemical-profile-toolbar {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) minmax(0, auto);
    gap: 8px;
    min-height: 42px;
    padding: 3px 5px;
  }

  #lookup .chemical-profile-toolbar > strong {
    align-self: center;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  #lookup .chemical-profile-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
  }

  #lookup .chemical-profile-toolbar button {
    min-height: 32px;
    padding: 5px 8px;
  }

  #lookup .chemical-profile-header-card {
    grid-template-columns: minmax(104px, 15%) minmax(0, 1fr) minmax(170px, 24%);
    grid-template-areas:
      "placard heading hazard"
      "placard summary hazard"
      "placard meta hazard";
    gap: 5px 12px;
    min-height: 0;
    padding: 9px 11px;
    overflow: hidden;
    border-radius: 8px;
  }

  #lookup .chemical-profile-meta-item {
    min-height: 58px;
    padding: 5px;
  }

  #lookup .chemical-profile-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #lookup .chemical-profile-meta-item[data-field="ppe-recommendation"] {
    grid-column: auto;
  }

  #lookup .chemical-profile-layout {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  #lookup .chemical-profile-tabs,
  #lookup .hazard-profile-tabs {
    grid-template-columns: repeat(7, minmax(92px, 1fr)) !important;
    gap: 2px;
  }

  #lookup .chemical-profile-content-card {
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 8px;
    overflow: hidden;
  }

  #lookup .chemical-profile-content {
    height: 100%;
    min-height: 0;
    padding: 2px 4px 8px 2px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  #lookup .chemical-profile-content[data-active-tab="overview"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
  }

  #lookup .chemical-profile-content .chemical-profile-section {
    min-width: 0;
    padding: 11px;
  }

}

@media (max-width: 1180px) {
  .hazard-id-hero-logo {
    width: clamp(170px, 36vw, 260px);
    margin-bottom: 12px;
  }

  #lookup.view.active {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto;
    overflow: visible;
  }

  #lookup > .hazard-id-page-hero,
  #lookup > .hazard-id-command-console.chemical-id-search-card,
  #lookup > .hazard-id-empty-profile,
  #lookup > #chemical-id-results,
  #lookup > .hazard-profile-results,
  #lookup > #facility-inventory {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #lookup > .hazard-id-page-hero {
    min-height: 270px !important;
    place-items: start;
  }

  #lookup > .hazard-id-page-hero .hazmat-page-hero-content { align-self: start; }
  #lookup > .hazard-id-page-hero .hazmat-hero-subtitle { margin-left: 66px; }

  #lookup > .hazard-id-command-console.chemical-id-search-card {
    width: 100%;
    margin: 0 !important;
  }

  #lookup > .hazard-id-empty-profile,
  #lookup > #chemical-id-results,
  #lookup > .hazard-profile-results,
  #lookup > #facility-inventory {
    width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 700px) {
  .hazard-id-hero-logo { width: 168px; }
  #lookup > .hazard-id-page-hero { min-height: 235px !important; padding: 18px !important; }
  #lookup > .hazard-id-page-hero .hazmat-hero-title { font-size: clamp(2.15rem, 11vw, 3.2rem); }
  #lookup > .hazard-id-page-hero .hazmat-hero-subtitle { margin-left: 0; }
  #lookup .chemical-profile-toolbar { grid-template-columns: 1fr; }
  #lookup .chemical-profile-toolbar > strong { grid-row: 1; }
  #lookup .chemical-profile-toolbar-actions { justify-content: stretch; }
  #lookup .chemical-profile-toolbar-actions > * { flex: 1 1 140px; }
  #lookup #open-plume-btn { margin-left: 0; }
}

/* Selected Hazard ID database lane: consistent HazMatIQ gold at every width. */
#lookup .hazard-search-tab.active,
#lookup .hazard-search-tab[aria-selected="true"] {
  border-color: var(--gold) !important;
  color: #07111c !important;
  background: var(--gold-surface) !important;
  box-shadow: inset 0 -4px 0 var(--gold), 0 0 22px rgba(var(--gold-rgb), 0.22) !important;
}

/* Make the three Hazard ID lanes read as interactive search controls rather
   than a decorative banner. Each lane owns a clear frame and keeps its active
   state unmistakable without changing the tab structure or behavior. */
#lookup .hazard-search-tabs {
  gap: 8px;
  padding: 8px;
  border-bottom: 0;
  background: #061a2e !important;
}

#lookup .hazard-search-tab {
  box-sizing: border-box;
  min-height: 64px;
  border: 3px solid #477c9f !important;
  border-radius: 8px;
  background: linear-gradient(180deg, #123f62, #09233b);
  color: #e8f4fb;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(190, 232, 252, .2), 0 5px 0 #041522, 0 10px 18px rgba(2, 15, 29, .28);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#lookup .hazard-search-tab:hover,
#lookup .hazard-search-tab:focus-visible {
  border-color: #79c7ef !important;
  background: linear-gradient(180deg, #1b527d, #0d3151);
  color: #fff;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(221, 243, 255, .24), 0 7px 0 #041522, 0 0 0 2px rgba(121, 199, 239, .18), 0 12px 22px rgba(2, 15, 29, .34);
  transform: translateY(-2px);
}

#lookup .hazard-search-tab.active,
#lookup .hazard-search-tab[aria-selected="true"] {
  border: 3px solid var(--gold) !important;
  background: linear-gradient(180deg, var(--gold), var(--gold)) !important;
  color: #07111c !important;
  box-shadow: inset 0 -5px 0 var(--gold), 0 5px 0 var(--gold), 0 0 0 2px rgba(var(--gold-rgb), .16), 0 10px 20px rgba(var(--gold-rgb), .24) !important;
  transform: translateY(0);
}

#lookup .hazard-search-tab:active {
  box-shadow: inset 0 -3px 0 var(--gold), 0 2px 0 var(--gold), 0 5px 10px rgba(2, 15, 29, .26) !important;
  transform: translateY(3px);
}

/* Right-side Hazard Profile panel only — shared Chemical, CBRNE/CWA, and
   Radiological intelligence dashboard. The left search column is untouched. */
#chemical-id-results,
#hazard-profile-results,
#lookup > .hazard-id-empty-profile {
  color: #f8fafc;
  background:
    radial-gradient(circle at 78% 18%, rgba(46, 140, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(3, 15, 28, 0.98), rgba(6, 26, 46, 0.96), rgba(11, 31, 51, 0.98));
}

#chemical-id-results .chemical-profile-shell {
  gap: 7px;
  background: transparent;
}

#chemical-id-results .chemical-profile-shell {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

#chemical-id-results .chemical-profile-toolbar,
#hazard-profile-results .hazard-profile-toolbar {
  position: static;
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 6px;
  border: 1px solid rgba(64, 107, 145, 0.85);
  border-radius: 7px;
  background: rgba(3, 20, 35, 0.88);
  box-shadow: none;
}

#chemical-id-results .chemical-profile-toolbar > strong,
#hazard-profile-results .hazard-profile-toolbar > strong {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-toolbar-actions,
#hazard-profile-results .hazard-profile-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

#chemical-id-results #open-plume-btn,
#hazard-profile-results #hazard-profile-plume-btn {
  order: -1;
  min-height: 32px;
  margin-left: 0;
  border: 1px solid #f14a55 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #d72734, #a90e19) !important;
  box-shadow: 0 0 16px rgba(193, 18, 31, 0.3);
}

#chemical-id-results #open-plume-btn:hover,
#chemical-id-results #open-plume-btn:focus-visible,
#hazard-profile-results #hazard-profile-plume-btn:not(:disabled):hover,
#hazard-profile-results #hazard-profile-plume-btn:not(:disabled):focus-visible {
  border-color: #ff8b92 !important;
  background: linear-gradient(180deg, #e53b47, #bd1420) !important;
}

#hazard-profile-results #hazard-profile-plume-btn:disabled {
  border-color: #74434a !important;
  color: #e4bdc1 !important;
  background: #3b2026 !important;
  box-shadow: none;
  opacity: 1 !important;
}

#chemical-id-results .chemical-profile-header-card {
  border: 1px solid rgba(64, 107, 145, 0.85);
  background:
    radial-gradient(circle at 76% 36%, rgba(46, 140, 255, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(9, 47, 77, 0.96), rgba(4, 25, 43, 0.96));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

#chemical-id-results .chemical-hazard-overview {
  border: 1px solid rgba(64, 107, 145, 0.85);
  background: rgba(8, 31, 52, 0.92);
}

#chemical-id-results .chemical-profile-tabs {
  grid-template-columns: repeat(8, minmax(88px, 1fr)) !important;
}

#hazard-profile-results .hazard-profile-tabs {
  grid-template-columns: repeat(9, minmax(92px, 1fr)) !important;
}

#chemical-id-results .chemical-profile-tabs,
#hazard-profile-results .hazard-profile-tabs {
  gap: 2px;
  padding: 0;
  overflow-x: auto;
  border: 1px solid rgba(64, 107, 145, 0.85);
  border-radius: 6px;
  background: rgba(5, 27, 47, 0.9);
}

#chemical-id-results .chemical-profile-tab,
#hazard-profile-results .chemical-profile-tab {
  min-height: 38px;
  padding: 6px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #f8fafc !important;
  background: #082943;
  font-size: clamp(0.68rem, 0.72vw, 0.8rem);
  font-weight: 850;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-tab.active,
#chemical-id-results .chemical-profile-tab[aria-selected="true"],
#hazard-profile-results .chemical-profile-tab.active,
#hazard-profile-results .chemical-profile-tab[aria-selected="true"] {
  border-color: var(--gold) !important;
  color: #07111c !important;
  background: var(--gold-surface) !important;
  box-shadow: inset 0 -3px 0 var(--gold);
}

#chemical-id-results .chemical-profile-content-card {
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(64, 107, 145, 0.85);
  border-radius: 7px;
  background: rgba(4, 22, 38, 0.84);
  box-shadow: none;
}

#chemical-id-results .chemical-profile-content {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#chemical-id-results .chemical-profile-section {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(64, 107, 145, 0.85);
  border-top: 3px solid #2e8cff;
  border-radius: 7px;
  color: #f8fafc;
  background: rgba(8, 31, 52, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

#chemical-id-results .chemical-profile-section h4,
#hazard-profile-results .hazard-source-fact-card h3 {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

#hazard-profile-results .hazard-source-fact-card > strong { color: var(--gold); }
#hazard-profile-results .hazard-source-fact-card p,
#hazard-profile-results .hazard-source-fact-card li { color: #dde7f2; font-size: 0.88rem; }
#hazard-profile-results .hazard-source-fact-card small { color: #b8c7d9; font-size: 0.76rem; }

#chemical-id-results .chemical-profile-footer {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 0.8fr;
  gap: 0;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid rgba(64, 107, 145, 0.85);
  border-radius: 7px;
  background: rgba(8, 31, 52, 0.92);
}

#chemical-id-results .chemical-profile-footer > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid rgba(64, 107, 145, 0.62);
}

#chemical-id-results .chemical-profile-footer > div:last-child { border-right: 0; }

#chemical-id-results .chemical-profile-footer span {
  color: #79bfff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-footer strong {
  overflow-wrap: anywhere;
  color: #f8fafc;
  font-size: 0.76rem;
}

#hazard-profile-results:not([data-hazard-lane]) .hazard-profile-action-grid,
#hazard-profile-results:not([data-hazard-lane]) .hazard-profile-limitations { display: none; }

@media (max-width: 1420px) {
  #chemical-id-results .chemical-profile-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  #chemical-id-results .chemical-profile-toolbar-actions,
  #hazard-profile-results .hazard-profile-toolbar-actions { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  #chemical-id-results .chemical-profile-toolbar,
  #hazard-profile-results .hazard-profile-toolbar { grid-template-columns: 1fr; }

  #chemical-id-results .chemical-profile-toolbar-actions,
  #hazard-profile-results .hazard-profile-toolbar-actions { justify-content: stretch; }

  #chemical-id-results .chemical-profile-toolbar-actions > *,
  #hazard-profile-results .hazard-profile-toolbar-actions > * { flex: 1 1 130px; }

  #chemical-id-results .chemical-profile-header-card {
    grid-template-columns: 1fr;
    grid-template-areas: "placard" "heading" "summary" "meta" "hazard";
  }

  #chemical-id-results .chemical-profile-content { grid-template-columns: 1fr; }

  #chemical-id-results .chemical-profile-footer { grid-template-columns: 1fr; }

  #chemical-id-results .chemical-profile-footer > div {
    padding-block: 7px;
    border-right: 0;
    border-bottom: 1px solid rgba(64, 107, 145, 0.62);
  }
}

/* Final chemical profile geometry override. */
#chemical-id-results[hidden] { display: none !important; }
#chemical-id-results:not([hidden]) { display: block; min-width: 0; min-height: 0; }
#chemical-id-results .chemical-results-header { display: none !important; }

#chemical-id-results .chemical-profile-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  grid-template-areas: "profile-toolbar" "profile-identity" "profile-workspace" "profile-footer" !important;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#chemical-id-results .chemical-profile-toolbar { grid-area: profile-toolbar; }
#chemical-id-results .chemical-profile-header-card {
  grid-area: profile-identity;
  display: grid !important;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
#chemical-id-results .chemical-nfpa-placard {
  grid-area: placard !important;
  position: static !important;
  inset: auto !important;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 150px;
  margin: 0 !important;
}
#chemical-id-results .chemical-profile-header-top { grid-area: heading !important; }
#chemical-id-results .chemical-profile-summary { grid-area: summary !important; }
#chemical-id-results .chemical-profile-meta { grid-area: meta !important; }
#chemical-id-results .chemical-hazard-overview { grid-area: hazard !important; }

#chemical-id-results .chemical-profile-layout {
  grid-area: profile-workspace;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
#chemical-id-results .chemical-profile-tabs {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 0;
  min-height: 40px;
  overflow-x: auto;
  overflow-y: hidden;
}
#chemical-id-results .chemical-profile-content-card {
  display: block !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
#chemical-id-results .chemical-profile-content {
  display: grid !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
#chemical-id-results .chemical-profile-footer { grid-area: profile-footer; }

@media (min-width: 901px) {
  #chemical-id-results .chemical-profile-header-card {
    grid-template-columns: minmax(118px, 16%) minmax(0, 1fr) minmax(175px, 25%) !important;
    grid-template-areas: "placard heading hazard" "placard summary hazard" "placard meta hazard" !important;
    align-items: stretch;
    gap: 5px 12px;
  }
}

@media (max-width: 900px) {
  #chemical-id-results .chemical-profile-shell { height: auto; min-height: 720px; overflow: visible; }
  #chemical-id-results .chemical-profile-header-card {
    grid-template-columns: minmax(104px, 140px) minmax(0, 1fr) !important;
    grid-template-areas: "placard heading" "placard summary" "meta meta" "hazard hazard" !important;
  }
  #chemical-id-results .chemical-profile-layout,
  #chemical-id-results .chemical-profile-content-card { min-height: 480px; }
}

/* Response is a document flow, not a stretched dashboard grid. */
#chemical-id-results .chemical-profile-content[data-active-tab="response"] {
  align-content: start !important;
  align-items: start !important;
  grid-auto-flow: row dense;
  grid-auto-rows: max-content;
  gap: 10px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px !important;
}
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .chemical-profile-section,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-table,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-summary {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
}
#chemical-id-results .chemical-profile-content[data-active-tab="response"] .chemical-profile-section h4 {
  min-height: 0;
  margin-bottom: 2px;
  font-size: 1.2rem;
  font-weight: 950;
}
#chemical-id-results .chemical-profile-content[data-active-tab="response"] .chemical-profile-row,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] .chemical-profile-list-row,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] .chemical-profile-value-list,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] .chemical-profile-list {
  font-size: 0.92rem;
  line-height: 1.45;
}

/* The source-backed PPE recommendation is the single primary decision cue. */
#chemical-id-results .ppe-recommendation-card {
  gap: 12px;
}
#chemical-id-results .ppe-recommendation-status {
  padding: 15px 16px;
  border: 3px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(135deg, #08243b 0%, #123f5d 100%);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.16), 0 10px 22px rgba(0, 0, 0, 0.22);
}
#chemical-id-results .ppe-recommendation-status > span {
  font-size: 0.72rem;
  font-weight: 900;
}
#chemical-id-results .ppe-recommendation-status > strong {
  color: #fff;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 950;
  line-height: 1.15;
}

/* Hazard Profile spacing and Response flow. Keep every tab’s box rhythm
   compact and prevent the Response tab’s former two-column row sizing from
   pushing Fire Response below an unrelated tall reactivity card. */
#chemical-id-results .chemical-profile-content[data-active-tab] {
  gap: 8px !important;
  padding: 8px !important;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] {
  grid-template-columns: minmax(0, 1fr) !important;
}

#chemical-id-results .chemical-profile-content[data-active-tab="response"] > [data-section],
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-table,
#chemical-id-results .chemical-profile-content[data-active-tab="response"] > .erg-profile-summary {
  grid-column: 1 / -1 !important;
}

#chemical-id-results .chemical-profile-content[data-active-tab] .chemical-profile-section {
  padding: 10px;
}

#chemical-id-results .chemical-profile-reactivity-panel {
  grid-column: 1 / -1 !important;
  gap: 9px;
}

#chemical-id-results .chemical-profile-reactivity-categories,
#chemical-id-results .chemical-profile-reactivity-warnings {
  display: grid;
  gap: 7px;
  min-width: 0;
}

#chemical-id-results .chemical-profile-reactivity-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#chemical-id-results .chemical-profile-reactivity-block h5 {
  margin: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#chemical-id-results .chemical-profile-reactivity-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

#chemical-id-results .chemical-profile-reactivity-label {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #39739e;
  border-radius: 999px;
  color: #e8f5ff;
  background: #061f34;
  font-size: 0.84rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#chemical-id-results .chemical-profile-reactivity-redox {
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border-left: 3px solid var(--gold);
  background: rgba(246, 195, 67, 0.09);
}

#chemical-id-results .chemical-profile-reactivity-redox .chemical-profile-reactivity-labels {
  gap: 5px;
}

#chemical-id-results .chemical-profile-reactivity-empty {
  margin: 0;
  color: #c3d7e4;
  font-size: 0.86rem;
  line-height: 1.45;
}

#chemical-id-results .chemical-profile-reactivity-details {
  min-width: 0;
  border-top: 1px solid rgba(61, 125, 170, 0.7);
  padding-top: 7px;
}

#chemical-id-results .chemical-profile-reactivity-details summary {
  width: fit-content;
  max-width: 100%;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
  cursor: pointer;
}

#chemical-id-results .chemical-profile-reactivity-details-content {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-top: 8px;
}

#chemical-id-results .chemical-profile-reactivity-details-content p {
  margin: 0;
  color: #e8f5ff;
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#chemical-id-results .chemical-profile-reactivity-source-note {
  color: #b8d0e1 !important;
  font-size: 0.78rem !important;
}

#chemical-id-results .chemical-profile-inline-link {
  justify-self: start;
  margin-top: 2px;
  padding: 0;
  border: 0;
  color: var(--gold);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#chemical-id-results .chemical-profile-inline-link:hover,
#chemical-id-results .chemical-profile-inline-link:focus-visible {
  color: #fff;
}

@media (max-width: 900px) {
  #chemical-id-results .chemical-profile-content[data-active-tab] {
    gap: 8px !important;
    padding: 8px !important;
  }

  #chemical-id-results .chemical-profile-reactivity-label {
    font-size: 0.82rem;
  }
}

/* Compact isolated Hazard ID printing */
@media print {
  @page chemical-profile { margin: 12mm; }
  body.printing-chemical-profile > :not(#chemical-profile-print-root) {
    display: none !important;
  }
  body.printing-chemical-profile #chemical-profile-print-root {
    page: chemical-profile;
    position: static !important;
    width: auto !important;
    min-height: 0 !important;
    font: 10pt/1.3 Arial, sans-serif;
  }
  body.printing-chemical-profile #chemical-profile-print-root * {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    overflow-wrap: anywhere;
    color: #111 !important;
    text-shadow: none;
  }
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-print-page {
    break-before: auto;
    padding-top: 8px;
  }
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-section,
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-source-summary,
  body.printing-chemical-profile #chemical-profile-print-root .hybrid-decon-section {
    break-inside: auto;
    margin-bottom: 6px;
    padding: 5px 7px;
  }
  body.printing-chemical-profile #chemical-profile-print-root .chemical-profile-row {
    display: grid;
    grid-template-columns: 30% minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
    break-inside: avoid;
  }
  body.printing-chemical-profile #chemical-profile-print-root h2,
  body.printing-chemical-profile #chemical-profile-print-root h4,
  body.printing-chemical-profile #chemical-profile-print-root summary {
    break-after: avoid;
  }
  body.printing-chemical-profile #chemical-profile-print-root table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }
  body.printing-chemical-profile #chemical-profile-print-root thead {
    display: table-header-group;
  }
  body.printing-chemical-profile #chemical-profile-print-root tr {
    break-inside: avoid;
  }
}
