body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.font-display {
  font-family: 'Söhne', 'Avenir Next', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*:focus-visible {
  outline: 2px solid var(--color-primary, #ffa31a);
  outline-offset: 2px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.nav-dropdown-scroll::-webkit-scrollbar {
  width: 6px;
}

.nav-dropdown-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(113, 113, 122, 0.45);
  border-radius: 9999px;
}

.nav-dropdown-scroll {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.prose h2 {
  font-family: 'Söhne', 'Avenir Next', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #18181b;
  scroll-margin-top: 6rem;
}

.prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 6rem;
}

.prose p {
  line-height: 1.75;
  margin-bottom: 1rem;
  color: #3f3f46;
}

.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  line-height: 1.75;
  color: #3f3f46;
  margin-bottom: 0.25rem;
}

.prose a {
  color: var(--color-primary, #ffa31a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--color-primary-hover, #ffb01f);
}

.glossary-term {
  border-bottom: 1px dotted var(--brand-400, #ffb01f);
  cursor: help;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

.wc-input,
.wc-money-field,
.wc-percent-field,
select.wc-input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background-color: var(--color-surface-2);
  color: var(--color-fg);
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wc-input,
select.wc-input {
  display: block;
  padding: 0.75rem 1rem;
  outline: none;
  appearance: none;
}

.wc-input--compact {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.wc-input:focus,
.wc-input:focus-visible,
select.wc-input:focus,
select.wc-input:focus-visible,
.wc-money-field:focus-within,
.wc-percent-field:focus-within {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 2px rgba(255, 163, 26, 0.2);
}

.wc-input::placeholder {
  color: var(--color-muted-2);
}

.wc-input:-webkit-autofill,
.wc-input:-webkit-autofill:hover,
.wc-input:-webkit-autofill:focus,
.wc-input:-webkit-autofill:active,
.wc-money-field input:-webkit-autofill,
.wc-money-field input:-webkit-autofill:hover,
.wc-money-field input:-webkit-autofill:focus,
.wc-money-field input:-webkit-autofill:active,
.wc-percent-field input:-webkit-autofill,
.wc-percent-field input:-webkit-autofill:hover,
.wc-percent-field input:-webkit-autofill:focus,
.wc-percent-field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--color-surface-2) inset;
  box-shadow: 0 0 0 1000px var(--color-surface-2) inset;
  -webkit-text-fill-color: var(--color-fg);
  caret-color: var(--color-fg);
  transition: background-color 5000s ease-in-out 0s;
}

.wc-money-field,
.wc-percent-field {
  display: flex;
  align-items: stretch;
  padding: 0;
}

.wc-money-field > span,
.wc-percent-field > span {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: inherit;
  background-color: transparent;
}

.wc-money-field > span {
  padding-left: 0.875rem;
  padding-right: 0.375rem;
}

.wc-percent-field > span {
  padding-left: 0.375rem;
  padding-right: 0.875rem;
}

.wc-money-field input,
.wc-percent-field input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  outline: none;
  box-shadow: none;
  border-radius: 0;
  appearance: none;
  background-color: transparent;
  color: inherit;
  font-size: 0.875rem;
}

.wc-money-field input {
  padding: 0.75rem 1rem 0.75rem 0;
}

.wc-percent-field input {
  padding: 0.75rem 0 0.75rem 1rem;
}

.wc-money-field input:focus,
.wc-money-field input:focus-visible,
.wc-percent-field input:focus,
.wc-percent-field input:focus-visible {
  outline: none;
  box-shadow: none;
}
