/* Storefront — i-phone.ir (Apple-inspired design system) */
:root {
    --primary: #0a84ff;
    --primary-hover: #0071e3;
    --accent-cyan: #64d2ff;
    --accent-purple: #7c4dff;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-secondary: #f2f4f7;
    --border: #e4e7ec;
    --divider: #d0d5dd;
    --text-primary: #101828;
    --text-secondary: #475467;
    --text-tertiary: #667085;
    --disabled: #98a2b3;
    /* Legacy aliases */
    --card: var(--surface);
    --text: var(--text-primary);
    --muted: var(--text-secondary);
    --accent: var(--primary);
    --accent-hover: var(--primary-hover);
    --accent-soft: #e8f4ff;
    --teal: #0d9488;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-soft: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
    --shadow-sm: var(--shadow-soft);
    --shadow-md: 0 12px 32px rgba(16, 24, 40, .12);
    --shadow-card-hover: 0 12px 32px rgba(16, 24, 40, .12);
    --primary-shadow: 0 6px 18px rgba(10, 132, 255, .24);
    --primary-ring: rgba(10, 132, 255, .28);
    --media-placeholder: linear-gradient(145deg, #e8f4ff 0%, #ede9fe 50%, #d4f4f8 100%);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --wrap: 1440px;
    --site-gutter: 16px;
    --site-header-offset: 108px;
}
@media (min-width: 768px) {
    :root {
        --site-gutter: 32px;
        --site-header-offset: 116px;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Vazirmatn', 'IRANSansX', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    min-width: 0;
    max-width: 100%;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--site-gutter);
    min-width: 0;
}
main { flex: 1; padding: var(--space-lg) 0 var(--space-2xl); min-width: 0; max-width: 100%; }

/* Header — two rows: logo (inline-start), then nav + search */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px) saturate(1.35);
    border-bottom: 1px solid var(--border);
}
body.is-home .site-header,
body.play-apps-page .site-header,
body.is-tutorials .site-header,
body.is-blog .site-header,
body.is-article .site-header {
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 0 var(--border), 0 8px 24px rgba(16, 24, 40, .04);
}

/* Shared storefront canvas — app center, blog, tutorials */
body.play-apps-page,
body.is-tutorials,
body.is-blog,
body.is-article {
    background:
        radial-gradient(ellipse 80% 50% at 100% -10%, rgba(10, 132, 255, .08), transparent 50%),
        radial-gradient(ellipse 60% 40% at 0% 20%, rgba(10, 132, 255, .06), transparent 45%),
        var(--bg) !important;
}
body.play-apps-page main,
body.is-tutorials main,
body.is-blog main,
body.is-article main {
    padding-top: var(--space-md);
    overflow-x: clip;
}
.site-header__inner {
    position: relative;
    display: grid;
    gap: var(--space-sm);
    padding: var(--space-sm) 0 var(--space-md);
}
.site-header__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
}
.site-header__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-height: 44px;
}
.site-header__nav-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    flex: 1;
}
.site-header__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
    flex: 1 1 240px;
    flex-shrink: 1;
    min-width: 0;
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none !important;
    color: var(--text) !important;
}
.site-brand:hover { opacity: .9; }
.site-brand__logo {
    display: block;
    width: auto;
    height: 40px;
    max-width: min(200px, 40vw);
    object-fit: contain;
    object-position: center;
}
.site-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: var(--primary-shadow);
    flex-shrink: 0;
}
.site-brand__text {
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.3;
    letter-spacing: 0;
}

/* Header search — inline-end (left in RTL) */
.site-search {
    margin: 0;
    min-width: 0;
}
.site-search__field {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    height: 40px;
    min-width: 220px;
    max-width: min(420px, 42vw);
    flex: 1 1 220px;
    padding: 0 var(--space-md);
    border-radius: 999px;
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.site-search__field:focus-within {
    background: var(--surface);
    border-color: rgba(10, 132, 255, .35);
    box-shadow: 0 0 0 4px var(--primary-ring);
}
.site-search__icon {
    flex-shrink: 0;
    display: flex;
    color: var(--text-tertiary);
    opacity: .85;
}
.site-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
}
.site-search__input::placeholder {
    color: var(--text-tertiary);
}

