/* PrivateHub v3000 — base.css
   Reset, typography baseline, layout primitives. */

/* v5000.85 — root sizing rework.
 *
 * Before: html and body had `height: 100%` and #app was a flex column.
 * Result: body was locked to exactly viewport-height, the page scroll
 * happened inside #app rather than on window, and `position: sticky`
 * had no viewport-sized scroll context to stick to.
 *
 * Now: html/body grow naturally with content; #app uses block layout
 * with a min-height so any landing-style empty state still fills the
 * screen. Sticky elements now have a real viewport scroll context.
 */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* Remove default focus ring, replace with a cleaner one */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Root app container — block layout, min-height so loading screens
   fill the viewport. Sticky descendants now measure against window. */
#app {
  min-height: 100vh;
}

/* Boot screen shown before any module loads */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg);
}
.boot-mark {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--gold);
}
.boot-sub {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Toast region (screen-reader region, invisible otherwise) */
#toast-region {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

/* Utility: visually hidden but readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
