/* ==========================================================================
   ArabRoot | عرب رووت — Ghost theme stylesheet
   Brand tokens come from branding/03-Colors-and-Tokens (Ubuntu orange + aubergine).
   Direction: RTL first. Latin text, tool names and code are isolated as LTR.
   ========================================================================== */

/* 1. Fonts (local, SIL OFL — licences in assets/fonts) ------------------- */
@font-face {
    font-family: "Cairo";
    src: url("../fonts/Cairo-Variable.woff2") format("woff2");
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Manrope";
    src: url("../fonts/Manrope-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Variable-arabic.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
/* Reading fonts (Arabic subset only; Latin glyphs fall back to Manrope). Chosen per site via @custom.body_font. */
@font-face { font-family: "Noto Naskh Arabic"; src: url("../fonts/NotoNaskhArabic-Variable-arabic.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; src: url("../fonts/NotoSansArabic-Variable-arabic.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/IBMPlexSansArabic-400-arabic.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/IBMPlexSansArabic-500-arabic.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/IBMPlexSansArabic-600-arabic.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/IBMPlexSansArabic-700-arabic.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }

/* 2. Tokens ---------------------------------------------------------------- */
:root {
    --ar-orange: #E95420;
    --ar-orange-soft: #FF946D;
    --ar-aubergine: #2C001E;
    --ar-aubergine-2: #44132F;
    --ar-aubergine-3: #653650;
    --ar-white: #FFFFFF;
    --ar-bg: #FAF8F6;
    --ar-surface: #FFFFFF;
    --ar-surface-2: #F0EAED;
    --ar-text: #2C001E;
    --ar-muted: #72666E;
    --ar-line: #E8E0E5;
    --ar-orange-wash: #FFF0E9;
    --ar-orange-wash-line: #F4D5C5;
    --ar-link: #8C2C0D;
    --ar-success: #237A57;
    --ar-danger: #B3261E;
    --ar-code-bg: #210016;
    --ar-code-line: #4A2039;
    --ar-code-text: #E5D7E0;

    --ar-font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;            /* UI: navigation, headings, buttons, labels */
    --ar-font-ui: var(--gh-font-heading, var(--ar-font-ar));
    /* Reading: long Arabic prose. Default Vazirmatn; overridden per data-body-font below. */
    --ar-font-read: "Vazirmatn", "Manrope", "Segoe UI", Tahoma, sans-serif;
    --ar-read-size: 18px;
    --ar-read-lh: 1.85;
    --ar-read-size-mobile: 17px;
    --ar-font-en: "Manrope", "Segoe UI", system-ui, sans-serif;
    --ar-font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;

    --ar-radius-sm: 8px;
    --ar-radius: 16px;
    --ar-radius-pill: 999px;

    --ar-max: 1240px;
    --ar-gutter: 32px;
    --ar-header-h: 96px;
    --ar-reading: 800px;   /* article measure, tuned for Arabic 19px */
    --ar-medium: 1040px;

    --ar-shadow: 0 12px 32px rgba(44, 0, 30, .08);
    --ar-focus: 0 0 0 3px var(--ar-white), 0 0 0 6px var(--ar-orange);
}

/* 3. Reset & base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--ar-header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
    margin: 0;
    background: var(--ar-bg);
    color: var(--ar-text);
    font-family: var(--gh-font-body, var(--ar-font-read));
    font-size: 16px;
    line-height: 1.8;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ar-link); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
/* Per-site reading font (Design → Site design → Post → body_font) */
body[data-body-font="Noto Naskh Arabic"] { --ar-font-read: "Noto Naskh Arabic", "Manrope", "Segoe UI", Tahoma, sans-serif; --ar-read-size: 19px; --ar-read-lh: 1.9; --ar-read-size-mobile: 18px; }
body[data-body-font="IBM Plex Sans Arabic"] { --ar-font-read: "IBM Plex Sans Arabic", "Manrope", "Segoe UI", Tahoma, sans-serif; --ar-read-size: 18px; --ar-read-lh: 1.85; --ar-read-size-mobile: 17px; }
body[data-body-font="Noto Sans Arabic"] { --ar-font-read: "Noto Sans Arabic", "Manrope", "Segoe UI", Tahoma, sans-serif; --ar-read-size: 18px; --ar-read-lh: 1.85; --ar-read-size-mobile: 17px; }
body[data-body-font="Cairo"] { --ar-font-read: var(--ar-font-ar); --ar-read-size: 19px; --ar-read-lh: 1.9; --ar-read-size-mobile: 18px; }
/* Interface elements (not prose) stay in the brand UI font */
h1, h2, h3, h4, h5, h6, .nav, .btn, .icon-btn, .chip, .pill, .badge, .eyebrow, .tiny, .breadcrumb, .card__meta, .byline, .post-meta, .section-header__link,
.site-header, .site-footer, .utility-bar, .pagination, .toc, .sidebar__title, .share, .related-links, .sidebar__cta, .code-block__copy, .nl-form__label, .nl-form__note, .nl-form__msg,
.post-actions, .author-box__links, .brief__meta, .alt-card__badge, .alt-card__label, .app-card__more, .lead__tag, .author-header__links, .author-card__count, .error-page__actions,
.app-hero__reviewed, .empty-state__title, label, input, button { font-family: var(--ar-font-ui); }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.45; font-weight: 800; letter-spacing: -.2px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: none; box-shadow: var(--ar-focus); border-radius: var(--ar-radius-sm); }
[hidden] { display: none !important; }

.en, code, kbd, pre, samp, .app-card__title, .post-title--app {
    font-family: var(--ar-font-en);
    direction: ltr;
    unicode-bidi: isolate;
}
code, kbd, pre, samp { font-family: var(--ar-font-mono); }
.flip { display: inline-flex; transform: scaleX(-1); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--arrow { width: 18px; height: 18px; }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--ar-orange); border-radius: 50%; vertical-align: middle; }

.skip-link { position: absolute; top: -100px; right: 16px; z-index: 100; background: var(--ar-aubergine); color: #fff; padding: 10px 16px; border-radius: var(--ar-radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: calc(var(--ar-max) + var(--ar-gutter) * 2); margin: 0 auto; padding: 0 var(--ar-gutter); }
.wrap--narrow { max-width: calc(var(--ar-reading) + var(--ar-gutter) * 2); }
.wrap--medium { max-width: calc(var(--ar-medium) + var(--ar-gutter) * 2); }

/* 4. Buttons, chips, eyebrow ------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 22px; border-radius: var(--ar-radius-sm);
    font-size: 14px; font-weight: 700; line-height: 1.3; min-height: 44px;
    border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.btn--primary { background: var(--ar-aubergine); color: #fff; }
.btn--primary:hover { background: #512541; color: #fff; }
.btn--outline { border-color: var(--ar-line); background: #fff; color: var(--ar-text); }
.btn--outline:hover { border-color: var(--ar-aubergine); color: var(--ar-text); }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn .icon--arrow { width: 16px; height: 16px; }

.icon-btn {
    width: 44px; height: 44px; display: inline-grid; place-items: center;
    border: 1px solid var(--ar-line); border-radius: var(--ar-radius-sm); background: #fff; color: var(--ar-text);
    transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--ar-aubergine); }

.chip {
    display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--ar-radius-pill);
    background: var(--ar-orange-wash); color: var(--ar-link); font-size: 12px; font-weight: 700; line-height: 1.6;
}
.chip:hover { background: #FFE2D3; color: var(--ar-link); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips .chip { padding: 8px 16px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ar-aubergine-3); color: #fff; padding: 8px 16px; border-radius: var(--ar-radius-pill); font-size: 13px; font-weight: 700; }
.pill:hover { color: #fff; border-color: var(--ar-orange-soft); }

.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ar-link); font-size: 12px; font-weight: 750; line-height: 1.6; }
.eyebrow a:hover { text-decoration: underline; }
.eyebrow__sep { color: var(--ar-muted); }
.eyebrow--light { color: var(--ar-orange-soft); }
.tiny { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--ar-muted); }

.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar--fallback {
    display: inline-grid; place-items: center; background: var(--ar-orange-wash); color: var(--ar-link);
    font-family: var(--ar-font-en); font-weight: 750; font-size: 13px; text-transform: uppercase; border-radius: 50%;
}

/* 5. Header ------------------------------------------------------------------ */
.utility-bar { background: var(--ar-aubergine); color: #fff; font-size: 12px; min-height: 34px; display: flex; align-items: center; }
.utility-bar__inner { display: flex; justify-content: space-between; gap: 16px; opacity: .85; }

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--ar-line); }
.site-header__inner { display: flex; align-items: center; gap: 32px; height: var(--ar-header-h); }
.site-logo img { width: 183px; height: auto; }
.site-nav { flex: 1; display: flex; justify-content: center; }
.nav { display: flex; gap: 26px; font-size: 14px; font-weight: 700; }
.nav__link { display: inline-block; padding: 8px 2px; border-bottom: 2px solid transparent; }
.nav__item--current .nav__link { color: var(--ar-link); border-bottom-color: var(--ar-orange); }
.site-actions { display: flex; align-items: center; gap: 12px; }
.site-actions__services { font-size: 13px; font-weight: 700; color: var(--ar-muted); padding: 8px 4px; }
.site-actions__services:hover { color: var(--ar-link); }
.site-menu-toggle { display: none; }
.site-menu-toggle__close { display: none; }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__open { display: none; }
.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__close { display: block; }

.mobile-menu { background: #fff; border-top: 1px solid var(--ar-line); box-shadow: var(--ar-shadow); padding: 20px 0 24px; }
.mobile-menu .nav { flex-direction: column; gap: 4px; font-size: 16px; }
.mobile-menu .nav__link { display: block; padding: 12px 4px; border-bottom: 1px solid var(--ar-line); }
.mobile-menu__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.mobile-menu__actions .btn { flex: 1; }

/* 6. Home ---------------------------------------------------------------------- */
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 44px 0 32px; }
.intro__title { font-size: clamp(30px, 3.2vw, 40px); font-weight: 850; letter-spacing: -.8px; line-height: 1.4; }
.intro__text { color: var(--ar-muted); font-size: 15px; margin-top: 6px; }
.intro__stamp { color: var(--ar-link); font-size: 10px; letter-spacing: 2px; text-align: left; }
.intro__stamp b { display: block; color: var(--ar-text); font-size: 12px; letter-spacing: 1px; margin-top: 8px; }

.lead-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.lead { background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: var(--ar-radius); overflow: hidden; }
.lead__media { display: block; position: relative; aspect-ratio: 16 / 8.6; background: var(--ar-surface-2); }
.lead__media img { width: 100%; height: 100%; object-fit: cover; }
.lead__tag { position: absolute; top: 20px; right: 20px; background: #fff; border-radius: 6px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.lead__body { padding: 26px 30px 28px; }
.lead__title { font-size: clamp(24px, 2.4vw, 30px); margin: 10px 0 12px; line-height: 1.5; }
.lead__title a:hover { color: var(--ar-link); }
.lead__excerpt { color: var(--ar-muted); font-size: 15.5px; line-height: 1.9; }

.briefs__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ar-aubergine); padding: 0 0 12px; }
.briefs__title { font-size: 18px; }
.brief { display: grid; grid-template-columns: 1fr 68px; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--ar-line); }
.brief__title { font-size: 15.5px; margin: 4px 0 6px; line-height: 1.6; }
.brief__title a:hover { color: var(--ar-link); }
.brief__meta { font-size: 11px; color: var(--ar-muted); }
.brief__ico { width: 68px; height: 68px; border-radius: 10px; background: var(--ar-surface-2); color: var(--ar-text); display: grid; place-items: center; font-size: 24px; font-weight: 750; }
.brief:nth-child(3) .brief__ico { background: var(--ar-orange-wash); color: var(--ar-link); }
.briefs__empty { color: var(--ar-muted); font-size: 14px; padding: 18px 0; }

