/* The front page (/home): the site's own colors (midnight, mint-teal, a blue glow), laid out like a product page. */
:root {
  --paper: #f6f9fb; --card: #ffffff; --raise: #e9eff3; --ink: #0b1220; --muted: #5b6878; --line: #dae2ea;
  --accent: #087a69; --on-accent: #ffffff; --blue: #2f6bff; --ok: #1f8f5a;
  --display: "Geist", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "Geist", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0a0e14; --card: #111722; --raise: #19212e; --ink: #e8eef6; --muted: #8e9aac; --line: #212b3a;
  --accent: #22d3b0; --on-accent: #03140f; --blue: #7ea6ff; --ok: #4fd39a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0e14; --card: #111722; --raise: #19212e; --ink: #e8eef6; --muted: #8e9aac; --line: #212b3a;
    --accent: #22d3b0; --on-accent: #03140f; --blue: #7ea6ff; --ok: #4fd39a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--body); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.logo { --s: 30px; position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; background: var(--accent); vertical-align: middle; }
.logo i { position: absolute; width: 22%; height: 22%; border-radius: 50%; background: var(--on-accent); }
.logo i:nth-child(1) { top: 20%; left: 39%; }
.logo i:nth-child(2) { top: 55%; left: 19%; }
.logo i:nth-child(3) { top: 55%; left: 59%; }
.logo.big { --s: 64px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.big { padding: 12px 22px; font-size: 1.02rem; }
.btn.soon { opacity: .65; cursor: default; }
.btn.soon:hover { transform: none; }
.btn small { font-weight: 500; font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, currentColor 15%, transparent); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 14px max(16px, 5vw); background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.35rem var(--display); text-decoration: none; }
.links { display: flex; gap: 22px; margin-inline-start: auto; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--ink); }
.top-cta { display: flex; gap: 10px; }

/* the hero: the words in the middle, the app's cards floating around them */
.hero { position: relative; min-height: min(760px, 92vh); display: grid; place-items: center; padding: 60px 16px; overflow: hidden; }
.hero-text { position: relative; z-index: 1; max-width: 680px; text-align: center; }
.eyebrow { color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 1.15rem; margin: 18px auto 30px; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.float { position: absolute; inset: 0; pointer-events: none; }
.tile { position: absolute; width: 190px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(0 0 0 / .12); font-size: .88rem; animation: drift 7s ease-in-out infinite; }
.tile small { display: block; color: var(--muted); margin-bottom: 4px; }
.tile b { display: block; font: 700 1.9rem/1.2 var(--display); }
.tile b.pair { font-size: 1.15rem; margin-block: 4px 8px; }
.tile ul { list-style: none; padding: 0; margin: 4px 0 0; line-height: 1.9; }
.t1 { top: 9%; right: 6%; } .t2 { top: 44%; right: 2%; animation-delay: -2s; } .t3 { bottom: 8%; right: 12%; animation-delay: -4s; }
.t4 { top: 10%; left: 6%; animation-delay: -1s; } .t5 { top: 42%; left: 2%; width: 210px; animation-delay: -3s; } .t6 { bottom: 9%; left: 11%; animation-delay: -5s; }
.meter { display: block; height: 8px; border-radius: 4px; background: var(--raise); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--blue); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--raise); }
.pill.ok { color: var(--ok); }
.bubble { display: inline-block; padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: var(--raise); }
.muted { color: var(--muted); }
@keyframes drift { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .tile { animation: none; } html { scroll-behavior: auto; } }

.block { max-width: 1100px; margin: 0 auto; padding: 70px 16px; }
.block > h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); text-align: center; }
.sub { color: var(--muted); text-align: center; margin: 10px auto 34px; max-width: 560px; }
.block > h2 + .grid, .block > h2 + .two, #faq > h2 { margin-bottom: 34px; }
.block > h2 + .grid, .block > h2 + .two { margin-top: 34px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.steps li { position: relative; padding: 20px; border-radius: 16px; background: var(--raise); }
.steps span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 12px; }
.steps h3 { font-size: 1.02rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 99px; background: var(--raise); }

