:root {
  --ink: #0b1117;
  --navy: #14222d;
  --steel: #2a6689;
  --sky: #55a8d3;
  --mist: #dcebf3;
  --paper: #f5f7f9;
  --white: #ffffff;
  --line: rgba(20, 34, 45, .09);
  --line-dark: rgba(255, 255, 255, .10);
  --text: #172630;
  --text-2: #3d4f5b;
  --text-3: #5b6d78;
  --on-dark-2: #b4c6d2;
  --green: #1b7b65;
  --live: #4cc38a;
  --radius: 16px;
  --max: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
strong, b { font-weight: 600; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -80px; z-index: 100; padding: 8px 16px; background: var(--white); border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 249, .94);
  backdrop-filter: blur(12px);
}
.nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; color: var(--navy); text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -.01em; direction: ltr; unicode-bidi: isolate; }
.brand span { color: var(--steel); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s var(--ease); }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--navy); }
.lang-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }

/* Hero: text on calm ink, the concept screen rises from the bottom edge */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 0;
  background: var(--ink);
  color: var(--white);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: end; min-height: min(calc(100vh - 64px - 32px), 720px); }
.hero-grid > div:first-child { align-self: center; padding-bottom: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--on-dark-2); font-size: 14px; font-weight: 500; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
h1 { max-width: 720px; margin: 0 0 20px; font-size: clamp(40px, 5.6vw, 64px); font-weight: 600; line-height: 1.06; letter-spacing: -.03em; }
[dir="rtl"] h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.24; letter-spacing: 0; }
.hero-lede { max-width: 600px; margin: 0; color: var(--on-dark-2); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; }
.hero-lede strong { color: var(--white); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 600; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease); }
.button:active { transform: scale(.98); }
.button-primary { background: var(--sky); color: var(--ink); }
.button-primary:hover { background: #6bb5dc; }
.button-secondary { border-color: rgba(255,255,255,.18); color: var(--white); background: transparent; }
.button-secondary:hover { border-color: rgba(255,255,255,.36); background: rgba(255,255,255,.04); }
.button-dark { background: var(--navy); color: var(--white); }
.button-dark:hover { background: #1d3140; }
.button-light { border-color: var(--line); background: var(--white); color: var(--navy); }

.concept-card { display: flex; flex-direction: column; width: min(340px, 100%); margin: 0 auto; }
.concept-card .screen-window { height: 520px; overflow: hidden; border-radius: 36px 36px 0 0; }
.concept-card img { width: 100%; height: auto; }
.concept-card figcaption { order: -1; padding: 0 0 16px; color: #8a9caa; font-size: 13px; text-align: center; }

/* Fact strip */
.fact-strip { position: relative; z-index: 2; margin-top: 0; border-bottom: 1px solid var(--line); background: var(--white); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 24px 24px 24px 0; }
.fact + .fact { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
[dir="rtl"] .fact { padding: 24px 0 24px 24px; }
[dir="rtl"] .fact + .fact { padding-inline-start: 24px; }
.fact small { display: block; color: var(--text-3); font-size: 13px; font-weight: 400; }
.fact strong { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--navy); font-size: 17px; font-weight: 600; }

/* Sections */
main section { padding: 96px 0; }
.section-alt { background: var(--white); }
.kicker { margin: 0 0 12px; color: var(--steel); font-size: 14px; font-weight: 600; }
h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
[dir="rtl"] h2 { line-height: 1.4; letter-spacing: 0; }
h3 { color: var(--navy); font-weight: 600; line-height: 1.4; }
.lead { max-width: 720px; margin: 16px 0 0; color: var(--text-3); font-size: 17px; }
.definition { max-width: 880px; margin-top: 32px; padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--text-2); font-size: 18px; }
.definition strong { color: var(--navy); }
.definition p { margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.card.dark { border-color: transparent; background: var(--navy); color: var(--on-dark-2); }
.card h3 { margin: 0 0 8px; font-size: 22px; }
.card.dark h3 { color: var(--white); }
.card.dark .kicker { color: var(--sky); }
.card p { margin: 0; color: var(--text-3); }
.card.dark p { color: var(--on-dark-2); }
.clean-list { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.clean-list li { position: relative; padding-inline-start: 28px; }
.clean-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 9px; width: 12px; height: 7px; border-inline-start: 1.5px solid var(--steel); border-bottom: 1.5px solid var(--steel); transform: rotate(-45deg); }
[dir="rtl"] .clean-list li::before { transform: rotate(45deg) scaleX(-1); }
.dark .clean-list li::before { border-color: var(--sky); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; counter-reset: steps; }
.step { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); counter-increment: steps; }
.step::before { content: counter(steps); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--steel); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--text-3); font-size: 15px; }

