/* Legal documents: privacy, terms, security, copyright.
   System fonts only, so these pages make no third-party requests. */

:root {
    --bg: #fdfdfc;
    --text: #1b1b1d;
    --muted: #67676d;
    --rule: #e7e6e2;
    --link: #2648c8;
    --serif: Charter, 'Bitstream Charter', 'Sitka Text', 'Iowan Old Style', Cambria, Georgia, serif;
    --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color-scheme: light dark;
}

/* Dark: follows the system unless the reader picks a theme (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #131315;
        --text: #e9e9ec;
        --muted: #a0a0a8;
        --rule: #2a2a2e;
        --link: #9db0ff;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #131315;
    --text: #e9e9ec;
    --muted: #a0a0a8;
    --rule: #2a2a2e;
    --link: #9db0ff;
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 18px/1.65 var(--serif);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Skip link */
.skip {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 10;
    padding: 8px 14px;
    background: var(--text);
    color: var(--bg);
    font: 600 14px var(--sans);
    border-radius: 4px;
    text-decoration: none;
}

.skip:focus {
    top: 12px;
}

/* Site bar: one row when wide; name + theme, then the documents, when narrow */
.bar {
    border-bottom: 1px solid var(--rule);
    font: 14px/1.4 var(--sans);
}

.bar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "owner nav theme";
    align-items: center;
    gap: 8px 28px;
}

.owner {
    grid-area: owner;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.docs-nav {
    grid-area: nav;
    justify-self: end;
}

.docs {
    display: flex;
    gap: 4px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.docs a {
    display: block;
    padding: 6px 0;
    color: var(--muted);
    text-decoration: none;
}

.docs a:hover {
    color: var(--text);
}

.theme {
    grid-area: theme;
}

.theme,
.print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 10px;
    font: 14px/1 var(--sans);
    color: var(--muted);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 999px;
    cursor: pointer;
    flex: none;
}

/* show the icon for the current mode */
.theme svg {
    display: none;
}

.theme[data-mode="system"] .i-system,
.theme[data-mode="light"] .i-light,
.theme[data-mode="dark"] .i-dark {
    display: block;
}

.theme:hover,
.print:hover {
    color: var(--text);
    border-color: var(--muted);
}

.theme:focus-visible,
.print:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

.theme svg,
.print svg {
    width: 16px;
    height: 16px;
    flex: none;
}

@media (max-width: 720px) {
    .bar-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas: "owner theme" "nav nav";
        padding-bottom: 0;
    }

    .docs-nav {
        justify-self: stretch;
        border-top: 1px solid var(--rule);
    }

    .docs {
        justify-content: space-between;
    }

    .docs a {
        padding: 12px 0;
    }

    /* icon only; the label stays for screen readers */
    .theme {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .theme span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

.btn {
    font: 14px/1.4 var(--sans);
    color: var(--muted);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
}

.btn:hover {
    color: var(--text);
    border-color: var(--muted);
}

.btn:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

.docs a[aria-current="page"] {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--rule);
}

/* Layout */
.layout {
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 24px 96px;
    display: grid;
    grid-template-columns: 220px minmax(0, 42rem);
    gap: 64px;
}

/* Contents: a rail of sections; the one being read is marked on the rail */
.toc {
    font: 14px/1.45 var(--sans);
}

.toc details {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    user-select: none;
    -webkit-user-select: none;
}

.toc summary::-webkit-details-marker {
    display: none;
}

/* chevron: points down when closed, up when open */
.toc summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .15s ease;
}

.toc details[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
    border-left: 1px solid var(--rule);
}

.toc li {
    counter-increment: toc;
}

.toc a {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 5px 0 5px 14px;
    color: var(--muted);
    text-decoration: none;
}

.toc a::before {
    content: counter(toc);
    flex: none;
    width: 2ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
    opacity: .75;
}

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

.toc a.is-current {
    color: var(--text);
    font-weight: 500;
}

/* the marker sits on the rail */
.toc a.is-current::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--text);
}

/* Document */
.doc h1 {
    font-size: clamp(32px, 5vw, 42px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0 0 12px;
}

/* Dates and print: one row at every width */
.doc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 0 0 40px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin: 0;
    font: 14px/1.5 var(--sans);
    color: var(--muted);
}

.meta div {
    display: flex;
    gap: 6px;
}

