/* ==========================================================================
   Section: Terms / Body (sticky TOC + clauses). Ported verbatim from terms-styles.css.
   ========================================================================== */

.legal-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 64px; align-items: start; padding: 64px 0 110px; }

.toc { position: sticky; top: 104px; align-self: start; }
.toc-head {
	font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
	display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding-left: 14px;
}
.toc-head::before { content:''; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.toc-list { list-style: none; display: flex; flex-direction: column; max-height: calc(100vh - 180px); overflow-y: auto; padding-right: 6px; }
.toc-link {
	display: flex; gap: 12px; align-items: baseline; padding: 8px 14px; border-radius: 9px;
	font-size: 13.5px; color: var(--muted); line-height: 1.4; cursor: pointer;
	border-left: 2px solid transparent; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.toc-link .tn { font-family: var(--sans); font-weight: 700; font-size: 11.5px; color: var(--line); min-width: 16px; transition: color .2s ease; }
.toc-link:hover { background: var(--bg-alt); color: var(--navy); }
.toc-link.active { background: var(--grad-soft); color: var(--cyan); border-left-color: var(--cyan); font-weight: 500; }
.toc-link.active .tn { color: var(--cyan); }

/* ---------- Clauses ---------- */
.legal-body { max-width: 760px; }
.clause { padding: 0 0 38px; margin-bottom: 38px; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 110px; }
.clause:last-child { border-bottom: none; margin-bottom: 0; }
.clause h2 {
	font-size: clamp(22px, 2.2vw, 27px); line-height: 1.18; margin-bottom: 16px;
	display: flex; gap: 16px; align-items: baseline;
}
.clause h2 .n {
	font-family: var(--sans); font-size: 15px; font-weight: 700; min-width: 30px;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.clause p { color: var(--body); margin-top: 14px; font-size: 16.5px; line-height: 1.72; }
.clause p:first-of-type { margin-top: 0; }
.clause ul { margin: 14px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.clause li { position: relative; padding-left: 26px; color: var(--body); font-size: 16.5px; line-height: 1.65; }
.clause li::before { content:''; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); }
.clause strong { color: var(--navy); font-weight: 600; }
.clause a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(24,173,231,0.3); transition: border-color .2s ease; }
.clause a:hover { border-bottom-color: var(--cyan); }

.callout {
	background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px 24px; margin-top: 18px; position: relative; overflow: hidden;
}
.callout::before { content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.callout p { margin-top: 0; color: var(--navy); }

/* contact card inside last clause */
.legal-contact {
	margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 28px 30px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px;
}
.legal-contact .org-name { font-family: var(--sans); font-weight: 700; color: var(--navy); font-size: 18px; margin-bottom: 4px; }
.legal-contact .line { font-size: 15px; color: var(--body); }
.legal-contact a { color: var(--cyan); text-decoration: none; }
.legal-contact a:hover { text-decoration: underline; }

/* back to top */
.toc-top {
	margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
	font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; background: none; border: none; font-family: inherit;
	transition: color .2s ease;
}
.toc-top:hover { color: var(--cyan); }
.toc-top svg { width: 14px; height: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.legal-layout { grid-template-columns: 1fr; gap: 8px; padding-top: 40px; }
	.toc { position: static; margin-bottom: 28px; padding: 22px 22px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
	.toc-list { max-height: none; flex-direction: row; flex-wrap: wrap; gap: 4px; }
	.toc-link { padding: 6px 12px; }
	.toc-link .tn { display: none; }
	.toc-top { display: none; }
}
@media (max-width: 560px) {
	.legal-hero { padding-top: 120px; }
}
