/* إنسايت ليفلز InsightLevels: تنسيق صفحة مولّد الأوامر (/prompts). يُحمَّل بعد insightlevels.css ويستعمل متغيراته */
.pg [hidden],.phead [hidden],.tool [hidden]{display:none!important}
nav a[aria-current=page]{color:var(--brand-strong)}
.pg-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pg-tmp{position:fixed;top:0;inset-inline-start:0;width:1px;height:1px;opacity:0;pointer-events:none}

/* رأس الصفحة: عمود واحد (الأصل في .chead عمودان) */
.phead .wrap{grid-template-columns:minmax(0,1fr)}
.phead{padding-bottom:64px}
.phead::after{inset-inline-start:auto;inset-inline-end:-120px}

/* المولّد */
.tool{padding-top:56px}
.tool .lead{margin-bottom:28px}
.pg{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:24px;align-items:start}
.pg-card{background:var(--surface);border:1.5px solid var(--line);border-radius:24px;padding:28px}
.pg-out{position:sticky;top:96px}
.pg-out .pg-card{padding:0;overflow:hidden}
.pf-row{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.pf-f{margin-bottom:18px}
.pf-f label{display:block;font-weight:700;font-size:15px;line-height:1.6;color:var(--ink);margin-bottom:6px;font-family:var(--f-head)}
.pf-f .opt{font-weight:400;font-size:13px;color:var(--muted);margin-inline-start:6px}
.pg textarea,.pg select,.pg input[type=text]{display:block;width:100%;min-height:48px;font:inherit;font-size:16px;line-height:1.8;color:var(--ink);background:var(--surface);border:1.5px solid var(--muted);border-radius:12px;padding:10px 14px}
.pg textarea{min-height:130px;resize:vertical}
.pg textarea.sm{min-height:78px}
.pg select{appearance:none;-webkit-appearance:none;cursor:pointer;padding-block:10px;padding-left:40px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F2937' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center/16px}
.pg ::placeholder{color:var(--muted);opacity:1}
.pg textarea:focus-visible,.pg select:focus-visible,.pg input:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.pg [aria-invalid=true]{border-color:var(--bad)}
.pg-note{padding:10px 14px;margin-bottom:14px;border-radius:12px;border:1.5px solid var(--bad);border-inline-start-width:4px;background:var(--surface);color:var(--bad);font-size:15px;font-weight:400}
.pf-hint{font-size:14px;line-height:1.7;color:var(--ink-soft);margin:6px 0 0;min-height:1.7em}
.pf-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.pf-chips button{font:inherit;font-weight:400;font-size:14px;min-height:44px;padding:6px 16px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;white-space:nowrap;transition:background .2s,border-color .2s}
.pf-chips button:hover{border-color:var(--ink);background:var(--brand-tint)}
.pg button:focus-visible{outline:3px solid var(--ink);outline-offset:2px}

.adv{border:1.5px dashed #9CA3AF;border-radius:16px;padding:0 16px;margin:0 0 18px;background:var(--cream)}
.adv summary{font-weight:700;font-size:16px;min-height:52px;font-family:var(--f-head)}
.adv[open]{padding-bottom:6px}
.adv>p{font-size:14px;margin:0 0 14px}
.adv .pf-f:last-child{margin-bottom:10px}
.adv .pf-f .opt{color:var(--ink-soft)}

.pg .btn{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:48px;font-family:inherit;font-weight:400;font-size:17px;cursor:pointer}
.pg .btn svg{flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pg .btn.alt{background:var(--surface);border:2px solid var(--ink);color:var(--ink)}
.pg .btn.alt:hover{background:var(--ink);color:#fff}
.pg .btn .i-k{display:none}
.pg .btn.done .i-c{display:none}
.pg .btn.done .i-k{display:inline}
.pg .btn#copy{background:var(--brand-strong);border-color:var(--brand-strong);color:#fff}
.pg .btn#copy:hover{background:var(--brand-deep);border-color:var(--brand-deep)}
.pg .btn#copy.done{background:var(--ok);border-color:var(--ok)}
.pg-small{font-size:13px;color:var(--ink-soft);text-align:center;margin:12px 0 0}

/* النتيجة */
.pe{padding:48px 28px;text-align:center}
.pe svg{width:72px;height:72px;margin-bottom:10px}
.pe h3{font-size:20px;color:var(--ink)}
.pe p{color:var(--ink-soft);font-size:15px;max-width:34ch;margin:6px auto 0}
.pr-top{padding:20px 24px 14px;border-bottom:1.5px solid var(--line)}
.pr-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pr-title h3{font-size:20px;color:var(--ink)}
.pr-title h3:focus{outline:none}
.ready{font-size:13px;font-weight:400;background:var(--surface);border:1.5px solid var(--ok);color:var(--ok);padding:2px 14px;border-radius:999px;white-space:nowrap}
.pr-meta{font-size:14px;color:var(--ink-soft);margin-top:4px}
.pr-body{padding:18px 24px 24px}
.els{display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 6px;list-style:none}
.els li{font-size:13px;line-height:1.7;padding:2px 12px;border-radius:999px;border:1.5px dashed #9CA3AF;color:var(--muted);background:var(--surface)}
.els li.on{border:1.5px solid var(--brand-soft);background:var(--brand-tint);color:var(--ink)}
.els li.on::before{content:"";display:inline-block;width:9px;height:5px;margin-inline-end:7px;border-left:2px solid var(--brand-strong);border-bottom:2px solid var(--brand-strong);transform:rotate(-45deg) translateY(-2px)}
.elc{font-size:14px;line-height:1.7;color:var(--ink-soft);margin:0 0 14px}
.seg{display:inline-flex;border:1.5px solid var(--line);border-radius:999px;padding:3px;margin-bottom:12px;background:var(--surface)}
.seg button{font:inherit;font-weight:400;font-size:14px;min-height:40px;padding:4px 18px;border:0;border-radius:999px;background:none;color:var(--ink);cursor:pointer}
.seg button[aria-pressed=true]{background:var(--ink);color:#fff}
.out{white-space:pre-wrap;overflow-wrap:anywhere;max-height:460px;overflow:auto;background:var(--cream);border:1.5px solid var(--line);border-radius:12px;padding:16px;font-size:15px;line-height:1.95;color:var(--ink);text-align:right}
.out:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.out .h{font-weight:700;color:var(--ink);font-family:var(--f-head)}
.out .ph{background:var(--brand-tint);color:var(--brand-deep);border-radius:4px;padding:0 4px}
.rw{font-size:13px;color:var(--muted);margin:6px 2px 0}
.phh{font-size:14px;line-height:1.7;color:var(--brand-deep);margin:8px 0 0}
.pg-acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.pg-acts .btn{flex:1 1 180px;width:auto}
.pg-status{font-size:14px;line-height:1.7;color:var(--ok);font-weight:400;min-height:1.7em;margin:8px 0 0}
.pg-cta{margin:14px 0 0;padding:14px 18px;border:1.5px solid var(--line);border-inline-start:4px solid var(--brand);background:var(--cream);border-radius:12px;font-size:15px}
.pg-cta p{margin:0;color:var(--ink)}
.pg-cta a{display:inline-flex;align-items:center;min-height:44px;color:var(--brand-strong);font-weight:400;text-decoration:underline;text-underline-offset:3px}

/* أقسام الصفحة الأخرى */
.phow{background:var(--cream)}
.phow .steps{margin-bottom:0}
.pform .grid{margin-top:8px}
@media(min-width:1025px){.grid.six{grid-template-columns:repeat(3,minmax(0,1fr))}}
.pform .note{margin-top:28px}
.pform .note a{color:var(--brand-strong);font-weight:400;text-decoration:underline;text-underline-offset:3px;display:inline-block;padding:11px 0}
.pnoscript{margin-bottom:18px}

@media(max-width:900px){
 .pg{grid-template-columns:minmax(0,1fr)}
 .pg-out{position:static}
}
@media(max-width:600px){
 .tool{padding-top:40px}
 .pg-card{padding:20px 16px}
 .pg-out .pg-card{padding:0}
 .pr-top{padding:16px}
 .pr-body{padding:16px}
 .out{max-height:380px;font-size:14px}
 .pe{padding:36px 20px}
 .phead .btns .btn{width:100%;text-align:center}
}
@media(max-width:480px){.pf-row{grid-template-columns:minmax(0,1fr)}}
.pfaq{background:var(--cream)}
.pform .note{background:var(--cream)}

/* أمثلة أخرى: قائمة منسدلة بشكل الأزرار */
.pg .pf-chips select{display:inline-block;width:auto;max-width:100%;min-height:44px;padding:6px 12px 6px 34px;border-radius:999px;font-weight:400;font-size:14px;line-height:1.7;color:var(--ink);border-color:var(--line);background-position:left 10px center}
.pg .pf-chips select:hover{border-color:var(--ink);background-color:var(--brand-tint)}

/* ===== أمثلة جاهزة: شبكة منتظمة، والقائمة المنسدلة في صف كامل ===== */
.pf-chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:8px;margin-top:10px}
.pf-chips button{width:100%;padding:6px 10px;text-align:center}
.pg .pf-chips select{grid-column:1/-1;width:100%;max-width:none;padding-inline:16px 36px;background-position:left 14px center}
/* ===== «كيف يعمل»: الخطوات الثلاث بعرض القسم كاملاً (إزالة هامش القائمة الرقمية الافتراضي) ===== */
.phow .steps{padding:0}
/* ===== الصيغة الذهبية وسطر التفصيل ===== */
.pform .note.sample b{display:block;font-family:var(--f-head);color:var(--ink)}
.pform .note.sample span{display:block}
.pform .note.sample a{display:inline-flex;align-items:center;min-height:44px;padding:0}
.pg-acts .btn{flex:1 1 150px}
