/*
 * Foliocontrol Design System v1 — Foundations
 * Scope: fc-ds only. No global reset.
 * Status: Candidate
 */

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

.fc-ds {
    margin: 0;
    background: var(--fc-color-canvas);
    color: var(--fc-color-text);
    font-family: var(--fc-font-family-sans);
    font-size: var(--fc-font-size-md);
    line-height: var(--fc-line-height-normal);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.fc-ds :where(h1, h2, h3, p) {
    margin-block-start: 0;
}

.fc-ds :where(button, input, select, textarea) {
    font: inherit;
}

.fc-ds :where(svg) {
    display: block;
}

.fc-display {
    margin-block-end: var(--fc-space-5);
    color: var(--fc-color-text-strong);
    font-size: var(--fc-font-size-display);
    font-weight: var(--fc-font-weight-extrabold);
    letter-spacing: var(--fc-letter-spacing-tight);
    line-height: var(--fc-line-height-tight);
}

.fc-page-title {
    margin-block-end: var(--fc-space-3);
    color: var(--fc-color-text-strong);
    font-size: var(--fc-font-size-page-title);
    font-weight: var(--fc-font-weight-bold);
    letter-spacing: var(--fc-letter-spacing-tight);
    line-height: var(--fc-line-height-tight);
}

.fc-section-title {
    margin-block-end: var(--fc-space-4);
    color: var(--fc-color-text-strong);
    font-size: var(--fc-font-size-section-title);
    font-weight: var(--fc-font-weight-bold);
    letter-spacing: var(--fc-letter-spacing-tight);
    line-height: var(--fc-line-height-snug);
}

.fc-card-title {
    margin-block-end: var(--fc-space-2);
    color: var(--fc-color-text-strong);
    font-size: var(--fc-font-size-card-title);
    font-weight: var(--fc-font-weight-semibold);
    line-height: var(--fc-line-height-snug);
}

.fc-body {
    font-size: var(--fc-font-size-body);
    line-height: var(--fc-line-height-relaxed);
}

.fc-body-small {
    font-size: var(--fc-font-size-body-small);
    line-height: var(--fc-line-height-normal);
}

.fc-label-text {
    color: var(--fc-color-text);
    font-size: var(--fc-font-size-label);
    font-weight: var(--fc-font-weight-semibold);
    line-height: var(--fc-line-height-snug);
}

.fc-caption {
    color: var(--fc-color-text-muted);
    font-size: var(--fc-font-size-caption);
    line-height: var(--fc-line-height-normal);
}

.fc-eyebrow {
    color: var(--fc-color-brand);
    font-size: var(--fc-font-size-xs);
    font-weight: var(--fc-font-weight-bold);
    letter-spacing: var(--fc-letter-spacing-wider);
    line-height: var(--fc-line-height-normal);
    text-transform: uppercase;
}

.fc-link {
    color: var(--fc-color-text-link);
    font-weight: var(--fc-font-weight-semibold);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.fc-link:hover {
    color: var(--fc-color-text-link-hover);
    text-decoration-thickness: 2px;
}

.fc-ds:where(a, button, input, select, textarea, [tabindex]):focus-visible,
.fc-ds :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: var(--fc-border-width-2) solid var(--fc-color-focus);
    outline-offset: var(--fc-focus-ring-offset);
    box-shadow: var(--fc-focus-ring);
}

.fc-numeric,
.fc-financial-value {
    font-variant-numeric: tabular-nums lining-nums;
}

.fc-numeric {
    font-family: var(--fc-font-family-mono);
}

.fc-financial-value {
    color: var(--fc-color-text-strong);
    font-size: var(--fc-font-size-financial-value);
    font-weight: var(--fc-font-weight-bold);
    letter-spacing: var(--fc-letter-spacing-tight);
    line-height: var(--fc-line-height-snug);
}

.fc-financial-value--positive {
    color: var(--fc-color-financial-positive);
}

.fc-financial-value--negative {
    color: var(--fc-color-financial-negative);
}

.fc-financial-value--neutral {
    color: var(--fc-color-financial-neutral);
}

.fc-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.fc-container {
    width: min(100% - (2 * var(--fc-space-page-inline)), var(--fc-container-app));
    margin-inline: auto;
}

.fc-content-measure {
    max-width: var(--fc-content-measure);
}

.fc-stack {
    display: flex;
    flex-direction: column;
    gap: var(--fc-space-4);
}

.fc-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fc-space-3);
    align-items: center;
}

.fc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--fc-space-4);
}

.fc-ds [hidden] {
    display: none !important;
}

@media (max-width: 40rem) {
    .fc-display {
        font-size: var(--fc-font-size-4xl);
    }

    .fc-page-title {
        font-size: var(--fc-font-size-2xl);
    }

    .fc-container {
        width: min(100% - (2 * var(--fc-space-4)), var(--fc-container-app));
    }
}

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