.site-nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.site-nav-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: var(--text-primary);
    transition: transform .2s ease, opacity .2s ease;
}
body.site-nav-open .site-nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.site-nav-open .site-nav-toggle__bar:nth-child(2) {
    opacity: 0;
}
body.site-nav-open .site-nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
    justify-content: flex-start;
}
.site-nav a {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.site-nav a:hover {
    color: var(--text-primary) !important;
    background: var(--surface-secondary);
}
.site-nav a.is-active {
    color: #fff !important;
    background: var(--primary);
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(10, 132, 255, .24);
}
.site-nav a:focus-visible {
    outline: 3px solid rgba(10, 132, 255, .28);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    :root { --site-header-offset: 132px; }

    .site-nav-toggle { display: flex; }
    .site-header__bottom {
        flex-wrap: wrap;
        gap: var(--space-sm);
        align-items: stretch;
    }
    .site-header__nav-row {
        order: 2;
        flex: 1 1 100%;
    }
    .site-header__tools {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }
    .site-search {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }
    .site-search__field {
        width: 100%;
        max-width: none;
        min-width: 0;
        flex: 1 1 auto;
    }
    .site-nav {
        display: none;
        position: absolute;
        inset-inline: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-md);
        gap: var(--space-xs);
        background: rgba(255, 255, 255, .98);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(16px);
        z-index: 10;
    }
    body.site-nav-open .site-nav { display: flex; }
    .site-nav a {
        border-radius: var(--radius);
        text-align: start;
        padding: var(--space-md);
        justify-content: flex-start;
    }

    .wrap {
        padding-inline: var(--space-md);
    }

    main {
        padding: var(--space-md) 0 var(--space-xl);
    }

    .grid--3 {
        grid-template-columns: 1fr;
    }

    .post-card__link {
        min-height: 0;
    }

    .post-card--sm .post-card__link {
        flex-direction: column;
    }

    .post-card--sm .post-card__media {
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .post-card--grid .post-card__body {
        padding: var(--space-md);
    }

    .page-head__title {
        font-size: clamp(1.375rem, 1.1rem + 2vw, 1.875rem);
    }

    .page-head__desc {
        font-size: 14px;
        line-height: 1.75;
    }
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.site-footer__inner {
    display: grid;
    gap: var(--space-xl);
    padding: var(--space-3xl) 0 var(--space-2xl);
}
@media (min-width: 640px) {
    .site-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; }
}
.site-footer__brand p {
    margin: var(--space-sm) 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 28px;
    max-width: 70ch;
}
.site-footer__title {
    margin: 0 0 var(--space-md);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text-tertiary);
}
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer__links a {
    color: var(--text) !important;
    text-decoration: none !important;
    font-size: .88rem;
    font-weight: 500;
}
.site-footer__links a:hover { color: var(--accent) !important; }
.site-footer__bottom {
    padding: 1rem 0 1.25rem;
    border-top: 1px solid var(--border);
    font-size: .8rem;
    color: var(--muted);
    text-align: center;
}

/* Page chrome */
.page-head { margin-bottom: var(--space-xl); }
.page-head__title {
    margin: 0 0 var(--space-sm);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    color: var(--text-primary);
}
.page-head__desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    line-height: 30px;
    max-width: 70ch;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1rem;
    font-size: .82rem;
    color: var(--muted);
}
.breadcrumbs a { color: var(--muted) !important; text-decoration: none !important; font-weight: 500; }
.breadcrumbs a:hover { color: var(--accent) !important; }
.breadcrumbs__sep { opacity: .45; user-select: none; }

/* Filters */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1.25rem;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .25s ease, box-shadow .25s ease;
}
.filter-pill:hover {
    color: var(--text-primary) !important;
    background: var(--surface-secondary);
    transform: translateY(-1px);
}
.filter-pill.is-active {
    color: #fff !important;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--primary-shadow);
}
.filter-pill:focus-visible {
    outline: 3px solid var(--primary-ring);
    outline-offset: 2px;
}

/* Cards & panels */
.card, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}
.card { padding: 1.15rem 1.25rem; }
.panel { overflow: hidden; }
.panel--flush { padding: 0; }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.muted { color: var(--muted); font-size: .9rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform .15s var(--ease-out), box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none !important; }
.btn--primary {
    background: var(--primary);
    color: #fff !important;
    box-shadow: var(--primary-shadow);
}
.btn--primary:hover {
    background: var(--primary-hover);
    filter: none;
}
.btn--ghost {
    background: var(--surface);
    color: var(--text-primary) !important;
    border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--surface-secondary); }
