/**
 * AutoTaktas UX system
 * Shared typography, rhythm, form and accessibility rules for every template.
 */

:root {
  --at-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --at-type-display: clamp(44px, 4vw, 56px);
  --at-type-page: clamp(40px, 3.6vw, 50px);
  --at-type-section: clamp(27px, 2.35vw, 32px);
  --at-type-content-h2: clamp(24px, 2.05vw, 28px);
  --at-type-content-h3: clamp(20px, 1.7vw, 22px);
  --at-type-card: 18px;
  --at-type-body: 16px;
  --at-type-prose: 17px;
  --at-type-small: 14px;
  --at-type-meta: 13px;
  --at-leading-display: 1.06;
  --at-leading-heading: 1.22;
  --at-leading-body: 1.65;
  --at-leading-prose: 1.78;
  --at-space-section: clamp(52px, 6vw, 82px);
  --at-radius-control: 6px;
  --at-focus: 0 0 0 3px rgba(255, 196, 0, .42);

  /* Keep legacy prototypes on the same brand palette. */
  --blue: #8a6500;
  --blue-dark: #654900;
  --blue-2: #765600;
  --red: #ffc400;
  --red-dark: #dca900;
}

html {
  font-size: 16px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body.autotaktas-prototype {
  color: #15171a;
  font-family: var(--at-font-sans) !important;
  font-size: var(--at-type-body);
  line-height: var(--at-leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.autotaktas-prototype :where(button, input, select, textarea) {
  font-family: var(--at-font-sans) !important;
}

body.autotaktas-prototype main :where(h1, h2, h3) {
  font-family: var(--at-font-sans) !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.autotaktas-prototype main :where(p, li) {
  overflow-wrap: break-word;
}

/* One scale for every page-level title. */
body.home main .hero h1,
body.autotaktas-prototype main .category-hero h1,
body.autotaktas-prototype main .author-hero h1,
body.autotaktas-prototype main .page-intro h1,
body.autotaktas-prototype main .article-head h1,
body.autotaktas-prototype main .at-directory h1,
body.autotaktas-prototype main.at-directory h1,
body.autotaktas-prototype main .at-article-header h1,
body.autotaktas-prototype main .hero-copy h1,
body.page-template-template-contact-php main .hero h1,
body.page-template-template-about-php main .hero h1,
body.page-template-template-advertising-php main .hero h1 {
  margin-top: 0;
  font-size: var(--at-type-display) !important;
  font-weight: 800 !important;
  line-height: var(--at-leading-display) !important;
  letter-spacing: -.038em !important;
}

/* Section headings represent the next level in every template. */
body.autotaktas-prototype main :where(.section-heading, .at-section-heading) > h2,
body.autotaktas-prototype main h2.section-title,
body.page-template-template-contact-php main :where(.contact-details, .form-card) > h2,
body.autotaktas-prototype main .at-activity-index > h2 {
  font-size: var(--at-type-section) !important;
  font-weight: 800 !important;
  line-height: var(--at-leading-heading) !important;
  letter-spacing: -.025em;
}

/* Reading-content hierarchy. */
body.autotaktas-prototype main :where(.at-article-content, .policy-content, .info-panel) h2,
body[class*="calculator"] main :where(.results, .at-results) > h2 {
  font-size: var(--at-type-content-h2) !important;
  font-weight: 800 !important;
  line-height: var(--at-leading-heading) !important;
  letter-spacing: -.02em;
}

body.autotaktas-prototype main :where(.at-article-content, .policy-content, .info-panel) h3 {
  font-size: var(--at-type-content-h3) !important;
  line-height: 1.3 !important;
}

/* Reusable card titles. */
body.home main .article-card:not(:first-child) h3,
body.home main .company-carousel h3,
body.blog main .article-copy h2,
body.category main .article-copy h2,
body.author main .article-copy h3,
body.autotaktas-prototype main .at-company-main h2,
body.autotaktas-prototype main .at-related-grid h3,
body.single-autotaktas_company main .card h2 {
  font-size: var(--at-type-card) !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  letter-spacing: -.012em;
}

/* Auxiliary panels remain subordinate, but never microscopic. */
body.autotaktas-prototype main :where(.side-card, .at-article-toc, .at-sidebar-related) h2 {
  font-size: 18px !important;
  line-height: 1.3 !important;
}

body.autotaktas-prototype main .at-filter-section h2 {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

/* Comfortable reading sizes. */
body.autotaktas-prototype main :where(.at-article-content, .policy-content) {
  font-size: var(--at-type-prose) !important;
  line-height: var(--at-leading-prose) !important;
}

body.autotaktas-prototype main :where(.at-article-lead, .at-directory-lead, .hero-content > p, .profile-copy p) {
  font-size: 16px !important;
  line-height: 1.65 !important;
}

body.blog main .article-copy p,
body.category main .article-copy p,
body.author main .article-copy p,
body.home main .company-carousel p,
body.autotaktas-prototype main .at-company-description,
body.autotaktas-prototype main .at-company-main > p,
body[class*="calculator"] main .info-panel p,
body[class*="calculator"] main .info-panel li {
  color: #505760 !important;
  font-size: var(--at-type-small) !important;
  line-height: 1.62 !important;
}

body.home main .company-carousel p {
  min-height: 68px;
}

/* Categories, metadata and labels use a controlled two-step small-text scale. */
body.autotaktas-prototype main :where(.article-category, .at-article-category, .at-related-category) {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body.autotaktas-prototype main :where(.article-meta, .at-article-meta, .hero-meta),
body.home main .article-card footer,
body.home main .company-carousel footer,
body.autotaktas-prototype main .at-company-meta {
  font-size: var(--at-type-meta) !important;
  line-height: 1.45 !important;
}

body.autotaktas-prototype main :where(.breadcrumbs, .at-breadcrumbs) {
  font-size: var(--at-type-meta) !important;
  line-height: 1.4 !important;
}

/* Controls: minimum readable text and WCAG-sized pointer targets. */
body.autotaktas-prototype main :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 46px;
  font-size: 16px !important;
  line-height: 1.4;
}

body.autotaktas-prototype main :where(
  .topic-tab,
  .faq-question,
  .calculate-button,
  .wpcf7-submit,
  .yellow-button,
  .btn,
  .at-filter-submit,
  .at-filter-reset,
  .at-directory button[type="submit"]
) {
  min-height: 44px;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

body.autotaktas-prototype main .topic-tabs {
  gap: 10px;
}

body.autotaktas-prototype main .topic-tab {
  padding-inline: 16px;
}

body.home main .popular-searches button,
body.autotaktas-prototype main .pagination button,
body.autotaktas-prototype main .tag-cloud button,
body.autotaktas-prototype main .newsletter-card button {
  min-width: 44px;
  min-height: 44px;
  height: auto;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

body.home main .popular-searches button {
  padding: 9px 14px;
}

body.autotaktas-prototype main .tag-cloud button {
  padding: 8px 12px;
}

body.autotaktas-prototype main :where(.side-card p, .side-card li, .faq-answer p) {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

body.autotaktas-prototype main .side-card small {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

body.home main .promo p,
body.page-template-template-contact-php main :where(.map-card p, .newsletter-copy p),
body.page-template-template-about-php main :where(.hero-copy, .cta-copy p),
body.page-template-template-advertising-php main .hero-copy {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

body.autotaktas-prototype main .at-article-share button,
body.autotaktas-prototype main .at-author-card p {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

body.autotaktas-prototype main :where(.at-article-share a, .at-article-share button) {
  min-height: 44px;
}

body.autotaktas-prototype main :where(.at-article-share a, .at-article-share button) {
  min-width: 44px;
}

body.autotaktas-prototype main .comment-form .submit {
  min-height: 44px !important;
  height: 44px !important;
}

body.single-autotaktas_company main :where(.share-row a, .share-row button) {
  width: 36px;
  height: 36px;
  font-size: 13px !important;
}

body.single-autotaktas_company main .show-more {
  min-height: 44px;
  padding-block: 8px;
  font-size: 14px !important;
}

body.autotaktas-prototype main .at-check {
  min-height: 44px;
  font-size: 14px !important;
}

body.autotaktas-prototype main .at-check input {
  width: 20px;
  height: 20px;
}

body.autotaktas-prototype main .at-check small,
body.autotaktas-prototype main .at-category-link small,
body.autotaktas-prototype main .at-field > span {
  font-size: 12px !important;
}

body[class*="calculator"] main .at-result-summary {
  font-size: 15px !important;
  line-height: 1.55 !important;
}

body[class*="calculator"] main .result-card h3 {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

body[class*="calculator"] main .result-card p {
  font-size: 14px !important;
  line-height: 1.5 !important;
}

body.page-template-template-contact-php main .newsletter button {
  min-height: 44px;
}

body.page-template-template-about-php main .hero-values h2 {
  font-size: 18px !important;
  line-height: 1.35 !important;
}

body.page-template-template-about-php main :where(.hero-values p, .author-card p) {
  font-size: 14px !important;
  line-height: 1.62 !important;
}

body.page-template-template-about-php main .author-card h3 {
  font-size: 18px !important;
  line-height: 1.35 !important;
}

body.page-template-template-about-php main .community-cta h2 {
  font-size: 24px !important;
  line-height: 1.3 !important;
}

body.page-template-template-about-php main .community-cta :where(a, button) {
  min-height: 44px;
  padding-block: 10px;
  font-size: 14px !important;
}

body.autotaktas-prototype :where(a, button, input, select, textarea):focus-visible {
  outline: 0;
  box-shadow: var(--at-focus) !important;
}

/* Consistent section rhythm without restricting the full-width layout. */
body.autotaktas-prototype main :where(.articles, .companies, .at-related-section) {
  scroll-margin-top: 96px;
}

body.autotaktas-prototype main :where(.section-heading, .at-section-heading) {
  margin-bottom: 22px;
}

body.autotaktas-prototype main img {
  max-width: 100%;
}

@media (max-width: 900px) {
  :root {
    --at-type-display: clamp(38px, 7vw, 48px);
    --at-type-page: clamp(36px, 6.2vw, 44px);
    --at-type-section: clamp(25px, 4.6vw, 30px);
  }

  body.autotaktas-prototype main :where(.article-copy p, .at-company-description) {
    font-size: 14px !important;
  }
}

@media (max-width: 600px) {
  :root {
    --at-type-display: clamp(34px, 10vw, 42px);
    --at-type-page: clamp(32px, 9vw, 40px);
    --at-type-section: clamp(24px, 7vw, 28px);
    --at-type-content-h2: clamp(23px, 6vw, 26px);
    --at-type-content-h3: 20px;
    --at-type-prose: 16px;
    --at-space-section: 48px;
  }

  body.autotaktas-prototype {
    font-size: 16px !important;
    line-height: 1.62;
  }

  body.autotaktas-prototype main :where(.at-article-content, .policy-content) {
    line-height: 1.72 !important;
  }

  body.autotaktas-prototype main :where(.section-heading, .at-section-heading) {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  body.home main .company-carousel p {
    min-height: 0;
  }
}
