/* CoShare landing page — warm paper, deep ink, and a single signal colour.
   Light by default, dark when the device asks for it. Fonts are self-hosted (assets/fonts.css). */

:root {
  --bg: #f5f0e8;
  --bg-alt: #ede6da;
  --surface: #fffdf9;
  --surface-2: #f8f3ea;
  --ink: #18160f;
  --text: #2b2720;
  --muted: #5f584c;
  --dim: #857d6e;
  --line: #e2d9ca;
  --line-strong: #cfc3ae;
  --signal: #d24a22;
  --signal-strong: #b93d18;
  --signal-ink: #b13a17;
  --signal-soft: rgba(210, 74, 34, 0.1);
  --on-signal: #ffffff;
  --teal: #0f7067;
  --teal-soft: rgba(15, 112, 103, 0.1);
  --sun: #f2b23c;
  --danger: #b33c27;
  --danger-soft: rgba(179, 60, 39, 0.08);
  --invert-bg: #18160f;
  --invert-text: #f2ece1;
  --invert-muted: #b8ae9d;
  --invert-mark: #f2b23c;
  --terminal: #14130f;
  --shadow-sm: 0 1px 2px rgba(45, 33, 15, 0.05), 0 6px 18px -10px rgba(45, 33, 15, 0.18);
  --shadow: 0 2px 6px rgba(45, 33, 15, 0.05), 0 30px 70px -34px rgba(45, 33, 15, 0.38);
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1160px;
  --header-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13120f;
    --bg-alt: #191713;
    --surface: #1e1c18;
    --surface-2: #24211c;
    --ink: #f4eee3;
    --text: #e2dbcd;
    --muted: #aca392;
    --dim: #857c6d;
    --line: #2d2924;
    --line-strong: #403a31;
    --signal: #ff6b3d;
    --signal-strong: #ff8459;
    --signal-ink: #ff8d67;
    --signal-soft: rgba(255, 107, 61, 0.13);
    --on-signal: #1c0c05;
    --teal: #3fc3b2;
    --teal-soft: rgba(63, 195, 178, 0.12);
    --danger: #ff8c75;
    --danger-soft: rgba(255, 140, 117, 0.09);
    --invert-bg: #f2ece1;
    --invert-text: #18160f;
    --invert-muted: #5f584c;
    --invert-mark: #b93d18;
    --terminal: #0b0a08;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 22px -12px rgba(0, 0, 0, 0.6);
    --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 18px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--ink); }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); }
::selection { background: rgba(210, 74, 34, 0.22); }
:focus-visible { outline: 2.5px solid var(--signal); outline-offset: 3px; border-radius: 8px; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }
@media (max-width: 520px) { .container { width: calc(100% - 32px); } }

/* Highlighted words: signal colour on a soft marker stroke. */
.mark {
  color: var(--signal-ink);
  background: linear-gradient(transparent 68%, var(--signal-soft) 68%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: 0.04em;
}
.ltr { direction: ltr; unicode-bidi: isolate; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.scrolled, .site-header.menu-open { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; gap: 2px; margin-inline-start: 10px; }
.nav-links a { color: var(--muted); font-size: 15px; padding: 8px 12px; border-radius: 10px; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  min-height: 40px; padding: 6px 14px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 14px;
  transition: color .15s, border-color .15s;
}
.lang-toggle:hover { color: var(--ink); border-color: var(--ink); }
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  align-items: center; justify-content: center;
}
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .close { display: none; }
.menu-open .menu-btn .open { display: none; }
.menu-open .menu-btn .close { display: block; }
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
  display: grid; gap: 2px; padding: 8px 16px 20px;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 13px 12px; border-radius: 12px; font-size: 17px; color: var(--ink); }
.mobile-menu a:not(.btn):hover, .mobile-menu a:not(.btn):active { background: var(--surface-2); }
.mobile-menu .btn { margin-top: 10px; }
@media (max-width: 920px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-actions > .btn { display: none; }
}
@media (min-width: 921px) { .mobile-menu { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: 14px;
  font-weight: 600; font-size: 16px; line-height: 1.3; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--signal); color: var(--on-signal); box-shadow: 0 12px 26px -16px var(--signal); }
