/* =========================================================
   MYFUNADS — LEGAL PAGES
   Privacy Policy (pages/privacy.html) and Terms of Use
   (pages/terms.html). Builds on the tokens and hero in
   css/pages.css; the active table-of-contents entry is set
   by js/legal.js.
========================================================= */


/* =====================================================
   HERO
===================================================== */

.pg-hero.lg-hero {
    padding-bottom: clamp(40px, 5vw, 64px);
}

.lg-hero-inner {
    max-width: 860px;
}

.lg-title {
    margin: 0;
    font-size: clamp(44px, 6vw, 84px);
    line-height: .95;
    letter-spacing: -.055em;
    font-weight: 700;
}

.lg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.lg-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--mf-line-strong);
    background: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 700;
    color: var(--mf-ink-soft);
}

.lg-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mf-orange);
}

/* Privacy ⇄ Terms switch */
.lg-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 30px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(17, 17, 17, .06);
}

.lg-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--mf-ink);
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}

.lg-switch a:hover {
    background: rgba(17, 17, 17, .07);
}

.lg-switch a[aria-current="page"] {
    background: var(--mf-ink);
    color: #fff;
}


/* =====================================================
   LAYOUT: table of contents + article
===================================================== */

.lg-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 760px);
    align-items: start;
    gap: clamp(40px, 6vw, 96px);
    padding-bottom: clamp(80px, 10vw, 140px);
}

.lg-toc {
    position: sticky;
    top: 120px;
}

.lg-toc-title {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--mf-faint);
}

.lg-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 1px solid var(--mf-line);
}

.lg-toc a {
    display: flex;
    gap: 10px;
    margin-left: -1px;
    padding: 7px 0 7px 16px;
    border-left: 2px solid transparent;
    font-size: 13.5px;
    line-height: 1.35;
    color: var(--mf-muted);
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}

.lg-toc a b {
    flex-shrink: 0;
    padding-top: 2px;
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    color: var(--mf-faint);
}

.lg-toc a:hover {
    color: var(--mf-ink);
}

.lg-toc a.is-active {
    border-left-color: var(--mf-orange);
    color: var(--mf-ink);
    font-weight: 700;
}

.lg-toc a.is-active b {
    color: var(--mf-orange-deep);
}

.lg-article {
    min-width: 0;
}


/* =====================================================
   SUMMARY CARD
===================================================== */

.lg-summary {
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--mf-radius-lg);
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 123, 32, .3), transparent 45%),
        linear-gradient(160deg, #1a1414, #0b0909);
    box-shadow: var(--mf-shadow-dark);
}

.lg-summary h2 {
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #ffb37a;
}

.lg-summary ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lg-summary li {
    display: flex;
    gap: 12px;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .86);
}

.lg-summary li svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--mf-orange);
}


/* =====================================================
   SECTIONS + PROSE
===================================================== */

.lg-section {
    padding-top: clamp(40px, 5vw, 56px);
    scroll-margin-top: 110px;
}

.lg-section + .lg-section {
    margin-top: clamp(40px, 5vw, 56px);
    border-top: 1px solid var(--mf-line);
}

.lg-section h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 18px;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.lg-num {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--mf-orange-deep);
}

.lg-section h3 {
    margin: 28px 0 10px;
    font-size: 17px;
    letter-spacing: -.01em;
}

.lg-section p,
.lg-section li {
    font-size: 16px;
    line-height: 1.75;
    color: var(--mf-muted);
}

.lg-section p {
    margin: 0 0 14px;
}

.lg-section strong {
    color: var(--mf-ink);
}

.lg-section ul {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.lg-section li {
    position: relative;
    margin: 8px 0;
    padding-left: 22px;
}

.lg-section li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .72em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mf-orange);
}

.lg-section a {
    color: var(--mf-orange-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.lg-section a:hover {
    color: var(--mf-ink);
}

/* two-column "what / why" tables */
.lg-table {
    width: 100%;
    margin: 6px 0 18px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: var(--mf-radius-sm);
    border: 1px solid var(--mf-line);
    background: rgba(255, 255, 255, .72);
}

.lg-table th,
.lg-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--mf-line);
    text-align: left;
    vertical-align: top;
    font-size: 15px;
    line-height: 1.6;
}

.lg-table thead th {
    background: rgba(17, 17, 17, .04);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mf-faint);
}

.lg-table tbody th {
    width: 38%;
    font-weight: 700;
    color: var(--mf-ink);
}

.lg-table td {
    color: var(--mf-muted);
}

.lg-table tr:last-child th,
.lg-table tr:last-child td {
    border-bottom: 0;
}

/* highlighted note */
.lg-callout {
    display: flex;
    gap: 14px;
    margin: 6px 0 18px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(244, 123, 32, .35);
    background: rgba(244, 123, 32, .07);
}

.lg-callout svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--mf-orange-deep);
}

.lg-callout p {
    margin: 0;
    color: var(--mf-ink-soft);
}

/* contact card at the end */
.lg-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
    padding: 22px 24px;
    border-radius: var(--mf-radius);
    border: 1px solid var(--mf-line);
    background: rgba(255, 255, 255, .8);
    box-shadow: var(--mf-shadow-sm);
}

.lg-contact p {
    margin: 0;
}

.lg-section .lg-contact-mail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--mf-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s ease;
}

.lg-section .lg-contact-mail:hover {
    background: var(--mf-orange);
    color: #fff;
}

/* details only the business can supply — must be replaced
   before publishing (see the comment at the top of each page) */
.lg-todo {
    padding: 1px 6px;
    border-radius: 6px;
    border: 1.5px dashed var(--mf-orange);
    background: rgba(244, 123, 32, .1);
    color: var(--mf-orange-deep);
    font-weight: 700;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 960px) {

    .lg-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    /* contents become a card at the top of the article */
    .lg-toc {
        position: static;
        padding: 20px 22px;
        border-radius: var(--mf-radius);
        border: 1px solid var(--mf-line);
        background: rgba(255, 255, 255, .72);
    }

    .lg-toc ol {
        columns: 2;
        column-gap: 24px;
        border-left: 0;
    }

    .lg-toc li {
        break-inside: avoid;
    }

    .lg-toc a {
        margin-left: 0;
        padding: 6px 0;
        border-left: 0;
    }
}

@media (max-width: 640px) {

    .lg-toc ol {
        columns: 1;
    }

    .lg-summary ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .lg-section p,
    .lg-section li {
        font-size: 15.5px;
    }

    /* tables stack: each row becomes a small card */
    .lg-table thead {
        display: none;
    }

    .lg-table,
    .lg-table tbody,
    .lg-table tr,
    .lg-table th,
    .lg-table td {
        display: block;
        width: 100%;
    }

    .lg-table tbody th {
        width: 100%;
        padding-bottom: 2px;
        border-bottom: 0;
    }

    .lg-table td {
        padding-top: 0;
    }

    .lg-contact {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lg-switch a,
    .lg-toc a,
    .lg-section .lg-contact-mail {
        transition: none;
    }
}
