/* ==========================================================================
   Safety Tech NZ — Privacy Policy presentation
   Scoped to .stnz-pp (wrapper injected by stnz-privacy.php).
   The policy wording is untouched; this file only governs layout and type.
   ========================================================================== */

.stnz-pp {
    --pp-green: #019035;
    --pp-green-d: #017a2d;
    --pp-green-xd: #015f25;
    --pp-ink: #14232b;
    --pp-body: #3f4d56;
    --pp-muted: #5b6b76;
    --pp-line: #e8eef2;
    width: 100%;
    min-width: 0;
    color: var(--pp-body);
    font-size: 16px;
    line-height: 1.7;
}

.site-content .elementor[data-elementor-type="wp-page"] {
    width: 100%;
    min-width: 0;
}

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

.stnz-pp a { text-decoration: none; }
.stnz-pp p { margin: 0 0 1em; }
.stnz-pp p:last-child { margin-bottom: 0; }

.stnz-pp .elementor-section,
.stnz-pp .elementor-column,
.stnz-pp .elementor-widget-wrap { padding: 0; }

.stnz-pp .elementor-container { max-width: 1120px !important; margin: 0 auto; }
.stnz-pp .elementor-widget-container { margin: 0 !important; }

/* ---------------------------------------------------------------- hero --- */

.stnz-pp .pp-hero {
    padding: clamp(22px, 3vw, 34px) 0 clamp(24px, 3.4vw, 38px);
    border-bottom: 1px solid var(--pp-line);
}

.stnz-pp .pp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: clamp(18px, 2.6vw, 26px);
    font-size: 13px;
    line-height: 1;
    color: var(--pp-muted);
}

.stnz-pp .pp-crumbs a {
    color: var(--pp-green-d);
    font-weight: 500;
    transition: color .15s ease;
}

.stnz-pp .pp-crumbs a:hover { color: var(--pp-green-xd); text-decoration: underline; }
.stnz-pp .pp-crumbs__sep { color: #b9c6cd; }
.stnz-pp .pp-crumbs__now { color: var(--pp-ink); font-weight: 500; }

.stnz-pp .pp-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
}

.stnz-pp .pp-h1 {
    margin: 0;
    color: var(--pp-ink);
    font-size: clamp(1.95rem, 4.2vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -.022em;
    line-height: 1.1;
}

.stnz-pp .pp-meta {
    margin: 0 0 4px;
    color: var(--pp-muted);
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
}

/* ------------------------------------------------------- document grid --- */

.stnz-pp .elementor-top-section:nth-of-type(2) {
    padding-top: clamp(30px, 4vw, 48px);
    padding-bottom: clamp(40px, 6vw, 72px);
}

.stnz-pp .elementor-top-section:nth-of-type(2) .elementor-container {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: clamp(28px, 4.5vw, 64px);
}

/* Flexible columns, so the gap is a real gap rather than grid padding. */
.stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-30 {
    flex: 0 0 232px;
    max-width: 232px;
    width: auto;
}

.stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-70 {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

/* ------------------------------------------------------- contents list --- */

/* position: sticky only travels inside its containing block, so every wrapper
   between the sidebar and the stretched column needs a real height — otherwise
   the sidebar is stuck inside a ~200px box and scrolls away with the page. */
.stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-30 > .elementor-widget-wrap,
.stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-30 .elementor-widget,
.stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-30 .elementor-widget-container {
    width: 100%;
    height: 100%;
}

.stnz-pp .pp-side {
    position: sticky;
    top: 24px;
}

.stnz-pp .pp-toc__title {
    margin: 0 0 12px;
    padding-left: 14px;
    color: var(--pp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.stnz-pp .pp-toc__list {
    display: grid;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 2px solid #eef2f5;
}

.stnz-pp .pp-toc a {
    display: block;
    margin-left: -2px;
    padding: 8px 12px;
    border-left: 2px solid transparent;
    color: var(--pp-muted);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.stnz-pp .pp-toc a:hover {
    color: var(--pp-green-d);
    background: #f7faf8;
}

.stnz-pp .pp-toc a.is-active {
    border-left-color: var(--pp-green);
    background: #f3faf6;
    color: var(--pp-green-xd);
    font-weight: 600;
}

.stnz-pp .pp-toc__num { color: #97a6ae; font-variant-numeric: tabular-nums; }
.stnz-pp .pp-toc a.is-active .pp-toc__num { color: var(--pp-green); }

/* ------------------------------------------------------- contact card --- */

.stnz-pp .pp-aside {
    margin-top: 26px;
    padding: 17px 18px;
    border: 1px solid #e5ecef;
    border-radius: 14px;
    background: #fbfcfd;
}

.stnz-pp .pp-aside__title {
    margin: 0 0 9px;
    color: var(--pp-ink);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
}

.stnz-pp .pp-aside__mail {
    display: block;
    margin-bottom: 13px;
    color: var(--pp-green-d);
    font-size: 13.5px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    transition: color .15s ease;
}

.stnz-pp .pp-aside__mail:hover { color: var(--pp-green-xd); text-decoration: underline; }

.stnz-pp .pp-aside__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--pp-green-d);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    transition: background-color .18s ease, transform .18s ease;
}

.stnz-pp .pp-aside__btn:hover {
    background: var(--pp-green-xd);
    color: #fff;
    transform: translateY(-1px);
}

.stnz-pp .pp-aside__btn::after {
    content: "";
    width: 6px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

/* ---------------------------------------------------------- the policy --- */

.stnz-pp .pp-doc { max-width: 72ch; }

.stnz-pp .pp-sec {
    margin-top: clamp(22px, 3vw, 32px);
    padding-top: clamp(22px, 3vw, 32px);
    border-top: 1px solid #e2e9ee;
    scroll-margin-top: 24px;
}

.stnz-pp .pp-sec:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.stnz-pp .pp-h2 {
    margin: 0 0 12px;
    color: var(--pp-ink);
    font-size: clamp(1.16rem, 1.7vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.35;
}

.stnz-pp .pp-num {
    color: var(--pp-green);
    font-variant-numeric: tabular-nums;
}

.stnz-pp .pp-p {
    margin: 0 0 14px;
    color: var(--pp-body);
    font-size: 1.01rem;
    line-height: 1.78;
}

.stnz-pp .pp-p:last-child { margin-bottom: 0; }

.stnz-pp .pp-doc a {
    color: var(--pp-green-d);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color .15s ease;
}

.stnz-pp .pp-doc a:hover { color: var(--pp-green-xd); }

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 900px) {
    .stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-30,
    .stnz-pp .elementor-top-section:nth-of-type(2) .elementor-col-70 {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }

    .stnz-pp .pp-side { position: static; }

    .stnz-pp .pp-toc {
        padding: 16px 18px;
        border: 1px solid var(--pp-line);
        border-radius: 14px;
        background: #fbfcfd;
    }

    .stnz-pp .pp-aside { margin-top: 14px; }

    .stnz-pp .pp-toc__list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        border-left: 0;
    }

    .stnz-pp .pp-toc a { margin-left: 0; padding: 7px 0; border-left: 0; }
    .stnz-pp .pp-toc a.is-active { background: transparent; border-left: 0; }
}

@media (max-width: 600px) {
    .stnz-pp .pp-p { font-size: .98rem; line-height: 1.72; }
    .stnz-pp .pp-crumbs { font-size: 12px; }

    /* no room for a side-by-side date on a phone */
    .stnz-pp .pp-hero__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stnz-pp .pp-meta { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .stnz-pp .pp-toc a { transition: none; }
}
