/* ==========================================================================
   Valigard: article pages (guides, comparisons, templates)
   Shared by every page generated from _src/articles/*.md
   ========================================================================== */

.a-hero { padding: clamp(40px, 5vw, 80px) var(--hero-x) clamp(36px, 4vw, 64px); }
.a-hero__inner { max-width: 900px; }
.a-hero .h1 { font-size: clamp(36px, 4vw, 60px); line-height: 1.06; margin-bottom: 24px; }
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--text-2); }
.a-meta li { display: inline-flex; align-items: center; gap: 8px; }
.a-meta li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); margin-right: 10px; }
.a-meta .a-author { font-weight: 600; color: var(--navy); }
.a-meta .a-author span { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.a-meta .a-author svg { width: 16px; height: 16px; }

/* Layout: table of contents + article */
.a-layout { display: grid; grid-template-columns: 250px minmax(0, 760px); justify-content: space-between; gap: clamp(32px, 5vw, 96px); align-items: start; }
.a-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.a-toc p { margin: 0 0 14px; font-size: 12px; letter-spacing: .16em; font-weight: 600; color: var(--blue); }
.a-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.a-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.a-toc a:hover { color: var(--navy); }
.a-toc a.is-active { color: var(--navy); font-weight: 600; border-left-color: var(--navy); }
.a-toc__cta { margin-top: 28px; padding: 20px; border-radius: var(--r-md); background: var(--mist); }
.a-toc__cta b { display: block; margin-bottom: 6px; font-size: 16px; }
.a-toc__cta span { display: block; margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.a-toc__cta .btn { width: 100%; height: 44px; font-size: 15px; }
@media (max-width: 1000px) { .a-layout { grid-template-columns: minmax(0, 1fr); } .a-toc { position: static; } .a-toc__cta { display: none; } }

/* Direct answer */
.a-answer { margin: 0 0 44px; padding: 26px 30px; border-radius: var(--r-lg); background: var(--lime-soft); border: 1px solid #D9EFA6; }
.a-answer b { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: .16em; font-weight: 600; color: #3F5A0A; }
.a-answer p { margin: 0; font-size: 18.5px; line-height: 1.6; color: var(--navy); }

/* Body typography */
.a-body { font-size: 18px; line-height: 1.7; color: var(--text-2); overflow-wrap: anywhere; }
.a-body > *:first-child { margin-top: 0; }
.a-body h2 { margin: 56px 0 18px; font-size: clamp(26px, 2.3vw, 34px); line-height: 1.18; letter-spacing: -.02em; font-weight: 500; color: var(--navy); scroll-margin-top: 110px; }
.a-body h3 { margin: 34px 0 12px; font-size: 21px; line-height: 1.3; font-weight: 600; color: var(--navy); scroll-margin-top: 110px; }
.a-body p { margin: 0 0 18px; }
.a-body a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--sky); text-underline-offset: 3px; }
.a-body a:hover { color: var(--blue); }
.a-body strong { color: var(--navy); font-weight: 600; }
.a-body ul, .a-body ol { margin: 0 0 22px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.a-body ul li { position: relative; padding-left: 28px; }
.a-body ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.a-body ol { counter-reset: step; }
.a-body ol li { position: relative; padding-left: 46px; counter-increment: step; min-height: 32px; }
.a-body ol li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.a-body table { width: 100%; margin: 8px 0 28px; border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 1.5; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.a-body th, .a-body td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.a-body thead th { background: var(--app-bg); font-size: 14px; font-weight: 600; color: #62698E; }
.a-body tbody tr:last-child td { border-bottom: 0; }
.a-body td:first-child { font-weight: 600; color: var(--navy); }
.a-body blockquote { margin: 0 0 22px; padding: 4px 0 4px 22px; border-left: 3px solid var(--sky); color: var(--navy); font-size: 19px; }
.a-body hr { margin: 44px 0; border: 0; border-top: 1px solid var(--line); }
.a-body code { padding: 2px 6px; border-radius: 6px; background: var(--mist); font-size: .9em; color: var(--navy); }
@media (max-width: 640px) { .a-body { font-size: 17px; } .a-body table { display: block; overflow-x: auto; white-space: nowrap; } }

/* Callouts (Markdown admonitions: !!! note "Title") */
.a-body .admonition { margin: 0 0 26px; padding: 20px 24px; border-radius: var(--r-md); background: var(--ice); border: 1px solid #C8E6FA; font-size: 16.5px; }
.a-body .admonition-title { margin: 0 0 6px; font-weight: 600; color: var(--navy); }
.a-body .admonition p:last-child { margin-bottom: 0; }
.a-body .admonition.tip { background: var(--lime-soft); border-color: #D9EFA6; }
.a-body .admonition.warning { background: #FFF8EC; border-color: #F0DCB4; }
.a-body .admonition.warning .admonition-title { color: #8A5A00; }

/* Contextual product CTA */
.a-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; margin: 40px 0; padding: 28px 30px; border-radius: var(--r-lg); background: var(--navy); color: #fff; }
.a-cta b { display: block; margin-bottom: 6px; font-size: 20px; font-weight: 600; }
.a-cta span { font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.8); }
.a-cta .btn { height: 50px; }
@media (max-width: 640px) { .a-cta { grid-template-columns: 1fr; } .a-cta .btn { white-space: normal; height: auto; min-height: 50px; padding-top: 12px; padding-bottom: 12px; text-align: center; } }

/* App screen replica inside an article */
.a-figure { margin: 34px 0 36px; }
.a-figure__frame { position: relative; padding: 5%; border-radius: 24px; background: var(--grad-card-1); }
.a-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* FAQ + sources + review note */
.a-faq { margin-top: 56px; }
.a-faq h2 { margin: 0 0 22px; }
.a-faq .faq__item summary { padding: 22px 26px; font-size: 19px; }
.a-faq .faq__answer { padding: 0 26px 22px; font-size: 17px; }
.a-faq .faq__item + .faq__item { margin-top: 14px; }
.a-sources { margin-top: 48px; padding: 26px 28px; border-radius: var(--r-md); background: var(--mist); }
.a-sources h2 { margin: 0 0 12px !important; font-size: 18px !important; font-weight: 600 !important; letter-spacing: 0 !important; }
.a-sources ol { overflow-wrap: anywhere; margin: 0; padding-left: 20px; list-style: decimal; display: grid; gap: 6px; font-size: 15px; }
.a-sources ol li { padding: 0; min-height: 0; }
.a-sources ol li::before { display: none; }
.a-sources p { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* Related */
.a-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .a-related { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .a-related { grid-template-columns: 1fr; } }
.a-rel { display: flex; flex-direction: column; padding: 26px 26px 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); color: var(--navy); transition: transform .3s ease, box-shadow .3s ease; }
.a-rel:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); color: var(--navy); }
.a-rel .eyebrow { margin-bottom: 12px; }
.a-rel h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.28; font-weight: 500; }
.a-rel p { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.a-rel span { margin-top: auto; font-size: 14px; font-weight: 600; }
