/* Lemric Design System — the subset used by this site.
   Source: github.com/Lemric/DesignSystem (@lemric/design-system 1.3.0, commit b172cc600acb267fe5c65b7b06ef9da9db19454d).
   Copied from src/styles/tokens.css (brand "lemric", themes light and auto), components.css (field, label, input,
   textarea, hint, error, choice, button), source-controls.css (native select, select face, menu, options) and
   focus.css. Rules are verbatim unless a comment says "site:". The design system is the source of truth: change
   it there first, then copy. Nothing else from the package is vendored.

   Typeface: Onest Variable, Copyright 2021 The Onest Project Authors, SIL Open Font License 1.1
   (ONEST-LICENSE.txt next to this file); files from @fontsource-variable/onest 5.3.1, the package the design
   system's catalogue uses. */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('onest-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;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('onest-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;
}

/* ---------- tokens.css ---------- */

:root {
  --ds-font-sans: Onest, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ds-font-mono: 'Cascadia Code', Consolas, 'Liberation Mono', ui-monospace, monospace;
  --ds-space-0: 0;
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 24px;
  --ds-space-6: 32px;
  --ds-space-7: 48px;
  --ds-space-8: 64px;
  --ds-space-9: 96px;
  --ds-radius-sm: 6px;
  --ds-radius-md: 10px;
  --ds-radius-lg: 14px;
  --ds-radius-full: 999px;
  --ds-text-xs: 0.8125rem;
  --ds-text-sm: 0.875rem;
  --ds-text-md: 1rem;
  --ds-text-lg: 1.125rem;
  --ds-text-xl: 1.3125rem;
  --ds-text-2xl: 1.75rem;
  --ds-text-3xl: 2.5rem;
  --ds-leading-tight: 1.15;
  --ds-leading-body: 1.6;
  --ds-tracking-title: -0.035em;
  --ds-motion-fast: 100ms;
  --ds-motion-base: 180ms;
  --ds-motion-slow: 280ms;
  --ds-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ds-control-height: 44px;
  --ds-control-height-sm: 44px;
  --ds-control-height-lg: 52px;
  --ds-measure-text: 68ch;
  --ds-measure-page: 1040px;
  --ds-measure-form: 440px;
  --ds-z-sticky: 10;
  --ds-z-overlay: 30;
  --ds-z-toast: 50;
  --ds-border-width: 1px;
  --ds-z-floating: 100;
  --ds-focus-width: 3px;
  --ds-focus-offset: -4px;
  --ds-accent: #245b86;
  --ds-accent-hover: #194467;
  --ds-accent-ink: #ffffff;
  --ds-accent-text: #144b76;
  --ds-accent-soft: #e5f0f8;
  --ds-segment-fill: #1b4f72;
  --ds-segment-ink: #ffffff;
}
:root, [data-theme="light"] {
  --ds-bg: #f7f6f3;
  --ds-surface: #ffffff;
  --ds-surface-raised: #eeede9;
  --ds-surface-sunken: #e8e7e2;
  --ds-surface-hover: #e2e4e8;
  --ds-text: #1b2028;
  --ds-text-secondary: #434952;
  --ds-text-tertiary: #424952;
  --ds-border: #c5c9d0;
  --ds-border-soft: #dce0e5;
  --ds-border-control: #78808e;
  --ds-success: #185944;
  --ds-success-bg: #e4f3ec;
  --ds-warning: #6f4806;
  --ds-warning-bg: #fff0d1;
  --ds-danger: #961f1f;
  --ds-danger-bg: #fbe9e7;
  --ds-info: #1b527d;
  --ds-info-bg: #e7f0f8;
  --ds-shadow-sm: 0 2px 8px rgb(20 24 31 / 6%);
  --ds-shadow-lg: 0 22px 48px rgb(20 24 31 / 16%);
}
@media (prefers-color-scheme: dark) {
[data-theme="auto"] {
  --ds-bg: #14181f;
  --ds-surface: #1c222d;
  --ds-surface-raised: #252c38;
  --ds-surface-sunken: #0e1116;
  --ds-surface-hover: #303848;
  --ds-text: #f4f2ee;
  --ds-text-secondary: #cfc9c1;
  --ds-text-tertiary: #cfc9c1;
  --ds-border: #3a4453;
  --ds-border-soft: #2e3642;
  --ds-border-control: #7c8594;
  --ds-success: #78c7b1;
  --ds-success-bg: #192f2b;
  --ds-warning: #f2bf68;
  --ds-warning-bg: #352b1c;
  --ds-danger: #ff9b92;
  --ds-danger-bg: #3b2327;
  --ds-info: #96c5eb;
  --ds-info-bg: #1d2d40;
  --ds-shadow-sm: 0 2px 8px rgb(0 0 0 / 18%);
  --ds-shadow-lg: 0 22px 48px rgb(0 0 0 / 45%);
  --ds-accent: #7eb6db;
  --ds-accent-hover: #a1cdea;
  --ds-accent-ink: #0b1a28;
  --ds-accent-text: #98d0f5;
  --ds-accent-soft: #1e3041;
  --ds-segment-fill: #1b4f72;
  --ds-segment-ink: #ffffff;
}
}
[data-theme="light"] { color-scheme: light; }
[data-theme="auto"] { color-scheme: light dark; }