.nl-mini { margin-top: 24px; background: var(--ar-aubergine); color: #fff; border-radius: 12px; padding: 24px; }
.nl-mini__mark { margin-bottom: 12px; }
.nl-mini h3 { font-size: 20px; }
.nl-mini p { color: #D8C8D4; font-size: 13.5px; margin-top: 8px; }
.nl-mini a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 13.5px; margin-top: 14px; }
.nl-mini a .icon { color: var(--ar-orange-soft); }
.nl-mini a:hover { color: var(--ar-orange-soft); }

.section { margin-top: 60px; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-header__title { font-size: clamp(22px, 2.2vw, 28px); }
.section-header__text { color: var(--ar-muted); font-size: 14px; margin-top: 4px; }
.section-header__link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.section-header__link:hover { color: var(--ar-link); }

.cards { display: grid; gap: 24px; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--ar-shadow); }
.card__media { display: block; aspect-ratio: 16 / 9; background: var(--ar-surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 22px 24px 20px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 19px; margin: 10px 0 10px; line-height: 1.55; }
.card__title a:hover { color: var(--ar-link); }
.card__excerpt { color: var(--ar-muted); font-size: 14px; line-height: 1.85; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ar-muted); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ar-line); }
.card__meta-sep { opacity: .6; }
.card__arrow { margin-right: auto; color: var(--ar-link); display: inline-flex; padding: 4px; }
.card--large { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.card--large .card__media { aspect-ratio: auto; min-height: 280px; }
.card--large .card__title { font-size: 26px; }
.section-lead { margin-bottom: 24px; }

.byline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.byline__author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ar-text); }
.byline__author:hover .byline__name { color: var(--ar-link); }
.byline--compact { gap: 8px; }
.byline--compact .byline__author { gap: 6px; font-size: 12px; }
.byline--compact .avatar { width: 24px; height: 24px; font-size: 11px; }