.btn-primary:hover { background: var(--signal-strong); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14.5px; border-radius: 11px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 28px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 15%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 15%, #000 15%, transparent 72%);
  opacity: .7;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 14px; color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.hero h1 { font-size: clamp(42px, 6.4vw, 80px); line-height: 1.05; letter-spacing: -0.035em; margin: 22px 0 18px; font-weight: 700; }
html[lang="ar"] .hero h1 { line-height: 1.24; letter-spacing: 0; }
.hero p.lead { font-size: clamp(17px, 1.55vw, 20px); color: var(--muted); max-width: 560px; margin: 0 0 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: 14.5px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges svg { width: 17px; height: 17px; color: var(--teal); }
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
@media (max-width: 980px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-copy { text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-ctas, .hero-badges { justify-content: center; }
  .hero-visual { width: 100%; max-width: 520px; margin-inline: auto; }
}
@media (max-width: 520px) {
  .hero h1 { margin-top: 18px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-badges { gap: 6px 16px; font-size: 13.5px; }
}

/* ---------- Platform strip ---------- */
.platform-strip { padding: 36px 0 4px; }
.platform-strip .label { text-align: center; color: var(--dim); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
html[lang="ar"] .platform-strip .label { letter-spacing: 0; font-size: 14px; }
.platform-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 15px;
}
.platform-chip svg { width: 20px; height: 20px; color: var(--ink); }
@media (max-width: 560px) {
  .platform-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .platform-chip { justify-content: center; padding: 10px 4px; font-size: 14px; gap: 7px; }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 104px 0; }
.section.alt { background: var(--bg-alt); }
.section.tight { padding-top: 24px; }
@media (max-width: 720px) { .section { padding: 68px 0; } .section.tight { padding-top: 12px; } }
.section-head { text-align: center; max-width: 740px; margin: 0 auto 52px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--signal-ink); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 14.5px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.14; letter-spacing: -0.025em; margin: 14px 0; }
html[lang="ar"] .section-head h2 { line-height: 1.34; letter-spacing: 0; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
@media (max-width: 520px) { .section-head { margin-bottom: 34px; } .section-head p { font-size: 16.5px; } }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 { margin: 18px 0 8px; font-size: 20px; line-height: 1.35; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 520px) { .card { padding: 22px; } }
.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--signal-soft); color: var(--signal-ink); flex: none; }
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.red { background: var(--danger-soft); color: var(--danger); }
.icon-tile.teal { background: var(--teal-soft); color: var(--teal); }

/* ---------- Video ---------- */
.video-frame {
  position: relative; max-width: 980px; margin: 0 auto; aspect-ratio: 16 / 9;
  border-radius: 24px; overflow: hidden; background: #0f0e0c;
  border: 10px solid #1d1b17; box-shadow: var(--shadow);
}
.video-frame video, .video-frame .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-frame .poster { display: grid; place-items: center; cursor: pointer; background: #0f0e0c; }
.video-frame .poster img.poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: #d24a22; color: #fff; border: 0; cursor: pointer;
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.12), 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  transition: transform .2s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 30px; height: 30px; margin-inline-start: 4px; }
.video-frame .poster-caption {
  position: absolute; bottom: 18px; inset-inline: 0; text-align: center; color: #f2ece1; font-size: 15px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.video-frame.playing .poster { display: none; }
@media (max-width: 520px) { .video-frame { border-width: 6px; border-radius: 18px; } .play-btn { width: 66px; height: 66px; } .video-frame .poster-caption { font-size: 13px; bottom: 10px; } }

/* ---------- Problem ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.solution-line {
  margin: 30px auto 0; max-width: 880px; text-align: center;
  font-size: clamp(19px, 2.3vw, 27px); font-weight: 600; line-height: 1.5;
  padding: 26px 30px; border-radius: var(--radius);
  background: var(--invert-bg); color: var(--invert-text);
}
.solution-line .mark { color: var(--invert-mark); background: none; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step .num {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font: 600 17px var(--mono);
}

/* ---------- Network ---------- */
.network-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .network-grid { grid-template-columns: 1fr; gap: 30px; } .network-visual { max-width: 460px; margin-inline: auto; width: 100%; } }
.section-head.start { text-align: start; margin-inline: 0; margin-bottom: 32px; }
@media (max-width: 980px) { .section-head.start { text-align: center; margin-inline: auto; } }
.feature-list { display: grid; gap: 14px; }
.feature-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
}
.feature-item h4 { margin: 2px 0 4px; font-size: 18px; }
.feature-item p { margin: 0; color: var(--muted); font-size: 15.5px; }
.network-visual svg { width: 100%; height: auto; }

