/* ==========================================================================
   MatheIN corporate site
   Header, footer and cookie UI apply to every page. Page-level typography and
   components apply to company pages, which render with `body.mx-page`.
   ========================================================================== */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
}

.mathein-site {
  --mx-ink: #0c1f1a;
  --mx-text: #3b5049;
  --mx-muted: #5d7069;
  --mx-line: #e2ebe7;
  --mx-line-strong: #c8dad2;
  --mx-soft: #f4f8f6;
  --mx-mint: #e3f5ec;
  --mx-green: #0b4f3c;
  --mx-green-hover: #083d2f;
  --mx-green-600: #127a5a;
  --mx-accent: #25a36f;
  --mx-teal: #2fb79c;
  --mx-sky: #4dbbe6;
  --mx-dark: #062a20;
  --mx-on-dark: #e2eee9;
  --mx-on-dark-muted: rgba(226, 238, 233, 0.72);
  --mx-mint-on-dark: #8fe0bf;
  --mx-radius-sm: 10px;
  --mx-radius: 16px;
  --mx-radius-lg: 24px;
  --mx-shadow-sm: 0 1px 2px rgba(6, 42, 32, 0.06);
  --mx-shadow: 0 1px 2px rgba(6, 42, 32, 0.05), 0 18px 40px -18px rgba(6, 42, 32, 0.22);
  --mx-shadow-lg: 0 2px 6px rgba(6, 42, 32, 0.06), 0 40px 80px -32px rgba(6, 42, 32, 0.38);
  --mx-font-body: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mx-font-display: "Plus Jakarta Sans Variable", "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mx-header-h: 72px;

  font-family: var(--mx-font-body);
  color: var(--mx-text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  scroll-padding-top: calc(var(--mx-header-h, 72px) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Company page typography ---------- */

.mx-page {
  --bs-body-color: var(--mx-text);
  --bs-heading-color: var(--mx-ink);
  --bs-link-color-rgb: 18, 122, 90;
  --bs-link-hover-color-rgb: 11, 79, 60;
  --bs-border-color: var(--mx-line);
}

.mx-page :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
  font-family: var(--mx-font-display);
  color: var(--mx-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.mx-page p {
  line-height: 1.7;
}

.mx-page ::selection {
  background: rgba(37, 163, 111, 0.22);
}

.mathein-site :focus-visible {
  outline: 3px solid rgba(37, 163, 111, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

#main-content:focus {
  outline: none;
}

.mx-skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  padding: 0.75rem 1rem;
  border-radius: var(--mx-radius-sm);
  background: var(--mx-green);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.mx-skip-link:focus {
  top: 0.75rem;
  color: #ffffff;
}

.mx-icon {
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Buttons ---------- */

.mx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mx-font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mx-btn .mx-icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.2s ease;
}

.mx-btn:hover .mx-icon {
  transform: translateX(3px);
}

.mx-btn-sm {
  padding: 0.6rem 1.05rem;
  font-size: 0.9rem;
}

.mx-btn-lg {
  padding: 1rem 1.65rem;
  font-size: 1.05rem;
}

.mx-btn-primary {
  background: var(--mx-green);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(6, 42, 32, 0.2), 0 10px 22px -10px rgba(11, 79, 60, 0.6);
}

.mx-btn-primary:hover,
.mx-btn-primary:focus-visible {
  background: var(--mx-green-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.mx-btn-ghost {
  background: #ffffff;
  color: var(--mx-ink);
  border-color: var(--mx-line-strong);
}

.mx-btn-ghost:hover,
.mx-btn-ghost:focus-visible {
  background: var(--mx-soft);
  color: var(--mx-ink);
  border-color: #aac6ba;
}

.mx-btn-light {
  background: #ffffff;
  color: var(--mx-green);
}

.mx-btn-light:hover,
.mx-btn-light:focus-visible {
  background: var(--mx-mint);
  color: var(--mx-green-hover);
  transform: translateY(-1px);
}

.mx-btn-outline-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.mx-btn-outline-light:hover,
.mx-btn-outline-light:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.mx-btn-link {
  background: none;
  color: var(--mx-green-600);
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.mx-btn-link:hover {
  color: var(--mx-green);
  text-decoration: underline;
}

/* ---------- Header (original MatheIN green brand bar) ---------- */

.mx-header {
  background: linear-gradient(90deg, var(--mx-accent) 0%, var(--mx-teal) 55%, var(--mx-sky) 100%);
  box-shadow: 0 8px 24px rgba(15, 34, 54, 0.12);
}

.mx-header .navbar {
  --bs-navbar-color: rgba(255, 255, 255, 0.93);
  --bs-navbar-hover-color: #ffffff;
  --bs-navbar-active-color: #ffffff;
  min-height: var(--mx-header-h);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.mx-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: 1rem;
  text-decoration: none;
}

.mx-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  object-fit: cover;
}

.mx-brand-logo-footer {
  width: 48px;
  height: 48px;
}

/* Wordmark keeps the original MatheIN brand style. */
.mx-brand-name {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #ffffff;
}

.mx-nav-links .nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 650;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mx-nav-links .nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.mx-nav-links .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
}

.mx-header .mx-btn-light {
  color: var(--mx-ink);
}

.mx-header .mx-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: transparent;
}

.mx-header .mx-nav-toggle:focus {
  box-shadow: none;
}

@media (min-width: 992px) {
  .mx-header .mx-nav-toggle {
    display: none;
  }
}

.mx-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mx-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mx-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mx-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Sections and type scale ---------- */

.mx-section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.mx-section-tight {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.mx-section-soft {
  background: var(--mx-soft);
  border-top: 1px solid var(--mx-line);
  border-bottom: 1px solid var(--mx-line);
}

.mx-section-head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.mx-section-head.text-center {
  margin-left: auto;
  margin-right: auto;
}

.mx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-family: var(--mx-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mx-green-600);
}

.mx-eyebrow::before {
  content: "";
  width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}

.mx-h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.mx-lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.65;
  color: var(--mx-muted);
}

.mx-gradient-text {
  background: linear-gradient(100deg, var(--mx-green) 0%, var(--mx-green-600) 45%, #1d8fb0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mx-mesh {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(56rem 28rem at 88% -12%, rgba(77, 187, 230, 0.18), transparent 62%),
    radial-gradient(48rem 28rem at -12% 6%, rgba(37, 163, 111, 0.16), transparent 62%),
    linear-gradient(180deg, #fbfdfc 0%, #ffffff 100%);
}

.mx-mesh::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 79, 60, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 79, 60, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Home hero ---------- */

.mx-hero {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.mx-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  border: 1px solid var(--mx-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--mx-shadow-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mx-text);
}

.mx-pill-tag {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--mx-green);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mx-hero-title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.mx-hero .mx-lead {
  max-width: 600px;
  margin-bottom: 2.25rem;
}

.mx-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mx-muted);
}

.mx-proof li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.mx-proof .mx-icon {
  width: 18px;
  height: 18px;
  color: var(--mx-accent);
}

.mx-hero-media {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--mx-radius-lg);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--mx-shadow-lg), 0 0 0 1px rgba(11, 79, 60, 0.06);
}

.mx-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--mx-radius);
}