/* Alternatives block */
.alt-block { background: var(--ar-aubergine); color: #fff; border-radius: 18px; padding: 36px 40px 40px; }
.alt-block .section-header { align-items: center; }
.alt-block .section-header__text { color: #CCB9C7; }
.alt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.alt-card { background: var(--ar-aubergine-2); border: 1px solid var(--ar-aubergine-3); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; }
.alt-card__label { color: #C6AABF; font-size: 11.5px; }
.alt-card__title { font-size: 19px; margin: 6px 0 8px; line-height: 1.55; }
.alt-card__title a:hover { color: var(--ar-orange-soft); }
.alt-card p { color: #D8C8D4; font-size: 13px; flex: 1; }
.alt-card__badge { align-self: flex-start; background: #653044; color: #FFBC9F; border-radius: 5px; padding: 3px 8px; font-size: 11px; margin-top: 16px; }

/* App cards */
.app-card { background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .2s; }
.app-card:hover { box-shadow: var(--ar-shadow); }
.app-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-card__logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--ar-surface-2); padding: 6px; }
.app-card__logo--fallback { display: grid; place-items: center; background: var(--ar-aubergine); color: #fff; font-weight: 800; font-size: 20px; padding: 0; text-transform: uppercase; }
.app-card__title { font-size: 21px; font-weight: 750; text-align: right; margin-top: 6px; }
.app-card__title a:hover { color: var(--ar-link); }
.app-card__excerpt { color: var(--ar-muted); font-size: 13.5px; flex: 1; }
.app-card__more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ar-link); margin-top: 8px; }

/* Newsletter CTA */
.nl-cta { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; margin: 60px 0; background: var(--ar-orange-wash); border: 1px solid var(--ar-orange-wash-line); border-radius: var(--ar-radius); padding: 40px 44px; }
.nl-cta__title { font-size: clamp(24px, 2.6vw, 31px); margin: 8px 0 10px; }
.nl-cta p { color: var(--ar-muted); font-size: 14.5px; }
.nl-form__label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.nl-form__row { display: flex; gap: 10px; }
.nl-form__input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #DFC4B7; background: #fff; border-radius: var(--ar-radius-sm); text-align: left; font-size: 14px; min-height: 46px; }
.nl-form__input:focus-visible { border-color: var(--ar-aubergine); }
.nl-form__note { font-size: 11.5px; color: var(--ar-muted); margin-top: 10px; }
.nl-form__msg { display: none; margin-top: 10px; font-size: 13px; font-weight: 700; }
.nl-form__msg--success { color: var(--ar-success); }
.nl-form__msg--error { color: var(--ar-danger); }
.nl-form.success .nl-form__msg--success { display: block; }
.nl-form.success .nl-form__row, .nl-form.success .nl-form__note { display: none; }
.nl-form.error .nl-form__msg--error { display: block; }
.nl-form__btn-loading { display: none; }
.nl-form.loading .nl-form__btn-label { display: none; }
.nl-form.loading .nl-form__btn-loading { display: inline; }
.nl-form__disabled { color: var(--ar-muted); font-size: 14px; }
.nl-form__disabled a { color: var(--ar-link); text-decoration: underline; }
.nl-page-form { background: var(--ar-orange-wash); border: 1px solid var(--ar-orange-wash-line); border-radius: var(--ar-radius); padding: 32px; margin-bottom: 40px; }
.nl-states { margin-top: 24px; display: grid; gap: 8px; font-size: 14px; color: var(--ar-muted); }
.nl-states li { padding-right: 18px; position: relative; }
.nl-states li::before { content: ""; position: absolute; right: 0; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--ar-orange); }

/* 7. Archive / section headers ------------------------------------------------ */
.archive-header { padding: 48px 0 32px; max-width: 760px; }
.archive-header--media { display: flex; justify-content: space-between; gap: 32px; align-items: center; max-width: none; }
.archive-header__img { width: 260px; border-radius: 12px; }
.archive-header__title { font-size: clamp(28px, 3vw, 40px); margin: 8px 0 10px; letter-spacing: -.6px; }
.archive-header__text { color: var(--ar-muted); font-size: 16px; }

.author-header { display: flex; gap: 28px; align-items: center; padding: 48px 0 32px; }
.author-header__avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; font-size: 40px; flex: none; }
.author-header__name { font-size: 34px; margin: 6px 0 8px; }
.author-header__bio { color: var(--ar-muted); font-size: 16px; max-width: 640px; }
.author-header__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--ar-link); }
.author-header__links a { display: inline-flex; align-items: center; gap: 6px; }
.author-header__links .icon { width: 16px; height: 16px; }

