@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/IBMPlexSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #121115;
  --background-soft: #18171b;
  --surface: rgba(39, 36, 40, 0.78);
  --surface-strong: #282429;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --primary: #ff5f3b;
  --primary-light: #ff896f;
  --primary-dark: #d93b1c;
  --text: #ffffff;
  --text-secondary: #c6c0c4;
  --text-muted: #918a8f;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 95, 59, 0.26);
  --danger: #ff746f;
  --danger-soft: rgba(255, 77, 70, 0.08);
  --success: #67d99b;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
  --radius-large: 30px;
  --radius-medium: 20px;
  --container: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 2%, rgba(255, 95, 59, 0.15), transparent 30rem),
    radial-gradient(circle at 7% 35%, rgba(255, 95, 59, 0.055), transparent 26rem),
    linear-gradient(160deg, #111014 0%, #18161a 48%, #121115 100%);
  font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--primary);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 17, 21, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--container));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 13px 32px rgba(255, 95, 59, 0.25);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  direction: ltr;
  text-align: right;
  font-size: 1.13rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav a[aria-current="page"] {
  border-color: rgba(255, 95, 59, 0.22);
  background: rgba(255, 95, 59, 0.095);
}

.page-shell {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 56px 0 34px;
}

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background:
    linear-gradient(135deg, rgba(255, 95, 59, 0.11), transparent 54%),
    rgba(38, 35, 39, 0.8);
  box-shadow: var(--shadow);
}

.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 270px;
  height: 270px;
  top: -160px;
  left: -80px;
  border-radius: 50%;
  background: rgba(255, 95, 59, 0.13);
  filter: blur(10px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 95, 59, 0.2);
  border-radius: 999px;
  color: #ff9b84;
  background: rgba(255, 95, 59, 0.09);
  font-size: 0.78rem;
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(255, 95, 59, 0.1);
}

.page-hero h1,
.home-hero h1 {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.045em;
}

.page-hero .lead,
.home-hero .lead {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 2vw, 1.13rem);
  line-height: 1.95;
}

.updated-at {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.hero-symbol {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  color: var(--primary-light);
  background: linear-gradient(145deg, rgba(255, 95, 59, 0.14), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 55px rgba(0, 0, 0, 0.22);
}

.hero-symbol svg {
  width: 48px;
  height: 48px;
}

.content-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-top: 28px;
}

.toc {
  position: sticky;
  top: 106px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: rgba(37, 34, 38, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.toc-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.toc-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.toc-list a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.article-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.19);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.article-section {
  position: relative;
  padding: 30px clamp(22px, 4vw, 42px);
  border-bottom: 1px solid var(--border);
}

.article-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 13px;
}

.section-number {
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 95, 59, 0.22);
  border-radius: 11px;
  color: var(--primary-light);
  background: rgba(255, 95, 59, 0.08);
  direction: ltr;
  font-size: 0.74rem;
  font-weight: 700;
}

.article-section h2 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: clamp(1.13rem, 2.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.5;
}

.article-section p,
.article-section li {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 2;
}

.article-section p {
  margin: 0;
}

.article-section p + p {
  margin-top: 10px;
}

.article-section ul,
.article-section ol {
  display: grid;
  gap: 9px;
  margin: 15px 0 0;
  padding: 0 23px 0 0;
}

.article-section li::marker {
  color: var(--primary);
  font-weight: 700;
}

.text-link {
  color: #ff9e88;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 158, 136, 0.36);
  text-underline-offset: 4px;
  word-break: break-word;
}

.ltr {
  direction: ltr;
  unicode-bidi: embed;
}

.notice {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 95, 59, 0.22);
  border-radius: 16px;
  color: #ffd0c5;
  background: rgba(255, 95, 59, 0.075);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.85;
}

.notice-danger {
  border-color: rgba(255, 116, 111, 0.22);
  color: #ffc4c1;
  background: var(--danger-soft);
}

.notice-success {
  border-color: rgba(103, 217, 155, 0.22);
  color: #bcefd2;
  background: rgba(103, 217, 155, 0.075);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 20px;
}