.mx-hero-badge {
  position: absolute;
  left: -1.25rem;
  bottom: -1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem 0.8rem 0.8rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: #ffffff;
  box-shadow: var(--mx-shadow);
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--mx-muted);
}

.mx-hero-badge strong {
  display: block;
  color: var(--mx-ink);
  font-size: 0.9rem;
}

/* ---------- Inner page hero ---------- */

.mx-page-hero {
  padding: clamp(3.5rem, 7vw, 5.75rem) 0 clamp(2.75rem, 5vw, 4.25rem);
  border-bottom: 1px solid var(--mx-line);
}

.mx-page-hero h1 {
  max-width: 920px;
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 1.4rem + 2.9vw, 3.6rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.03em;
}

.mx-page-hero .mx-lead {
  max-width: 760px;
  margin-bottom: 0;
}

.mx-page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- Cards ---------- */

.mx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mx-card-hover:hover,
.mx-card-hover:focus-within {
  border-color: var(--mx-line-strong);
  box-shadow: var(--mx-shadow);
  transform: translateY(-2px);
}

.mx-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.mx-card p {
  color: var(--mx-muted);
}

.mx-card > :last-child {
  margin-bottom: 0;
}

.mx-card-lg {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  border-radius: var(--mx-radius-lg);
}

.mx-icon-chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: var(--mx-mint);
  color: var(--mx-green);
  box-shadow: inset 0 0 0 1px rgba(11, 79, 60, 0.08);
}