.author-card { background: #fff; border: 1px solid var(--ar-line); border-radius: 14px; padding: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.author-card__link { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.author-card__avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; font-size: 30px; }
.author-card__name { font-size: 19px; }
.author-card__bio { color: var(--ar-muted); font-size: 13.5px; }
.author-card__count { font-size: 12px; color: var(--ar-link); font-weight: 700; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 20px; padding-top: 24px; border-top: 1px solid var(--ar-line); font-size: 14px; font-weight: 700; }
.pagination__link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--ar-line); border-radius: var(--ar-radius-sm); background: #fff; min-height: 44px; }
.pagination__link:hover { border-color: var(--ar-aubergine); }
.pagination__link--disabled { opacity: .4; pointer-events: none; }
.pagination__status { color: var(--ar-muted); font-weight: 600; }

.empty-state { text-align: center; padding: 64px 24px; background: #fff; border: 1px dashed var(--ar-line); border-radius: var(--ar-radius); margin: 24px 0; }
.empty-state__mark { margin: 0 auto 16px; }
.empty-state__title { font-size: 22px; margin-bottom: 8px; }
.empty-state p { color: var(--ar-muted); }
.empty-state a { color: var(--ar-link); text-decoration: underline; }

/* 8. Post ---------------------------------------------------------------------- */
/* Hero band: text | cover image */
.post-hero { background: var(--ar-surface-2); border-bottom: 1px solid var(--ar-line); }
.post-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.post-hero__grid--text { grid-template-columns: minmax(0, 860px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ar-muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--ar-link); }
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 6px; background: var(--ar-orange-wash); color: var(--ar-link); font-size: 12px; font-weight: 800; letter-spacing: .2px; margin-bottom: 14px; }
.badge:hover { background: #FFE2D3; color: var(--ar-link); }
.post-title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.4; letter-spacing: -.8px; margin: 0 0 16px; font-weight: 850; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }
.post-meta__author { display: inline-flex; align-items: center; gap: 12px; }
.post-meta__author:hover .post-meta__name { color: var(--ar-link); }
.avatar--lg { width: 44px; height: 44px; font-size: 18px; }
.post-meta__name { display: block; font-weight: 800; font-size: 15px; line-height: 1.4; }
.post-meta__role { display: block; color: var(--ar-muted); font-size: 12.5px; line-height: 1.5; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-meta__dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ar-muted); font-size: 13px; font-weight: 600; letter-spacing: .2px; }
.post-hero__media { margin: 0; }
.post-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ar-radius); box-shadow: var(--ar-shadow); }
.post-hero__media figcaption { text-align: center; color: var(--ar-muted); font-size: 12.5px; margin-top: 10px; }

/* Simple header variant used by pages and app entries */
.post-header { padding: 44px 0 28px; }
.post-cover { margin: 0 auto 8px; }
.post-cover img { width: 100%; border-radius: var(--ar-radius); aspect-ratio: 21 / 9; object-fit: cover; }
.post-cover figcaption { text-align: center; color: var(--ar-muted); font-size: 13px; margin-top: 10px; }

