/* Explain: App-specific component styles for buttons, cards, and forms. */
/* ---------- Buttons ---------- */
.cf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.cf-btn:hover { transform: translateY(-1px); }
.cf-btn:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

.cf-btn-accent {
    background: var(--accent-color);
    color: #ffffff;
}
.cf-btn-accent:hover { background: var(--accent-hover); }

.cf-btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}
.cf-btn-primary:hover { background: var(--primary-hover); }

.cf-btn-outline {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-color);
}
.cf-btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cf-btn-ghost-light {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}
.cf-btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ---------- Header / nav ---------- */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover, .nav-link:focus-visible {
    color: var(--primary-color);
    background: var(--surface-color);
    outline: none;
}

.mobile-link {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
}
.mobile-link:hover, .mobile-link:focus-visible {
    color: var(--primary-color);
    outline: none;
}

/* ---------- Cards ---------- */
.system-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.system-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lift);
}
.system-card img { transition: transform 0.6s ease; }
.system-card:hover img { transform: scale(1.05); }

.proj-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.proj-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.22s ease;
}
.filter-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.filter-chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* ---------- Specs & forms ---------- */
.spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.field-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-status {
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}
.form-status-ok { background: #e6f6ec; color: #12683a; }
.form-status-error { background: #fdeceb; color: #a3231a; }

.data-table {
    width: 100%;
    min-width: 46rem;
    border-collapse: collapse;
    background: #ffffff;
}
.data-table th, .data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.875rem;
}
.data-table th {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-color);
}
.data-table td:first-child { font-weight: 600; color: var(--text-color); }
.data-table tbody tr:hover td { background: var(--surface-color); }

/* ---------- Article body ---------- */
.article-body {
    font-size: 1.02rem;
    color: var(--text-color);
}
.article-body > * + * { margin-top: 1.1rem; }
.article-body h2 {
    margin-top: 2.1rem;
    font-size: clamp(1.3rem, 2.4vw, 1.55rem);
}
.article-body h3 {
    margin-top: 1.6rem;
    font-size: 1.15rem;
}
.article-body ul, .article-body ol {
    margin-top: 1rem;
    padding-left: 1.3rem;
    list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: 0.5rem; }
.article-body a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.article-body a:hover { color: var(--accent-hover); }
.article-body strong { font-weight: 700; }
.article-body img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}