.mx-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1.25rem;
  font-weight: 600;
  color: var(--mx-green-600);
  text-decoration: none;
}

.mx-card-link .mx-icon {
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.2s ease;
}

.mx-card-link:hover {
  color: var(--mx-green);
}

.mx-card-link:hover .mx-icon {
  transform: translateX(3px);
}

.mx-checks {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mx-checks li {
  position: relative;
  padding-left: 1.85rem;
  line-height: 1.55;
  color: var(--mx-text);
}

.mx-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--mx-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b4f3c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 0.72rem no-repeat;
}

.mx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mx-tag {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--mx-line);
  border-radius: 999px;
  background: var(--mx-soft);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mx-text);
}

/* ---------- Dark band ---------- */

.mx-dark {
  position: relative;
  overflow: hidden;
  color: var(--mx-on-dark);
  background:
    radial-gradient(50rem 26rem at 100% 0%, rgba(47, 183, 156, 0.22), transparent 60%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(77, 187, 230, 0.14), transparent 60%),
    var(--mx-dark);
}

.mx-dark :where(h2, h3) {
  color: #ffffff;
}

.mx-dark .mx-eyebrow {
  color: var(--mx-mint-on-dark);
}

.mx-dark .mx-lead,
.mx-dark p {
  color: var(--mx-on-dark-muted);
}

.mx-cap {
  display: flex;
  gap: 1rem;
  height: 100%;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--mx-radius);
  background: rgba(255, 255, 255, 0.04);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mx-cap:hover {
  border-color: rgba(143, 224, 191, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.mx-cap .mx-icon-chip {
  margin: 0;
  background: rgba(143, 224, 191, 0.12);
  color: var(--mx-mint-on-dark);
  box-shadow: inset 0 0 0 1px rgba(143, 224, 191, 0.18);
}

.mx-cap h3 {
  margin: 0.15rem 0 0.3rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.mx-cap p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

/* ---------- Process steps ---------- */

.mx-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mx-step {
  position: relative;
  padding: 1.6rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: #ffffff;
}

.mx-step-num {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: var(--mx-green);
  color: #ffffff;
  font-family: var(--mx-font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.mx-step h3 {
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

.mx-step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mx-muted);
}

/* ---------- Product feature ---------- */

.mx-product {
  position: relative;
  overflow: hidden;
  height: 100%;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius-lg);
  background: linear-gradient(140deg, #ffffff 0%, #eff9f4 60%, #eaf6fb 100%);
}

.mx-product-name {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mx-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ---------- Group companies ---------- */

.mx-entity {
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--mx-line);
  border-radius: 20px;
  background: #ffffff;
}

.mx-entity-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--mx-line);
  background: linear-gradient(135deg, var(--mx-mint) 0%, #eef7fb 100%);
}

.mx-entity-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.mx-entity-head p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--mx-muted);
}

.mx-entity-badge {
  flex: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--mx-green);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mx-entity-body {
  padding: 1.5rem 1.75rem;
}

.mx-entity-body p {
  color: var(--mx-muted);
}

.mx-facts {
  display: grid;
  grid-template-columns: minmax(10rem, 36%) 1fr;
  margin: 0;
}

.mx-facts dt,
.mx-facts dd {
  margin: 0;
  padding: 0.85rem 1.75rem;
  border-bottom: 1px solid var(--mx-line);
}

.mx-facts dt {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mx-muted);
}

.mx-facts dd {
  font-weight: 550;
  color: var(--mx-ink);
}

.mx-facts dt:nth-last-of-type(1),
.mx-facts dd:last-of-type {
  border-bottom: 0;
}

