/*
 * The terms of service as a reader (page-tos, template/page/tos.php), with
 * base.css: .hd-tos. Design trm2 «کتابچه» of the canvas «بازطراحی صفحه‌ی
 * «قوانین» های‌دیتا», which the owner picked on 2026-11-22. Sizes are px of the
 * design times --u, a px at the root size it was drawn at on wide screens
 * (1440px wide, root 14px), and times --p on phones (390px wide, root 12px), so
 * the page scales with the root as MojoCSS sets it. Light surfaces only; no
 * box lifts on hover; the buttons ripple (.ripple-button, site.js). Motion: a
 * chapter fades in when it opens (assets/js/components.js adds .is-in), still
 * with reduced motion. Logical sides, so the English and Russian pages (left
 * to right) mirror the Persian one. Printed (the block at the end), the page
 * is the terms alone, as an A4 document.
 */

.hd-tos {
	--u: calc(1rem / 14);
	--p: calc(1rem / 12);
	--hd-tos-edge: inset 0 0 0 1px #E1ECF6;
	--hd-tos-shadow: 0 calc(40 * var(--u)) calc(70 * var(--u)) calc(-50 * var(--u)) rgba(16, 63, 99, .5);
	/* The sticky index's place: under the site's menu (6.2rem from 992px
	   wide: 87px at 1440, 99px at 1920), plus air. */
	--hd-tos-top: calc(6.2rem + 14px);
}

.hd-sec.hd-tos {
	padding: calc(50 * var(--u)) 0 calc(70 * var(--u));
}

/* === The opening: the title over the acceptance clause, beside the tools === */

.hd-tos-top {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	align-items: center;
	gap: calc(44 * var(--u));
	margin-bottom: calc(34 * var(--u));
}

.hd-tos-top > .hd-tos-tools:only-child {
	grid-column: 1 / -1;
}

.hd-tos-eye {
	display: inline-flex;
	align-items: center;
	gap: calc(9 * var(--u));
	padding: calc(6 * var(--u)) calc(16 * var(--u));
	border-radius: 99px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #D3E2F1;
	font-size: calc(13 * var(--u));
	font-weight: 800;
	color: #24577D;
}

.hd-tos-eye i {
	width: calc(8 * var(--u));
	height: calc(8 * var(--u));
	border-radius: 50%;
	background: #FFCC00;
	box-shadow: 0 0 0 calc(3 * var(--u)) rgba(255, 204, 0, .28);
}

.hd-tos-title {
	margin: calc(14 * var(--u)) 0 0;
	font-size: calc(48 * var(--u));
	line-height: 1.4;
	font-weight: 900;
	color: #103F63;
	text-wrap: balance;
}

/* The marked phrase of the title (hidata_ui_highlight()): the theme's yellow
   marker under it, as on the home page. */
.hd-tos-title .hd-hl {
	font-style: normal;
	color: inherit;
	background: linear-gradient(transparent 66%, rgba(255, 204, 0, .6) 66% 90%, transparent 90%);
}

.hd-tos-lead {
	max-width: calc(600 * var(--u));
	margin-top: calc(10 * var(--u));
	font-size: calc(15.5 * var(--u));
	line-height: 2.05;
	font-weight: 500;
	color: #447394;
	text-wrap: pretty;
}

.hd-tos-nb {
	display: inline-block;
}

.hd-tos-tools {
	display: grid;
	gap: calc(14 * var(--u));
	padding: calc(20 * var(--u));
	border-radius: calc(28 * var(--u));
	background: #fff;
	box-shadow: var(--hd-tos-shadow), var(--hd-tos-edge);
}

/* The page's search (site.js finds the field and the button by their ids). */
.hd-tos-search {
	display: flex;
	align-items: center;
	gap: calc(10 * var(--u));
	min-height: max(calc(56 * var(--u)), 48px);
	padding-inline: calc(20 * var(--u)) calc(8 * var(--u));
	border-radius: 99px;
	background: #F3F8FD;
	box-shadow: inset 0 0 0 1px #D3E2F1;
}

/* Focus: the field's is the pill's ring, never a square outline inside the
   pill (owner, 2026-11-23: «فوکوس باکس سرچ مشکل دارد»); the button keeps its
   own ring, so the pill rings only while the field has the focus. */
.hd-tos-search:focus-within {
	box-shadow: inset 0 0 0 2px #0247AE;
}

@supports selector(:has(*)) {
	.hd-tos-search:focus-within {
		box-shadow: inset 0 0 0 1px #D3E2F1;
	}

	.hd-tos-search:has(input:focus) {
		box-shadow: inset 0 0 0 2px #0247AE;
	}
}

.hd-tos .hd-tos-search input:focus-visible {
	outline: none;
}

.hd-tos .hd-tos-search button:focus-visible {
	outline-width: 2px;
	outline-offset: 2px;
}

