:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #12242c;
  --muted: #647277;
  --line: #dce3df;
  --primary: #0b7c74;
  --primary-strong: #075e58;
  --gold: #d5a53f;
  --deep: #081b24;
  --shadow: 0 20px 60px rgba(8, 27, 36, 0.085);
  --radius: 24px;
  --shell: min(1180px, calc(100% - 40px));
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #07151b;
  --surface: #0d222b;
  --surface-2: #122d36;
  --ink: #ecf6f4;
  --muted: #a9babd;
  --line: #24404a;
  --primary: #31b6a9;
  --primary-strong: #6bd2c9;
  --deep: #030d11;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.translated-ltr,
html.translated-ltr body,
html[lang^="en"],
html[lang^="en"] body { direction: ltr; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link {
  position: fixed;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  z-index: 9999;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 10px;
}
.skip-link:focus { inset-block-start: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
	position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 1.2rem;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0f9187, #087069);
  color: #fff;
  box-shadow: inset 0 -7px 15px rgba(0, 0, 0, 0.13);
}
.primary-nav { margin-inline-start: auto; }
.primary-nav ul,
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}
.primary-nav a {
  display: block;
  padding: 10px 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.94rem;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--primary); }
.theme-toggle,
.menu-toggle {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.menu-toggle { display: none; padding-inline: 14px; font-weight: 800; }
.menu-toggle__icon { font-size: 1rem; line-height: 1; }

.hero {
  padding: 68px 0 64px;
  overflow: hidden;
  background: radial-gradient(circle at 15% 15%, rgba(213, 165, 63, 0.13), transparent 28%),
              linear-gradient(180deg, var(--bg), var(--surface-2));
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.hero h1,
.page-header h1,
.tool-header h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 4.8vw, 4.05rem);
  line-height: 1.18;
  letter-spacing: -0.045em;
}
.hero-copy > p,
.page-header > p,
.tool-header > p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 23px;
  border-radius: 14px;
  font-weight: 900;
}
.button--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 30px rgba(11, 124, 116, 0.22);
}
.button--primary:hover { background: var(--primary-strong); }
.button--ghost { background: var(--surface); border: 1px solid var(--line); }
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.trust-list li::before {
  content: "✓";
  margin-inline-end: 6px;
  color: var(--primary);
  font-weight: 900;
}
.hero-panel {
  position: relative;
  min-height: 350px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 52px 62px auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(11, 124, 116, 0.13);
}
.mini-card {
  position: absolute;
  display: grid;
  gap: 6px;
  padding: 18px 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(8, 27, 36, 0.1);
}
.mini-card span { color: var(--muted); font-size: 0.82rem; }
.mini-card strong { font-size: 1.3rem; }
.mini-card--top { inset: 38px auto auto 28px; }
.mini-card--main { inset: 124px 38px auto 38px; min-width: 280px; }
.mini-card--bottom { inset: auto 24px 31px auto; }
.meter { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.meter i { display: block; width: 67%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--gold)); }

