/*
 * The legal pages' styles — the Privacy Policy and the Terms of Service.
 *
 * Both documents are static pages the server hands out at their own addresses, outside the
 * application: Google's OAuth verification reads the privacy policy without running any script,
 * so its whole text has to be in the file (see the two exact-match blocks in nginx.conf). They are
 * therefore styled here rather than by the application's theme.
 *
 * The palette follows the product exactly as the landing page's does: nginx stamps `data-variant`
 * on the root as it serves the page as the other product (BUG-KYYM), and the block keyed on that
 * value swaps the accent. The accents are the landing page's text accents, which its test measures
 * readable on white. The neutrals are shared by both products and stay literal.
 */

/* Montserrat, the product's body face, from the landing page's own files. One variable file per
   script subset, so a weight range covers every weight the documents use. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/landing/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/landing/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Direct — MyHome Prompts. */
:root {
  /* #006ab4 */
  --legal-accent-text: 0 106 180;
  /* #005694 */
  --legal-accent-text-hover: 0 86 148;
}

/* Agency — WFG Prompts: the bronze the landing page uses for text, since its gold is too light to
   be read on white. */
:root[data-variant='agency'] {
  /* #856732 */
  --legal-accent-text: 133 103 50;
  /* #6b5228 */
  --legal-accent-text-hover: 107 82 40;
}

body {
  margin: 0;
  background: #f5f7fa;
  color: #1c2733;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

a {
  color: rgb(var(--legal-accent-text));
  text-underline-offset: 2px;
}
a:hover {
  color: rgb(var(--legal-accent-text-hover));
}
a:focus-visible {
  outline: 2px solid rgb(var(--legal-accent-text));
  outline-offset: 2px;
  border-radius: 2px;
}

.legal-header,
.legal-footer,
.legal-document {
  box-sizing: border-box;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.legal-header {
  padding: 32px 16px 24px;
}
.legal-home {
  display: inline-block;
}
.legal-home img {
  display: block;
  height: 44px;
  width: auto;
}

.legal-document {
  padding: 40px;
  background: #ffffff;
  border: 1px solid #e1e7ee;
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(0, 106, 180, 0.04),
    0 4px 12px rgba(0, 106, 180, 0.06);
  overflow-wrap: break-word;
}

.legal-document h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}
.legal-updated {
  margin: 0 0 28px;
  color: #56657a;
  font-size: 14px;
  font-weight: 500;
}
.legal-document h2 {
  margin: 36px 0 10px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}
.legal-document h3 {
  margin: 22px 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.legal-document p,
.legal-document ul,
.legal-document ol,
.legal-document address {
  margin: 0 0 14px;
}
.legal-document ul,
.legal-document ol {
  padding-left: 22px;
}
.legal-document li {
  margin: 0 0 8px;
}
.legal-document li:last-child {
  margin-bottom: 0;
}
.legal-document address {
  padding-left: 16px;
  border-left: 3px solid rgb(var(--legal-accent-text));
  font-style: normal;
}

.legal-contents {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: #f5f7fa;
  border-radius: 10px;
}
.legal-contents h2 {
  margin: 0 0 8px;
  font-size: 15px;
}
.legal-document .legal-contents ol {
  margin: 0;
  columns: 2 280px;
  column-gap: 32px;
}
.legal-document .legal-contents li {
  margin: 0 0 4px;
  break-inside: avoid;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 24px 16px 40px;
  color: #56657a;
  font-size: 13px;
}
.legal-footer a {
  color: inherit;
}
.legal-footer a:hover {
  color: rgb(var(--legal-accent-text-hover));
}
.legal-footer-copyright {
  margin: 0 0 0 auto;
}

@media (max-width: 640px) {
  .legal-header {
    padding: 20px 16px 16px;
  }
  .legal-home img {
    height: 36px;
  }
  .legal-document {
    padding: 24px 16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .legal-document h1 {
    font-size: 25px;
  }
  .legal-footer-copyright {
    margin-left: 0;
  }
}

@media print {
  body {
    background: #ffffff;
  }
  .legal-document {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .legal-footer {
    display: none;
  }
}
