/* The terms and the privacy policy — templates/page/layout.html.twig, the
   `new-podmienky` and `new-sukromie` prototypes (CU-1amfka6tgqj).

   The class names are the prototype's own `lg-*`, not `gk-legal__*`, on
   purpose: the text files are counsel's text block copied whole from the
   prototype (SK) and from the Czech fragments attached to the ticket, so the next
   revision drops in the same way and diffs against its source. doc/pages.md.

   It is the page's `<main>` itself, like Kontakt: the 550px column inside the
   design's 16 / 24 / 40px side padding, 40px to the header and 64px to the
   footer. */

.gk-legal {
    max-width: calc(34.375rem + 2 * var(--gk-space-4));
    margin-inline: auto;
    padding: var(--gk-space-10) var(--gk-space-4) 4rem;
}

@media (min-width: 768px) {
    .gk-legal {
        max-width: calc(34.375rem + 2 * var(--gk-space-6));
        padding-inline: var(--gk-space-6);
    }
}

@media (min-width: 1024px) {
    .gk-legal {
        max-width: calc(34.375rem + 2 * var(--gk-space-10));
        padding-inline: var(--gk-space-10);
    }
}

/* The design's `gk-h1-flow`, 36/38 and 48/48 — page.css's heading. */
.lg-title {
    margin: 0;
    color: var(--gk-color-text);
    font-size: var(--gk-text-3xl);
    font-weight: var(--gk-weight-bold);
    line-height: 2.375rem;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

@media (min-width: 768px) {
    .lg-title {
        font-size: var(--gk-text-4xl);
        line-height: 3rem;
    }
}

.lg-alias {
    margin: var(--gk-space-2) 0 0;
    color: var(--gk-color-text-soft);
    font: 400 0.875rem/1.25rem var(--gk-font-body);
}

/* Links in a document are the text's colour with a quiet underline, not the
   brand red: there are dozens of them and none is a call to action. */
.gk-legal a {
    color: var(--gk-color-text);
    text-decoration: underline;
    text-decoration-color: var(--gk-color-border);
    text-underline-offset: 2px;
    transition: text-decoration-color 140ms ease;
}

@media (hover: hover) {
    .gk-legal a:hover {
        text-decoration-color: currentColor;
    }
}

.gk-legal a:active {
    text-decoration-color: currentColor;
}

/* Obsah — the one string in the block that is not counsel's. */
.lg-toc {
    margin: var(--gk-space-10) 0 0;
}

.lg-toc-title,
.lg-h2 {
    margin: 0 0 var(--gk-space-4);
    color: var(--gk-color-text);
    font: 600 1.125rem/1.5rem var(--gk-font-body);
    letter-spacing: 0;
}

.lg-toc-title {
    margin-bottom: 0.25rem;
}

.lg-toc-list,
.lg-toc-sub {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lg-toc-sub {
    padding-left: var(--gk-space-4);
}

/* A 44px row per entry, so each is a touch target; the underline is on the
   span, so it follows the words and not the row. */
.gk-legal .lg-toc a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.625rem 0;
    box-sizing: border-box;
    font: 400 1rem/1.5rem var(--gk-font-body);
    text-decoration: none;
}

.lg-toc a span {
    text-decoration: underline;
    text-decoration-color: var(--gk-color-border);
    text-underline-offset: 2px;
    transition: text-decoration-color 140ms ease;
}

@media (hover: hover) {
    .lg-toc a:hover span {
        text-decoration-color: currentColor;
    }
}

.lg-toc a:active span {
    text-decoration-color: currentColor;
}

.lg-toc a:focus {
    outline: none;
}

.lg-toc a:focus-visible span {
    border-radius: 2px;
    box-shadow: var(--gk-ring-focus);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.lg-article {
    margin: var(--gk-space-10) 0 0;
}

/* Clear of the sticky header when a link lands on an article — the same
   64 / 80px the rest of the site uses. */
.lg-h2,
.lg-h3 {
    scroll-margin-top: 4rem;
}

@media (min-width: 768px) {
    .lg-h2,
    .lg-h3 {
        scroll-margin-top: 5rem;
    }
}

.lg-h3 {
    margin: var(--gk-space-8) 0 var(--gk-space-2);
    color: var(--gk-color-text);
    font: 600 1rem/1.5rem var(--gk-font-body);
    letter-spacing: 0;
}

.lg-body p,
.lg-list li {
    margin: 0;
    color: var(--gk-color-text);
    font: 400 1rem/1.75rem var(--gk-font-body);
    text-wrap: pretty;
}

.lg-body p + p,
.lg-body p + .lg-list,
.lg-list + p,
.lg-body p + .lg-box,
.lg-box + p,
.lg-list + .lg-box,
.lg-box + .lg-list {
    margin-top: var(--gk-space-6);
}

.lg-h2 + p,
.lg-h3 + p,
.lg-h2 + .lg-list,
.lg-h3 + .lg-list {
    margin-top: 0;
}

.lg-list {
    margin: 0;
    padding: 0 0 0 1.25rem;
}

.lg-list li + li {
    margin-top: var(--gk-space-2);
}

.lg-list li::marker {
    color: var(--gk-color-text-soft);
}

.lg-list-num {
    padding-left: 0;
    list-style: none;
}

.lg-num {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* 8.1.6 of the privacy policy — GDPR Art. 21 wants the right to object to
   stand apart from the rest. */
.lg-box {
    padding: var(--gk-space-4);
    background: var(--gk-color-surface);
    border: 1px solid var(--gk-color-border);
    border-radius: var(--gk-radius-lg);
}

/* A taller hit area for the inline links without moving a line of text. */
.lg-body a {
    display: inline;
    margin: 0 -0.25rem;
    padding: 0.875rem 0.25rem;
    overflow-wrap: anywhere;
}
