/* aminasa.mn — blog: index hero + filter, featured post, article typography, sources, share, CTA */

/* ---------- index ---------- */
.blog-hero { text-align: center; padding-top: clamp(44px, 7vw, 84px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); box-shadow: 0 1px 2px rgba(10, 10, 11, .04);
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(30, 107, 255, .16); }
.blog-hero__title { margin: 22px auto 0; font-size: clamp(46px, 7.4vw, 88px); font-weight: 470; line-height: 1.02; letter-spacing: -.032em; text-wrap: balance; }
.blog-hero__title em, .cta-card__title em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.012em; }
.blog-hero__title em { display: block; }
.blog-hero__sub { max-width: 470px; margin: 20px auto 0; font-size: 15.5px; color: var(--muted); text-wrap: pretty; }

.filter { display: none; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 720px; margin: 34px auto 0; }
.js .filter { display: flex; }
.filter__chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: #f3f3f5; box-shadow: inset 0 0 0 1px #e7e7eb; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.filter__chip:hover { background: #ebebef; }
.filter__chip:active { transform: scale(.97); }
.filter__chip.is-active { background: var(--ink); color: #fff; box-shadow: none; }
.filter__count { font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter__chip.is-active .filter__count { color: rgba(255, 255, 255, .7); }

.featured { margin-top: clamp(40px, 6vw, 64px); }
.featured[hidden] { display: none; }
.featured__link {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); overflow: hidden;
  border-radius: var(--r-card); background: var(--canvas); transition: box-shadow .3s var(--ease);
}
.featured__link:hover { box-shadow: 0 24px 48px -32px rgba(10, 10, 11, .35); }
.featured__media { display: block; min-height: 100%; aspect-ratio: 16 / 9; }
.featured__media img { width: 100%; height: 100%; object-fit: cover; }
.featured__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.featured__meta { display: flex; align-items: center; gap: 10px; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 600; }
.featured__title { margin-top: 14px; font-size: clamp(26px, 3vw, 38px); font-weight: 470; line-height: 1.1; letter-spacing: -.026em; text-wrap: balance; }
.featured__excerpt { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.featured .card__foot { margin-top: 16px; padding-top: 0; }
.featured__more {
  display: inline-flex; align-items: center; gap: 8px; width: max-content; height: 40px; margin-top: 24px; padding: 0 16px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500; transition: background-color .25s;
}
.featured__link:hover .featured__more { background: var(--blue); }
@media (max-width: 979px) { .featured__link { grid-template-columns: 1fr; } }

.posts { margin-top: clamp(48px, 7vw, 80px); }
.posts__rss { display: flex; justify-content: center; margin-top: 44px; font-size: 13px; }
.posts__rss a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.posts__rss a:hover { color: var(--ink); }

/* ---------- post header ---------- */
.post-head { width: min(100% - 2 * var(--gutter), 780px); margin: 0 auto; padding-top: clamp(36px, 6vw, 72px); text-align: center; }
.crumbs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted-2); }
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--ink); }
.crumbs a:last-child { color: var(--blue-deep); font-weight: 500; }
.post-title { margin-top: 18px; font-size: clamp(34px, 5.4vw, 60px); font-weight: 470; line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; overflow-wrap: break-word; }
.post-lede { max-width: 620px; margin: 18px auto 0; font-size: clamp(16px, 1.7vw, 18.5px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.post-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin-top: 22px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-meta__by { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 500; }
.post-meta__by img { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(10, 10, 11, .06); }
.post-cover { width: min(100% - 2 * var(--gutter), 960px); margin: clamp(30px, 5vw, 48px) auto 0; }
.post-cover picture, .post-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-card); background: var(--canvas); object-fit: cover; }
@media (max-width: 639px) { .post-cover picture, .post-cover img { border-radius: 20px; } }

