/* Custom overrides beyond Tailwind */
body {
    font-size: 16px;
    line-height: 25px;
    font-variant-numeric: tabular-nums;
}

.wordmark {
    font-weight: 700;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tabular-nums,
.numeric {
    font-variant-numeric: tabular-nums;
}

.provenance-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #D8D0C4;
    background: #FBF8F2;
    color: #171412;
    padding: 2px 6px;
    font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contract-row {
    transition: background-color 150ms ease;
}

.contract-row:hover {
    background: #FBF8F2;
}

@media (min-width: 640px) {
    .contract-row {
        padding-left: 16px;
        padding-right: 16px;
        margin-left: -16px;
        margin-right: -16px;
    }
}

.save-star[aria-disabled="true"] {
    cursor: default;
}

.htmx-indicator {
    display: none;
    opacity: 0;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: block;
    opacity: 1;
}

.progress-rule {
    display: block;
    height: 1px;
    min-width: 80px;
    background: #D8D0C4;
    overflow: hidden;
    position: relative;
}

.progress-rule::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -35%;
    width: 35%;
    background: #4A1F2A;
    animation: progress-rule 1200ms linear infinite;
}

@keyframes progress-rule {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(390%);
    }
}

@keyframes fade-only {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fade-only 150ms ease-out;
}

.htmx-swapping .contract-results-inner {
    opacity: 0;
    transition: opacity 150ms ease;
}

.htmx-settling .contract-results-inner {
    opacity: 1;
    transition: opacity 150ms ease;
}

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