/* ============================================================
   KIT BASE
   The self-hosted font and the few global rules the component kit
   needs. Everything else in the kit is isolated CSS beside its
   component (Components/UI/*.razor.css). Colours come from tokens.css.
   ============================================================ */

/* Inter, variable weight, served from this origin (fonts/inter, SIL OFL 1.1). No request leaves the site for a font. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,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/inter-latin-wght-normal.woff2') format('woff2');
  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;
}

/* A .theme-light wrapper that must not become a box of its own (layouts outside the shell). */
.theme-wrap {
  display: contents;
}

/* Everything the kit renders sits under .kit (AppShell's root). */
.kit {
  font: 14px/1.45 Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

/* :where keeps these at zero specificity: pages not built from the kit yet render inside .kit too, and their own
   button and input rules must still win. */
:where(.kit button, .kit input) {
  font: inherit;
  color: inherit;
}

:where(.kit button) {
  cursor: pointer;
}

/* One focus ring for every kit control. */
.kit :focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.kit [hidden] {
  display: none !important;
}

.kit .num {
  font-variant-numeric: tabular-nums;
}

.kit .muted {
  color: var(--text-3);
}

/* The shell owns the viewport height on desktop, so the document itself never scrolls there. */
html.kit-shell,
html.kit-shell body {
  height: 100%;
  margin: 0;
  background: var(--bg);
}

/* ── Pages not built from the kit yet ──
   They render inside the shell's main area in a light island (.theme-light) with their own CSS.
   layout.css gave .main-content a 240px margin for the old fixed sidebar and extra top padding
   for the old fixed mobile bar; neither exists in the shell. */
.kit .main-content.legacy-page {
  margin-left: 0 !important;
  padding: 2rem !important;
  min-height: 100%;
  background: #F9FAFB;
  color: #111827;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

@media (max-width: 900px) {
  .kit .main-content.legacy-page {
    padding: 16px !important;
  }
}
