/* SIMHSYCN Phase 1 — Base layer */
*, *::before, *::after { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body.simh-app {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 118, 110, .055), transparent 28rem),
    radial-gradient(circle at 96% 8%, rgba(37, 99, 235, .045), transparent 30rem),
    var(--simh-bg) !important;
  color: var(--simh-text) !important;
  font-family: var(--simh-font-sans) !important;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.simh-app.menu-open { overflow: hidden; }

body.simh-app a {
  color: var(--simh-accent);
  text-decoration: none;
}

body.simh-app a:hover { color: var(--simh-accent-hover); }

body.simh-app img,
body.simh-app svg { max-width: 100%; }

body.simh-app button,
body.simh-app input,
body.simh-app select,
body.simh-app textarea { font: inherit; }

body.simh-app h1,
body.simh-app h2,
body.simh-app h3,
body.simh-app h4,
body.simh-app h5,
body.simh-app h6 {
  margin-top: 0;
  color: var(--simh-heading);
  line-height: 1.2;
  letter-spacing: -.025em;
}

body.simh-app p { margin-top: 0; }

body.simh-app code,
body.simh-app pre,
body.simh-app kbd { font-family: var(--simh-font-mono); }

body.simh-app ::selection {
  color: #ffffff;
  background: var(--simh-primary);
}

body.simh-app :focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.simh-skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 20000;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: var(--simh-radius-sm);
  color: #ffffff !important;
  background: var(--simh-text-strong);
  box-shadow: var(--simh-shadow-md);
  transition: transform .16s ease;
}

.simh-skip-link:focus { transform: translateY(0); }

body.simh-app * {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, .42) transparent;
}

body.simh-app *::-webkit-scrollbar { width: 8px; height: 8px; }
body.simh-app *::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, .38);
}
body.simh-app *::-webkit-scrollbar-track { background: transparent; }

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