/* Typography — ONE rule for the whole site (loaded last, after the old 2015 CSS).
   Three fonts only (named in theme.css):
     --f-title  Playfair Display  → titles, painting and artist names
     --f-ui     Inter             → menus, the path at the top, buttons, labels, the footer
     --f-read   Source Serif 4    → stories, legal texts, comments, biographies (long reading)
   Tahoma / Verdana / Georgia from the old site are no longer used anywhere. */

body {
    font-family: var(--f-ui); font-size: var(--fs-body); line-height: var(--lh-ui);
    font-variant-numeric: lining-nums;
}

button, input, select, textarea { font-family: var(--f-ui) !important; }

/* One heading system. Component rules may change colour or responsive size,
   but every heading and artwork/artist name uses the same title face. */
h1, h2, h3, h4, h5, h6,
#page_bar > span, .cap-t, .author-n, .artist-name, .art-title, .potd-title,
.feed-title, .great-artist-info h2, .more-site-title, .more-banner-title,
.acc-title, .page-panel h2, .studio-main h2, .sn-name, .stat-n {
    font-family: var(--f-title) !important;
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
}
h1 { font-size: 32px; line-height: 1.15; margin: 0 0 18px; }
h2 { font-size: var(--fs-heading); line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
h4, h5, h6 { line-height: 1.35; }

/* UI copy and metadata share one compact rhythm. */
#menu, #login_panel, #languages, #alphabet_holder, #page_bar form,
.cap-a, .artist-meta, .art-artist, .art-facts, .feed-artist,
.great-artist-years, .great-artist-meta, .badge, .price,
.form-card, .acc-card, .search-results, .more-site-text, .more-banner-text,
.empty-note, .muted, .notice {
    font-family: var(--f-ui) !important;
}

/* The path at the top ("Начало > Архив"): the same on every page */
#breadcrumb span, #breadcrumb a {
    font: 500 14.5px/1.5 var(--f-ui) !important; letter-spacing: .01em; text-transform: none;
    text-decoration: none !important;
}
#breadcrumb { text-align: left !important; color: #e8dfd2 !important; }
#breadcrumb a { color: #c1b7a8 !important; }
#breadcrumb a:hover { color: var(--c-text-hover) !important; }

/* Footer */
#foother, #foother span, #foother a { font: 12.5px/1.6 var(--f-ui) !important; }
#foother span { color: #8f877a; }
#foother a { color: #b9ad97 !important; text-decoration: none !important; margin-left: 12px; }
#foother a:hover { color: var(--c-text-hover) !important; }

/* Long reading */
.feed-excerpt, .potd-desc, .art-story p, .legal p, .legal li, .ly-text, .ex-text,
#view_comments .c-text, .artist-bio, .contact-box p {
    font-family: var(--f-read) !important; line-height: var(--lh-reading);
}

.legal p, .legal li, .artist-bio, .art-story p, .feed-excerpt, .potd-desc {
    font-size: var(--fs-body) !important;
}

/* CJK has no upper/lower-case distinction and wide tracking harms legibility. */
:lang(zh) #menu, :lang(ja) #menu,
:lang(zh) .art-section-title, :lang(ja) .art-section-title,
:lang(zh) .feed-section-title, :lang(ja) .feed-section-title,
:lang(zh) .search-results h3, :lang(ja) .search-results h3 {
    letter-spacing: .04em !important; text-transform: none;
}

/* Names in the picture grids: clean, underlined only on hover */
.card a.image, .card a.image:hover { text-decoration: none !important; }       /* the whole card is one link */
.card a.image:hover .cap-t { text-decoration: underline; text-underline-offset: 3px; }

/* The list of artists (Archive, letters) */
.archive_list a { font: 500 13.5px/1.35 var(--f-ui) !important; }
.cap-a { font-family: var(--f-ui) !important; }

/* Contact page */
.contact-box { max-width: 640px; margin: 10px auto 24px !important; text-align: center; float: none !important; }
.contact-box h2 { font: 600 26px/1.2 var(--f-title) !important; color: #f3efe6 !important; margin: 6px 0 14px; }
.contact-box p { font-size: 17px !important; line-height: 1.65; color: #dcd4c6 !important; }
.contact-box .contact-mail { margin: 18px 0 22px; }
.contact-box .contact-mail a { font: 600 22px var(--f-ui) !important; color: var(--c-text) !important; text-decoration: none !important; }
.contact-box .muted { font-size: 15px !important; color: #a99f8f !important; }

/* Comments on the painting page */
#view_comments .vc-title { display: block; font: 600 24px/1.2 var(--f-title) !important; color: #f3efe6 !important; margin: 4px 0 12px; }
#view_comments .comment-login { text-align: center; margin: 14px 0 6px; }
#view_comments .comment-login a {
    display: inline-block; padding: 9px 18px; border: 1px solid var(--c-line); border-radius: 999px;
    font: 500 14px var(--f-ui) !important; color: var(--c-text) !important; text-decoration: none !important;
}
#view_comments .comment-login a:hover { background: var(--c-glow); color: var(--c-text-hover) !important; }
#view_comments .empty-note { text-align: center; font-family: var(--f-ui); }
