/* TGA readability overrides — load after style.css.
   The Ruizarch theme uses tight heading metrics, decorative lines,
   and circle-text that collide with long copy on small screens. */

html,
body {
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

html[lang^="zh"],
html[lang^="zh"] body {
  line-height: 1.75;
}

p,
li,
dd,
blockquote,
.mil-text-sm,
.mil-text-lg,
.mil-accordion-content p {
  line-height: 1.65;
  overflow-wrap: anywhere;
}

html[lang^="zh"] p,
html[lang^="zh"] li,
html[lang^="zh"] dd,
html[lang^="zh"] blockquote {
  line-height: 1.8;
}

h1, .mil-h1,
h2, .mil-h2,
h3, .mil-h3,
h4, .mil-h4,
h5, .mil-h5,
h6, .mil-h6 {
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
}

h1, .mil-h1 {
  line-height: 1.15;
  margin-bottom: 0.35em;
}

h2, .mil-h2 {
  line-height: 1.2;
  margin-bottom: 0.4em;
}

h3, .mil-h3 {
  line-height: 1.25;
  margin-bottom: 0.45em;
}

h4, .mil-h4,
h5, .mil-h5,
h6, .mil-h6 {
  line-height: 1.35;
}

h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p,
.mil-h1 + p, .mil-h2 + p, .mil-h3 + p,
.mil-h4 + p, .mil-h5 + p, .mil-h6 + p {
  margin-top: 0.4em;
}

.mil-thin {
  letter-spacing: 0;
}

.mil-no-wrap {
  white-space: normal;
}

.mil-complex-title {
  line-height: 1.2;
}

/* Decorative lines sit over photos; keep them off body copy. */
.mil-lines-place {
  pointer-events: none;
  z-index: 0;
}

.mil-about-photo .mil-lines-place {
  opacity: 0.35;
}

.mil-circle-text {
  z-index: 2;
}

.mil-circle-text .mil-ct-svg text {
  letter-spacing: 2px;
}

/* Main menu: enough items that the 34px/40px rhythm overflows. */
.mil-main-menu ul li {
  margin-bottom: 12px;
}

.mil-main-menu ul li a {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

@media screen and (max-width: 992px) {
  .mil-main-menu ul li {
    margin-bottom: 8px;
  }
  .mil-main-menu ul li a {
    font-size: 18px;
  }
}

@media screen and (max-width: 768px) {
  html,
  body {
    font-size: 15px;
    line-height: 1.65;
  }

  h1, .mil-h1 { font-size: 30px; line-height: 1.2; }
  h2, .mil-h2 { font-size: 26px; line-height: 1.25; }
  h3, .mil-h3 { font-size: 22px; line-height: 1.3; }
  h4, .mil-h4 { font-size: 20px; line-height: 1.35; }

  .mil-banner-content h1,
  .mil-banner-content h2,
  .mil-inner-banner h2 {
    padding-left: 8px;
    padding-right: 8px;
  }

  .mil-lines-place,
  .mil-lines-place .mil-lines {
    display: none !important;
  }

  .mil-circle-text {
    display: none !important;
  }

  .mil-about-photo .mil-img-frame {
    padding-bottom: 120% !important;
  }

  blockquote {
    padding: 22px;
  }

  .mil-service-list li {
    white-space: normal;
  }
}

@media screen and (max-width: 400px) {
  h1, .mil-h1 { font-size: 26px; }
  h2, .mil-h2 { font-size: 22px; }
  h3, .mil-h3 { font-size: 20px; }
  .mil-button,
  .mil-link {
    letter-spacing: 0.5px;
  }
}

/* Long-form article pages */
.tga-prose {
  max-width: 46rem;
}

.tga-prose p {
  margin-bottom: 1.15em;
  color: rgba(0, 0, 0, 0.72);
}

html[lang^="zh"] .tga-prose p {
  line-height: 1.85;
}

.tga-prose h3,
.tga-prose h4,
.tga-prose h5 {
  margin-top: 1.4em;
  margin-bottom: 0.55em;
}

.tga-prose ul,
.tga-prose ol {
  margin: 0 0 1.2em 1.2em;
}

.tga-prose li {
  margin-bottom: 0.45em;
  color: rgba(0, 0, 0, 0.72);
}

.tga-note {
  border-left: 3px solid #a78b3f;
  padding: 18px 22px;
  background: rgba(167, 139, 63, 0.08);
  margin: 0 0 1.5em;
}

.tga-note p:last-child {
  margin-bottom: 0;
}

/* Footer directory */
.tga-footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tga-footer-nav li {
  margin-bottom: 8px;
}

.tga-footer-nav a {
  color: rgba(255, 255, 255, 0.7);
}

.tga-footer-nav a:hover {
  color: #fff;
}

/* Certificate verify remains a professional form, not a poster. */
.tga-verify-form input[type="text"] {
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.tga-verify-result {
  line-height: 1.6;
}

.tga-verify-result h5 {
  letter-spacing: 0;
}
