/* Сброс и базовая типографика. Перенос app/assets/styles/reset.css + global.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

*:not(dialog) {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-heading);
  background-color: var(--white);
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.icon svg {
  width: 1em;
  height: 1em;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Контент статьи (Gutenberg) — стили из global.css                    */
/* ------------------------------------------------------------------ */

.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.content h1 {
  font-family: 'Druk Wide Cyr', sans-serif;
  color: var(--text-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 130%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 40px 0 16px;
}

.content h2 {
  color: var(--text-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 130%;
  letter-spacing: -0.02em;
  margin: 44px 0 16px;
}

.content h3 {
  color: var(--text-heading);
  font-size: 21px;
  font-weight: 600;
  line-height: 140%;
  margin: 32px 0 10px;
}

.content img {
  border-radius: var(--radius-box);
  overflow: hidden;
  width: 100%;
  height: auto;
  margin: 28px 0;
}

.content figure {
  margin: 28px 0;
}

.content figure img {
  margin: 0;
}

.content figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-caption);
  text-align: center;
}

.content p {
  color: var(--text-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.content ul,
.content ol {
  margin: 0 0 24px;
  padding-left: 24px;
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.72;
}

.content li {
  margin-bottom: 8px;
}

.content a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content a:hover {
  color: var(--accent-650);
}

.content blockquote {
  margin: 32px 0;
  padding: 24px;
  border-radius: var(--radius-box);
  border-left: 4px solid var(--brand-primary);
  background-color: var(--accent-50);
  color: var(--text-heading);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.content blockquote p:last-child {
  margin-bottom: 0;
}

.content strong {
  font-weight: 600;
  color: var(--text-heading);
}

.content code {
  font-family: 'Inter', sans-serif;
  background-color: var(--accent-100);
  color: var(--text-accent);
  padding: 2px 6px;
  border-radius: var(--radius-box);
  font-size: 0.95em;
}

.content pre {
  margin: 28px 0;
  padding: 20px 24px;
  border-radius: var(--radius-box);
  background-color: var(--accent-850);
  color: var(--white);
  overflow-x: auto;
  line-height: 1.6;
}

.content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: var(--radius-none);
  font-size: 15px;
}

.content--article h1:first-child,
.content--article p:first-child {
  margin-top: 0;
}

@media (max-width: 768px) {
  .content h2 {
    font-size: 24px;
    margin: 36px 0 12px;
  }

  .content h3 {
    font-size: 19px;
  }

  .content p,
  .content ul,
  .content ol {
    font-size: 17px;
  }
}