/* ---------- post body ---------- */
.post-body { width: min(100% - 2 * var(--gutter), 680px); margin: clamp(36px, 5vw, 60px) auto 0; }
.toc { margin-bottom: 36px; padding: 18px 20px 20px; border-radius: 18px; background: var(--canvas); }
.toc__title { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { display: grid; gap: 7px; margin-top: 12px; counter-reset: toc; }
.toc li { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; counter-increment: toc; }
.toc li::before { content: counter(toc, decimal-leading-zero); flex: none; padding-top: 2px; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.toc a { color: var(--ink-2); transition: color .2s; }
.toc a:hover, .toc a.is-active { color: var(--blue-deep); }
@media (min-width: 1200px) {
  .post-body { display: grid; grid-template-columns: 200px minmax(0, 680px) 200px; justify-content: center; column-gap: 48px; width: min(100% - 2 * var(--gutter), 1160px); }
  .post-body > * { grid-column: 2; }
  .post-body > .toc { position: sticky; top: 92px; grid-column: 1; grid-row: 1 / span 4; align-self: start; margin: 0; padding: 0; background: none; }
  .toc li { font-size: 13.5px; }
}

.prose { font-size: 17px; line-height: 1.72; color: var(--ink-2); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.1em; font-size: clamp(23px, 2.6vw, 29px); font-weight: 500; line-height: 1.2; letter-spacing: -.022em; color: var(--ink); text-wrap: balance; scroll-margin-top: 84px; }
.prose h3 { margin-top: 1.7em; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.012em; color: var(--ink); scroll-margin-top: 84px; }
.prose h2 + *, .prose h3 + * { margin-top: .55em; }
.prose a { color: var(--blue-deep); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(30, 107, 255, .4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { display: grid; gap: .45em; padding-left: 1.35em; }
.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.prose ul li { position: relative; }
.prose ul li::before { content: ""; position: absolute; left: -1.05em; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.prose blockquote { margin: 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--ink); color: var(--ink); }
.prose blockquote > * + * { margin-top: .6em; }
.cite { margin-left: 1px; font-size: .66em; line-height: 0; }
.cite a, .prose .cite a { padding: 0 2px; color: var(--blue); font-weight: 600; text-decoration: none; }
.cite a:hover { text-decoration: underline; }
.cite + .cite { margin-left: 0; }
.cite + .cite::before { content: ","; color: var(--blue); font-weight: 600; }
@media (max-width: 639px) { .prose { font-size: 16.5px; line-height: 1.7; } }

.takeaways { margin: 1.9em 0 2.1em; padding: 20px 22px 22px; border-radius: 20px; background: var(--blue-tint); color: var(--ink); }
.takeaways__title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-deep); }
.takeaways__title::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.takeaways ul { gap: 10px; margin-top: 12px; padding-left: 0; font-size: 15.5px; line-height: 1.5; }
.takeaways ul li { padding-left: 30px; }
.takeaways ul li::before {
  left: 0; top: .1em; width: 20px; height: 20px; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.takeaways > :first-child + * { margin-top: 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--canvas); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

.sources { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sources ol { display: grid; gap: 10px; margin-top: 14px; counter-reset: src; }
.sources li { position: relative; padding: 2px 6px 2px 28px; border-radius: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); counter-increment: src; overflow-wrap: anywhere; transition: background-color .4s; }
.sources li::before { content: counter(src) "."; position: absolute; left: 4px; top: 2px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.sources li:target { background: var(--blue-tint); }
.sources a { color: var(--blue-deep); text-decoration: underline; text-decoration-color: rgba(30, 107, 255, .35); text-underline-offset: 3px; }
.sources a:hover { text-decoration-color: currentColor; }

.disclaimer { display: flex; gap: 10px; margin-top: 28px; padding: 14px 16px; border-radius: 14px; background: var(--canvas); font-size: 13px; line-height: 1.5; color: var(--muted); }
.disclaimer .i { margin-top: 1px; color: var(--ink-2); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.share__label { margin-right: 4px; font-size: 13px; font-weight: 600; }
.share__btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: #f3f3f5; box-shadow: inset 0 0 0 1px #e7e7eb; font-size: 13px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: background-color .2s, color .2s;
}
.share__btn:hover { background: #ebebef; color: var(--ink); }
.share__btn[hidden] { display: none; }
.share__btn.is-done { background: var(--ink); color: #fff; box-shadow: none; }
.share__btn .i { width: 15px; height: 15px; }

/* ---------- CTA card (light canvas + the hero's peeking-mascot App Store pill) ---------- */
.cta-card { margin-top: clamp(64px, 9vw, 104px); padding: clamp(48px, 7vw, 76px) 20px clamp(44px, 6vw, 64px); border-radius: var(--r-card); background: var(--canvas); text-align: center; }
.cta-card__title { font-size: clamp(34px, 5.2vw, 60px); font-weight: 470; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.cta-card__sub { max-width: 440px; margin: 16px auto 0; font-size: 15px; color: var(--muted); text-wrap: pretty; }
.cta-card .cta { margin-top: 64px; }

/* ---------- prev / next + related ---------- */
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: clamp(40px, 6vw, 64px); }
.post-nav__link { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 20px; transition: border-color .2s, box-shadow .25s; }
.post-nav__link:hover { border-color: #d9d9de; box-shadow: 0 10px 30px -18px rgba(10, 10, 11, .25); }
.post-nav__link small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.post-nav__link span { font-size: 16px; font-weight: 500; line-height: 1.3; letter-spacing: -.012em; text-wrap: balance; }
.post-nav__link--newer { grid-column: 2; align-items: flex-end; text-align: right; }
@media (max-width: 639px) { .post-nav { grid-template-columns: 1fr; } .post-nav__link--newer { grid-column: auto; } }

.related { margin-top: clamp(64px, 9vw, 104px); }
.related__title { margin-bottom: 28px; font-size: clamp(26px, 3.2vw, 36px); font-weight: 470; line-height: 1.1; letter-spacing: -.028em; }
