/* CRM KIT FIT. Hand-written. Loaded LAST in <head>, right after crm-kit.css.
   The parts kit (crm-kit.css, GENERATED by tools/kit/port-kit.cjs) only reaches inside an
   element with class "kt". This file undoes the other direction: CRM rules that would reach
   INTO a kit part inside .kt and change its look. Every rule here is scoped to .kt, so with
   no .kt on the page this file changes nothing.
   Found by the probe page public/_kit-probe.html (never shipped): it draws every kit part
   with all CRM stylesheets and with crm-kit.css alone, and lists each computed difference.

   ⚠ SPECIFICITY: each rule here weighs exactly what the CRM rule it answers weighs (the
   :where() wrappers weigh nothing), and wins only by coming later. A heavier rule here would
   also beat the kit's own variants (.dp.is-open, .k-btn.k-dark ...) and change the kit.
   ⚠ ONLY KIT PARTS: a .kt host will also hold the CRM's own content (the phone screens), so
   nothing here may reach a CRM element: rules name the kit parts' own roots (PARTS below). */

/* PARTS = the roots the kit draws its parts in (keep in step with the kit):
   .sp (a kit stage), .k-btn, .dp with its .dp-btn (DatePick; the CRM has its own .dp, the
   delivery panel), .po-f / .po (PickOne), .sp-multiple-selector, .st-panel (switches, ticks),
   .tb (tabs), .tg (rings), .k-fan, .su-context-menu, .su-gooey-popover, .su-gooey-filter,
   .pp-ov (Kit.box), .m-pile (Kit.tell), .c-steps (steps). */

/* 1. Leading. The kit is drawn on a 15px/1.5 page; the CRM body is 15px with normal leading.
      Inherited, so it is set on the part roots only, weighing nothing. */
:where(.kt) :where(.sp, .k-btn, .dp:has(> .dp-btn), .po-f, .po, .sp-multiple-selector, .st-panel, .tb, .tg, .k-fan,
  .su-context-menu, .su-gooey-popover, .su-gooey-filter, .pp-ov, .m-pile, .c-steps) { line-height: 1.5; }
/* the kit's button takes its whole font from where it stands (font: inherit), so it needs its own.
   Weighs (0,1,0) like the kit's .k-btn rule and comes after it; no kit variant sets a leading. */
:where(.kt) .k-btn { line-height: 1.5; }

/* 2. app.css `.dp` is the delivery office panel (white card, border, 13px corners, clipped,
      14px below). The kit's DatePick root is also .dp: give it back the kit's plain box.
      Weighs (0,1,0) like app.css .dp. */
:where(.kt) .dp:where(:has(> .dp-btn)) { background: none; border: 0; border-radius: 0; overflow: visible; margin-bottom: 0; }

/* 3. app.css `b,strong{font-weight:600}` and `h1{500}` / `h2,h3,h4{600; letter-spacing:-.012em}`.
      The kit is drawn with the browser's bold. Weighs (0,0,1) like the CRM element rules. */
:where(.kt) :where(.sp, .k-btn, .dp, .po-f, .po, .sp-multiple-selector, .st-panel, .tb, .tg, .k-fan,
  .su-context-menu, .su-gooey-popover, .su-gooey-filter, .pp-ov, .m-pile, .c-steps) :is(b, strong) { font-weight: 700; }
:where(.kt) :where(.sp, .k-btn, .dp, .po-f, .po, .sp-multiple-selector, .st-panel, .tb, .tg, .k-fan,
  .su-context-menu, .su-gooey-popover, .su-gooey-filter, .pp-ov, .m-pile, .c-steps) :is(h1, h2, h3, h4) { font-weight: 700; letter-spacing: normal; }

/* 3b. app.css phone block (max-width:760px): `h1/h2/h3{font-size:var(--m5/m4/m3)!important}`.
      Only !important answers !important: the kit's own heading sizes, its 600px step included.
      A new kit heading class needs its line here. */
:where(.kt) .k-h, :where(.kt) .pp-page h3 { font-size: 18px !important; }
:where(.kt) .pp-t { font-size: 24px !important; }
@media (max-width: 600px) { :where(.kt) .pp-t { font-size: 22px !important; } }

/* 3c. m3.css:377 (max-width:760px) `input[type=checkbox],input[type=radio]{20px}` grows the kit's
       hidden real tick box (1px, opacity 0) under the switch and tick. Weighs (0,1,1) like it. */
:where(.kt) input.st-in:where([type=checkbox], [type=radio]) { width: 1px; height: 1px; }

/* NOT answered on purpose: app.css (max-width:760px) `input,textarea,select{font-size:16px!important}`.
   It stops iOS Safari zooming the page in on a field under 16px; kit fields (15px) keep 16px on a phone. */

/* 4. app.css `*{margin:0;padding:0}` takes the browser's padding off every button; the kit's
      plain buttons (no padding of their own) are drawn with it. Weighs (0,0,1). */
:where(.kt) :where(.sp, .dp, .po-f, .po, .sp-multiple-selector, .st-panel, .tb, .tg, .k-fan,
  .su-context-menu, .su-gooey-popover, .su-gooey-filter, .pp-ov, .m-pile, .c-steps) button { padding: 1px 6px; }