.hd-tos-sic {
	display: grid;
	flex: none;
	place-items: center;
	color: #7DA3C0;
}

.hd-tos-sic svg {
	width: calc(20 * var(--u));
	height: calc(20 * var(--u));
}

.hd-tos-search input {
	flex: 1 1 0;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: calc(14.5 * var(--u));
	font-weight: 600;
	color: #103F63;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.hd-tos-search input::placeholder {
	color: #50728F;
	opacity: 1;
}

.hd-tos-search button {
	flex: none;
	min-height: max(calc(42 * var(--u)), 40px);
	padding: 0 calc(20 * var(--u));
	border: 0;
	border-radius: 99px;
	background: #E3F0FC;
	font: inherit;
	font-size: calc(14 * var(--u));
	font-weight: 800;
	color: #0247AE;
	cursor: pointer;
}

.hd-tos-meta {
	display: flex;
	flex-wrap: wrap;
	gap: calc(6 * var(--u)) calc(24 * var(--u));
	padding: 0 calc(8 * var(--u));
	font-size: calc(13.5 * var(--u));
	font-weight: 800;
	color: #24577D;
}

.hd-tos-meta li {
	display: inline-flex;
	align-items: center;
	gap: calc(8 * var(--u));
}

/* The page's address, on the printed page only. */
.hd-tos-meta .hd-tos-url {
	display: none;
}

.hd-tos-meta svg,
.hd-tos-print svg {
	flex: none;
	width: calc(19 * var(--u));
	height: calc(19 * var(--u));
	color: #0247AE;
}

.hd-tos-print {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(8 * var(--u));
	min-height: 44px;
	padding: 0 calc(18 * var(--u));
	border: 0;
	border-radius: 99px;
	background: #F1F7FD;
	box-shadow: inset 0 0 0 1px #D9E7F4;
	font: inherit;
	font-size: calc(13.5 * var(--u));
	font-weight: 800;
	color: #0247AE;
	cursor: pointer;
}

/* === The reader: the index beside one chapter === */

.hd-tos-book {
	display: grid;
	grid-template-columns: calc(360 * var(--u)) minmax(0, 1fr);
	align-items: stretch;
	border-radius: calc(32 * var(--u));
	background: #fff;
	box-shadow: 0 calc(50 * var(--u)) calc(90 * var(--u)) calc(-60 * var(--u)) rgba(16, 63, 99, .55), var(--hd-tos-edge);
}

.hd-tos-idx {
	padding: calc(22 * var(--u)) calc(16 * var(--u)) calc(22 * var(--u)) calc(14 * var(--u));
	border-inline-end: 1px solid #E1ECF6;
	border-start-start-radius: calc(32 * var(--u));
	border-end-start-radius: calc(32 * var(--u));
	background: #F3F8FD;
}

/* The index shows whole, with no scrollbar of its own (owner, 2026-11-22):
   it stays under the site's menu while it fits the window; in a lower window
   it moves with the page and then stays with its foot at the window's foot,
   so every chapter comes into view. --hd-tos-h is its height
   (assets/js/components.js). Its rows are compact: the 23 chapters fit a
   window 800px high at 1440px wide and 860px high at 1920px. */
.hd-tos-idxi {
	position: sticky;
	top: min(var(--hd-tos-top), calc(100vh - var(--hd-tos-h, 0px) - 16px));
	top: min(var(--hd-tos-top), calc(100dvh - var(--hd-tos-h, 0px) - 16px));
}

.hd-tos-idxh {
	display: flex;
	align-items: center;
	gap: calc(9 * var(--u));
	padding: 0 calc(9 * var(--u)) calc(9 * var(--u));
	font-size: calc(14.5 * var(--u));
	font-weight: 900;
	color: #103F63;
}

.hd-tos-idxh svg {
	width: calc(19 * var(--u));
	height: calc(19 * var(--u));
	color: #0247AE;
}

.hd-tos-idx ol,
.hd-tos-pick ol {
	display: grid;
	gap: calc(3 * var(--u));
}

.hd-tos-idx ol {
	gap: calc(1 * var(--u));
}

.hd-tos-idx a,
.hd-tos-pick ol a {
	position: relative;
	display: grid;
	grid-template-columns: calc(28 * var(--u)) minmax(0, 1fr) auto;
	align-items: center;
	gap: calc(10 * var(--u));
	min-height: max(calc(40 * var(--u)), 40px);
	padding: calc(4 * var(--u)) calc(10 * var(--u));
	border-radius: calc(13 * var(--u));
	font-size: calc(13 * var(--u));
	line-height: 1.6;
	font-weight: 700;
	color: #24577D;
	transition: background-color .2s, color .2s;
}

