/* ==========================================================================
   BASE · Reset, global defaults, font loading
   ========================================================================== */

/* Fonts: shared/fonts.css */

/* --- Box model & scroll --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px }

/* --- Body ------------------------------------------------------------------ */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Headings & paragraphs ------------------------------------------------- */
h1, h2, h3, h4, p { margin: 0 }
h1, h2, h3, h4 { text-wrap: balance }
p { text-wrap: pretty }

/* --- Links ----------------------------------------------------------------- */
a { color: var(--color-teal-ink); text-decoration-thickness: 1px; text-underline-offset: 3px }
a:hover { color: var(--color-deep) }

/* --- Interactive elements -------------------------------------------------- */
button { font-family: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent }
input, select { font-family: inherit; font-size: var(--fs-md); color: var(--color-ink) }
svg { display: block }

/* --- Utility classes ------------------------------------------------------- */
.num  { font-variant-numeric: tabular-nums }
.mono { font-family: var(--font-mono) }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--color-ink); color: var(--color-white);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip:focus  { top: 12px }
.skip:hover  { color: var(--color-white) }

/* --- Selection & focus ----------------------------------------------------- */
::selection { background: color-mix(in srgb, var(--color-aqua) 35%, transparent) }

:focus-visible {
  outline: 2px solid var(--color-deep);
  outline-offset: 2px;
  border-radius: 10px;
}
.on-dark :focus-visible { outline-color: var(--color-white) }

/* --- Scrollbar (Webkit) ---------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--color-deep) 22%, transparent);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-track { background: transparent }

/* --- Icon base class ------------------------------------------------------- */
.ic {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

/* --- App shell ------------------------------------------------------------- */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--grad-page);
}
