/* Remove weird floating top box */
body > div:first-child,
body > iframe:first-child,
body > section:first-child {
  display: none !important;
}

/* If Termly injects a badge/logo */
[class*="badge"],
[class*="logo"],
[class*="floating"],
[id*="badge"],
[id*="logo"] {
  display: none !important;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --bg:#ffffff;
  --card:#ffffff;
  --border:#e2e8f0;

  --text:#0f172a;
  --muted:#64748b;

  --primary:#6d28d9;
  --primary-light:#8b5cf6;

  --surface:#f8fafc;
}

body {
  background: var(--surface) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  color: var(--text) !important;

  padding: 20px 20px 60px !important;
  line-height: 1.8 !important;
}

/* REMOVE weird floating top elements */
body > div:first-child:empty,
body > div:first-child:not(:has(*)) {
  display: none !important;
}

/* Main Termly container */
body > * {
  max-width: 1050px !important;

  margin: 0 auto !important;

  background: var(--card) !important;

  border: 1px solid var(--border) !important;
  border-radius: 30px !important;

  padding: 70px !important;

  box-shadow:
    0 20px 60px rgba(15,23,42,0.06) !important;
}


/* Main heading */
h1 {
  font-size: 4rem !important;
  font-weight: 800 !important;

  color: #000 !important;

  margin-top: -10px !important;
  margin-bottom: 18px !important;

  letter-spacing: -2px !important;
  line-height: 1 !important;

  position: relative;
}

/* Gold accent line */
h1::after {
  content: "";

  display: block;

  width: 120px;
  height: 5px;

  margin-top: 18px;

  border-radius: 20px;

 background:
    linear-gradient(
      90deg,
      var(--primary),
      transparent
    );
}

/* Section headings */
h2, h3, h4, h5, h6 {
  color: #000 !important;

  margin-top: 50px !important;
  margin-bottom: 18px !important;

  font-weight: 700 !important;
}

/* Text */
p, li, td, th {
  color: var(--muted) !important;
  font-size: 1.03rem !important;
}

/* Paragraph spacing */
p {
  margin-bottom: 18px !important;
}

/* Lists */
ul, ol {
  padding-left: 24px !important;
  margin-bottom: 28px !important;
}

li {
  margin-bottom: 12px !important;
}

/* Links */
a {
  color: var(--primary) !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(109,40,217,0.35) !important;
  text-underline-offset: 4px;
}

/* Tables */
table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 30px 0 !important;
}

td, th {
  border: 1px solid var(--border) !important;
  padding: 14px !important;
}

/* Remove ugly inline backgrounds Termly sometimes adds */
div, section, article {
  background-color: transparent !important;
}

/* Mobile */
@media (max-width: 768px){

  body{
    padding: 20px 12px !important;
  }

  body > *{
    padding: 34px 24px !important;
    border-radius: 22px !important;
  }

  h1{
    font-size: 2.6rem !important;
  }

  h2{
    font-size: 1.5rem !important;
  }
}	

/* Pull title upward */
h1:first-of-type {
  margin-top: -25px !important;
}

/* Hide Termly logo/banner safely */
span[style*="background: url(data:image/svg+xml;base64"] {
  display: none !important;
}