/* Safe Kids TV public site.

   Served under `style-src 'self'; script-src 'self'` (deploy/lightsail/
   Caddyfile.example): no inline styles or scripts, no web fonts or files from
   anywhere else. Everything here is self-hosted.

   Every page carries English and Arabic. site.js sets data-lang, lang and dir
   on <html>; the rules just below hide the other language, and every layout
   rule uses logical properties so the same CSS mirrors for Arabic. */

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 160 700;
  font-display: swap;
  src: url("/fonts/readex-pro-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  color-scheme: light;
  --ink: #1d2b33;
  --ink-soft: #46565f;
  --muted: #62727b;
  --line: #dde7e9;
  --paper: #ffffff;
  --canvas: #f7faf9;
  --tint: #eef6f3;
  --mint: #dcf1ea;
  --teal: #2d7f73;
  --teal-dark: #1e665c;
  --teal-deep: #164d45;
  --amber: #f1b862;
  --amber-soft: #fbe7c3;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(22, 60, 55, 0.05), 0 10px 30px rgba(22, 60, 55, 0.06);
  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ---- Language ---------------------------------------------------------- */

html[data-lang="en"] [data-lang-only="ar"],
html[data-lang="ar"] [data-lang-only="en"] {
  display: none !important;
}

/* Without JavaScript both languages show; keep paired words apart. */
html:not([data-lang]) span[data-lang-only="ar"] {
  margin-inline-start: 0.5em;
}

/* An author `display` beats the user-agent [hidden] rule regardless of
   specificity, so `.button { display: inline-flex }` made `hidden` on a button
   do nothing at all: the share page showed "Video unavailable" above a live
   "Open in Safe Kids TV" button whose href was still "#". */
[hidden] {
  display: none !important;
}

/* ---- Base -------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

:lang(ar) {
  line-height: 1.85;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--teal-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--teal-deep);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  font-weight: 650;
}

:lang(ar) h1,
:lang(ar) h2,
:lang(ar) h3 {
  line-height: 1.4;
}

h3 {
  font-size: 1.12rem;
  margin: 0 0 8px;
}

p {
  margin: 0 0 16px;
}

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.container.narrow {
  width: min(800px, 100% - 40px);
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ---- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-block-end: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-inline-start: auto;
}

.site-nav a {
  padding-block: 6px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal-dark);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--amber);
}

.lang-switch {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
}

.lang-switch:hover {
  border-color: var(--teal);
}

/* ---- Buttons and small parts ------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--teal-dark);
  border-radius: 12px;
  background: var(--teal-dark);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--teal-deep);
  color: #fff;
}

.button.secondary {
  background: var(--paper);
  color: var(--teal-dark);
}

.button.secondary:hover {
  background: var(--tint);
}

.button-light {
  border-color: #fff;
  background: #fff;
  color: var(--teal-deep);
}

.button-light:hover {
  background: var(--amber-soft);
  color: var(--teal-deep);
}

.button-outline-light {
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
}

.button-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Arabic has no capitals, and spacing letters apart breaks its joins. */
:lang(ar) .eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0;
}

.lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.24rem);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: 0.92rem;
  font-weight: 600;
}

.pill-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 127, 115, 0.2);
}

/* "Coming soon" for each store. Deliberately plain and dashed: the official
   store badges may only link to a live listing, and this must not look like
   one until there is a listing to link to. */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.store-chip {
  display: inline-flex;
  flex-direction: column;
  min-width: 150px;
  padding: 9px 18px;
  border: 1.5px dashed #a9c7c1;
  border-radius: 12px;
  background: var(--paper);
}

.store-name {
  color: var(--ink);
  font-weight: 650;
}

.store-state {
  order: -1;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
}

.text-link {
  font-weight: 600;
}

.text-link::after,
.hero-links a::after {
  content: "\2192";
  display: inline-block;
  margin-inline-start: 0.4em;
}