.hd-tos-idx a {
	grid-template-columns: calc(20 * var(--u)) minmax(0, 1fr);
	gap: calc(9 * var(--u));
	min-height: 0;
	padding: calc(2.5 * var(--u)) calc(9 * var(--u));
	border-radius: calc(9 * var(--u));
	font-size: calc(12.5 * var(--u));
	line-height: 1.5;
}

.hd-tos-idx a:hover,
.hd-tos-pick ol a:hover {
	background: #E8F2FB;
	color: #0247AE;
}

.hd-tos-idx a.is-on,
.hd-tos-pick ol a.is-on {
	background: #fff;
	color: #0247AE;
	box-shadow: 0 12px 24px -18px rgba(16, 63, 99, .55);
}

/* The open chapter's mark: a straight bar on the start side. */
.hd-tos-idx a.is-on::before,
.hd-tos-pick ol a.is-on::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: calc(9 * var(--u));
	bottom: calc(9 * var(--u));
	width: 3px;
	border-radius: 3px;
	background: #0247AE;
}

.hd-tos-idx a.is-on::before {
	top: calc(5 * var(--u));
	bottom: calc(5 * var(--u));
}

.hd-tos-n {
	display: grid;
	place-items: center;
	width: calc(28 * var(--u));
	height: calc(28 * var(--u));
	border-radius: calc(9 * var(--u));
	background: #E3EEF9;
	font-size: calc(12.5 * var(--u));
	font-weight: 900;
	color: #0247AE;
	transition: background-color .2s, color .2s;
}

.hd-tos-idx .hd-tos-n {
	width: calc(20 * var(--u));
	height: calc(20 * var(--u));
	border-radius: calc(6 * var(--u));
	font-size: calc(11 * var(--u));
}

.is-on .hd-tos-n {
	background: #FFCC00;
	color: #103F63;
}

.hd-tos-pick ol small {
	font-size: calc(11.5 * var(--u));
	font-weight: 700;
	color: #4E7190;
	white-space: nowrap;
}

.hd-tos-strip,
.hd-tos-pick {
	display: none;
}

.hd-tos-panes {
	min-width: 0;
	padding: calc(34 * var(--u)) calc(44 * var(--u)) calc(30 * var(--u));
}

/* The closed chapters: hidden="until-found", so the browser's find and an
   address still open them; base.css hides every [hidden] of a section, which
   would hide them from the find too. */
.hd-sec.hd-tos .hd-tos-pane[hidden] {
	display: block !important;
	content-visibility: hidden;
}

.hd-tos-pane.is-in {
	animation: hd-tos-in .45s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes hd-tos-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

.hd-tos-ph {
	display: grid;
	gap: calc(4 * var(--u));
	margin-bottom: calc(14 * var(--u));
	padding-bottom: calc(18 * var(--u));
	border-bottom: 1px solid #E5EEF6;
	/* Below the site's menu: html's scroll-padding-top (main.css) already
	   keeps an address clear of it; this is the air above. */
	scroll-margin-top: 12px;
}

.hd-tos-kick {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: calc(12 * var(--u));
	font-size: calc(13.5 * var(--u));
	font-weight: 900;
	color: #0247AE;
}

.hd-tos-cnt {
	font-size: calc(12.5 * var(--u));
	font-weight: 700;
	color: #4E7190;
}

.hd-tos-ph h2 {
	margin: 0;
	font-size: calc(26 * var(--u));
	line-height: 1.55;
	font-weight: 900;
	color: #103F63;
	text-wrap: balance;
	outline: none;
}

.hd-tos-cls {
	display: grid;
	gap: calc(2 * var(--u));
}

.hd-tos-cls > li {
	position: relative;
	display: grid;
	grid-template-columns: calc(62 * var(--u)) minmax(0, 1fr);
	align-items: start;
	padding-block: calc(6 * var(--u));
	padding-inline: calc(12 * var(--u)) calc(10 * var(--u));
	border-radius: calc(14 * var(--u));
	scroll-margin-top: 12px;
	transition: background-color .2s;
}

.hd-tos-cls > li:hover {
	background: #F5FAFE;
}

/* A clause an address points to: yellow, with a bar on its start side. */
.hd-tos .hd-tos-cls > li:target {
	background: #FFF3C4;
}

.hd-tos .hd-tos-cls > li:target::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: calc(8 * var(--u));
	bottom: calc(8 * var(--u));
	width: calc(4 * var(--u));
	border-radius: calc(4 * var(--u));
	background: #FFCC00;
}

.hd-tos-no {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-self: start;
	gap: calc(5 * var(--u));
	min-height: calc(30 * var(--u));
	margin-top: calc(2 * var(--u));
	padding: 0 calc(2 * var(--u));
	border-radius: calc(8 * var(--u));
	font-size: calc(14 * var(--u));
	line-height: 1.6;
	font-weight: 900;
	color: #0247AE;
	white-space: nowrap;
}

.hd-tos-no svg {
	width: calc(14 * var(--u));
	height: calc(14 * var(--u));
	opacity: 0;
	transition: opacity .2s;
}

