:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  background: #f4f6f8;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 920px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px clamp(24px, 5vw, 64px) 80px;
  overflow-wrap: anywhere;
  background: var(--protocol-page-background, #ffffff);
  color: #25313c;
  box-shadow: 0 0 0 1px rgba(31, 41, 55, 0.04),
    0 18px 48px rgba(31, 41, 55, 0.06);
  font-size: 16px;
  line-height: 1.75;
}

body > h1:first-of-type,
body[for="html-export"] > h2:first-of-type {
  margin: 0 0 24px;
  color: #111827;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

body[data-region="sg"] > p:first-of-type {
  margin: 0 0 24px;
  color: #5d6975;
  font-size: 0.95rem;
  line-height: 1.55;
}

body[data-region="sg"] h2,
body[for="html-export"] h3 {
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e7ebef;
  color: #17212b;
  font-size: clamp(1.3rem, 2.5vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

body[data-region="sg"] h3,
body[for="html-export"] h4 {
  margin: 1.75rem 0 0.65rem;
  color: #24313d;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.45;
}

p,
ol,
ul {
  margin: 0.95rem 0;
}

ol,
ul {
  padding-inline-start: 1.5rem;
}

li {
  padding-inline-start: 0.2rem;
}

li + li {
  margin-top: 0.6rem;
}

strong {
  color: #111827;
  font-weight: 700;
}

a {
  color: #1559a6;
  text-decoration-color: rgba(21, 89, 166, 0.38);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: start;
}

@media (max-width: 640px) {
  html {
    background: #ffffff;
  }

  body {
    padding: 28px 18px 56px;
    box-shadow: none;
    font-size: 15.5px;
    line-height: 1.72;
  }

  body[data-region="sg"] h2,
  body[for="html-export"] h3 {
    margin-top: 2.1rem;
    padding-top: 1.25rem;
  }
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  body {
    max-width: none;
    padding: 0;
    box-shadow: none;
  }

  a {
    color: inherit;
  }
}