.btn:focus-visible {
    outline: 3px solid var(--primary-ring);
    outline-offset: 2px;
}
.btn--lg { padding: .65rem 1.35rem; font-size: .95rem; }

/* Cover framing — fits any source ratio without harsh crops */
.cover-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--media-placeholder, var(--surface-secondary));
    isolation: isolate;
}

.cover-frame__backdrop {
    position: absolute;
    inset: -14%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(22px) saturate(1.12);
    opacity: 0.42;
    transform: scale(1.06);
    pointer-events: none;
}

.cover-frame__img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.cover-frame--hero {
    width: 100%;
    max-height: min(52vw, 440px);
}

.cover-frame--card {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
}

/* Legacy cover-img hooks (unused; kept for cached HTML) */
.cover-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin-bottom: .65rem;
    background: var(--surface-secondary);
}
.cover-img--hero {
    aspect-ratio: 16 / 9;
    max-height: 440px;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}
.cover-img--card { margin-bottom: 0; border-radius: 0; }
.article-hero .cover-img--hero { width: 100%; }

/* Post cards */
.post-card { margin: 0; height: 100%; }
.post-card__link {
    display: flex;
    color: inherit !important;
    text-decoration: none !important;
    height: 100%;
    min-height: 240px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card__link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(10, 132, 255, .18);
}
.post-card__link:focus-visible {
    outline: 3px solid rgba(10, 132, 255, .28);
    outline-offset: 2px;
}
.post-card--grid .post-card__link { flex-direction: column; }
.post-card--grid .post-card__media {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: var(--media-placeholder);
}
.post-card--grid .post-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.post-card--sm .post-card__link { flex-direction: row; min-height: 0; }
.post-card--sm .post-card__media {
    width: 120px;
    min-height: 100px;
    flex-shrink: 0;
}
.post-card--sm .post-card__body { padding: 16px; flex: 1; min-width: 0; gap: 6px; }
.post-card--featured .post-card__link { flex-direction: column; }
.post-card--featured .post-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
}
.post-card--featured .post-card__body { padding: 20px; gap: 10px; }
.post-card--featured .post-card__title { font-size: 18px; font-weight: 700; line-height: 30px; }
.post-card__media .cover-frame {
    height: 100%;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s var(--ease-out);
}

.post-card__link:hover .cover-frame__img {
    transform: scale(1.02);
}

.post-card__link:hover .cover-frame__backdrop {
    opacity: 0.52;
}
.post-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 90px;
    background: var(--media-placeholder);
}
.post-card__placeholder-icon { font-size: 1.5rem; opacity: .45; }
.post-card__cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--primary);
    margin: 0;
}
.post-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card__excerpt {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 28px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card--sm .post-card__title {
    font-size: 16px;
    line-height: 28px;
}
.post-card__date {
    margin-top: auto;
    padding-top: var(--space-sm);
    font-size: 13px;
    font-weight: 500;
    line-height: 22px;
    color: var(--text-tertiary);
}
.post-card__read {
    position: absolute;
    inset-inline-end: .65rem;
    bottom: .65rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, .95);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s, transform .25s var(--ease-out);
}
.post-card__link:hover .post-card__read { opacity: 1; transform: translateY(0); }

/* Tutorial cards */
.tut-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit !important;
    text-decoration: none !important;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tut-card__link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(10, 132, 255, .18);
}
.tut-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-secondary); }
.tut-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tut-card__body { padding: 1rem 1.05rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.tut-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .4rem;
}
.tut-card__tag,
.tut-card__badge {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
}
.tut-card__tag {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.tut-card__badge {
    background: var(--accent-soft);
    color: var(--accent);
}
.tut-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 30px;
}
.tut-card__meta {
    margin-top: auto;
    padding-top: var(--space-sm);
    font-size: 13px;
    font-weight: 500;
    line-height: 22px;
    color: var(--text-tertiary);
}