.hd-tos-cls > li:hover .hd-tos-no svg,
.hd-tos-no:focus-visible svg {
	opacity: 1;
}

.hd-tos-cls p {
	max-width: 40em;
	font-size: calc(16 * var(--u));
	line-height: 2;
	font-weight: 500;
	color: #2A5677;
	text-wrap: pretty;
}

.hd-tos-ref {
	font-weight: 700;
	color: #0247AE;
	text-decoration: underline dotted;
	text-decoration-thickness: 1.5px;
	text-underline-offset: calc(5 * var(--u));
	white-space: nowrap;
}

.hd-tos-ref:hover {
	text-decoration-style: solid;
}

/* The results of the page's search (site.js). */
.hd-tos .highlight {
	background: rgba(255, 204, 0, .25);
}

.hd-tos .highlight.current {
	background: rgba(255, 204, 0, .87);
}

/* The previous and the next chapter, by name. */
.hd-tos-pn {
	display: flex;
	justify-content: space-between;
	gap: calc(14 * var(--u));
	margin-top: calc(22 * var(--u));
	padding-top: calc(20 * var(--u));
	border-top: 1px solid #E5EEF6;
}

.hd-tos-pv,
.hd-tos-nx {
	display: inline-flex;
	align-items: center;
	gap: calc(12 * var(--u));
	max-width: 48%;
	min-height: calc(64 * var(--u));
	padding: calc(8 * var(--u)) calc(18 * var(--u));
	border-radius: calc(20 * var(--u));
	transition: background-color .2s;
}

.hd-tos-pv {
	background: #F3F8FD;
	color: #24577D;
}

.hd-tos-nx {
	margin-inline-start: auto;
	background: #0247AE;
	color: #fff;
	box-shadow: 0 calc(18 * var(--u)) calc(30 * var(--u)) calc(-20 * var(--u)) rgba(2, 71, 174, .8);
}

.hd-tos-pv > span,
.hd-tos-nx > span {
	display: grid;
	line-height: 1.6;
}

.hd-tos-pv small,
.hd-tos-nx small {
	font-size: calc(12 * var(--u));
	font-weight: 700;
	opacity: .8;
}

.hd-tos-pv b,
.hd-tos-nx b {
	font-size: calc(14 * var(--u));
	font-weight: 900;
	text-wrap: balance;
}

.hd-tos-pv svg,
.hd-tos-nx svg {
	flex: none;
	width: calc(20 * var(--u));
	height: calc(20 * var(--u));
}

/* === The box for questions and requests === */

.hd-tos-ask {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: calc(22 * var(--u)) calc(40 * var(--u));
	margin-top: calc(30 * var(--u));
	padding: calc(26 * var(--u)) calc(30 * var(--u));
	border-radius: calc(28 * var(--u));
	background: #fff;
	box-shadow: 0 calc(34 * var(--u)) calc(60 * var(--u)) calc(-46 * var(--u)) rgba(16, 63, 99, .5), var(--hd-tos-edge);
}

.hd-tos-askm {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: calc(18 * var(--u)) calc(22 * var(--u));
}

.hd-tos-aski {
	display: grid;
	place-items: center;
	width: calc(58 * var(--u));
	height: calc(58 * var(--u));
	border-radius: calc(18 * var(--u));
	background: #FFCC00;
	color: #103F63;
}

.hd-tos-aski svg {
	width: calc(28 * var(--u));
	height: calc(28 * var(--u));
}

.hd-tos-askt h2 {
	margin: 0;
	font-size: calc(21 * var(--u));
	line-height: 1.6;
	font-weight: 900;
	color: #103F63;
	text-wrap: balance;
}

.hd-tos-askt p {
	margin-top: calc(2 * var(--u));
	font-size: calc(14 * var(--u));
	line-height: 1.9;
	font-weight: 500;
	color: #447394;
	text-wrap: pretty;
}

.hd-tos-askb {
	display: grid;
	justify-items: center;
	gap: calc(4 * var(--u));
}

.hd-tos-askb small {
	font-size: calc(12 * var(--u));
	font-weight: 700;
	color: #447394;
}

.hd-tos-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(10 * var(--u));
	min-height: max(calc(50 * var(--u)), 44px);
	padding: 0 calc(26 * var(--u));
	border-radius: 99px;
	background: #0247AE;
	font-size: calc(14.5 * var(--u));
	line-height: 1.4;
	font-weight: 800;
	color: #fff;
	white-space: nowrap;
	box-shadow: 0 calc(16 * var(--u)) calc(30 * var(--u)) calc(-18 * var(--u)) rgba(2, 71, 174, .75);
}

.hd-tos-btn svg {
	width: calc(18 * var(--u));
	height: calc(18 * var(--u));
}

