/* The shell for a standing document - the privacy notice today, anything else of that shape
   later. Linked by Pages/Shared/_DocLayout.cshtml, and nothing else: a document has no
   workbench in it, so it needs none of css/workbench.css.

   Colours come from the theme tokens in css/app.css, which the inline script in the page
   head has already resolved before first paint, so a document opens in the reader's chosen
   theme without a script of its own beyond that.

   The typeface is repeated from `.cf-shell` in css/workbench.css: a document sits outside
   the shell and so inherits nothing from it, and the browser default is a serif. */
.doc {
    min-height: 100vh;
    background: var(--cf-bg);
    color: var(--cf-text);
    font-family: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
}

/* Matches the workbench app bar's height and chrome, so following a link out of the app
   and back does not feel like arriving somewhere else. */
.doc-bar {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 0.625rem;
    background: var(--cf-chrome);
    border-bottom: 1px solid var(--cf-border);
}

.doc-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: inherit;
    text-decoration: none;
}

.doc-mark {
    width: 1.25rem;
    height: 1.25rem;
}

.doc-mark-dim {
    fill: var(--cf-faint);
}

.doc-mark-lit {
    fill: var(--cf-accent);
}

.doc-name {
    color: var(--cf-text);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.doc-name-accent {
    color: var(--cf-accent);
}

/* A measure, not a full-width page: this is prose and it is long. */
.doc-body {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 6rem;
}

@media (max-width: 720px) {
    .doc-body {
        padding-top: 1.75rem;
    }
}

/* Prose. Everything here is measured against the reading column above, and every colour is
   a theme token, so the page works in both themes without a rule of its own for either. */
.doc-article {
    line-height: 1.65;
}

.doc-eyebrow {
    margin: 0 0 0.375rem;
    color: var(--cf-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doc-article h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.doc-updated {
    margin: 0.5rem 0 2rem;
    color: var(--cf-faint);
    font-size: 0.8125rem;
}

.doc-article h2 {
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cf-border-soft);
    font-size: 1.125rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.doc-article h3 {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 650;
}

.doc-article p {
    margin: 0 0 1rem;
    color: var(--cf-text);
}

.doc-article ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.doc-article li {
    margin-bottom: 0.5rem;
}

.doc-article a {
    color: var(--cf-accent);
    text-underline-offset: 0.15em;
}

.doc-article code {
    padding: 0.0625rem 0.25rem;
    border-radius: 0.1875rem;
    background: var(--cf-pane-alt);
    border: 1px solid var(--cf-border-soft);
    color: var(--cf-text);
    font-family: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
    font-size: 0.8125em;
}

/* The one part of the page most readers will read: the four claims, up front and
   boxed, so the detail below is confirmation rather than homework. */
.doc-summary {
    margin: 0 0 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--cf-border);
    border-left: 3px solid var(--cf-accent);
    border-radius: 0.375rem;
    background: var(--cf-pane-alt);
}

.doc-summary h2 {
    margin: 0 0 0.75rem;
    padding-top: 0;
    border-top: 0;
    font-size: 0.9375rem;
}

.doc-summary ul {
    margin: 0;
}

.doc-summary li:last-child {
    margin-bottom: 0;
}

/* "How to check this yourself" - visibly an aside rather than more of the argument,
   because its point is that the argument need not be believed. */
.doc-check {
    margin: 1.5rem 0;
    padding: 1.125rem 1.375rem;
    border: 1px dashed var(--cf-border);
    border-radius: 0.375rem;
}

.doc-check p:last-child {
    margin-bottom: 0;
}

/* Narrow screens get a scrolling table rather than three squeezed columns; the wrapper
   is what scrolls, so the page itself never does sideways. */
.doc-table-wrap {
    margin: 0 0 1.25rem;
    overflow-x: auto;
}

.doc-table {
    width: 100%;
    min-width: 34rem;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.doc-table th,
.doc-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--cf-border-soft);
    text-align: left;
    vertical-align: top;
}

.doc-table th {
    border-bottom-color: var(--cf-border);
    color: var(--cf-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.doc-table td:first-child {
    white-space: nowrap;
}

.doc-back {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cf-border-soft);
    font-size: 0.875rem;
}

@media (max-width: 720px) {
    .doc-article h1 {
        font-size: 1.625rem;
    }

    .doc-summary,
    .doc-check {
        padding-inline: 1rem;
    }

    /* Two columns will not fit a phone, and the scrolling wrapper hides the third
       one - the *why*, which is the column that answers the question a reader came to
       this table with. So each row becomes a block instead: the key, what it holds,
       and why, stacked. No column headings are needed once they are stacked; a code
       chip over two sentences reads as the definition it is. */
    .doc-table-wrap {
        overflow-x: visible;
    }

    .doc-table,
    .doc-table tbody,
    .doc-table tr,
    .doc-table td {
        display: block;
        min-width: 0;
        width: auto;
    }

    .doc-table thead {
        display: none;
    }

    .doc-table tr {
        padding: 0.875rem 0;
        border-bottom: 1px solid var(--cf-border-soft);
    }

    .doc-table td {
        padding: 0;
        border-bottom: 0;
    }

    .doc-table td:first-child {
        margin-bottom: 0.375rem;
    }

    /* The reason, told apart from the description above it by weight rather than by a
       heading that would cost a line of its own on the narrowest screen there is. */
    .doc-table td:last-child {
        margin-top: 0.25rem;
        color: var(--cf-muted);
    }
}