[dir="rtl"] .text-link::after,
[dir="rtl"] .hero-links a::after {
  content: "\2190";
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  padding: 4px;
  border-radius: 50%;
  background: var(--mint);
  fill: none;
  stroke: var(--teal-dark);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Home: hero -------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(36px, 6vw, 80px) clamp(44px, 6vw, 92px);
  background:
    radial-gradient(circle at 85% 20%, rgba(241, 184, 98, 0.24), transparent 36%),
    radial-gradient(circle at 10% 90%, rgba(141, 205, 242, 0.22), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, var(--canvas) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(2.3rem, 1.3rem + 3.4vw, 4rem);
  font-weight: 700;
  line-height: 1.12;
}

:lang(ar) .hero h1 {
  line-height: 1.38;
}

.accent {
  color: var(--teal-dark);
  background-image: linear-gradient(transparent 64%, rgba(241, 184, 98, 0.45) 64%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 18px;
}

/* Shaped like store buttons, but plainly not ones yet: a light dashed outline,
   no shadow, no hover, not links and not focusable, so nobody taps one and
   thinks the site is broken. The official badges may only link to a live
   listing. */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 196px;
  padding-block: 10px;
  padding-inline: 16px 22px;
  border: 1.5px dashed #9fc7bd;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  cursor: default;
  user-select: none;
}

.store-button-icon {
  width: 30px;
  height: 30px;
  flex: none;
  fill: none;
  stroke: var(--teal-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-button-text {
  display: grid;
  line-height: 1.2;
}

.store-button-small {
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 600;
}

.store-button-name {
  font-size: 1.14rem;
  font-weight: 650;
}

.button-soft {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--teal-deep);
}

.button-soft:hover {
  border-color: #c6e8da;
  background: #c6e8da;
  color: var(--teal-deep);
}

.button-ghost {
  border-color: #b7d3cc;
  background: transparent;
  color: var(--teal-dark);
}

.button-ghost:hover {
  background: var(--paper);
  color: var(--teal-deep);
}

.button-arrow {
  width: 18px;
  height: 18px;
  margin-inline-start: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[dir="rtl"] .button-arrow {
  transform: scaleX(-1);
}

.hero-art {
  position: relative;
  min-height: 470px;
}

.hero-phone {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 10%;
  width: min(250px, 58%);
  padding: 11px;
  border-radius: 38px;
  background: var(--ink);
  box-shadow: 0 34px 60px rgba(22, 60, 55, 0.24);
  transform: rotate(4deg);
}

[dir="rtl"] .hero-phone {
  transform: rotate(-4deg);
}

.hero-phone-screen {
  display: grid;
  gap: 10px;
  padding: 14px 12px 16px;
  border-radius: 28px;
  background: #fffdf7;
}

.hero-phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-phone-bar svg {
  width: 22px;
  height: 22px;
}

.hero-phone-bar span {
  width: 46%;
  height: 8px;
  border-radius: 999px;
  background: #dde7e9;
}

.hero-phone-feature {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
}

.hero-phone-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-phone-tiles img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
}

.hero-panda {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: min(250px, 52%);
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(22, 60, 55, 0.22));
}

.hero-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(22, 60, 55, 0.14);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.hero-chip-reviewed {
  inset-block-start: 30%;
  inset-inline-start: 2%;
}

.hero-chip-pin {
  inset-block-end: 12%;
  inset-inline-end: 0;
}

/* ---- Home: sections ---------------------------------------------------- */

.trust-strip {
  border-block: 1px solid var(--line);
  background: var(--paper);
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
  padding: 20px 0;
  list-style: none;
}

/* Items wrap inside their column: the longest one is two lines on narrow grids. */
.trust-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section-tinted {
  background: var(--tint);
}

.section-head {
  max-width: 720px;
  margin-block-end: 36px;
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

.section h2,
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
}

.section-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.showcase-card {
  display: block;
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.showcase-card:hover {
  color: inherit;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-picture {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--mint);
}

.card-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.showcase-body {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}

.showcase-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.showcase-channel {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 26px 24px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  inset-block-start: 18px;
  inset-inline-start: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

.step-art {
  display: block;
  width: auto;
  height: 150px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 12px 16px rgba(22, 60, 55, 0.16));
}

.step p,
.control p {
  margin: 0;
  color: var(--ink-soft);
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.controls-art {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 22px 30px rgba(22, 60, 55, 0.2));
}

.controls .section-lead {
  margin-block-end: 26px;
}

.control-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.control h3 {
  margin: 2px 0 0;
  font-size: 1.02rem;
}

.control p {
  grid-column: 2;
  font-size: 0.95rem;
}

.card-icon {
  display: block;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 13px;
  background: var(--mint);
  fill: none;
  stroke: var(--teal-dark);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control .card-icon {
  grid-row: span 2;
}

.games {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.games-note {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.buddies-title {
  margin: 28px 0 10px;
  font-size: 1.05rem;
}

.buddies {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.buddies img {
  display: block;
  width: auto;
  height: 96px;
  filter: drop-shadow(0 8px 12px rgba(22, 60, 55, 0.18));
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(22, 60, 55, 0.1);
}

.privacy-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f0ff 100%);
  box-shadow: var(--shadow);
}

.privacy-art {
  display: block;
  width: min(230px, 40vw);
  height: auto;
  filter: drop-shadow(0 20px 26px rgba(90, 80, 170, 0.2));
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-inline-start: 36px;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.2em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan {
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
}

.plan h3 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.plan p {
  margin: 0;
  color: var(--ink-soft);
}

.plan .plan-kicker {
  margin-block-end: 10px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:lang(ar) .plan .plan-kicker {
  font-size: 0.95rem;
  letter-spacing: 0;
}

.plan-featured {
  border-color: transparent;
  background: linear-gradient(155deg, var(--teal-dark) 0%, #123f39 100%);
  box-shadow: 0 20px 40px rgba(22, 77, 69, 0.28);
}

.plan-featured h3,
.plan-featured p {
  color: #fff;
}

.plan-featured .plan-kicker {
  color: var(--amber-soft);
}

.section-dark {
  background:
    radial-gradient(circle at 85% 20%, rgba(241, 184, 98, 0.26), transparent 42%),
    linear-gradient(135deg, var(--teal-dark) 0%, #113c36 100%);
  color: #fff;
}

.section-dark h2 {
  color: #fff;
}

.section-dark .eyebrow {
  color: var(--amber-soft);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.section-dark a:not(.button) {
  color: #fff;
}

.creators-band {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.creators-copy {
  max-width: 680px;
}

.creators-art {
  display: block;
  width: min(290px, 100%);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.3));
}

[dir="rtl"] .creators-art {
  transform: scaleX(-1);
}

.fine-print {
  font-size: 0.96rem;
}

.section-dark .fine-print {
  font-size: 0.96rem;
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
}

.faq-art {
  display: block;
  width: min(190px, 50%);
  height: auto;
  margin-block-start: 28px;
  filter: drop-shadow(0 16px 22px rgba(22, 60, 55, 0.18));
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--teal);
  font-size: 1.6rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.get-app {
  padding-block-start: 0;
}

.get-app-card {
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 20%, rgba(141, 205, 242, 0.3), transparent 40%),
    linear-gradient(135deg, #fff8ea 0%, #e2f3ec 100%);
  text-align: center;
}

.get-app-art {
  display: block;
  width: 140px;
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 16px 20px rgba(22, 60, 55, 0.2));
}

.get-app-card .store-buttons {
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .showcase-card {
    transition: none;
  }
}

@media (max-width: 960px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls,
  .games,
  .creators-band,
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .controls-art {
    width: 200px;
  }

  .creators-art {
    width: 200px;
    order: -1;
  }

  .faq-art {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    width: 100%;
    max-width: 420px;
    min-height: 400px;
    margin-inline: auto;
  }

  .steps,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .privacy-band {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .privacy-band > div {
    justify-self: stretch;
  }

  .check-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .control-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tile-grid li:nth-child(n + 10) {
    display: none;
  }

  .buddies img {
    height: 72px;
  }

  .hero-chip {
    font-size: 0.82rem;
  }

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

/* ---- Policy and help pages -------------------------------------------- */

.page-hero {
  padding-block: clamp(40px, 6vw, 72px) clamp(30px, 4vw, 48px);
  border-block-end: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--tint) 100%);
}

.page-hero .lead {
  margin: 0;
}

.page-meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
  padding-block: 40px 88px;
}

.page-layout.single {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.toc {
  position: sticky;
  top: 92px;
}

.toc-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:lang(ar) .toc-title {
  font-size: 0.92rem;
  letter-spacing: 0;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border-inline-start: 2px solid var(--line);
  list-style: none;
}

.toc a {
  display: block;
  margin-inline-start: -2px;
  padding: 6px 14px;
  border-inline-start: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-decoration: none;
}

.toc a:hover {
  border-inline-start-color: var(--teal);
  color: var(--teal-dark);
}

.page-section {
  margin-block-end: 16px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  scroll-margin-top: 90px;
}

.page-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.page-section p,
.page-section li {
  color: var(--ink-soft);
}

.page-section p:last-child {
  margin-block-end: 0;
}

.page-section ul {
  margin: 0 0 16px;
  padding-inline-start: 22px;
}

.page-section ul:last-child {
  margin-block-end: 0;
}

.page-section li + li {
  margin-block-start: 8px;
}

/* Both languages visible (no JavaScript): set the Arabic half apart. */
html:not([data-lang]) .page-section > [data-lang-only="ar"],
html:not([data-lang]) .page-hero [data-lang-only="ar"] {
  margin-block-start: 22px;
  padding-block-start: 22px;
  border-block-start: 1px dashed var(--line);
}

.contact-card {
  display: grid;
  gap: 2px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink);
  font-style: normal;
}

.request-form {
  display: grid;
  gap: 16px;
  margin: 20px 0 22px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tint);
}

.request-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
}

.request-form input,
.request-form select,
.request-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #c3d6d3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(45, 127, 115, 0.25);
  outline-offset: 0;
}

.request-form textarea {
  min-height: 110px;
  resize: vertical;
}

.request-form .button {
  justify-self: start;
}

/* The notice at the top of the page the backend renders once a deletion
   request is sent (backend/app/routers/pages.py). */
.form-status {
  margin: 0 0 12px;
  padding: 16px 20px;
  border: 1px solid #b7ead9;
  border-inline-start: 5px solid var(--teal);
  border-radius: 12px;
  background: #edfdf7;
  color: var(--ink);
  font-weight: 600;
}

.form-status-error {
  border-color: #fed7aa;
  border-inline-start-color: #c2410c;
  background: #fff4ed;
}

.status-area {
  padding-block-start: 28px;
}

/* ---- Shared creator and video pages ----------------------------------- */

.share-page {
  padding-block: clamp(32px, 5vw, 64px) 88px;
}

.video-card {
  display: grid;
  gap: 24px;
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.video-thumbnail {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
}

.video-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-body h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  overflow-wrap: anywhere;
}

.video-creator {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 600;
}

.video-meta {
  margin: 0 0 20px;
  color: var(--muted);
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-block-end: 18px;
}

.video-actions .store-row {
  margin: 0;
}

.video-status {
  margin: 0;
  color: var(--ink-soft);
}

.creator-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-block-end: 28px;
}

.creator-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem);
  overflow-wrap: anywhere;
}

