:root {
  color-scheme: light;
  --accent-deep: #78111f;
  --accent-vivid: #e11d48;
  --accent-warm: #b96f33;
  --dark-foreground: #edf1ff;
  --bg: #f2f5fa;
  --bg-gradient: linear-gradient(180deg, #fff4f0 0%, #f7f1f5 42%, #f2f5fa 100%);
  --card: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.84);
  --border: rgba(210, 216, 232, 0.92);
  --border-strong: rgba(210, 216, 232, 0.72);
  --text: #0b1120;
  --muted: #546070;
  --muted-faint: rgba(84, 96, 112, 0.28);
  --muted-soft: rgba(84, 96, 112, 0.42);
  --muted-icon: rgba(84, 96, 112, 0.6);
  --soft-accent: rgba(225, 29, 72, 0.08);
  --soft-accent-border: rgba(225, 29, 72, 0.18);
  --notice-bg: rgba(185, 111, 51, 0.08);
  --notice-border: rgba(185, 111, 51, 0.18);
  --shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.06);
  --hero-shadow: 0 16px 30px -12px rgba(225, 29, 72, 0.22);
  --font-ar: "Cairo", "Tajawal", "Noto Kufi Arabic", "Segoe UI", Arial, sans-serif;
  --font-en: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050911;
  --bg-gradient: linear-gradient(180deg, #03060e 0%, #070b15 42%, #050911 100%);
  --card: #0d1826;
  --surface-glass: rgba(255, 255, 255, 0.08);
  --border: rgba(49, 65, 88, 0.92);
  --border-strong: rgba(49, 65, 88, 0.28);
  --text: #edf1ff;
  --muted: #8a96aa;
  --muted-faint: rgba(138, 150, 170, 0.28);
  --muted-soft: rgba(138, 150, 170, 0.42);
  --muted-icon: rgba(138, 150, 170, 0.6);
  --soft-accent: rgba(225, 29, 72, 0.15);
  --soft-accent-border: rgba(225, 29, 72, 0.28);
  --notice-bg: rgba(185, 111, 51, 0.12);
  --notice-border: rgba(185, 111, 51, 0.24);
  --shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.28);
  --hero-shadow: 0 16px 30px -12px rgba(225, 29, 72, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--bg-gradient);
}

html[lang="en"] body {
  direction: ltr;
  font-family: var(--font-en);
}

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

button {
  font: inherit;
}

.page-shell {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 14px 0 calc(34px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
}

.glass-icon-button,
.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface-glass);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.glass-icon-button {
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

.language-button {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 12px;
}

.glass-icon-button:hover,
.language-button:hover,
.service-tile:hover,
.mail-button:hover {
  transform: translateY(-1px);
}

.topbar-title {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-title .eyebrow,
.hero-label {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
}

html[lang="en"] .topbar-title .eyebrow,
html[lang="en"] .hero-label {
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-title h1 {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-glass);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #00d97e;
  box-shadow: 0 0 0 4px rgba(0, 217, 126, 0.14);
}

.status-chip.is-offline .status-dot {
  background: #ff2d55;
  box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.14);
}

.hero-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(237, 241, 255, 0.22);
  border-radius: 28px;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent-vivid) 82%, var(--accent-warm) 100%);
  box-shadow: var(--hero-shadow);
  color: var(--dark-foreground);
}

.hero-head,
.card-head,
.fact-tile,
.service-tile,
.permission-row,
.policy-bullet,
.inline-notice,
.mail-button {
  display: flex;
  align-items: flex-start;
}

.hero-head {
  gap: 12px;
}

.hero-icon {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(237, 241, 255, 0.22);
  border-radius: 18px;
  background: rgba(237, 241, 255, 0.15);
}

.hero-icon .icon {
  width: 27px;
  height: 27px;
}

.hero-label {
  color: rgba(237, 241, 255, 0.72);
}

.hero-card h2 {
  margin: 6px 0 0;
  color: var(--dark-foreground);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
}

.hero-copy {
  margin: 14px 0 0;
  color: rgba(237, 241, 255, 0.86);
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.4;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--dark-foreground);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.hero-pill .icon {
  width: 14px;
  height: 14px;
}

