/* ---------------------------------------------------------------------------
 * База: типографика, ссылки, кнопки, формы, служебные классы.
 * Опирается на токены --ms-* из style.css.
 * ------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ms-bg);
	color: var(--ms-ink);
	font-family: var(--ms-font);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

body.ms-modal-open {
	overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 .6em;
	color: var(--ms-ink);
	font-family: var(--ms-font-head);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -.01em;
}

h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 19px; }
h4 { font-size: 17px; }

p { margin: 0 0 1em; }

a {
	color: var(--ms-accent-text);
	text-decoration: none;
	transition: color .18s ease;
}

a:hover,
a:focus { color: var(--ms-accent-d); }

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

figure { margin: 0; }

ul,
ol {
	padding-left: 1.15em;
}

hr {
	margin: 26px 0;
	border: 0;
	border-top: 1px solid var(--ms-line);
}

code,
kbd,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 90%;
}

/* Служебное ---------------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 10px 16px;
	clip: auto;
	background: #fff;
	color: var(--ms-ink);
	border-radius: var(--ms-r-sm);
	box-shadow: var(--ms-sh-2);
}

.ms-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 10px 16px;
	background: #fff;
	border-radius: 0 0 var(--ms-r-sm) 0;
	box-shadow: var(--ms-sh-2);
}

.ms-skip-link:focus { left: 0; }

.ms-muted { color: var(--ms-ink-2); }
.ms-center { text-align: center; }

/* Кнопки ------------------------------------------------------------------ */
.ms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--ms-bg-2);
	color: var(--ms-ink);
	font: inherit;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.ms-btn:hover {
	transform: translateY(-1px);
	color: var(--ms-ink);
}

.ms-btn--primary {
	background: var(--ms-accent);
	color: var(--ms-accent-ink);
}

.ms-btn--primary:hover {
	background: var(--ms-accent-d);
	color: #fff;
}

.ms-btn--ghost {
	background: transparent;
	border-color: var(--ms-line-2);
}

.ms-btn--ghost:hover {
	border-color: var(--ms-accent);
	color: var(--ms-accent-text);
}

.ms-btn--lg {
	min-height: 52px;
	padding: 0 28px;
	font-size: 16px;
}

.ms-btn--block { width: 100%; }

.ms-btn:disabled,
.ms-btn[disabled] {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

/* Формы ------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--ms-line-2);
	border-radius: var(--ms-r-sm);
	background: #fff;
	color: var(--ms-ink);
	font: inherit;
	transition: border-color .18s ease, box-shadow .18s ease;
}

textarea {
	min-height: 110px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	outline: 0;
	border-color: var(--ms-accent);
	box-shadow: 0 0 0 4px rgba(40, 175, 177, .16);
}

label {
	display: inline-block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ms-ink-3);
}

input[type="checkbox"],
input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0 6px 0 0;
	accent-color: var(--ms-accent);
	vertical-align: -3px;
}

/* Таблицы ----------------------------------------------------------------- */
table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--ms-line);
	text-align: left;
}

th {
	font-weight: 600;
	color: var(--ms-ink-3);
}

/* Выравнивание картинок в контенте ---------------------------------------- */
.alignleft {
	float: left;
	margin: 0 20px 14px 0;
}

.alignright {
	float: right;
	margin: 0 0 14px 20px;
}

.aligncenter {
	display: block;
	margin: 0 auto 14px;
}

.wp-caption-text,
.wp-block-image figcaption {
	margin-top: 6px;
	color: var(--ms-ink-2);
	font-size: 13px;
}

@media (max-width: 767px) {
	body { font-size: 14.5px; }

	h1 { font-size: 24px; }
	h2 { font-size: 20px; }
	h3 { font-size: 17px; }
}
