html {
	scroll-behavior: smooth;
}

body.terms-page {
	background: #202428;
	color: #edf7f8;
	font-family: "Segoe UI", Roboto, Arial, sans-serif;
	line-height: 1.6;
	margin: 0;
	min-height: 100vh;
}

.terms-page[data-terms-theme="light"] {
	background: #f5f2ea;
	color: #17272d;
}

.terms-progress {
	background: #d8a23a;
	height: 4px;
	left: 0;
	position: fixed;
	top: 0;
	transform: scaleX(0);
	transform-origin: left;
	width: 100%;
	z-index: 20;
}

.terms-shell {
	margin: 0 auto;
	max-width: 1180px;
	padding: 28px 24px 48px;
}

.terms-topbar {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 56px;
}

.terms-brand,
.terms-back,
.terms-action {
	align-items: center;
	color: inherit;
	display: inline-flex;
	text-decoration: none;
}

.terms-brand {
	font-size: 15px;
	font-weight: 800;
	gap: 10px;
}

.terms-brand img {
	height: 34px;
	width: 34px;
}

.terms-tools {
	align-items: center;
	display: flex;
	gap: 10px;
}

.terms-theme {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	display: inline-flex;
	gap: 4px;
	padding: 4px;
}

.terms-page[data-terms-theme="light"] .terms-theme {
	background: rgba(255, 255, 255, 0.72);
	border-color: rgba(23, 72, 78, 0.16);
}