/* Reading layout: sticky sidebar on the start side + 760px body */
.post-layout { display: grid; grid-template-columns: 280px minmax(0, 760px); justify-content: center; column-gap: 56px; padding-top: 32px; }
.post-layout--single { grid-template-columns: minmax(0, var(--ar-reading)); }
.post-body { min-width: 0; }
.post-sidebar { position: sticky; top: calc(var(--ar-header-h) + 24px); align-self: start; max-height: calc(100vh - var(--ar-header-h) - 48px); overflow: auto; display: grid; gap: 28px; scrollbar-width: thin; padding-bottom: 8px; }
.sidebar__title { font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; color: var(--ar-muted); margin-bottom: 12px; text-transform: uppercase; }
.toc__list { display: grid; gap: 2px; border-right: 2px solid var(--ar-line); }
.toc__list a { display: block; padding: 6px 14px 6px 8px; margin-right: -2px; border-right: 2px solid transparent; font-size: 13.5px; line-height: 1.6; color: var(--ar-muted); font-weight: 600; }
.toc__list a:hover { color: var(--ar-text); }
.toc__list .toc__h3 a { padding-right: 28px; font-size: 12.5px; font-weight: 500; }
.toc__list a.is-active { color: var(--ar-link); border-right-color: var(--ar-orange); background: linear-gradient(to left, var(--ar-orange-wash), transparent 80%); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share__btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--ar-line); border-radius: 8px; background: #fff; color: var(--ar-text); font-weight: 800; font-size: 13px; }
.share__btn:hover { border-color: var(--ar-aubergine); color: var(--ar-text); }
.share__btn .icon { width: 17px; height: 17px; }
.share__status { font-size: 12px; color: var(--ar-muted); font-weight: 700; }
.share__status.is-ok { color: var(--ar-success); }
.related-links { display: grid; gap: 10px; }
.related-links a { display: block; font-size: 13.5px; line-height: 1.6; font-weight: 600; color: var(--ar-text); padding-right: 12px; position: relative; }
.related-links a::before { content: ""; position: absolute; right: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--ar-orange); }
.related-links a:hover { color: var(--ar-link); }
.sidebar__cta { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--ar-aubergine); color: #fff; }
.sidebar__cta:hover { color: #fff; background: #3A0F2B; }
.sidebar__cta-title { font-weight: 800; font-size: 14.5px; }
.sidebar__cta-text { font-size: 12.5px; color: #D8C8D4; line-height: 1.6; }
.sidebar__cta-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--ar-orange-soft); margin-top: 6px; }
.sidebar__cta-link .icon { width: 14px; height: 14px; }

