/* Public policies page (resources/views/policies.blade.php), laid out like
   public/assets/files/Policies.pdf: Avenir Light text, Avenir Black
   letter-spaced headings, a rule under each section title and a vertical
   rule down the page edge. */

@font-face {
    font-family: 'PolicyAvenir';
    src: url('../fonts/Avenir/Avenir-Light.woff2') format('woff2'),
         url('../fonts/Avenir/Avenir-Light.woff') format('woff'),
         url('../fonts/Avenir/Avenir-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PolicyAvenir';
    src: url('../fonts/Avenir/Avenir-LightOblique.woff2') format('woff2'),
         url('../fonts/Avenir/Avenir-LightOblique.woff') format('woff'),
         url('../fonts/Avenir/Avenir-LightOblique.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'PolicyAvenir';
    src: url('../fonts/Avenir/Avenir-Black.woff2') format('woff2'),
         url('../fonts/Avenir/Avenir-Black.woff') format('woff'),
         url('../fonts/Avenir/Avenir-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

/* Everything below is in rem, so the page scales with the screen: 16px
   text up to 1280px wide, growing to 22px at 2560px (2K) and above. */
html {
    scroll-behavior: smooth;
    font-size: clamp(16px, calc(0.47vw + 10px), 22px);
}

body {
    margin: 0;
    background: #fff;
    color: #231f20;
    font-family: 'PolicyAvenir', 'Avenir Next', Avenir, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.5rem;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* The page column. Each policy is a "page" of its own with the PDF's
   vertical rule down its outer edge, alternating sides like the PDF's
   left and right pages: right, left, right, ... */
.policies {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 0 6rem;
}

.policy-section {
    margin: 5rem 3rem 0 0;
    padding: 3.5rem 4rem 4rem 3rem;
    border-right: 3px solid #231f20;
}
.policy-section:first-child { margin-top: 0; }

.policy-section:nth-child(even) {
    margin: 5rem 0 0 3rem;
    padding: 3.5rem 3rem 4rem 4rem;
    border-right: 0;
    border-left: 3px solid #231f20;
}

.policies h1,
.policies h2,
.policies h3 {
    margin: 0;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.3;
}

/* "POLICIES" */
.policies h1 {
    padding-left: .875rem;
    font-size: 1.125rem;
    letter-spacing: .36em;
    margin-bottom: 3.5rem;
}

/* Section titles: WEBSITE TERMS OF USE, LICENSE AGREEMENT, ... */
.policies h2 {
    position: relative;
    max-width: 29.5rem;
    margin: 0 0 3.875rem;
    padding: 0 0 1.125rem .875rem;
    font-size: 1.125rem;
    letter-spacing: .36em;
    border-bottom: 3px solid #231f20;
    scroll-margin-top: 2rem;
}

/* Body text sits indented from the section title, as in the PDF. */
.policies h3,
.policies p,
.policies ul {
    margin-left: 1.875rem;
}

/* Sub-headings: a blank line above, text straight after. */
.policies h3 {
    margin-top: 1.5rem;
    font-size: .8125rem;
    letter-spacing: .26em;
    line-height: 1.5rem;
}
.policies h2 + h3 { margin-top: 0; }

/* Paragraphs separated by one blank line; hyphenated like the PDF. */
.policies p,
.policies li {
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}
.policies p { margin-top: 0; margin-bottom: 1.5rem; }
.policies h3 + p { margin-top: 0; }

/* A paragraph introducing a list runs straight into it. */
.policies p:has(+ ul) { margin-bottom: 0; }

/* Lists: inline bullets, no indent, no gap between items. */
.policies ul {
    list-style: none;
    padding: 0;
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.policies li { margin: 0; }
.policies li::before { content: '\2022\00a0'; }
.policies ul.alt-bullets li::before { content: '\00f8\00a0'; }

.policies em { font-style: italic; }

@media (max-width: 760px) {
    body { font-size: 15px; line-height: 23px; }
    .policies { padding: 0 22px 80px; }
    .policy-section,
    .policy-section:nth-child(even) {
        margin: 88px 0 0;
        padding: 0;
        border: 0;
    }
    .policy-section:first-child { margin-top: 0; padding-top: 36px; }
    .policies h1 { padding-left: 0; font-size: 16px; letter-spacing: .3em; margin-bottom: 40px; }
    .policies h2 { margin: 0 0 36px; padding-left: 0; font-size: 15px; letter-spacing: .28em; }
    .policies h3 { font-size: 12px; letter-spacing: .2em; }
    .policies h3, .policies p, .policies ul { margin-left: 0; }
}

/* Print / Save as PDF: keep the rules and padding, give the page a margin,
   and start each policy on a new page like the PDF. */
@page { margin: 14mm 0; }

@media print {
    html { font-size: 10.5pt; }
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .policies { max-width: none; padding: 0; }
    /* The sections carry their own side inset, so the rules keep clear of
       the paper edge even when the print dialog's margins are "None". */
    .policy-section {
        margin: 0 14mm;
        padding: 1.5rem 3rem 1.5rem 1.5rem;
        border-right: 3px solid #231f20;
        border-left: 0;
        break-before: page;
    }
    .policy-section:nth-child(even) {
        margin: 0 14mm;
        padding: 1.5rem 1.5rem 1.5rem 3rem;
        border-right: 0;
        border-left: 3px solid #231f20;
    }
    .policy-section:first-child { break-before: auto; }
    .policies h2, .policies h3 { break-after: avoid; }
    .policies p, .policies li { orphans: 3; widows: 3; }
    .policies a { text-decoration: none; }
}
