/* ==========================================================================
   HALAMAN KEBIJAKAN PRIVASI (client/privacy/index)
   Selektor diawali .am-legal; palet brand mengikuti quiz.css.
   ========================================================================== */

.am-legal {
    --l-ink: #111827;
    --l-text: #374151;
    --l-muted: #6b7280;
    --l-line: #e7ebe3;
    --l-card: #ffffff;
    --l-soft: #f5f9f1;
    --l-brand: #145614;
    --l-ico-bg: rgba(135, 230, 75, 0.16);
    background: var(--l-soft);
    color: var(--l-text);
    padding-bottom: 48px;
    scroll-behavior: smooth;
}

.dark .am-legal {
    --l-ink: #FFF5ED;
    --l-text: rgba(255, 245, 237, 0.86);
    --l-muted: #9a9a9a;
    --l-line: #2c2c2c;
    --l-card: #1f1f1f;
    --l-soft: #191919;
    --l-brand: #87E64B;
    --l-ico-bg: rgba(135, 230, 75, 0.12);
}

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

.am-legal-wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

.am-legal-hero {
    background: radial-gradient(120% 140% at 100% 0%, #1f7a1f 0%, #145614 45%, #0c390c 100%);
    color: #fff;
    padding: 40px 0 72px;
    position: relative;
    overflow: hidden;
}
.am-legal-hero::after {
    content: "";
    position: absolute;
    width: 300px; height: 300px;
    right: -90px; top: -110px;
    border-radius: 50%;
    border: 34px solid rgba(182, 245, 0, 0.12);
}
.am-legal-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(182, 245, 0, 0.16);
    color: #B6F500;
    border: 1px solid rgba(182, 245, 0, 0.35);
    padding: 6px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 700;
}
.am-legal-hero h1 { font-size: 34px; line-height: 1.15; font-weight: 800; margin: 14px 0 8px; color: #fff; }
.am-legal-hero p { margin: 0; opacity: 0.9; font-size: 15px; line-height: 1.65; max-width: 640px; }
.am-legal-hero .am-legal-date { margin-top: 14px; font-size: 13px; color: #FFFADC; }
.am-legal-date i { color: #B6F500; margin-right: 4px; }

.am-legal-main { margin-top: -48px; position: relative; z-index: 1; display: grid; gap: 18px; }
.am-legal-main > * { min-width: 0; }

.am-legal-card {
    background: var(--l-card);
    border: 1px solid var(--l-line);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px -18px rgba(20, 86, 20, 0.35);
}

.am-legal-toc h2 { font-size: 15px; font-weight: 800; color: var(--l-ink); margin: 0 0 10px; }
.am-legal-toc ol {
    margin: 0; padding: 0; list-style: none;
    display: flex; flex-wrap: wrap; gap: 8px;
    counter-reset: toc;
}
.am-legal-toc li { counter-increment: toc; }
.am-legal-toc a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--l-soft); border: 1px solid var(--l-line);
    color: var(--l-ink); font-size: 13px; font-weight: 600; text-decoration: none;
}
.am-legal-toc a::before { content: counter(toc); font-weight: 800; color: var(--l-brand); }
.am-legal-toc a:hover { border-color: #98CD00; }

.am-legal-body section { scroll-margin-top: 80px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--l-line); }
.am-legal-body section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.am-legal-body h2 {
    display: flex; align-items: center; gap: 10px;
    font-size: 19px; font-weight: 800; color: var(--l-ink); margin: 0 0 12px;
}
.am-legal-body h2 span {
    flex: none; width: 30px; height: 30px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--l-ico-bg); color: var(--l-brand); font-size: 14px;
}
.am-legal-body p { font-size: 15.5px; line-height: 1.75; margin: 0 0 12px; }
.am-legal-body strong { color: var(--l-ink); }

.am-legal-grid { display: grid; gap: 10px; }
.am-legal-item { border: 1px solid var(--l-line); border-radius: 16px; padding: 14px; background: var(--l-soft); }
.am-legal-item h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--l-ink); margin: 0 0 6px; }
.am-legal-item h3 i { color: var(--l-brand); width: 1.1em; text-align: center; }
.am-legal-item p { margin: 0; font-size: 14.5px; line-height: 1.6; }

.am-legal-table { overflow-x: auto; margin: 0 0 12px; border: 1px solid var(--l-line); border-radius: 14px; }
.am-legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.am-legal-table th, .am-legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--l-line); vertical-align: top; line-height: 1.5; }
.am-legal-table th { background: var(--l-soft); color: var(--l-ink); font-weight: 800; font-size: 13px; }
.am-legal-table tr:last-child td { border-bottom: 0; }
.am-legal-table td:first-child { font-weight: 700; color: var(--l-ink); white-space: nowrap; }

.am-legal-list { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 10px; }
.am-legal-list li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 1.7; }
.am-legal-list li::before {
    content: ""; position: absolute; left: 4px; top: 0.72em;
    width: 8px; height: 8px; border-radius: 50%; background: #98CD00;
}

.am-legal-rights { display: grid; gap: 8px; margin: 0 0 12px; }
.am-legal-rights span {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 14px;
    background: var(--l-ico-bg); color: var(--l-ink); font-weight: 600; font-size: 14.5px;
}
.am-legal-rights i { color: var(--l-brand); width: 1.1em; text-align: center; }

.am-legal-contact { display: grid; gap: 10px; margin: 0 0 12px; }
.am-legal-contact a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 16px;
    border: 1px solid var(--l-line); background: var(--l-soft);
    color: var(--l-ink); font-weight: 700; text-decoration: none; word-break: break-all;
}
.am-legal-contact a:hover { border-color: #98CD00; }
.am-legal-contact i {
    flex: none; width: 38px; height: 38px; border-radius: 12px;
    display: grid; place-items: center; font-size: 17px;
    background: #B6F500; color: #145614;
}
.am-legal-contact small { display: block; font-size: 12px; font-weight: 600; color: var(--l-muted); }
.am-legal-note { font-size: 13px !important; color: var(--l-muted); }

/* HP: tabel cookie menjadi kartu bertumpuk */
@media (max-width: 640px) {
    .am-legal-table { overflow: visible; border: 0; }
    .am-legal-table table { min-width: 0; }
    .am-legal-table thead { display: none; }
    .am-legal-table tr { display: block; border: 1px solid var(--l-line); border-radius: 14px; padding: 4px 0; margin-bottom: 8px; background: var(--l-soft); }
    .am-legal-table td { display: block; border: 0; padding: 6px 12px; }
    .am-legal-table td:first-child { white-space: normal; font-size: 14.5px; }
    .am-legal-table td:not(:first-child)::before {
        content: attr(data-label); display: block; font-size: 11.5px; font-weight: 800;
        text-transform: uppercase; letter-spacing: 0.05em; color: var(--l-muted); margin-bottom: 2px;
    }
}

@media (min-width: 768px) {
    .am-legal-hero { padding: 56px 0 84px; }
    .am-legal-hero h1 { font-size: 44px; }
    .am-legal-card { padding: 30px; }
    .am-legal-grid, .am-legal-rights, .am-legal-contact { grid-template-columns: 1fr 1fr; }
}
