/* 3D StudioMarket — v25.2 navigation and full-document reader */

html body #topbarLeftBtn {
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  touch-action: manipulation;
}

html body[data-page-type="menu"].sidebar-open #sidebarMount .sidebar,
html body[data-page-type="menu"] #sidebarMount .sidebar.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  pointer-events: auto !important;
  z-index: 1200 !important;
}

html body.sidebar-open #sidebarOverlay,
html body #sidebarOverlay.open,
html body #sidebarOverlay.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 1190 !important;
}

html body.sidebar-open { overflow: hidden; }

html body .policy-library-modal-v252,
html body .legal-set-modal-v252,
html body .legal-document-modal-v252 {
  width: min(1080px, calc(100vw - 32px)) !important;
  max-width: 1080px !important;
  padding: clamp(22px, 3vw, 34px) !important;
  overflow: hidden !important;
}

html body .policy-library-v252,
html body .legal-set-library-v252,
html body .legal-document-reader-v252 {
  min-width: 0;
  color: var(--text-primary, #f4f6f8);
}

html body .policy-library-v252 > header,
html body .legal-set-library-v252 > header,
html body .legal-document-header-v252 {
  padding: 0 42px 20px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

html body .policy-library-v252 > header > span,
html body .legal-set-library-v252 > header > span,
html body .legal-document-header-v252 > span {
  display: block;
  margin-bottom: 7px;
  color: #ffbd45;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html body .policy-library-v252 h2,
html body .legal-set-library-v252 h2,
html body .legal-document-header-v252 h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.16;
}

html body .policy-library-v252 header p,
html body .legal-set-library-v252 header p,
html body .legal-document-header-v252 > p {
  margin: 10px 0 0;
  color: var(--text-secondary, #aeb8c4);
  font-size: 16px;
  line-height: 1.55;
}

html body .policy-library-v252 > section { padding-top: 22px; }
html body .policy-library-v252 > section + section { margin-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
html body .policy-library-v252 > section > h3 { margin: 0 0 13px; font-size: 16px; }

html body .policy-library-grid-v252,
html body .legal-set-source-grid-v252 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.14);
  border-left: 1px solid rgba(255,255,255,.14);
}

html body .policy-library-grid-v252 > button,
html body .legal-source-card-v252 {
  min-width: 0;
  min-height: 104px;
  padding: 17px 18px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

html body .policy-library-grid-v252 > button:hover,
html body .legal-source-card-v252:hover { background: rgba(255,183,50,.07); }
html body .policy-library-grid-v252 strong,
html body .legal-source-card-v252 strong { display: block; margin-bottom: 6px; font-size: 17px; line-height: 1.35; }
html body .policy-library-grid-v252 small,
html body .legal-source-card-v252 small { display: block; color: var(--text-secondary, #aeb8c4); font-size: 14px; line-height: 1.45; }
html body .policy-library-grid-v252 span,
html body .legal-source-card-v252 b { display: block; margin-top: 12px; color: #ffbd45; font-size: 14px; }
html body .legal-set-grid-v252 > button { min-height: 126px; }
html body .legal-set-grid-v252 b { display: block; margin-bottom: 6px; color: #ffbd45; }

html body .legal-set-source-grid-v252 { margin-top: 22px; }
html body .legal-source-card-v252 > span { display: block; margin-bottom: 6px; color: #ffbd45; font-size: 13px; font-weight: 800; text-transform: uppercase; }

html body .legal-document-meta-v252 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 18px 0 0;
}

html body .legal-document-meta-v252 > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
html body .legal-document-meta-v252 > div.wide { grid-column: 1 / -1; }
html body .legal-document-meta-v252 dt { color: var(--text-secondary, #aeb8c4); font-size: 13px; }
html body .legal-document-meta-v252 dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 14px; }

html body .legal-document-header-actions-v252 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

html body .legal-document-header-actions-v252 a {
  color: #ffbd45;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
html body .legal-document-header-actions-v252 small { color: var(--text-secondary, #aeb8c4); font-size: 12px; overflow-wrap: anywhere; }

html body .legal-document-body-v252 {
  max-height: min(58vh, 650px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 16px 0 0;
  scrollbar-gutter: stable;
}

html body .legal-document-section-v252 {
  max-width: 86ch;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
html body .legal-document-section-v252:last-child { border-bottom: 0; }
html body .legal-document-section-v252 h3 { margin: 0 0 13px; font-size: 19px; line-height: 1.35; }
html body .legal-document-section-v252 h3 span { color: #ffbd45; }
html body .legal-document-section-v252 p { margin: 0 0 14px; color: #d6dce3; font-size: 16px; line-height: 1.72; }
html body .legal-document-section-v252 p:last-child { margin-bottom: 0; }

html body .legal-document-footer-v252 {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.14);
}

@media (max-width: 700px) {
  html body .policy-library-modal-v252,
  html body .legal-set-modal-v252,
  html body .legal-document-modal-v252 {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 20px 17px !important;
  }
  html body .policy-library-grid-v252,
  html body .legal-set-source-grid-v252 { grid-template-columns: 1fr; }
  html body .legal-document-meta-v252 { grid-template-columns: 1fr; }
  html body .legal-document-meta-v252 > div.wide { grid-column: auto; }
  html body .legal-document-meta-v252 > div { grid-template-columns: 92px minmax(0, 1fr); }
  html body .legal-document-header-actions-v252 { align-items: flex-start; flex-direction: column; }
  html body .legal-document-body-v252 { max-height: 54dvh; padding-right: 8px; }
  html body .legal-document-section-v252 p { font-size: 16px; line-height: 1.68; }
  html body .legal-document-footer-v252 { position: sticky; bottom: -20px; margin: 0 -17px -20px; padding: 14px 17px; background: #0b1118; }
}
