/* Resource tools share the calculator's paper, ink, units and native controls. */
.resource-label { font: 700 13px/1.4 var(--f-cond); text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.resource-figure { margin: 26px 0; }
.resource-figure svg, .resource-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule-soft); border-radius: 4px; }
.resource-figure svg { background: var(--stub); fill: var(--ink); font-family: var(--f-ui); }
.resource-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.resource-tool { margin: 24px 0; padding: 20px; border: 1px solid var(--rule); background: var(--stub); border-radius: 6px; }
.resource-tool h2 { margin-top: 0; }
.resource-fields { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; margin: 14px 0; }
.resource-fields label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; flex: 1 1 120px; }
.resource-fields input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--rule); background: white; padding: 8px 10px; border-radius: 3px; font-family: var(--f-mono); }
.resource-fields input[aria-invalid="true"] { border-color: var(--red); }
.resource-tool output { display: block; font: 700 26px/1.3 var(--f-mono); margin: 14px 0 8px; overflow-wrap: anywhere; }
.resource-tool .note { margin: 8px 0 0; }
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.converter-grid .resource-tool { margin: 16px 0; }
.resource-error { color: var(--red) !important; }
.resource-table { width: 100% !important; border-collapse: collapse; }
.resource-table caption { text-align: left; margin: 8px 0; font-size: 14px; color: var(--ink-2); }
.resource-table th, .resource-table td { padding: 11px 9px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
.resource-table thead { background: var(--stub); }
.resource-table tbody th { font-weight: 600; }
.resource-table td { font-size: 15px; }
.resource-tool .resource-table td { font-family: var(--f-mono); font-size: 14px; }
.download-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.download-option { padding: 20px; border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 4px; }
.download-option h2 { margin-top: 4px; }
.download-option .btn { padding: 8px 13px; }
.resource-callout { border-left: 3px solid var(--red); padding: 8px 18px; margin: 24px 0; background: var(--stub); }
.resource-callout p { margin: 4px 0; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0; font-size: 14px; }
.resource-next { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); }
.resource-next h2 { font-size: 20px; }
.formula code { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .converter-grid, .download-options { grid-template-columns: 1fr; gap: 0; }
  .resource-tool, .download-option { padding: 16px; }
  .download-option { margin-bottom: 16px; }
  .resource-tool output { font-size: 22px; }
  .resource-table th, .resource-table td { padding: 8px 6px; font-size: 13px; }
  .resource-tool .resource-table td { font-size: 12px; }
}
@media print {
  .resource-fields, .guide-toc, .download-options .ref-actions { display: none; }
  .resource-tool { break-inside: avoid; border-color: #aaa; background: white; }
  .resource-table { font-size: 11px; }
  .resource-table tr { break-inside: avoid; }
  .resource-next { display: none; }
}
