/* ===== dr_cost_basis_html (HTML form, scoped) =====
   Loaded eagerly from anvil.yaml native_deps.head_html. Anvil strips a
   template's <style> text, so these rules cannot live in form_template.html.

   Scoped on the form's own root class .dr-basis.

   DESIGNER LIMIT: .px-card, .px-card-header, .px-card-body and the --px-*
   colour tokens come from the dependency's runtime injection, and drivers.css
   declares --dr-accent and styles .dr-info only under the shell and pop-up
   roots (.dr-dashboard, #dr-drill-overlay); the designer canvas has neither. */

:where(.dr-basis) .px-card-header { display: flex; align-items: center; gap: 6px; }
:where(.dr-basis) .dr-basis-actions { margin-left: auto; }
:where(.dr-basis) .dr-basis-months { display: grid; gap: 18px; }
:where(.dr-basis) .dr-basis-month { border: 1px solid var(--px-border); border-radius: var(--px-radius); padding: 14px 16px; min-width: 0; }
:where(.dr-basis) .dr-basis-month-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 10px; }
:where(.dr-basis) .dr-basis-month-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
:where(.dr-basis) .dr-basis-window { color: var(--px-text-muted); font-size: 11px; }
:where(.dr-basis) .dr-basis-pot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--px-border); }
:where(.dr-basis) .dr-basis-pot h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
:where(.dr-basis) dl { margin: 0; font-size: 12px; }
:where(.dr-basis) dl + dl { margin-top: 10px; }
:where(.dr-basis) dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px solid var(--px-border); }
:where(.dr-basis) dt { color: var(--px-text-secondary); min-width: 0; }
:where(.dr-basis) dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
:where(.dr-basis) .dr-basis-plates dd { font-weight: 400; white-space: normal; text-align: right; }
:where(.dr-basis) .dr-basis-worked-out dt, :where(.dr-basis) .dr-basis-worked-out dd { font-style: italic; }
:where(.dr-basis) .dr-basis-omitted dd { font-weight: 400; color: var(--px-text-secondary); white-space: normal; }
:where(.dr-basis) .dr-basis-total dt, :where(.dr-basis) .dr-basis-total dd { font-size: 13px; font-weight: 700; }
:where(.dr-basis) .dr-basis-norate { margin: 8px 0; font-size: 12px; color: var(--px-text-secondary); }
/* One quiet-text treatment. .dr-basis-note and .dr-basis-source differ from it
   only in their top margin, so they carry the margin and nothing else. */
:where(.dr-basis) .dr-basis-quiet,
:where(.dr-basis) .dr-basis-note,
:where(.dr-basis) .dr-basis-source { margin: 8px 0 0; font-size: 11px; color: var(--px-text-muted); line-height: 1.6; }
:where(.dr-basis) .dr-basis-note { margin-top: 14px; }
:where(.dr-basis) .dr-basis-source { margin-top: 10px; }
:where(.dr-basis) [hidden] { display: none !important; }

@media (max-width: 600px) {
  :where(.dr-basis) dl > div { flex-direction: column; gap: 2px; }
  :where(.dr-basis) dd { text-align: left; white-space: normal; }
}