.mx-facts-compact dt,
.mx-facts-compact dd {
  padding: 0.6rem 0;
}

.mx-note {
  display: flex;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: var(--mx-soft);
  font-size: 0.93rem;
  color: var(--mx-muted);
}

.mx-note .mx-icon {
  color: var(--mx-green-600);
  margin-top: 0.1rem;
}

.mx-note p {
  margin: 0;
}

/* ---------- CTA ---------- */

.mx-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 3.75rem);
  border-radius: 28px;
}

.mx-cta h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem);
  letter-spacing: -0.025em;
}

.mx-cta p {
  max-width: 620px;
  margin: 0;
  font-size: 1.05rem;
}

.mx-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Forms ---------- */

.mx-form .form-label {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mx-ink);
}

.mx-form .form-control,
.mx-form .form-select {
  padding: 0.8rem 1rem;
  border-color: var(--mx-line-strong);
  border-radius: 12px;
  background-color: #fbfdfc;
  color: var(--mx-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.mx-form .form-control:focus,
.mx-form .form-select:focus {
  border-color: var(--mx-accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 163, 111, 0.15);
}

.mx-form .form-text {
  color: var(--mx-muted);
}

.mx-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid;
  border-radius: 14px;
  font-size: 0.95rem;
}

.mx-alert-success {
  border-color: #b9e4cf;
  background: #ecf8f2;
  color: #0b5a40;
}

.mx-alert-danger {
  border-color: #f1c4bd;
  background: #fdf1ef;
  color: #8a2a1c;
}

.mx-alert-warning {
  border-color: #f0dca8;
  background: #fdf8ea;
  color: #6b4f05;
}

.mx-visually-hidden-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mx-contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.mx-contact-item + .mx-contact-item {
  margin-top: 1.5rem;
}

.mx-contact-item .mx-icon-chip {
  margin: 0;
}

.mx-contact-item h3 {
  margin: 0.2rem 0 0.25rem;
  font-size: 1rem;
}

.mx-contact-item p,
.mx-contact-item address {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--mx-muted);
}

/* ---------- Legal and long-form copy ---------- */

.mx-prose {
  max-width: 760px;
}

.mx-prose h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  font-size: 1.45rem;
}

.mx-prose h2:first-child {
  margin-top: 0;
}

.mx-prose h3 {
  margin-top: 1.75rem;
  font-size: 1.1rem;
}

.mx-prose p,
.mx-prose li {
  line-height: 1.75;
  color: var(--mx-text);
}

.mx-prose ul,
.mx-prose ol {
  padding-left: 1.25rem;
}

.mx-prose li {
  margin-bottom: 0.45rem;
}

.mx-prose li::marker {
  color: var(--mx-green-600);
}

.mx-toc {
  position: sticky;
  top: calc(var(--mx-header-h) + 1.5rem);
  padding: 1.25rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: #ffffff;
}

.mx-toc-title {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mx-muted);
}

.mx-toc ol {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mx-toc a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--mx-text);
  text-decoration: none;
}

.mx-toc a:hover {
  background: var(--mx-soft);
  color: var(--mx-green);
}

.mx-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 2.75rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: var(--mx-line);
}

.mx-meta > div {
  padding: 1rem 1.25rem;
  background: #ffffff;
}

.mx-meta dt {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-muted);
}

.mx-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 550;
  color: var(--mx-ink);
}

.mx-doclist {
  overflow: hidden;
  margin: 1.25rem 0 2rem;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: #ffffff;
}

.mx-doclist-head {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--mx-line);
  background: var(--mx-soft);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--mx-ink);
}

.mx-doc {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--mx-line);
  color: var(--mx-ink);
  font-weight: 550;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mx-doc:last-child {
  border-bottom: 0;
}

.mx-doc:hover {
  background: var(--mx-soft);
  color: var(--mx-green);
}

.mx-doc .mx-icon {
  color: var(--mx-green-600);
}

.mx-doc-type {
  margin-left: auto;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--mx-mint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mx-green-600);
}

.mx-doc-empty {
  padding: 1rem 1.25rem;
  color: var(--mx-muted);
}