.hd-tos-askl {
	display: flex;
	gap: calc(10 * var(--u));
	padding-inline-start: calc(26 * var(--u));
	border-inline-start: 1px solid #DEE7EE;
}

.hd-tos-askl li {
	display: flex;
	align-items: center;
	gap: calc(11 * var(--u));
	padding: calc(6 * var(--u)) calc(12 * var(--u));
}

.hd-tos-ai {
	display: grid;
	flex: none;
	place-items: center;
	width: calc(44 * var(--u));
	height: calc(44 * var(--u));
	border-radius: calc(14 * var(--u));
	background: #E3F0FC;
	color: #0247AE;
}

.hd-tos-ai svg {
	width: calc(21 * var(--u));
	height: calc(21 * var(--u));
}

.hd-tos-askl li > span:last-child {
	display: grid;
	line-height: 1.6;
}

.hd-tos-askl small {
	font-size: calc(12 * var(--u));
	font-weight: 700;
	color: #447394;
	white-space: nowrap;
}

.hd-tos-askl b,
.hd-tos-askl b a {
	font-size: calc(16 * var(--u));
	font-weight: 900;
	color: #103F63;
}

.hd-tos-askl b a:hover {
	color: #0247AE;
}

.hd-tos :focus-visible {
	outline: 3px solid #0247AE;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.hd-tos-pane.is-in {
		animation: none;
	}
}

@media (max-width: 1139.98px) {
	.hd-tos-title {
		font-size: calc(42 * var(--u));
	}

	.hd-tos-book {
		grid-template-columns: calc(290 * var(--u)) minmax(0, 1fr);
	}

	.hd-tos-panes {
		padding: calc(28 * var(--u)) calc(30 * var(--u));
	}

	.hd-tos-ask {
		grid-template-columns: minmax(0, 1fr);
	}

	.hd-tos-askl {
		flex-wrap: wrap;
		gap: calc(10 * var(--u)) calc(30 * var(--u));
		padding: calc(16 * var(--u)) 0 0;
		border-inline-start: 0;
		border-top: 1px solid #DEE7EE;
	}
}

@media (max-width: 991.98px) {
	.hd-sec.hd-tos {
		padding-top: calc(36 * var(--u));
	}

	.hd-tos-top {
		grid-template-columns: minmax(0, 1fr);
		gap: calc(22 * var(--u));
		margin-bottom: calc(26 * var(--u));
	}

	.hd-tos-lead {
		max-width: none;
	}

	.hd-tos-book {
		grid-template-columns: minmax(0, 1fr);
		border-radius: calc(28 * var(--u));
	}

	.hd-tos-idx {
		display: none;
	}

	/* Phones: the chapters' numbers in a row, the reader's page tabs, and
	   the index as a list that folds. */
	.hd-tos-strip {
		display: flex;
		gap: calc(6 * var(--u));
		overflow-x: auto;
		padding: calc(12 * var(--u)) calc(12 * var(--u)) calc(2 * var(--u));
		scrollbar-width: none;
	}

	.hd-tos-strip::-webkit-scrollbar {
		display: none;
	}

	.hd-tos-strip a {
		display: grid;
		flex: none;
		place-items: center;
		width: max(calc(40 * var(--u)), 40px);
		height: max(calc(40 * var(--u)), 40px);
		border-radius: calc(12 * var(--u));
		background: #F3F8FD;
		box-shadow: var(--hd-tos-edge);
		font-size: calc(13.5 * var(--u));
		font-weight: 900;
		color: #24577D;
	}

	.hd-tos-strip a.is-on {
		background: #0247AE;
		box-shadow: none;
		color: #fff;
	}

	.hd-tos-pick {
		display: block;
		margin: calc(12 * var(--u)) calc(12 * var(--u)) 0;
		border-radius: calc(22 * var(--u));
		background: #F3F8FD;
		box-shadow: var(--hd-tos-edge);
	}

	.hd-tos-pick summary {
		display: flex;
		align-items: center;
		gap: calc(12 * var(--u));
		min-height: calc(64 * var(--u));
		padding: calc(10 * var(--u)) calc(14 * var(--u));
		list-style: none;
		cursor: pointer;
	}

	.hd-tos-pick summary::-webkit-details-marker {
		display: none;
	}

	.hd-tos-pki {
		display: grid;
		flex: none;
		place-items: center;
		width: calc(42 * var(--u));
		height: calc(42 * var(--u));
		border-radius: calc(13 * var(--u));
		background: #FFCC00;
		color: #103F63;
	}

	.hd-tos-pki svg {
		width: calc(20 * var(--u));
		height: calc(20 * var(--u));
	}

	.hd-tos-pick summary b {
		flex: 1 1 0;
		min-width: 0;
		font-size: calc(15 * var(--u));
		font-weight: 900;
		color: #103F63;
	}

	.hd-tos-pkc {
		display: grid;
		flex: none;
		place-items: center;
		width: calc(36 * var(--u));
		height: calc(36 * var(--u));
		border-radius: 50%;
		background: #fff;
		color: #0247AE;
		transition: transform .3s;
	}

	.hd-tos-pkc svg {
		width: calc(18 * var(--u));
		height: calc(18 * var(--u));
	}

	.hd-tos-pick[open] .hd-tos-pkc {
		transform: rotate(180deg);
	}

	.hd-tos-pick ol {
		padding: 0 calc(8 * var(--u)) calc(12 * var(--u));
	}

	.hd-tos-panes {
		padding: calc(24 * var(--u)) calc(26 * var(--u));
	}
}

