/* One type system for the catalogue, account, administration and static pages.
   Page styles may control layout; font families and the size scale live here. */
:root {
    --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --text-micro: 12px;
    --text-caption: 14px;
    --text-body: 16px;
    --text-subheading: 18px;
    --text-section: 24px;
    --text-title: 28px;
    --text-display: 36px;
    --text-display-large: 48px;
    --text-icon: 60px;
    --text-error-code: 120px;
}
/* Secondary text needs a light palette on the dark footer. */
footer {
    --color-text-light: #c4cfdb;
    --color-text-muted: #c4cfdb;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    font-variant-numeric: lining-nums tabular-nums;
}
input, select, textarea, button {
    font-family: var(--font-body);
    font-variant-numeric: lining-nums tabular-nums;
}
h1, h2, .logo, .footer-logo-text, .hero-title, .page-title,
.search-title, .section-title, .product-title, .error-title, .verify-title {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}
h1, .page-title, .search-title, .product-title, .error-title,
.page-header h1, .press-header h1, .dictionary-hero h1,
.auth-header h1, .verify-title {
    font-size: var(--text-title);
}
h2, .section-title { font-size: var(--text-section); }
h3, h4, h5, h6, .card-title, .panel-title, .modal-title,
.news-title, .term-title, .rules-section-title, .legal-section-title,
.sidebar-category-title, .sidebar-lot-of-day-title, .sidebar-banner-title {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.4;
    font-size: var(--text-subheading);
}
h4, h5, h6, .panel-title, .footer-column h3, .sidebar-banner-title {
    font-size: var(--text-body);
}
.hero-title { font-size: clamp(var(--text-title), 4vw, var(--text-display)); }
.logo, .footer-logo-text { font-size: var(--text-section); }

/* A card has identical text and prices in the catalogue, search and favourites. */
.item-info h3, .favorite-title, .lot-name, .sidebar-lot-name {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 600;
    line-height: 1.4;
}
.item-info h3 { height: 2.8em; }
.item-type, .product-subtitle, .file-hint, .password-hint, .stat-label,
.hero-stat-lbl, .table-cell-small, .table-cell-muted, .section-meta, small {
    font-size: var(--text-caption);
    line-height: 1.5;
}
.item-price, .lot-price, .favorite-price, .product-price,
.sidebar-lot-of-day .lot-price, .hero-lot-of-day .lot-price,
.stat-number, .stat-value, .hero-stat-num, .countdown-num, .error-code {
    font-family: var(--font-body);
    font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: normal;
}
.item-price, .lot-price, .favorite-price,
.sidebar-lot-of-day .lot-price, .hero-lot-of-day .lot-price {
    font-size: var(--text-subheading);
    line-height: 1.4;
    white-space: nowrap;
}
.product-price, .stat-number, .stat-value, .countdown-num {
    font-size: var(--text-display);
    line-height: 1.2;
}
.hero-stat-num { font-size: var(--text-section); }
.error-code { font-size: clamp(72px, 20vw, var(--text-error-code)); line-height: 1; }

/* The same form and table rules also apply inside page-specific panels. */
.form-group label, .auth-form label, .profile-card label {
    font-size: var(--text-caption);
    font-weight: 600;
    line-height: 1.5;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea,
.form-group input, .form-group select, .form-group textarea,
.auth-form input[type="text"], .auth-form input[type="password"], .auth-form input[type="email"] {
    font-size: var(--text-body);
    line-height: 1.5;
}
button, .btn, .btn-primary, .primary-button, .secondary-button,
.auth-form button[type="submit"] {
    font-size: var(--text-body);
    font-weight: 600;
    line-height: 1.4;
}
.btn-sm, .bid-btn, .filter-bar button, .tab-button, .edit-btn,
.sidebar-lot-of-day .lot-btn, .hero-lot-of-day .lot-btn {
    font-size: var(--text-caption);
    line-height: 1.4;
}
table { font-family: var(--font-body); font-size: var(--text-caption); line-height: 1.5; }
th { font-weight: 600; font-size: var(--text-caption); }
td { font-variant-numeric: lining-nums tabular-nums; }

/* Page-local search styles must not undo the shared card layout. */
.price-row { flex-wrap: wrap; gap: 10px; }
@media (max-width: 768px) {
    .auction-items { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
}
@media (max-width: 480px) {
    .item-info { padding: 14px; }
    .price-row { flex-direction: column; align-items: flex-start; }
    .item-type { overflow-wrap: anywhere; }
}
