/* Shared stylesheet for ChargeZippy legal pages: /privacy, /refundpolicy, /tnc */

:root {
    --green: #00AE63;
    --green-dark: #009955;
    --green-light: #34D399;
    --blue: #1F4386;
    --blue-dark: #142C5A;

    --bg: #ffffff;
    --bg-alt: #F7F9FC;
    --surface: #ffffff;
    --text: #1A2233;
    --text-muted: #5A6478;
    --border: #E3E8F0;

    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(20, 44, 90, .06), 0 1px 2px rgba(20, 44, 90, .04);
    --shadow: 0 8px 24px -6px rgba(20, 44, 90, .12), 0 2px 6px rgba(20, 44, 90, .06);

    --ease: cubic-bezier(.16, 1, .3, 1);
    --nav-h: 68px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
            'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0D1220;
        --bg-alt: #131A2B;
        --surface: #172032;
        --text: #EAEEF6;
        --text-muted: #9AA6BD;
        --border: #26314A;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
        --shadow: 0 8px 24px -6px rgba(0, 0, 0, .5);
    }
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); }

.container { width: min(100% - 3rem, 1180px); margin-inline: auto; }

.skip-link {
    position: absolute; left: 50%; top: -100px; transform: translateX(-50%);
    z-index: 200; background: var(--green); color: #fff;
    padding: .75rem 1.5rem; border-radius: 0 0 10px 10px;
    text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ── Header ─────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 100;
    height: var(--nav-h);
    display: flex; align-items: center;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

header nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.logo {
    display: flex; align-items: center;
    background: #fff;
    padding: 6px 11px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}
.logo img { height: 34px; width: auto; }

.back-link {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .92rem; font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: .5rem .95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color .25s, border-color .25s, background .25s;
}
.back-link:hover { color: var(--green); border-color: var(--green); background: var(--bg-alt); }
.back-link svg { width: 15px; height: 15px; }

/* ── Page title band ────────────────────────────────── */
.page-head {
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--blue-dark), var(--blue) 70%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.page-head::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(65% 120% at 88% 8%, rgba(0, 174, 99, .32), transparent 62%);
}
.page-head .container { position: relative; }

.page-head .kicker {
    display: inline-block;
    margin-bottom: .85rem;
    font-size: .76rem; font-weight: 700;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--green-light);
}
.page-head h1 {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
}
.page-head .meta {
    margin-top: 1rem;
    font-size: .93rem;
    color: rgba(255, 255, 255, .75);
}
.page-head .meta strong { color: #fff; font-weight: 600; }

/* ── Draft banner ───────────────────────────────────── */
.notice {
    display: flex; align-items: flex-start; gap: .85rem;
    margin: 2rem 0 0;
    padding: 1.1rem 1.35rem;
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .35);
    border-left: 4px solid #F59E0B;
    border-radius: 10px;
    font-size: .93rem;
    color: var(--text);
}
.notice svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; color: #F59E0B; }
.notice strong { font-weight: 700; }

/* ── Layout ─────────────────────────────────────────── */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
    align-items: start;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

/* Table of contents */
.toc {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    padding: 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
@media (max-width: 900px) { .toc { position: static; } }

.toc h2 {
    margin-bottom: 1rem;
    font-size: .76rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-muted);
}
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: .1rem; }
.toc li { counter-increment: toc; }
.toc a {
    display: flex; gap: .6rem;
    padding: .45rem .5rem;
    font-size: .89rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 7px;
    border-left: 2px solid transparent;
    transition: color .2s, background .2s, border-color .2s;
}
.toc a::before {
    content: counter(toc);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--green);
    opacity: .55;
}
.toc a:hover, .toc a.active {
    color: var(--text);
    background: var(--surface);
    border-left-color: var(--green);
}
.toc a.active { font-weight: 600; }
.toc a.active::before { opacity: 1; }

/* ── Content ────────────────────────────────────────── */
.content { max-width: 76ch; }

.content section { scroll-margin-top: calc(var(--nav-h) + 24px); }
.content section + section { margin-top: 3rem; }

.content h2 {
    display: flex; align-items: baseline; gap: .7rem;
    margin-bottom: 1.1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.4rem; font-weight: 750;
    letter-spacing: -.015em;
    line-height: 1.3;
}
.content h2 .n {
    flex-shrink: 0;
    font-size: .84rem; font-weight: 700;
    color: var(--green);
    font-variant-numeric: tabular-nums;
}

.content h3 {
    margin: 1.75rem 0 .6rem;
    font-size: 1.03rem; font-weight: 700;
    color: var(--text);
}

.content p { margin-bottom: 1rem; color: var(--text-muted); }
.content p strong, .content li strong { color: var(--text); font-weight: 650; }

.content ul, .content ol { margin: 0 0 1rem 1.25rem; color: var(--text-muted); }
.content li { margin-bottom: .5rem; padding-left: .25rem; }
.content li::marker { color: var(--green); }

.content a { font-weight: 550; text-underline-offset: 3px; }
.content a:hover { color: var(--green-dark); }

/* Placeholder token — must be replaced before publishing */
.ph {
    display: inline-block;
    padding: .05rem .45rem;
    background: rgba(245, 158, 11, .16);
    border: 1px dashed rgba(245, 158, 11, .6);
    border-radius: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .84em; font-weight: 600;
    color: #B45309;
    white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .ph { color: #FCD34D; } }

/* Callout box */
.box {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.box p:last-child, .box ul:last-child, .box li:last-child { margin-bottom: 0; }
.box.accent { border-left: 4px solid var(--green); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .93rem;
}
th, td {
    padding: .8rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
    vertical-align: top;
}
th {
    background: var(--bg-alt);
    font-weight: 650;
    color: var(--text);
    white-space: nowrap;
}
td { color: var(--text-muted); }

/* Contact card at the end */
.contact-box {
    margin-top: 3rem;
    padding: 1.75rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.contact-box h3 { margin-top: 0; }
.contact-box dl { display: grid; gap: .6rem; margin-top: 1rem; }
.contact-box dt {
    font-size: .78rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted);
}
.contact-box dd { margin: 0 0 .5rem; color: var(--text); }

/* ── Footer ─────────────────────────────────────────── */
footer {
    padding: 3rem 0 2rem;
    background: var(--blue-dark);
    color: rgba(255, 255, 255, .72);
}
.footer-inner {
    display: flex; flex-wrap: wrap; gap: 1.25rem;
    align-items: center; justify-content: space-between;
    font-size: .89rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; }
.footer-links a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    transition: color .25s;
}
.footer-links a:hover { color: var(--green-light); }
.footer-links a[aria-current="page"] { color: #fff; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