.mx-steps-list {
  counter-reset: mx-step;
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.mx-steps-list li {
  counter-increment: mx-step;
  position: relative;
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 3.25rem;
  border: 1px solid var(--mx-line);
  border-radius: 12px;
  background: #ffffff;
}

.mx-steps-list li::before {
  content: counter(mx-step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: var(--mx-green);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  transform: translateY(-50%);
}

/* ---------- FAQ ---------- */

.mx-faq details {
  margin-bottom: 0.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--mx-line);
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 0.15s ease;
}

.mx-faq details[open] {
  border-color: var(--mx-line-strong);
}

.mx-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--mx-ink);
  list-style: none;
  cursor: pointer;
}

.mx-faq summary::-webkit-details-marker {
  display: none;
}

.mx-faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--mx-green-600);
  transition: transform 0.2s ease;
}

.mx-faq details[open] summary::after {
  transform: rotate(45deg);
}

.mx-faq details > :not(summary) {
  margin: 0;
  padding-bottom: 1.15rem;
  color: var(--mx-muted);
}

/* ---------- Footer ---------- */

.mx-footer {
  padding: clamp(3.5rem, 7vw, 5rem) 0 2rem;
  background: var(--mx-dark);
  color: var(--mx-on-dark-muted);
  font-size: 0.95rem;
}

.mx-footer .mx-brand-name {
  color: #ffffff;
}

.mx-footer-lead {
  max-width: 36ch;
  margin: 1.25rem 0 1rem;
  line-height: 1.65;
}

.mx-footer-contact li {
  margin-bottom: 0.4rem;
  color: var(--mx-on-dark-muted);
}

.mx-footer-contact a {
  font-weight: 600;
  color: var(--mx-mint-on-dark);
  text-decoration: none;
}

.mx-footer-contact a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.mx-footer-heading {
  margin-bottom: 1rem;
  font-family: var(--mx-font-body);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #ffffff;
}

.mx-footer-links li {
  margin-bottom: 0.6rem;
}

.mx-footer-links a {
  color: var(--mx-on-dark-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mx-footer-links a:hover {
  color: #ffffff;
}

.mx-footer-entities {
  display: grid;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  line-height: 1.55;
}

.mx-footer-entities p {
  margin: 0;
}

.mx-footer-entities strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.mx-footer-entities span {
  display: block;
}

.mx-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(226, 238, 233, 0.6);
}

/* ---------- Cookie consent ---------- */

.mx-cookie {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1050;
  max-width: 470px;
  padding: 1.25rem;
  border: 1px solid var(--mx-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(6, 42, 32, 0.06), 0 24px 60px -20px rgba(6, 42, 32, 0.38);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--mx-text);
}

.mx-cookie a {
  color: var(--mx-green-600);
}

.mx-modal {
  border: 0;
  border-radius: 20px;
  box-shadow: var(--mx-shadow-lg);
}

.mx-modal .modal-header,
.mx-modal .modal-footer {
  border-color: var(--mx-line);
}

.mx-modal .form-check-input:checked {
  background-color: var(--mx-green);
  border-color: var(--mx-green);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .mx-header .navbar-collapse {
    margin-top: 0.75rem;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }

  .mx-nav-links .nav-link {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    font-size: 1.02rem;
  }

  .mx-nav-links .mx-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .mx-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mx-cta {
    grid-template-columns: 1fr;
  }

  .mx-hero-badge {
    left: 1rem;
  }
}

@media (max-width: 575.98px) {
  .mx-steps {
    grid-template-columns: 1fr;
  }

  .mx-facts {
    grid-template-columns: 1fr;
  }

  .mx-facts dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .mx-facts dd {
    padding-top: 0.2rem;
  }

  .mx-entity-head,
  .mx-entity-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .mx-facts dt,
  .mx-facts dd {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .mx-hero-badge {
    position: static;
    margin-top: 0.75rem;
  }

  .mx-cta-actions .mx-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mathein-site *,
  .mathein-site *::before,
  .mathein-site *::after {
    transition: none !important;
    animation: none !important;
  }
}
