/* Quiz engine styles. Separate from theme.css and enqueued only on the quiz CPT and on tayfak's
   bespoke interactive pages: the other five sites in the network have neither and should not pay.
   The wizard is progressive: every item is server-rendered as a plain form and only gains
   .is-wizard (one question per screen) once quiz.js runs. */

.pex-quiz,.pex-quiz-result{max-width:860px;margin-inline:auto;padding-block:8px 40px}
/* Half the wizard's state is the `hidden` attribute, and [hidden] is a plain attribute
   selector that any class-level display below would outrank. Settle it once, here. */
.pex-quiz [hidden],.pex-quiz-result [hidden]{display:none!important}
.pex-quiz__head{margin-bottom:22px}
.pex-quiz__head .pex-article__lede{margin:8px 0 0}

.pex-stage{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:clamp(18px,3vw,32px)}
.pex-stage__bar{display:flex;align-items:center;gap:16px;margin-bottom:clamp(20px,3vw,32px)}
.pex-stage__track{flex:1;height:8px;border-radius:999px;background:var(--tint);overflow:hidden}
.pex-stage__fill{height:100%;inline-size:0;background:var(--accent);transition:inline-size .3s ease}
.pex-stage__count{margin:0;font-family:var(--head);font-weight:700;font-size:13px;color:var(--muted);white-space:nowrap}

.pex-items{list-style:none;margin:0;padding:0}
.pex-items.is-wizard{min-height:17rem;display:grid}
.pex-items.is-wizard .pex-item{grid-area:1/1;visibility:hidden;opacity:0;pointer-events:none;transform:translateY(6px);transition:opacity .22s ease,transform .22s ease}
.pex-items.is-wizard .pex-item.is-on{visibility:visible;opacity:1;pointer-events:auto;transform:none}
.pex-items:not(.is-wizard) .pex-item+.pex-item{margin-top:34px;border-top:1px solid var(--line);padding-top:26px}
.pex-item__num{font-family:var(--head);font-weight:700;font-size:13px;color:var(--accent-text);margin:0 0 14px}
.pex-item__num span{color:var(--muted)}
.pex-qfield{border:0;margin:0;padding:0;width:100%;min-width:0}
.pex-item__text{font-family:var(--head);font-weight:700;font-size:clamp(20px,3.4vw,28px);line-height:1.4;padding:0;margin-bottom:22px;text-wrap:balance}

/* On a bipolar item these two labels are the question, so they carry weight a caption would not. */
.pex-ends{display:flex;justify-content:space-between;gap:20px;margin-bottom:10px}
.pex-ends span{flex:0 1 45%;font-family:var(--head);font-weight:700;font-size:clamp(15px,2.4vw,17px);line-height:1.45;color:var(--ink)}
.pex-ends span:last-child{text-align:end}
.pex-scale{position:relative;display:flex;justify-content:space-between;align-items:center;height:64px}
.pex-scale__track{position:absolute;inset-inline:10px;height:8px;border-radius:999px;background:var(--accent);opacity:.25}
.pex-tick{position:relative;flex:1;display:flex;align-items:center;justify-content:center;height:100%;cursor:pointer}
.pex-tick input{position:absolute;opacity:0;pointer-events:none}
.pex-tick__dot{width:26px;height:26px;border-radius:50%;background:var(--surface);box-shadow:inset 0 0 0 2px var(--line);transition:transform .14s ease,box-shadow .14s ease,background .14s ease}
.pex-tick[data-point="3"] .pex-tick__dot{width:18px;height:18px}
.pex-tick:hover .pex-tick__dot{box-shadow:inset 0 0 0 2px var(--muted)}
.pex-tick:has(input:checked) .pex-tick__dot{background:var(--accent);box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 20%,transparent);transform:scale(1.12)}
.pex-tick:has(input:focus-visible) .pex-tick__dot{outline:3px solid var(--accent);outline-offset:3px}

.pex-choices{display:grid;gap:10px}
.pex-choice{display:flex;align-items:center;gap:14px;padding:16px 18px;background:var(--tint);border:1.5px solid transparent;border-radius:16px;cursor:pointer;min-height:56px;line-height:1.55;transition:background .14s ease,border-color .14s ease}
.pex-choice input{position:absolute;opacity:0;pointer-events:none}
.pex-choice__key{flex:none;width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-family:var(--head);font-weight:700;font-size:13px;color:var(--muted)}
.pex-choice:has(input:checked){background:var(--surface);border-color:var(--accent)}
.pex-choice:has(input:checked) .pex-choice__key{background:var(--accent);color:var(--on-accent);box-shadow:none}
.pex-choice:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:2px}

