/* Standalone custom formulation workspace. */
[hidden] { display: none !important; }
.tool-badge { flex: none; border-left: 3px solid #087bbf; padding: 5px 0 5px 16px; font-size: .65rem; letter-spacing: .12em; color: #5d7080; }
.tool-badge strong { font-size: .9rem; letter-spacing: 0; color: #08283f; }
.workspace { grid-template-columns: minmax(0, 1fr) 330px; }
.example-notice { border: 1px solid #c5dfeb; background: #e8f5fb; padding: 10px 16px; border-radius: 10px; color: #315c75; font-size: .8rem; margin-bottom: 18px; }
.component-help { margin: 14px 20px; color: #5d7080; font-size: .79rem; }
.lookup-status { margin: 0 20px 13px; color: #177a50; font-size: .73rem; }
.componenttable { table-layout: fixed; }
.componenttable th:nth-child(1) { width: 51%; }
.componenttable th:nth-child(2) { width: 23%; }
.componenttable th:nth-child(3) { width: 19%; }
.componenttable th:nth-child(4) { width: 7%; }
.componenttable th span { text-transform: none; }
.componenttable td { vertical-align: top; padding-top: 15px; padding-bottom: 13px; }
.componenttable .name, .componenttable .mw, .componenttable .ratio { width: 100%; min-width: 0; }
.componenttable td:last-child, .componenttable th:last-child { padding-left: 0; padding-right: 12px; }
.componenttable input { min-height: 44px; }
.componenttable input[aria-invalid="true"] { border-color: #b53b38; background: #fff8f7; }
.picker { position: relative; }
.suggestions { position: absolute; left: 0; top: calc(100% + 4px); z-index: 45; width: max(100%, 320px); max-width: 85vw; max-height: 300px; overflow-y: auto; border: 1px solid #9fbfd3; border-radius: 9px; background: white; box-shadow: 0 10px 24px #08283f25; }
.suggestions [role="option"] { display: block; width: 100%; border: 0; border-bottom: 1px solid #e4edf2; padding: 10px 12px; background: white; text-align: left; cursor: pointer; }
.suggestions [role="option"]:hover, .suggestions [aria-selected="true"] { background: #e8f5fb; }
.suggestions strong { display: block; font-size: .84rem; color: #08283f; overflow-wrap: anywhere; }
.suggestions small { color: #5d7080; font-size: .73rem; }
.component-meta { font-size: .69rem; margin: 6px 0 0; color: #5d7080; line-height: 1.4; overflow-wrap: anywhere; }
.remove-component { min-height: 44px; width: 32px; border: 0; background: transparent; color: #8a5560; cursor: pointer; font-size: 1.3rem; border-radius: 6px; }
.remove-component:hover { background: #fff0ef; }
.row-actions { padding: 5px 20px 15px; display: flex; gap: 9px; }
.settings .fieldline input { min-width: 0; }
.modeTabs { gap: 5px; }
.mode { line-height: 1.3; min-height: 46px; }
.live-label { display: inline-block; color: #177a50; font-size: .71rem; margin: 4px 0; }
.resultactions { flex-wrap: wrap; }
.resulttable .weight { color: #05649c; background: #f0f8fc; font-size: 1.04rem; font-weight: 800; }
.resulttable td { font-variant-numeric: tabular-nums; }
.resulttable .unit { text-transform: none; }
.resulttable .muted { overflow-wrap: anywhere; }
.resulttable .empty { padding: 28px 20px; color: #5d7080; text-align: left; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
:focus-visible { outline: 3px solid #087bbf; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: 1fr; }
  .settingsCard { order: 0; }
  .intro { display: block; }
  .tool-badge { display: none; }
}
@media (max-width: 650px) {
  .componenttable { table-layout: auto; }
  .componenttable tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 9px; }
  .componenttable td:first-child { grid-column: 1 / -1; }
  .componenttable td:last-child { align-self: end; }
  .componenttable td:last-child::before { content: ''; }
  .cardhead { align-items: start; flex-direction: column; gap: 3px; }
  .suggestions { width: 100%; max-width: 100%; }
  .resultactions { gap: 5px; }
  .resultactions .btn { padding: 8px 9px; }
  .formula { white-space: normal; }
  .resultwrap { overflow: visible; }
  .resulttable, .resulttable tbody, .resulttable tfoot { display: block; min-width: 0; }
  .resulttable thead { display: none; }
  .resulttable tr { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #dbe7ee; padding: 12px 16px; gap: 8px; }
  .resulttable td { display: block; text-align: left; border: 0; padding: 3px !important; font-size: .85rem; }
  .resulttable td:first-child { grid-column: 1 / -1; font-size: .95rem; }
  .resulttable td[data-label]::before { content: attr(data-label); display: block; color: #5d7080; font-size: .65rem; font-weight: 500; }
  .resulttable .weight { border-radius: 5px; padding: 7px !important; }
  .resulttable tfoot .totalPercent { display: none; }
}
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: white; font-size: 10pt; }
  header, .topbar, .crumbs, .workspace, .intro, .example-notice, .resultactions, .toast, .order-footer-link, .live-label { display: none !important; }
  main { padding: 0; }
  .wrap { width: 100%; }
  .card { box-shadow: none; border-radius: 0; }
  .result { margin-top: 0; overflow: visible; }
  .resultwrap { overflow: visible; }
  .resulttable { min-width: 0; width: 100%; font-size: 9pt; }
  .resulttable th, .resulttable td { padding: 7px !important; }
  .resulthead::before { content: 'DC Chemicals · LNP Formulation Calculator'; display: block; font-size: 14pt; font-weight: bold; }
  .resulthead { display: block; }
  .resulthead h2 { margin-top: 8px; }
  .resulttable thead { display: table-header-group; }
  .resulttable tr, .note { break-inside: avoid; }
  .notes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .note { padding: 8px; }
  .note p { font-size: 8pt; }
  footer { display: none; }
  footer .foot { display: none; }
  .legal { margin: 0; padding: 0; }
}
