.nt-terms-page .custom-container,
.nt-privacy-page .custom-container {
  background: #f7f3ec;
}

.nt-terms-shell {
  min-height: 100vh;
  padding: clamp(2.5rem, 5vw, 5.5rem) 0 clamp(4rem, 7vw, 7rem);
  color: #263746;
  background:
    radial-gradient(circle at 85% 4%, rgba(181, 143, 74, 0.1), transparent 28rem),
    #f7f3ec;
}

.nt-legal-module {
  direction: ltr;
  text-align: left;
}

.nt-terms-hero {
  max-width: 58rem;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  text-align: center;
}

.nt-terms-eyebrow {
  margin: 0 0 0.65rem;
  color: #8b6a32;
  font-size: 0.875rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nt-terms-hero h1 {
  margin: 0;
  color: #10283b;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.nt-terms-revised {
  margin: 1rem 0 0;
  color: #687681;
  font-size: 1rem;
  line-height: 1.6;
}

.nt-terms-return {
  display: inline-flex;
  min-height: 44px;
  margin-bottom: 1.5rem;
  padding: 0.55rem 0.85rem;
  align-items: center;
  gap: 0.55rem;
  border-radius: 0.7rem;
  color: #234d68;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nt-terms-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 52rem);
  justify-content: center;
  align-items: start;
  gap: clamp(2rem, 4vw, 4.5rem);
}

.nt-terms-sidebar {
  position: sticky;
  top: calc(var(--nt-public-header-height) + var(--nt-public-header-anchor-gap));
  align-self: start;
}

.nt-terms-desktop-nav {
  display: grid;
  padding: 1.15rem;
  border: 1px solid #ddd5c8;
  border-radius: 1rem;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 0.75rem 2.5rem rgba(25, 40, 52, 0.07);
}

.nt-terms-nav-title {
  margin: 0 0 0.65rem;
  color: #10283b;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nt-terms-desktop-nav a,
.nt-terms-mobile-nav a {
  padding: 0.2rem 0.6rem;
  border-inline-start: 3px solid transparent;
  border-radius: 0.3rem;
  color: #4c606f;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.nt-terms-desktop-nav a:hover,
.nt-terms-mobile-nav a:hover,
.nt-terms-desktop-nav a.is-current,
.nt-terms-mobile-nav a.is-current {
  border-inline-start-color: #aa8240;
  color: #10283b;
  background: #f3ede2;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.nt-terms-shell a:focus-visible,
.nt-terms-mobile-nav summary:focus-visible {
  outline: 3px solid rgba(35, 89, 126, 0.3);
  outline-offset: 3px;
}

.nt-terms-mobile-nav {
  display: none;
}

.nt-terms-document {
  min-width: 0;
  padding: clamp(2rem, 4vw, 4rem);
  border: 1px solid #ded7cc;
  border-radius: 1.25rem;
  background: #fffdfa;
  box-shadow: 0 1rem 3rem rgba(25, 40, 52, 0.08);
  color: #354957;
  font-size: 1.0625rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.nt-terms-document > .row {
  display: block;
  margin: 0;
}

.nt-terms-document h2 {
  scroll-margin-top: 7rem;
  margin: 3rem 0 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid #e8e0d4;
  color: #142f43;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 750;
  line-height: 1.3;
  background: transparent;
  box-shadow: inset 0 0 0 transparent;
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out;
}

.nt-terms-document h2.is-current {
  background: linear-gradient(90deg, rgba(181, 143, 74, 0.14), rgba(181, 143, 74, 0.035) 68%, transparent);
  box-shadow: inset 4px 0 0 #aa8240;
}

.nt-terms-document > .row:first-child h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nt-terms-document h3 {
  margin: 1.25rem 0 0.5rem;
  color: #263e50;
  font-size: 1.15rem;
  font-weight: 750;
}

.nt-terms-document p {
  margin: 0.75rem 0 0;
  padding: 0;
}

.nt-terms-document .content {
  padding: 0;
}

.nt-terms-document ol,
.nt-terms-document ul {
  margin: 0.8rem 0 0;
  padding-inline-start: 1.75rem;
  list-style-position: outside;
}

.nt-terms-document li {
  margin-top: 0.55rem;
  padding-inline-start: 0.35rem;
}

.nt-terms-document a {
  color: #245b7a;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

html[lang="fa"] .nt-terms-return {
  font-size: 1.125rem;
  line-height: 1.75;
}

@media (max-width: 1023.98px) {
  .nt-terms-shell {
    padding-top: 2.5rem;
  }

  .nt-terms-layout {
    grid-template-columns: minmax(0, 52rem);
    gap: 1.25rem;
  }

  .nt-terms-desktop-nav {
    display: none;
  }

  .nt-terms-sidebar {
    position: static;
  }

  .nt-terms-mobile-nav {
    display: block;
    border: 1px solid #ddd5c8;
    border-radius: 0.9rem;
    background: #fffdfa;
    box-shadow: 0 0.5rem 1.5rem rgba(25, 40, 52, 0.06);
  }

  .nt-terms-mobile-nav summary {
    min-height: 48px;
    padding: 0.8rem 1rem;
    color: #17364c;
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 750;
    cursor: pointer;
  }

  .nt-terms-mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0 0.75rem 0.9rem;
  }

  .nt-terms-mobile-nav a {
    min-height: 40px;
    padding: 0.55rem 0.65rem;
    line-height: 1.45;
  }
}

@media (max-width: 639.98px) {
  .nt-terms-shell {
    padding: 1.75rem 0 3.5rem;
  }

  .nt-terms-hero {
    margin-bottom: 1.5rem;
  }

  .nt-terms-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3rem);
  }

  .nt-terms-mobile-nav nav {
    grid-template-columns: 1fr;
  }

  .nt-terms-document {
    padding: 1.5rem 1.1rem;
    border-radius: 1rem;
    font-size: 1rem;
    line-height: 1.72;
  }

  .nt-terms-document h2 {
    scroll-margin-top: 6rem;
    margin-top: 2.25rem;
    font-size: 1.35rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .nt-terms-document h2 {
    transition: none;
  }
}

@media print {
  .nt-terms-page .nt-site-header,
  .nt-privacy-page .nt-site-header,
  .nt-terms-page .nth-universal-footer,
  .nt-privacy-page .nth-universal-footer,
  .nt-terms-page .nt-terms-sidebar,
  .nt-privacy-page .nt-terms-sidebar,
  .nt-terms-page .nt-terms-return,
  .nt-privacy-page .nt-terms-return,
  .nt-terms-page .nt-terms-eyebrow,
  .nt-privacy-page .nt-terms-eyebrow {
    display: none !important;
  }

  .nt-terms-page .custom-container,
  .nt-terms-shell {
    background: #fff !important;
  }

  .nt-terms-shell {
    padding: 0;
  }

  .nt-terms-hero {
    margin-bottom: 1.5rem;
    text-align: left;
  }

  .nt-terms-layout {
    display: block;
  }

  .nt-terms-document {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .nt-terms-document h2,
  .nt-terms-document h3 {
    break-after: avoid;
    color: #000;
  }

  .nt-terms-document h2.is-current {
    background: transparent !important;
    box-shadow: none !important;
  }

  .nt-terms-document li,
  .nt-terms-document p {
    orphans: 3;
    widows: 3;
  }

  .nt-terms-document a[href]::after {
    content: " (" attr(href) ")";
    font-weight: 400;
  }
}