/* ---------- Security ---------- */
.security-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 980px) { .security-grid { grid-template-columns: 1fr; } }
.sec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .sec-list { grid-template-columns: 1fr; } }
.sec-item { padding: 22px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.sec-item h4 { margin: 14px 0 6px; font-size: 17px; }
.sec-item p { margin: 0; color: var(--muted); font-size: 15px; }
.sec-item .icon-tile { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); }
.sec-item .icon-tile svg { width: 22px; height: 22px; }
.privacy-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  color: var(--signal-ink); font-weight: 600; border-bottom: 2px solid var(--signal-soft); padding-bottom: 2px;
}
.privacy-link:hover { border-bottom-color: var(--signal); }
html[dir="rtl"] .privacy-link svg { transform: scaleX(-1); }

.pair-demo { position: sticky; top: 96px; }
@media (max-width: 980px) { .pair-demo { position: static; } }
.pair-stage { border-radius: 24px; border: 1px solid var(--line); padding: 28px 22px 24px; background: var(--surface); box-shadow: var(--shadow); }
.pair-devices { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.mini-device { border-radius: 16px; padding: 16px 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.mini-device .dev-name { font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.mini-device .dev-name svg { width: 16px; height: 16px; }
.mini-device .group-name { font-weight: 600; margin: 10px 0 8px; font-size: 16px; color: var(--ink); }
.mini-device .pw-field { direction: ltr; letter-spacing: 4px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 15px; }
.mini-device .actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.mini-device .actions span { font-size: 13px; padding: 6px 16px; border-radius: 9px; background: var(--signal); color: var(--on-signal); font-weight: 600; }
.mini-device .members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.mini-device .members li.new { color: var(--teal); font-weight: 600; }
.pair-link { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.pair-link svg { width: 22px; height: 22px; }
@media (max-width: 520px) { .pair-devices { grid-template-columns: 1fr; } .pair-link { margin: 0 auto; transform: rotate(90deg); } }
.pair-caption { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.stranger {
  margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--danger);
  background: var(--danger-soft); display: flex; gap: 12px; align-items: center; font-size: 14.5px; color: var(--text);
}
.stranger svg { width: 22px; height: 22px; flex: none; color: var(--danger); }

/* ---------- Features ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
.feature-card { padding: 24px; }
.feature-card h3 { font-size: 18px; margin-top: 16px; }
.feature-card p { font-size: 15px; }
.feature-card.highlight { background: var(--invert-bg); border-color: var(--invert-bg); }
.feature-card.highlight h3 { color: var(--invert-text); }
.feature-card.highlight p { color: var(--invert-muted); }
.feature-card.highlight .icon-tile { background: var(--signal); color: var(--on-signal); }

/* ---------- Compare ---------- */
.compare-wrap { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
table.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 17px 20px; text-align: center; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.compare th:first-child, .compare td:first-child { text-align: start; color: var(--ink); }
.compare thead th { font-size: 14.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.compare thead th.us { color: var(--ink); }
.compare .us { background: var(--signal-soft); }
.compare thead th.us { background: color-mix(in srgb, var(--signal) 16%, var(--surface)); }
.compare tr:last-child td { border-bottom: 0; }
.yes, .no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.yes { background: var(--teal-soft); color: var(--teal); }
.no { background: var(--danger-soft); color: var(--danger); }
.yes svg, .no svg { width: 16px; height: 16px; }
/* Phones: each row becomes a compact card — the question, then the three answers side by side. */
@media (max-width: 680px) {
  .compare-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  table.compare, .compare tbody, .compare td { display: block; }
  .compare thead { display: none; }
  .compare tr {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 14px; margin-bottom: 10px;
  }
  .compare td { border: 0; padding: 0; font-size: 15px; }
  .compare td:first-child { grid-column: 1 / -1; font-weight: 600; font-size: 15.5px; margin-bottom: 2px; }
  .compare td:not(:first-child) {
    display: flex; flex-direction: column-reverse; align-items: center; gap: 6px;
    padding: 8px 4px; border-radius: 10px; background: var(--surface-2); text-align: center;
    font-size: 11.5px; line-height: 1.35; color: var(--muted);
  }
  .compare td:not(:first-child)::before { content: attr(data-label); }
  .compare td.us { background: var(--signal-soft); color: var(--ink); font-weight: 600; }
}

/* ---------- Downloads ---------- */
.downloads { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1100px) { .downloads { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .downloads { grid-template-columns: repeat(2, 1fr); } }
.dl-card { text-align: center; padding: 26px 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .2s, border-color .2s; }
.dl-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.dl-card.recommended { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft), var(--shadow-sm); }
.dl-card .badge { position: absolute; top: 12px; inset-inline-end: 12px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--signal); color: var(--on-signal); display: none; }
.dl-card.recommended .badge { display: inline-block; }
.dl-card .os-icon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 8px; color: var(--ink); }
.dl-card .os-icon svg { width: 30px; height: 30px; }
.dl-card h3 { margin: 6px 0 0; font-size: 19px; }
.dl-card .req { color: var(--muted); font-size: 13.5px; min-height: 44px; line-height: 1.6; }
.dl-card .btn { width: 100%; margin-top: auto; }
.dl-alt { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 4px 8px; margin-top: 10px; min-height: 40px; font-size: 13px; color: var(--muted); }
.dl-alt a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.dl-alt a:hover { color: var(--ink); }
.dl-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }
/* Phones: compact rows — icon, name and requirement, then the button. */
@media (max-width: 560px) {
  .downloads { grid-template-columns: 1fr; gap: 10px; }
  .dl-card { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; row-gap: 2px; text-align: start; align-items: center; padding: 16px; }
  .dl-card .os-icon { grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 14px; margin: 0; }
  .dl-card .os-icon svg { width: 26px; height: 26px; }
  .dl-card h3 { margin: 0; font-size: 17px; }
  .dl-card .req { min-height: 0; font-size: 13px; }
  .dl-card .btn, .dl-card .dl-alt { grid-column: 1 / -1; }
  .dl-card .btn { margin-top: 12px; }
  .dl-card .dl-alt { justify-content: flex-start; margin-top: 8px; min-height: 0; }
  .dl-card .dl-alt:empty { display: none; }
  .dl-card .badge { top: 14px; }
  .dl-card.recommended { order: -1; }
}

/* ---------- Linux: one command or a package ---------- */
.linux-panel { margin-top: 26px; padding: 28px; text-align: start; }
.lp-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.lp-head .os-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.lp-head .os-icon svg { width: 28px; height: 28px; }
.lp-head h3 { margin: 0; font-size: 22px; }
.lp-head p { margin: 4px 0 0; color: var(--muted); }
.lp-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.lp-option { position: relative; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; }
.lp-option h4 { margin: 0 0 4px; font-size: 17px; }
.lp-recommended { background: var(--surface); border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.lp-tag { position: absolute; top: 16px; inset-inline-end: 16px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--signal); color: var(--on-signal); }
.cmd { display: flex; align-items: center; gap: 10px; margin: 14px 0 16px; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--terminal); border: 1px solid #2b2822; }
.cmd code { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; color: #f2ece1; user-select: all; font: 14px/1.6 var(--mono); }
.cmd code::before { content: "$ "; color: #8a8273; user-select: none; }
.copy-btn { flex: none; border: 0; border-radius: 9px; padding: 9px 16px; min-height: 40px; background: #d24a22; color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s; }
.copy-btn:hover { background: #b93d18; }
.copy-btn.copied { background: #0f7067; }
.lp-steps { margin: 0; padding-inline-start: 20px; color: var(--muted); line-height: 1.9; font-size: 14.5px; }
.lp-small { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.lp-small code { display: block; margin-top: 4px; font: 12px/1.7 var(--mono); color: var(--muted); text-align: left; overflow-wrap: anywhere; user-select: all; }
.lp-small a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.lp-pkg {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding: 14px 16px; min-height: 52px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color .15s, transform .15s;
}
.lp-pkg:hover { border-color: var(--ink); transform: translateY(-1px); }
.lp-pkg span { color: var(--signal-ink); font: 500 13px var(--mono); }
@media (max-width: 860px) { .lp-grid { grid-template-columns: 1fr; } .linux-panel { padding: 20px; } }
@media (max-width: 520px) { .lp-head h3 { font-size: 19px; } .lp-option { padding: 18px; } .lp-tag { position: static; display: inline-block; margin-bottom: 8px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 19px 0; font-weight: 600; font-size: 17px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2) center / 12px no-repeat;
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 12px 2px, 2px 12px; transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); font-size: 16px; }
@media (max-width: 520px) { .faq details { padding: 0 16px; } .faq summary { font-size: 16px; padding: 16px 0; } }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; padding: 76px 28px; border-radius: 28px; background: var(--invert-bg); color: var(--invert-text); }
.final-cta .logo { width: 76px; height: 76px; margin: 0 auto 22px; }
.final-cta h2 { font-size: clamp(30px, 4.6vw, 56px); margin: 0 0 14px; line-height: 1.2; color: var(--invert-text); }
.final-cta h2 .mark { color: var(--invert-mark); background: none; }
.final-cta p { color: var(--invert-muted); font-size: 19px; margin: 0 0 30px; }
@media (max-width: 520px) { .final-cta { padding: 52px 20px; border-radius: 22px; } .final-cta p { font-size: 17px; } }

/* ---------- Footer ---------- */
footer { padding: 46px 0 40px; color: var(--muted); font-size: 14.5px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 26px; }
.footer-row nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.footer-row nav a { padding: 6px 0; }
.footer-row a:hover { color: var(--ink); }
.brand-sm { font-size: 17px; }
.brand-sm .logo { width: 26px; height: 26px; }
@media (max-width: 720px) { footer { padding-bottom: 110px; } .footer-row { flex-direction: column; align-items: flex-start; } }

/* ---------- Mobile download bar ---------- */
.sticky-cta {
  position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45;
  display: none; transform: translateY(150%); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.sticky-cta .btn { flex: 1; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.45); }
.sticky-cta.show { transform: none; }
@media (max-width: 720px) { .sticky-cta { display: flex; } }

/* ---------- Reveal on scroll ---------- */
/* Content is only hidden once the script confirms it can reveal it again. */
.can-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.can-reveal .reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; } .reveal.d3 { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .can-reveal .reveal, .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual svg *, .network-visual svg * { animation: none !important; }
  .sticky-cta { transition: none; }
}

/* Drawings are laid out left-to-right in both languages. */
.hero-visual svg, .network-visual svg { direction: ltr; unicode-bidi: isolate; }
.hero-visual svg text, .network-visual svg text { direction: ltr; unicode-bidi: plaintext; }

/* Download notice */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; max-width: calc(100% - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 14px 22px; border-radius: 14px; font-size: 15px; text-align: center;
  background: var(--invert-bg); color: var(--invert-text); box-shadow: var(--shadow);
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Privacy policy page ---------- */
.doc-hero { padding: 56px 0 10px; }
.doc-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.15; margin: 14px 0 12px; letter-spacing: -0.02em; }
html[lang="ar"] .doc-hero h1 { letter-spacing: 0; line-height: 1.3; }
.doc-hero .lead { font-size: 19px; color: var(--muted); max-width: 720px; margin: 0; }
.doc-meta { margin-top: 16px; color: var(--dim); font-size: 14px; }
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 36px 0 90px; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; font-size: 14.5px; }
.doc-toc strong { font-size: 12.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
html[lang="ar"] .doc-toc strong { letter-spacing: 0; font-size: 13.5px; }
.doc-toc a { color: var(--muted); padding: 6px 10px; border-radius: 9px; border-inline-start: 2px solid transparent; }
.doc-toc a:hover { color: var(--ink); background: var(--surface-2); }
.doc { max-width: 760px; min-width: 0; }
.doc section { padding-top: 8px; margin-bottom: 44px; }
.doc h2 { font-size: 26px; line-height: 1.3; margin: 0 0 14px; letter-spacing: -0.01em; }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text); font-size: 16.5px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-inline-start: 22px; }
.doc li { margin-bottom: 8px; }
.doc li strong, .doc p strong { color: var(--ink); }
.doc code { font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.doc a { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 3px; }
.tldr { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 44px; }
.tldr div { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; color: var(--text); }
.tldr svg { width: 22px; height: 22px; flex: none; color: var(--teal); margin-top: 2px; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin: 6px 0 18px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 15px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { color: var(--ink); font-weight: 600; }
.callout { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--signal-soft); border-inline-start: 3px solid var(--signal); margin: 0 0 18px; font-size: 15.5px; }
.callout.teal { background: var(--teal-soft); border-color: var(--teal); }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 22px; }
  .doc-toc { position: static; grid-template-columns: repeat(2, 1fr); padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .doc-toc strong { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .tldr { grid-template-columns: 1fr; } .doc h2 { font-size: 22px; } .doc-toc { grid-template-columns: 1fr; } }
/* Phones: data tables become stacked cards, each value labelled with its column. */
@media (max-width: 640px) {
  .data-table-wrap { overflow: visible; border: 0; background: transparent; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; min-width: 0; }
  .data-table thead { display: none; }
  .data-table tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
  .data-table td { border: 0; padding: 4px 0; font-size: 15px; }
  .data-table td:first-child { font-size: 16px; padding-bottom: 6px; }
  .data-table td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 600; color: var(--dim); }
}
[data-lang-block] { display: none; }
html[lang="ar"] [data-lang-block="ar"], html[lang="en"] [data-lang-block="en"] { display: block; }
