/*
Theme Name: hi1
Theme URI: https://hi1.ir/blog/
Author: hi1
Author URI: https://hi1.ir/
Description: The hi1 blog theme — the hi1 brand (lapis, turquoise, saffron; security-print details), fast, RTL-first, with an SEO skeleton built in: one JSON-LD graph per page, breadcrumbs, contents list, clean titles and robots rules. Extensible through template parts, actions and block patterns.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 8.1
License: Proprietary
Text Domain: hi1
*/

/* ================================================================ fonts — served by hi1 itself */
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(/fonts/Vazirmatn-ExtraBold.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: Gandom; src: url(/fonts/Gandom.woff2) format('woff2'); font-weight: 400; font-display: swap; }

/* ================================================================ tokens */
:root {
    --lapis-900: #0A1832; --lapis-800: #0F2450; --lapis-700: #14306B; --lapis-600: #1B3B7A; --lapis-200: #A9BCE0; --lapis-50: #EEF2FA;
    --turq-700: #0B6B62; --turq-600: #10897E; --turq-500: #21C0B0; --turq-300: #6FDCD0; --turq-50: #E9F8F6;
    --saffron-700: #9C6212; --saffron-500: #F2A93B; --saffron-50: #FDF4E4;
    --rose-600: #B2354C; --rose-50: #FBECEF;

    --bg: #F4F7FB; --surface: #FFFFFF; --surface-2: #F1F5FA; --line: #DAE2EE; --line-2: #C3D0E2;
    --text: #0C1424; --text-2: #3B4A63; --text-3: #6B7C97;
    --accent: var(--turq-600); --accent-ink: #FFFFFF; --link: var(--turq-700);
    --deep: var(--lapis-800);

    --r-sm: 8px; --r: 14px; --r-lg: 22px; --r-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(12, 20, 36, .06);
    --shadow: 0 2px 6px rgba(12, 20, 36, .05), 0 18px 40px -26px rgba(12, 20, 36, .45);
    --gut: clamp(16px, 4vw, 32px);
    --page: 1200px; --narrow: 760px; --head-h: 64px;
    --font: Vazirmatn, Tahoma, system-ui, sans-serif;
    --display: Gandom, Vazirmatn, Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #070B12; --surface: #0F1621; --surface-2: #141D2B; --line: #1E2A3B; --line-2: #2C3D54;
        --text: #E8EEF8; --text-2: #B3C1D6; --text-3: #7E8FA8;
        --accent: var(--turq-500); --accent-ink: #04211E; --link: var(--turq-300);
        --lapis-50: #101B33; --turq-50: #0C2523; --saffron-50: #2A2013; --rose-50: #2A1218;
        --shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 18px 40px -26px #000;
    }
}

/* ================================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body { margin: 0; direction: rtl; background: var(--bg); color: var(--text); font: 400 16px/1.9 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.45; font-weight: 800; text-wrap: balance; }
p { margin: 0 0 1em; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: calc(var(--narrow) + 2 * var(--gut)); }
.i { flex: none; }

/* security-print hairline */
.microline { height: 3px; opacity: .55; background-image: repeating-linear-gradient(-45deg, var(--turq-300) 0 1px, transparent 1px 5px); }