/* Ghost content (.gh-content) */
.gh-content { font-size: var(--ar-read-size); line-height: var(--ar-read-lh); }
.gh-content > * + * { margin-top: 1em; }
.gh-content > [id] { scroll-margin-top: calc(var(--ar-header-h) + 24px); }
.gh-content h2, .gh-content h3, .gh-content h4 { line-height: 1.45; margin-top: 1.6em; letter-spacing: -.3px; }
.gh-content h2 { font-size: 26px; }
.gh-content h3 { font-size: 21px; }
.gh-content h4 { font-size: 18px; }
.gh-content h2 + *, .gh-content h3 + *, .gh-content h4 + * { margin-top: .5em; }
.gh-content p, .gh-content li { color: #3A2431; }
.gh-content a:not(.kg-bookmark-container):not(.kg-btn) { color: var(--ar-link); text-decoration: underline; text-decoration-color: rgba(140, 44, 13, .35); text-underline-offset: 3px; }
.gh-content a:hover { text-decoration-color: var(--ar-link); }
.gh-content a, .gh-content .app-facts dd { overflow-wrap: anywhere; }
.gh-content strong { font-weight: 800; color: var(--ar-text); }
.gh-content ul, .gh-content ol { padding-right: 1.4em; }
.gh-content ul { list-style: disc; }
.gh-content ol { list-style: arabic-indic; }
.gh-content li + li { margin-top: .25em; }
.gh-content li::marker { color: var(--ar-orange); }
.gh-content hr { border: 0; border-top: 1px solid var(--ar-line); margin: 2em 0; }
.gh-content blockquote { margin: 1.2em 0; padding: 2px 20px 2px 0; border-right: 4px solid var(--ar-orange); font-size: 19px; font-weight: 600; color: var(--ar-text); }
.gh-content blockquote.kg-blockquote-alt { border: 0; padding: 20px 0; text-align: center; font-size: 24px; font-style: normal; }
.gh-content img { border-radius: 12px; }
.gh-content figure { margin: 1.4em 0; }
.gh-content figcaption { font-size: 13.5px; color: var(--ar-muted); text-align: center; margin-top: 10px; }
.gh-content figcaption a { color: var(--ar-link); }

/* Bidi isolation: tool names, commands and Latin fragments inside Arabic paragraphs */
.gh-content code { direction: ltr; unicode-bidi: isolate; display: inline-block; font-size: .82em; background: var(--ar-surface-2); color: var(--ar-text); padding: 1px 7px; border-radius: 6px; vertical-align: baseline; white-space: pre-wrap; }
.gh-content .en, .gh-content [lang|="en"], .gh-content [dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
.gh-content kbd { font-size: .8em; border: 1px solid var(--ar-line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: #fff; }

/* Code blocks: dark surface on brand aubergine. Header (language + copy) is added by article.js
   OUTSIDE the <pre>, so copying never captures it. */
.code-block { margin: 1.2em 0; direction: ltr; text-align: left; border-radius: 12px; overflow: hidden; border: 1px solid var(--ar-code-line); background: var(--ar-code-bg); }
.code-block__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 10px 4px 16px; background: #1A0011; border-bottom: 1px solid var(--ar-code-line); }
.code-block__lang { font-family: var(--ar-font-en); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #C17891; }
.code-block__copy { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; color: var(--ar-code-text); font-family: var(--ar-font-ar); font-size: 12px; font-weight: 700; direction: rtl; min-height: 32px; }
.code-block__copy:hover { background: rgba(255, 255, 255, .08); }
.code-block__copy .icon { width: 16px; height: 16px; }
.code-block__copy.is-copied { color: #7EE2B0; }
.code-block__copy.is-failed { color: var(--ar-orange-soft); }
.gh-content pre { margin: 0; padding: 14px 18px; overflow-x: auto; background: transparent; color: var(--ar-code-text); font-size: 14px; line-height: 1.65; tab-size: 4; direction: ltr; text-align: left; unicode-bidi: isolate; scrollbar-width: thin; }
.gh-content pre code { display: block; background: none; color: inherit; padding: 0; font-size: inherit; border-radius: 0; white-space: pre; unicode-bidi: normal; }
.gh-content pre:not(.code-block pre) { border-radius: 12px; background: var(--ar-code-bg); margin: 1.2em 0; }
/* highlight.js palette on aubergine */
.hljs-comment, .hljs-quote { color: #A88AA0; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-section, .hljs-meta { color: #FF946D; }
.hljs-string, .hljs-attr, .hljs-template-variable, .hljs-addition { color: #FFD3A8; }
.hljs-number, .hljs-literal, .hljs-variable, .hljs-symbol, .hljs-bullet { color: #B9E3FF; }
.hljs-title, .hljs-name, .hljs-type, .hljs-selector-id, .hljs-selector-class { color: #FFFFFF; font-weight: 700; }
.hljs-deletion { color: #FF8A80; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* Tables: wrapped by article.js into .table-wrap so scrolling stays inside the table. */
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--ar-line); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.gh-content table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15.5px; line-height: 1.7; }
.gh-content th, .gh-content td { padding: 9px 14px; text-align: right; border-bottom: 1px solid var(--ar-line); vertical-align: top; }
.gh-content th { background: var(--ar-bg); font-weight: 800; font-size: 14px; }
.gh-content tr:last-child td { border-bottom: 0; }
.gh-content td code { white-space: nowrap; }

/* Ghost cards */
.gh-content .kg-callout-card { display: flex; gap: 12px; padding: 14px 18px; border-radius: 10px; font-size: 16px; line-height: 1.75; margin: 1.2em 0; border-right: 4px solid transparent; }
.gh-content .kg-callout-card .kg-callout-emoji { font-size: 22px; line-height: 1.4; flex: none; }
.gh-content .kg-callout-card .kg-callout-text { color: var(--ar-text); }
.gh-content .kg-callout-card-grey { background: var(--ar-surface-2); border-color: var(--ar-muted); }
.gh-content .kg-callout-card-white { background: #fff; border-color: var(--ar-line); box-shadow: inset 0 0 0 1px var(--ar-line); }
.gh-content .kg-callout-card-blue { background: #EAF2FB; border-color: #3B73B9; }
.gh-content .kg-callout-card-green { background: #E8F5EE; border-color: var(--ar-success); }
.gh-content .kg-callout-card-yellow { background: #FFF6DB; border-color: #D9A400; }
.gh-content .kg-callout-card-red { background: #FDE9E7; border-color: var(--ar-danger); }
.gh-content .kg-callout-card-pink { background: var(--ar-orange-wash); border-color: var(--ar-orange); }
.gh-content .kg-callout-card-purple { background: #F1E7EE; border-color: var(--ar-aubergine); }
.gh-content .kg-callout-card-accent { background: var(--ar-aubergine); border-color: var(--ar-orange); }
.gh-content .kg-callout-card-accent .kg-callout-text { color: #fff; }

.gh-content .kg-bookmark-card, .gh-content .kg-bookmark-container { border-radius: 12px; }
.gh-content .kg-bookmark-container { display: flex; border: 1px solid var(--ar-line); background: #fff; overflow: hidden; text-decoration: none; color: inherit; }
.gh-content .kg-bookmark-content { padding: 18px 20px; flex: 1; min-width: 0; }
.gh-content .kg-bookmark-title { font-weight: 800; font-size: 16px; }
.gh-content .kg-bookmark-description { color: var(--ar-muted); font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gh-content .kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ar-muted); margin-top: 12px; }
.gh-content .kg-bookmark-icon { width: 20px; height: 20px; }
.gh-content .kg-bookmark-thumbnail { width: 220px; flex: none; }
.gh-content .kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.gh-content .kg-button-card { display: flex; margin: 1.4em 0; }
.gh-content .kg-button-card.kg-align-center { justify-content: center; }
.gh-content .kg-btn { display: inline-flex; align-items: center; padding: 12px 24px; border-radius: var(--ar-radius-sm); background: var(--ar-aubergine); color: #fff !important; font-weight: 700; text-decoration: none !important; }
.gh-content .kg-toggle-card { border: 1px solid var(--ar-line); border-radius: 12px; padding: 16px 20px; background: #fff; }
.gh-content .kg-toggle-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.gh-content .kg-toggle-heading-text { font-size: 18px; font-weight: 800; margin: 0; }
.gh-content .kg-toggle-card-icon { width: 24px; height: 24px; flex: none; transition: transform .2s; }
.gh-content .kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }
.gh-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon { transform: rotate(180deg); }
.gh-content .kg-toggle-content { margin-top: 12px; font-size: 17px; }
.gh-content .kg-header-card { border-radius: 12px; padding: 40px; }
.gh-content .kg-product-card-container, .gh-content .kg-file-card-container, .gh-content .kg-audio-card { border: 1px solid var(--ar-line); border-radius: 12px; background: #fff; }
.gh-content .kg-file-card-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; text-decoration: none !important; color: inherit !important; }
.gh-content .kg-file-card-title { font-weight: 800; }
.gh-content .kg-file-card-caption, .gh-content .kg-file-card-metadata { color: var(--ar-muted); font-size: 13px; }
.gh-content .kg-file-card-icon { width: 48px; }
.gh-content .kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.gh-content .kg-gallery-row { display: flex; gap: 8px; }
.gh-content .kg-gallery-image { flex: 1; min-width: 0; }
.gh-content .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.gh-content .kg-embed-card { display: flex; justify-content: center; }
.gh-content .kg-embed-card iframe { max-width: 100%; }
.gh-content .kg-video-card video, .gh-content .kg-embed-card iframe { border-radius: 12px; }
.gh-content .kg-signup-card, .gh-content .kg-cta-card { border-radius: 12px; }
.gh-content .kg-nft-card { border-radius: 12px; }

/* Wide and full-width cards: expand only when there is no TOC, and never beyond the viewport. */
.gh-content .kg-width-wide { position: relative; width: 100%; }
.gh-content .kg-width-full { position: relative; width: 100%; }
/* Wide/full cards stay within the reading column; the sidebar occupies the remaining space. */
/* Expandable images (article.js): click opens the lightbox */
.gh-content .kg-image-card img.is-zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(44, 0, 30, .92); display: grid; place-items: center; padding: 24px; }
.lightbox__img { max-width: min(1400px, 100%); max-height: 100%; width: auto; height: auto; border-radius: 8px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.lightbox__close { position: absolute; top: 20px; left: 20px; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); border-radius: 50%; }
.lightbox__close:hover { background: rgba(255, 255, 255, .24); }

/* App directory facts (documented HTML snippet) */
.gh-content .app-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 1.2em 0; padding: 8px 24px; background: #fff; border: 1px solid var(--ar-line); border-radius: 12px; font-size: 15.5px; }
.gh-content .app-facts > div { padding: 12px 0; border-bottom: 1px solid var(--ar-line); }
.gh-content .app-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.gh-content .app-facts dt { font-size: 12px; font-weight: 800; color: var(--ar-muted); letter-spacing: .3px; }
.gh-content .app-facts dd { margin: 2px 0 0; font-weight: 600; }
.gh-content .app-facts a { text-decoration: none; color: var(--ar-link); }
.gh-content .app-facts .en { font-size: 14.5px; }

/* Post footer */
.post-footer { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--ar-line); display: grid; gap: 28px; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-tags__label { font-size: 13px; font-weight: 700; color: var(--ar-muted); margin-left: 4px; }
.post-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 14px; font-weight: 700; }
.post-actions__link { display: inline-flex; align-items: center; gap: 8px; color: var(--ar-link); }
.post-actions__link .icon { width: 18px; height: 18px; }
.post-actions__link--quiet { color: var(--ar-muted); font-weight: 600; }
.post-actions__link--quiet:hover { color: var(--ar-link); }
.author-box { display: flex; gap: 20px; align-items: flex-start; background: #fff; border: 1px solid var(--ar-line); border-radius: 14px; padding: 24px; }
.author-box__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; font-size: 28px; flex: none; }
.author-box__name { font-size: 20px; margin: 4px 0 6px; }
.author-box p { color: var(--ar-muted); font-size: 15px; }
.author-box__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--ar-link); }
.author-box__links a { display: inline-flex; align-items: center; gap: 6px; }

/* App hero */
.app-hero { display: flex; gap: 24px; align-items: flex-start; }
.app-hero__logo { width: 96px; height: 96px; border-radius: 20px; object-fit: contain; background: #fff; border: 1px solid var(--ar-line); padding: 10px; flex: none; }
.app-hero__logo--fallback { display: grid; place-items: center; background: var(--ar-aubergine); color: #fff; font-weight: 800; font-size: 40px; border: 0; text-transform: uppercase; }
.post-title--app { text-align: right; font-size: clamp(30px, 3.4vw, 44px); margin: 6px 0 10px; }
.app-hero__reviewed { color: var(--ar-muted); font-size: 13px; margin-top: 10px; }

/* Services */
.services-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 24px; }
.services-cta__note { color: var(--ar-muted); font-size: 13.5px; }
.services-cta--bottom { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--ar-line); }

/* Error pages */
.error-page { text-align: center; padding: 72px 0 40px; max-width: 620px; margin: 0 auto; }
.error-page__mark { margin: 0 auto 20px; }
.error-page__code { color: var(--ar-orange); font-weight: 800; font-size: 14px; letter-spacing: 3px; }
.error-page__title { font-size: clamp(28px, 3vw, 38px); margin: 8px 0 12px; }
.error-page__text { color: var(--ar-muted); font-size: 16px; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.error-page__details { text-align: right; margin-top: 32px; font-size: 13px; color: var(--ar-muted); }
.error-page__details pre { text-align: left; background: var(--ar-surface-2); padding: 12px; border-radius: 8px; overflow: auto; }

/* 9. Footer -------------------------------------------------------------------- */
.site-footer { background: #fff; border-top: 1px solid var(--ar-line); padding: 40px 0 24px; margin-top: 40px; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, .8fr); gap: 40px; align-items: start; }
.site-footer__brand img { width: 180px; margin-bottom: 14px; }
.site-footer__brand p { color: var(--ar-muted); font-size: 13.5px; max-width: 380px; }
.site-footer__links .nav { flex-wrap: wrap; gap: 8px 28px; font-size: 13.5px; font-weight: 600; }
.site-footer__links .nav__link { padding: 4px 0; border: 0; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; font-weight: 700; justify-content: flex-end; }
.icon-link { display: inline-flex; align-items: center; gap: 6px; }
.icon-link .icon { width: 16px; height: 16px; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--ar-line); margin-top: 32px; padding-top: 20px; font-size: 11.5px; color: var(--ar-muted); }
.site-footer__bottom a { text-decoration: underline; }

/* 10. Ghost Portal / search tweaks --------------------------------------------- */
.gh-portal-triggerbtn-wrapper { direction: ltr; }

/* 11. Responsive --------------------------------------------------------------- */
@media (max-width: 1100px) {
    .site-header__inner { gap: 20px; }
    .nav { gap: 16px; font-size: 13px; }
    .site-logo img { width: 160px; }
    .site-actions__services { display: none; }
    .post-layout { grid-template-columns: minmax(0, var(--ar-reading)); row-gap: 24px; }
    .post-sidebar { position: static; max-height: none; overflow: visible; grid-template-columns: 1fr 1fr; gap: 20px 32px; padding: 18px 20px; background: #fff; border: 1px solid var(--ar-line); border-radius: 12px; }
    .post-toc { grid-column: 1 / -1; }
    .toc__list { max-height: 260px; overflow: auto; }
    .sidebar__cta { grid-column: 1 / -1; }
    .post-hero__grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; }
}
@media (max-width: 900px) {
    :root { --ar-gutter: 24px; --ar-header-h: 80px; }
    .lead-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
    .cards--3, .alt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nl-cta { grid-template-columns: 1fr; gap: 24px; padding: 30px; }
    .alt-block { padding: 28px; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__social { justify-content: flex-start; }
    .card--large { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    :root { --ar-gutter: 20px; }
    body { font-size: 15px; }
    .utility-bar { font-size: 11px; min-height: 30px; }
    .utility-bar__en { display: none; }
    .utility-bar__inner { justify-content: center; }
    .site-header__inner { gap: 12px; }
    .site-nav, .site-actions__subscribe { display: none; }
    .site-menu-toggle { display: inline-grid; }
    .site-logo { margin-left: auto; }
    .site-logo img { width: 150px; }
    .intro { display: block; padding: 28px 0 22px; }
    .intro__stamp { display: none; }
    .intro__text { font-size: 14px; }
    .lead-grid { grid-template-columns: 1fr; gap: 28px; }
    .lead__body { padding: 20px; }
    .lead__excerpt { font-size: 14px; }
    .cards--3, .alt-cards { grid-template-columns: 1fr; gap: 18px; }
    .section { margin-top: 36px; }
    .section-header { align-items: center; gap: 16px; }
    .section-header__link { font-size: 12px; }
    .alt-block { padding: 24px 20px; border-radius: 12px; }
    .alt-block .section-header { display: block; }
    .alt-block .pill { margin-top: 14px; }
    .nl-cta { padding: 24px 20px; margin: 36px 0; }
    .nl-form__row { flex-direction: column; }
    .nl-form__note { text-align: center; }
    .archive-header { padding: 32px 0 22px; }
    .archive-header--media { display: block; }
    .archive-header__img { width: 100%; margin-top: 16px; }
    .author-header { flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px 0 24px; }
    .post-hero__grid { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; padding-bottom: 28px; }
    .post-hero__media { order: -1; }
    .post-hero__media img { aspect-ratio: 16 / 9; border-radius: 12px; }
    .post-title { font-size: 28px; letter-spacing: -.4px; }
    .post-excerpt { font-size: 16.5px; }
    .post-meta { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 20px; }
    .post-layout { padding-top: 24px; }
    .post-sidebar { grid-template-columns: 1fr; }
    .post-toc { grid-column: auto; }
    .sidebar__cta { grid-column: auto; }
    .gh-content { font-size: var(--ar-read-size-mobile); line-height: var(--ar-read-lh); }
    .gh-content h2 { font-size: 23px; }
    .gh-content h3 { font-size: 19px; }
    .gh-content blockquote { font-size: 19px; padding-right: 18px; }
    .gh-content pre { font-size: 13px; padding: 12px 14px; }
    .gh-content .kg-callout-card { padding: 12px 14px; font-size: 15px; }
    .gh-content .app-facts { grid-template-columns: 1fr; padding: 8px 18px; }
    .gh-content .app-facts > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--ar-line); }
    .gh-content .app-facts > div:last-child { border-bottom: 0; }
    .gh-content .kg-bookmark-thumbnail { display: none; }
    .app-hero { gap: 16px; }
    .app-hero__logo { width: 64px; height: 64px; border-radius: 14px; font-size: 28px; }
    .post-title--app { font-size: 30px; }
    .author-box { flex-direction: column; }
    .pagination { flex-wrap: wrap; justify-content: center; }
    .pagination__status { order: 3; width: 100%; text-align: center; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .site-footer__bottom { flex-direction: column; }
    .lightbox { padding: 12px; }
    .lightbox__close { top: 12px; left: 12px; }
}
@media (max-width: 400px) {
    .site-logo img { width: 136px; }
    .icon-btn { width: 40px; height: 40px; }
}

/* 12. Print ---------------------------------------------------------------------- */
@media print {
    .utility-bar, .site-header, .site-footer, .post-sidebar, .nl-cta, .post-actions, .code-block__bar, .lightbox { display: none !important; }
    body { background: #fff; }
    .gh-content pre { white-space: pre-wrap; }
}
