/* Shared reading scale. This file loads after the page-specific art direction.
   Ad mockups, original evidence, headline faces and rolling digits keep their
   own typography; these rules target the website's readable UI and prose. */
:root {
  --reading-size: 16px;
  --note-size: 12px;
  --action-blue: #315fcf;
  --action-hover: #234baa;
}
body { font-size: var(--reading-size); }
body[class] :is(
  .section-copy, .hero-intro, .journey-prose p, .certificates-intro,
  .certificate-description, .direction-description > p,
  .timeline-item > p:not(.timeline-company), .service-card > p,
  .analysis-copy > p, .video-creative-caption > .video-description-preview
) {
  font-size: var(--reading-size);
  line-height: 1.75;
  letter-spacing: 0;
}
body[class] .hero-intro { max-width: min(100%, 42ch); }
body[class] .section-heading { align-items: flex-start; }
body[class] :is(.hero-copy, .section-heading > div, .analysis-copy) { min-width: 0; }

/* Compact labels stay distinct from paragraphs without becoming microtype. */
body[class] :is(
  .eyebrow, .small-label, .section-signature, .service-label, .timeline-date, .timeline-company,
  .certificate-issuer, .certificate-dates dt, .cv-format,
  .video-creative-format, .video-creative-duration, .video-text-format,
  .campaign-metrics-label, .campaign-metric dd > span,
  .campaign-workspace-header > span:last-child, .campaign-report-count,
  .campaign-report figcaption p, .campaign-workspace-footer,
  .campaign-viewer-kicker, .campaign-viewer-original,
  .trading-kicker, .trading-chart-caption, .trading-expand,
  .analysis-chart-heading > span, .analysis-chart-caption,
  .journal-metric dd > span, .journal-metrics-scope, .journal-sidebar-note,
  .journal-footnote p, .ledger-tag, .ledger-toolbar, .ledger-toolbar > span,
  .viewer-pagination > span, .viewer-zoom output, .trading-viewer-caption,
  .location-line, .contact-form-bottom > p
) {
  font-size: var(--note-size);
  line-height: 1.65;
}
body[class] .home-hero .hero-eyebrow { font-size: 14px; }
body[class] :is(.section-heading > .small-label, .ledger-tag) { white-space: normal; }
body[class] .section-signature { color: #9ca8bc; }
body[class] .tags > span { font-size: 12px; color: #a8afbf; }
body[class] .certificate-dates dd { font-size: 14px; }
body[class] :is(.certificates-wallet, .certificate-verify, .card-cta) { font-size: 14px; }
body[class] .profile-facts .fact-label { font-size: 14px; }

/* Main actions: a readable label within a comfortable native hit area. */
body[class] .button,
body[class] .hero .hero-buttons .button,
body[class] .cv-downloads .button {
  min-height: 46px;
  max-width: 100%;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
}
body[class] .button :is(span, .button-icon) { min-width: 0; }
body[class] .button :is(svg, .button-icon) { flex-shrink: 0; }
body[class] .button:is(.primary, .light) { background: var(--action-blue); color: #fff; }
body[class] .button:is(.primary, .light):hover { background: var(--action-hover); }
body[class] .button.text-button,
body[class] .hero .hero-buttons .text-button {
  padding-inline: 0;
  gap: 10px;
  color: #c6cbd7;
  font-size: 14px;
}
body[class] .hero .hero-buttons { flex-wrap: wrap; gap: 14px 20px; }
body[class] .contact-meta a { font-size: 14px; }
body[class] .toast { font-size: 14px; }

/* The existing header stays aligned with the page container. */
.site-header .header-inner { gap: 16px; }
.site-header .nav { gap: 16px; }
.site-header .nav > a { font-size: 14px; }
.site-header .header-actions { gap: 12px; }
.site-header .language { font-size: 12px; }
.site-header .header-cv-downloads .header-cv { font-size: 14px; }
.site-header .header-cv:not(.header-cv--outline) { background: var(--action-blue); }
.site-header .header-cv:not(.header-cv--outline):hover { background: var(--action-hover); }
@media (max-width: 1240px) {
  .site-header { height: 82px; }
  .site-header .brand.brand--custom { width: 240px; }
  .site-header .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 81px;
    margin: 0;
    padding: 16px 8%;
    background: #101015;
    border-bottom: 1px solid #2b2d38;
    box-shadow: 0 18px 30px #0005;
  }
  .site-header .nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-header .nav > a { font-size: 17px; padding: 12px 0; }
  .site-header .header-actions { margin-left: auto; }
  .site-header .menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; }
}

/* Readable supporting controls and metrics on the two portfolio pages. */
body[class] :is(.campaign-metric dt, .journal-metric dt) { min-height: 39px; font-size: 13px; line-height: 1.5; }
body[class] .campaign-tabs button { font-size: 14px; }
body[class] :is(.campaign-report-expand, .video-creative-play, .video-description summary) { font-size: 14px; }
body[class] .video-description-preview { min-height: 5.25em; max-height: 5.25em; }
body[class] .video-text-body { font-size: 16px; line-height: 1.75; }
body[class] #campaign-report-viewer-hint { font-size: 12px; line-height: 1.65; }
body[class] :is(.video-text-header > div, .campaign-viewer-header > div, .trading-viewer-header > div) { min-width: 0; }
body[class] :is(.video-text-close, .video-viewer-close, .creative-viewer-close, .campaign-viewer-close, .viewer-close) { font-size: 14px; }
body[class] :is(.campaign-viewer-tools button, .trading-viewer-tools > a, .viewer-zoom [data-viewer-fit]) { font-size: 13px; }
body[class] .campaign-viewer-tools :is([data-report-previous], [data-report-next]) { font-size: 20px; }
body[class] .gold-hero-meta { flex-wrap: wrap; gap: 20px 28px; }
body[class] .gold-hero-meta strong { font-size: 14px; }
body[class] .journal-tab-label strong { font-size: 15px; }
body[class] .video-viewer-header h3 { font-size: 14px; }
body[class] :is(.trading-chart-caption, .analysis-chart-caption, .ledger-heading, .ledger-toolbar) { flex-wrap: wrap; }
body[class] .ledger-toolbar a { min-height: 44px; font-size: 14px; }
body[class] .journal-closing a { max-width: 100%; font-size: 14px; gap: 12px; }
body[class] .campaign-viewer-tools { flex-wrap: wrap; }

/* Footer links and contact details carry useful information. */
body[class] :is(.footer-nav a, .back-top) { font-size: 14px; line-height: 1.6; }
body[class] .footer-nav { flex-wrap: wrap; gap: 12px 24px; }
body[class] .back-top { gap: 10px; }
body[class] .footer-bottom { font-size: 12px; line-height: 1.7; color: #a3aab9; gap: 12px 24px; flex-wrap: wrap; }
body[class] .contact-submit { font-size: 14px; }

@media (max-width: 860px) {
  body[class] .campaign-metric:last-child dt { min-height: 0; }
  /* Short FX labels keep both actions on one row, including 320px phones. */
  body.page-markets .gold-hero .hero-buttons { flex-wrap: nowrap; gap: 14px; }
  body.page-markets .gold-hero .hero-buttons .button { flex: 0 1 auto; gap: 8px; white-space: nowrap; }
  body.page-markets .gold-hero .hero-buttons .button.primary { padding-inline: 14px; }
}
@media (max-width: 680px) {
  .site-header { height: 78px; }
  .site-header .header-inner { gap: 12px; }
  .site-header .header-actions { gap: 10px; }
  .site-header .brand.brand--custom { width: clamp(144px, 48vw, 220px); max-width: calc(100% - 122px); }
  .site-header .nav { top: 77px; padding-inline: 20px; }
  body[class] .home-hero .hero-eyebrow { font-size: 12px; }
  body[class] .hero .hero-buttons { gap: 12px 16px; }
  body[class] .profile-facts .fact-label { font-size: 15px; }
  body[class] .campaign-workspace-header { flex-wrap: wrap; }
  body[class] .campaign-workspace-header strong { font-size: 14px; }
  body[class] .campaign-tabs button { padding-inline: 10px; }
  body[class] .video-creative-play { gap: 6px; font-size: 13px; }
  body[class] .video-text-header { gap: 12px; }
  body[class] .video-text-close { gap: 7px; }
  body[class] footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
  body[class] .footer-brand.footer-brand--custom { width: min(100%, 250px); }
  body[class] .footer-nav { order: initial; width: 100%; margin: 0; gap: 12px 20px; }
  body[class] .back-top { justify-self: start; margin-left: 0; }
  body[class] .footer-bottom > span:last-child { max-width: none; text-align: left; }
}
@media (max-width: 370px) {
  .site-header .header-inner { gap: 8px; }
  .site-header .header-actions { gap: 8px; }
  body[class] .hero .hero-buttons { gap: 10px 14px; }
}
@media (min-width: 681px) and (max-width: 1360px) {
  html[lang="bg"] .home-hero .profile-title { font-size: clamp(42px, 5.05vw, 84px); }
}
