/* ============================================================
   متوازي · تنسيق مؤقّت
   ============================================================
   🔴 بسيط ومؤقّت عمدًا — الهوية والشعار والخطوط تُحدَّد لاحقًا.
   الألوان كلها متغيّرات هنا، فتبديل الهوية تعديلُ هذي الكتلة وحدها.
   ============================================================ */
:root {
  --bg: #f7f8f7;
  --card: #ffffff;
  --ink: #1d2421;
  --muted: #5f6b66;
  --line: #e2e6e4;
  --accent: #2f7d5b;
  --accent-ink: #ffffff;
  --warn: #9a5b00;
  --err: #b3261e;
  --ok: #2f7d5b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

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

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.top .brand { font-weight: 700; color: var(--ink); text-decoration: none; }

h1 { font-size: 1.6rem; line-height: 1.5; margin: 0 0 12px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }

.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

label { display: block; font-size: 0.95rem; margin: 12px 0 4px; }

input {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-block;
  width: 100%;
  font: inherit;
  font-weight: 700;
  text-align: center;
  padding: 12px 16px;
  margin-top: 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.link-btn {
  background: none; border: 0; padding: 0;
  font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline;
}

.msg { margin-top: 12px; font-size: 0.95rem; min-height: 1.5em; }
.msg.err { color: var(--err); }
.msg.ok  { color: var(--ok); }

.divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 0.9rem; margin: 20px 0 4px;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink);
}
.badge.on  { background: #dcefe5; color: var(--ok); }
.badge.off { background: #f6e7d3; color: var(--warn); }

.plan { position: relative; }
.plan.featured { border: 2px solid var(--accent); }
.plan .tag {
  position: absolute; top: -12px; inset-inline-start: 16px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.8rem; padding: 2px 10px; border-radius: 999px;
}
.plan .price { font-weight: 700; margin: 6px 0 0; }

.hidden { display: none !important; }

/* صفحة «قريباً» */
.soon {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.soon h1 { font-size: 1.9rem; }
@media (min-width: 720px) {
  .soon h1 { font-size: 2.4rem; }
}

/* ===== الاستمارة على خطوات ===== */
.progress {
  height: 6px; background: var(--line); border-radius: 999px;
  overflow: hidden; margin-bottom: 20px;
}
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .25s; }

.step-title { font-size: 1.25rem; margin: 0 0 6px; }
.step-hint { color: var(--muted); font-size: 0.95rem; margin: 0 0 16px; }

select, textarea {
  width: 100%; font: inherit; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }

/* بطاقات اختيار */
.choices { display: grid; gap: 10px; margin-top: 8px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
  display: block; width: 100%; text-align: start; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; cursor: pointer;
}
.choice strong { display: block; }
.choice small { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: #eef6f2; }

/* سؤال نعم/لا */
.yn { padding: 14px 0; border-bottom: 1px solid var(--line); }
.yn:last-child { border-bottom: 0; }
.yn > p { margin: 0 0 8px; }
.yn .choices { margin-top: 0; }
.yn .choice { text-align: center; padding: 10px; }
.yn .extra { margin-top: 10px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 0.97rem; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 3px; }

.nav { display: flex; gap: 10px; margin-top: 20px; }
.nav .btn { margin-top: 0; }
.nav .btn.ghost { flex: 0 0 34%; }

.review dt { color: var(--muted); font-size: 0.88rem; margin-top: 10px; }
.review dd { margin: 0; }
.review .edit { font-size: 0.85rem; }

.field-err { color: var(--err); font-size: 0.92rem; margin-top: 10px; min-height: 1.4em; }

/* ===== الملخص ===== */
.kcal { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin: 4px 0; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-top: 12px; }
.macros div { background: var(--bg); border-radius: 10px; padding: 10px 4px; }
.macros b { display: block; font-size: 1.15rem; }

.stages { list-style: none; padding: 0; margin: 8px 0 0; }
.stages li { padding: 8px 28px 8px 0; position: relative; color: var(--muted); }
.stages li::before {
  content: ""; position: absolute; right: 4px; top: 15px;
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
}
.stages li.done { color: var(--ink); }
.stages li.done::before { background: var(--accent); border-color: var(--accent); }
.stages li.now { color: var(--ink); font-weight: 700; }
.stages li.now::before { border-color: var(--accent); }

/* ===== الصفحات القانونية ===== */
.draft-banner {
  background: #fff4e0; border: 1px solid #f0c987; color: #6b4300;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; font-weight: 700;
}
.legal h2 { margin-top: 24px; }
.legal li { margin-bottom: 6px; }
