/* ================================================================================================
   PLATFORM SHELL (#24E) — BASE
   Reset acotado al shell, tipografía y utilidades. Todo color viene de tokens.css.
   ================================================================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ps-bg-canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ps-bg-canvas);
  color: var(--ps-fg);
  font-family: var(--ps-font-sans);
  font-size: var(--ps-text-md);
  line-height: var(--ps-leading);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex: none; }
table { border-collapse: collapse; border-spacing: 0; }
[hidden] { display: none !important; }

/* Foco visible y consistente en todo el shell; nunca se elimina sin sustituto. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ps-focus);
  outline-offset: 2px;
  border-radius: var(--ps-radius-sm);
}
/* Encabezados que reciben foco por programa al navegar (anuncio de contexto): no son controles. */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible,
main[tabindex="-1"]:focus-visible { outline: none; }

::selection { background: var(--ps-steel-mist); color: var(--ps-near-black); }

/* --- Utilidades ------------------------------------------------------------------------------- */
.ps-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.ps-skip-link {
  position: fixed;
  top: var(--ps-space-3); left: var(--ps-space-3);
  z-index: var(--ps-z-toast);
  padding: var(--ps-space-2) var(--ps-space-4);
  border-radius: var(--ps-radius-md);
  background: var(--ps-primary-bg);
  color: var(--ps-primary-fg);
  font-weight: var(--ps-weight-semibold);
  transform: translateY(-160%);
  transition: transform var(--ps-duration-fast) var(--ps-ease);
}
.ps-skip-link:focus-visible { transform: none; }

.ps-mono {
  font-family: var(--ps-font-mono);
  font-size: .94em;
  font-feature-settings: "zero";
  letter-spacing: 0;
}
.ps-num { font-variant-numeric: tabular-nums; }
.ps-muted { color: var(--ps-fg-muted); }
.ps-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.ps-icon { width: 18px; height: 18px; }
.ps-icon--sm { width: 16px; height: 16px; }
.ps-icon--xs { width: 14px; height: 14px; }
.ps-icon--lg { width: 20px; height: 20px; }

.ps-boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--ps-fg-muted);
  font-size: var(--ps-text-sm);
}