/* Article */
.article {
    max-width: 720px;
    margin: 0 auto;
}
.article--wide { max-width: 800px; }
.article__header { margin-bottom: 1.25rem; }
.article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: .75rem;
}
.article__meta a { font-weight: 600; }
.article__title {
    margin: 0 0 .65rem;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
}
.article__lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--muted);
}
.article__body {
    padding: 1.5rem 1.35rem 1.75rem;
}
.prose { line-height: 1.75; font-size: 1rem; }
.prose h2 { margin: 1.5rem 0 .65rem; font-size: 1.2rem; }
.prose h3 { margin: 1.25rem 0 .5rem; font-size: 1.05rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-right: 1.25rem; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose a { font-weight: 500; }

/* Alerts */
.flash {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
    font-weight: 500;
    border: 1px solid;
}
.flash--success { background: #ecfdf3; border-color: #6ee7a0; color: #027a48; }
.flash--warn { background: #fff8eb; border-color: #fec84b; color: #b54708; }

/* Pagination */
.pagination-wrap {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
}
.pagination-wrap nav { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; }
.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: .4rem .65rem;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none !important;
}
.pagination-wrap a {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary) !important;
    transition: border-color .2s ease, color .2s ease;
}
.pagination-wrap a:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
}
.pagination-wrap span[aria-current="page"] {
    background: var(--primary);
    color: #fff !important;
    border: 1px solid var(--primary);
    box-shadow: var(--primary-shadow);
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
}
.empty-state__icon { font-size: 2.5rem; margin-bottom: .65rem; opacity: .5; }

/* Link boxes */
.link-box {
    padding: 1.35rem 1.4rem 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}
.link-box__title {
    margin: 0 0 .35rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.link-box__subtitle {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.55;
}
.link-box__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}
.link-box__item { margin: 0; }
.link-box__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary) !important;
    text-decoration: none !important;
    background: var(--surface-secondary);
    font-weight: 600;
    font-size: 15px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .2s ease;
}
.link-box__link:hover {
    transform: translateX(-3px);
    background: var(--surface);
    border-color: rgba(10, 132, 255, .22);
    box-shadow: var(--shadow-soft);
    color: var(--primary) !important;
}
.link-box__arrow {
    flex-shrink: 0;
    opacity: .45;
    font-size: .9rem;
}
.link-box__link:hover .link-box__arrow { opacity: 1; }
.link-box__note {
    margin: .3rem 1rem 0;
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.45;
}

/* CMS / site pages */
.site-page { margin: 0 auto; }
.site-page-section {
    margin-bottom: 1.75rem;
    gap: 1.25rem;
}
.site-page-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}
.cms-block { margin: 0; }
.cms-block--heading h1,
.cms-block--heading h2,
.cms-block--heading h3 {
    margin: 0 0 .5rem;
    line-height: 1.35;
    letter-spacing: -.02em;
}
.cms-block--heading h1 { font-size: 1.75rem; }
.cms-block--heading h2 { font-size: 1.35rem; }
.cms-block--heading h3 { font-size: 1.12rem; }
.cms-block--paragraph { margin: 0 0 .75rem; }
.cms-block--paragraph.is-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--muted);
}
.cms-block--divider hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}
.cms-section {
    margin-bottom: 1.5rem;
}
.cms-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.cms-section__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 38px;
    letter-spacing: 0;
    color: var(--text-primary);
}
.cms-section__more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary) !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.cms-section__more:hover { text-decoration: underline !important; }
.cms-section__empty {
    margin: 0;
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    background: var(--surface-secondary);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

/* Social share buttons (blog, tutorials, apps) */
.social-share {
    margin: 0;
    padding: 0;
}
.social-share--minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 0 0;
    margin-top: .85rem;
    border-top: 1px solid var(--border);
}
.social-share__label {
    margin: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.social-share__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
}
.social-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-family: inherit;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.social-share__btn:hover {
    color: var(--primary) !important;
    border-color: rgba(10, 132, 255, .28);
    background: rgba(10, 132, 255, .05);
}
.social-share__btn svg {
    width: .9rem;
    height: .9rem;
    fill: currentColor;
    flex-shrink: 0;
}
.social-share__status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.social-share--minimal:has(.social-share__status:not([hidden])) {
    flex-wrap: wrap;
}
.social-share--minimal:has(.social-share__status:not([hidden])) .social-share__status {
    position: static;
    width: 100%;
    height: auto;
    clip: auto;
    overflow: visible;
    margin: .15rem 0 0;
    font-size: .7rem;
    color: var(--primary);
    text-align: end;
}
.article-card__footer .social-share--minimal {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
    margin-bottom: .85rem;
}
.tut-player > .social-share--minimal {
    margin-top: 1.25rem;
}
.play-detail-page > .social-share--minimal {
    margin-top: .25rem;
    padding-inline: var(--space-sm);
}
