/* ── Self-hosted fonts ───────────────────────────────────────────────────────
   Mulish: variable font (wght 200–1000), two subset files.
   Barlow Condensed: static, three weights, two subset files each.
   latin-ext covers all Romanian diacritics: ș ț ă â î Ș Ț Ă Â Î */

@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/static/fonts/mulish-var-latin-ext.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: 'Mulish';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/static/fonts/mulish-var-latin.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;
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/static/fonts/barlow-condensed-400-latin-ext.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: 'Barlow Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/static/fonts/barlow-condensed-400-latin.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;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('/static/fonts/barlow-condensed-500-latin-ext.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: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('/static/fonts/barlow-condensed-500-latin.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;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('/static/fonts/barlow-condensed-600-latin-ext.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: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('/static/fonts/barlow-condensed-600-latin.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;
}

/* ── Base reset & element defaults ─────────────────────────────────────────── */

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: clip;
  overscroll-behavior: none;
}

html[data-ui-surface="ops"] body {
  background-image:
    radial-gradient(circle at top right, var(--ops-haze, transparent), transparent 34%),
    linear-gradient(180deg, color-mix(in oklch, var(--bg) 92%, var(--panel) 8%), var(--bg));
  background-attachment: fixed;
}

.body--gate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--f-body); }
input, select, textarea { font-family: var(--f-body); }

:focus-visible {
  outline: 2px solid var(--accent, var(--teal));
  outline-offset: 2px;
}

html[data-ui-surface="ops"] button,
html[data-ui-surface="ops"] a,
html[data-ui-surface="ops"] input,
html[data-ui-surface="ops"] select,
html[data-ui-surface="ops"] textarea {
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.topbar__cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.appearance-control {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--dim2);
  background: color-mix(in oklch, var(--panel) 86%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklch, white 12%, transparent);
  flex-shrink: 0;
}

.appearance-control__toggle:hover {
  background: var(--dim);
}

.appearance-control__toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
}

.appearance-control__track {
  position: relative;
  width: 50px;
  height: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--dim) 78%, transparent);
}

.appearance-control__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 24px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--panel-2, var(--panel)) 90%, white 10%), var(--panel-2, var(--panel)));
  border: 1px solid var(--dim2);
  transition: transform 180ms var(--ease-out);
  box-shadow: 0 1px 8px color-mix(in oklch, black 12%, transparent);
}

html[data-theme="dark"] .appearance-control__thumb {
  transform: translateX(22px);
}

.appearance-control__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

html[data-theme="light"] .appearance-control__icon--light,
html[data-theme="dark"] .appearance-control__icon--dark {
  color: var(--text);
}

.appearance-control--menu {
  margin-left: auto;
  pointer-events: none;
}

.appearance-control--menu .appearance-control__track {
  width: 46px;
  height: 28px;
}

.appearance-control--menu .appearance-control__thumb {
  width: 20px;
  height: 22px;
}

html[data-theme="dark"] .appearance-control--menu .appearance-control__thumb {
  transform: translateX(20px);
}

/* htmx-indicator: replicates htmx's default styles in CSS so we can disable
   htmx's auto-injected <style> (which violates our strict CSP nonce policy).
   See the matching <meta name="htmx-config"> tag in head-*.html partials. */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

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

@media print {
  .no-print { display: none !important; }
}

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

.flex-spacer { flex: 1; }
