:root {
  --font-heading: "Merriweather", serif;
  --font-body: "Josefin Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Arial, sans-serif;
}

html {
  font-size: 16px;
}

html,
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: var(--font-heading);
}

.tracking-tight {
  font-family: var(--font-heading);
}

.font-body {
  font-family: var(--font-body);
}

/* Readability scale (raise Tailwind utility sizes without rebuilding assets) */
.text-\[10px\],
.text-\[11px\],
.text-\[12px\],
.text-xs {
  font-size: 0.9375rem !important; /* 15px */
  line-height: 1.55 !important;
}

.text-sm {
  font-size: 1rem !important; /* 16px */
  line-height: 1.6 !important;
}

.text-base {
  font-size: 1.0625rem !important; /* 17px */
  line-height: 1.7 !important;
}

.text-lg {
  font-size: 1.125rem !important; /* 18px */
  line-height: 1.7 !important;
}

/* Stronger global body text (elements without Tailwind size utilities) */
body {
  font-size: 17px;
}
@media (min-width: 1024px) {
  body {
    font-size: 18px;
  }
}

/* Heading scale (semantic headings) */
h1 {
  font-size: clamp(1.75rem, 3.6vw + 0.9rem, 3rem); /* 28–48 */
  font-weight: 700;
}
h2 {
  font-size: clamp(1.5rem, 2.4vw + 0.9rem, 2.25rem); /* 24–36 */
  font-weight: 700;
}
h3 {
  font-size: clamp(1.25rem, 1.2vw + 0.95rem, 1.75rem); /* 20–28 */
  font-weight: 700;
}
h4 {
  font-size: 1.375rem; /* 22 */
  font-weight: 600;
}
h5 {
  font-size: 1.25rem; /* 20 */
  font-weight: 600;
}
h6 {
  font-size: 1.125rem; /* 18 */
  font-weight: 600;
}

/* Navbar main links should follow heading font */
header nav a,
header nav button,
header nav summary {
  font-family: var(--font-heading);
  font-size: 1.0625rem; /* 17px */
}

/* Public hero + card titles that are not semantic headings */
.ui-hero-title,
.ui-card-title,
.ui-section-title,
.ui-sidebar-title {
  font-family: var(--font-heading);
}

/* Buttons / UI text remain body font by default */
button,
input,
select,
textarea,
label {
  font-family: var(--font-body);
}

/* Chat widget and admin panel text */
[data-chat-widget],
#app-sidebar,
#app-shell,
.ui-prose {
  font-family: var(--font-body);
}

/* Keep rich content headings consistent */
.ui-prose h1,
.ui-prose h2,
.ui-prose h3,
.ui-prose h4,
.ui-prose h5,
.ui-prose h6 {
  font-family: var(--font-heading);
}

/* Make long-form content more readable even if inline styles exist */
.ui-prose {
  font-size: 1.0625rem !important; /* 17px */
  line-height: 1.85 !important;
}
.ui-prose p {
  margin: 1.05em 0 !important;
}

/* Chat widget base size (messages should not feel tiny) */
#dehleez-chat-widget {
  font-size: 1.0625rem;
}

/* Footer minimum size */
footer {
  font-size: 0.9375rem; /* 15px */
}

/* English-only version: hide any locale / language switch UI */
@supports selector(:has(*)) {
  header details:has(a[href*="/locale/"]),
  footer details:has(a[href*="/locale/"]) {
    display: none !important;
  }
}

/* Mobile menu language section (Vue) */
#dehleez-navbar [role="dialog"] div.mt-6.space-y-2 {
  display: none !important;
}

/* Fallback: hide the locale links themselves */
a[href*="/locale/"] {
  display: none !important;
}

/* Landing pages: ensure consistent inner padding without relying on Tailwind rebuilds */
.lp-investor .lp-investor-pad {
  padding-left: 2rem; /* ~32px */
  padding-right: 2rem;
}
@media (min-width: 640px) {
  .lp-investor .lp-investor-pad {
    padding-left: 2.25rem; /* ~36px */
    padding-right: 2.25rem;
  }
}
