/* ============================================================
   Legal Pages — Privacy Policy & Terms and Conditions
   ============================================================ */

/* Hero */
.legal-hero {
	position: relative;
	background: var(--nb-ink) var(--hero-bg, none) center/cover no-repeat;
	color: #fff;
	overflow: hidden;
}
.legal-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, rgba(17,18,20,.94) 45%, rgba(17,18,20,.68));
}
.legal-hero__inner { position: relative; z-index: 1; padding: clamp(64px, 9vw, 112px) 0 clamp(56px, 7vw, 88px); }
.legal-hero__inner > * { max-width: 860px; }
.legal-hero .breadcrumb { color: #fff; }
.legal-hero .eyebrow { color: var(--nb-yellow); }
.legal-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 4px 0 16px; }
.legal-hero p { color: rgba(255,255,255,.82); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 640px; margin-bottom: 26px; }
.legal-hero__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.legal-hero__meta li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.08); backdrop-filter: blur(6px); font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.9); }
.legal-hero__meta .nbpi-icon { width: 16px; height: 16px; color: var(--nb-yellow); }

/* Body layout */
.legal-body { padding: clamp(48px, 7vw, 96px) 0; background: var(--nb-soft); }
.legal-body__grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; }
.legal-body__grid--single { grid-template-columns: minmax(0, 1fr); max-width: 900px; }

/* Table of contents */
.legal-toc { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 18px; }
.admin-bar .legal-toc { top: 152px; }
.legal-toc__box { background: #fff; border: 1px solid var(--nb-line); border-radius: 18px; padding: 22px 20px; box-shadow: 0 8px 30px rgba(17,18,20,.05); }
.legal-toc__box summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; font-family: "Raleway", sans-serif; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--nb-ink); }
.legal-toc__box summary::-webkit-details-marker { display: none; }
.legal-toc__box summary .nbpi-icon { width: 18px; height: 18px; color: var(--nb-yellow-dark); }
.legal-toc__box ol { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: toc; max-height: calc(100vh - 360px); overflow-y: auto; }
.legal-toc__box li { counter-increment: toc; }
.legal-toc__box a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .9rem; line-height: 1.4; color: var(--nb-copy); transition: background .2s, color .2s; }
.legal-toc__box a::before { content: counter(toc, decimal-leading-zero); flex: 0 0 auto; font-weight: 700; font-size: .78rem; color: var(--nb-yellow-dark); padding-top: 1px; }
.legal-toc__box a:hover, .legal-toc__box a:focus-visible { background: #fff7dc; color: var(--nb-ink); }
.legal-toc__help { background: var(--nb-ink); color: #fff; border-radius: 18px; padding: 22px 20px; }
.legal-toc__help strong { display: block; font-family: "Raleway", sans-serif; font-size: 1.1rem; margin-bottom: 4px; }
.legal-toc__help p { color: rgba(255,255,255,.72); font-size: .9rem; margin-bottom: 14px; }
.legal-toc__help .btn { width: 100%; min-height: 46px; background: var(--nb-yellow); color: var(--nb-ink); border-color: var(--nb-yellow); }
.legal-toc__help .btn .nbpi-icon { width: 18px; height: 18px; }

/* Content */
.legal-content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.legal-section { background: #fff; border: 1px solid var(--nb-line); border-radius: 20px; padding: clamp(24px, 4vw, 40px); scroll-margin-top: 130px; overflow-wrap: anywhere; }
.legal-section h2 { display: flex; align-items: center; gap: 14px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 16px; }
.legal-section__num { flex: 0 0 auto; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff3c9; color: #7a5b00; font-size: .9rem; font-weight: 800; letter-spacing: 0; }
.legal-section p:last-child, .legal-section ul:last-child { margin-bottom: 0; }
.legal-section ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.legal-section li { position: relative; padding-left: 28px; color: var(--nb-copy); }
.legal-section li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--nb-yellow); box-shadow: 0 0 0 4px #fff3c9; }
.legal-section a { color: #7a5b00; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legal-section a:hover { color: var(--nb-ink); }
.legal-section strong { color: var(--nb-ink); }
.legal-section--editor h2, .legal-section--editor h3 { margin-top: 28px; }
.legal-section--editor > :first-child { margin-top: 0; }
.legal-section--editor ul { list-style: disc; padding-left: 20px; }
.legal-section--editor li { padding-left: 0; }
.legal-section--editor li::before { display: none; }

.legal-related { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-radius: 16px; background: #fff7dc; border: 1px solid #ffe7a0; }
.legal-related span { font-family: "Raleway", sans-serif; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(17,18,20,.6); }
.legal-related a { font-family: "Raleway", sans-serif; font-weight: 800; color: var(--nb-ink); }
.legal-related a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 960px) {
	.legal-body__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.legal-toc { position: static; }
	.legal-toc__box ol { max-height: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
	.legal-toc__help { display: none; }
}
@media (max-width: 600px) {
	.legal-hero__meta li { font-size: .78rem; padding: 7px 12px; }
	.legal-toc__box { padding: 16px; }
	.legal-toc__box ol { grid-template-columns: 1fr; }
	.legal-section { border-radius: 16px; padding: 22px 18px; }
	.legal-section h2 { gap: 10px; }
	.legal-section__num { width: 34px; height: 34px; border-radius: 10px; font-size: .8rem; }
	.legal-related { padding: 16px 18px; }
}

/* v3.1.2 — the in-page index was removed, so the sidebar is just the help card */
.legal-toc { gap: 0; }
@media (min-width: 961px) { .legal-body__grid { grid-template-columns: 260px minmax(0, 1fr); } .legal-toc__help { position: sticky; top: 120px; } }
