/* основа */

html,
body,
div,
span,
applet,
object,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block;
}

img {
  border: none;
  max-width: 100%;
  height: auto;
  width: auto;

  @media (width < 980px) {
    display: inline-block;
  }
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-dark);
}

table {
  border-collapse: collapse;
  border-spacing: 0px;
}

.color-red {
  color: var(--color-accent);
}

body {
  font-family: var(--font-main);
  min-height: 100%;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.4;
  background: var(--color-grey-extra-light);

  @media (width >= 980px) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
    box-shadow: 0 0 3px 0 rgb(214, 214, 214);
  }

  @media (width = 1920px) {
    overflow-x: hidden;
  }

  @media (width < 980px) {
    -webkit-text-size-adjust: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    height: 100%;
  }
}

h1, h2, h3, h4, h5, h6, .h3, .h2 {
  font-weight: 700;
  clear: both;
}

h1, .h1 {
  font-size: 30px;
  margin: 0 0 30px;

  @media (width < 980px) {
    font-size: 26px;
    line-height: 1.2;
  }
}

.h1 {
  margin-top: 40px;
}

h2, .h2 {
  font-size: 22px;
  margin: 35px 0 25px;
  line-height: 1.2;

  @media (width < 980px) {
    font-size: 24px;
    margin: 35px 0 20px;
  }
}

h3 {
  font-size: 19px;
  margin: 15px 0 20px;
}

:root .page-header {
  padding: 0;
  border-bottom: 2px solid #e7e7e7;
  margin: 0 0 30px;
}

:root .page-header h1 {
  margin: 0 0 10px;
}

p {
  line-height: 1.4em;
  margin: 0 0 20px 0;
  font-size: 18px;
}

.clean {
  clear: both;
}

#component ul, #component ol {
  margin: 0 0 30px 30px;
}

#component li {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.img-right, .img-right2 {
  float: right;
  margin-left: 20px;
  margin-bottom: 20px;

  @media (width < 980px) {
    max-width: 35%;
    margin: 0 0 20px 10px;
  }
}

.m-t-0 {
  margin-top: 0;

  /* как в старом каскаде: у p.h2.m-t-0 (статья 38) на узком экране побеждал h2, .h2 из 320.css */
  @media (width < 980px) {
    margin-top: 35px;
  }
}

.display-none {
  display: none !important;
}

html {
  @media (width >= 980px) {
    background: var(--color-white);
  }
}

:root table {
  @media (width < 980px) {
    display: block;
    overflow: scroll;
    margin: 30px 0 40px;
    padding: 0;
    font-size: 16px;
    max-width: initial;
  }

  @media (width <= 510px) {
    margin: 30px -16px 40px;
    width: calc(100% + 32px);
  }
}

tbody {
  @media (width < 980px) {
    display: table;
    width: 100%;
    box-sizing: border-box;
  }
}

h3, .h3 {
  @media (width < 980px) {
    font-size: 20px;
    margin: 30px 0 20px;
  }
}

.img-right2 {
  @media (width <= 510px) {
    max-width: 100%;
    float: none;
    margin: 0 auto 20px;
  }
}

.article-body p > img:first-child {
  @media (width <= 510px) {
    margin: 0 -16px;
    max-width: calc(100% + 32px);
  }
}

/* видимость по ширине */

.visible-m, .visible-h, .visible-v, .hidden-d {
  @media (width >= 980px) {
    display: none !important;
  }
}

.visible-d, .visible-v, .hidden-h {
  @media (width < 980px) {
    display: none !important;
  }
}

.visible-v, .hidden-h {
  @media (width <= 510px) {
    display: block !important;
  }
}

.visible-d, .visible-h, .hidden-v {
  @media (width <= 510px) {
    display: none !important;
  }
}
