/* ALIFSEC Blog — article page */
.article-head {
  padding: 40px 44px; margin: 0 0 28px; display: flex; flex-direction: column; gap: 16px;
  background: radial-gradient(ellipse at 100% 0%, rgba(22, 119, 255, .16), transparent 55%), var(--card);
}
.article-head h1 { margin: 0; max-width: 900px; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--text-strong); }
.article-head .standfirst { margin: 0; max-width: 820px; font-size: 19px; line-height: 1.6; color: #a9bbcd; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13px; color: var(--muted-2); }
.byline img { width: 28px; height: 28px; border-radius: 7px; }
.byline strong { color: var(--text); font-weight: 600; }
.article-cover { position: relative; height: 340px; margin-top: 8px; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.article-card { padding: 40px 44px; min-width: 0; }
.article-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
  .toc-card { display: none; }
}
@media (max-width: 640px) {
  .article-head, .article-card { padding: 26px 20px; }
  .article-cover { height: 200px; }
}

/* table of contents */
.toc-card { padding: 20px 18px; }
.toc { display: flex; flex-direction: column; margin-top: 10px; }
.toc a { display: block; padding: 6px 0 6px 12px; font-size: 13px; line-height: 1.4; color: var(--muted); border-left: 2px solid var(--line); }
.toc a.sub { padding-left: 26px; }
.toc a:hover { color: var(--text-strong); }
.toc a.active { color: var(--cyan); border-left-color: var(--cyan); }

/* prose */
.prose { font-size: 17px; line-height: 1.8; color: var(--text-soft); max-width: 760px; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 20px; }
.prose h2 { margin: 44px 0 14px; font-size: 28px; line-height: 1.25; font-weight: 800; color: var(--text-strong); letter-spacing: -.01em; }
.prose h3 { margin: 30px 0 10px; font-size: 20px; line-height: 1.35; font-weight: 700; color: #f1f5f9; }
.prose h4 { margin: 24px 0 8px; font-size: 17px; color: #f1f5f9; }
.prose strong { color: #f1f5f9; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(124, 196, 255, .4); }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose code {
  font-family: var(--mono); font-size: .82em;
  background: #0d1b2b; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--link);
}
.prose blockquote {
  margin: 0 0 24px; padding: 18px 22px;
  border: 1px solid var(--line-hover); border-radius: 12px;
  background: linear-gradient(180deg, rgba(22, 119, 255, .10), rgba(22, 119, 255, .03));
  color: #d9e6f3;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* code blocks — the header bar (language + copy) is added by article.js */
.code-block { margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #03080e; }
.code-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); background: #07101a; }
.code-lang { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.copy-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px var(--font); color: var(--text-soft); background: transparent;
  border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 10px; cursor: pointer; min-height: 30px;
}
.copy-btn:hover { border-color: var(--line-hover); color: var(--text-strong); }
.prose pre { margin: 0 0 24px; padding: 18px 20px; overflow-x: auto; background: #03080e; border: 1px solid var(--line); border-radius: 12px; }
.code-block pre { margin: 0; border: 0; border-radius: 0; }
.prose pre code { background: none; border: 0; padding: 0; color: var(--code-green); font-size: 13.5px; line-height: 1.75; white-space: pre; }

/* images from the block editor */
.prose figure { margin: 0 0 28px; }
.prose figure img, .prose > img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.prose figcaption { margin-top: 10px; font-size: 13px; color: var(--muted-2); text-align: center; }

/* tables */
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--card-2); color: var(--text-strong); }

.article-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid #122033; display: flex; flex-direction: column; gap: 20px; }
.prev-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prev-next a { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--text-strong); font-weight: 700; line-height: 1.35; }
.prev-next a:hover { border-color: var(--line-hover); }
.prev-next .label { display: block; font-size: 12px; font-weight: 500; color: var(--muted-2); margin-bottom: 6px; }
.prev-next .next { text-align: right; }
@media (max-width: 640px) { .prev-next { grid-template-columns: 1fr; } .prev-next .next { text-align: left; } }
