/* ISISC TMS — polish layer v27 (additive, presentation only).
   Loaded after the v26 design layer. Changes no markup, script or role logic. */

/* 1. Login feature tiles: keep three per row on phones and centre the short last row,
      instead of leaving an empty gap beside two tiles. */
@media (max-width: 720px){
  .isisc-login-v26 .feature-grid{display:flex;flex-wrap:wrap;justify-content:center;grid-template-columns:none;gap:10px}
  .isisc-login-v26 .feature-grid > .feature{flex:0 1 calc((100% - 20px) / 3);min-width:0}
}

/* 2. Keyboard focus: one consistent, clearly visible ring. :where() keeps specificity at zero,
      so any component that sets its own focus style still wins. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible{
  outline:2px solid #2457d6;
  outline-offset:2px;
  border-radius:6px;
}

/* 3. Touch targets: at least 44px tall on touch screens (WCAG 2.5.5 guidance). */
@media (pointer: coarse){
  .btn, .isisc-pw-toggle{min-height:44px}
}

/* 4. Balanced headings and no single-word last lines in paragraphs. */
h1, h2, h3{text-wrap:balance}
p{text-wrap:pretty}

/* 5. Subtle lift on the feature tiles where a pointer is available. */
@media (hover: hover) and (min-width: 721px){
  .isisc-login-v26 .feature{transition:transform .2s ease, box-shadow .2s ease}
  .isisc-login-v26 .feature:hover{transform:translateY(-2px)}
}

/* 6. Respect users who ask the system to reduce motion. */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}
