/* ==========================================================================
   WFS-CISS base layer
   Typography, box model and focus behaviour. Everything is scoped under
   .wfs-app (or html/body) so it cannot leak into vendor widgets we still use.
   ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
}

body.wfs-app {
  margin: 0;
  background: var(--wfs-bg);
  color: var(--wfs-text);
  font-family: var(--wfs-font);
  font-size: var(--wfs-fs-md);
  line-height: var(--wfs-lh-normal);
  text-align: left;           /* undoes the old own-style.css body centering */
  -webkit-font-smoothing: antialiased;
}

.wfs-app *,
.wfs-app *::before,
.wfs-app *::after {
  box-sizing: border-box;
}

.wfs-app h1,
.wfs-app h2,
.wfs-app h3,
.wfs-app h4,
.wfs-app h5,
.wfs-app h6 {
  margin: 0;
  font-weight: 600;
  line-height: var(--wfs-lh-tight);
  color: var(--wfs-text);
}

.wfs-app p { margin: 0 0 var(--wfs-s3); }
.wfs-app p:last-child { margin-bottom: 0; }

.wfs-app a {
  color: var(--wfs-primary-fg);
  text-decoration: none;
}
.wfs-app a:hover { text-decoration: underline; }

.wfs-app hr {
  border: 0;
  border-top: 1px solid var(--wfs-border);
  margin: var(--wfs-s4) 0;
}

/* ---- focus ---------------------------------------------------------- */
/* Visible only for keyboard users, but never suppressed entirely. */
.wfs-app :focus-visible {
  outline: 2px solid var(--wfs-focus);
  outline-offset: 2px;
  border-radius: var(--wfs-r-sm);
}

/* ---- typographic utilities ------------------------------------------ */
.wfs-mono {
  font-family: var(--wfs-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.wfs-caps {
  text-transform: uppercase;
  letter-spacing: var(--wfs-ls-caps);
  font-size: var(--wfs-fs-xs);
  font-weight: 600;
  color: var(--wfs-text-faint);
}

.wfs-muted  { color: var(--wfs-text-muted); }
.wfs-faint  { color: var(--wfs-text-faint); }

.wfs-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Screen-reader only, but still focusable when it needs to be. */
.wfs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- small layout helpers ------------------------------------------- */
.wfs-stack  { display: flex; flex-direction: column; gap: var(--wfs-s3); }
.wfs-row    { display: flex; align-items: center; gap: var(--wfs-s2); flex-wrap: wrap; }
.wfs-spacer { flex: 1 1 auto; }

@media (prefers-reduced-motion: reduce) {
  .wfs-app *,
  .wfs-app *::before,
  .wfs-app *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
