.nm-legal-page {
    width: min(1120px, 92vw);
    margin: 0 auto;
    padding: clamp(34px, 5vw, 72px) 0 84px;
    color: var(--text-main);
    font-family: var(--font-main);
}

body.page-template-template-legal-policies .storefront-breadcrumb,
body.page-template-page-templatestemplate-legal-policies-php .storefront-breadcrumb,
body.page-template-template-refund-policy .storefront-breadcrumb,
body.page-template-page-templatestemplate-refund-policy-php .storefront-breadcrumb,
body.page-template-template-terms-of-service .storefront-breadcrumb,
body.page-template-page-templatestemplate-terms-of-service-php .storefront-breadcrumb,
body.page-template-template-legal-policies .woocommerce-breadcrumb,
body.page-template-page-templatestemplate-legal-policies-php .woocommerce-breadcrumb,
body.page-template-template-refund-policy .woocommerce-breadcrumb,
body.page-template-page-templatestemplate-refund-policy-php .woocommerce-breadcrumb,
body.page-template-template-terms-of-service .woocommerce-breadcrumb,
body.page-template-page-templatestemplate-terms-of-service-php .woocommerce-breadcrumb {
    display: none !important;
}

.nm-legal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.nm-legal-hero > div,
.nm-legal-contact-card,
.nm-legal-toc,
.nm-legal-section {
    border: 1px solid var(--secondary-border-color);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.03);
}

.nm-legal-hero > div:first-child {
    padding: clamp(22px, 4vw, 42px);
    background:
        radial-gradient(680px 260px at 12% 0%, color-mix(in srgb, var(--primary-color) 16%, transparent), transparent 72%),
        rgba(255, 255, 255, 0.03);
}

.nm-legal-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.nm-legal-hero h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1;
    letter-spacing: 0;
}

.nm-legal-hero p {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--text-dim);
    line-height: 1.65;
}

.nm-legal-contact-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 22px;
}

.nm-legal-contact-card span {
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nm-legal-contact-card a,
.nm-legal-section a {
    color: var(--accent-color);
    text-decoration: none;
}

.nm-legal-contact-card a:hover,
.nm-legal-section a:hover {
    color: var(--text-main);
}

.nm-legal-toc {
    position: sticky;
    top: 96px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin-bottom: 18px;
    backdrop-filter: blur(12px);
}

.nm-legal-toc a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--secondary-border-color);
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.nm-legal-toc a:hover {
    border-color: color-mix(in srgb, var(--primary-color) 55%, var(--secondary-border-color));
    color: var(--text-main);
}

.nm-legal-section {
    padding: clamp(20px, 4vw, 38px);
    margin-bottom: 18px;
}

.nm-legal-section-head {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--secondary-border-color);
}

.nm-legal-section-head span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nm-legal-section h2,
.nm-legal-section h3 {
    color: var(--text-main);
    letter-spacing: 0;
}

.nm-legal-section h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

.nm-legal-section h3 {
    margin: 26px 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
}

.nm-legal-section p,
.nm-legal-section li {
    color: var(--text-dim);
    line-height: 1.72;
    font-size: 0.95rem;
}

.nm-legal-section p {
    margin: 0 0 12px;
}

.nm-legal-section ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.nm-legal-section li + li {
    margin-top: 8px;
}

.nm-legal-section strong {
    color: var(--text-main);
}

@media (max-width: 760px) {
    .nm-legal-hero {
        grid-template-columns: 1fr;
    }

    .nm-legal-toc {
        position: static;
    }

    .nm-legal-toc a {
        flex: 1 1 100%;
        justify-content: center;
    }
}
