/* hPage Help Center (support.hpage.com). Built from help-center/; the colours follow the marketing page
   (public/marketing-page/www/sass/includes/_colors.scss, _modern.scss): Inter, the blue brand gradient, soft cards.
   Right to left (Arabic, <html dir="rtl">): the layout uses logical properties (margin-inline-start, inset-inline-end,
   text-align: start …), so it mirrors by itself; the few [dir="rtl"] rules at the end mirror the directional icons and
   movements and keep code left to right. */

/* Noto Sans Arabic (SIL Open Font License, assets/fonts/OFL-NotoSansArabic.txt; @fontsource/noto-sans-arabic 5.3.0,
   the Arabic subset): self-hosted, used by the Arabic pages for the Arabic letters next to Inter */
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/noto-sans-arabic-arabic-400-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/noto-sans-arabic-arabic-700-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --brand: #206891;
  --brand-bright: #0A82C7;
  --brand-gradient: linear-gradient(135deg, #0A82C7 0%, #206891 100%);
  --accent: #FAB840;
  --ink: #1F2D3D;
  --ink-soft: #3C4858;
  --ink-muted: #6B7785;
  --page: #ffffff;
  --page-alt: #F3F7FA;
  --surface: #ffffff;
  --surface-hover: #F6FAFD;
  --line: #E3E9EF;
  --line-strong: #CBD5DF;
  --link: #0A82C7;
  --link-hover: #206891;
  --focus: #0A82C7;
  --shadow-soft: 0 16px 40px rgba(31, 45, 61, 0.08);
  --shadow-card: 0 10px 30px rgba(32, 104, 145, 0.10);
  --shadow-pop: 0 24px 60px rgba(31, 45, 61, 0.18);
  --radius: 20px;
  --radius-small: 12px;
  --hero-text: #ffffff;
  --callout-note-bg: #EEF6FC;
  --callout-note-line: #0A82C7;
  --callout-tip-bg: #EDF8F4;
  --callout-tip-line: #007563;
  --callout-important-bg: #FFF5E8;
  --callout-important-line: #E09B2D;
  --code-bg: #EEF2F6;
  --header-bg: rgba(255, 255, 255, 0.86);
  --footer-bg: #1A2B3C;
  --footer-text: #C9D4DE;
  color-scheme: light;
}

:root[lang="ar"] { --font: 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EEF2F4;
    --ink-soft: #CDD6DE;
    --ink-muted: #94A1AD;
    --page: #0F1720;
    --page-alt: #141E29;
    --surface: #182431;
    --surface-hover: #1F2E3D;
    --line: #27364A;
    --line-strong: #37495F;
    --link: #5FB3E8;
    --link-hover: #8DCBF2;
    --focus: #5FB3E8;
    --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.6);
    --callout-note-bg: #15293A;
    --callout-note-line: #5FB3E8;
    --callout-tip-bg: #14302B;
    --callout-tip-line: #3FB39B;
    --callout-important-bg: #3A2C14;
    --callout-important-line: #FAB840;
    --code-bg: #1F2E3D;
    --header-bg: rgba(15, 23, 32, 0.86);
    --footer-bg: #0A1119;
    --footer-text: #AEBBC7;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #EEF2F4;
  --ink-soft: #CDD6DE;
  --ink-muted: #94A1AD;
  --page: #0F1720;
  --page-alt: #141E29;
  --surface: #182431;
  --surface-hover: #1F2E3D;
  --line: #27364A;
  --line-strong: #37495F;
  --link: #5FB3E8;
  --link-hover: #8DCBF2;
  --focus: #5FB3E8;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.6);
  --callout-note-bg: #15293A;
  --callout-note-line: #5FB3E8;
  --callout-tip-bg: #14302B;
  --callout-tip-line: #3FB39B;
  --callout-important-bg: #3A2C14;
  --callout-important-line: #FAB840;
  --code-bg: #1F2E3D;
  --header-bg: rgba(15, 23, 32, 0.86);
  --footer-bg: #0A1119;
  --footer-text: #AEBBC7;
  color-scheme: dark;
}

/* ---- base ---------------------------------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { padding-inline-start: 1.3em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--code-bg); padding: 0.1em 0.4em; border-radius: 6px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---- buttons --------------------------------------------------------------------------------------------------- */