.download { text-align: center; border-radius: 24px; background: var(--raise); margin-block: 30px; }
.download h2 { margin-top: 16px; }

#faq details { margin: 0 auto 10px; max-width: 760px; }
#faq summary { cursor: pointer; font-weight: 600; }
#faq details p { margin-top: 10px; }

.note { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

.stats { list-style: none; max-width: 1100px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats li { text-align: center; padding: 18px 12px; border-block: 1px solid var(--line); }
.stats b { display: block; font: 700 2rem/1.3 var(--display); }
.stats span { color: var(--muted); font-size: .92rem; }

/* try a question */
.quiz { max-width: 720px; margin: 0 auto; padding: 26px; }
.quiz-top { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 8px; }
.quiz .meter i { transition: width .3s; }
.q { font: 600 1.35rem/1.6 var(--display); margin: 22px 0 18px; white-space: pre-line; text-align: center; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { font: inherit; color: inherit; text-align: start; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); cursor: pointer; transition: border-color .15s; }
.choice:hover:not(:disabled) { border-color: var(--ink); }
.choice:disabled { cursor: default; }
.choice.right { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.choice.wrong { border-color: #d33a2f; color: #d33a2f; }
.why { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: var(--raise); color: var(--ink); }
.quiz > .btn { margin-top: 4px; }
.quiz-end { text-align: center; padding-block: 18px 6px; }
.quiz-end b { display: block; font: 700 2.2rem/1.3 var(--display); margin-bottom: 6px; }
.quiz-end p { margin: 0 auto 18px; max-width: 460px; }
.quiz [hidden] { display: none !important; }

/* the sample report */
.report { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 14px; align-items: stretch; }
.r-score b { display: block; font: 700 4rem/1.1 var(--display); margin-block: 8px; }
.r-score span { display: block; }
.tag { display: inline-block !important; margin-top: 14px; padding: 4px 12px; border-radius: 99px; background: var(--raise); font-size: .88rem; }
.r-row { display: grid; grid-template-columns: 120px 1fr 3em; gap: 10px; align-items: center; margin-block: 9px; font-size: .93rem; }
.r-row .meter { margin: 0; }
.r-row.weak .meter i { background: #e0883a; }
.r-today ul { margin: 10px 0 0; padding-inline-start: 18px; line-height: 2.1; }

button.btn { font: inherit; font-weight: 600; cursor: pointer; }
.how { max-width: min(460px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); padding: 24px; }
.how::backdrop { background: rgb(0 0 0 / .55); }
.how ol { padding-inline-start: 20px; margin: 14px 0 20px; line-height: 2; }
.how-end { text-align: end; }
.how:not([open]):not(.show) { display: none; }
.how[open], .how.show { position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 50; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }

.final { text-align: center; }
.final h2 { margin-bottom: 26px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

.foot { border-top: 1px solid var(--line); padding: 28px 16px; text-align: center; color: var(--muted); font-size: .9rem; }
.foot p { margin: 4px 0; }

/* the pricing page (pricing.html) and a parent's report (report.html) */
.price-head { text-align: center; padding-bottom: 10px; }
.price-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 6px 0 12px; }
.price-head .lead { margin-inline: auto; }
.tag-ok { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-weight: 600; }
.tag-bad { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: 99px; background: color-mix(in srgb, #d9534f 14%, transparent); color: #d9534f; font-weight: 600; }
.tag-ok[hidden], .tag-bad[hidden] { display: none; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; }
.plan.best { border: 2px solid var(--accent); }
.plan .badge { position: absolute; top: -12px; inset-inline-start: 18px; background: var(--accent); color: var(--on-accent); border-radius: 99px; padding: 2px 12px; font-size: .8rem; font-weight: 600; }
.price { color: var(--ink) !important; font-size: 1rem; }
.price b { font-family: var(--display); font-size: 2.4rem; }
.checks { list-style: none; padding: 0; margin: 10px 0 16px; display: grid; gap: 8px; flex: 1; align-content: start; }
.checks li { padding-inline-start: 24px; position: relative; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.plan .btn { justify-content: center; }
.plan .err { color: #c0392b; font-size: .9rem; }
.grid.pairs { grid-template-columns: repeat(2, 1fr); }
.report-who { color: var(--muted); }
.how-calc { margin-top: 14px; }
.week-cards { margin-top: 14px; }
.how-calc summary { cursor: pointer; font-weight: 600; }
.how-calc p { margin-top: 10px; line-height: 1.8; }

@media (max-width: 1100px) { .tile { display: none; } .hero { min-height: auto; padding-block: 80px 50px; } }
@media (max-width: 900px) {
  .links { display: none; }
  .top-cta { margin-inline-start: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .report { grid-template-columns: 1fr 1fr; }
  .r-kinds { grid-column: 1 / -1; order: 2; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .top { gap: 10px; }
  .top-cta .ghost { display: none; }
  .steps, .grid, .grid.pairs, .two, .report, .choices { grid-template-columns: 1fr; }
  .r-row { grid-template-columns: 105px 1fr 3em; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* the pricing page as a plan picker: two tabs, cards with an icon, the price, a button, then what the plan gives */
.seg { display: inline-flex; gap: 4px; margin-top: 22px; padding: 4px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.seg button { font: inherit; font-size: .92rem; padding: 7px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.plans-block { padding-top: 10px; }
.plans-block .plans { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; }
.plan { padding: 22px; gap: 4px; overflow: hidden; }
.plan-strip { margin: -22px -22px 14px; padding: 8px; text-align: center; font-size: .85rem; font-weight: 600; color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; }
.plan-top svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.plan-top .badge { position: static; background: var(--raise); color: var(--muted); border: 1px solid var(--line); }
.plan h3 { font-size: 1.35rem; margin: 10px 0 0; }
.plan-line { font-size: .92rem; }
.plan .price { margin-top: 12px !important; display: flex; align-items: baseline; gap: 6px; }
.plan .price small { color: var(--muted); font-size: .85rem; }
.price-note { font-size: .82rem; min-height: 1.3em; margin-bottom: 12px !important; }
.plan hr { border: 0; border-top: 1px solid var(--line); margin: 16px -22px 12px; }
.plan-head { color: var(--ink) !important; font-size: .9rem; font-weight: 600; }
.plan .checks { margin-top: 8px; }
.plan .btn[disabled] { opacity: .6; cursor: default; }
.note.center { text-align: center; }
.plans-block .plans[data-count="4"] { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
/* paying without leaving the page: the card form in a frame, in a box over the plans */
.pay-box { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); overflow: auto; }
.pay-box::backdrop { background: rgb(0 0 0 / .55); }
.pay-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pay-x { font: inherit; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; }
.pay-box iframe { display: block; width: 100%; height: min(600px, calc(100dvh - 140px)); border: 0; background: #fff; }
.pay-safe { font-size: .8rem; text-align: center; padding: 8px 16px 12px; margin: 0; }

/* Burhan's look: the logo in its teal-to-blue, and a soft glow of the two behind the top of the page */
.logo { background: linear-gradient(135deg, var(--accent) 15%, var(--blue)); }
.hero::before { content: ""; position: absolute; inset: -10% -20% auto; height: 110%; z-index: 0; pointer-events: none;
  background: radial-gradient(45% 40% at 50% 38%, color-mix(in srgb, var(--blue) 26%, transparent), transparent 70%),
    radial-gradient(30% 28% at 35% 25%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.hero h1 em, .grad { background: linear-gradient(90deg, var(--accent), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.plan.best { box-shadow: 0 0 0 1px var(--accent), 0 12px 40px color-mix(in srgb, var(--accent) 18%, transparent); }

/* Palette 4 (chosen 2026-11-22): teal for Burhan, orange for the main action and the glow, as in style.css. */
:root {
  --paper: #f5fafa; --card: #ffffff; --raise: #e4efef; --ink: #0b1f20; --muted: #55706f; --line: #d3e2e2;
  --accent: #0b8a83; --on-accent: #ffffff; --blue: #f28c28; --cta: #f28c28; --on-cta: #2e1503;
}
:root[data-theme="dark"] {
  --paper: #0b1516; --card: #122224; --raise: #1a2e30; --ink: #e6f3f3; --muted: #93b0b0; --line: #1f3638;
  --accent: #19b5ad; --on-accent: #03201e; --blue: #f28c28;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1516; --card: #122224; --raise: #1a2e30; --ink: #e6f3f3; --muted: #93b0b0; --line: #1f3638;
    --accent: #19b5ad; --on-accent: #03201e; --blue: #f28c28;
  }
}
.btn { background: var(--cta); color: var(--on-cta); border-color: var(--cta); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* students' reviews (home.js fills them from GET /api/reviews) */
.review { display: flex; flex-direction: column; gap: 10px; }
.review header { display: flex; align-items: center; gap: 10px; }
.review .who { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); font-weight: 700; }
.review b { display: block; }
.stars { color: #f5a524; letter-spacing: 2px; font-size: .95rem; }
.review p { color: var(--ink); line-height: 1.8; }
.rev-avg { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.rev-avg b { color: #f5a524; font-size: 1.1rem; }
.rev-form { max-width: 560px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 12px; }
.rev-form[hidden] { display: none; }
.rev-form textarea { width: 100%; resize: vertical; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.rev-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stars-pick { display: flex; gap: 4px; }
.stars-pick button { background: none; border: 0; padding: 2px; font-size: 1.8rem; line-height: 1; color: var(--line); cursor: pointer; }
.stars-pick button.on { color: #f5a524; }
.stars-pick button:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }

/* the pricing page: free and subscribed side by side */
.compare-table { max-width: 760px; margin: 30px auto 0; padding: 6px 0; }
.cmp-row { display: grid; grid-template-columns: 1fr 120px 120px; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.cmp-row.head { border-top: 0; font-weight: 700; }
.cmp-row span:not(:first-child) { text-align: center; }
.cmp-row .pro { color: var(--accent); font-weight: 600; }
.cmp-row.head .pro { color: var(--accent); }
.cmp-row .yes { color: var(--ok); font-weight: 700; }
.cmp-row .no { color: var(--muted); }
.cmp-row .lim { color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) { .cmp-row { grid-template-columns: 1fr 72px 80px; padding: 10px 12px; font-size: .9rem; } .cmp-row .lim, .cmp-row .pro { font-size: .8rem; } }

/* Burhan's logo, alive: the dots turn slowly and a ring of light breathes out from it */
@media (prefers-reduced-motion: no-preference) {
  .brand .logo, .logo.big { animation: logoTurn 16s linear infinite; }
  .brand .logo::after, .logo.big::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; pointer-events: none; animation: logoHalo 3s ease-out infinite; }
  @keyframes logoTurn { to { transform: rotate(360deg); } }
  @keyframes logoHalo { 0% { transform: scale(.92); opacity: .65; } 100% { transform: scale(1.55); opacity: 0; } }
}

/* the apps: one card a system, the visitor's own first (home.js) */
.os-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 900px; margin: 22px auto 4px; }
.os { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.os:hover { transform: translateY(-2px); border-color: var(--accent); }
.os .ic { width: 28px; height: 28px; }
.os span { display: flex; flex-direction: column; gap: 2px; }
.os b { font-weight: 700; }
.os small { color: var(--muted); font-size: .78rem; }
.os.mine { border: 2px solid var(--accent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--card)); }
.os.soon::after { content: "قريباً"; position: absolute; top: 8px; inset-inline-end: 8px; padding: 1px 8px; border-radius: 99px; background: var(--raise); color: var(--muted); font-size: .7rem; }
@media (max-width: 720px) {
  .os-grid { grid-template-columns: repeat(2, 1fr); }
  .os.mine { grid-column: 1 / -1; flex-direction: row; justify-content: center; padding: 16px; }
  .os.mine span { align-items: flex-start; }
}
