:root {
  color-scheme: light;
  --paper: #F6F3EE;
  --sheet: #FBF9F5;
  --line: #E4DCCD;
  --ink: #1E1A14;
  --muted: #6B6253;
  --pine: #15120E;
  --pine-deep: #2A241B;
  --pine-soft: #F6EEDB;
  --lv-very_low: #CFDCD7;
  --lv-low: #A9C2BA;
  --lv-mid: #D49A33;
  --lv-high: #BC5A2B;
  --lv-very_high: #7C2F45;
  --danger: #A63A2B;
  --night: #15120E;
  --night-2: #221C15;
  --gold: #D6B25E;
  --gold-deep: #B8913A;
  --mist: #CFE0DA;
  --ui: "Readex Pro", system-ui, sans-serif;
  --read: "Noto Naskh Arabic", "Readex Pro", serif;
  --r-sm: 10px;
  --r-md: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--ui);
}
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px max(24px, env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
a { color: var(--pine); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; border-radius: 6px; }

/* شريط علوي */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 0 8px; position: relative; z-index: 3; }
.bar .link-btn { margin-inline-start: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.brand img { height: 38px; width: auto; display: block; }
.brand { font-size: 14px; }

/* عناوين عامة */
h1 {
  font-weight: 700; font-size: clamp(38px, 11vw, 56px); line-height: 1.15; margin: 0 0 16px;
  letter-spacing: -0.5px;
}
h2 { font-weight: 600; font-size: 26px; line-height: 1.35; margin: 8px 0 6px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.fine { font-size: 13px; color: var(--muted); line-height: 1.7; }
.center { text-align: center; }
.actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.resume-note { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin: 0 0 4px; font-size: 15px; }

/* الفسيفساء: 15 مخططاً في 5 مجالات */
.mosaic { display: grid; gap: 10px; }
.mosaic .dom { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; }
.mosaic .dom-name { font-size: 12px; color: var(--muted); line-height: 1.35; }
.mosaic .tiles { display: flex; gap: 6px; }
.mosaic .tile {
  flex: 0 0 auto; width: clamp(38px, 11vw, 54px); aspect-ratio: 1; border-radius: 9px;
  background: var(--pine); position: relative; border: 0; padding: 0;
}
.mosaic.home .tile { opacity: .9; }
.mosaic.home .dom:nth-child(1) .tile { background: #1F5E57; }
.mosaic.home .dom:nth-child(2) .tile { background: #3E7A70; }
.mosaic.home .dom:nth-child(3) .tile { background: #6C9A8F; }
.mosaic.home .dom:nth-child(4) .tile { background: #96B6AC; }
.mosaic.home .dom:nth-child(5) .tile { background: #BCD0C9; }
@media (prefers-reduced-motion: no-preference) {
  .mosaic.home .tile { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 45ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.92); } }
}
.mosaic.result .tile { cursor: pointer; }
.mosaic.result .tile span {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff;
}
.mosaic.result .tile.lv-very_low span, .mosaic.result .tile.lv-low span { color: var(--ink); }
.lv-very_low { background: var(--lv-very_low) !important; }
.lv-low { background: var(--lv-low) !important; }
.lv-mid { background: var(--lv-mid) !important; }
.lv-high { background: var(--lv-high) !important; }
.lv-very_high { background: var(--lv-very_high) !important; }

/* أزرار */
.btn {
  display: inline-flex; justify-content: center; align-items: center; min-height: 54px; padding: 0 22px;
  border-radius: var(--r-md); border: 1.5px solid transparent; font-weight: 600; font-size: 17px; cursor: pointer;
  text-decoration: none; width: 100%;
}
.btn.primary { background: var(--pine); color: #fff; }
.btn.primary:hover { background: var(--pine-deep); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.outline { background: var(--sheet); border-color: var(--pine); color: var(--pine); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.busy { pointer-events: none; opacity: .7; }
.link-btn { background: none; border: 0; padding: 8px 4px; color: var(--pine); font-weight: 500; cursor: pointer; font-size: 15px; }
.link-btn:disabled { color: var(--muted); cursor: default; }
.back { background: none; border: 0; padding: 6px 0; color: var(--muted); cursor: pointer; font-size: 14px; margin-top: 8px; }
.back::before { content: "› "; }

/* نماذج */
form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 500; color: var(--muted); padding: 0; margin-bottom: 6px; }
input:not([type=radio]), select {
  width: 100%; min-height: 52px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: #fff; font-size: 17px;
}
input:focus, select:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px var(--pine-soft); }
.phone { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.choices { display: grid; gap: 8px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; }
.choices span {
  display: grid; place-items: center; min-height: 52px; border-radius: var(--r-sm); border: 1.5px solid var(--line);
  background: #fff; font-weight: 500; cursor: pointer;
}
.choices input:checked + span { border-color: var(--pine); background: var(--pine-soft); color: var(--pine-deep); }
.choices input:focus-visible + span { outline: 3px solid var(--pine); outline-offset: 2px; }
.error { color: var(--danger); font-size: 14px; margin: -6px 0 0; min-height: 1px; }
.error:empty { display: none; }
.otp { text-align: center; font-size: 30px !important; letter-spacing: 12px; font-weight: 600; min-height: 64px !important; }

/* الأسئلة */
.progress { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 10px 0 12px; }
.progress-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.track { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.track i { display: block; height: 100%; background: var(--pine); width: 0; transition: width .4s ease; }
.legend { list-style: none; margin: 0 0 12px; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: 4px; font-size: 14px; }
.legend b { display: inline-block; width: 22px; color: var(--pine); }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }

.q { padding: 30px 0 32px; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; padding-top: 8px; }
.q-num { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: var(--pine-soft); color: var(--pine-deep); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.q-text { font-family: var(--read); font-size: 22px; line-height: 1.8; font-weight: 700; margin: 0 0 18px; }
.scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.scale button {
  min-height: 54px; padding: 6px 6px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--ink); transition: background .15s, border-color .15s, color .15s;
}
.scale button[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.choice-label { font-size: 14px; color: var(--pine-deep); font-weight: 500; margin-top: 8px; min-height: 22px; }
.q.missing .q-text { color: var(--danger); }
.pager { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 8px; }

/* النتيجة */
.r-head { padding: 18px 0 6px; }
.r-head h1 { font-size: clamp(30px, 8.5vw, 42px); margin-bottom: 8px; }
.r-date { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.r-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.r-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 5px; vertical-align: -1px; }
.r-list { list-style: none; padding: 0; margin: 30px 0 0; }
.r-item { padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.r-item.flash { background: linear-gradient(90deg, transparent, var(--pine-soft), transparent); }
.r-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.r-name { font-weight: 600; font-size: 19px; }
.r-score { font-weight: 600; font-size: 20px; white-space: nowrap; }
.r-score small { color: var(--muted); font-weight: 400; font-size: 14px; }
.r-bar { height: 8px; background: var(--line); border-radius: 8px; margin: 10px 0; overflow: hidden; }
.r-bar i { display: block; height: 100%; border-radius: 8px; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 20px; color: #fff; margin-left: 6px; }
.r-text { margin: 6px 0 0; font-family: var(--read); font-size: 17px; line-height: 1.9; }
.note { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin: 24px 0 0; font-size: 15px; }
.note.warn { border-color: #E5C98F; background: #FBF5E8; }
.note p { margin: 0 0 10px; }
.note p:last-child { margin: 0; }
.offer { margin: 34px 0 0; padding: 24px 20px; border-radius: var(--r-md); background: var(--pine); color: #fff; }
.offer h3 { margin: 0 0 6px; font-size: 21px; font-weight: 600; }
.offer p { margin: 0 0 18px; color: #D7E7E2; font-size: 15px; }
.offer .btn { background: #fff; color: var(--pine-deep); }
.offer .price { font-weight: 700; margin-right: 6px; }
.consult { margin: 14px 0 0; padding: 20px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--sheet); }
.consult h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.consult p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.paid-box { margin: 34px 0 0; padding: 20px; border-radius: var(--r-md); background: var(--pine-soft); }
.paid-box h3 { margin: 0 0 6px; font-size: 19px; }
.expl { border-top: 1px solid var(--line); }
.expl summary { padding: 14px 0; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.expl summary::after { content: "+"; color: var(--pine); font-size: 20px; }
.expl[open] summary::after { content: "−"; }
.expl div { font-family: var(--read); font-size: 17px; line-height: 1.95; padding-bottom: 14px; }
.r-foot { margin: 28px 0 0; display: flex; justify-content: center; }

/* أخرى */
.loading { display: flex; justify-content: center; gap: 8px; padding: 120px 0; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--pine); animation: pulse 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.toast {
  position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); z-index: 20;
}
.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); line-height: 1.9; }
.foot a { color: var(--muted); }

@media (max-width: 360px) {
  .mosaic .dom { grid-template-columns: 74px 1fr; }
  .scale { gap: 4px; }
  .phone { grid-template-columns: 92px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.source { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.source b { color: var(--ink); font-weight: 600; }

/* ===== الصفحة الرئيسية ===== */
body[data-screen="home"] { background: var(--night); }
body[data-screen="home"] .wrap { padding-bottom: 0; }
body[data-screen="home"] .brand { color: #fff; }
body[data-screen="home"] .bar .link-btn { color: var(--gold); }
body[data-screen="home"] .brand span { color: #F1EADB; }
body[data-screen="home"] .foot { background: var(--paper); margin: 0 calc(50% - 50vw); padding: 22px 16px max(28px, env(safe-area-inset-bottom)); border: 0; }

.hero-dark {
  position: relative; color: #fff; text-align: center;
  margin: -76px calc(50% - 50vw) 0; padding: 76px 20px 0;
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(214,178,94,.16) 0%, transparent 70%),
    radial-gradient(120% 60% at 50% 110%, rgba(214,178,94,.12) 0%, transparent 65%),
    linear-gradient(180deg, #1B1712 0%, #15120E 55%, #120F0B 100%);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; max-width: 520px; width: 100%; padding: 4vh 0 0; }
.hero-title {
  font-weight: 700; font-size: clamp(30px, 9vw, 48px); line-height: 1.15; letter-spacing: -.5px; margin: 0 0 6px;
  color: #F4F1E6;
}
.hero-tag { font-size: 14px; letter-spacing: .5px; color: #CFC5B1; margin: 0 0 22px; }
.hero-q { font-family: var(--read); font-weight: 600; font-size: clamp(21px, 6vw, 27px); line-height: 1.6; color: var(--gold); margin: 0 0 8px; }
.hero-line { font-size: 17px; line-height: 1.8; color: #E6DECD; margin: 0 auto 32px; max-width: 26em; }
.hero-dark .actions { max-width: 360px; margin: 0 auto; }
.hero-facts {
  list-style: none; margin: 14px auto 0; padding: 0; max-width: 360px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(214,178,94,.32); border-radius: 12px; overflow: hidden;
  background: rgba(214,178,94,.05);
}
.hero-facts li { padding: 8px 4px; font-size: 13px; color: #E6DECD; line-height: 1.4; }
.hero-facts li + li { border-right: 1px solid rgba(214,178,94,.32); }
.hero-facts b { color: var(--gold); font-weight: 700; font-size: 15px; margin-left: 2px; }
.hero-dark .resume-note { background: rgba(255,255,255,.05); border-color: rgba(214,178,94,.25); color: #E6DECD; }
.btn.gold { background: var(--gold); color: var(--night); box-shadow: 0 10px 30px -12px rgba(214,178,94,.7); }
.btn.gold:hover { background: #E2C277; }
.link-btn.light { color: #E6DECD; text-decoration: none; text-align: center; }

.roots { position: relative; z-index: 1; width: min(230px, 62%); margin: 30px auto 0; display: block; flex: 0 0 auto; }
.roots path { fill: none; stroke: rgba(214,178,94,.6); stroke-width: 1.6; stroke-linecap: round; }
.roots path.leaf { stroke: rgba(233,215,167,.28); stroke-width: 1.2; }
.roots circle { fill: var(--gold); }
.roots circle:nth-child(3n) { fill: #E9D7A7; }
.roots circle:nth-child(4n) { fill: #A88A4C; }
@media (prefers-reduced-motion: no-preference) {
  .roots path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.4,0,.2,1) forwards; animation-delay: var(--d); }
  .roots circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: bloom .6s ease-out forwards; animation-delay: var(--d); }
  .hero-inner > * { animation: lift .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero-inner > :nth-child(2) { animation-delay: .08s; } .hero-inner > :nth-child(3) { animation-delay: .16s; } .hero-inner > :nth-child(4) { animation-delay: .26s; } .hero-inner > :nth-child(5) { animation-delay: .36s; } .hero-inner > :nth-child(6) { animation-delay: .44s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes bloom { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
  @keyframes lift { from { opacity: 0; transform: translateY(14px); } }
}
.scroll-cue {
  position: relative; z-index: 2; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  color: #CFC5B1; text-decoration: none; font-size: 13px; padding: 14px 0 max(22px, env(safe-area-inset-bottom)); opacity: .85;
}

/* المحتوى تحت الواجهة */
.about { background: var(--paper); margin: 0 calc(50% - 50vw); padding: 8px max(16px, calc(50vw - 284px)) 12px; }
.block { padding: 48px 0 8px; }
.block + .block { border-top: 1px solid var(--line); }
.block-title { font-size: clamp(26px, 7.4vw, 34px); font-weight: 700; line-height: 1.3; margin: 0 0 22px; letter-spacing: -.3px; text-align: center; }
.intro-lede { font-family: var(--read); font-size: 19px; line-height: 2; margin: 0 auto 28px; text-align: center; max-width: 32em; }
.intro-lede span { font-family: var(--ui); font-size: 14px; color: var(--muted); }

.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 2px; font-weight: 600; font-size: 18px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--pine-soft) center / 14px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%231F5E57' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: transform .25s ease, background-color .25s ease;
}
.acc[open] summary::after { transform: rotate(45deg); background-color: #F3E7C6; }
.acc-body { padding: 0 2px 22px; font-size: 16px; line-height: 1.9; }
.acc-body p { margin: 0 0 12px; }
.meta { margin: 0; display: grid; gap: 14px; }
.meta dt { font-size: 13px; color: var(--muted); }
.meta dd { margin: 2px 0 0; font-weight: 500; }
.schema-list { list-style: none; counter-reset: s; padding: 0; margin: 4px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 15px; }
.schema-list li { counter-increment: s; display: flex; gap: 8px; align-items: baseline; }
.schema-list li::before { content: counter(s, arabic-indic); color: var(--gold-deep); font-weight: 700; min-width: 1.3em; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-right: 26px; }
.ticks li::before { content: ""; position: absolute; right: 0; top: .62em; width: 12px; height: 12px; border-radius: 4px; background: var(--gold); }
.ticks b { font-weight: 600; }
.quotes { display: grid; gap: 14px; }
.quotes blockquote { margin: 0; padding: 16px 18px; background: var(--sheet); border-radius: var(--r-md); border-right: 3px solid var(--gold); }
.quotes blockquote p { font-family: var(--read); font-size: 17px; line-height: 1.9; margin: 0 0 8px; }
.quotes cite { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

.gains { list-style: none; padding: 0; margin: 0; }
.gains li { font-family: var(--read); font-size: 17px; line-height: 1.8; font-weight: 600; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.gains li span { font-family: var(--ui); font-weight: 500; font-size: 15px; color: var(--gold-deep); margin-left: 6px; }
.pull { font-size: clamp(20px, 5.6vw, 24px); font-weight: 700; line-height: 1.5; margin: 18px 0 0; color: var(--pine); }

.who { margin: 0; display: grid; gap: 0; }
.who > div { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.who > div:last-child { border-bottom: 0; }
.who dt { font-weight: 600; font-size: 17px; }
.who dd { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.who .quote dd { font-family: var(--read); font-size: 19px; color: var(--pine); font-weight: 600; }

.final .facts { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.final .facts li { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 8px; text-align: center; }
.final .facts b { display: block; font-size: 30px; font-weight: 700; color: var(--pine); line-height: 1.2; }
.final .facts span { font-size: 13px; color: var(--muted); }

.block.final { border-top: 0; }

/* تنسيق الجزء السفلي مع هوية الأسود والذهبي */
.about { background: #F6F3EE; color: #1E1A14; }
body[data-screen="home"] .foot { background: #F6F3EE; color: #6B6253; }
body[data-screen="home"] .foot a { color: #6B6253; }
.about .block + .block, .about .acc, .about .acc:last-of-type, .about .source { border-color: #E4DCCD; }
.about .acc summary::after { background-color: #EFE6D2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%23A37F2F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.about .acc[open] summary::after { background-color: #E6D5AA; }
.about .pull, .about .who .quote dd { color: #8C6A24; }
.about .fine, .about .who dd, .about .meta dt, .about .quotes cite { color: #6B6253; }
.about .gains li, .about .who > div { border-color: #E4DCCD; }
.about .quotes blockquote { background: #FBF9F5; }
.about .btn.primary { background: #15120E; color: var(--gold); }
.about .btn.primary:hover { background: #2A241B; }
.about :focus-visible { outline-color: var(--gold-deep); }
.about .intro-lede span { color: #6B6253; }
.about .source b, .about .who dt, .about .acc summary { color: #1E1A14; }
.block.final { padding-top: 28px; }
.block.final .source { margin-top: 0; }
.block.final .source { border-top: 0; padding-top: 0; }

.brand .logo-mark { display: none; }
body[data-screen="home"] .brand .logo-box, body[data-screen="home"] .brand span { display: none; }
body[data-screen="home"] .brand .logo-mark { display: block; height: 50px; width: auto; }
body[data-screen="home"] .bar .link-btn { border: 1px solid rgba(214,178,94,.45); border-radius: 999px; padding: 6px 14px; font-size: 14px; }

.hint-inline { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.privacy { display: flex; gap: 12px; align-items: flex-start; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-top: 4px; }
.privacy svg { flex: 0 0 auto; color: var(--gold-deep); margin-top: 2px; }
.privacy p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.privacy b { color: var(--ink); font-weight: 600; }

.test-tag { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35; margin: -2px 0 4px; }
.test-tag span { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); letter-spacing: .3px; text-align: right; }
body[data-screen="home"] .test-tag { display: none; }
.q { text-align: center; }
.q .q-num { margin-inline: auto; }

/* ===== صفحة الأسئلة: قوالب مستقلة + قائمة متدرّجة ===== */
body[data-screen="quiz"] { background: #F6F3EE; }
body[data-screen="quiz"] .progress { background: #F6F3EE; }
body[data-screen="quiz"] .progress-row { color: #6B6253; font-size: 13px; }
body[data-screen="quiz"] .track { height: 5px; background: #E6DECD; }
body[data-screen="quiz"] .track i { background: linear-gradient(270deg, #B8913A, #D6B25E); }
body[data-screen="quiz"] .hint { color: #6B6253; font-size: 13.5px; margin: 2px 0 16px; }
body[data-screen="quiz"] .test-tag { color: #1E1A14; }

.q {
  background: #fff; border: 0; border-radius: 18px; padding: 20px 16px 18px; margin: 0 0 18px; text-align: center;
  box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 6px 18px -10px rgba(40,30,10,.18);
}
.q:first-child { padding-top: 20px; }
.q .q-num {
  display: inline-block; min-width: 0; height: auto; margin: 0 0 10px; padding: 3px 12px; border-radius: 999px;
  background: #F6EEDB; color: #A37F2F; font-size: 12px; font-weight: 600;
}
.q .q-text { font-family: var(--ui); font-size: 18.5px; line-height: 1.75; font-weight: 600; color: #1E1A14; margin: 0 0 16px; }
.q .scale { display: flex; flex-direction: column; gap: 7px; }
.q .scale button {
  display: flex; align-items: center; gap: 10px; text-align: right; min-height: 44px; padding: 0 14px;
  font-family: var(--ui); font-size: 14.5px; font-weight: 400; color: #3B342A; line-height: 1.4;
  background: #FAF8F4; border: 1px solid #ECE5D7; border-radius: 12px;
}
.q .scale button i { position: relative; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #CBBF9F; }
.q .scale button[aria-pressed="true"] { background: #15120E; border-color: #15120E; color: #E2C277; }
.q .scale button[aria-pressed="true"] i { border-color: #E2C277; }
.q .scale button[aria-pressed="true"] i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #E2C277; }
@media (hover: hover) { .q .scale button:hover { border-color: #D6C59A; } }
.q.missing { box-shadow: 0 0 0 2px #E2B4A8, 0 6px 18px -10px rgba(40,30,10,.18); }
.q.missing .q-text { color: var(--danger); }

body[data-screen="quiz"] .pager .btn.primary { background: #15120E; color: var(--gold); }
body[data-screen="quiz"] .pager .btn.ghost { background: #fff; border-color: #E4DCCD; color: #3B342A; }
body[data-screen="quiz"] .fine { color: #6B6253; }

/* ===== النتيجة: المخطط الشامل ===== */
.r-sec { font-size: 20px; font-weight: 700; margin: 26px 0 12px; }
.r-sec-main { font-size: clamp(21px, 6vw, 25px); line-height: 1.45; margin: 40px 0 6px; }
.overview { background: #fff; border-radius: 18px; padding: 6px 16px 14px; box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 6px 18px -10px rgba(40,30,10,.18); }
.overview .r-sec { margin: 14px 0 4px; text-align: center; }
.ov-dom { padding-top: 10px; }
.ov-dom-name { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: #A37F2F; }
.ov-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 8px 0; border: 0; border-bottom: 1px dashed #ECE5D7; background: none; font: inherit; text-align: right; color: inherit;
}
.ov-dom .ov-row:last-child { border-bottom: 0; }
.ov-row.hot { cursor: pointer; }
.ov-name { font-size: 14.5px; line-height: 1.5; }
.ov-row.hot .ov-name { font-weight: 600; }
.ov-lv { flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: #fff; white-space: nowrap; }
.ov-lv.lv-very_low, .ov-lv.lv-low { color: #2B2A24; }

.r-lv { font-weight: 600; font-size: 16px; }
.t-mid { color: #B07D1E; } .t-high { color: #BC5A2B; } .t-very_high { color: #7C2F45; }
.r-item .r-text { margin-top: 8px; }

/* المخطط الشامل: قالب لكل مجال */
.overview { background: none; box-shadow: none; padding: 0; }
.overview .r-sec { margin: 6px 0 12px; }
.overview { display: grid; gap: 10px; }
@media (min-width: 560px) { .overview { grid-template-columns: 1fr 1fr; } .overview .r-sec { grid-column: 1 / -1; } }
.ov-dom {
  background: #fff; border-radius: 16px; padding: 10px 14px 6px;
  box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 6px 16px -10px rgba(40,30,10,.16);
}
.ov-dom-name { margin: 0 0 2px; padding-bottom: 6px; border-bottom: 1px solid #F1EBDD; font-size: 13px; font-weight: 700; color: #A37F2F; text-align: center; }
.ov-row { padding: 6px 0; }
.ov-name { font-size: 14px; }
.ov-lv { font-size: 11.5px; padding: 2px 9px; }

/* فاصل + قائمة المخططات المؤثرة بشكل مضغوط */
.r-divider { display: flex; align-items: center; gap: 12px; margin: 30px 0 4px; }
.r-divider::before, .r-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #D9C9A0, transparent); }
.r-divider span { width: 8px; height: 8px; transform: rotate(45deg); background: #C9A55A; border-radius: 1px; }
.r-sec-main { font-size: clamp(19px, 5.4vw, 22px); margin: 14px 0 12px; }
.r-list { margin: 0; padding: 4px 14px; background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 6px 16px -10px rgba(40,30,10,.16); }
.r-list .r-item { padding: 12px 0; border-top: 1px dashed #ECE5D7; }
.r-list .r-item:first-child { border-top: 0; }
.r-list .r-name { font-size: 15.5px; }
.r-list .r-lv { font-size: 13.5px; }
.r-list .r-score { font-size: 16px; }
.r-list .r-score small { font-size: 12px; }
.r-list .r-text { font-family: var(--ui); font-size: 13.5px; line-height: 1.75; color: #5A5244; margin: 4px 0 0; }

.r-list .r-top { justify-content: flex-start; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.r-tag { font-size: 14px; font-weight: 600; white-space: nowrap; }
.r-tag-sc { display: inline-block; margin-inline-start: 10px; font-weight: 700; color: #3B342A; }
.r-tag-sc small { font-size: 12px; font-weight: 500; color: #8A8070; }

/* توحيد الهوية: الأسود والذهبي في كل الصفحات */
a { color: var(--gold-deep); }
.link-btn { color: var(--gold-deep); }
.btn.primary { color: var(--gold); }
.btn.primary:hover { background: #2A241B; }
.btn.outline { color: var(--ink); border-color: var(--ink); }
input:focus, select:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px #F3E7C6; }
.choices input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--gold); }
.offer { background: #15120E; }
.offer p { color: #CFC5B1; }
.offer h3 { color: #F1EADB; }
.offer .btn { background: var(--gold); color: #15120E; }
.consult { background: #fff; border-color: var(--line); }
.paid-box { background: #F6EEDB; }
.otp:focus { border-color: var(--gold-deep); }
.ov-sub { text-align: center; font-size: 13px; color: var(--muted); margin: -2px 0 6px; grid-column: 1 / -1; }

/* قالب «فهم النتيجة بعمق» بخيارين */
.deep { margin: 34px 0 0; padding: 24px 16px 18px; border-radius: 18px; background: #15120E; color: #F1EADB; text-align: center; }
.deep h3 { margin: 0 0 16px; font-size: clamp(19px, 5.4vw, 22px); font-weight: 700; line-height: 1.5; color: #F1EADB; }
.deep-opts { display: grid; gap: 10px; }
@media (min-width: 560px) { .deep-opts { grid-template-columns: 1fr 1fr; } }
.deep-opt { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(214,178,94,.28); }
.deep-opt h4 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--gold); }
.deep-opt p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.75; color: #CFC5B1; flex: 1; }
.deep .btn { min-height: 48px; font-size: 15.5px; }
.deep .btn.deep-gold { background: var(--gold); color: #15120E; }
.deep .btn.deep-ghost { background: transparent; color: var(--gold); border: 1.5px solid rgba(214,178,94,.6); text-decoration: none; }

/* قالب واحد بلا مربعات داخلية */
.deep { padding: 26px 20px 22px; }
.deep h3 { margin-bottom: 18px; }
.deep .deep-opt { background: none; border: 0; padding: 0; gap: 6px; }
.deep .deep-opt h4 { font-size: 17px; }
.deep .deep-opt p { margin-bottom: 8px; }
.deep-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #CFC5B1; font-size: 13px; }
.deep-or::before, .deep-or::after { content: ""; flex: 1; height: 1px; background: rgba(214,178,94,.3); }

/* تبويبا النتيجة */
.r-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #ECE5D7; border-radius: 13px; padding: 4px; margin: 22px 0 14px; }
.r-tabs button { border: 0; background: none; padding: 11px 6px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 500; color: #6B6253; cursor: pointer; }
.r-tabs button[aria-selected="true"] { background: #15120E; color: var(--gold); font-weight: 600; }
.r-panel .ov-sub { margin: 0 0 10px; }
.r-panel.overview { display: grid; }
.r-panel[hidden] { display: none !important; }
.r-list .r-item { display: grid; grid-template-columns: 4px 1fr; column-gap: 12px; }
.r-list .r-item::before { content: ""; grid-row: 1 / span 2; border-radius: 4px; background: var(--bar, #ccc); }
.r-list .r-item > * { grid-column: 2; }
.lvbar-mid { --bar: #B07D1E; } .lvbar-high { --bar: #BC5A2B; } .lvbar-very_high { --bar: #7C2F45; }

/* المقارنة بالنتيجة السابقة */
.cbox { background: #fff; border-radius: 16px; padding: 14px 16px 8px; margin: 18px 0 0; box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 6px 16px -10px rgba(40,30,10,.16); }
.cbox .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cbox .hd b { font-size: 16px; }
.cbox .hd span { font-size: 12.5px; color: #6B6253; }
.cbox .grp { font-size: 13px; font-weight: 700; margin: 12px 0 2px; }
.cbox .grp.dn { color: #3F7A4A; } .cbox .grp.up { color: #A63A2B; }
.cbox .ci { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed #ECE5D7; font-size: 14px; }
.cbox .ci small { display: block; font-size: 12px; color: #8A8070; }
.cbox .fr { font-size: 13px; color: #6B6253; white-space: nowrap; }
.cbox .fr b { color: #1E1A14; font-size: 14px; }
.cbox .same { font-size: 12.5px; color: #8A8070; text-align: center; padding: 10px 0 4px; border-top: 1px solid #F1EBDD; margin: 8px 0 0; }
/* نتائجك السابقة */
details.hist { background: #fff; border: 1px solid #E4DCCD; border-radius: 14px; padding: 0 16px; margin: 16px 0 0; }
details.hist summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 13px 0; font-weight: 600; font-size: 15px; cursor: pointer; }
details.hist summary::-webkit-details-marker { display: none; }
details.hist summary::after { content: "+"; color: #A37F2F; font-size: 20px; line-height: 1; }
details.hist[open] summary::after { content: "−"; }
details.hist .hrow { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px dashed #ECE5D7; font-size: 14px; }
details.hist .hrow small { display: block; color: #6B6253; font-size: 12px; }
details.hist .hrow a { font-size: 13px; font-weight: 600; color: #A37F2F; text-decoration: none; }

/* قالب «فهم النتيجة بعمق» بتصميم هادئ */
.deep2 { margin: 26px 0 0; padding: 18px 14px 8px; background: #fff; border: 1px solid #ECE5D7; border-radius: 18px; box-shadow: 0 1px 2px rgba(40,30,10,.04), 0 10px 24px -16px rgba(40,30,10,.22); }
.deep2 h3 { margin: 0 0 10px; text-align: center; font-size: 17px; font-weight: 700; color: #1E1A14; }
.act-row {
  display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; width: 100%;
  padding: 13px 4px; background: none; border: 0; border-top: 1px solid #F1EBDD; font: inherit; color: inherit; text-align: right; text-decoration: none; cursor: pointer;
}
.deep2 h3 + .act-row { border-top: 0; }
.act-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #F6EEDB; color: #A37F2F; }
.act-tx b { display: block; font-size: 15px; font-weight: 600; color: #1E1A14; }
.act-tx small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.6; color: #6B6253; }
.act-price { font-size: 13px; font-weight: 700; color: #E2C277; background: #15120E; padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.act-go { color: #B8A27A; display: grid; place-items: center; }
@media (hover: hover) { .act-row:hover .act-tx b { color: #8C6A24; } }
.act-row.busy { opacity: .6; pointer-events: none; }

/* أزرار واضحة ونافرة داخل قالب محدد */
.deep2 { border: 1.5px solid #D9C9A0; padding: 18px 14px 14px; }
.deep2 .act-row {
  border: 1px solid #E2D6BC; border-radius: 14px; background: #FBF8F2; padding: 12px 12px; margin-top: 10px;
  box-shadow: 0 2px 0 #E2D6BC, 0 6px 14px -10px rgba(40,30,10,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.deep2 h3 + .act-row { border-top: 1px solid #E2D6BC; margin-top: 4px; }
.deep2 .act-row:active { transform: translateY(2px); box-shadow: 0 0 0 #E2D6BC, 0 2px 6px -4px rgba(40,30,10,.3); }
@media (hover: hover) { .deep2 .act-row:hover { border-color: #C9A55A; } }
.act-ic { background: #fff; border: 1px solid #EFE4C8; }
.act-price { font-size: 12.5px; padding: 8px 12px; }
.act-cta { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 700; color: #8C6A24; border: 1.5px solid #C9A55A; padding: 6px 10px 6px 8px; border-radius: 999px; white-space: nowrap; }
.act-cta svg { width: 14px; height: 14px; }

.act-price { display: grid; justify-items: center; line-height: 1.25; padding: 7px 12px; border-radius: 12px; }
.act-price small { font-size: 10.5px; font-weight: 500; color: #CFC5B1; }

/* قالب ملوّن بلون بني فاتح جداً، وأزرار بيضاء تتفاعل مع الضغط */
.deep2 { background: #EFE6D6; border: 1.5px solid #DCCBA8; box-shadow: 0 10px 26px -18px rgba(60,40,10,.35); }
.deep2 h3 { color: #2A241B; }
.deep2 .act-row {
  background: #fff; border: 1px solid #D9C7A2; border-radius: 14px;
  box-shadow: 0 3px 0 #CDB88E, 0 8px 16px -12px rgba(60,40,10,.45);
  -webkit-tap-highlight-color: transparent; cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease, border-color .15s ease;
}
.deep2 h3 + .act-row { border-top: 1px solid #D9C7A2; }
@media (hover: hover) {
  .deep2 .act-row:hover { background: #FFFDF8; border-color: #B8913A; transform: translateY(-1px); box-shadow: 0 4px 0 #C4AA74, 0 12px 20px -12px rgba(60,40,10,.5); }
}
.deep2 .act-row:active { background: #F6EEDB; border-color: #B8913A; transform: translateY(3px); box-shadow: 0 0 0 #CDB88E, 0 2px 6px -4px rgba(60,40,10,.4); }
.deep2 .act-row:focus-visible { outline: 3px solid #C9A55A; outline-offset: 2px; }
.deep2 .act-ic { background: #F6EEDB; border-color: #EADBB8; }
.deep2 .act-row:active .act-price { background: #2A241B; }
.deep2 .act-row:active .act-cta { background: #C9A55A; color: #fff; }

/* درجة النمط داخل دائرة */
.r-list .r-top { flex-wrap: nowrap; align-items: center; gap: 8px; }
.r-list .r-name { flex: 1; min-width: 0; }
.r-ring { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2.5px solid var(--bar, #B07D1E);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: #fff; }
.r-ring b { font-size: 16px; font-weight: 700; color: #2A241B; }
.r-ring small { font-size: 9.5px; font-weight: 500; color: #8A8070; margin-top: 2px; }
.rg-mid { --bar: #B07D1E; } .rg-high { --bar: #BC5A2B; } .rg-very_high { --bar: #7C2F45; }

/* الدرجة ككسر: الرقم فوق خط و٣٠ تحته */
.r-ring { width: 42px; height: 42px; }
.r-ring b { font-size: 14.5px; padding: 0 3px 2px; border-bottom: 1.5px solid #2A241B; }
.r-ring small { font-size: 10.5px; margin-top: 2px; color: #6E6556; font-weight: 600; }

.low-note { margin: 12px 0 0; padding: 10px 14px; background: #EEF2EF; border: 1px solid #D5E0DA; border-radius: 12px;
  font-family: var(--ui); font-size: 13px; line-height: 1.7; color: #4E5F58; text-align: center; }
.r-ring { width: 38px; height: 38px; border-width: 2px; }
.r-ring b { font-size: 13.5px; padding: 0 2px 1px; }
.r-ring small { font-size: 9.5px; margin-top: 1px; }

/* عنوان بطاقة الشرح: أكبر ولافت */
.deep2 h3.deep-title { font-size: 22px; font-weight: 700; line-height: 1.5; color: #15120E; margin: 4px 0 16px; }
.deep2 h3.deep-title::after { content: ""; display: block; width: 54px; height: 3px; border-radius: 3px; background: var(--gold-deep); margin: 10px auto 0; }
.deep-or { display: flex; align-items: center; gap: 12px; margin: 12px 6px; color: #8A7650; font-size: 14px; font-weight: 700; }
.deep-or::before, .deep-or::after { content: ""; flex: 1; height: 1px; background: #D3C19A; }
.deep-or + .act-row { margin-top: 0; }

/* ================= التقرير المكتوب ================= */
.rp-ready { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; padding: 16px; border-radius: 18px;
  background: #15120E; color: #EDE5D3; text-decoration: none; box-shadow: 0 12px 26px -16px rgba(20,15,5,.6); }
.rp-ready-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(214,178,94,.14); color: var(--gold); }
.rp-ready-tx { flex: 1; min-width: 0; }
.rp-ready-tx b { display: block; font-size: 16.5px; color: var(--gold); }
.rp-ready-tx small { display: block; font-size: 13px; color: #BDB29C; margin-top: 2px; }
.rp-ready-go { flex: none; display: flex; align-items: center; gap: 2px; font-weight: 700; font-size: 14px; color: #15120E; background: var(--gold); padding: 7px 12px 7px 10px; border-radius: 999px; }

.rp-head { text-align: center; margin: 10px 0 0; }
.rp-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--gold-deep); margin-bottom: 8px; }
.rp-kicker::before, .rp-kicker::after { content: ""; width: 22px; height: 1px; background: #D3BE8C; }
.rp-head h1 { font-size: 27px; line-height: 1.4; margin: 0 0 4px; }
.rp-head p { margin: 0; color: #7A705F; font-size: 14px; }
.rp-tools { display: flex; justify-content: center; gap: 10px; margin: 18px 0 4px; }
.rp-tools button { display: inline-flex; align-items: center; gap: 6px; font: 600 13.5px var(--ui); padding: 8px 14px; border-radius: 999px;
  border: 1px solid #DCCFB2; background: #fff; color: #3B342A; cursor: pointer; }
.rp-tools button svg { width: 17px; height: 17px; color: var(--gold-deep); }
.rp-tools button:active { background: #F6EEDB; }
.rp-intro { font-size: 14px; color: #6B6253; text-align: center; margin: 14px 0 16px; line-height: 1.8; }

.pc { background: #fff; border-radius: 18px; margin-bottom: 12px; border: 1px solid #ECE5D7; overflow: hidden;
  box-shadow: 0 1px 2px rgba(40,30,10,.04), 0 8px 20px -14px rgba(40,30,10,.2); }
.pc-top { display: block; width: 100%; text-align: start; background: none; border: 0; margin: 0; cursor: pointer; font: inherit; color: inherit;
  padding: 15px 16px 13px; border-inline-start: 4px solid var(--bar, #B07D1E); -webkit-tap-highlight-color: transparent; }
.pc-row { display: flex; align-items: center; gap: 8px; }
.pc-name { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; line-height: 1.5; }
.pc-sum { display: block; margin: 8px 0 0; font-family: var(--read); font-size: 15.5px; line-height: 1.85; color: #4A4235; }
.pc-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--gold-deep); }
.pc-more svg { transition: transform .2s; }
.pc.open .pc-more svg { transform: rotate(180deg); }
.pc-body { padding: 2px 18px 18px; border-top: 1px dashed #E9E1D0; }

.sec { padding: 16px 0 0; }
.sec + .sec { border-top: 1px solid #F2ECE0; margin-top: 16px; }
.sec h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14.5px; font-weight: 700; color: #8A6A22; }
.sec h4 i { flex: none; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #F6EEDB; color: #A37F2F; font-style: normal; }
.sec p, .sec li { font-family: var(--read); font-size: 16px; line-height: 1.95; color: #2B261E; margin: 0; }
.sec p + p { margin-top: 6px; }
.sec ol { margin: 6px 0 0; padding-inline-start: 24px; list-style: arabic-indic; }
.sec li { padding-inline-start: 2px; }
.sec li + li { margin-top: 6px; }
.sec li::marker { color: var(--gold-deep); font-weight: 700; }
.sec .soft { color: #776D5C; font-size: 14.5px; margin-top: 8px; padding-inline-start: 10px; border-inline-start: 2px solid #E8DCC0; }
.sec.sec-step { background: #F8F3E7; border: 1px solid #E8DCC0; border-radius: 14px; padding: 14px; margin-top: 18px; }
.sec + .sec.sec-step { border-top: 1px solid #E8DCC0; }
.sec.sec-step h4 i { background: #15120E; color: var(--gold); }
.sec-wait { margin: 14px 0 0; font-size: 14px; color: #776D5C; }

.rp-cta { margin: 22px 0 0; padding: 20px 18px; background: #15120E; border-radius: 18px; text-align: center; color: #EDE5D3; }
.rp-cta h3 { color: var(--gold); margin: 0 0 6px; font-size: 18px; }
.rp-cta p { margin: 0 0 14px; font-size: 14px; line-height: 1.8; color: #CFC5B1; }
.rp-cta a { display: inline-block; background: var(--gold); color: #15120E; font-weight: 700; padding: 10px 24px; border-radius: 999px; text-decoration: none; }
.rp-note { margin-top: 22px; }

@media print {
  @page { margin: 14mm 12mm; }
  body { background: #fff !important; }
  .bar .link-btn, .foot, .rp-tools, .rp-cta, .r-foot, .pc-more, .toast, .test-tag { display: none !important; }
  .pc { break-inside: auto; box-shadow: none; border-color: #DDD3BF; }
  .pc-top { break-after: avoid; }
  .pc-body { display: block !important; }
  .sec { break-inside: avoid; }
}
.pc { border-inline-start: 4px solid var(--bar, #B07D1E); }
.pc-top { border-inline-start: 0; }

/* رأس التقرير: لقب، اسم، سطر تعريف، تاريخ */
.rp-head { margin: 14px 0 0; }
.rp-hon { display: block; font-size: 14px; font-weight: 600; color: var(--gold-deep); margin-bottom: 2px; }
.rp-head h1 { font-size: 30px; line-height: 1.35; margin: 0; }
.rp-head h1::after { content: ""; display: block; width: 44px; height: 2px; border-radius: 2px; background: var(--gold-deep); margin: 12px auto 12px; }
.rp-head .rp-sub { font-size: 14.5px; color: #4A4235; line-height: 1.8; margin: 0; }
.rp-head .rp-sub .en { font-size: 12.5px; color: #8A8070; }
.rp-head .rp-date { font-size: 13px; color: #8A8070; margin: 2px 0 0; }

.rp-back { display: flex; justify-content: flex-end; margin: -4px 0 0; }
.rp-back a { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--gold-deep);
  text-decoration: none; padding: 6px 12px; border: 1px solid #E2D6BC; border-radius: 999px; background: #fff; }
.rp-back a:active { background: #F6EEDB; }
@media print { .rp-back { display: none !important; } }
.rp-head-res { margin: 14px 0 18px; text-align: center; }
.rp-tools-end { margin: 20px 0 0; }
.rp-head .rp-kind { font-weight: 700; color: var(--gold-deep); }
body[data-screen="result"] .test-tag, body[data-screen="report"] .test-tag { display: none; }
.deep-note { margin: 8px 4px 0; font-size: 12px; color: #8A7650; text-align: center; }

/* ===== الواجهة الفاتحة (تصميم ب) ===== */
body[data-screen="home"] { background: #F6F3EE; }
body[data-screen="home"] .bar .link-btn { color: #1E1A14; border-color: #D9CDB4; background: rgba(255,255,255,.6); }

.hero-dark {
  color: #1E1A14;
  min-height: auto; justify-content: flex-start;
  padding: 92px 20px 0;
  background:
    radial-gradient(60% 38% at 50% 8%, rgba(214,178,94,.22) 0%, transparent 72%),
    linear-gradient(180deg, #FBF7EE 0%, #F6F3EE 100%);
}
.hero-inner { padding: 2vh 0 0; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: #8C6A24;
  background: #F1E6C9; border: 1px solid #E6D5AA; border-radius: 999px;
  padding: 5px 14px; margin: 0 0 18px; direction: ltr;
}
.hero-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #B8913A; }
.hero-title { color: #1E1A14; font-size: clamp(34px, 10vw, 52px); margin: 0 0 18px; }
.hero-title em { font-style: normal; color: #B8913A; }
.hero-tag { display: none; }
.hero-q { color: #1E1A14; font-size: clamp(20px, 5.6vw, 25px); margin: 0 0 6px; }
.hero-line { color: #6B6253; font-size: 16.5px; margin-bottom: 28px; text-wrap: balance; }

.hero-dark .btn.gold {
  background: #15120E; color: #E9C877;
  box-shadow: 0 14px 30px -14px rgba(21,18,14,.55);
}
.hero-dark .btn.gold:hover { background: #2A241B; }

.hero-facts {
  border: 0; background: none; gap: 8px; margin-top: 14px; overflow: visible;
}
.hero-facts li {
  background: #FFFFFF; border: 1px solid #E8DFCD; border-radius: 12px;
  color: #6B6253; padding: 10px 4px; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.hero-facts li + li { border-right: 1px solid #E8DFCD; }
.hero-facts b { color: #1E1A14; font-size: 19px; line-height: 1.3; margin: 0; }
.hero-facts .fx-ico { color: #B8913A; height: 28.5px; display: grid; place-items: center; }

.roots { width: min(210px, 56%); margin: 34px auto 0; }
.roots path { stroke: rgba(184,145,58,.65); }
.roots path.leaf { stroke: rgba(184,145,58,.28); }
.roots circle { fill: #C9A24E; }
.roots circle:nth-child(3n) { fill: #E6D5AA; }
.roots circle:nth-child(4n) { fill: #8C6A24; }

.scroll-cue { color: #8C7C62; }
.about { border-top: 1px solid #E4DCCD; }
.hero-dark .resume-note { background: #fff; border-color: #E8DFCD; color: #3B342A; }

@media (min-width: 760px) {
  .hero-dark { padding-top: 96px; }
  .hero-inner { padding-top: 6vh; }
  .hero-title br { display: none; }
}
.hero-dark .link-btn.light { color: #6B6253; }
.hero-dark .resume-note { font-size: 15px; }

/* مسافات وفواصل بين نقاط «كيف يساعدك» */
.about .ticks { gap: 0; }
.about .ticks li { padding: 16px 26px 16px 0; border-bottom: 1px dashed #E4DCCD; }
.about .ticks li:first-child { padding-top: 4px; }
.about .ticks li:last-child { border-bottom: 0; padding-bottom: 4px; }
.about .ticks li::before { top: calc(16px + .62em); }
.about .ticks li:first-child::before { top: calc(4px + .62em); }
.hero-q { margin-bottom: 26px; }
.intro-lede .en-line { display: block; line-height: 1.6; margin: 2px 0 4px; }

/* زر «تعرّف على المزيد» */
.more-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 4px auto 8px; padding: 12px 26px; min-height: 48px;
  background: #fff; color: #8C6A24; font-weight: 600; font-size: 16px;
  border: 1px solid #E6D5AA; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 18px -12px rgba(140,106,36,.45);
}
.more-btn:hover { background: #FBF7EE; }
.more-btn svg { transition: transform .25s ease; }
.more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-wrap { margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .more-wrap:not([hidden]) { animation: lift .45s cubic-bezier(.2,.7,.2,1) both; }
}

/* المصدر العلمي: في الوسط مع خط فاصل لطيف */
.about .block.final { border-top: 1px solid #E4DCCD; margin-top: 28px; padding-top: 24px; }
.about .block.final .source { text-align: center; max-width: 30em; margin-inline: auto; }

/* اسم الاختبار في صفحات البيانات والدخول: في الوسط مع شارة Schema Test */
body:is([data-screen="info"], [data-screen="login"], [data-screen="verify"]) .test-tag {
  text-align: center; font-size: 13px; font-weight: 600; color: #1E1A14; margin: 6px 0 10px;
}
body:is([data-screen="info"], [data-screen="login"], [data-screen="verify"]) .test-tag span {
  display: flex; width: max-content; align-items: center; gap: 7px; margin: 6px auto 0;
  font-size: 12.5px; font-weight: 500; color: #8C6A24; letter-spacing: .2px; text-align: center;
  background: #F1E6C9; border: 1px solid #E6D5AA; border-radius: 999px; padding: 3px 12px;
}
body:is([data-screen="info"], [data-screen="login"], [data-screen="verify"]) .test-tag span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: #B8913A;
}

/* ===== صفحة النتيجة: أربعة أزرار تفتح للأسفل ===== */
.rx-stack { display: grid; gap: 12px; margin: 22px 0 8px; }
.rx { background: #fff; border: 1px solid #E8DFCD; border-radius: 16px; overflow: hidden; }
.rx > summary, .rx-link {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 16px 16px; min-height: 60px; font-weight: 600; font-size: 17px; color: #1E1A14; text-decoration: none;
}
.rx > summary::-webkit-details-marker { display: none; }
.rx-ic { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #F6EEDB; color: #8C6A24; }
.rx-tx { flex: 1; }
.rx-n { color: #8C6A24; font-weight: 600; }
.rx-chev { color: #8C7C62; display: grid; place-items: center; transition: transform .25s ease; }
.rx[open] > summary .rx-chev { transform: rotate(180deg); }
.rx[open] > summary { border-bottom: 1px solid #EFE8DA; }
.rx-link .rx-chev { color: #8C6A24; }
.rx-body { padding: 16px; }
.rx-body > :last-child { margin-bottom: 0; }
.rx-lead { margin: 0 0 14px; color: #4A4235; font-size: 15px; line-height: 1.8; }
.rx-btn { display: flex; width: 100%; justify-content: center; text-decoration: none; }
.rx-body .deep-note { margin: 10px 0 0; text-align: center; }
.rx-body .r-list { margin-top: 0; }
.rx-body .overview .ov-sub { margin-top: 0; }
.rx-body .note { margin: 0; }
#rx-pay > summary, #rx-pay .rx-ic { }
#rx-pay { border-color: #E6D5AA; }
#rx-pay > summary .rx-ic { background: #15120E; color: #E9C877; }
@media (prefers-reduced-motion: no-preference) {
  .rx[open] .rx-body { animation: lift .35s cubic-bezier(.2,.7,.2,1) both; }
}
.rp-head .rp-sub .rp-date-in { font-size: 12.5px; color: #8A8070; }
.rp-head .rp-sub .rp-sep { display: inline-block; width: 1px; height: 12px; background: #CFC4AE; margin: 0 10px; vertical-align: middle; }

/* الأنماط المؤثرة: مجموعات حسب المستوى */
.hg { background: #fff; border: 1px solid #EFE8DA; border-radius: 14px; padding: 12px 14px 6px; margin-bottom: 12px; }
.hg-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid #F1EBDF; }
.hg-hd .ov-lv { flex: 0 0 auto; }
.hg-t { font-size: 13.5px; color: #5A5244; line-height: 1.6; }
.hg-row { display: grid; grid-template-columns: 1fr 64px auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px dashed #EFE8DA; scroll-margin-top: 16px; }
.hg-hd + .hg-row { border-top: 0; }
.hg-name { font-weight: 600; font-size: 15.5px; color: #1E1A14; line-height: 1.5; }
.hg-bar { height: 6px; border-radius: 99px; background: #F1EBDF; overflow: hidden; }
.hg-bar i { display: block; height: 100%; border-radius: 99px; margin-inline-start: 0; }
.hg-very_high .hg-bar i { background: #7C2F45; } .hg-high .hg-bar i { background: #BC5A2B; } .hg-mid .hg-bar i { background: #B07D1E; }
.hg-sc { font-size: 12.5px; color: #8A8070; white-space: nowrap; }
.hg-sc b { font-size: 16px; color: #1E1A14; font-weight: 700; }
.hg-row.flash { background: linear-gradient(90deg, transparent, #F6EEDB, transparent); }
.rx-body .hg + .low-note { margin-top: 4px; }

/* ===== صفحة النتيجة: تصميم أرقى للأزرار ===== */
.rx-stack { gap: 14px; margin-top: 26px; }
.rx {
  border: 1px solid #ECE3D1; border-radius: 20px; background: #FFFDF9;
  box-shadow: 0 1px 2px rgba(40,30,10,.04), 0 14px 30px -22px rgba(60,44,14,.45);
  transition: box-shadow .25s ease, transform .25s ease;
}
.rx > summary, .rx-link { padding: 16px 16px 16px 14px; min-height: 76px; gap: 14px; }
.rx-ic {
  flex: 0 0 46px; height: 46px; border-radius: 15px; color: #8C6A24;
  background: linear-gradient(150deg, #FBF3DF 0%, #EFDFB7 100%);
  box-shadow: inset 0 0 0 1px rgba(184,145,58,.18);
}
.rx-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rx-tx b { font-weight: 700; font-size: 17px; color: #1E1A14; line-height: 1.4; }
.rx-tx small { font-size: 13px; font-weight: 400; color: #8A7E68; line-height: 1.4; }
.rx-chev { flex: 0 0 32px; height: 32px; border-radius: 50%; background: #F5EEDF; color: #8C6A24; }
.rx[open] { box-shadow: 0 1px 2px rgba(40,30,10,.05), 0 20px 40px -26px rgba(60,44,14,.55); }
.rx[open] > summary { border-bottom: 1px solid #F0E8D8; }
.rx-body { padding: 18px 16px 18px; }

/* شريط المستويات داخل زر «أنماطك المؤثرة» */
.rx-strip { display: flex; gap: 3px; margin-top: 4px; max-width: 220px; }
.rx-strip i { flex: 1; height: 7px; border-radius: 3px; background: #EDE6D8; }
.rx-strip .sg-very_high { background: #7C2F45; }
.rx-strip .sg-high { background: #BC5A2B; }
.rx-strip .sg-mid { background: #C9952E; }

/* الزر الداكن: التقرير المفصّل */
.rx-dark { background: linear-gradient(155deg, #221C14 0%, #15120E 70%); border-color: #2E271C; box-shadow: 0 18px 36px -22px rgba(21,18,14,.75); }
.rx-dark .rx-tx b { color: #F6EEDB; }
.rx-dark .rx-tx small { color: #CBB98F; }
.rx-dark .rx-ic { background: rgba(233,200,119,.12); color: #E9C877; box-shadow: inset 0 0 0 1px rgba(233,200,119,.28); }
.rx-dark .rx-chev { background: rgba(233,200,119,.12); color: #E9C877; }
.rx-dark[open] > summary { border-bottom-color: rgba(233,200,119,.16); }
.rx-dark .rx-lead { color: #E6DECD; }
.rx-dark .deep-note { color: #A99C80; }
.rx-dark .btn.gold { box-shadow: 0 12px 26px -14px rgba(214,178,94,.8); }
#rx-pay, #rx-pay > summary .rx-ic { }

/* الاستشارة والنتائج السابقة */
#rx-consult .btn.primary { background: #15120E; color: #E9C877; }
.rx-stack-sm { margin-top: 18px; }
.rx-soft { box-shadow: none; background: transparent; border-style: dashed; }
.rx-soft > summary { min-height: 60px; }
.rx-soft .rx-ic { flex-basis: 38px; height: 38px; border-radius: 12px; background: #F3ECDD; box-shadow: none; }
.rx-soft .rx-tx b { font-size: 15.5px; font-weight: 600; }
.rx-soft .hrow:first-child { border-top: 0; }

/* داخل «أنماطك المؤثرة» */
.rx-body .hg { background: #fff; box-shadow: 0 1px 0 rgba(40,30,10,.03); }

/* شارة مختصر / مفصّل */
.rx-tag {
  display: inline-block; vertical-align: 3px; margin-inline-start: 6px;
  font-style: normal; font-size: 11.5px; font-weight: 600; line-height: 1; letter-spacing: .2px;
  padding: 5px 9px; border-radius: 999px;
  color: #8C6A24; background: #F3E9D0; border: 1px solid #E6D5AA;
}
.rx-dark .rx-tag { color: #15120E; background: linear-gradient(135deg, #F0D58E, #D6B25E); border-color: transparent; }
.rx-tag { margin-inline-start: 4px; padding: 4px 8px; font-size: 11px; white-space: nowrap; }
.rx > summary, .rx-link { gap: 12px; padding-inline: 14px 12px; }
.rx-chev { flex-basis: 30px; height: 30px; }
#rx-pay .rx-tx b { font-size: 16.5px; }
.rx-tx small.rx-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rx-sub .rx-tag { margin: 0; vertical-align: 0; }
.rx-sub .rx-strip { margin-top: 0; flex: 1 1 120px; }
#rx-pay .rx-tx b { font-size: 17px; }
.rx-tx b { text-wrap: balance; }
.ov-key { margin: -4px 0 16px; padding: 10px 12px; background: #FBF6EA; border: 1px solid #EFE3C6; border-radius: 12px; font-size: 13.5px; line-height: 2; color: #4A4235; }
.ov-key .ov-lv { font-size: 12px; margin-inline-start: 2px; }
.rx-body .ov-key { margin-top: 0; }

/* التقرير المفصّل: تكبير الخط درجة */
#reportBody .pc-name { font-size: 17.5px; }
#reportBody .pc-sum { font-size: 17px; }
#reportBody .pc-more { font-size: 14px; }
#reportBody .sec h4 { font-size: 15.5px; }
#reportBody .sec p, #reportBody .sec li { font-size: 17.5px; }
#reportBody .sec .soft { font-size: 15.5px; }
#reportBody .rp-intro { font-size: 15px; }

/* فقرة «ما تكشفه نتائجك» */
.reveal { background: linear-gradient(160deg, #FBF5E6 0%, #F6EDD6 100%); border: 1px solid #EBDDB8; border-radius: 16px; padding: 14px 16px; margin: 0 0 16px; }
.reveal h4 { margin: 0 0 6px; font-size: 14.5px; font-weight: 700; color: #8C6A24; }
.reveal p { margin: 0; font-family: var(--read); font-size: 16.5px; line-height: 1.95; color: #2B261E; }
.reveal p + p, .reveal-g + p { margin-top: 8px; }
.reveal-g { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.reveal-g li { font-family: var(--read); font-size: 16.5px; line-height: 1.95; color: #2B261E; padding: 8px 12px; background: rgba(255,255,255,.6); border-radius: 12px; }
.reveal-g b { font-family: var(--ui); font-size: 14px; font-weight: 700; }
.rv-very_high { color: #7C2F45; } .rv-high { color: #BC5A2B; } .rv-mid { color: #A07118; }
.ov-row .ov-lv { white-space: nowrap; }
.ov-end { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ov-sc { min-width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #1E1A14; background: #F3ECDD; }
.rg-low { --bar: #8FAFA5; } .rg-very_low { --bar: #B9CCC6; }
.reveal .rv-n { font-weight: 700; color: #1E1A14; }
.reveal .rv-g { color: #7A6E58; }

/* نافذة التأكيد */
.ask { position: fixed; inset: 0; z-index: 40; background: rgba(20,17,12,.45); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); animation: askIn .18s ease-out; }
.ask-card { width: 100%; max-width: 420px; background: var(--sheet); border: 1px solid var(--line); border-radius: 20px; padding: 22px 20px 18px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.45); text-align: center; }
.ask-card p { margin: 0 0 18px; font-size: 16px; line-height: 1.8; color: var(--ink); }
.ask-row { display: grid; gap: 10px; }
.ask-row .btn { width: 100%; }
@keyframes askIn { from { opacity: 0; } }
