/* ============================================================
   NRestro — Privacy / Legal page redesign
   ============================================================ */
:root {
    --pg-bg: #f4f6fb;
    --pg-surface: #ffffff;
    --pg-border: #e3e8ee;
    --pg-text: #0f172a;
    --pg-muted: #64748b;
    --pg-primary: #2563eb;
    --pg-primary-dark: #1d4ed8;
    --pg-primary-soft: #dbeafe;
    --pg-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px rgba(15,23,42,.06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: auto; min-height: 100%; }
body {
    margin: 0; background: var(--pg-bg); color: var(--pg-text);
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* ---------- Top bar ---------- */
.pg-topbar {
    background: var(--pg-surface);
    border-bottom: 1px solid var(--pg-border);
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    position: sticky; top: 0; z-index: 10;
}
.pg-topbar-inner {
    max-width: 960px; margin: 0 auto;
    padding: 14px 20px;
    display: flex; align-items: center; gap: 16px;
}
.pg-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--pg-muted); text-decoration: none;
    font-size: 13px; font-weight: 600;
    padding: 6px 10px; border-radius: 8px;
    transition: background .15s, color .15s;
}
.pg-back:hover { background: #f1f5f9; color: var(--pg-text); text-decoration: none; }

.pg-brand {
    display: inline-flex; align-items: center; gap: 10px;
    margin-left: auto; text-decoration: none; color: var(--pg-text);
}
.pg-brand img { height: 30px; }
.pg-brand strong { font-size: 15px; font-weight: 700; }

/* ---------- Hero ---------- */
.pg-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #1d4ed8 100%);
    color: #fff; padding: 36px 20px 38px;
    position: relative; overflow: hidden;
}
.pg-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 15% 10%, rgba(255,255,255,.16), transparent 35%),
                      radial-gradient(circle at 85% 90%, rgba(255,255,255,.10), transparent 40%);
    pointer-events: none;
}
.pg-hero-inner {
    position: relative; max-width: 960px; margin: 0 auto;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.pg-hero .icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: rgba(255,255,255,.18);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.pg-hero h1 {
    margin: 0; font-size: 28px; line-height: 1.15;
    font-weight: 800; letter-spacing: -.01em;
}
.pg-hero .sub {
    margin: 4px 0 0; font-size: 14px; color: rgba(255,255,255,.85);
}

/* ---------- Content card ---------- */
.pg-shell {
    max-width: 960px; margin: -20px auto 32px;
    padding: 0 20px; position: relative; z-index: 2;
}
.pg-card {
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    box-shadow: var(--pg-shadow);
    padding: 32px 36px;
}

/* ---------- Typography (applied to whatever HTML is in ${privacy.value}) ---------- */
.pg-content {
    color: var(--pg-text); font-size: 15px; line-height: 1.7;
}
.pg-content > :first-child { margin-top: 0; }
.pg-content > :last-child  { margin-bottom: 0; }

.pg-content h1, .pg-content h2, .pg-content h3, .pg-content h4 {
    color: var(--pg-text); font-weight: 700; letter-spacing: -.01em;
    margin: 28px 0 10px;
}
.pg-content h1 { font-size: 24px; margin-top: 0; }
.pg-content h2 {
    font-size: 19px; padding-bottom: 8px;
    border-bottom: 1px solid var(--pg-border);
}
.pg-content h3 { font-size: 16px; }
.pg-content h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--pg-muted); }

.pg-content p { margin: 0 0 14px; }
.pg-content strong, .pg-content b { color: var(--pg-text); font-weight: 700; }
.pg-content em, .pg-content i { color: var(--pg-text); }

.pg-content a {
    color: var(--pg-primary); text-decoration: none;
    border-bottom: 1px dashed var(--pg-primary-soft);
}
.pg-content a:hover { color: var(--pg-primary-dark); border-bottom-style: solid; }

.pg-content ul, .pg-content ol { margin: 8px 0 16px; padding-left: 22px; }
.pg-content li { margin: 6px 0; }
.pg-content li::marker { color: var(--pg-muted); }

.pg-content blockquote {
    margin: 16px 0; padding: 12px 16px;
    background: #f8fafc; border-left: 3px solid var(--pg-primary);
    border-radius: 0 8px 8px 0; color: var(--pg-text); font-style: normal;
}

.pg-content code {
    background: #f1f5f9; color: #be185d;
    padding: 1px 6px; border-radius: 4px; font-size: 90%;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}
.pg-content pre {
    background: #0f172a; color: #e2e8f0;
    padding: 12px 14px; border-radius: 8px;
    overflow-x: auto; font-size: 13px; line-height: 1.5;
}
.pg-content pre code { background: transparent; color: inherit; padding: 0; }

.pg-content hr { border: 0; border-top: 1px solid var(--pg-border); margin: 22px 0; }

.pg-content table {
    width: 100%; border-collapse: collapse; margin: 12px 0 18px;
    font-size: 14px; background: #fff;
    border: 1px solid var(--pg-border); border-radius: 8px;
    overflow: hidden;
}
.pg-content th, .pg-content td {
    text-align: left; padding: 10px 12px;
    border-bottom: 1px solid var(--pg-border);
}
.pg-content th {
    background: #f8fafc; font-weight: 700;
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--pg-muted);
}
.pg-content tr:last-child td { border-bottom: 0; }

.pg-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* ---------- Footer ---------- */
.pg-footer {
    background: #fff;
    border-top: 1px solid var(--pg-border);
    margin-top: auto;
}
.pg-footer-inner {
    max-width: 960px; margin: 0 auto;
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    font-size: 13px; color: var(--pg-muted);
}
.pg-footer a { color: var(--pg-muted); text-decoration: none; }
.pg-footer a:hover { color: var(--pg-text); text-decoration: underline; }
.pg-footer .links { display: inline-flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Empty state (if privacy.value is somehow empty) ---------- */
.pg-empty {
    text-align: center; padding: 32px 16px; color: var(--pg-muted);
}
.pg-empty i { font-size: 28px; color: #cbd5e1; margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    body { font-size: 14px; }
    .pg-topbar-inner { padding: 12px 14px; }
    .pg-hero { padding: 26px 16px 30px; }
    .pg-hero h1 { font-size: 22px; }
    .pg-hero .icon { width: 46px; height: 46px; font-size: 18px; border-radius: 12px; }
    .pg-shell { padding: 0 12px; margin: -18px auto 24px; }
    .pg-card { padding: 22px 18px; border-radius: 12px; }
    .pg-content h1 { font-size: 20px; }
    .pg-content h2 { font-size: 17px; }
    .pg-footer-inner { padding: 14px 14px; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .pg-brand strong { display: none; }
}