.button {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.8em 1.6em; border: 0; border-radius: 999px;
  background: var(--brand-gradient); color: #fff; font: inherit; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(10, 130, 199, 0.28); cursor: pointer; white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button:hover, .button:focus-visible { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(10, 130, 199, 0.34); }
.button--small { padding: 0.55em 1.1em; font-size: 0.9rem; box-shadow: 0 6px 16px rgba(10, 130, 199, 0.22); }
.button--ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 2px var(--line-strong); }
.button--ghost:hover { color: var(--link-hover); box-shadow: inset 0 0 0 2px var(--link); }

/* ---- header ---------------------------------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; flex: none; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand__logo { height: 34px; width: auto; display: block; }
.brand__logo--dark { display: none; }
.brand__text { font-size: 1.05rem; padding-inline-start: 12px; border-inline-start: 1px solid var(--line-strong); line-height: 1.1; }
.site-header__search { flex: 1 1 auto; max-width: 440px; margin-inline-start: auto; }
.site-nav { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.site-header__search + .site-nav { margin-inline-start: 0; }
.site-nav__link { padding: 8px 12px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.site-nav__link:hover { background: var(--page-alt); text-decoration: none; color: var(--ink); }
.site-nav__link--muted { color: var(--ink-muted); }
.lang-menu { position: relative; }
.lang-menu__toggle {
  display: inline-flex; align-items: center; gap: 2px; padding-block: 8px; padding-inline: 10px 8px; border: 0; border-radius: 999px;
  background: none; color: var(--ink); cursor: pointer; font: inherit;
}
.lang-menu__toggle:hover, .lang-menu.is-open .lang-menu__toggle { background: var(--page-alt); }
.lang-menu__toggle .icon { width: 1.3em; height: 1.3em; }
.lang-menu__chevron { width: 1em !important; height: 1em !important; transform: rotate(90deg); transition: transform 0.2s; color: var(--ink-muted); }
.lang-menu.is-open .lang-menu__chevron { transform: rotate(-90deg); }
.lang-menu__list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 60; min-width: 190px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop);
}
.lang-menu__item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: var(--ink); font-weight: 600;
  font-size: 0.95rem; white-space: nowrap;
}
.lang-menu__item:hover { background: var(--page-alt); text-decoration: none; color: var(--ink); }
.lang-menu__item.is-current { color: var(--brand-bright); }
.lang-menu__flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; flex: none; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0;
  border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; margin-inline-end: 6px;
}
.theme-toggle:hover { background: var(--page-alt); }
.theme-toggle .icon { width: 1.3em; height: 1.3em; }
.theme-toggle__moon { display: none; }
.menu-toggle { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo--light { display: none; }
  :root:not([data-theme="light"]) .brand__logo--dark { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}
:root[data-theme="dark"] .brand__logo--light { display: none; }
:root[data-theme="dark"] .brand__logo--dark { display: block; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }

@media (max-width: 900px) {
  .brand__text { display: none; }
  .site-header__search { max-width: none; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px;
    border: 0; border-radius: 10px; background: transparent; cursor: pointer; flex: none; padding: 0 10px;
  }
  .menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch;
    padding: 12px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft);
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 12px 14px; }
  .site-nav .button { justify-content: center; margin-top: 6px; }
  .theme-toggle { align-self: flex-start; margin: 4px 0 0; margin-inline-start: 4px; }
  .lang-menu__list { position: static; min-width: 0; margin: 4px 0 0; margin-inline-start: 4px; box-shadow: none; }
}
@media (max-width: 560px) {
  .site-header__inner { gap: 10px; flex-wrap: wrap; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .site-header__search { order: 3; flex-basis: 100%; }
  .page-home .site-header__search { display: none; }
}

/* ---- search ---------------------------------------------------------------------------------------------------- */