.section { padding-block: 66px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 28px;
}
.section-heading h2,
.section--ink h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.3; }
.section-heading > a { color: var(--primary); font-weight: 900; white-space: nowrap; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-card { margin: 0; }
.tool-card__link {
  display: block;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(8, 27, 36, 0.035);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tool-card__link:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.tool-card__icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 24px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 900;
}
.tool-card__title { margin: 0 0 9px; font-size: 1.13rem; line-height: 1.5; }
.tool-card__excerpt { margin: 0 0 18px; color: var(--muted); font-size: 0.91rem; }
.tool-card__action { color: var(--primary); font-size: 0.86rem; font-weight: 900; }
.empty-state {
  grid-column: 1 / -1;
  padding: 38px 34px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.launch-preview {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  box-shadow: 0 14px 45px rgba(8, 27, 36, 0.045);
}
.launch-preview::before {
  content: "";
  position: absolute;
  inset: -90px auto auto -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  pointer-events: none;
}
.launch-preview__badge {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}
.launch-preview h3 { position: relative; margin: 13px 0 6px; font-size: 1.22rem; }
.launch-preview p { max-width: 570px; margin: 0 auto; color: var(--muted); font-size: 0.94rem; }
.launch-preview__items { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.launch-preview__items span { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.82rem; }
.archive-empty .button { margin-top: 22px; }
.archive-empty h2 { margin: 13px 0 7px; font-size: clamp(1.25rem, 3vw, 1.7rem); }

.section--ink { background: var(--deep); color: #fff; }
.principles-grid { display: grid; grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr); gap: 52px; align-items: start; }
.eyebrow--light { color: #72d8cf; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.principles > div {
  min-width: 0;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}
.principles strong { color: var(--gold); font-size: 0.82rem; }
.principles h3 { margin: 21px 0 7px; font-size: 1.06rem; line-height: 1.5; }
.principles p { margin: 0; color: #b6c5c8; font-size: 0.88rem; overflow-wrap: anywhere; }

.content-shell { min-height: 65vh; padding-block: 62px; }
.content-shell--tool { max-width: 1040px; }
.page-header,
.tool-header { margin-bottom: 32px; }
.page-header h1,
.tool-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.article,
.tool-page { max-width: 900px; margin-inline: auto; }
.prose { font-size: 1.02rem; }
.prose h2 { margin-top: 2.3em; font-size: 1.65rem; line-height: 1.45; }
.prose h3 { margin-top: 2em; font-size: 1.22rem; }
.prose p,
.prose li { color: var(--muted); }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 18px; }

.site-footer { padding: 44px 0 23px; background: var(--deep); color: #dce8e9; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 35px; align-items: start; }
.brand--footer { color: #fff; }
.site-footer p { margin: 12px 0 0; color: #aabcbf; }
.site-footer a:hover { color: #72d8cf; }
.footer-nav ul { flex-wrap: wrap; justify-content: flex-end; gap: 11px 22px; }
.footer-nav a { display: block; padding-block: 8px; font-size: 0.9rem; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.8rem; }
.footer-bottom p { max-width: 850px; margin: 0; line-height: 1.8; }
.pagination { margin-top: 35px; }
.nav-links { display: flex; gap: 8px; }
.page-numbers { padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

@media (max-width: 900px) {
  .hero-grid,
  .principles-grid { grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .hero-panel { order: 2; width: min(100%, 520px); min-height: 290px; margin-inline: auto; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles-grid { gap: 30px; }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .primary-nav {
    display: none;
    position: absolute;
    inset: 76px 20px auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
	z-index: 20;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; gap: 0; }
  .primary-nav a { padding: 10px 12px; }
  .menu-toggle { display: inline-block; margin-inline-start: auto; }
  .theme-toggle { margin-inline-start: 0; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 640px) {
  :root { --shell: min(100% - 32px, 1180px); --radius: 20px; }
  body { font-size: 15px; }
  .header-inner { min-height: 60px; gap: 7px; }
  .brand { gap: 8px; }
  .brand__mark { width: 36px; height: 36px; border-radius: 12px; }
  .brand__name { font-size: 1rem; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; min-width: auto; min-height: 40px; padding-inline: 11px; font-size: 0.84rem; }
  .theme-toggle { width: 40px; min-width: 40px; min-height: 40px; }
  .primary-nav {
	inset-block-start: calc(100% + 8px);
	inset-inline: 0;
	max-height: calc(100vh - 92px);
	overflow-y: auto;
	background: var(--surface);
	box-shadow: 0 20px 45px rgba(8, 27, 36, 0.2);
  }

  .hero { padding: 32px 0 36px; }
  .hero-grid { gap: 30px; }
  .eyebrow { margin-bottom: 7px; font-size: 0.78rem; }
  .hero h1 { max-width: 15ch; margin-bottom: 13px; font-size: clamp(1.9rem, 8.7vw, 2.2rem); line-height: 1.3; letter-spacing: -0.03em; }
  .hero-copy > p { font-size: 0.94rem; line-height: 1.8; }
  .hero-actions { display: grid; gap: 9px; margin-top: 20px; }
  .button { width: 100%; min-height: 45px; padding-block: 8px; border-radius: 13px; }
  .trust-list { justify-content: flex-start; gap: 6px 12px; margin-top: 18px; font-size: 0.75rem; }
  .hero-panel { min-height: 215px; border-radius: 23px; transform: none; }
  .hero-panel::before { inset: 26px 38px auto auto; width: 108px; height: 108px; }
  .mini-card { gap: 3px; padding: 11px 13px; border-radius: 14px; }
  .mini-card span { font-size: 0.72rem; }
  .mini-card strong { font-size: 1rem; }
  .mini-card--top { inset: 14px auto auto 12px; }
  .mini-card--main { inset: 68px 17px auto; min-width: 0; }
  .mini-card--bottom { inset: auto 10px 13px auto; }

  .section { padding-block: 40px; }
  .section-heading { align-items: start; margin-bottom: 18px; }
  .section-heading h2,
  .section--ink h2 { font-size: 1.65rem; }
  .section-heading > a { padding-top: 17px; font-size: 0.8rem; }
  .tool-grid,
  .principles { grid-template-columns: 1fr; }
  .empty-state { padding: 24px 17px; }
  .launch-preview h3 { font-size: 1.02rem; }
  .launch-preview p { font-size: 0.84rem; }
  .launch-preview__items { gap: 6px; margin-top: 15px; }
  .launch-preview__items span { padding: 6px 10px; font-size: 0.75rem; }

  .principles-grid { gap: 21px; }
  .principles > div {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 13px;
    align-items: start;
    padding: 15px;
  }
  .principles strong { grid-row: 1 / span 2; padding-top: 3px; font-size: 0.9rem; }
  .principles h3 { margin: 0 0 4px; font-size: 1rem; }
  .principles p { font-size: 0.84rem; line-height: 1.7; }

  .content-shell { padding-block: 42px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .site-footer { padding-top: 34px; }
  .footer-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
  .footer-nav a { padding-block: 7px; font-size: 0.86rem; }
  .footer-bottom { margin-top: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