.pex-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.pex-qerror{color:#dc2626;font-weight:700;margin:16px 0 0}
.pex-ctls{display:flex;align-items:center;gap:12px;margin-top:clamp(20px,3vw,30px);padding-top:18px;border-top:1px solid var(--line)}
.pex-ctl{font-family:var(--head);font-weight:700;font-size:15px;padding:11px 24px;min-height:48px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}
.pex-ctl:hover:not(:disabled){border-color:var(--accent)}
.pex-ctl:disabled,.pex-btn:disabled{opacity:.4;cursor:not-allowed}
.pex-ctl--next{margin-inline-start:auto;background:var(--ink);color:var(--bg);border-color:var(--ink)}
.pex-ctl--next:hover:not(:disabled){background:var(--accent-dark);border-color:var(--accent-dark);color:#fff}
.pex-ctl--done{margin-inline-start:auto}

.pex-quiz__foot{margin-top:clamp(34px,6vw,60px)}
.pex-qcite{margin-top:26px;padding:18px 22px;background:var(--tint);border-radius:18px;border-inline-start:4px solid var(--accent)}
.pex-qcite h3{font-size:15px;margin-bottom:8px}
.pex-qcite p{font-size:15px;margin:0 0 8px}
.pex-qtypes{margin-top:44px}
.pex-qtypes__lede{color:var(--muted);margin-bottom:18px}
.pex-qtypes__grid,.pex-qsiblings ul,.pex-qrelated ul{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:10px}
.pex-qtypes__grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.pex-qtypes__grid a,.pex-qsiblings a,.pex-qrelated a{display:grid;gap:5px;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:16px;color:var(--ink);height:100%;transition:border-color .16s ease,transform .16s ease}
.pex-qtypes__grid a:hover,.pex-qsiblings a:hover,.pex-qrelated a:hover{border-color:var(--accent);transform:translateY(-2px);color:var(--ink)}
.pex-qtypes__grid span:last-child,.pex-qrelated span{font-size:14px;line-height:1.6;color:var(--muted)}

.pex-qfaq{margin-top:38px}
.pex-qfaq details{border-bottom:1px solid var(--line);padding:14px 0}
.pex-qfaq summary{cursor:pointer;font-family:var(--head);font-weight:700}
.pex-qfaq p{margin:12px 0 0;color:var(--muted)}

/* --- result page --- */
.pex-qresult__grid{display:grid;gap:clamp(28px,4vw,44px);align-items:start}
.pex-qresult__main>:first-child{margin-top:0}
/* Latin type codes on an RTL line reorder against the Arabic beside them without isolation. */
.pex-qcode{font-family:var(--head);font-weight:700;font-size:44px;letter-spacing:.12em;color:var(--accent-text);margin:0;line-height:1;direction:ltr;unicode-bidi:isolate}
.pex-qcode--sm{direction:ltr;unicode-bidi:isolate;justify-self:start;font-family:var(--head);font-weight:700;font-size:12px;letter-spacing:.05em;color:var(--accent-text)}
.pex-qopening{font-size:17px;line-height:1.9;color:var(--muted);margin:16px 0 0}
.pex-qsafety{margin-bottom:28px;padding:20px 24px;border-radius:18px;background:color-mix(in srgb,#dc2626 8%,var(--surface));border-inline-start:4px solid #dc2626}
.pex-qsafety h2{margin-top:0;font-size:19px}
.pex-qsafety ul{margin:0;padding-inline-start:20px}
.pex-qshared{display:grid;gap:12px;justify-items:start;padding:18px 22px;margin-bottom:28px;background:var(--tint);border-radius:18px;border-inline-start:4px solid var(--accent)}
.pex-qshared p{margin:0;color:var(--ink)}
.pex-qdetail{margin-top:32px}
.pex-qbars{display:grid;gap:12px;margin-top:14px}
.pex-qbar{display:grid;grid-template-columns:9rem 1fr 5rem;align-items:center;gap:12px;font-size:14px}
.pex-qbar__label{font-family:var(--head);font-weight:700}
.pex-qbar__track{height:10px;border-radius:999px;background:var(--tint);overflow:hidden}
.pex-qbar__fill{display:block;height:100%;inline-size:0;background:var(--accent)}
.pex-qbar__value{font-family:var(--head);font-weight:700;text-align:start;color:var(--muted)}
.pex-qshare__row{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.pex-btn--ghost{background:transparent;color:var(--ink)!important;box-shadow:inset 0 0 0 1.5px var(--line)}
.pex-btn--ghost:hover{background:var(--tint)}
.pex-qresult__side h2,.pex-qtypes h2,.pex-qfaq h2{font-size:19px}
.pex-qsiblings,.pex-qrelated{margin-top:26px}
.pex-qsiblings ul{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.pex-qsiblings a{gap:4px;padding:11px 14px;font-size:15px}
.pex-qdisclaimer{margin-top:44px;font-size:14px;color:var(--muted)}

@media (min-width:62em){
	.pex-quiz-result{max-width:var(--wrap)}
	.pex-qresult__grid{grid-template-columns:minmax(0,1fr) 20rem}
	.pex-qresult__side{position:sticky;top:88px;display:grid;gap:24px}
	.pex-qresult__side section{margin-top:0}
}

/* --- bespoke tayfak pages (nataiji, kam-tarifni, the two visual screenings) ---
   They borrow the wizard chrome above, so this only adds what the quiz CPT has no use for. */

/* /nataiji/ : results this browser kept */
.pex-saved{list-style:none;margin:26px 0 0;padding:0;display:grid;gap:12px}
.pex-saved a{display:grid;gap:4px;padding:18px 22px;background:var(--surface);border:1px solid var(--line);border-radius:18px;color:var(--ink);transition:border-color .16s ease,transform .16s ease}
.pex-saved a:hover{border-color:var(--accent);transform:translateY(-2px);color:var(--ink)}
.pex-saved strong{font-family:var(--head);font-size:19px;line-height:1.35}
.pex-saved__meta{font-family:var(--head);font-weight:700;font-size:13px;color:var(--accent-text)}
.pex-saved__when{font-size:14px;color:var(--muted)}
.pex-saved__empty{margin-top:26px;padding:40px 24px;text-align:center;background:var(--tint);border-radius:var(--r-lg)}
.pex-saved__empty p{color:var(--muted);margin:0 0 18px}
.pex-saved__tools{margin-top:20px}

/* /kam-tarifni/ */
.pex-kt__name{display:grid;gap:6px;margin-bottom:26px;max-width:22rem}
.pex-kt__name span{font-size:15px;color:var(--muted)}
.pex-kt__name input,#pex-kt-url{width:100%;padding:12px 14px;border:1.5px solid var(--line);border-radius:14px;background:var(--tint);font:inherit;font-size:15px;color:var(--ink)}
.pex-kt__out{margin-top:30px;padding:22px 26px;background:var(--tint);border-radius:var(--r-lg);border-inline-start:4px solid var(--accent)}
.pex-kt__out h2{margin-top:0;font-size:20px}
.pex-kt__out p{margin:6px 0 14px;color:var(--muted)}
.pex-kt__upsell{margin-top:30px;padding:26px;border-radius:var(--r-lg);background:var(--ink);color:var(--bg);text-align:start}
.pex-kt__upsell h2{margin-top:0;color:var(--bg)}
.pex-kt__upsell p{color:var(--bg);opacity:.78;margin:8px 0 18px}

/* the two visual screenings */
.pex-screen__notice{margin:22px 0 26px;padding:16px 20px;background:var(--tint);border-radius:18px;border-inline-start:4px solid var(--accent)}
.pex-screen__notice p{margin:0;font-size:15px;color:var(--muted)}
/* The stimulus sits on a fixed white ground in both themes: a plate re-tinted by dark mode, or a
   ring drawn dark on dark, would measure the theme rather than the eye. */
.pex-media{display:grid;place-items:center;min-height:320px;padding:20px;margin-bottom:22px;background:#fff;border-radius:var(--r-lg);border:1px solid var(--line)}
.pex-plate{width:min(300px,72vw);height:auto;display:block}
.pex-ring{color:#0f1729;display:block}
.pex-opts{display:flex;flex-wrap:wrap;gap:10px}
.pex-opt{cursor:pointer}
.pex-opt input{position:absolute;opacity:0;pointer-events:none}
.pex-opt__face{display:flex;align-items:center;justify-content:center;gap:6px;min-width:56px;min-height:56px;padding:10px 16px;border-radius:16px;background:var(--tint);border:1.5px solid transparent;font-family:var(--head);font-weight:700;font-size:18px;color:var(--ink)}
.pex-opt:has(input:checked) .pex-opt__face{background:var(--surface);border-color:var(--accent);color:var(--accent-text)}
.pex-opt:has(input:focus-visible) .pex-opt__face{outline:3px solid var(--accent);outline-offset:2px}
.pex-dirpad .pex-opt__face{flex-direction:column;gap:2px;font-size:14px;min-width:78px}
.pex-arrow{width:22px;height:22px;fill:currentColor}
.pex-screen__result{margin-top:26px;text-align:center}
.pex-screen__num{font-family:var(--head);font-weight:700;font-size:clamp(30px,9vw,56px);line-height:1.1;color:var(--accent-text);margin:0}
.pex-screen__label{font-size:18px;color:var(--muted);margin:14px 0 24px}
.pex-screen__result .pex-qdisclaimer{text-align:start}
