/* ============================================
   Lightli.uk - Shared Legal Page Stylesheet
   ============================================ */

:root {
    --legal-dark: #3a3a3a;
    --legal-muted: #808080;
    --legal-light: #f6f6f6;
    --legal-white: #ffffff;
    --legal-border: rgba(58, 58, 58, 0.08);
    --legal-radius: 20px;
    --legal-lane: 760px;
    --legal-page-gutter: 38px;
}

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

html {
    height: 100%;
    background: var(--legal-light);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--legal-light);
    color: var(--legal-dark);
    font-family: "montserrat", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

.policy {
    width: min(calc(100% - var(--legal-page-gutter)), var(--legal-lane));
    margin: 0 auto;
    padding: 104px 0 84px;

    @media (max-width: 760px) {
        padding: 44px 0 60px;
    }

    & > p,
    & > ul,
    & > ol,
    & > h2,
    & > h3 {
        width: 100%;
    }

    & p {
        margin: 0 0 18px;
        color: var(--legal-dark);
        font-size: 16px;
        font-weight: 400;
    }

    & ul,
    & ol {
        margin: 0 0 26px;
        padding-left: 24px;
    }

    & li {
        margin-bottom: 12px;
        color: var(--legal-dark);
        font-size: 16px;
        line-height: 1.7;
    }

    & li::marker {
        color: var(--legal-muted);
    }

    & a {
        color: var(--legal-dark);
        text-decoration: none;
        border-bottom: 1px solid rgba(58, 58, 58, 0.42);
        transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
    }

    & a:hover {
        color: #000000;
        border-color: var(--legal-dark);
    }

    & a:focus-visible {
        outline: 2px solid var(--legal-dark);
        outline-offset: 3px;
    }

    & strong {
        color: var(--legal-dark);
        font-family: "Vollkorn", serif;
        font-weight: 700;
        font-variant-numeric: lining-nums;
        font-feature-settings: "lnum" 1;
    }
}

.legal-header {
    width: 100%;
    margin-bottom: 144px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: max-content;
    min-height: 45px;
    margin-bottom: 18px;
    padding: 0 16px;
    border-bottom: none !important;
    border-radius: var(--legal-radius);
    background: var(--legal-white);
    color: var(--legal-dark) !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transform-origin: center;
    transition: var(--button-press-transition);
}

.back-link::before {
    content: "\2190";
    font-size: 16px;
    line-height: 1;
}

.back-link:hover {
    color: var(--legal-dark) !important;
    font-weight: 400;
}

.back-link:active {
    transform: scale(var(--button-press-scale));
}

.back-link:focus-visible {
    box-shadow: var(--button-focus-ring);
    outline: none;
}

.legal-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-height: 55px;
    margin-bottom: 192px;
    padding: 5px;
    border-radius: var(--legal-radius);
    background: var(--legal-white);

    & a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 45px;
        padding: 0 16px;
        border: none;
        border-radius: var(--legal-radius);
        color: var(--legal-dark);
        font-family: "montserrat", sans-serif;
        font-size: 14px;
        font-weight: 400;
        line-height: 1;
        text-align: center;
        text-decoration: none;
        transform-origin: center;
        transition: var(--button-press-transition);
    }

    & a:hover {
        font-weight: 400;
    }

    & a:active {
        transform: scale(var(--button-press-scale));
    }

    & a:focus-visible {
        box-shadow: var(--button-focus-ring);
        outline: none;
    }

    & a[aria-current="page"] {
        background: var(--legal-dark);
        color: var(--legal-white);
        font-weight: 400;
    }
}


h1,
h2,
h3 {
    font-family: "Vollkorn", serif;
    font-weight: 700;
    font-style: normal;
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
    letter-spacing: 0;
}

h1 {
    margin: 0 0 20px;
    color: var(--legal-dark);
    font-size: clamp(34px, 5vw, 42px);
    line-height: 1.12;
    text-align: center;
}

.last-updated {
    margin: 0;
    color: var(--legal-muted);
    font-size: 8px;
    font-style: normal;
    text-align: center;
}

h2 {
    margin: 54px 0 18px;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--legal-dark);
    font-size: 30px;
    line-height: 1.22;
}