@media (max-width: 767.98px) {
	.hd-tos-askm {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.hd-tos-askb {
		grid-column: 1 / -1;
		justify-items: stretch;
		text-align: center;
	}
}

@media (max-width: 575.98px) {
	.hd-sec.hd-tos {
		padding: calc(26 * var(--p)) 0 calc(44 * var(--p));
	}

	.hd-tos-top {
		gap: calc(18 * var(--p));
		margin-bottom: calc(20 * var(--p));
	}

	.hd-tos-eye {
		gap: calc(8 * var(--p));
		padding: calc(5 * var(--p)) calc(13 * var(--p));
		font-size: calc(12 * var(--p));
	}

	.hd-tos-eye i {
		width: calc(7 * var(--p));
		height: calc(7 * var(--p));
	}

	.hd-tos-title {
		margin-top: calc(12 * var(--p));
		font-size: calc(31 * var(--p));
		line-height: 1.45;
	}

	.hd-tos-lead {
		margin-top: calc(8 * var(--p));
		font-size: calc(14.5 * var(--p));
		line-height: 2;
	}

	.hd-tos-tools {
		gap: calc(12 * var(--p));
		padding: calc(14 * var(--p));
		border-radius: calc(22 * var(--p));
	}

	.hd-tos-search {
		gap: calc(8 * var(--p));
		min-height: max(calc(52 * var(--p)), 48px);
		padding-inline: calc(14 * var(--p)) calc(6 * var(--p));
	}

	.hd-tos-sic svg {
		width: calc(18 * var(--p));
		height: calc(18 * var(--p));
	}

	.hd-tos-search input {
		font-size: calc(14 * var(--p));
	}

	.hd-tos-search button {
		min-height: max(calc(40 * var(--p)), 40px);
		padding: 0 calc(15 * var(--p));
		font-size: calc(13.5 * var(--p));
	}

	.hd-tos-meta {
		gap: calc(4 * var(--p)) calc(16 * var(--p));
		padding: 0 calc(4 * var(--p));
		font-size: calc(12.5 * var(--p));
	}

	.hd-tos-meta svg,
	.hd-tos-print svg {
		width: calc(17 * var(--p));
		height: calc(17 * var(--p));
	}

	.hd-tos-print {
		font-size: calc(13 * var(--p));
	}

	.hd-tos-book {
		border-radius: calc(24 * var(--p));
	}

	.hd-tos-strip {
		gap: calc(6 * var(--p));
		padding: calc(10 * var(--p)) calc(10 * var(--p)) calc(2 * var(--p));
	}

	.hd-tos-strip a {
		border-radius: calc(12 * var(--p));
		font-size: calc(13.5 * var(--p));
	}

	.hd-tos-pick {
		margin: calc(8 * var(--p)) calc(8 * var(--p)) 0;
		border-radius: calc(18 * var(--p));
	}

	.hd-tos-pick summary {
		gap: calc(10 * var(--p));
		min-height: calc(60 * var(--p));
		padding: calc(8 * var(--p)) calc(10 * var(--p));
	}

	.hd-tos-pki {
		width: calc(40 * var(--p));
		height: calc(40 * var(--p));
		border-radius: calc(12 * var(--p));
	}

	.hd-tos-pki svg {
		width: calc(19 * var(--p));
		height: calc(19 * var(--p));
	}

	.hd-tos-pick summary b {
		font-size: calc(14.5 * var(--p));
	}

	.hd-tos-pkc {
		width: calc(34 * var(--p));
		height: calc(34 * var(--p));
	}

	.hd-tos-pick ol {
		padding: 0 calc(4 * var(--p)) calc(10 * var(--p));
	}

	.hd-tos-pick ol a {
		grid-template-columns: calc(28 * var(--p)) minmax(0, 1fr) auto;
		gap: calc(8 * var(--p));
		min-height: 44px;
		padding: calc(4 * var(--p)) calc(8 * var(--p));
		font-size: calc(13 * var(--p));
	}

	.hd-tos-n {
		width: calc(28 * var(--p));
		height: calc(28 * var(--p));
		border-radius: calc(9 * var(--p));
		font-size: calc(12 * var(--p));
	}

	.hd-tos-pick ol small {
		font-size: calc(11.5 * var(--p));
	}

	.hd-tos-panes {
		padding: calc(18 * var(--p)) calc(14 * var(--p));
	}

	.hd-tos-ph {
		gap: calc(2 * var(--p));
		margin-bottom: calc(8 * var(--p));
		padding-bottom: calc(14 * var(--p));
	}

	.hd-tos-kick {
		font-size: calc(12.5 * var(--p));
	}

	.hd-tos-cnt {
		font-size: calc(12 * var(--p));
	}

	.hd-tos-ph h2 {
		font-size: calc(20 * var(--p));
		line-height: 1.6;
	}

	.hd-tos-cls > li {
		grid-template-columns: calc(44 * var(--p)) minmax(0, 1fr);
		padding-block: calc(7 * var(--p));
		padding-inline: calc(6 * var(--p)) calc(4 * var(--p));
		border-radius: calc(12 * var(--p));
	}

	.hd-tos-no {
		gap: calc(3 * var(--p));
		min-height: calc(26 * var(--p));
		margin-top: calc(1 * var(--p));
		font-size: calc(12.5 * var(--p));
	}

	.hd-tos-no svg {
		display: none;
	}

	.hd-tos-cls p {
		font-size: calc(14 * var(--p));
		line-height: 1.95;
	}

	.hd-tos-ref {
		text-underline-offset: calc(4 * var(--p));
	}

	.hd-tos-pn {
		flex-direction: column-reverse;
		gap: calc(8 * var(--p));
		margin-top: calc(16 * var(--p));
		padding-top: calc(14 * var(--p));
	}

	.hd-tos-pv,
	.hd-tos-nx {
		max-width: none;
		min-height: calc(58 * var(--p));
		gap: calc(10 * var(--p));
		padding: calc(6 * var(--p)) calc(14 * var(--p));
		border-radius: calc(16 * var(--p));
	}

	.hd-tos-nx {
		justify-content: space-between;
		margin-inline-start: 0;
	}

	.hd-tos-pv small,
	.hd-tos-nx small {
		font-size: calc(11.5 * var(--p));
	}

	.hd-tos-pv b,
	.hd-tos-nx b {
		font-size: calc(13.5 * var(--p));
	}

	.hd-tos-pv svg,
	.hd-tos-nx svg {
		width: calc(18 * var(--p));
		height: calc(18 * var(--p));
	}

	.hd-tos-ask {
		gap: calc(16 * var(--p));
		margin-top: calc(20 * var(--p));
		padding: calc(22 * var(--p)) calc(18 * var(--p));
		border-radius: calc(22 * var(--p));
	}

	.hd-tos-askm {
		gap: calc(14 * var(--p));
	}

	.hd-tos-aski {
		width: calc(48 * var(--p));
		height: calc(48 * var(--p));
		border-radius: calc(15 * var(--p));
	}

	.hd-tos-aski svg {
		width: calc(24 * var(--p));
		height: calc(24 * var(--p));
	}

	.hd-tos-askt h2 {
		font-size: calc(17.5 * var(--p));
	}

	.hd-tos-askt p {
		font-size: calc(13.5 * var(--p));
	}

	.hd-tos-btn {
		gap: calc(9 * var(--p));
		min-height: max(calc(48 * var(--p)), 44px);
		padding: 0 calc(22 * var(--p));
		font-size: calc(14.5 * var(--p));
	}

	.hd-tos-askb small {
		font-size: calc(12 * var(--p));
	}

	.hd-tos-askl {
		flex-direction: column;
		gap: calc(4 * var(--p));
		padding-top: calc(12 * var(--p));
	}

	.hd-tos-askl li {
		gap: calc(10 * var(--p));
		padding: calc(4 * var(--p)) 0;
	}

	.hd-tos-ai {
		width: calc(42 * var(--p));
		height: calc(42 * var(--p));
		border-radius: calc(13 * var(--p));
	}

	.hd-tos-ai svg {
		width: calc(20 * var(--p));
		height: calc(20 * var(--p));
	}

	.hd-tos-askl small {
		font-size: calc(12 * var(--p));
	}

	.hd-tos-askl b,
	.hd-tos-askl b a {
		font-size: calc(15 * var(--p));
	}
}

/* === Printed: the terms alone, as an A4 document === */

/* The words in the margins (the title and the address of the page on top,
   from the second page on, and «صفحه ۲ از ۱۴» at the foot) are written in the
   page's language by template/page/tos.php, in a <style media="print">. */
@page {
	size: A4;
	margin: 18mm 17mm;

	@top-left {
		padding-bottom: 5mm;
		font-size: 8pt;
		color: #5A7088;
		vertical-align: bottom;
	}

	@top-right {
		padding-bottom: 5mm;
		font-size: 8pt;
		color: #5A7088;
		vertical-align: bottom;
	}

	@bottom-center {
		padding-top: 5mm;
		font-size: 8pt;
		color: #5A7088;
		vertical-align: top;
	}
}

@media print {
	/* Only the terms: not the site's menu and footer, nor the reader's
	   controls, the box for questions or the chapters' counts of clauses. */
	#nav,
	#footer,
	#alertBox,
	#app > svg,
	#hd-main > :not(.hd-tos),
	.hd-tos-search,
	.hd-tos-print,
	.hd-tos-idx,
	.hd-tos-strip,
	.hd-tos-pick,
	.hd-tos-pn,
	.hd-tos-ask,
	.hd-tos-cnt,
	.hd-tos-eye i,
	.hd-tos-no svg {
		display: none !important;
	}

	html,
	body,
	#app {
		background: #fff !important;
	}

	.hd-sec.hd-tos {
		margin: 0;
		padding: 0;
		color: #111;
	}

	.hd-tos .container {
		width: auto;
		max-width: none;
		margin: 0;
		padding: 0;
	}

	/* The head of the first page: the title, then the revision line, the
	   size and the address, then the clause the terms are accepted by. */
	.hd-tos-top {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0 0 7mm;
		padding: 0 0 5mm;
		border-bottom: 1.5pt solid #103F63;
	}

	.hd-tos-tt,
	.hd-tos-tools {
		display: contents;
	}

	.hd-tos-eye {
		order: 1;
		align-self: flex-start;
		display: block;
		padding: 0;
		background: none;
		box-shadow: none;
		font-size: 9pt;
		color: #24577D;
	}

	.hd-tos-title {
		order: 2;
		margin: 1mm 0 0;
		font-size: 22pt;
		line-height: 1.4;
		color: #0B2C46;
	}

	.hd-tos-title .hd-hl {
		background: none;
	}

	.hd-tos-meta {
		order: 3;
		gap: 1mm 7mm;
		margin: 2.5mm 0 0;
		padding: 0;
		font-size: 8.5pt;
		color: #333;
	}

	.hd-tos-meta svg {
		width: 9.5pt;
		height: 9.5pt;
		color: #24577D;
	}

	.hd-tos-meta .hd-tos-url {
		display: inline-flex;
	}

	.hd-tos-lead {
		order: 4;
		max-width: none;
		margin: 4mm 0 0;
		font-size: 10pt;
		line-height: 1.85;
		color: #222;
		text-align: justify;
	}

	/* The chapters, one after another. */
	.hd-tos-book {
		display: block;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	.hd-tos-panes {
		padding: 0;
	}

	.hd-sec.hd-tos .hd-tos-pane[hidden] {
		content-visibility: visible;
	}

	.hd-tos-pane.is-in {
		animation: none;
	}

	.hd-tos-pane + .hd-tos-pane {
		margin-top: 6mm;
	}

	/* A chapter's head stays with its first lines. */
	.hd-tos-ph {
		display: block;
		margin: 0 0 2mm;
		padding: 0 0 1.5mm;
		border-bottom: .75pt solid #A9BDCF;
		break-after: avoid;
		break-inside: avoid;
	}

	.hd-tos-kick {
		display: block;
		font-size: 8.5pt;
		color: #24577D;
	}

	.hd-tos-ph h2 {
		font-size: 13.5pt;
		line-height: 1.5;
		color: #0B2C46;
	}

	.hd-tos-cls {
		display: block;
	}

	/* A clause stays whole on one page, its number in the start margin. */
	.hd-tos-cls > li,
	.hd-tos .hd-tos-cls > li:target {
		display: block;
		padding: 0 0 1.5mm;
		padding-inline-start: 11mm;
		border-radius: 0;
		background: none;
		break-inside: avoid;
	}

	.hd-tos .hd-tos-cls > li:target::before {
		display: none;
	}

	.hd-tos-no {
		position: absolute;
		inset-inline-start: 0;
		top: 0;
		display: block;
		min-height: 0;
		margin: 0;
		padding: 0;
		font-size: 8.5pt;
		line-height: calc(10pt * 1.85);
		color: #24577D;
	}

	/* A clause longer than a page would split with three lines a side. */
	.hd-tos-cls p {
		max-width: none;
		font-size: 10pt;
		line-height: 1.85;
		color: #111;
		text-align: justify;
		orphans: 3;
		widows: 3;
	}

	/* Latin script needs less space between lines. */
	html:not([dir="rtl"]) .hd-tos-lead,
	html:not([dir="rtl"]) .hd-tos-cls p {
		line-height: 1.6;
	}

	html:not([dir="rtl"]) .hd-tos-no {
		line-height: calc(10pt * 1.6);
	}

	.hd-tos-ref {
		font-weight: inherit;
		color: inherit;
		text-decoration: none;
	}

	.hd-tos .highlight,
	.hd-tos .highlight.current {
		background: none;
	}
}
