/* Articles (0.5.15, owner 2026-11-12): one design for every guide, so article HTML carries classes only — no <style>
   blocks or inline styles in post content. Components: lead answer, key points, notes, figures, tables, steps,
   pros/cons, FAQ, call to action, sources, author box. Loaded on single posts only. Tokens from base.css. */

.tk-article { --art-accent: var(--primary); --art-ink: #1b2845; --art-tint: #f3f6fb; }
.tk-article .tk-title { font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2rem); line-height: 1.6; color: var(--art-ink); margin-block-end: 8px; }
.tk-prose.tk-article { max-inline-size: 820px; margin-inline: auto; }
.tk-article p, .tk-article li { font-size: 1.0625rem; line-height: 2; }
.tk-article p { margin: 0 0 1em; }
.tk-article .tk-toc a, .tk-article .tk-crumbs a, .tk-article .tk-postmeta a { text-decoration: none; font-weight: 400; }
.tk-article .tk-toc a { color: var(--foreground); }
.tk-article a:not(.tk-btn):not(.tk-toc a):not(.tk-crumbs a):not(.tk-postmeta a) { color: #1258b8; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tk-article a:hover { color: var(--primary-hover); }

/* Headings: the red bar marks each section start; H3 stays plain and dark. */
.tk-article h2 { position: relative; color: var(--art-ink); padding-inline-start: 14px; margin-block: 2.2em .8em; }
.tk-article h2::before { content: ""; position: absolute; inset-inline-start: 0; inset-block: .35em; inline-size: 4px; border-radius: 4px; background: var(--art-accent); }
.tk-article h3 { color: var(--art-ink); margin-block: 1.6em .5em; }

/* Hero (featured image) */
.tk-hero { margin: 4px 0 20px; }
/* Featured images are 1200x900 (4:3) from 2026-11-12: tall enough on a phone. No forced ratio: older posts keep theirs
   uncropped, and the width/height attributes still reserve the space (no layout shift). */
.tk-hero img { display: block; inline-size: 100%; block-size: auto; border-radius: var(--shape-surface); margin: 0; background: var(--muted); }

/* Lead answer: the short, direct answer under the H1 (answer-first for readers and AI search). */
.tk-lead { background: var(--art-tint); border: 1px solid #dfe6f2; border-radius: var(--shape-surface); padding: 16px 20px; margin: 0 0 20px; }
.tk-lead > :last-child { margin-block-end: 0; }
.tk-lead strong:first-child { color: var(--art-ink); }

/* Key points */
.tk-keypoints { border: 1px solid var(--border); border-radius: var(--shape-surface); padding: 14px 20px 6px; margin: 20px 0; background: var(--card); box-shadow: var(--depth-surface); }
.tk-keypoints > p:first-child { font-weight: 800; color: var(--art-ink); margin-block-end: 6px; }
.tk-keypoints ul { margin: 0 0 8px; padding-inline-start: 20px; }
.tk-keypoints li::marker { color: var(--art-accent); }

/* Notes */
.tk-note { border-radius: var(--shape-surface); padding: 12px 18px; margin: 20px 0; background: var(--art-tint); border-inline-start: 4px solid #1258b8; }
.tk-note--warn { background: var(--warning-subtle); border-inline-start-color: #c77700; }
.tk-note--ok { background: var(--success-subtle); border-inline-start-color: #1e7a3c; }
.tk-note > :last-child { margin-block-end: 0; }
.tk-note > p:first-child strong:first-child { color: var(--art-ink); }

/* Figures (designed images and real photos) */
.tk-article figure { margin: 24px 0; }
.tk-article figure img { display: block; inline-size: 100%; block-size: auto; border-radius: var(--shape-surface); margin: 0; background: var(--muted); }
.tk-article figcaption { font-size: var(--text-sm); color: var(--muted-foreground); line-height: 1.9; margin-block-start: 8px; text-align: center; }

/* Tables: scroll sideways on phones instead of squeezing */
.tk-article .tk-table { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--shape-surface); -webkit-overflow-scrolling: touch; }
.tk-article .tk-table table { display: table; inline-size: 100%; min-inline-size: 560px; margin: 0; border: 0; font-size: .95rem; }
.tk-article .tk-table th { background: var(--art-ink); color: #fff; font-weight: 700; border: 0; padding: 10px 12px; white-space: nowrap; }
.tk-article .tk-table td { border: 0; border-block-start: 1px solid var(--border); padding: 10px 12px; vertical-align: top; line-height: 1.8; }
.tk-article .tk-table tr:nth-child(even) td { background: #fafafa; }

/* Steps: numbered sections as cards */
.tk-steps { counter-reset: tkstep; display: grid; gap: 12px; margin: 20px 0; }
.tk-step { counter-increment: tkstep; position: relative; border: 1px solid var(--border); border-radius: var(--shape-surface); padding: 14px 18px 4px; padding-inline-start: 64px; background: var(--card); }
.tk-step::before { content: counter(tkstep, persian); position: absolute; inset-inline-start: 16px; inset-block-start: 14px; inline-size: 34px; block-size: 34px; border-radius: 50%; background: var(--art-ink); color: #fff; font-weight: 800; display: grid; place-items: center; }
.tk-step h3 { margin: 2px 0 6px; font-size: var(--text-lg); }

/* Pros / cons */
.tk-proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 20px 0; }
.tk-proscons > div { border-radius: var(--shape-surface); padding: 12px 18px 4px; }
.tk-proscons > div:first-child { background: var(--success-subtle); }
.tk-proscons > div:last-child { background: var(--primary-subtle); }
.tk-proscons p:first-child { font-weight: 800; margin-block-end: 4px; }
.tk-proscons ul { padding-inline-start: 20px; margin: 0 0 8px; }

/* FAQ: details accordions; the questions stay in the HTML for search engines */
.tk-faq { margin: 16px 0; display: grid; gap: 8px; }
.tk-faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--shape-surface); padding: 0; box-shadow: none; margin: 0; }
.tk-faq summary { list-style: none; padding: 14px 18px; padding-inline-end: 44px; position: relative; font-weight: 700; color: var(--art-ink); line-height: 1.8; }
.tk-faq summary::-webkit-details-marker { display: none; }
.tk-faq summary::after { content: "+"; position: absolute; inset-inline-end: 18px; inset-block-start: 12px; font-size: 1.4rem; color: var(--art-accent); }
.tk-faq details[open] summary::after { content: "−"; }
.tk-faq details > :not(summary) { padding-inline: 18px; }
.tk-faq h3 { display: inline; font-size: var(--text-base); margin: 0; color: inherit; }

/* Call to action */
.tk-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between; background: var(--art-ink); color: #fff; border-radius: var(--shape-surface); padding: 18px 22px; margin: 28px 0; }
.tk-cta p { margin: 0; color: #fff; flex: 1 1 260px; }
.tk-cta .tk-btn { flex: 0 0 auto; text-decoration: none; }

/* Sources */
.tk-sources { font-size: var(--text-sm); background: var(--muted); border-radius: var(--shape-surface); padding: 14px 20px; margin: 24px 0; }
.tk-sources ol { margin: 0; padding-inline-start: 20px; }
.tk-sources li { font-size: var(--text-sm); line-height: 1.9; margin-block: 4px; }
.tk-sources a { word-break: break-word; direction: ltr; unicode-bidi: isolate; }
.tk-article ol { list-style-type: persian; }

/* Author box (theme) */
.tk-authorbox { display: flex; gap: 14px; align-items: flex-start; border-block: 1px solid var(--border); padding: 16px 0; margin: 28px 0 8px; }
.tk-authorbox__mark { inline-size: 52px; block-size: 52px; flex: 0 0 52px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.4rem; display: grid; place-items: center; }
.tk-authorbox p { margin: 0; font-size: var(--text-sm); line-height: 1.9; }
.tk-authorbox strong { color: var(--art-ink); font-size: var(--text-base); }

/* TOC sits after the lead answer; two columns on wide screens */
.tk-article .tk-toc { margin-block: 20px 8px; }
@media (min-width: 760px) {
	.tk-article .tk-toc ol { columns: 2; column-gap: 32px; }
	.tk-article .tk-toc li { break-inside: avoid; }
}
@media (max-width: 599px) {
	.tk-article p, .tk-article li { font-size: 1rem; }
	.tk-lead, .tk-keypoints, .tk-note, .tk-sources { padding-inline: 14px; }
	.tk-step { padding-inline-start: 56px; }
	.tk-step::before { inset-inline-start: 12px; }
	.tk-cta { padding: 16px; }
	.tk-cta .tk-btn { inline-size: 100%; text-align: center; }
}
.tk-proscons > div > p:first-child { font-size: var(--text-lg); color: var(--art-ink); }