.search { position: relative; }
.search__icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
.search__input {
  width: 100%; padding-block: 10px; padding-inline: 42px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem; transition: box-shadow 0.15s, border-color 0.15s;
  -webkit-appearance: none; appearance: none;
}
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__input:focus { outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(10, 130, 199, 0.18); }
.search--large .search__input { padding-block: 18px; padding-inline: 54px 20px; font-size: 1.1rem; border: 0; box-shadow: var(--shadow-pop); }
.search--large .search__icon { inset-inline-start: 20px; width: 1.5em; height: 1.5em; }
.search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; max-height: min(60vh, 520px); overflow: auto;
  padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small);
  box-shadow: var(--shadow-pop); text-align: start;
}
.search__results[hidden] { display: none; }
.search__result { display: block; padding: 10px 12px; border-radius: 10px; color: inherit; }
.search__result:hover, .search__result.is-active { background: var(--surface-hover); text-decoration: none; color: inherit; }
.search__result-title { display: block; font-weight: 600; color: var(--ink); }
.search__result-title mark, .search__result-text mark { background: rgba(250, 184, 64, 0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.search__result-text { display: block; font-size: 0.88rem; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__result-section { display: inline-block; margin-top: 2px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-bright); }
.search__empty, .search__hint { padding: 12px; color: var(--ink-muted); font-size: 0.92rem; }
.search__hint { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 0.8rem; }

/* ---- hero ------------------------------------------------------------------------------------------------------ */

.hero {
  position: relative; color: var(--hero-text); background: var(--brand-gradient);
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
/* decorative glows, clipped by their own layer so that the search results may overflow the hero */
.hero__decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero__decor::before, .hero__decor::after { content: ""; position: absolute; border-radius: 50%; }
.hero__decor::before { width: 520px; height: 520px; right: -160px; top: -220px; background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 65%); }
.hero__decor::after { width: 420px; height: 420px; left: -140px; bottom: -220px; background: radial-gradient(circle, rgba(250,184,64,0.35), transparent 65%); }
.hero__inner { position: relative; max-width: 760px; text-align: center; }
.hero__eyebrow { margin: 0 0 10px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.hero__title { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.3em; }
.hero__subtitle { font-size: 1.15rem; color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 28px; }
.hero__hint { margin: 14px 0 0; font-size: 0.9rem; color: rgba(255,255,255,0.78); }
.page-home .search--large .search__results { text-align: start; color: var(--ink-soft); }

/* ---- home ------------------------------------------------------------------------------------------------------ */

.home-section { margin: 56px 0; }
.home-section--featured { margin-top: 48px; }
.home-section__title { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 20px; }
.page-home .home-section:first-child { margin-top: 48px; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.topic-card {
  display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; box-shadow: var(--shadow-card); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.topic-card:hover { text-decoration: none; color: inherit; transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.topic-card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--brand-gradient); color: #fff; margin-bottom: 8px;
}
.topic-card__icon .icon { width: 1.5em; height: 1.5em; }
.topic-card__title { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.topic-card__description { font-size: 0.93rem; color: var(--ink-muted); flex: 1; }
.topic-card__count { font-size: 0.8rem; font-weight: 600; color: var(--brand-bright); margin-top: 6px; }

.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.article-list--grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.article-list a {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.article-list a:hover { text-decoration: none; color: inherit; background: var(--surface-hover); border-color: var(--line-strong); transform: translateX(2px); }
.article-list__title { font-weight: 600; color: var(--ink); grid-column: 1; }
.article-list__description { grid-column: 1; font-size: 0.9rem; color: var(--ink-muted); }
.article-list__arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--brand-bright); }

/* ---- contact card ---------------------------------------------------------------------------------------------- */

.contact-card {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 56px 0; padding: 28px 30px;
  background: var(--page-alt); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-card__icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px; background: var(--brand-gradient); color: #fff; flex: none; }
.contact-card__icon .icon { width: 1.6em; height: 1.6em; }
.contact-card__body { flex: 1 1 280px; }
.contact-card__body h2 { font-size: 1.25rem; margin-bottom: 4px; }
.contact-card__body p { margin: 0; color: var(--ink-muted); }

/* ---- breadcrumbs, page header, section page -------------------------------------------------------------------- */

.breadcrumbs { margin: 24px 0 20px; font-size: 0.9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; color: var(--ink-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--link); }
.breadcrumbs__sep { width: 1em; height: 1em; opacity: 0.6; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

.page-header { margin-bottom: 28px; }
.page-header__icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px; background: var(--brand-gradient); color: #fff; margin-bottom: 14px; }
.page-header__icon .icon { width: 1.6em; height: 1.6em; }
.page-header__lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 46rem; }
.page-header__meta { font-size: 0.85rem; font-weight: 600; color: var(--brand-bright); }

.section-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: 90px; }
.sidebar__title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.sidebar__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.sidebar__list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-soft); font-size: 0.95rem; }
.sidebar__list a:hover { background: var(--page-alt); text-decoration: none; color: var(--ink); }
.sidebar__list .icon { color: var(--brand-bright); }
.empty { color: var(--ink-muted); }

/* ---- article --------------------------------------------------------------------------------------------------- */

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; }
.article-layout--no-toc { grid-template-columns: minmax(0, 760px); }
.article__header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.article__lead { font-size: 1.15rem; color: var(--ink-muted); }
.article__meta { margin: 0; font-size: 0.85rem; color: var(--ink-muted); }
.article-aside { position: sticky; top: 90px; display: grid; gap: 32px; }

.toc__title, .related__title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.toc ol, .related ul { list-style: none; padding: 0; margin: 0; }
.toc li { border-inline-start: 2px solid var(--line); }
.toc a { display: block; padding-block: 6px; padding-inline: 14px 0; color: var(--ink-muted); font-size: 0.92rem; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.is-active { color: var(--brand-bright); border-inline-start-color: var(--brand-bright); font-weight: 600; }
.related li + li { margin-top: 6px; }
.related a { font-size: 0.95rem; }

.prose { font-size: 1.04rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; padding-top: 0.2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.2rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; }
.prose li + li { margin-top: 0.35em; }
.prose li > ul, .prose li > ol { margin: 0.4em 0 0; }
.prose ol { padding-inline-start: 1.5em; }
.prose ol > li::marker { font-weight: 700; color: var(--brand-bright); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: rgba(10, 130, 199, 0.35); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose figure { margin: 1.6em 0; }
.prose figure img { display: block; border-radius: var(--radius-small); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose blockquote { margin: 1.4em 0; padding-block: 0.2em; padding-inline: 1.2em 0; border-inline-start: 3px solid var(--line-strong); color: var(--ink-muted); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: var(--radius-small); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 10px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--page-alt); color: var(--ink); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

.callout { margin: 1.5em 0; padding: 16px 20px; border-radius: var(--radius-small); border-inline-start: 4px solid var(--callout-note-line); background: var(--callout-note-bg); }
.callout p:last-child { margin-bottom: 0; }
.callout--tip { border-inline-start-color: var(--callout-tip-line); background: var(--callout-tip-bg); }
.callout--important { border-inline-start-color: var(--callout-important-line); background: var(--callout-important-bg); }

@media (max-width: 960px) {
  .section-layout, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sidebar, .article-aside { position: static; }
  .article-aside { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding-top: 24px; border-top: 1px solid var(--line); }
  .toc { display: none; }
}

/* ---- not found, root ------------------------------------------------------------------------------------------- */

.not-found { max-width: 640px; text-align: center; padding: 64px 16px 40px; }
.not-found .search { margin: 24px 0; }
.not-found .hero__eyebrow { color: var(--brand-bright); }
.language-chooser { text-align: center; padding: 80px 16px; }
.language-chooser ul { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* ---- footer ---------------------------------------------------------------------------------------------------- */

.site-footer { margin-top: 48px; background: var(--footer-bg); color: var(--footer-text); font-size: 0.95rem; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 36px; padding-top: 56px; padding-bottom: 40px; }
.site-footer__logo { height: 38px; width: auto; }
.site-footer__claim { margin-top: 14px; color: var(--footer-text); max-width: 300px; }
.site-footer__title { color: #fff; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }
.site-footer__languages { display: flex; gap: 16px; }

/* ---- right to left (Arabic) ---------------------------------------------------------------------------------- */

/* arrows, chevrons and the log-in icon point the other way; the down chevron of the language menu does not */
[dir="rtl"] .icon--directional { transform: scaleX(-1); }
[dir="rtl"] .article-list a:hover { transform: translateX(-2px); }
[dir="rtl"] .hero__decor { transform: scaleX(-1); }
/* code, URLs and e-mail addresses stay left to right (lib/markdown.js gives them dir="ltr") */
[dir="rtl"] code, [dir="rtl"] pre { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] pre { text-align: left; }
/* Arabic is a joined script: no letter spacing; taller lines for its marks above and below */
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3, :root[lang="ar"] h4, :root[lang="ar"] .button,
:root[lang="ar"] .hero__eyebrow, :root[lang="ar"] .home-section__title, :root[lang="ar"] .sidebar__title,
:root[lang="ar"] .toc__title, :root[lang="ar"] .related__title, :root[lang="ar"] .search__result-section,
:root[lang="ar"] .site-footer__title { letter-spacing: 0; text-transform: none; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3, :root[lang="ar"] h4 { line-height: 1.45; }
:root[lang="ar"] body { line-height: 1.75; }
:root[lang="ar"] .prose { line-height: 1.9; }

@media print {
  .site-header, .site-footer, .contact-card, .article-aside, .breadcrumbs, .skip-link { display: none !important; }
  body { color: #000; }
  .article-layout { display: block; }
}
