/* ═══════════════════════════════════════════════════════════════════════
   shared/polish.css — suite-wide interaction polish for the Kaizen Academy
   Toolkit. Loaded by every deployed page alongside the auth styles.

   Conventions: tools already expose --yellow / --black / --charcoal /
   --grey / --border tokens. Every var() carries a Kaizen-default fallback
   so tools with their own palette still get sane results.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Selection ── branded instead of the OS default */
::selection{background:var(--yellow,#ffd559);color:#0d0d0d;}

/* ── Focus visibility — charcoal ring on light surfaces, brand yellow
   inside the dark header/footer chrome. Keyboard nav only (:focus-visible)
   so mouse clicks stay clean. ── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[role="radio"]:focus-visible,
[role="tab"]:focus-visible,
[tabindex]:focus-visible{
  outline:2px solid var(--charcoal,#36414D);
  outline-offset:2px;
}
.ka-header :focus-visible,
.ka-footer :focus-visible,
header :focus-visible,
footer :focus-visible{
  outline-color:var(--yellow,#ffd559);
}

/* ── Press feedback — under the 100ms Doherty threshold so controls answer
   before the gesture ends ── */
.btn:active,
button[class*="btn"]:active,
[class*="btn--"]:active{
  transform:scale(0.98);
}

/* ── Disabled controls — grayscale + not-allowed, not just faded ── */
.btn:disabled,
button:disabled{
  cursor:not-allowed;
}

/* ── Numbers — locked digit width so live-updating values never twitch ── */
td,th,
.stat-num,
.calcbox__row .cv,
.result-hero__value,
[class*="tabular"],
input[type="number"]{
  font-variant-numeric:tabular-nums;
}

/* ── Number inputs — hide the native spinners; typing + decimal keypad is
   the better UX for data entry ── */
input[type="number"]{appearance:textfield;-moz-appearance:textfield;}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}

/* ── Anchored sections clear sticky headers ── */
section[id],
main [id],
.section[id]{
  scroll-margin-top:92px;
}

/* ── Touch targets grow on coarse pointers ── */
@media (pointer:coarse){
  .btn--sm,
  .tool-btn,
  .hdr-btn,
  .icon-btn{min-height:44px;}
}

/* ── Reduced motion — one global kill switch ── */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}