/* ================================================================ buttons, chips, meta */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 700; font-size: 15px; line-height: 1.5; cursor: pointer; transition: transform .12s ease, box-shadow .18s ease, background .18s ease; text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lapis-600); color: #fff; }
.btn--accent { background: var(--turq-500); color: #04211E; }
.btn--accent:hover { box-shadow: 0 6px 18px -8px var(--turq-500); }
.btn--sm { padding: 7px 13px; font-size: 13.5px; }
.icon-btn { display: inline-grid; place-items: center; position: relative; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); cursor: pointer; text-decoration: none !important; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: var(--r-pill); background: var(--turq-50); color: var(--turq-700); font-size: 13px; font-weight: 700; line-height: 1.9; text-decoration: none !important; }
.chip small { font-weight: 500; opacity: .7; }
.chip--reports { background: var(--saffron-50); color: var(--saffron-700); }
.chip--for-owners { background: var(--lapis-50); color: var(--lapis-600); }
@media (prefers-color-scheme: dark) { .chip { color: var(--turq-300); } .chip--reports { color: var(--saffron-500); } .chip--for-owners { color: var(--lapis-200); } }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 13px; color: var(--text-3); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ================================================================ brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand__mark { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: linear-gradient(150deg, var(--lapis-700), var(--lapis-600) 55%, var(--turq-600)); color: #fff; font: 400 16px/1 var(--display); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.brand__mark--xs { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.brand__name { display: flex; flex-direction: column; font: 400 21px/1 var(--display); }
.brand__name small { margin-top: 4px; font: 500 11px/1 var(--font); color: var(--text-3); }
.brand--light, .brand--light .brand__name small { color: #DCE7FA; }

/* ================================================================ header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.admin-bar .site-head { top: 32px; }
.site-head__bar { display: flex; align-items: center; gap: 20px; min-height: var(--head-h); }
.nav { margin-inline-start: 8px; }
.nav__list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav__list a { display: block; padding: 7px 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.nav__list a:hover { background: var(--surface-2); color: var(--text); }
.nav__list .current-menu-item > a, .nav__list .current-post-parent > a, .nav__list .current-category-ancestor > a { color: var(--accent); background: var(--turq-50); }
.site-head__tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-toggle { display: none; }
.site-search { border-top: 1px solid var(--line); padding: 12px 0; background: var(--surface); }
.search-form { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 6px; padding-inline-start: 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text-3); }
.search-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 0; outline: none; color: var(--text); }
@media (max-width: 860px) {
    .nav-toggle { display: inline-grid; }
    .site-head__cta span { display: none; }
    .nav { position: absolute; inset-inline: 0; top: 100%; margin: 0; padding: 10px var(--gut) 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
    .nav.is-open { display: block; }
    .nav__list { flex-direction: column; }
    .nav__list a { padding: 10px 12px; font-size: 15.5px; }
}
@media (max-width: 782px) { .admin-bar .site-head { top: 46px; } }

.read-progress { position: fixed; inset-inline: 0; top: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron-500), var(--turq-500)); transition: width .1s linear; }

/* ================================================================ hero (home) */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 85% -10%, var(--lapis-600) 0%, var(--lapis-800) 45%, var(--lapis-900) 100%); color: #EAF0FB; }
.hero::before { content: ""; position: absolute; width: 720px; height: 720px; inset-inline-end: -180px; top: -200px; background: url(assets/guilloche.svg) center / contain no-repeat; opacity: .28; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; opacity: .5; background-image: repeating-linear-gradient(-45deg, var(--turq-300) 0 1px, transparent 1px 5px); }
.hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(36px, 6vw, 72px); }
.eyebrow { display: inline-block; margin: 0 0 10px; padding: 2px 12px; border-radius: var(--r-pill); background: rgba(33, 192, 176, .16); color: var(--turq-300); font-size: 13px; font-weight: 700; }
.hero__title { font: 400 clamp(30px, 4.6vw, 50px)/1.35 var(--display); letter-spacing: -.01em; }
.hero__lead { margin: 14px 0 22px; max-width: 520px; color: #C9D6EA; font-size: clamp(15px, 1.6vw, 17.5px); }
.hero .cta--compact { max-width: 520px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #EAF0FB; }
.hero .cta--compact .cta__title { color: #fff; }
.hero .cta--compact input { background: rgba(255, 255, 255, .95); color: var(--lapis-900); }
.hero .cta--compact .cta__icon { color: var(--turq-300); background: rgba(33, 192, 176, .14); }
.hero__lead-card .card { background: var(--surface); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
@media (max-width: 900px) { .hero__in { grid-template-columns: 1fr; } }

/* ================================================================ stats band */
.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 18px; }
.stats__label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text-3); font-size: 13.5px; font-weight: 500; }
.stats__grid { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0; }
.stats__grid div { display: flex; flex-direction: column-reverse; }
.stats__grid dt { color: var(--text-3); font-size: 12.5px; }
.stats__grid dd { margin: 0; font: 800 24px/1.3 var(--font); color: var(--lapis-600); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .stats__grid dd { color: var(--turq-300); } }
.stats__more { margin-inline-start: auto; font-weight: 700; font-size: 14px; }

/* ================================================================ sections & grid */
.section { padding-block: clamp(28px, 5vw, 52px); }
.section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.section-h { font-size: clamp(20px, 2.4vw, 25px); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.empty { padding: 40px; border: 1px dashed var(--line-2); border-radius: var(--r); text-align: center; color: var(--text-3); }

/* ================================================================ cards */
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card__media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--lapis-800); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px; }
.card__title { font-size: 18px; line-height: 1.6; }
.card__title a { color: var(--text); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { text-decoration: none; color: var(--accent); }
.card__title--lead { font-size: clamp(20px, 2.2vw, 25px); }
.card__deck { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.95; }
.card .chip, .card .meta { position: relative; z-index: 1; }
.card .meta { margin-top: auto; }
.cover-fallback { position: relative; display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(120% 120% at 80% 0%, var(--lapis-600), var(--lapis-900)); color: rgba(255, 255, 255, .5); font: 400 34px var(--display); overflow: hidden; }
.cover-fallback::before { content: ""; position: absolute; width: 140%; aspect-ratio: 1; background: url(assets/guilloche.svg) center / contain no-repeat; opacity: .35; }
.cover-fallback--reports { background: radial-gradient(120% 120% at 80% 0%, #3A2B0F, var(--lapis-900)); }

/* ================================================================ page head (archives, search, 404) */
.page-head { padding-block: clamp(26px, 4vw, 44px) clamp(18px, 3vw, 28px); background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head__title { margin-top: 10px; font: 400 clamp(26px, 3.6vw, 38px)/1.4 var(--display); }
.page-head__text { max-width: 680px; margin: 10px 0 0; color: var(--text-2); }
.page-head__count { margin: 8px 0 0; color: var(--text-3); font-size: 13.5px; }
.page-head__search { max-width: 560px; margin-top: 18px; }
.page-head--center { text-align: center; }
.page-head--center .page-head__text, .page-head--center .page-head__search { margin-inline: auto; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-3); }
.crumbs li:not(:last-child)::after { content: "›"; margin-inline-start: 6px; opacity: .6; }
.crumbs a { color: var(--text-3); }

/* ================================================================ article */
.article__head { padding-top: clamp(22px, 4vw, 40px); }
.article__head .chip { margin-top: 16px; }
.article__title { margin-top: 12px; font-size: clamp(27px, 4vw, 42px); line-height: 1.5; font-weight: 800; letter-spacing: -.005em; }
.article__deck { margin: 14px 0 0; color: var(--text-2); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.95; }
.meta--article { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.meta__by { color: var(--text); font-weight: 700; }
.article__cover { margin-top: clamp(22px, 3vw, 34px); margin-bottom: 0; }
.article__cover img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 1200 / 630; object-fit: cover; background: var(--lapis-800); }

.article__layout { display: grid; grid-template-columns: minmax(0, var(--narrow)) 290px; justify-content: center; gap: 48px; padding-block: clamp(26px, 4vw, 44px); }
.article__side { order: 2; }
.article__side-in { position: sticky; top: calc(var(--head-h) + 22px); display: grid; gap: 18px; }
@media (max-width: 1060px) {
    .article__layout { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: calc(var(--narrow) + 2 * var(--gut)); }
    .article__side { order: -1; }
    .article__side-in { position: static; }
    .article__side .cta { display: none; }
}

/* contents list */
.toc { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 26px; }
.article__side .toc { margin-bottom: 0; }
.toc summary { display: flex; align-items: center; gap: 8px; padding: 13px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 14.5px; }
.toc summary::-webkit-details-marker { display: none; }
.toc__list { margin: 0; padding: 0 16px 14px; list-style: none; font-size: 14px; line-height: 1.8; }
.toc__list li { margin: 2px 0; }
.toc__list a { display: block; padding: 3px 10px; border-inline-start: 2px solid var(--line); border-start-end-radius: 6px; border-end-end-radius: 6px; }
.toc__list a:hover { text-decoration: none; background: var(--surface-2); }
.toc__list a.is-active { border-inline-start-color: var(--accent); background: var(--surface-2); }
.toc__list a { color: var(--text-2); }
.toc__list a.is-active { color: var(--accent); font-weight: 700; }

/* ================================================================ prose */
.prose { font-size: 17px; line-height: 2.05; color: var(--text); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose > * + p, .prose > p + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.1em; font-size: clamp(21px, 2.6vw, 26px); scroll-margin-top: calc(var(--head-h) + 20px); }
.prose h3 { margin-top: 1.7em; font-size: 19.5px; scroll-margin-top: calc(var(--head-h) + 20px); }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 800; }
.prose ul, .prose ol { margin: 0; padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose code { padding: 1px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font: 500 .86em/1.6 ui-monospace, Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.prose img { border-radius: var(--r); }
.prose figure { margin-inline: 0; }
.prose .wp-block-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.8; }
.prose th, .prose td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 800; font-size: 14px; color: var(--text-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td { font-variant-numeric: tabular-nums; }
.prose blockquote { margin-inline: 0; padding: 16px 20px; border-radius: var(--r); background: var(--surface-2); color: var(--text-2); font-size: .96em; }
.prose blockquote p { margin: 0; }

/* block styles (registered in inc/blocks.php, also usable from the patterns) */
.prose .is-style-hi1-callout, .prose .is-style-hi1-warning, .prose .is-style-hi1-takeaways { position: relative; padding: 18px 22px; border-radius: var(--r); }
.prose .is-style-hi1-callout { background: var(--turq-50); }
.prose .is-style-hi1-warning { background: var(--saffron-50); }
.prose .is-style-hi1-callout::before, .prose .is-style-hi1-warning::before { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 800; }
.prose .is-style-hi1-callout::before { content: "نکته"; color: var(--turq-700); }
.prose .is-style-hi1-warning::before { content: "هشدار"; color: var(--saffron-700); }
@media (prefers-color-scheme: dark) { .prose .is-style-hi1-callout::before { color: var(--turq-300); } .prose .is-style-hi1-warning::before { color: var(--saffron-500); } }
.prose .is-style-hi1-takeaways { background: var(--lapis-50); border: 1px solid color-mix(in srgb, var(--lapis-600) 18%, transparent); }
.prose .is-style-hi1-takeaways > h2, .prose .is-style-hi1-takeaways > p:first-child { margin: 0 0 8px; font-size: 16px; font-weight: 800; color: var(--lapis-600); }
@media (prefers-color-scheme: dark) { .prose .is-style-hi1-takeaways > h2, .prose .is-style-hi1-takeaways > p:first-child { color: var(--lapis-200); } }
.prose .is-style-hi1-callout > * + *, .prose .is-style-hi1-warning > * + *, .prose .is-style-hi1-takeaways > * + * { margin-top: .5em; }
.prose .is-style-hi1-check { list-style: none; padding-inline-start: 0; }
.prose .is-style-hi1-check li { position: relative; padding-inline-start: 30px; }
.prose .is-style-hi1-check li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 19px; height: 19px; border-radius: 50%; background: var(--turq-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304211E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.prose .is-style-hi1-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.prose .is-style-hi1-stats > * { margin: 0 !important; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; line-height: 1.7; color: var(--text-2); }
.prose .is-style-hi1-stats strong { display: block; margin-bottom: 2px; font-size: 26px; line-height: 1.3; color: var(--lapis-600); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .prose .is-style-hi1-stats strong { color: var(--turq-300); } }
.prose .is-style-hi1-source { border-inline-start: 0; }
.prose .is-style-hi1-source cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; color: var(--text-3); }

/* ================================================================ after the post */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.share__label { margin-inline-end: 6px; color: var(--text-3); font-size: 13.5px; font-weight: 700; }
.share__done { position: absolute; bottom: calc(100% + 6px); inset-inline-end: 0; padding: 2px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 12px; white-space: nowrap; }

.cta { display: flex; gap: 16px; margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--turq-50), var(--surface)); }
.cta__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--surface); color: var(--turq-600); box-shadow: var(--shadow-sm); }
.cta__body { flex: 1; min-width: 0; }
.cta__title { margin: 0 0 4px; font-weight: 800; font-size: 16.5px; color: var(--text); }
.cta__text { margin: 0 0 12px; color: var(--text-2); font-size: 14.5px; }
.cta__form { display: flex; gap: 8px; }
.cta__form input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-size: 15px; }
.cta--compact { margin-top: 0; padding: 16px; gap: 12px; }
.cta--compact .cta__icon { width: 40px; height: 40px; border-radius: 11px; }
.cta--compact .cta__title { margin-bottom: 10px; font-size: 15px; }
.article__side .cta--compact { flex-direction: column; }
@media (max-width: 520px) { .cta { flex-direction: column; } .cta__form { flex-direction: column; } }

