/* Reset + base typography. Opinionated, not bootstrap-style. */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--neu-0);
  color: var(--neu-10);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  font-feature-settings: "ss01", "cv11", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(79,140,255,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(79,140,255,0.04), transparent 60%);
  background-attachment: fixed;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

input, select, textarea, button { font-family: inherit; }

::placeholder { color: var(--neu-8); }
::selection { background: var(--accent-bg); color: var(--neu-11); }

/* Scrollbars — slim, monochrome, only show on hover. */
* { scrollbar-width: thin; scrollbar-color: var(--neu-6) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--neu-5);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--neu-7); background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }

/* Typography helpers */
h1, h2, h3, h4, h5 { margin: 0; font-weight: var(--fw-semi); line-height: var(--lh-snug); color: var(--neu-11); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p, ul, ol { margin: 0; }
small { font-size: var(--fs-xs); color: var(--neu-9); }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }

/* Focus rings — accessibility first, decoration second. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Boot screen */
.boot {
  position: fixed; inset: 0;
  display: grid; place-items: center; align-content: center;
  gap: var(--s-4);
  background: var(--neu-0);
  z-index: 9999;
}
.boot__mark {
  width: 28px; height: 28px;
  border: 2px solid var(--neu-6);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.boot__label { font-size: var(--fs-xs); color: var(--neu-8); letter-spacing: 0.04em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

.noscript {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--neu-0); color: var(--neu-10);
  padding: var(--s-6); text-align: center;
}

/* Utility primitives — kept tiny. Most layout uses semantic class names. */
.row { display: flex; align-items: center; gap: var(--s-3); }
.col { display: flex; flex-direction: column; gap: var(--s-3); }
.spacer { flex: 1; }
.muted { color: var(--neu-9); }
.dim { color: var(--neu-8); }
.mono { font-family: var(--font-mono); }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}
.numeric { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--neu-5); margin: var(--s-3) 0; }
.hidden { display: none !important; }
