/* Figma 412:3 and 409:52: shared legal pages, independent of app density. */
@font-face {
  font-family: Inter;
  src: url('/InterVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --legal-background: #fcfcfb;
  --legal-line: #e2e4e7;
  --legal-text: #57636f;
  --legal-heading: #212933;
  --legal-link: #33679d;
  --legal-muted: #6e7a85;
}

* { box-sizing: border-box; }
html { background: var(--legal-background); }
body { margin: 0; font: 400 16px/26px Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-optical-sizing: none; color: var(--legal-text); }

.legal-page {
  --legal-gutter: clamp(24px, 7.69230769vw, 150px);
  --legal-edge: 94px;
  display: grid;
  grid-template-columns: minmax(0, 900px) minmax(32px, 2fr) minmax(180px, 3fr);
  max-width: 1950px;
  min-height: 100vh;
  margin-inline: auto;
  padding: var(--legal-edge) var(--legal-gutter);
  box-shadow: inset 0 0 0 1px var(--legal-line);
}

.legal-content {
  position: relative;
  min-width: 0;
  padding: 39px 43px 63px;
  border: 1px solid var(--legal-line);
}

.legal-page--privacy { --legal-muted: #606d77; }
.legal-page--privacy .legal-content { padding-bottom: 103px; }
.legal-page--privacy .legal-footer nav a:last-child { font-weight: 400; }
.legal-mobile-brand { display: none; }

.legal-content::before, .legal-decoration::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--legal-edge) - 1px);
  bottom: calc(-1 * var(--legal-edge) - 1px);
  left: -1px;
  right: -1px;
  border-inline: 1px solid var(--legal-line);
  pointer-events: none;
}

.legal-header { padding-bottom: 11px; border-bottom: 1px solid rgb(226 228 231 / 75%); }
h1, h2, p { margin: 0; }
h1 { color: var(--legal-heading); font-size: 30px; font-weight: 500; line-height: 38px; }
.legal-effective { margin-top: 9px; font-size: 14px; line-height: 21px; color: var(--legal-muted); white-space: pre-wrap; }
.legal-introduction { margin-block: 24px; }
.legal-sections { display: flex; flex-direction: column; gap: 30px; }
.legal-sections section { display: flex; min-width: 0; flex-direction: column; gap: 11px; }
h2 { color: var(--legal-heading); font-size: 19px; font-weight: 500; line-height: 27px; }
p, h1, h2 { overflow-wrap: anywhere; }
strong { font-weight: 600; }
.legal-label { font-weight: 500; }
a { color: var(--legal-link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--legal-link); outline-offset: 4px; border-radius: 1px; }
.legal-footer { margin-top: 24px; }
.legal-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; font-weight: 500; line-height: 22px; }
.legal-footer nav > span { color: var(--legal-muted); font-weight: 400; }
.legal-footer > p { margin-top: 24px; color: var(--legal-muted); font-size: 12px; line-height: 18px; }

.legal-spacer { position: relative; }
.legal-spacer::before { content: ''; position: absolute; top: calc(-1 * var(--legal-edge)); bottom: calc(-1 * var(--legal-edge)); left: 50%; width: 1px; background: var(--legal-line); }
.legal-decoration { position: relative; display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--legal-line); }
.legal-wordmark { display: flex; align-items: center; justify-content: center; height: 93px; flex: 0 0 93px; padding: 15px; color: #4a80bf; font-size: clamp(16px, 1.23077vw, 24px); font-weight: 700; line-height: 1.3; text-align: center; }
.legal-grid {
  flex: 1;
  border-top: 1px solid rgb(226 228 231 / 52%);
  background-image: linear-gradient(to right, transparent calc(100% - 1px), rgb(226 228 231 / 52%) 0), linear-gradient(to bottom, transparent 46px, rgb(226 228 231 / 52%) 0);
  background-size: 33.333333% 100%, 100% 47px;
}

/* Give laptop text the available space before the decorative columns. */
@media (max-width: 1100px) and (min-width: 769px) {
  .legal-page { --legal-gutter: 24px; --legal-edge: 47px; grid-template-columns: minmax(0, 1fr) 32px 180px; }
  .legal-content { padding-inline: 27px; }
  .legal-wordmark { padding-inline: 8px; font-size: 16px; }
}

@media (max-width: 768px), (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  :root { --legal-background: #fff; --legal-muted: #606d77; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .legal-page {
    display: block;
    padding: 25px 20px 37px;
    box-shadow: inset 0 0 0 1px rgb(226 228 231 / 55%);
  }
  .legal-mobile-brand {
    display: block;
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgb(226 228 231 / 80%);
    color: #4a80bf;
    font-size: 20px;
    font-weight: 700;
    line-height: 27px;
    overflow-wrap: anywhere;
  }
  .legal-page .legal-content { padding: 0; border: 0; }
  .legal-spacer, .legal-decoration { display: none; }
  .legal-content::before { display: none; }
  .legal-effective { white-space: normal; }
  .legal-footer nav { min-height: 22px; }
  .legal-footer nav a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -11px; padding-block: 11px; }
  .legal-footer nav a:last-child { font-weight: 400; }
  .legal-content p a { padding-block: 3px; }
}

@media print {
  .legal-page { display: block; padding: 0; border: 0; box-shadow: none; }
  .legal-content { padding: 0; border: 0; }
  .legal-spacer, .legal-decoration, .legal-mobile-brand { display: none; }
  .legal-content::before { display: none; }
  h2 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
}
