/*
 * Mashin Irani — Terms page design (قوانین و مقررات).
 * Navy/gold legal hero, highlight cards, sticky scroll-spy TOC with reading progress, numbered
 * section cards, and a print sheet. Short --* tokens with hex fallbacks (house convention).
 * Own `mit-` namespace — does not touch the shared .mip-* rules in mirani-pages.css.
 */

/* ------------------------------------------------------------------- hero */
.mit-hero {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--space-6, 24px);
	align-items: center;
	margin-block: var(--space-5, 20px) var(--space-8, 32px);
	padding: var(--space-8, 32px);
	border-radius: var(--radius-lg, 12px);
	overflow: hidden;
	background: linear-gradient(135deg, #102134 0%, #16264a 55%, #1b3a63 100%);
	color: var(--ivory-50, #f5f0e9);
	box-shadow: 0 18px 40px rgba(16, 33, 52, .18);
}

.mit-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(120% 140% at 100% 0%, rgba(224, 197, 143, .18), transparent 60%);
	pointer-events: none;
}

.mit-hero__b {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.mit-hero .eyebrow {
	margin: 0 0 var(--space-2, 8px);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--gold-300, #e0c58f);
}

.mit-hero h1 {
	margin: 0 0 var(--space-3, 12px);
	font-size: clamp(1.7rem, 4.5vw, 2.4rem);
	line-height: 1.2;
	color: #fff;
}

.mit-hero__lede {
	margin: 0;
	max-width: 62ch;
	line-height: 1.9;
	font-size: 1.02rem;
	color: rgba(245, 240, 233, .82);
}

.mit-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2, 8px) var(--space-3, 12px);
	margin-top: var(--space-5, 20px);
}

.mit-meta__i {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: var(--radius-pill, 999px);
	background: rgba(245, 240, 233, .10);
	border: 1px solid rgba(224, 197, 143, .28);
	font-size: .78rem;
	font-weight: 600;
	color: rgba(245, 240, 233, .92);
}

.mit-meta__i svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--gold-300, #e0c58f);
	stroke-width: 1.8;
}

