/* Privacy policies and terms: the title and dates, the contents, then the
   policy itself, all in the page's one column. */

.legal-hero {
    padding-bottom: clamp(2rem, 4.5vw, 3.5rem);
}

.legal-identity h1 {
    font-size: var(--title-size);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.02;
    text-wrap: balance;
}

.legal-lede {
    max-width: 34rem;
    margin-top: 1rem;
    color: var(--label-2);
    font-size: clamp(1.05rem, 1.35vw, 1.2rem);
    line-height: 1.45;
}

.legal-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin-top: 1rem;
    color: var(--label-2);
    font-size: 0.95rem;
}

.legal-dates > div {
    display: flex;
    gap: 0.35rem;
}

.legal-dates span,
.legal-dates dd {
    color: var(--label);
}

.legal-toc {
    padding-block: clamp(1.5rem, 3vw, 2.25rem);
    border-top: 1px solid var(--separator);
}

.legal-toc > p {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-toc ol {
    display: grid;
    gap: 0.4rem;
    max-width: 22rem;
    font-size: 0.95rem;
}

.legal-toc a {
    color: var(--label-2);
    text-decoration: none;
}

/* Older policies number their sections, so their contents do too. */
.legal-document--legacy .legal-toc ol {
    padding-left: 1.4rem;
    list-style: decimal;
}

.legal-document--legacy .legal-toc li::marker {
    color: var(--label-3);
}

.legal-toc a:hover {
    color: var(--label);
}

.legal-copy,
.legal-document > .legal-section:first-of-type {
    padding-top: clamp(1.5rem, 3vw, 2.25rem);
    border-top: 1px solid var(--separator);
}

.legal-section {
    max-width: var(--prose-width);
    line-height: 1.65;
    scroll-margin-top: 1.5rem;
}

.legal-section + .legal-section {
    margin-top: 2.5rem;
}

.legal-section h2 {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.legal-section h3 {
    margin-top: 1.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

.legal-section p,
.legal-section ul,
.legal-section ol {
    margin-top: 0.75rem;
}

.legal-section ul {
    padding-left: 1.3rem;
    list-style: disc;
}

.legal-section ol {
    padding-left: 1.4rem;
    list-style: decimal;
}

.legal-section li + li {
    margin-top: 0.4rem;
}

.legal-section strong {
    font-weight: 600;
}

.legal-section a:not(.heading-link),
.legal-contact-card a,
.legal-contact a,
.legal-crosslink a,
.legal-next a {
    text-decoration-color: var(--label-3);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.legal-section a:not(.heading-link):hover,
.legal-crosslink a:hover,
.legal-next a:hover {
    text-decoration-color: currentColor;
}

/* Section headings link to themselves; the # appears on hover. */
.heading-link {
    text-decoration: none;
}

.heading-link span {
    margin-left: 0.35rem;
    color: var(--label-3);
    opacity: 0;
}

.heading-link:hover span,
.heading-link:focus-visible span {
    opacity: 1;
}

.legal-contact-card,
.legal-contact,
.legal-callout {
    max-width: var(--prose-width);
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-group);
    background: var(--group);
    font-size: 0.95rem;
}

.legal-contact-card p + p,
.legal-contact p + p {
    margin-top: 0.3rem;
}

.legal-contact span {
    display: inline-block;
    min-width: 9rem;
    color: var(--label-2);
}

.legal-callout {
    border-left: 3px solid var(--app, var(--studio-fill));
    border-radius: 0 var(--radius-group) var(--radius-group) 0;
}

.legal-crosslink,
.legal-next {
    max-width: var(--prose-width);
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--separator);
    color: var(--label-2);
}

.legal-next a {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--label);
    font-weight: 500;
}
