/* Base: fonts, reset, typography, focus. Colours and sizes come from tokens.css. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-wght-normal.woff2?v=1') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext-wght-normal.woff2?v=1') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2?v=1') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2?v=1') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2?v=1') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-wght-normal.woff2?v=1') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--p-color-bg);
  color: var(--p-color-text);
  font-family: var(--p-font-family-sans);
  font-size: var(--p-font-size-body-md);
  line-height: var(--p-font-line-height-body);
  font-feature-settings: 'cv11', 'ss01', 'calt';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--p-font-family-display);
  font-weight: var(--p-font-weight-semibold);
  letter-spacing: var(--p-font-letter-spacing-tight);
  line-height: var(--p-font-line-height-tight);
  text-wrap: balance;
}

h1 { font-size: var(--p-font-size-heading-2xl); }
h2 { font-size: var(--p-font-size-heading-xl); }
h3 { font-size: var(--p-font-size-heading-lg); }
h4 { font-size: var(--p-font-size-heading-md); letter-spacing: -0.01em; }

p { text-wrap: pretty; }

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--p-color-text-brand);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--p-color-text-brand-hover); }

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table { border-collapse: collapse; border-spacing: 0; }

code, kbd, samp, pre { font-family: var(--p-font-family-mono); font-size: 0.92em; }

hr {
  border: 0;
  border-top: 1px solid var(--p-color-border);
  margin: var(--p-space-600) 0;
}

::selection {
  background: var(--p-color-brand-mint);
  color: var(--p-color-brand-ink);
}

/* One focus ring everywhere: visible on light, dark and ink surfaces. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--p-color-border-focus);
  outline-offset: 2px;
  border-radius: var(--p-border-radius-150);
}

[hidden] { display: none !important; }

.k-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;
}

.k-skip {
  position: fixed;
  top: var(--p-space-200);
  left: -9999px;
  z-index: 100;
  padding: var(--p-space-200) var(--p-space-400);
  background: var(--p-color-bg-surface);
  color: var(--p-color-text);
  border-radius: var(--p-border-radius-200);
  box-shadow: var(--p-shadow-300);
}
.k-skip:focus { left: var(--p-space-200); }

/* Scrollbars that match the surface */
* { scrollbar-width: thin; scrollbar-color: var(--p-color-border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--p-color-border-strong);
  border-radius: var(--p-border-radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track { background: transparent; }

/* Typography helpers */
.k-eyebrow {
  font-family: var(--p-font-family-mono);
  font-size: var(--p-font-size-body-xs);
  font-weight: var(--p-font-weight-medium);
  color: var(--p-color-text-brand);
  letter-spacing: 0.01em;
  text-transform: lowercase;
}
.k-eyebrow::before { content: '// '; opacity: 0.7; }

.k-mono { font-family: var(--p-font-family-mono); font-feature-settings: 'zero'; }
.k-num { font-variant-numeric: tabular-nums; }
.k-muted { color: var(--p-color-text-secondary); }
.k-subtle { color: var(--p-color-text-tertiary); }
.k-display {
  font-family: var(--p-font-family-display);
  font-weight: var(--p-font-weight-semibold);
  letter-spacing: var(--p-font-letter-spacing-tight);
}
.k-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

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