.creator-hero .lead {
  margin: 0;
}

.creator-avatar {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #c8eee6, #e9f5da);
  box-shadow: 0 14px 34px rgba(32, 49, 58, 0.14);
  color: var(--teal-dark);
  font-size: 2.4rem;
  font-weight: 700;
}

.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 20px;
  margin-block-end: 22px;
}

.creator-section-heading h2 {
  margin: 0;
  font-size: 1.5rem;
}

.creator-status {
  margin: 0;
  padding: 22px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--muted);
  text-align: center;
}

.creator-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.creator-video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.creator-video-body {
  padding: 14px 16px 16px;
}

.creator-video-body h3 {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.creator-video-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
  padding-block: 44px 32px;
  border-block-start: 1px solid var(--line);
  background: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px 48px;
}

.footer-brand p {
  max-width: 46ch;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-content: start;
  gap: 10px 36px;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

.footer-operator {
  grid-column: 1 / -1;
  margin: 0;
  padding-block-start: 20px;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Narrow screens ---------------------------------------------------- */

@media (max-width: 960px) {
  .card-grid,
  .creator-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .toc {
    position: static;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .site-header-inner {
    padding-block: 10px;
  }

  .lang-switch {
    margin-inline-start: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
    padding-block-start: 4px;
    border-block-start: 1px solid var(--line);
  }

  .hero-grid,
  .split,
  .steps,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }


  .creator-hero {
    align-items: flex-start;
  }

  .creator-avatar {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    font-size: 1.8rem;
  }
}

@media (max-width: 520px) {
  .card-grid,
  .creator-video-grid,
  .trust-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .store-chip {
    min-width: 0;
    flex: 1 1 140px;
  }
}

/* ---- Review fixes ------------------------------------------------------ */

/* The brand keeps together inside Arabic lines. */
.nowrap {
  white-space: nowrap;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

:lang(ar) .hero h1 {
  font-size: clamp(2.1rem, 1.2rem + 3vw, 3.5rem);
}

.store-button-text {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .store-button {
    flex: 1 1 140px;
    min-width: max-content;
    gap: 8px;
    padding-inline: 12px 14px;
  }

  .store-button-icon {
    width: 22px;
    height: 22px;
  }

  .store-button-name {
    font-size: 1rem;
  }
}

.page-section .store-buttons,
.page-section .creator-video-grid {
  padding: 0;
}

.creator-video-grid {
  margin: 0;
  list-style: none;
}

.creator-video-card {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.creator-video-card:hover {
  color: inherit;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.show-more {
  display: flex;
  margin: 24px auto 0;
}

.creator-unavailable {
  padding-block: 40px;
  text-align: center;
}

.creator-unavailable img,
.not-found-art {
  display: block;
  width: 180px;
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 16px 22px rgba(22, 60, 55, 0.18));
}

.creator-unavailable .actions,
.not-found-card .actions {
  justify-content: center;
}

.not-found {
  padding-block: clamp(40px, 7vw, 96px);
}

.not-found-card {
  text-align: center;
}

.not-found-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem);
}

.not-found-card .lead {
  margin-inline: auto;
}

/* Name, phone and email are left-to-right runs; in the Arabic card they still
   line up with the address. */
[dir="rtl"] .contact-card > [dir="ltr"] {
  text-align: right;
}

.video-body h1 {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.video-card + .video-card .store-buttons {
  margin-block-start: 18px;
}

/* Nearly every video is portrait, so cards and the shared video use a 4:5
   frame. A landscape picture is shown whole over a blurred copy of itself
   instead of losing its sides. */
.video-thumbnail {
  position: relative;
}

.video-thumbnail img {
  object-position: center;
}

.video-thumbnail.is-landscape img {
  position: absolute;
  inset: 0;
}

.card-picture.is-landscape .card-image,
.video-thumbnail.is-landscape .card-image {
  object-fit: contain;
}

.card-backdrop {
  filter: blur(18px) saturate(1.1);
  transform: scale(1.2);
}

/* A single-column page lines its heading up with its body, not the wide container. */
.page-hero:has(+ .page-layout.single) .container,
.container.status-area {
  width: min(820px, 100% - 40px);
}

@media (prefers-reduced-motion: reduce) {
  .creator-video-card {
    transition: none;
  }
}

/* Titles take their own direction (so a clamped title's ellipsis lands on its
   own side) but line up with the page. */
html[dir="rtl"] .showcase-title,
html[dir="rtl"] .showcase-channel,
html[dir="rtl"] .creator-video-body h3,
html[dir="rtl"] .video-body h1 {
  text-align: right;
}

html[dir="ltr"] .showcase-title,
html[dir="ltr"] .showcase-channel,
html[dir="ltr"] .creator-video-body h3,
html[dir="ltr"] .video-body h1 {
  text-align: left;
}

/* Latin words inside an Arabic label keep the case they were written in. */
:lang(ar) .eyebrow,
:lang(ar) .toc-title {
  text-transform: none;
}

.share-page .video-card + .video-card {
  margin-block-start: 20px;
}

@media (max-width: 520px) {
  .creator-section-heading .store-row {
    width: 100%;
  }

  /* The four menu labels stay on one line on a phone, «أولياء الأمور» included. */
  .site-nav {
    gap: 4px 14px;
    font-size: 0.9rem;
  }
}

/* While a creator's videos load, the grid holds their space, so the footer is
   not drawn under the loading line and then pushed away. */
.creator-video-grid:empty {
  min-height: 70vh;
}

@media (min-width: 961px) {
  .creator-video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .creator-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.creator-video-body h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* The shared video's picture keeps the portrait shape of most videos: beside
   the title on wider screens, above it on a phone. */
.video-thumbnail {
  width: min(100%, 340px);
  margin-inline: auto;
  aspect-ratio: 4 / 5;
}

@media (min-width: 700px) {
  .video-card:has(> .video-thumbnail:not([hidden])) {
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
  }

  .video-card > .video-thumbnail {
    width: 100%;
  }
}

/* The four menu labels on the narrowest phones. */
@media (max-width: 400px) {
  .site-nav {
    gap: 2px 10px;
    font-size: 0.84rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc,
  .skip-link {
    display: none;
  }

  .page-section {
    border: 0;
    padding: 0 0 12px;
  }
}

/* A store button that actually goes somewhere.
 *
 * The dashed block says "not yet" -- it is unclickable by design, and the
 * cursor and the border both say so. Once a listing is live its button becomes
 * a real link and has to stop looking like a placeholder: solid edge, the
 * brand colour, and a cursor that invites the press. The App Store keeps the
 * dashed treatment until there is something to link to. */
a.store-button-live {
  border-style: solid;
  border-color: var(--teal);
  cursor: pointer;
  user-select: auto;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
a.store-button-live:hover,
a.store-button-live:focus-visible {
  background: var(--tint);
  box-shadow: 0 8px 20px rgba(22, 60, 55, .16);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  a.store-button-live { transition: none; }
  a.store-button-live:hover, a.store-button-live:focus-visible { transform: none; }
}
