/* =========================================================
   EMD Human AI — intro + interactive planner console
   ========================================================= */
.ai { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 4.5vw, 80px); align-items: start; padding: clamp(90px, 11vw, 170px) 0; }
.ai__intro { position: sticky; top: 110px; }
.ai__tag { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 7px 15px; border-radius: 999px; background: rgba(122,124,255,.12); border: 1px solid rgba(122,124,255,.4); color: #b9bbff; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
html[lang="ar"] .ai__tag { letter-spacing: 0; font-size: 14px; }
.ai__dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 4px rgba(61,220,151,.2); animation: aiDot 1.8s ease-in-out infinite; }
@keyframes aiDot { 50% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } }
.ai__title { margin-bottom: 16px; }
.ai__title em { background: linear-gradient(100deg, #9fe6ff, #7a7cff 55%, #d2577a) !important; -webkit-background-clip: text !important; background-clip: text !important; }
.ai__sub { margin: 0 0 28px; color: #c4cbee; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; max-width: 48ch; }
.ai__feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ai__feats li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid rgba(160,175,255,.1); transition: border-color .3s, background .3s; }
.ai__feats li:hover { border-color: rgba(122,124,255,.45); background: rgba(122,124,255,.06); }
.ai__ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #7a7cff, #19b5f0); }
.ai__ic svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ai__feats b { display: block; font-family: var(--f-display); font-size: 16px; }
.ai__feats p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* planner console */
.aip { border-radius: 26px; overflow: hidden; background: linear-gradient(165deg, #11164a, #070922) padding-box, linear-gradient(140deg, rgba(122,124,255,.6), rgba(255,255,255,.05) 40%, rgba(25,181,240,.45)) border-box; border: 1px solid transparent;
  box-shadow: 0 50px 120px -50px rgba(122,124,255,.55); }
.aip__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid rgba(160,175,255,.12); background: rgba(122,124,255,.06); }
.aip__logo { font-family: "Syne", sans-serif; font-weight: 700; letter-spacing: .02em; } .aip__logo b { color: #9fa1ff; }
.aip__status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #9fe8c4; }
.aip__status i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 8px #3ddc97; }
.aip__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; padding: 20px; }
.aip__f { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.aip__f:nth-child(2), .aip__f:nth-child(3), .aip__f:nth-child(4) { grid-column: 1 / -1; }
.aip__f > span, .aip__f legend { display: flex; justify-content: space-between; gap: 10px; padding: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.aip__f output { color: #fff; font-family: "Syne", sans-serif; font-weight: 700; }
.aip__f select, .aip__f input[name="aud"] { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(160,175,255,.2); background: #0a0d2e; color: #fff; font: inherit; font-size: 15px; }
.aip__f select:focus, .aip__f input:focus { outline: none; border-color: #7a7cff; box-shadow: 0 0 0 3px rgba(122,124,255,.22); }
.aip__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aip__chips label { position: relative; }
.aip__chips input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.aip__chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid rgba(160,175,255,.22); font-size: 14px; transition: background .25s, border-color .25s, color .25s; cursor: pointer; }
.aip__chips input:checked + span { background: linear-gradient(110deg, #7a7cff, #19b5f0); border-color: transparent; color: #fff; font-weight: 600; }
.aip__chips input:focus-visible + span { outline: 2px solid #9fa1ff; outline-offset: 2px; }
#aipBudget { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #7a7cff, #19b5f0) 0 / var(--p, 10%) 100% no-repeat, rgba(255,255,255,.1); cursor: pointer; }
#aipBudget::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid #19b5f0; box-shadow: 0 4px 14px rgba(25,181,240,.6); }
#aipBudget::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #19b5f0; }
.aip__go { grid-column: 1 / -1; justify-self: start; }
.aip__out:empty { display: none; }
.aip__out { padding: 0 20px 6px; display: grid; gap: 14px; }
.aip__req { justify-self: end; max-width: 92%; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: linear-gradient(120deg, #19b5f0, #1475bc); animation: aipIn .5s var(--ease); }
html[dir="rtl"] .aip__req { justify-self: start; border-radius: 18px 18px 18px 4px; }
.aip__req span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.aip__req p { margin: 2px 0 0; font-size: 14.5px; }
.aip__res { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.035); border: 1px solid rgba(160,175,255,.14); animation: aipIn .6s .15s var(--ease) both; }
@keyframes aipIn { from { opacity: 0; transform: translateY(12px); } }
.aip__resh { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b9bbff; margin-bottom: 8px; }
html[lang="ar"] .aip__resh, html[lang="ar"] .aip__req span { letter-spacing: 0; font-size: 13px; }
.aip__spark { color: #ffd34d; }
.aip__sum { margin: 0 0 16px; font-size: 15.5px; line-height: 1.75; color: #e6eaff; min-height: 3.4em; }
.aip__grid { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.aip__donut { width: 150px; height: 150px; }
.aip__seg { animation: aipSeg 1.1s var(--ease) both; }
@keyframes aipSeg { from { stroke-dasharray: 0 400; } }
.aip__dt { fill: var(--muted); font-size: 10px; font-family: inherit; }
.aip__dv { fill: #fff; font-size: 17px; font-weight: 700; font-family: "Syne", sans-serif; }
.aip__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.aip__legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.aip__legend i { width: 12px; height: 12px; border-radius: 4px; }
.aip__legend b { font-size: 13px; color: #cfd6f7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aip__phases { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 8px; }
.aip__phases li { flex: var(--w) 1 0; min-width: 0; padding: 12px; border-radius: 14px; background: rgba(122,124,255,.08); border-top: 3px solid #7a7cff; }
.aip__phases li:nth-child(2) { border-top-color: #19b5f0; } .aip__phases li:nth-child(3) { border-top-color: #3ddc97; }
.aip__phases b { display: block; font-size: 14px; } .aip__phases span { display: block; font-size: 12px; color: #9fa1ff; margin: 2px 0 4px; }
.aip__phases p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.aip__row { display: grid; gap: 8px; margin-bottom: 12px; }
.aip__lab { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.aip__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.aip__tags em { font-style: normal; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; background: rgba(25,181,240,.08); border: 1px solid rgba(25,181,240,.28); color: #9fe6ff; }
.aip__tip { margin: 4px 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(255,211,77,.08); border: 1px solid rgba(255,211,77,.25); font-size: 13.5px; color: #ffe8a3; }
.aip__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.aip__acts .btn { --h: 46px; font-size: 14px; }
.aip__lead { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 12px; }
.aip__lead input { min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(160,175,255,.22); background: #0a0d2e; color: #fff; font: inherit; font-size: 15px; }
.aip__msg { grid-column: 1 / -1; margin: 0; font-size: 14px; min-height: 1em; } .aip__msg.ok { color: #4ce0a0; } .aip__msg.err { color: #ff8095; }
.aip__note { margin: 0; padding: 12px 20px 16px; font-size: 12px; color: #8e97c4; }
@media (max-width: 1000px) { .ai { grid-template-columns: 1fr; } .ai__intro { position: static; } }
@media (max-width: 560px) {
  .aip__form { grid-template-columns: 1fr; } .aip__f { grid-column: 1 / -1; }
  .aip__grid { grid-template-columns: 1fr; justify-items: center; } .aip__legend { width: 100%; }
  .aip__phases { flex-direction: column; } .aip__lead { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .aip__seg, .aip__req, .aip__res, .ai__dot { animation: none; } }

.aip__lead[hidden] { display: none; }

/* ---------- clickable planner parts ---------- */
.ai__feats li[data-aif], .aip__legend li[data-ai], .aip__phases li[data-ai] { cursor: pointer; }
.ai__feats li[data-aif] { transition: border-color .3s, background-color .3s, transform .35s var(--ease); }
.ai__feats li[data-aif]:hover, .ai__feats li[data-aif]:focus-visible { transform: translateX(6px); }
html[dir="rtl"] .ai__feats li[data-aif]:hover, html[dir="rtl"] .ai__feats li[data-aif]:focus-visible { transform: translateX(-6px); }
.aip__legend li[data-ai] { padding: 6px 8px; margin: -6px -8px; border-radius: 10px; transition: background-color .25s; }
.aip__legend li[data-ai]:hover, .aip__legend li[data-ai]:focus-visible { background: rgba(255,255,255,.06); }
.aip__phases li[data-ai] { transition: transform .35s var(--ease), background-color .3s; }
.aip__phases li[data-ai]:hover, .aip__phases li[data-ai]:focus-visible { transform: translateY(-4px); background: rgba(122,124,255,.16); }
.aip__tag { font: inherit; cursor: pointer; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; background: rgba(25,181,240,.08); border: 1px solid rgba(25,181,240,.28); color: #9fe6ff; transition: transform .3s var(--ease), background-color .3s, color .3s, border-color .3s; }
.aip__tag:hover, .aip__tag:focus-visible { transform: translateY(-2px); color: #fff; background: rgba(25,181,240,.22); border-color: rgba(95,211,255,.7); }

/* ---------- planner detail window ---------- */
.dmodal--ai { --ac: #19b5f0; }
.aiv { display: grid; place-content: center; justify-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--ac) 30%, #0a0d30), #070922 70%); }
.aiv::after { display: none; }
.aiv__ring { position: absolute; width: 230px; aspect-ratio: 1; top: 50%; left: 50%; margin: -115px 0 0 -115px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--ac) 70%, transparent); animation: vmSpin 16s linear infinite; }
.aiv__ring--2 { width: 300px; margin: -150px 0 0 -150px; border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); animation: vmPulse 3s ease-out infinite; }
.aiv__big { position: relative; font: 800 clamp(56px, 7vw, 84px)/1 "Syne", sans-serif; color: #fff; text-shadow: 0 0 40px var(--ac); }
.aiv__big svg { width: 84px; height: 84px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px var(--ac)); }
.aiv__sub { position: relative; margin: 10px 0 0; font-size: 14px; color: #c9d0f2; }
.aiv__stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.aiv__stats div { flex: 1 1 90px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(160,175,255,.15); }
.aiv__stats b { display: block; font: 800 20px/1.1 "Syne", sans-serif; color: var(--ac); }
.aiv__stats span { font-size: 12.5px; color: #aeb6e0; }
.dmodal--ai .dmodal__pts li { opacity: 0; animation: dmUp .5s var(--ease) forwards; }
.dmodal--ai .dmodal__pts li:nth-child(2) { animation-delay: .07s; } .dmodal--ai .dmodal__pts li:nth-child(3) { animation-delay: .14s; }
@media (max-width: 720px) { .aiv { min-height: 190px; } .aiv__ring { width: 150px; margin: -75px 0 0 -75px; } .aiv__ring--2 { width: 200px; margin: -100px 0 0 -100px; } }
@media (prefers-reduced-motion: reduce) { .aiv__ring { animation: none; } .dmodal--ai .dmodal__pts li { animation: none; opacity: 1; } }

/* ---------- AI estimate, cost strip, step-by-step schedule ---------- */
.aip__estc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(110deg, rgba(122,124,255,.16), rgba(25,181,240,.12)); border: 1px solid rgba(143,211,255,.28); }
.aip__estc > div { flex: 1; min-width: 0; }
.aip__estc b { display: block; font-size: 15px; color: #fff; }
.aip__estc small { display: block; margin-top: 3px; font-size: 12.5px; color: #b9c2ee; line-height: 1.5; }
.aip__estc .aip__spark { font-size: 18px; color: #ffd34d; }
.aip__reset { flex: none; font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; color: #fff; background: rgba(25,181,240,.25); border: 1px solid rgba(95,211,255,.6); }
.aip__reset:hover { background: rgba(25,181,240,.4); }
.aip__cost { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.aip__cost div { padding: 11px 13px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(160,175,255,.16); }
.aip__cost span { display: block; font-size: 12px; color: #aeb6e0; }
.aip__cost b { display: block; margin-top: 3px; font: 800 17px/1.2 "Syne", "Alexandria", sans-serif; color: #fff; }
.aip__cost div:first-child b { color: #5fd3ff; }
.aip__sched { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aip__sched li { position: relative; display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px 10px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(160,175,255,.12);
  opacity: 0; animation: schIn .5s cubic-bezier(.22,1,.36,1) forwards calc(var(--i) * .06s); }
@keyframes schIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.aip__sched li::before { content: ""; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: #7a7cff; }
.aip__sched li.is-prod::before { background: #19b5f0; } .aip__sched li.is-post::before { background: #3ddc97; }
.aip__sched b { font-size: 13px; color: #fff; }
.aip__sched span { font-size: 13px; color: #c9d0f2; line-height: 1.45; }
.aip__sched em { font-style: normal; font-size: 12px; color: #8fe3ff; white-space: nowrap; }
.aip__out-i { padding: 6px 11px; border-radius: 999px; font-size: 12.5px; background: rgba(61,220,151,.1); border: 1px solid rgba(61,220,151,.35); color: #9ff0cd; }
@media (max-width: 560px) { .aip__cost { grid-template-columns: 1fr 1fr; } .aip__sched li { grid-template-columns: 1fr auto; } .aip__sched span { grid-column: 1 / -1; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { .aip__sched li { animation: none; opacity: 1; } }
