:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #152033;
  --muted: #5a6678;
  --line: #dbe3ef;
  --primary: #1d4ed8;
  --primary-soft: #e8f0ff;
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

html[dir="rtl"] {
  font-family: Tahoma, "Noto Sans Arabic", "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.masthead {
  padding: 28px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

html[dir="rtl"] .brand {
  flex-direction: row-reverse;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

h1 {
  margin: 36px 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.panel {
  margin-top: 28px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

h2 {
  margin: 28px 0 10px;
  font-size: 1.28rem;
  letter-spacing: 0;
}

h2:first-child {
  margin-top: 0;
}

p,
ul {
  margin: 0 0 16px;
}

ul {
  padding-left: 22px;
}

html[dir="rtl"] ul {
  padding-right: 22px;
  padding-left: 0;
}

a {
  color: var(--primary);
}

.notice {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #b9cdf8;
  background: var(--primary-soft);
  border-radius: 8px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 28px;
  align-items: center;
  margin-top: 28px;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #061b44 0%, #0b4ea2 56%, #06a7b7 100%);
  border-radius: 8px;
}

.hero-panel h2 {
  margin-top: 0;
  color: #ffffff;
}

.hero-panel p {
  color: rgba(255, 255, 255, 0.88);
}

.app-icon-large {
  width: 156px;
  height: 156px;
  padding: 16px;
  justify-self: end;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
}

html[dir="rtl"] .app-icon-large {
  justify-self: start;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.mini-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.button.secondary {
  color: var(--primary);
  background: var(--primary-soft);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.94rem;
}

.links-page {
  width: min(720px, calc(100% - 32px));
}

.links-hero,
.download-hero {
  text-align: center;
}

.links-hero .brand-mark,
.download-hero .brand-mark {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(17, 43, 92, 0.18);
}

.links-hero h1,
.download-hero h1 {
  margin-top: 22px;
}

.download-page {
  width: min(860px, calc(100% - 32px));
}

.download-panel {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 24px;
  align-items: center;
  margin-top: 26px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.download-panel h2 {
  margin-top: 0;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.store-button {
  min-width: 150px;
}

.download-grid {
  margin-top: 18px;
}

.link-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.link-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.link-card:hover {
  border-color: #a9bff2;
  box-shadow: 0 14px 34px rgba(17, 43, 92, 0.1);
  transform: translateY(-1px);
}

.link-icon {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(17, 43, 92, 0.14);
}

.link-card strong {
  display: block;
  margin-bottom: 2px;
}

.link-card span {
  color: var(--muted);
}

.link-arrow {
  color: var(--primary);
  font-weight: 800;
}

html[dir="rtl"] .link-card {
  grid-template-columns: auto 1fr 44px;
}

html[dir="rtl"] .link-icon {
  grid-column: 3;
}

html[dir="rtl"] .link-card > span:not(.link-arrow) {
  grid-column: 2;
}

html[dir="rtl"] .link-arrow {
  grid-column: 1;
  grid-row: 1;
}

.link-note {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 0.94rem;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 24px, 920px);
    padding: 20px 0 42px;
  }

  .panel {
    padding: 20px;
  }

  .hero-panel,
  .download-panel,
  .feature-grid,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .app-icon-large {
    justify-self: start;
    width: 120px;
    height: 120px;
  }

  .links-page {
    width: min(100% - 24px, 720px);
  }

  .link-card {
    grid-template-columns: 40px 1fr;
  }

  html[dir="rtl"] .link-card {
    grid-template-columns: 1fr 40px;
  }

  html[dir="rtl"] .link-icon {
    grid-column: 2;
  }

  html[dir="rtl"] .link-card > span:not(.link-arrow) {
    grid-column: 1;
  }

  .link-icon {
    width: 40px;
    height: 40px;
  }

  .link-arrow {
    display: none;
  }
}