/* ---------- components.css ---------- */

.ds-button,
.ds-input,
.ds-choice,
.ds-field {
  box-sizing: border-box;
  font-family: var(--ds-font-sans);
}
.ds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: var(--ds-control-height);
  min-width: var(--ds-control-height);
  padding: 0 var(--ds-space-4);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-sm);
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--ds-motion-fast) var(--ds-ease);
}
.ds-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.ds-button--primary {
  background: var(--ds-accent);
  color: var(--ds-accent-ink);
}
.ds-button--primary:hover:not(:disabled) {
  background: var(--ds-accent-hover);
}
.ds-button--secondary {
  background: var(--ds-surface);
  border-color: var(--ds-border-control);
  color: var(--ds-text);
}
.ds-button--secondary:hover:not(:disabled),
.ds-button--ghost:hover:not(:disabled) {
  background: var(--ds-surface-hover);
}
.ds-button--ghost {
  color: var(--ds-text-secondary);
  background: transparent;
}
.ds-button--sm {
  min-height: var(--ds-control-height-sm);
  padding-inline: var(--ds-space-3);
  font-size: var(--ds-text-xs);
}
.ds-button--lg {
  min-height: var(--ds-control-height-lg);
  padding-inline: var(--ds-space-5);
  font-size: var(--ds-text-md);
}
.ds-button:disabled,
.ds-input:disabled,
.ds-choice:has(input:disabled) {
  opacity: 0.48;
  cursor: not-allowed;
}
.ds-link {
  color: var(--ds-accent-text);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.ds-link:hover {
  text-decoration-thickness: 2px;
}
.ds-field {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  min-width: 0;
  color: var(--ds-text);
}
.ds-label {
  color: var(--ds-text);
  font-size: var(--ds-text-sm);
  font-weight: 550;
  line-height: 1.4;
}
.ds-input {
  width: 100%;
  min-height: var(--ds-control-height);
  padding: 11px 12px;
  color: var(--ds-text);
  background: var(--ds-surface);
  border: 1px solid var(--ds-border-control);
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-md);
  line-height: 1.5;
}
.ds-input::placeholder {
  color: var(--ds-text-tertiary);
  opacity: 1;
}
.ds-input:hover:not(:disabled) {
  border-color: var(--ds-text-secondary);
}
.ds-input[aria-invalid='true'] {
  border-color: var(--ds-danger);
}
.ds-input[readonly] {
  background: var(--ds-surface-sunken);
}
.ds-textarea {
  resize: vertical;
  min-height: 104px;
}
.ds-hint,
.ds-error {
  margin: 0;
  font-size: var(--ds-text-xs);
  line-height: 1.5;
}
.ds-hint {
  color: var(--ds-text-secondary);
}
.ds-error {
  color: var(--ds-danger);
}
.ds-choice {
  min-height: var(--ds-control-height);
  min-width: var(--ds-control-height);
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
  cursor: pointer;
  position: relative;
}
.ds-choice input {
  accent-color: var(--ds-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
}

/* ---------- source-controls.css ---------- */

.ds-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
}
.ds-select-face {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 48px;
  margin: 0;
  padding: 8px 36px 8px 13px;
  background: var(--ds-surface-raised);
  color: var(--ds-text);
  border: 1px solid var(--ds-border-control);
  border-radius: 6px;
  font: 400 1rem/1.7 var(--ds-font-sans);
  letter-spacing: 0.01em;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.ds-select-face::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ds-border-control);
  border-bottom: 1.5px solid var(--ds-border-control);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.ds-select-face[aria-expanded='true'] {
  border-color: var(--ds-source-control-accent, var(--ds-accent-text));
}
.ds-select-face[aria-expanded='true']::after {
  transform: translateY(-20%) rotate(225deg);
}
.ds-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-select-menu {
  margin: 0;
  padding: 4px;
  background: var(--ds-surface-raised);
  border: 1px solid var(--ds-border-soft);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 45%);
  max-height: 280px;
}
.ds-select-option {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--ds-text);
  border: 0;
  border-radius: 6px;
  font: 400 16px/1.5 var(--ds-font-sans);
  letter-spacing: 0.01em;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  white-space: normal;
}
.ds-select-option[aria-selected='true'] {
  background: var(--ds-source-control-tint, var(--ds-accent-soft));
  box-shadow: inset 2px 0 0 var(--ds-source-control-accent, var(--ds-accent-text));
}
.ds-select-option + .ds-select-option {
  margin-top: 4px;
}
.ds-select-option.is-active,
.ds-select-option:hover {
  background: var(--ds-surface-hover);
}
.ds-select-option[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}
.ds-select-group {
  display: block;
  font-size: 12px;
  color: var(--ds-text-secondary);
}
.ds-select-face[aria-invalid='true'] {
  border-color: var(--ds-danger);
}
.ds-select-face:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ds-native-select {
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px auto;
  /* site: the design system inlines this chevron as a data: URI; the site's CSP (img-src 'self') does not
     allow data: images, so the same SVG is served as a file. */
  background-image: url('ds-chevron.svg');
  padding-right: 2.5rem;
  cursor: pointer;
}
@media (forced-colors: active) {
  .ds-select-option[aria-selected='true'] {
    outline: 2px solid Highlight;
  }
}

