.article-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(24px + var(--safe-bottom));
  background: #f5f8fb;
}

.article-toolbar {
  position: sticky;
  z-index: 40;
  top: 0;
  min-height: calc(64px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 14px 8px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0759a9 0%, #1289d4 72%, #44b9eb 100%);
  box-shadow: 0 3px 14px rgba(10, 87, 154, 0.16);
}

.article-toolbar-minimal {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.article-back,
.article-home {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.article-back {
  font-size: 32px;
  line-height: 1;
}

.article-home {
  font-size: 12px;
  font-weight: 600;
}

.article-toolbar-minimal .article-home {
  justify-self: end;
  grid-column: 2;
}

.article-back:active,
.article-home:active {
  background: rgba(255, 255, 255, 0.14);
}

.reading-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.reading-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #fff;
  transition: transform 80ms linear;
}

.article-document {
  padding: 24px 20px 34px;
  background: #fff;
}

.article-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 13px;
  color: #0b6dbd;
  font-size: 13px;
  font-weight: 600;
}

.article-label::before {
  content: "";
  width: 4px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  background: #1688d1;
}

.article-title {
  margin: 0;
  color: #142638;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.42;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.article-summary {
  margin: 14px 0 0;
  padding-left: 12px;
  color: #5b6d7f;
  font-size: 14px;
  line-height: 1.7;
  border-left: 2px solid #cfe6f7;
}

.article-meta {
  margin-top: 16px;
  padding-bottom: 19px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  color: #8492a2;
  font-size: 12px;
  border-bottom: 1px solid #edf1f5;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
}

.article-meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 8px;
  border-radius: 50%;
  background: #aac2d4;
}

.article-cover {
  margin: 22px 0 0;
}

.article-cover img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 6px;
}

.article-body {
  padding-top: 23px;
  color: #27394a;
  font-size: 16px;
  line-height: 1.9;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.article-body > :first-child {
  margin-top: 0 !important;
}

.article-body > :last-child {
  margin-bottom: 0 !important;
}

.article-body p {
  margin: 0 0 1.25em;
  text-align: justify;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 1.7em 0 0.65em;
  color: #142638;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
}

.article-body h1 { font-size: 22px; }
.article-body h2 { font-size: 20px; }
.article-body h3 { font-size: 18px; }
.article-body h4 { font-size: 17px; }

.article-body ul,
.article-body ol {
  margin: 0 0 1.25em;
  padding-left: 1.5em;
}

.article-body li {
  margin: 0.45em 0;
}

.article-body blockquote {
  margin: 1.25em 0;
  padding: 12px 14px;
  color: #526779;
  background: #f3f8fc;
  border-left: 3px solid #56aee1;
}

.article-body a {
  color: #0876c4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 20px auto;
  border-radius: 6px;
}

.article-body table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

.article-body th,
.article-body td {
  min-width: 88px;
  padding: 9px 10px;
  border: 1px solid #d7e0e8;
  text-align: left;
}

.article-body th {
  background: #f3f8fc;
  font-weight: 600;
}

.article-body pre {
  margin: 18px 0;
  padding: 14px;
  overflow-x: auto;
  color: #25384a;
  font-size: 13px;
  line-height: 1.65;
  background: #f3f6f8;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.article-body hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px solid #e5ebf0;
}

.article-empty {
  padding: 28px 16px;
  color: #8492a2;
  text-align: center;
  background: #f7fafc;
  border-radius: 6px;
}

@media (max-width: 360px) {
  .article-document {
    padding-right: 17px;
    padding-left: 17px;
  }

  .article-title {
    font-size: 22px;
  }

  .article-body {
    font-size: 15px;
    line-height: 1.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress i {
    transition: none;
  }
}