.mit-print {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 0;
	border-radius: var(--radius-pill, 999px);
	background: var(--gold-300, #e0c58f);
	color: #102134;
	font: inherit;
	font-size: .78rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter .2s;
}

.mit-print:hover {
	filter: brightness(1.07);
}

.mit-print svg {
	width: 14px;
	height: 14px;
}

.mit-hero__seal {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: rgba(245, 240, 233, .06);
	border: 2px solid rgba(224, 197, 143, .45);
}

.mit-hero__seal svg {
	width: 46px;
	height: 46px;
	fill: none;
	stroke: var(--gold-300, #e0c58f);
	stroke-width: 1.4;
}

/* ------------------------------------------------------------- highlights */
.mit-high {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: var(--space-4, 16px);
	margin-bottom: var(--space-8, 32px);
}

.mit-high__c {
	padding: var(--space-5, 20px);
	border: 1px solid var(--border, #d9cbc2);
	border-radius: var(--radius-lg, 12px);
	background: var(--bg-elevated, #fff);
	box-shadow: var(--shadow-e1, 0 1px 2px rgba(16, 33, 52, .06));
}

.mit-high__c .ic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: rgba(137, 111, 61, .10);
	margin-bottom: var(--space-3, 12px);
}

.mit-high__c .ic svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: var(--gold-500, #896f3d);
	stroke-width: 1.8;
}

.mit-high__c b {
	display: block;
	margin-bottom: 6px;
	color: var(--navy-900, #102134);
	font-size: .98rem;
}

.mit-high__c p {
	margin: 0;
	color: var(--text-secondary, #404751);
	font-size: .9rem;
	line-height: 1.85;
}

/* ------------------------------------------------------------------ layout */
.mit-legal__grid {
	display: grid;
	grid-template-columns: 264px 1fr;
	gap: var(--space-8, 32px);
	align-items: start;
}

/* --------------------------------------------------------------------- TOC */
.mit-toc {
	position: sticky;
	top: 96px;
	padding: var(--space-4, 16px);
	border: 1px solid var(--border, #d9cbc2);
	border-radius: var(--radius-lg, 12px);
	background: var(--bg-elevated, #fff);
	box-shadow: var(--shadow-e1, 0 1px 2px rgba(16, 33, 52, .06));
}

.mit-toc summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	color: var(--text-tertiary, #6e6a66);
}

.mit-toc summary::-webkit-details-marker {
	display: none;
}

.mit-toc summary b {
	font-size: .82rem;
	font-weight: 700;
}

.mit-toc summary svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	transition: transform .2s;
}

.mit-toc details[open] summary svg {
	transform: rotate(180deg);
}

.mit-toc ol {
	display: grid;
	gap: 2px;
	margin: var(--space-3, 12px) 0 0;
	padding: 0;
	list-style: none;
}

.mit-toc a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 8px;
	border-radius: 8px;
	font-size: .86rem;
	line-height: 1.5;
	color: var(--text-secondary, #404751);
	text-decoration: none;
	transition: background .18s, color .18s;
}

.mit-toc a .n {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	background: var(--bg-sunken, #ece4da);
	font-size: .7rem;
	font-weight: 700;
	color: var(--text-tertiary, #6e6a66);
	transition: background .18s, color .18s;
}

.mit-toc a:hover {
	background: var(--bg-sunken, #ece4da);
	color: var(--navy-900, #102134);
}

.mit-toc a.is-active {
	background: rgba(17, 34, 80, .06);
	color: var(--navy-900, #102134);
	font-weight: 700;
}

.mit-toc a.is-active .n {
	background: var(--navy-800, #112250);
	color: var(--gold-300, #e0c58f);
}

.mit-toc__bar {
	margin-top: var(--space-3, 12px);
	height: 4px;
	border-radius: 999px;
	background: var(--bg-sunken, #ece4da);
	overflow: hidden;
}

.mit-toc__bar i {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--gold-500, #896f3d), var(--gold-300, #e0c58f));
	transition: width .15s linear;
}

/* ---------------------------------------------------------- section cards */
.mit-prose {
	display: grid;
	gap: var(--space-4, 16px);
	min-width: 0;
}

.mit-sec {
	position: relative;
	padding: var(--space-6, 24px);
	border: 1px solid var(--border, #d9cbc2);
	border-radius: var(--radius-lg, 12px);
	background: var(--bg-elevated, #fff);
	scroll-margin-top: 110px;
	transition: border-color .2s, box-shadow .2s;
}

.mit-sec::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: var(--space-6, 24px);
	bottom: var(--space-6, 24px);
	width: 3px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--gold-300, #e0c58f), transparent);
	opacity: 0;
	transition: opacity .2s;
}

.mit-sec:hover {
	border-color: var(--gold-300, #e0c58f);
	box-shadow: var(--shadow-e2, 0 4px 14px rgba(16, 33, 52, .08));
}

.mit-sec:hover::before,
.mit-sec:target::before {
	opacity: 1;
}

.mit-sec__h {
	display: flex;
	align-items: center;
	gap: var(--space-3, 12px);
	margin-bottom: var(--space-3, 12px);
}

.mit-sec__n {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--navy-800, #112250);
	color: var(--gold-300, #e0c58f);
	font-size: .85rem;
	font-weight: 700;
}

.mit-sec__ic {
	flex: none;
	display: inline-flex;
}

.mit-sec__ic svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: var(--gold-500, #896f3d);
	stroke-width: 1.8;
}

.mit-sec h2 {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.5;
	color: var(--navy-900, #102134);
}

.mit-sec__a {
	flex: none;
	opacity: 0;
	color: var(--text-tertiary, #6e6a66);
	font-weight: 700;
	text-decoration: none;
	transition: opacity .2s;
}

.mit-sec:hover .mit-sec__a,
.mit-sec__a:focus-visible {
	opacity: 1;
}

.mit-sec p {
	margin: 0;
	color: var(--text-secondary, #404751);
	line-height: 2;
}

/* ---------------------------------------------------------------- end note */
.mit-note {
	display: flex;
	gap: var(--space-3, 12px);
	align-items: flex-start;
	padding: var(--space-5, 20px);
	border-radius: var(--radius-lg, 12px);
	border: 1px dashed var(--border-strong, #c0b2a6);
	background: var(--bg-sunken, #ece4da);
	color: var(--text-secondary, #404751);
	line-height: 1.9;
}

.mit-note svg {
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 3px;
	fill: none;
	stroke: var(--gold-500, #896f3d);
	stroke-width: 1.8;
}

.mit-note a {
	color: var(--link, #3c507d);
	font-weight: 700;
	text-decoration: none;
}

.mit-note a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
	.mit-legal__grid {
		grid-template-columns: 224px 1fr;
		gap: var(--space-6, 24px);
	}
}

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

	.mit-toc {
		position: static;
	}

	.mit-toc ol {
		grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
		gap: 4px;
	}
}

@media (max-width: 640px) {
	.mit-hero {
		grid-template-columns: 1fr;
		padding: var(--space-6, 24px);
	}

	.mit-hero__seal {
		display: none;
	}

	.mit-sec {
		padding: var(--space-5, 20px);
	}

	.mit-sec__h {
		flex-wrap: wrap;
	}

	.mit-sec h2 {
		font-size: 1.02rem;
	}
}

/* ------------------------------------------------------------------- print */
@media print {
	.site-header,
	.site-footer,
	.breadcrumb,
	.mit-toc,
	.mit-print,
	.mip-cta,
	.gaftino,
	.mi-mfooter,
	.mi-mobile-nav,
	.mi-b2b-choice {
		display: none !important;
	}

	.mit-hero {
		background: none !important;
		box-shadow: none;
		border: 1px solid #ccc;
		color: #000;
	}

	.mit-hero h1,
	.mit-hero .eyebrow,
	.mit-hero__lede {
		color: #000 !important;
	}

	.mit-legal__grid {
		grid-template-columns: 1fr;
	}

	.mit-sec {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
