/* ===== تقييم شريك الحياة — إضافات فوق تصميم استبيان المخططات ===== */

/* الهبوط: مقياس النسبة */
.gauge { position: relative; z-index: 1; display: block; width: min(280px, 80%); margin: 26px auto 0; overflow: visible; }
.gauge .g-bg { fill: none; stroke: rgba(184,145,58,.18); stroke-width: 14; stroke-linecap: round; }
.gauge .g-val { fill: none; stroke: #D6B25E; stroke-width: 14; stroke-linecap: round; }
.gauge .g-tick { stroke: rgba(214,178,94,.45); stroke-width: 1.5; stroke-linecap: round; }
.gauge .g-num { font: 700 38px var(--ui); fill: #1E1A14; }
.gauge .g-lbl { font: 500 13px var(--ui); fill: #8A7E68; }
@media (prefers-reduced-motion: no-preference) {
  .gauge .g-val { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ptDraw 1.6s cubic-bezier(.3,.7,.2,1) .3s forwards; }
  .gauge .g-num, .gauge .g-lbl { opacity: 0; animation: ptFade .6s ease-out 1.2s forwards; }
  @keyframes ptDraw { to { stroke-dashoffset: 0; } }
  @keyframes ptFade { to { opacity: 1; } }
}
.hero-title .ht-tail { display: block; margin-top: .12em; }

/* «ماذا يقيس؟» */
.dims-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: d; }
.dims-list li {
  counter-increment: d; position: relative; padding: 12px 52px 12px 14px;
  background: #FBF9F5; border: 1px solid #ECE3D1; border-radius: 14px; line-height: 1.7;
}
.dims-list li::before {
  content: counter(d, arabic-indic); position: absolute; right: 12px; top: 13px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #F1E6C9; color: #8C6A24; font-weight: 700; font-size: 14px;
}
.dims-list b { display: block; font-size: 16px; color: #1E1A14; }
.dims-list span { display: block; font-size: 14.5px; color: #6B6253; }

/* ===== صفحات الأسئلة ===== */
.progress-row #countLabel { direction: rtl; font-variant-numeric: tabular-nums; color: #8C6A24; font-weight: 600; }
#pageLabel { font-weight: 700; color: #3A3226; }
#quizHint { font-weight: 600; color: #3A3226; }
.stem:empty { display: none; }
html:has(body[data-screen="quiz"]), body[data-screen="quiz"] { overflow-x: clip; }

.q { scroll-margin-top: 120px; }
.q .q-text small { display: block; margin-top: 6px; font-size: 13.5px; font-weight: 400; line-height: 1.7; color: #7A6E58; }
.q .scale button { min-height: 48px; padding: 9px 14px; }
.q .scale .o-t { display: flex; flex-direction: column; gap: 2px; }
.q .scale .o-t small { font-size: 12.5px; color: #8A7E68; line-height: 1.55; }
.q .scale button[aria-pressed="true"] .o-t small { color: #CBB98F; }

/* اختيار ثلاثة طباع */
.pick-count { margin: -6px 0 12px; font-size: 13px; font-weight: 600; color: #A37F2F; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  font-family: var(--ui); font-size: 14px; color: #3B342A; line-height: 1.3; cursor: pointer;
  padding: 9px 14px; border-radius: 999px; background: #FAF8F4; border: 1px solid #ECE5D7;
  -webkit-tap-highlight-color: transparent; transition: background .15s ease, border-color .15s ease;
}
.chip[aria-pressed="true"] { background: #15120E; border-color: #15120E; color: #E9C877; }
@media (hover: hover) { .chip:hover { border-color: #D6C59A; } }
.other-in {
  display: block; width: 100%; margin-top: 12px; padding: 12px 14px; font: 15px var(--ui); text-align: center;
  border: 1px solid #E4DCCD; border-radius: 12px; background: #fff;
}
.other-in:focus { outline: 2px solid #D6B25E; border-color: transparent; }

/* موقف من كل طبع */
.trow { padding: 12px 0; border-top: 1px solid #F1EBDF; }
.trow:first-of-type { border-top: 0; padding-top: 2px; }
.trow > b { display: block; margin-bottom: 8px; font-size: 15.5px; color: #1E1A14; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button {
  font-family: var(--ui); font-size: 13px; line-height: 1.35; color: #3B342A; cursor: pointer;
  min-height: 46px; padding: 6px 4px; border-radius: 11px; background: #FAF8F4; border: 1px solid #ECE5D7;
  -webkit-tap-highlight-color: transparent;
}
.seg button[aria-pressed="true"] { background: #15120E; border-color: #15120E; color: #E9C877; }
.q-wait .wait { margin: 0; font-size: 14px; color: #8A7E68; }

/* ===== التقرير: بطاقة واحدة هادئة ===== */
.rep {
  --tone: #8C6A24;
  background: #fff; border: 1px solid #ECE3D1; border-radius: 22px; padding: 24px 20px 18px; margin: 4px 0 18px;
  box-shadow: 0 1px 2px rgba(40,30,10,.04), 0 16px 34px -26px rgba(60,44,14,.5);
}
.rep.t-high { --tone: #4F7A55; }
.rep.t-good { --tone: #8C6A24; }
.rep.t-mid { --tone: #B0782A; }
.rep.t-low { --tone: #A64B2A; }

.rep-score { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .r-bg { stroke: #F1EBDF; }
.ring .r-val { stroke: var(--tone); stroke-linecap: round; stroke-dasharray: var(--p) 100; }
@media (prefers-reduced-motion: no-preference) {
  .ring .r-val { animation: ptRing 1.2s cubic-bezier(.3,.7,.2,1) both; }
  @keyframes ptRing { from { stroke-dasharray: 0 100; } }
}
.rep-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rep-num b { font-size: 38px; font-weight: 700; line-height: 1.1; color: #1E1A14; }
.rep-num small { margin-top: 4px; font-size: 12.5px; color: #8A7E68; }
.rep-verdict { margin: 12px 0 0; text-align: center; font-size: 19px; font-weight: 700; color: var(--tone); text-wrap: balance; }
.rep-cap { margin: 14px 0 0; padding: 12px 14px; text-align: center; font-size: 15px; line-height: 1.85; color: #6B4A0E; background: #FBF4E2; border: 1px solid #EBDDB8; border-radius: 14px; text-wrap: pretty; }

.rep-sec { margin-top: 18px; padding-top: 16px; border-top: 1px solid #F1EBDF; }
.rep-verdict + .rep-sec, .rep-cap + .rep-sec { margin-top: 20px; }
.rep-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14.5px; font-weight: 700; color: #3A3226; }
.rep-sec h3::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.rep-sec p, .rep-sec li { font-family: var(--read); font-size: 17px; line-height: 1.95; color: #2B261E; }
.rep-sec p { margin: 0; }
.rep-sec ul { margin: 0; padding: 0 18px 0 0; }
.rep-sec li + li { margin-top: 2px; }
.s-good { --dot: #4F7A55; }
.s-bad { --dot: #A64B2A; }
.s-ask { --dot: #D6B25E; }
.s-you { --dot: #6B6253; }
.rep-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #F1EBDF; text-align: center; font-size: 12.5px; color: #8A7E68; }

/* الترشيحات */
.next { margin: 0 0 18px; }
.next-h { margin: 0 4px 10px; font-size: 15px; font-weight: 700; color: #3A3226; }
.nx {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: inherit;
  background: #FFFDF9; border: 1px solid #E6D5AA; border-radius: 18px; -webkit-tap-highlight-color: transparent; transition: transform .12s ease;
}
.nx:active { transform: scale(.985); }
.nx-tx { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; line-height: 1.55; }
.nx-tx small { font-size: 12px; font-weight: 600; color: #A37F2F; }
.nx-tx b { font-size: 16.5px; font-weight: 700; color: #1E1A14; }
.nx-tx span { font-size: 13.5px; color: #6B6253; }
.nx-go { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #F6EEDB; color: #8C6A24; }
.nx-dark { background: #15120E; border-color: #15120E; }
.nx-dark .nx-tx small { color: #D6B25E; }
.nx-dark .nx-tx b { color: #F6EEDB; }
.nx-dark .nx-tx span { color: #CBB98F; }
.nx-dark .nx-go { background: rgba(233,200,119,.14); color: #E9C877; }

.hist { margin: 0 0 8px; background: #fff; border: 1px solid #E8DFCD; border-radius: 16px; padding: 0 16px; }
.hist summary { cursor: pointer; padding: 14px 0; font-size: 14px; font-weight: 600; color: #3A3226; }
.hist .hrow { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px dashed #ECE5D7; font-size: 14px; }
.hist .hrow a { font-size: 13px; font-weight: 600; color: #A37F2F; text-decoration: none; }

/* مربع سبب التخفيض: النسبتان بارزتان ثم السبب */
.capbox { margin: 16px 0 0; padding: 16px 14px 14px; border-radius: 18px; background: linear-gradient(180deg, #FCF5E3 0%, #F6EACB 100%); border: 1.5px solid #D6B25E; box-shadow: 0 10px 22px -18px rgba(107,74,14,.6); }
.cap-nums { display: flex; align-items: stretch; justify-content: center; gap: 8px; }
.cap-n { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.7); }
.cap-n b { font-size: 34px; font-weight: 700; line-height: 1.1; color: #4F7A55; }
.cap-n small { font-size: 12.5px; line-height: 1.5; color: #6B6253; text-align: center; }
.cap-after b { color: #A64B2A; }
.cap-arrow { flex: 0 0 auto; align-self: center; color: #B8913A; display: grid; place-items: center; }
.cap-why { margin: 12px 2px 0; text-align: center; font-size: 15px; line-height: 1.85; color: #4A3510; text-wrap: pretty; }
.cap-why span { font-weight: 700; color: #6B4A0E; }

/* اسأل الدكتور: بطاقة واتساب بارزة قبل الترشيحات */
.ask-doc { display: flex; align-items: center; gap: 12px; padding: 16px; margin: 0 0 18px; text-decoration: none; border-radius: 20px;
  background: linear-gradient(155deg, #2A2218 0%, #15120E 65%); border: 1px solid #3A3022; box-shadow: 0 18px 34px -22px rgba(21,18,14,.75);
  -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
.ask-doc:active { transform: scale(.985); }
.ask-ic { flex: 0 0 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #15120E; background: linear-gradient(135deg, #F0D58E, #D6B25E); }
.ask-tx { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; line-height: 1.55; }
.ask-tx small { font-size: 13px; font-weight: 600; color: #E9C877; }
.ask-tx b { font-size: 17px; font-weight: 700; color: #F6EEDB; }
.ask-tx span { font-size: 13.5px; color: #CBB98F; }
.ask-doc .nx-go { background: rgba(233,200,119,.14); color: #E9C877; }

.trust { margin: 14px 0 0; font-size: 14px; color: #6B6253; }
.trust b { color: #8C6A24; font-weight: 700; }