.sections-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.policy-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-head {
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16.5px;
  font-weight: 900;
  line-height: 1.2;
}

.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.8px;
  line-height: 1.3;
}

.gradient-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent-vivid) 82%, var(--accent-warm) 100%);
  box-shadow: 0 6px 16px -6px rgba(225, 29, 72, 0.22);
  color: var(--dark-foreground);
}

.gradient-icon .icon {
  width: 21px;
  height: 21px;
}

.policy-paragraph {
  margin: 0;
  color: var(--muted);
  font-size: 12.8px;
  font-weight: 500;
  line-height: 1.5;
}

.policy-paragraph.spaced {
  margin-top: 14px;
}

.fact-list,
.service-list,
.permission-list,
.bullet-list {
  display: grid;
}

.fact-tile,
.service-tile {
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.service-tile {
  padding: 4px 0;
  border-radius: 18px;
  transition: transform 160ms ease;
}

.mini-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--soft-accent-border);
  border-radius: 12px;
  background: var(--soft-accent);
  color: var(--accent-vivid);
}

.mini-icon .icon {
  width: 17px;
  height: 17px;
}

.fact-tile h3,
.service-tile h3,
.permission-row h3 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 14.2px;
  font-weight: 900;
  line-height: 1.2;
}

.permission-row h3 {
  margin-bottom: 4px;
  font-size: 15px;
}

.section-divider {
  height: 1px;
  margin: 13px 0;
  background: linear-gradient(90deg, transparent, rgba(84, 96, 112, 0.22), transparent);
}

:root[data-theme="dark"] .section-divider {
  background: linear-gradient(90deg, transparent, rgba(138, 150, 170, 0.22), transparent);
}

.inline-notice {
  gap: 9px;
  width: 100%;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--notice-border);
  border-radius: 18px;
  background: var(--notice-bg);
  color: var(--text);
  font-size: 12.6px;
  font-weight: 700;
  line-height: 1.35;
}

.inline-notice.stacked {
  margin-top: 10px;
}

.inline-notice .icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--accent-warm);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.policy-chip {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 8px 10px;
  border: 1px solid var(--soft-accent-border);
  border-radius: 999px;
  background: var(--soft-accent);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.policy-bullet {
  gap: 10px;
  margin: 0;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.policy-bullet:last-child {
  padding-bottom: 0;
}

.check-icon {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(225, 29, 72, 0.22);
  border-radius: 8px;
  background: rgba(225, 29, 72, 0.12);
  color: var(--accent-vivid);
}

.check-icon .icon {
  width: 15px;
  height: 15px;
}

.external-icon {
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-inline-start: auto;
  color: var(--muted-icon);
}

.permission-row {
  gap: 11px;
}

.permission-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-vivid), var(--accent-warm));
}

.mail-button {
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent-vivid) 82%, var(--accent-warm) 100%);
  box-shadow: 0 8px 18px -8px rgba(225, 29, 72, 0.24);
  color: var(--dark-foreground);
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease;
}

.mail-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer {
  padding-top: 24px;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--muted-faint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: lowercase;
}

.footer span {
  display: block;
  margin-top: 8px;
  color: var(--muted-soft);
  font-size: 10px;
}

.icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: currentColor;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

html[dir="rtl"] .topbar-title,
html[dir="rtl"] .hero-card,
html[dir="rtl"] .policy-card {
  text-align: right;
}

html[dir="ltr"] .topbar-title,
html[dir="ltr"] .hero-card,
html[dir="ltr"] .policy-card {
  text-align: left;
}

html[dir="rtl"] [data-icon="chevron"] {
  transform: scaleX(-1);
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 24px, 820px);
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    gap: 6px;
  }

  .status-chip {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .status-chip span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 20px, 820px);
    padding-top: 12px;
  }

  .topbar {
    gap: 8px;
  }

  .glass-icon-button,
  .language-button,
  .status-chip {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .topbar-title h1 {
    font-size: 18px;
  }

  .hero-card {
    padding: 16px;
    border-radius: 24px;
  }

  .hero-card h2 {
    font-size: 22px;
  }

  .policy-card {
    padding: 15px;
    border-radius: 22px;
  }
}
