/* Article pages for apt0.ru — Tilda-compatible reading layout */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
}

.apt-back,
a.apt-home {
  display: block;
  max-width: 760px;
  margin: 28px auto 0;
  padding: 0 24px;
  color: #dd1144;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.apt-back:hover,
a.apt-home:hover {
  text-decoration: underline;
}

.apt-disclaimer {
  max-width: 760px;
  margin: 12px auto 28px;
  padding: 0 24px;
  font-size: 15px;
  line-height: 1.45;
  color: #333333;
}

.apt-article .apt-disclaimer {
  max-width: none;
  margin: 12px 0 28px;
  padding: 0;
}

/* Centered reading column ~760px */
.apt-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.apt-kicker {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666666;
}

.apt-article h1 {
  margin: 0 0 24px;
  font-size: 42px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #000000;
}

.apt-lead {
  margin: 0 0 40px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  color: #222222;
}

.apt-uptitle {
  margin: 48px 0 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888888;
}

.apt-article h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  color: #000000;
}

.apt-article p {
  margin: 0 0 1.25em;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
  color: #000000;
}

.apt-article ul,
.apt-article ol {
  margin: 0 0 1.25em;
  padding-left: 1.35em;
  font-size: 18px;
  line-height: 1.55;
}

.apt-article li {
  margin-bottom: 0.4em;
}

.apt-article a {
  color: #dd1144;
  text-decoration: none;
}

.apt-article a:hover {
  text-decoration: underline;
}

/*
 * Code block — mirrors homepage t264 highlight block:
 * light #f8f8f8 wrapper, padding, monospace, hljs from highlight.min.css
 */
.apt-code {
  margin: 28px 0 36px;
  padding: 20px;
  background: #f8f8f8;
  border: 0 solid #f8f8f8;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.45;
}

.apt-code pre {
  margin: 0;
  padding: 0;
  background: transparent;
  overflow-x: auto;
}

.apt-code pre code,
.apt-code code {
  display: block;
  font-family: Consolas, Menlo, Monaco, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #333333;
  background: transparent;
  white-space: pre;
}

.apt-code .hljs {
  background: #f8f8f8;
  color: #333333;
  padding: 0;
}

/* «Оригинал статьи» — pill button, site accent */
p.apt-source {
  margin: 48px 0 0;
  padding: 0;
}

a.apt-source,
p.apt-source a {
  display: inline-block;
  margin: 0;
  padding: 12px 28px;
  border: 2px solid #dd1144;
  border-radius: 30px;
  background: #dd1144;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

a.apt-source:hover,
p.apt-source a:hover {
  background: #000000;
  border-color: #000000;
  color: #ffffff !important;
  text-decoration: none !important;
}

@media screen and (max-width: 640px) {
  .apt-back,
  a.apt-home,
  .apt-disclaimer {
    margin-top: 20px;
    padding: 0 16px;
  }

  .apt-article .apt-disclaimer {
    margin-top: 12px;
    padding: 0;
  }

  .apt-article {
    padding: 32px 16px 64px;
  }

  .apt-article h1 {
    font-size: 28px;
  }

  .apt-lead {
    font-size: 18px;
    margin-bottom: 32px;
  }

  .apt-article h2 {
    font-size: 22px;
  }

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

  .apt-code {
    padding: 14px;
    font-size: 12px;
  }
}
