/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Reusable Heritage calculator cards for Explorer, author profiles and related results.
 */
.hw-page .hcalc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    max-width: none;
    align-items: stretch;
}
.hw-page .hcalc-grid.g25-grid--hidden { display: none; }
.hw-page .hcalc-card {
    display: flex; flex-direction: column; min-width: 0; height: 100%;
    background: var(--hd-surface); border: 1px solid var(--hd-border); border-radius: 14px;
    color: var(--hd-ink); font-family: var(--hd-sans); overflow: hidden;
}
.hw-page .hcalc-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; padding: 20px 20px 0; }
.hw-page .hcalc-popularity { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; background: var(--hd-sage); color: var(--hd-forest); font-size: .65rem; font-weight: 600; line-height: 1.4; }
.hw-page .hcalc-date { color: #686b61; font-size: .7rem; }
.hw-page .hcalc-card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 0; }
.hw-page .hcalc-title { margin: 0 0 14px; color: var(--hd-forest); font: 600 1.65rem/1.15 var(--hd-serif); overflow-wrap: anywhere; }
.hw-page .hcalc-title a { color: inherit; text-decoration: none; }
.hw-page .hcalc-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hw-page .hcalc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hw-page .hcalc-tag { max-width: 100%; padding: 4px 8px; border-radius: 5px; background: var(--hd-cream); border: 1px solid var(--hd-border); color: #65583e; font-size: .7rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.hw-page .hcalc-tag--scale { background: #f3f6f0; color: #476044; border-color: #dce5d6; }
.hw-page .hcalc-tag--quiet { background: #fff; color: #62675d; }
.hw-page .hcalc-author { display: flex; align-items: baseline; gap: 8px; margin: 0 0 18px; color: #62675d; font-size: .8rem; line-height: 1.5; }
.hw-page .hcalc-author > span { min-width: 0; overflow-wrap: anywhere; }
.hw-page .hcalc-author a { color: var(--hd-forest); font-weight: 500; text-decoration: none; }
.hw-page .hcalc-author a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hw-page .hcalc-description { color: #62675d; font-size: .82rem; line-height: 1.65; margin: 0 0 16px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hw-page .hcalc-release { font-size: .7rem; color: #686b61; margin: 0 0 16px; }
.hw-page .hcalc-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: auto 0 0; padding: 18px 0; border-block: 1px solid var(--hd-border); }
.hw-page .hcalc-stats > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hw-page .hcalc-stats > div + div { padding-left: 16px; border-left: 1px solid var(--hd-border); }
.hw-page .hcalc-stats dt { font: 400 .72rem/1.4 var(--hd-sans); color: #62675d; overflow-wrap: anywhere; }
.hw-page .hcalc-stats dd { order: -1; margin: 0; color: var(--hd-forest); font: 600 1.5rem/1.15 var(--hd-sans); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hw-page .hcalc-rating-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; padding: 14px 0; font-size: .72rem; color: #62675d; }
.hw-page .hcalc-rating { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 5px; }
.hw-page .hcalc-rating strong { color: var(--hd-forest); font-size: .83rem; }
.hw-page .hcalc-rating .dna-icon { color: #80683b; align-self: center; }
.hw-page .hcalc-runs { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hw-page .hcalc-actions { display: flex; gap: 10px; padding: 0 20px 20px; }
.hw-page .hcalc-button { flex: 1; min-width: 0; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 8px; border: 1px solid #cad3c4; padding: 10px 12px; text-align: center; text-decoration: none; font: 600 .8rem/1.4 var(--hd-sans); }
.hw-page .hcalc-button--secondary { background: #fff; color: var(--hd-forest); }
.hw-page .hcalc-button--secondary:hover { background: var(--hd-bg); color: var(--hd-forest); }
.hw-page .hcalc-button--primary { background: var(--hd-forest); border-color: var(--hd-forest); color: #fff; }
.hw-page .hcalc-button--primary:hover { background: #172a21; color: #fff; }
.hw-page .hcalc-card a:focus-visible { outline: 3px solid #426b52; outline-offset: 3px; }
.hw-page .hcalc-card .dna-icon { flex-shrink: 0; }
@media (max-width: 575.98px) { .hw-page .hcalc-grid { grid-template-columns: minmax(0,1fr); gap: 16px; } }
@media print { .hw-page .hcalc-card { break-inside: avoid; } .hw-page .hcalc-actions { display: none; } }
