/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Stop iOS/Android "text autosizing" from inflating wide blocks (list view
     titles ballooned past their 16px token on phones). */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Page only ever scrolls vertically — any overflowing element would otherwise
   let the whole screen wiggle sideways on touch. */
html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  /* Aspekta 400 reads thin on pure black; 450 holds the same voice with
     better presence (owner call). Explicit weights still override. */
  font-weight: var(--font-medium);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing);
  font-variant-emoji: text;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  font-feature-settings:
    'kern' 1,
    'liga' 1;
}

/* Any overlay up → page behind must not scroll (set by syncBodyScrollLock) */
body.modal-open {
  overflow: hidden;
}

/* Touch polish */
button,
[role='button'],
.table-row {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-medium);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.title {
  letter-spacing: var(--letter-spacing-tight);
}

/* Hide Scrollbar */
::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Skip link — hidden until keyboard focus, then a small inverted slab
   top-left (same inversion language as selected states). */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: calc(var(--z-modal) + 1);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--accent-color);
  color: #000;
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-nav);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
}