/* ---------- focus.css ---------- */

:is(.ds-button, .ds-link, .ds-input, .ds-choice input, .ds-select-face):focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-focus-color, var(--ds-accent-text));
  outline-offset: var(--ds-focus-offset);
}
.ds-button--primary {
  --ds-focus-color: var(--ds-accent-ink);
}
.ds-select-face {
  --ds-focus-color: var(--ds-accent-text);
}
.ds-choice input[type='checkbox']:checked {
  --ds-focus-color: var(--ds-accent-text);
}
/* Small native checkboxes need an outer ring; an inset ring has insufficient area. */
.ds-choice input[type]:focus-visible {
  outline-offset: 2px;
}
/* Underlining alone cannot guarantee the changed area required by SC 2.4.13. */
.ds-link:not(.ds-button):focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-focus-color, var(--ds-accent-text));
  outline-offset: 2px;
  text-decoration-line: underline;
  text-decoration-thickness: 3px;
  background-color: var(--ds-accent-soft);
}
.ds-button.ds-link:focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-focus-color, var(--ds-accent-text));
  text-decoration: none;
}
@media (forced-colors: active) {
  :is(.ds-button, .ds-link, .ds-input, .ds-choice input, .ds-select-face) {
    --ds-focus-color: CanvasText;
  }
}

/* ---------- site: glue ---------- */

/* site: the design system's enhancer positions the menu with inline styles in a fixed layer appended to <body>.
   This site's CSP forbids style attributes, so the menu is placed with CSS only: it lives in an anchor right
   after the hidden native select and opens below the trigger, or above it when the enhancer finds more room
   there (data-placement). Width follows the trigger; height is capped as in the design system (280px) and by
   the viewport. */
.ds-select-anchor {
  position: relative;
  display: block;
  min-width: 0;
}
.ds-select-anchor > .ds-select-menu {
  position: absolute;
  z-index: var(--ds-z-floating);
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  max-height: min(280px, 45vh);
  overflow: auto;
  font-family: var(--ds-font-sans);
}
.ds-select-anchor > .ds-select-menu[data-placement='top'] {
  top: auto;
  bottom: calc(100% + 4px);
}
/* site: anchors styled as buttons — the site underlines links on hover. */
a.ds-button:hover {
  text-decoration: none;
}
/* site: native buttons inherit nothing by default. */
button.ds-button {
  font-family: var(--ds-font-sans);
}