.author-box { display: flex; gap: 14px; margin-top: 26px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.author-box .brand__mark { width: 46px; height: 46px; font-size: 19px; }
.author-box__name { margin: 0; font-weight: 800; }
.author-box__text { margin: 4px 0 6px; color: var(--text-2); font-size: 14.5px; }
.author-box a { font-weight: 700; font-size: 14px; }

.related { padding-block: 10px 30px; }
.related .section-h { margin-bottom: 18px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 50px; }
.post-nav__item { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none !important; }
.post-nav__item small { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.post-nav__item span { font-weight: 700; line-height: 1.7; }
.post-nav__item:hover { border-color: var(--line-2); }
.post-nav__item--prev { text-align: end; grid-column: 2; }
.post-nav__item--prev small { justify-content: flex-end; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav__item--prev { grid-column: auto; } }

/* pagination */
.pager { margin-top: 34px; }
.pager .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager .page-numbers { display: inline-flex; align-items: center; gap: 6px; min-width: 42px; height: 42px; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font-weight: 700; text-decoration: none; }
.pager .page-numbers.current { background: var(--lapis-600); border-color: var(--lapis-600); color: #fff; }

/* ================================================================ footer */
.site-foot { margin-top: 30px; background: var(--lapis-900); color: #A9BCE0; }
.site-foot__cols { display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; padding-block: 40px 26px; }
.site-foot__about p { margin: 14px 0 0; max-width: 380px; font-size: 14px; line-height: 2; }
.site-foot__h { margin: 0 0 10px; color: #fff; font-size: 14.5px; }
.site-foot__list { margin: 0; padding: 0; list-style: none; }
.site-foot__list li { margin: 4px 0; }
.site-foot__list a { color: #A9BCE0; font-size: 14px; }
.site-foot__list a:hover { color: var(--turq-300); }
.site-foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 16px 22px; border-top: 1px solid rgba(169, 188, 224, .15); font-size: 13px; }
.site-foot__base a { color: var(--turq-300); }
@media (max-width: 760px) { .site-foot__cols { grid-template-columns: 1fr 1fr; } .site-foot__about { grid-column: 1 / -1; } }

/* ================================================================ motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