.meta dd {
    margin: 0;
    color: var(--text);
}

/* The one bold element: plain-language commitments set large */
.summary {
    border-top: 2px solid var(--text);
    padding-top: 20px;
    margin-bottom: 24px;
}

.summary h2 {
    font: 600 15px/1.4 var(--sans);
    margin: 0 0 16px;
}

.summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.summary li {
    font-size: clamp(21px, 2.6vw, 25px);
    line-height: 1.4;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
}

.doc .summary li + li {
    margin-top: 0;
}

.doc section {
    counter-increment: section;
}

.doc {
    counter-reset: section;
}

.doc section > h2 {
    font-size: 25px;
    line-height: 1.3;
    font-weight: 600;
    margin: 56px 0 16px;
    display: flex;
    gap: 14px;
    align-items: baseline;
}

.doc section > h2::before {
    content: counter(section);
    font: 500 16px/1 var(--sans);
    color: var(--muted);
    min-width: 1.4em;
    font-variant-numeric: tabular-nums;
}

.anchor {
    margin-left: auto;
    font: 15px var(--sans);
    color: var(--muted);
    text-decoration: none;
    opacity: 0;
    transition: opacity .15s;
}

h2:hover .anchor,
.anchor:focus-visible {
    opacity: 1;
}

.doc h3 {
    font: 600 17px/1.4 var(--sans);
    margin: 32px 0 8px;
}

.doc p,
.doc ul,
.doc ol {
    margin: 0 0 16px;
}

/* avoid a lone word on the last line; ignored where unsupported */
.doc p,
.doc li,
.reach p {
    text-wrap: pretty;
}

.doc li + li {
    margin-top: 6px;
}

.doc ul ul {
    margin: 6px 0 0;
}

.note {
    color: var(--muted);
    font-size: 16px;
}

.contact {
    font: 16px/1.6 var(--sans);
    border-left: 2px solid var(--rule);
    padding-left: 16px;
    margin: 0 0 16px;
}

/* Tables */
.table {
    overflow-x: auto;
    margin: 8px 0 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font: 15px/1.5 var(--sans);
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 10px 16px 10px 0;
    border-bottom: 1px solid var(--rule);
}

th {
    font-weight: 600;
    white-space: nowrap;
}

td:first-child {
    font-weight: 500;
}

/* Footer */
.foot {
    border-top: 1px solid var(--rule);
    font: 14px/1.5 var(--sans);
    color: var(--muted);
}

.foot-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 24px;
}

.reach {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 32px;
    padding: 20px 24px;
    border: 1px solid var(--rule);
    border-radius: 6px;
}

.reach h2 {
    margin: 0 0 4px;
    font: 600 15px/1.4 var(--sans);
    color: var(--text);
}

.reach p {
    margin: 0;
    max-width: 60ch;
}

.reach-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.reach-action .btn {
    padding: 7px 14px;
    color: var(--text);
}

.reach-action .address {
    font: 15px/1.4 var(--sans);
    color: var(--link);
    overflow-wrap: anywhere;
}

.foot-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 24px;
}

.foot a {
    color: var(--muted);
}

@media (max-width: 720px) {
    .reach {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
    }
}

@media (max-width: 960px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding-top: 32px;
    }

    .toc {
        border: 1px solid var(--rule);
        border-radius: 6px;
    }

    .toc details {
        position: static;
        max-height: none;
    }

    .toc summary {
        margin: 0;
        padding: 14px 16px;
    }

    .toc ol {
        margin: 0 16px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .anchor {
        transition: none;
    }
}

@media (max-width: 560px) {
    .print {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .print span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    body {
        font-size: 17px;
    }

    .doc section > h2 {
        font-size: 22px;
    }

    .anchor {
        display: none;
    }
}

@media print {
    /* paper is always light: outranks the dark theme selectors above */
    :root,
    :root[data-theme] {
        --bg: #fff;
        --text: #000;
        --muted: #444;
        --rule: #ddd;
        --link: #000;
        color-scheme: light;
    }

    .bar,
    .toc,
    .anchor,
    .btn,
    .theme,
    .print,
    .skip,
    .reach {
        display: none;
    }

    .layout {
        display: block;
        padding: 0;
    }

    body {
        font-size: 11pt;
    }
}