.button-row-center {
  justify-content: center;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary) 52%, var(--primary-dark));
  box-shadow: 0 14px 32px rgba(255, 95, 59, 0.21);
}

.secondary-button {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  box-shadow: 0 18px 38px rgba(255, 95, 59, 0.27);
}

.button-icon {
  width: 18px;
  height: 18px;
}

.home-main {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
  padding: 72px 0 44px;
}

.home-hero {
  max-width: 940px;
  margin-inline: auto;
  text-align: center;
}

.home-hero .eyebrow {
  margin-inline: auto;
}

.home-hero h1,
.home-hero .lead {
  margin-inline: auto;
}

.home-highlight {
  color: var(--primary-light);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.route-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 95, 59, 0.11), transparent 45%),
    rgba(38, 35, 39, 0.74);
  text-decoration: none;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 95, 59, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 95, 59, 0.16), transparent 48%),
    rgba(42, 38, 42, 0.9);
}

.route-card-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 95, 59, 0.2);
  border-radius: 15px;
  color: var(--primary-light);
  background: rgba(255, 95, 59, 0.08);
}

.route-card-icon svg {
  width: 23px;
  height: 23px;
}

.route-card h2 {
  margin: 20px 0 6px;
  font-size: 1.2rem;
  line-height: 1.45;
}

.route-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.8;
}

.route-card-arrow {
  margin-top: auto;
  padding-top: 18px;
  color: var(--primary-light);
  font-size: 1.25rem;
  font-weight: 700;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.support-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(39, 36, 40, 0.75);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.support-card-wide {
  grid-column: 1 / -1;
}

.support-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.5;
}

.support-card p,
.support-card li {
  color: var(--text-secondary);
  font-size: 0.91rem;
  line-height: 1.9;
}

.support-card p {
  margin: 0;
}

.support-card ul {
  display: grid;
  gap: 10px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.support-card li {
  position: relative;
  padding: 12px 40px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.support-card li::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.email-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.email-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.email-value {
  display: block;
  margin-top: 3px;
  color: var(--text);
  direction: ltr;
  text-align: right;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-list a:hover {
  color: var(--text);
  border-color: rgba(255, 95, 59, 0.22);
  background: rgba(255, 95, 59, 0.07);
}

.site-footer {
  width: min(calc(100% - 40px), var(--container));
  margin: 18px auto 0;
  padding: 24px 0 30px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.not-found {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found-card {
  width: min(100%, 620px);
  padding: 42px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.not-found-code {
  color: var(--primary-light);
  direction: ltr;
  font-size: 4.8rem;
  font-weight: 700;
  line-height: 1;
}

.not-found h1 {
  margin: 18px 0 9px;
  font-size: 1.7rem;
}

.not-found p {
  margin: 0;
  color: var(--text-muted);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(255, 137, 111, 0.72);
  outline-offset: 3px;
}

@media (max-width: 940px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 15px 0;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 150px;
  }

  .header-inner,
  .page-shell,
  .home-main,
  .site-footer {
    width: min(calc(100% - 24px), var(--container));
  }

  .brand-subtitle {
    display: none;
  }

  .page-shell {
    padding-top: 28px;
  }

  .page-hero {
    border-radius: 23px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-symbol {
    width: 76px;
    height: 76px;
    border-radius: 23px;
    order: -1;
  }

  .hero-symbol svg {
    width: 35px;
    height: 35px;
  }

  .content-layout {
    margin-top: 18px;
  }

  .article-card {
    border-radius: 23px;
  }

  .article-section {
    padding-block: 24px;
  }

  .home-main {
    padding-top: 42px;
  }

  .home-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .support-card-wide {
    grid-column: auto;
  }

  .link-list {
    grid-template-columns: 1fr;
  }

  .email-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 470px) {
  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .site-nav a {
    padding: 8px 10px;
    font-size: 0.77rem;
  }

  .page-hero {
    padding: 24px 19px;
  }

  .page-hero h1,
  .home-hero h1 {
    font-size: 1.82rem;
  }

  .toc {
    padding: 16px;
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 11px;
  }

  .article-section p,
  .article-section li {
    font-size: 0.9rem;
  }

  .route-card,
  .support-card {
    padding: 21px;
  }

  .button-row,
  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
