@font-face {
  font-family: "Readex Pro";
  src: url("fonts/readex-pro-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* ألوان الصفحة والعجلات. القيم هنا للوضع الفاتح، وmain.js يحسب الثيم والداكن ولون التمييز بنفس معادلات
   البرنامج. مسجّلة عشان تتلوّن بهدوء لما تتغيّر */
@property --bg-0 { syntax: "<color>"; inherits: true; initial-value: #f4f7fb; }
@property --bg-1 { syntax: "<color>"; inherits: true; initial-value: #e8eef7; }
@property --card { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --sky-0 { syntax: "<color>"; inherits: true; initial-value: #d6e5f5; }
@property --sky-1 { syntax: "<color>"; inherits: true; initial-value: #ebf2fa; }
@property --disk-0 { syntax: "<color>"; inherits: true; initial-value: #f8f9fb; }
@property --disk-1 { syntax: "<color>"; inherits: true; initial-value: #eceff3; }
@property --seg-0 { syntax: "<color>"; inherits: true; initial-value: #f6f8fa; }
@property --seg-1 { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --hub-0 { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --hub-1 { syntax: "<color>"; inherits: true; initial-value: #eceff3; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #151a26; }
@property --ink-2 { syntax: "<color>"; inherits: true; initial-value: #4d5668; }
@property --ink-3 { syntax: "<color>"; inherits: true; initial-value: #687185; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #0067c0; }
@property --partner { syntax: "<color>"; inherits: true; initial-value: #00c099; }
@property --on-accent { syntax: "<color>"; inherits: true; initial-value: #ffffff; }

:root {
  --label: #1b1b1b;
  --hub-text: #1b1b1b;
  --hub-sub: rgb(0 0 0 / 0.62);
  --edge: rgb(0 0 0 / 0.08);
  --disk-edge: rgb(0 0 0 / 0.12);
  --line: rgb(20 26 41 / 0.09);
  --line-2: rgb(20 26 41 / 0.16);
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 10px 30px -14px rgb(16 24 40 / 0.16);
  --wheel-shadow: drop-shadow(0 16px 26px rgb(16 24 40 / 0.18));
  --key-0: #ffffff;
  --key-1: #eef1f6;
  --key-ink: #1d2433;
  --key-edge: rgb(20 26 41 / 0.15);
  --key-floor: rgb(20 26 41 / 0.28);
  /* ألوان الشعار، الغامقة منها على الفاتح مثل البرنامج */
  --blue: #0067c0;
  --teal: #008f78;
  --amber: #d97c00;
  --red: #d13438;
  --brand: linear-gradient(135deg, #0078d4, #00b294 40%, #ffb900 75%, #e84855);
  --glow: linear-gradient(100deg, var(--partner), var(--accent));
  color-scheme: light;
  transition: --bg-0 0.5s, --bg-1 0.5s, --card 0.5s, --sky-0 0.5s, --sky-1 0.5s, --disk-0 0.5s, --disk-1 0.5s, --seg-0 0.5s,
    --seg-1 0.5s, --hub-0 0.5s, --hub-1 0.5s, --ink 0.5s, --ink-2 0.5s, --ink-3 0.5s, --accent 0.5s, --partner 0.5s;
}

:root[data-mode="dark"] {
  --label: #f3f5f8;
  --hub-text: #ffffff;
  --hub-sub: rgb(255 255 255 / 0.62);
  --edge: rgb(255 255 255 / 0.11);
  --disk-edge: rgb(255 255 255 / 0.14);
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.15);
  --shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 20px 40px -24px rgb(0 0 0 / 0.7);
  --wheel-shadow: drop-shadow(0 22px 30px rgb(0 0 0 / 0.5));
  --key-0: #2c3447;
  --key-1: #1c2232;
  --key-ink: #eef2fa;
  --key-edge: rgb(255 255 255 / 0.14);
  --key-floor: rgb(0 0 0 / 0.6);
  --blue: #0078d4;
  --teal: #00b294;
  --amber: #ffb900;
  --red: #e84855;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--bg-0); }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 60%, var(--bg-0));
  color: var(--ink);
  font: 400 17px/1.6 "Readex Pro", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }

h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  text-wrap: balance;
}

h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 12px; }

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

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

kbd {
  display: inline-block;
  min-width: 2.4em;
  padding: 0.18em 0.6em 0.22em;
  border: 1px solid var(--key-edge);
  border-bottom: 3px solid var(--key-floor);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--key-0), var(--key-1));
  color: var(--key-ink);
  font: inherit;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  vertical-align: 0.08em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap { width: min(1100px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }

.for-touch { display: none; }

@media (hover: none) {
  .for-mouse { display: none; }
  .for-touch { display: inline; }
}

.card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* الشعار يتجمّع شريحة شريحة، مثل الترحيب في البرنامج */

.logo { width: 28px; height: 28px; overflow: visible; }
.logo path, .toast-logo path, .task-logo path, .tray-logo path { fill: none; stroke-width: 20; }
.js .logo.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .logo.draw.is-drawn path { animation: draw 0.55s cubic-bezier(0.3, 0.7, 0.2, 1) forwards; animation-delay: calc(var(--i) * 110ms); }

@keyframes draw { to { stroke-dashoffset: 0; } }

.wordmark { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* الأزرار */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}

.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-ink { background: var(--ink); color: var(--bg-0); }
.btn-ink:hover { transform: translateY(-1px); }
.btn-glow { background: var(--glow); color: var(--on-accent); box-shadow: 0 10px 28px -12px var(--accent), inset 0 1px 0 rgb(255 255 255 / 0.35); }
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px var(--accent), inset 0 1px 0 rgb(255 255 255 / 0.35); }
.btn-quiet { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink-3); }
.btn-small { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; box-shadow: none; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fine { margin: 16px 0 0; color: var(--ink-3); font-size: 14px; }

/* الرأس */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-0) 78%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.top-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 19px; font-weight: 600; text-decoration: none; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink-2); font-size: 15px; text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* البداية */

.hero { padding-top: clamp(48px, 7vw, 84px); }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }

h1 {
  max-width: 13ch;
  margin-bottom: 18px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.lede { max-width: 50ch; margin-bottom: 6px; color: var(--ink-2); font-size: clamp(16px, 1.5vw, 18px); text-wrap: pretty; }
.lede-2 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 500; }

/* سطح مكتب ويندوز: خلفيته بتلات بألوان الشعار، وورقة ملاحظات فيها الأزرار */

.scene {
  position: relative;
  height: clamp(540px, 50vw, 660px);
  margin-top: clamp(28px, 4vw, 48px);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--sky-0) 18%, var(--sky-1) 70%, var(--sky-0));
  user-select: none;
  -webkit-user-select: none;
}

.bloom {
  position: absolute;
  right: max(-180px, calc(50% - 760px));
  top: 50%;
  width: min(820px, 74vw);
  transform: translateY(-50%);
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent 4%, #000 26%, #000 82%, transparent 98%);
  mask-image: linear-gradient(transparent 4%, #000 26%, #000 82%, transparent 98%);
}

[data-mode="dark"] .bloom { mix-blend-mode: screen; opacity: 0.75; }
.petal { transform: rotate(var(--r)); transform-origin: 0 0; }

.note {
  position: absolute;
  left: max(20px, calc(50% - 560px));
  top: 9%;
  z-index: 2;
  width: 232px;
  padding: 16px 16px 12px;
  border-radius: 4px 4px 14px 4px;
  background: linear-gradient(180deg, #fff7b8, #ffef8f);
  color: #3b3416;
  box-shadow: 0 2px 3px rgb(60 50 10 / 0.12), 0 18px 30px -18px rgb(60 50 10 / 0.45);
  transform: rotate(-2.5deg);
}

.note::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 64px;
  height: 20px;
  transform: translateX(-50%) rotate(2deg);
  background: rgb(255 255 255 / 0.55);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.note-title { margin: 0 0 8px; font-size: 14.5px; font-weight: 600; }
.hud { display: grid; gap: 2px; }

.hud-key {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: #4a4222;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.hud-key:hover { background: rgb(0 0 0 / 0.04); }
.hud-key kbd { min-width: 52px; --key-0: #ffffff; --key-1: #f4f1e0; --key-ink: #2b2717; --key-edge: rgb(60 50 10 / 0.18); --key-floor: rgb(60 50 10 / 0.32); transition: transform 0.08s, border-bottom-width 0.08s, box-shadow 0.15s; }
.hud-key.is-mode { border-color: rgb(60 50 10 / 0.16); background: rgb(255 255 255 / 0.4); }

.hud-key.is-down kbd {
  transform: translateY(2px);
  border-bottom-width: 1px;
  background: var(--glow);
  color: var(--on-accent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent);
}

.slot { position: absolute; left: var(--x); top: var(--y); z-index: 1; display: flex; gap: 4px; align-items: flex-start; }

.file {
  position: relative;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 6px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: grab;
  touch-action: none;
}

.file:hover, .file.is-lifted { background: rgb(255 255 255 / 0.4); border-color: rgb(255 255 255 / 0.7); }
[data-mode="dark"] .file:hover, [data-mode="dark"] .file.is-lifted { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.18); }
.file.is-lifted { opacity: 0.45; }
.file:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.doc { width: 50px; height: 57px; filter: drop-shadow(0 4px 8px rgb(16 24 40 / 0.22)); }
.doc-page { fill: #ffffff; }
.doc-fold { fill: #dce3ee; }
.doc-badge { fill: var(--accent); }
.doc-badge-text { fill: var(--on-accent); font-size: 10.5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }

.file-name {
  max-width: 100%;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 0 6px var(--sky-1), 0 0 2px var(--sky-1);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.made { position: absolute; top: 0; left: calc(100% + 4px); cursor: default; }
.slot.flip .made { left: auto; right: calc(100% + 4px); }
.made.is-new { animation: pop 0.4s cubic-bezier(0.3, 1.5, 0.6, 1); }

.made.is-new::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--accent), 0 0 22px var(--accent);
  opacity: 0;
  animation: ring 1.2s ease-out;
}

.file.ghost { position: absolute; left: 0; top: 0; z-index: 4; margin: 0; pointer-events: none; opacity: 0.85; background: none; border-color: transparent; }
/* وقت العجلة الملف نفسه في وسطها، فالنسخة اللي تمشي مع المؤشر تختفي عشان ما تغطي الشريحة */
.scene.is-open .ghost { opacity: 0; }

.cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 20px;
  height: 24px;
  margin: -2px 0 0 -2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35));
}

.cursor path { fill: #fff; stroke: #111; stroke-width: 1.3; stroke-linejoin: round; }
.cursor.is-on { opacity: 1; }
.cursor.is-pressed path { fill: #e9eef7; }

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.task-mid { display: flex; align-items: center; gap: 8px; }
.task-logo, .tray-logo { width: 22px; height: 22px; }
.task-logo { margin: 0 6px; }

.task-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  color: var(--ink-3);
  font-size: 13px;
}

.task-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.task-app { width: 26px; height: 26px; margin: 0 4px; border-radius: 7px; }
.task-folder { background: linear-gradient(180deg, #ffd768, #f4b400); box-shadow: inset 0 -8px 0 rgb(0 0 0 / 0.08); }
.task-web { border-radius: 50%; background: conic-gradient(from 200deg, #0078d4, #00b294, #4cc2ff, #0078d4); }
.task-term { background: #1f2430; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }

.task-tray { position: absolute; right: max(16px, calc(50% - 560px)); display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.clock { font-size: 11.5px; line-height: 1.35; text-align: right; }

.toast {
  position: absolute;
  right: max(20px, calc(50% - 560px));
  bottom: 66px;
  z-index: 5;
  width: min(320px, calc(100% - 40px));
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px -20px rgb(16 24 40 / 0.45);
  animation: toast-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.toast-logo { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.toast strong { display: block; font-size: 14.5px; font-weight: 600; }
.toast span { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }

.float-win {
  position: absolute;
  right: max(24px, calc(50% - 540px));
  top: 40px;
  z-index: 5;
  width: min(250px, 46%);
  overflow: hidden;
  border-radius: 12px;
  background: #0d1119;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.2);
  animation: pop 0.4s cubic-bezier(0.3, 1.4, 0.6, 1);
}

.float-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; background: #1b2130; color: #c9d1e0; font-size: 12px; }
.float-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.float-close { width: 26px; height: 22px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.float-close:hover { background: #e84855; color: #fff; }

.float-media {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 50% at 70% 30%, rgb(255 200 120 / 0.9), transparent 70%),
    linear-gradient(180deg, #ff9a62 0%, #e8577a 45%, #3a3f86 75%, #1b2550);
}

.float-win.is-image .float-media {
  background:
    radial-gradient(18% 22% at 74% 30%, #fff6d6, transparent 70%),
    linear-gradient(160deg, transparent 55%, #1d6b5e 56%),
    linear-gradient(200deg, transparent 50%, #2b8f74 51%),
    linear-gradient(180deg, #7fd3f5, #c7ecff 60%, #e9f8ff);
}

.float-play { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgb(0 0 0 / 0.35); fill: #fff; }
.float-win.is-image .float-play, .float-win.is-image .float-progress { display: none; }
.float-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--glow); transform-origin: left; animation: progress 4s linear infinite; }

.stage-still { position: absolute; inset: 0; margin: auto; width: min(60%, 400px); }

/* العجلة */

.wheel { overflow: visible; }
.wheel text { text-anchor: middle; dominant-baseline: central; font-family: inherit; }
.w-label { fill: var(--label); font-size: 15px; font-weight: 600; }
.w-small { font-size: 12.5px; }
.w-icon path, .w-hub-icon path { fill: none; stroke: var(--label); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.w-icon path { stroke-width: 2.3; }
.w-hub-icon path { stroke: var(--hub-text); }
.w-hot .w-label { fill: var(--on-accent); }
.w-hot .w-icon path { stroke: var(--on-accent); }
.w-hub-name { fill: var(--hub-text); font-size: 12.5px; font-weight: 600; }
.w-hub-hint { fill: var(--hub-sub); font-size: 11px; }
.w-hot.off { display: none; }

.stage-wheel {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 320px;
  height: 320px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.55);
  filter: var(--wheel-shadow) drop-shadow(0 0 26px color-mix(in srgb, var(--accent) 25%, transparent));
  transition: transform 0.16s ease-in, opacity 0.16s ease-in, visibility 0s 0.16s;
}

.stage-wheel.is-open {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.3, 1.45, 0.55, 1), opacity 0.14s ease-out;
}

.stage-wheel.is-open .slice, .live .slice, .wheel-preview .slice { animation: slice-in 0.24s backwards; animation-delay: calc(var(--i) * 26ms); }

.live {
  display: block;
  width: min(100%, 290px);
  aspect-ratio: 1;
  margin-inline: auto;
  filter: var(--wheel-shadow);
}

@keyframes slice-in { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
@keyframes ring { 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes toast-in { from { transform: translateY(14px) scale(0.97); opacity: 0; } }
@keyframes progress { from { transform: scaleX(0); } }

/* الأرقام: لكل عجلة لونها وزرها */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(36px, 5vw, 56px); }

.stat {
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat kbd { font-size: 13px; }
.stat .stat-number { margin: 14px 0 2px; color: var(--tone); font-size: clamp(48px, 5vw, 64px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.stat-title { margin-bottom: 8px; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.stat p { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.5; }

/* الأقسام */

.band { padding-block: clamp(64px, 8vw, 104px); }
.section-lede { max-width: 56ch; color: var(--ink-2); font-size: 17px; text-wrap: pretty; }
.section-lede kbd { font-size: 0.85em; }

/* حسب نوع الملف: عجلتين لكل نوع، وتحتها الأدوات */

.kinds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 22px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 60%, transparent);
}

.kind-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.kind-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kind-tab:hover { color: var(--ink); }
.kind-tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(16 24 40 / 0.08), 0 4px 12px -6px rgb(16 24 40 / 0.2); }

.duo { padding: clamp(24px, 4vw, 44px); text-align: center; }
.duo h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 26px; }
.duo-row { display: grid; grid-template-columns: 1fr 1fr; }
.duo-col { padding: 0 clamp(8px, 3vw, 32px); }
.duo-col + .duo-col { border-left: 1px solid var(--line); }
.duo-col kbd, .wheel-card kbd { font-size: 15px; padding: 0.4em 0.9em 0.45em; }
.duo-col > p, .wheel-card > p { margin: 10px 0 18px; color: var(--ink-3); font-size: 14.5px; }
.duo-note { margin: 22px auto 0; max-width: 60ch; color: var(--ink-3); font-size: 14.5px; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.cards-two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }

.tool { position: relative; padding: 22px 20px 20px; }
.tool h3 { margin: 14px 0 6px; }
.tool p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

.tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone, var(--teal)) 12%, var(--card));
  color: var(--tone, var(--teal));
}

.tool-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tag {
  position: absolute;
  top: 18px;
  right: 16px;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}

#kind-image, #kind-video, #kind-audio { --tone: var(--teal); }
/* هذي كلها تحويل بـShift، فلونها أزرق */
#kind-pdf, #kind-more { --tone: var(--blue); }
#actions .cards { --tone: var(--amber); }
#privacy { --tone: var(--blue); }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
#actions .split { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: stretch; margin-top: 30px; }
.split-flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }

.wheel-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px; text-align: center; }

.ticks { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15.5px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.32em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--glow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* الأشكال والثيمات والألوان */

.looks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.picker { margin-top: 22px; }
.picker h3 { margin-bottom: 10px; color: var(--ink-3); font-size: 14px; font-weight: 500; }

.choices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.choices-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choices-two { grid-template-columns: repeat(2, minmax(0, 150px)); }

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.choice:hover { border-color: var(--line-2); color: var(--ink); }
.choice svg { width: 44px; height: 44px; overflow: visible; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--card)); color: var(--ink); }

.dots { display: flex; flex-wrap: wrap; gap: 10px; }

.dot {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.3);
  cursor: pointer;
  transition: transform 0.15s;
}

.dot:hover { transform: scale(1.1); }
.dot[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }

.link-button {
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.looks-preview { position: relative; display: grid; place-items: center; }

.looks-preview::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  filter: blur(30px);
}

.wheel-preview { position: relative; width: min(100%, 440px); aspect-ratio: 1; filter: var(--wheel-shadow); }

/* الصيغ */

.formats { margin-top: 26px; border-top: 1px solid var(--line); }
.format-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 260px; gap: 20px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.format-row h3 { font-size: 16px; }
.format-list { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; color: var(--ink); font-size: 15px; font-weight: 500; letter-spacing: 0.02em; }
.format-note { margin: 0; color: var(--ink-3); font-size: 13.5px; text-align: right; }

/* الخصوصية والسعر */

.stack { display: grid; gap: 14px; }
.fact { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.fact h3 { margin-bottom: 4px; }
.fact p { margin: 0; color: var(--ink-2); font-size: 15px; }

.price-card { padding: clamp(24px, 4vw, 36px); }
.price-card h3 { padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 20px; }
.price { margin: 18px 0 0; color: var(--ink-2); }
.price strong { margin-right: 6px; color: var(--ink); font-size: 40px; font-weight: 500; letter-spacing: -0.03em; }
.price-card .actions { margin-top: 24px; }
.soon { margin: 12px 0 0; color: var(--ink-3); font-size: 14px; }

/* الأسئلة */

.faq-list { max-width: 820px; margin-top: 24px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }

summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-size: 18px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

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

summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}

details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
details p { max-width: 64ch; margin-bottom: 22px; color: var(--ink-2); }

/* الذيل */

.foot { border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 30px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink-2); font-size: 14px; text-decoration: none; }
.pills a:hover { color: var(--ink); border-color: var(--ink-3); }
.copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px 0 40px; color: var(--ink-3); font-size: 14px; }
.copy p { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.legal-links a { color: var(--ink-3); text-decoration: none; }
.legal-links a:hover { color: var(--ink); text-decoration: underline; }

/* صفحات الشروط والخصوصية والاسترجاع */

.legal { max-width: 760px; padding-block: clamp(36px, 6vw, 64px) clamp(64px, 8vw, 104px); }
.legal-tabs { margin-bottom: 30px; }
.legal-tabs a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--bg-0); }
.legal h1 { max-width: none; margin-bottom: 6px; font-size: clamp(38px, 5vw, 56px); }
.legal-date { color: var(--ink-3); font-size: 15px; }
.legal-short { margin: 28px 0 12px; padding: clamp(20px, 3vw, 28px); }
.legal-short h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.legal-short .ticks { margin-top: 14px; color: var(--ink); }
.legal section h2 { margin: 40px 0 10px; font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; }
.legal section p, .legal section li { color: var(--ink-2); text-wrap: pretty; }
.legal section ul { margin: 0 0 12px; padding-left: 1.3em; }
.legal section li + li { margin-top: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, #actions .split, .split-flip, .looks { grid-template-columns: minmax(0, 1fr); }
  .looks-preview { order: -1; }
  .wheel-preview { width: min(100%, 360px); }
  .format-row { grid-template-columns: 110px minmax(0, 1fr); }
  .format-note { grid-column: 2; text-align: left; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .top-row { gap: 12px; }
  .scene { height: 600px; }
  .slot { left: var(--mx); top: var(--my); }
  .note { top: auto; bottom: 64px; left: 12px; width: 200px; padding: 12px 12px 8px; transform: rotate(-1.5deg); }
  .bloom { right: -46%; width: 130%; top: 34%; }
  .task-search { width: 110px; }
  .task-app, .tray-logo { display: none; }
  .toast { bottom: auto; top: 14px; right: 12px; }
  .float-win { top: 14px; right: 12px; width: 52%; }
  .duo-row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .duo-col + .duo-col { border-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .cards, .cards-two { grid-template-columns: minmax(0, 1fr); }
  .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .format-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .format-note { grid-column: auto; }
  .kind-tab { padding: 9px 14px; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { flex: 1 1 100%; }
  .top .btn-small { padding: 0 12px; }
  .top .btn-small svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .logo.draw path { stroke-dashoffset: 0; }
}
