@layer radix, base, components, screens, utilities;
/* styles/core/ec-base.css: reset, document defaults, focus, [hidden], .sr-only, language line breaking and the reduced-motion exception (css-core plan 2.1, 2.5).
   Load after ec-fonts.css and ec-tokens.css. Reads variables only; no colour, no font name. Layer order is declared on the first line of every core file:
   base < components < screens < utilities, so a [hidden] element stays hidden whatever display a screen gives it, without !important or selector tricks. */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--ec-bg);
    color: var(--ec-text);
    font-family: var(--font-ui);
  }
  :focus-visible { outline: 2px solid var(--ec-focus); outline-offset: 2px; }
  /* Hangul keeps words whole. Japanese and Chinese have no spaces: break by character rules, never as one block. :lang() follows the nearest lang attribute. */
  :lang(ko) { word-break: keep-all; }
  :lang(ja), :lang(zh-TW), :lang(zh-CN) { word-break: normal; line-break: strict; }

  /* a11y-exception: the only !important in app CSS. Reduced motion must beat every animation and transition duration a component or screen sets. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
}

@layer utilities {
  [hidden] { display: none; }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}