.table-wrap { overflow-x: auto; margin-top: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: var(--paper); color: var(--text-3); font-size: 13px; font-weight: 500; }
td { font-size: 15px; color: var(--text-2); }
td strong { color: var(--navy); }
tr:last-child td { border-bottom: 0; }

.boundary { padding: 32px; border: 1px solid rgba(27, 123, 101, .18); border-radius: var(--radius); background: #f1f8f5; }
.boundary h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 3vw, 32px); }
.boundary p { max-width: 840px; margin: 12px 0 0; color: #36574f; }
.boundary strong { color: #155f4d; }

.faq { max-width: 880px; margin-top: 32px; }
.faq details { border-top: 1px solid var(--line); background: transparent; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 4px; color: var(--navy); font-size: 17px; font-weight: 600; }
.faq details p { margin: 0; padding: 0 4px 24px; color: var(--text-3); }

.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.related a { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-decoration: none; transition: border-color .15s var(--ease); }
.related a:hover { border-color: rgba(42, 102, 137, .4); }
.related strong { display: block; color: var(--navy); font-size: 18px; }
.related span { display: block; margin-top: 4px; color: var(--text-3); font-size: 15px; }

.cta { padding: 64px 0; background: var(--navy); color: var(--white); }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { color: var(--white); }
.cta p { max-width: 640px; margin: 12px 0 0; color: var(--on-dark-2); }

.site-footer { padding: 40px 0; background: var(--ink); color: var(--on-dark-2); }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; }
.site-footer .brand { color: var(--white); }
.site-footer .brand span { color: var(--sky); }
.site-footer p { max-width: 720px; margin: 8px 0 0; color: #93a7b4; font-size: 14px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); }

/* Guide pages */
.breadcrumbs { padding: 24px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--text-3); font-size: 13px; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 8px; color: #9aabb5; }
.page-hero { padding: 64px 0 72px; background: var(--ink); color: var(--white); }
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); }
.page-hero .lead { color: var(--on-dark-2); }
.summary-box { margin-top: 24px; padding: 24px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(255,255,255,.03); }
.summary-box strong { display: block; margin-bottom: 8px; color: var(--sky); }
.summary-box ul { margin: 0; padding-inline-start: 20px; }
.summary-box li { margin: 4px 0; }

.not-found { min-height: 70vh; display: grid; place-items: center; padding: 80px 20px; text-align: center; }
.not-found strong { color: var(--steel); font-size: 64px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.not-found h1 { margin: 16px auto 12px; color: var(--navy); font-size: clamp(32px, 6vw, 52px); }
.not-found p { max-width: 560px; margin: 0 auto; color: var(--text-3); }

@media (max-width: 920px) {
  .nav-links a:not(.lang-link) { display: none; }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .hero-grid > div:first-child { padding-bottom: 0; }
  .concept-card { width: min(300px, 80%); }
  .concept-card .screen-window { height: 420px; border-radius: 32px 32px 0 0; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact, [dir="rtl"] .fact { padding: 20px 0; }
  .fact + .fact { padding-inline-start: 0; border-inline-start: 0; }
  .fact:nth-child(even) { padding-inline-start: 20px !important; border-inline-start: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cta-grid { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .wrap { width: min(100% - 32px, var(--max)); }
  .nav { min-height: 60px; }
  .brand { font-size: 19px; }
  .hero { padding-top: 40px; }
  h1 { font-size: 40px; }
  [dir="rtl"] h1 { font-size: 36px; }
  .concept-card { width: min(260px, 76%); }
  .concept-card .screen-window { height: 360px; border-radius: 28px 28px 0 0; }
  .fact strong { font-size: 15px; }
  main section { padding: 64px 0; }
  .two-col, .steps, .related { grid-template-columns: 1fr; }
  .step::before { margin-bottom: 20px; }
  .card, .boundary { padding: 24px; }
  .definition { padding: 24px; font-size: 17px; }
  .footer-grid { flex-direction: column; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .table-wrap table { min-width: 0; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { display: block; margin-bottom: 12px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
  .table-wrap td { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .table-wrap tr:last-child td { border-bottom: 1px solid var(--line); }
  .table-wrap tr td:last-child { border-bottom: 0; }
  .table-wrap td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--text-3); font-size: 13px; font-weight: 500; }
  .table-wrap tr td:first-child { padding-top: 0; font-size: 17px; }
  .table-wrap tr td:first-child::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
