@font-face {
  font-family: "Legal Manrope";
  src: url("/website/legal-manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

body.legal-page {
  --legal-header-height: var(--website-header-height);
  margin: 0;
  background: var(--website-bg);
  color: var(--website-ink);
  font-family: "Legal Manrope", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
}

.monsora-legal-root {
  max-width: 1056px;
  margin: 0 auto;
  padding: 0 48px 120px;
  overflow-wrap: anywhere;
}

.legal-header-shell {
  position: sticky;
  top: 0;
  z-index: 3;
}

.legal-page main {
  padding-top: 40px;
}
.legal-page h1 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}
.legal-page h2 {
  margin: 32px 0 10px;
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}
.legal-page h1 strong,
.legal-page h2 strong {
  font-weight: inherit;
}
.legal-page p {
  margin: 0 0 16px;
}
.legal-page strong {
  font-weight: 800;
}
.legal-page a {
  color: inherit;
  text-underline-offset: 3px;
}
.legal-page a:hover {
  text-decoration-thickness: 2px;
}
.legal-page a:focus-visible {
  outline: 2px solid #255bde;
  outline-offset: 4px;
  border-radius: 2px;
}
.legal-page ul {
  padding-left: 20px;
  margin: 16px 0 24px;
}
.legal-page li {
  padding-left: 4px;
  margin: 0 0 10px;
}
.legal-page li::marker {
  color: var(--website-muted);
}
.legal-page [id] {
  scroll-margin-top: calc(var(--legal-header-height) + 24px);
}
.legal-page .legal-metadata {
  font-size: 14px;
  line-height: 22px;
}
.legal-section,
.legal-clause {
  display: flex;
  gap: 10px;
}
.legal-number {
  flex: 0 0 auto;
}
.legal-clause > .legal-number {
  min-width: 2.8em;
}
.legal-caps {
  text-transform: uppercase;
}
.legal-small-caps {
  font-variant: small-caps;
}
/* Overview keeps native table semantics and scrolls horizontally on narrow screens. */
.legal-overview h1 {
  font-size: 36px;
  line-height: 44px;
}
.legal-overview .legal-intro {
  margin: 28px 0 32px;
  padding-left: 16px;
  border-left: 3px solid var(--website-line);
  color: var(--website-muted);
}
.legal-table-scroll {
  overflow-x: auto;
}
.legal-table-scroll:focus-visible {
  outline: 2px solid var(--website-ink);
  outline-offset: 4px;
}
.legal-documents {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}
.legal-documents th,
.legal-documents td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--website-line);
  vertical-align: top;
  font-weight: 500;
}
.legal-documents thead th {
  background: var(--website-surface);
  color: var(--website-ink);
  font-weight: 700;
}
.legal-documents thead th:first-child {
  width: 35%;
}
.legal-documents thead th:last-child {
  width: 22%;
}
.legal-documents a {
  font-weight: 600;
}
.legal-overview .legal-status-note {
  margin: 16px 0 0;
  color: var(--website-muted);
  font-size: 12px;
  line-height: 18px;
}
.legal-footer {
  border-top: 1px solid var(--website-line);
  margin-top: 40px;
  padding-top: 24px;
  font-size: 14px;
  line-height: 22px;
}

@media (max-width: 640px) {
  body.legal-page {
    font-size: 16px;
    line-height: 26px;
  }
  .monsora-legal-root {
    padding: 0 20px 64px;
  }
  .legal-page main {
    padding-top: 32px;
  }
  .legal-page h2 {
    font-size: 20px;
    line-height: 28px;
  }
  .legal-clause {
    gap: 8px;
  }
}

/* Figma 1359:11788: 240px sidebar; Body/M 13/18 menu text, neutral secondary
   and primary states. Static CSS follows the design system without a UI runtime. */
.legal-document .monsora-legal-root {
  max-width: 1344px;
}
.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 48px;
}
.legal-sidebar {
  position: sticky;
  top: calc(var(--legal-header-height) + 24px);
  max-height: calc(100dvh - var(--legal-header-height) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  font-size: 13px;
  line-height: 18px;
}
.legal-sidebar .legal-toc-title {
  margin: 0 8px 8px;
  color: var(--website-ink);
  font-weight: 800;
}
.legal-sidebar .legal-toc-back {
  display: block;
  margin: 0 8px 20px;
  color: var(--website-muted);
  font-size: 12px;
}
.legal-toc {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--website-line);
}
.legal-toc li {
  margin: 0 0 4px;
  padding: 0;
}
.legal-toc a {
  display: block;
  padding: 4px 8px;
  color: var(--website-muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
}
.legal-toc a:hover {
  color: var(--website-ink);
  background: var(--website-surface);
}
.legal-toc a[aria-current="location"] {
  color: var(--website-ink);
  font-weight: 700;
}
.legal-sidebar a:focus-visible,
.legal-toc-toggle:focus-visible {
  outline: 2px solid var(--website-ink);
  outline-offset: -2px;
}
.legal-toc-toggle {
  display: none;
}
.legal-document .legal-footer {
  margin-left: 288px;
}

@media (max-width: 960px) {
  .legal-layout {
    display: block;
  }
  .legal-sidebar {
    top: var(--legal-header-height);
    z-index: 2;
    max-height: none;
    overflow: visible;
    margin-bottom: 24px;
    background: var(--website-bg);
    border-bottom: 1px solid var(--website-line);
  }
  .legal-toc-toggle:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 12px 8px;
    border: 0;
    background: var(--website-bg);
    color: var(--website-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .legal-toc-state {
    color: var(--website-muted);
    font-weight: 500;
  }
  .legal-toc-panel {
    max-height: calc(100dvh - var(--legal-header-height) - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 0;
  }
  .legal-sidebar-enhanced .legal-toc-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--website-bg);
    border-bottom: 1px solid var(--website-line);
    box-shadow: 0 8px 16px rgb(0 0 0 / 8%);
  }
  .legal-toc a {
    padding: 12px 8px;
  }
  .legal-document article [id] {
    scroll-margin-top: calc(var(--legal-header-height) + 80px);
  }
  .legal-document .legal-footer {
    margin-left: 0;
  }
}