.terms-theme button,
.terms-action,
.terms-back {
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.terms-theme button {
	background: transparent;
	border: 0;
	color: inherit;
	height: 32px;
	padding: 0 14px;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.terms-theme button:hover,
.terms-action:hover,
.terms-back:hover {
	transform: translateY(-1px);
}

.terms-theme button.active {
	background: #d8a23a;
	color: #16242a;
}

.terms-action,
.terms-back {
	gap: 8px;
	height: 40px;
	padding: 0 16px;
}

.terms-action {
	background: rgba(216, 162, 58, 0.14);
	border: 1px solid rgba(216, 162, 58, 0.28);
	color: #d8a23a;
}

.terms-back {
	color: rgba(237, 247, 248, 0.76);
}

.terms-page[data-terms-theme="light"] .terms-action {
	color: #8b641f;
}

.terms-page[data-terms-theme="light"] .terms-back {
	color: rgba(23, 39, 45, 0.72);
}

.terms-hero {
	display: grid;
	gap: 32px;
	grid-template-columns: minmax(0, 1fr) 340px;
	margin-bottom: 34px;
}

.terms-kicker,
.terms-meta-label,
.terms-section-number {
	color: #d8a23a;
	display: block;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.terms-page[data-terms-theme="light"] .terms-kicker,
.terms-page[data-terms-theme="light"] .terms-meta-label,
.terms-page[data-terms-theme="light"] .terms-section-number {
	color: #8b641f;
}

.terms-hero h1 {
	font-size: 46px;
	font-weight: 900;
	line-height: 1.08;
	margin: 12px 0 14px;
	max-width: 720px;
}

.terms-hero p {
	color: rgba(237, 247, 248, 0.74);
	font-size: 15px;
	margin: 0;
	max-width: 860px;
}

.terms-page[data-terms-theme="light"] .terms-hero p {
	color: rgba(23, 39, 45, 0.72);
}

.terms-meta-card {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	box-shadow: 0 24px 54px rgba(0, 0, 0, 0.24);
	padding: 22px;
}

.terms-page[data-terms-theme="light"] .terms-meta-card {
	background: rgba(255, 255, 255, 0.78);
	border-color: rgba(23, 72, 78, 0.14);
	box-shadow: 0 24px 54px rgba(23, 72, 78, 0.13);
}

.terms-meta-card strong {
	display: block;
	font-size: 17px;
	font-weight: 900;
	margin: 6px 0 10px;
}

.terms-meta-card p {
	color: inherit;
	font-size: 13px;
	margin: 0;
}

.terms-layout {
	align-items: start;
	display: grid;
	gap: 28px;
	grid-template-columns: 260px minmax(0, 1fr);
}

.terms-nav {
	background: rgba(3, 18, 24, 0.34);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	padding: 16px;
	position: sticky;
	top: 24px;
}

.terms-page[data-terms-theme="light"] .terms-nav {
	background: rgba(255, 255, 255, 0.76);
	border-color: rgba(23, 72, 78, 0.12);
}

.terms-nav-title {
	color: rgba(237, 247, 248, 0.56);
	font-size: 11px;
	font-weight: 900;
	margin-bottom: 10px;
	text-transform: uppercase;
}

.terms-page[data-terms-theme="light"] .terms-nav-title {
	color: rgba(23, 39, 45, 0.56);
}

.terms-nav a {
	border-radius: 7px;
	color: rgba(237, 247, 248, 0.78);
	display: block;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 10px;
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease;
}

.terms-page[data-terms-theme="light"] .terms-nav a {
	color: rgba(23, 39, 45, 0.76);
}

.terms-nav a:hover,
.terms-nav a.active {
	background: rgba(216, 162, 58, 0.14);
	color: #d8a23a;
}

.terms-page[data-terms-theme="light"] .terms-nav a:hover,
.terms-page[data-terms-theme="light"] .terms-nav a.active {
	color: #8b641f;
}

.terms-content {
	display: grid;
	gap: 16px;
}

.terms-section {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	padding: 22px 24px;
}

.terms-page[data-terms-theme="light"] .terms-section {
	background: rgba(255, 255, 255, 0.82);
	border-color: rgba(23, 72, 78, 0.12);
}

.terms-section h2 {
	align-items: center;
	display: flex;
	font-size: 18px;
	font-weight: 900;
	gap: 10px;
	margin: 0 0 10px;
}

.terms-section-number {
	align-items: center;
	background: rgba(216, 162, 58, 0.14);
	border-radius: 999px;
	display: inline-flex;
	height: 28px;
	justify-content: center;
	min-width: 28px;
}

.terms-section p,
.terms-section li {
	color: rgba(237, 247, 248, 0.76);
	font-size: 14px;
}

.terms-page[data-terms-theme="light"] .terms-section p,
.terms-page[data-terms-theme="light"] .terms-section li {
	color: rgba(23, 39, 45, 0.76);
}

.terms-section p {
	margin: 8px 0;
}

.terms-section ul {
	margin: 10px 0 0 20px;
	padding: 0;
}

.terms-footer {
	align-items: center;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: rgba(237, 247, 248, 0.64);
	display: flex;
	justify-content: space-between;
	margin-top: 26px;
	padding-top: 18px;
}

.terms-page[data-terms-theme="light"] .terms-footer {
	border-top-color: rgba(23, 72, 78, 0.12);
	color: rgba(23, 39, 45, 0.64);
}

@media (max-width: 900px) {
	.terms-topbar,
	.terms-hero,
	.terms-layout,
	.terms-footer {
		grid-template-columns: 1fr;
	}

	.terms-topbar,
	.terms-footer {
		align-items: flex-start;
		flex-direction: column;
		gap: 16px;
	}

	.terms-nav {
		position: static;
	}
}

@media (max-width: 640px) {
	.terms-shell {
		padding: 20px 14px 34px;
	}

	.terms-tools {
		align-items: stretch;
		flex-direction: column;
		width: 100%;
	}

	.terms-theme,
	.terms-action,
	.terms-back {
		justify-content: center;
		width: 100%;
	}

	.terms-hero h1 {
		font-size: 32px;
	}

	.terms-section {
		padding: 18px;
	}
}

/* Dashboard-aligned legal pages */
body.terms-page {
	background: #f6f7f8;
	background-image: url("data:image/svg+xml,%3Csvg width='64' height='64' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M64 0H0V64' fill='none' stroke='%23e7ecef' stroke-width='1'/%3E%3C/svg%3E");
	background-size: 64px 64px;
	color: #0f2732;
	font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

body.terms-page[data-terms-theme="dark"] {
	background: #172b33;
	background-image: url("data:image/svg+xml,%3Csvg width='64' height='64' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M64 0H0V64' fill='none' stroke='%23263f48' stroke-width='1'/%3E%3C/svg%3E");
	background-size: 64px 64px;
	color: #f8fbfc;
}

.terms-progress,
.terms-theme button.active {
	background: #d8a23a;
	color: #0f2732;
}

.terms-shell {
	max-width: 1240px;
	padding-top: 0;
}

.terms-topbar {
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid #e3e7ea;
	box-shadow: 0 1px 0 rgba(15, 39, 50, 0.04);
	margin: 0 calc(50% - 50vw) 34px;
	padding: 10px max(24px, calc(50vw - 620px));
}

.terms-page[data-terms-theme="dark"] .terms-topbar {
	background: #12262e;
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.terms-theme {
	background: #ffffff;
	border-color: #dce2e5;
	box-shadow: 0 8px 20px rgba(15, 39, 50, 0.08);
}

.terms-page[data-terms-theme="dark"] .terms-theme {
	background: #223942;
	border-color: rgba(255, 255, 255, 0.1);
	box-shadow: none;
}

.terms-kicker,
.terms-meta-label,
.terms-section-number {
	color: #8b641f;
}

.terms-page[data-terms-theme="dark"] .terms-kicker,
.terms-page[data-terms-theme="dark"] .terms-meta-label,
.terms-page[data-terms-theme="dark"] .terms-section-number {
	color: #d8a23a;
}

.terms-hero {
	align-items: stretch;
	background: #ffffff;
	border: 1px solid #dde4e7;
	border-radius: 8px;
	box-shadow: 0 18px 42px rgba(15, 39, 50, 0.1);
	gap: 0;
	grid-template-columns: minmax(0, 1fr) 340px;
	margin-bottom: 22px;
	overflow: hidden;
}

.terms-page[data-terms-theme="dark"] .terms-hero {
	background: #1c333b;
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.terms-hero > div {
	padding: 34px 36px;
}

.terms-hero h1 {
	color: #0f2732;
	font-size: 38px;
}

.terms-page[data-terms-theme="dark"] .terms-hero h1 {
	color: #ffffff;
}

.terms-hero p,
.terms-section p,
.terms-section li,
.terms-footer {
	color: #50626b;
}

.terms-page[data-terms-theme="dark"] .terms-hero p,
.terms-page[data-terms-theme="dark"] .terms-section p,
.terms-page[data-terms-theme="dark"] .terms-section li,
.terms-page[data-terms-theme="dark"] .terms-footer {
	color: rgba(248, 251, 252, 0.74);
}

.terms-meta-card,
.terms-nav,
.terms-section {
	background: #ffffff;
	border: 1px solid #dfe6e9;
	box-shadow: none;
	color: #263b44;
}

.terms-page[data-terms-theme="dark"] .terms-meta-card,
.terms-page[data-terms-theme="dark"] .terms-nav,
.terms-page[data-terms-theme="dark"] .terms-section {
	background: #24383f;
	border-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
}

.terms-meta-card {
	background: #f0ece3;
	border-width: 0 0 0 1px;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.terms-page[data-terms-theme="dark"] .terms-meta-card {
	background: #24383f;
}

.terms-layout {
	gap: 18px;
}

.terms-nav-title,
.terms-nav a {
	color: #50626b;
}

.terms-page[data-terms-theme="dark"] .terms-nav-title,
.terms-page[data-terms-theme="dark"] .terms-nav a {
	color: rgba(248, 251, 252, 0.72);
}

.terms-nav a:hover,
.terms-nav a.active,
.terms-action,
.terms-back {
	background: #fff8e8;
	border-color: #ead7a8;
	color: #8b641f;
}

.terms-page[data-terms-theme="dark"] .terms-nav a:hover,
.terms-page[data-terms-theme="dark"] .terms-nav a.active,
.terms-page[data-terms-theme="dark"] .terms-action,
.terms-page[data-terms-theme="dark"] .terms-back {
	background: rgba(216, 162, 58, 0.12);
	border-color: rgba(216, 162, 58, 0.28);
	color: #d8a23a;
}

@media (max-width: 900px) {
	.terms-hero {
		grid-template-columns: 1fr;
	}

	.terms-meta-card {
		border-left: 0;
		border-top: 1px solid #dfe6e9;
	}
}

/* Studio theme: match the earlier premium charcoal background. */
body.terms-page[data-terms-theme="dark"] {
	background: #111111;
	background-image: none;
	color: #f7f7f5;
}

.terms-page[data-terms-theme="dark"] .terms-topbar {
	background: #151515;
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.terms-page[data-terms-theme="dark"] .terms-theme {
	background: #2d2a26;
	border-color: rgba(255, 255, 255, 0.16);
}

.terms-page[data-terms-theme="dark"] .terms-hero {
	background: #302d29;
	border-color: rgba(255, 255, 255, 0.16);
	box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

.terms-page[data-terms-theme="dark"] .terms-meta-card,
.terms-page[data-terms-theme="dark"] .terms-nav,
.terms-page[data-terms-theme="dark"] .terms-section {
	background: #383530;
	border-color: rgba(255, 255, 255, 0.14);
	color: #ffffff;
}