h3 {
    margin: 34px 0 14px;
    color: var(--legal-dark);
    font-family: "Vollkorn", serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.quick-summary {
    width: 100%;
    margin: 38px 0;
}

.summary-heading {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;

    & h2 {
        margin: 0 0 10px;
        padding: 0;
        border: none;
        font-size: 30px;
        line-height: 1.2;
    }

    & p {
        max-width: 620px;
        margin-right: auto;
        margin-left: auto;
        color: var(--legal-muted);
    }
}

.summary-grid,
.summary-grid-privacy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;

    @media (max-width: 660px) {
        grid-template-columns: 1fr;
    }
}

.summary-item {
    display: flex;
    min-height: 0;
    padding: 20px;
    flex-direction: column;
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    background: var(--legal-white);

    &::before {
        content: "";
        display: block;
        width: 34px;
        height: 6px;
        margin-bottom: 16px;
        border-radius: 999px;
        background: #dbffe5;
    }

    &:nth-child(2)::before { background: #dbe9ff; }
    &:nth-child(3)::before { background: #ebdbff; }
    &:nth-child(4)::before { background: #fff1db; }
    &:nth-child(5)::before { background: #fcdbff; }
    &:nth-child(6)::before { background: #ffdbdb; }
    &:nth-child(7)::before { background: #cdfff6; }
    &:nth-child(8)::before { background: #ffe0af; }

    & .summary-kicker {
        display: block;
        margin-bottom: 8px;
        color: var(--legal-muted);
        font-size: 12px;
        font-weight: 400;
        line-height: 1.3;
    }

    & strong {
        display: block;
        min-height: 2.7em;
        margin-bottom: 8px;
        font-family: "Vollkorn", serif;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;

        @media (max-width: 660px) {
            min-height: 0;
        }
    }

    & p {
        margin: 0;
        color: var(--legal-dark);
        font-size: 14px;
        line-height: 1.58;
    }
}

.legal-contents,
.section-intro,
.legal-note,
.closing-note {
    width: 100%;
    margin: 36px 0;
    padding: 24px 28px;
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    background: var(--legal-white);

    @media (max-width: 620px) {
        padding: 22px 20px;
    }

    & h2,
    & h3 {
        margin-top: 0;
    }

    & p:last-child {
        margin-bottom: 0;
    }
}

.legal-contents {
    & h2 {
        margin: 0 0 14px;
        padding: 0;
        border: none;
        font-family: "Vollkorn", serif;
        font-size: 20px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
    }
}

.contents-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    @media (max-width: 620px) {
        grid-template-columns: 1fr;
    }

    & a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 55px;
        padding: 0 16px;
        border: none;
        border-radius: var(--legal-radius);
        background: var(--legal-light);
        color: var(--legal-dark);
        font-family: "montserrat", sans-serif;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.35;
        text-align: center;
        text-decoration: none;
        transform-origin: center;
        transition: var(--button-press-transition);
    }

    & a:hover {
        font-weight: 400;
    }

    & a:active {
        transform: scale(var(--button-press-scale));
    }

    & a:focus-visible {
        box-shadow: var(--button-focus-ring);
        outline: none;
    }
}

.legal-data-list {
    display: grid;
    gap: 14px;
    margin: 4px 0 28px;
    padding: 0;
}

.legal-data-item {
    padding: 2px 0 2px 18px;
    border-left: 3px solid rgba(58, 58, 58, 0.22);
}

.legal-data-item dt {
    margin: 0 0 5px;
    color: var(--legal-dark);
    font-family: "Vollkorn", serif;
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
    line-height: 1.25;
}

.legal-data-item dd {
    margin: 0;
    color: var(--legal-dark);
    font-size: 16px;
    line-height: 1.7;
}

.legal-note {
    border-color: transparent;
    background: #dbffe5;
}

.closing-note {
    border-color: transparent;
    background: #dbffe5;
}

@media print {
    html,
    body {
        background: #ffffff;
    }

    .nav-wrapper,
    .legal-switcher,
    .back-link {
        display: none;
    }

    .policy {
        width: auto;
        padding: 20px;
    }

    .summary-grid,
    .summary-grid-privacy,
    .contents-grid {
        grid-template-columns: 1fr;
    }
}

::selection {
    background: var(--legal-dark);
    color: var(--legal-white);
}

::-moz-selection {
    background: var(--legal-dark);
    color: var(--legal-white);
}
