/* أي AI؟ — Output Gallery R1. Product-native viewer, existing palette. */
.tp-page .profile-trials .ai-gallery,.tp-page .profile-trials .ai-gallery-image-experiments{--gv-ink:var(--tp-polish-heading,#213544);--gv-body:var(--tp-polish-reading,#465861);--gv-muted:var(--tp-polish-muted,#67747c);--gv-line:var(--tp-polish-border,#dee3e3);--gv-blue:var(--tp-polish-blue,#325d7b);--gv-gold:var(--tp-polish-copper,#ab895a);color:var(--gv-ink)}
.tp-page .profile-trials .ai-gallery{border:1px solid var(--gv-line);background:var(--card,#fffefa);border-radius:20px;overflow:hidden;box-shadow:0 12px 50px -44px rgba(31,54,66,.3)}
.tp-page .profile-trials>p{max-width:69ch;margin:8px 0 20px;font-size:13px;line-height:1.8}
.tp-page .ai-gallery-cases{display:flex;gap:0;border-bottom:1px solid var(--gv-line);background:rgba(247,248,246,.52);overflow:auto;scrollbar-width:thin}
.tp-page .ai-gallery-case-tab{position:relative;appearance:none;min-width:176px;flex:1 0 0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:start;gap:5px;min-height:91px;background:transparent;border:0;border-inline-end:1px solid rgba(218,225,224,.6);color:var(--gv-muted);padding:15px 23px;cursor:pointer;font:inherit}
.tp-page .ai-gallery-case-tab:last-child{border-inline-end:0}
.tp-page .ai-gallery-case-tab:after{content:"";position:absolute;inset:auto 22px 0;height:2px;background:transparent}
.tp-page .ai-gallery-case-tab[aria-selected="true"]{background:var(--card,#fffefa);color:var(--gv-ink)}
.tp-page .ai-gallery-case-tab[aria-selected="true"]:after{background:var(--gv-gold)}
.tp-page .ai-gallery-tab-kind{font-size:11px;color:var(--gv-muted);line-height:1.5}
.tp-page .ai-gallery-case-tab strong{font-weight:600;font-size:13px;line-height:1.7;color:inherit}
.tp-page .ai-gallery-case{padding:clamp(18px,3.5vw,38px);min-width:0}
.tp-page .ai-gallery-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:8px 22px;margin-bottom:25px}
.tp-page .ai-gallery-identity{min-width:0;flex:1 1 400px}
.tp-page .ai-gallery-overline{display:block;color:var(--gv-blue);font-size:11px;font-weight:600;line-height:1.7;margin-bottom:7px}
.tp-page .ai-gallery-identity h3{color:var(--gv-ink);font-size:clamp(18px,2.6vw,25px);font-weight:650;line-height:1.5;letter-spacing:-.025em;margin:0}
.tp-page .ai-gallery-identity p{margin:6px 0 0;color:var(--gv-muted);font-size:12px;line-height:1.9}
.tp-page .ai-gallery-date{font-size:11px;color:var(--gv-muted);padding-top:6px;white-space:nowrap}
.tp-page .ai-gallery-switcher{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-bottom:15px}
.tp-page .ai-gallery-switcher-label{font-size:11px;font-weight:600;color:var(--gv-muted)}
.tp-page .ai-gallery-tool-tabs{display:inline-flex;flex-wrap:wrap;gap:4px;border:1px solid var(--gv-line);border-radius:11px;padding:4px;background:#f4f6f5;max-width:100%}
.tp-page .ai-gallery-tool-tab{appearance:none;cursor:pointer;min-height:39px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--gv-muted);padding:7px 16px;font:600 12px/1.6 inherit;transition:background .15s,border-color .15s,color .15s}
.tp-page .ai-gallery-tool-tab[aria-selected=true]{color:var(--gv-ink);background:#fff;border-color:#dee4e2;box-shadow:0 1px 5px rgba(21,42,50,.06)}
.tp-page .ai-gallery-stage{border:1px solid var(--gv-line);border-radius:15px;background:#fff;overflow:hidden}
.tp-page .ai-gallery-output{padding:clamp(16px,2.8vw,26px);min-width:0}
.tp-page .ai-gallery-stage-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;padding-bottom:18px}
.tp-page .ai-gallery-stage-head strong{color:var(--gv-ink);font-size:17px;font-weight:650}
.tp-page .ai-gallery-stage-head span{color:var(--gv-muted);font-size:11px}
.tp-page .ai-gallery-document{border:1px solid #ebece8;background:#fbfbf9;border-radius:11px;padding:clamp(14px,2.3vw,24px);position:relative}
.tp-page .ai-gallery-document-mark{display:flex;gap:5px;margin-bottom:14px}
.tp-page .ai-gallery-document-mark span{display:block;width:5px;height:5px;border-radius:50%;background:#c8d3d6}
.tp-page .ai-gallery-document-mark span:first-child{background:var(--gv-gold)}
.tp-page .ai-gallery-document pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font:inherit;font-size:13px;line-height:2.15;color:var(--gv-ink);margin:0;max-height:340px;overflow:hidden;position:relative}
.tp-page .ai-gallery-observation{display:flex;align-items:flex-start;gap:13px;border-top:1px solid #edf0ee;margin-top:22px;padding-top:18px}
.tp-page .ai-gallery-observation>span{font-size:11px;font-weight:650;color:var(--gv-blue);flex:0 0 auto;white-space:nowrap;padding-top:2px}
.tp-page .ai-gallery-observation p{color:var(--gv-body);font-size:12px;line-height:1.95;margin:0;max-width:85ch}
.tp-page .ai-gallery-actions{display:flex;gap:8px 20px;flex-wrap:wrap;align-items:center;margin-top:12px}
.tp-page .ai-gallery-read{max-width:100%;border:0;background:transparent}
.tp-page .ai-gallery-read>summary{display:inline-flex;align-items:center;gap:6px;list-style:none;cursor:pointer;min-height:44px;font-size:12px;font-weight:600;color:var(--gv-blue)}
.tp-page .ai-gallery-read>summary::-webkit-details-marker{display:none}
.tp-page .ai-gallery-read>summary svg,.tp-page .ai-gallery-file svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.65}
.tp-page .ai-gallery-read[open]>summary svg{transform:rotate(-90deg)}
.tp-page .ai-gallery-full{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:2.1;color:var(--gv-ink);border-radius:9px;padding:16px;margin:10px 0;background:#faf9f6;max-height:450px;overflow-y:auto;border:1px solid var(--gv-line)}
.tp-page .ai-gallery-file{display:inline-flex;gap:8px;align-items:center;min-height:44px;text-decoration:none;color:var(--gv-blue);font-size:12px;font-weight:500}
.tp-page .ai-gallery-conclusion{display:grid;grid-template-columns:120px minmax(0,1fr);gap:18px;margin-top:23px;padding-top:20px;border-top:1px solid var(--gv-line)}
.tp-page .ai-gallery-conclusion>span{font-size:11px;color:var(--gv-blue);font-weight:650}
.tp-page .ai-gallery-conclusion p{margin:0;color:var(--gv-body);font-size:12px;line-height:2}
.tp-page .ai-gallery-method{margin-top:15px;border-top:1px solid #edf0ee}
.tp-page .ai-gallery-method>summary{min-height:46px;padding:8px 0;cursor:pointer;list-style:none;color:var(--gv-muted);font-size:11px}
.tp-page .ai-gallery-method>summary::-webkit-details-marker{display:none}
.tp-page .ai-gallery-method>summary:after{content:"+";margin-inline-start:8px;color:var(--gv-gold)}
.tp-page .ai-gallery-method[open]>summary:after{content:"−"}
.tp-page .ai-gallery-method>div{background:#fafbf9;border-radius:10px;padding:16px;margin-top:4px}
.tp-page .ai-gallery-method p{margin:0 0 11px;font-size:12px;color:var(--gv-body);line-height:1.95}
.tp-page .ai-gallery-method-label{font-weight:650}
.tp-page .ai-gallery-method pre,.tp-page .ai-gallery-archive pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px;line-height:2;color:var(--gv-ink)}
.tp-page .ai-gallery-method a{font-size:12px;color:var(--gv-blue)}
.tp-page .ai-gallery-audio{margin-bottom:20px;padding:14px 17px;border:1px solid var(--gv-line);background:#fafbf8;border-radius:11px;display:grid;gap:10px}
.tp-page .ai-gallery-audio span{font-size:11px;font-weight:600;color:var(--gv-body)}
.tp-page .ai-gallery-audio audio{width:100%;max-width:100%}
.tp-page .ai-gallery-slide-main{aspect-ratio:16/9;border:1px solid var(--gv-line);background:#fafaf7;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.tp-page .ai-gallery-slide-main img{display:block;width:100%;height:100%;object-fit:contain}
.tp-page .ai-gallery-slide-list{display:flex;gap:8px;overflow:auto;padding:12px 1px;scrollbar-width:thin}
.tp-page .ai-gallery-slide-thumb{cursor:pointer;flex:0 0 74px;border:2px solid transparent;background:transparent;border-radius:8px;padding:2px}
.tp-page .ai-gallery-slide-thumb[aria-pressed=true]{border-color:var(--gv-blue)}
.tp-page .ai-gallery-slide-thumb img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:4px;display:block}
.tp-page .ai-gallery-image-experiments{margin-top:24px}
.tp-page .ai-gallery-image-head h3,.tp-page .ai-gallery-archive h3,.tp-page .ai-gallery-videos h3{font-size:17px;color:var(--gv-ink);margin:0 0 6px}
.tp-page .ai-gallery-image-head p{color:var(--gv-muted);font-size:12px;margin:0 0 16px}
.tp-page .ai-gallery-image-stage{background:#fff;border:1px solid var(--gv-line);padding:12px;border-radius:15px}
.tp-page .ai-gallery-image-stage>img{display:block;width:100%;max-height:600px;aspect-ratio:1;object-fit:contain;border-radius:9px;background:#f8f9f6}
.tp-page .ai-gallery-image-caption{padding:15px 5px 3px}
.tp-page .ai-gallery-image-caption strong{font-size:14px;color:var(--gv-ink)}
.tp-page .ai-gallery-image-caption p{color:var(--gv-muted);font-size:12px;line-height:1.8;margin:6px 0}
.tp-page .ai-gallery-image-choices{display:flex;gap:10px;overflow:auto;padding:12px 0}
.tp-page .ai-gallery-image-choice{cursor:pointer;background:transparent;border:1px solid var(--gv-line);border-radius:10px;min-width:96px;width:118px;padding:5px;color:var(--gv-ink);font:inherit}
.tp-page .ai-gallery-image-choice[aria-pressed=true]{border-color:var(--gv-blue);box-shadow:0 0 0 1px var(--gv-blue)}
.tp-page .ai-gallery-image-choice img{width:100%;aspect-ratio:1;object-fit:contain;display:block}
.tp-page .ai-gallery-image-choice span{font-size:10px;display:block;line-height:1.6;padding:3px}
.tp-page .ai-gallery-archive,.tp-page .ai-gallery-videos{margin-top:22px}
.tp-page .ai-gallery-archive details{border-top:1px solid var(--gv-line);padding:10px 0}
.tp-page .ai-gallery-archive summary{min-height:44px;cursor:pointer;color:var(--gv-ink);font-size:13px}
.tp-page .ai-gallery-videos video{display:block;width:100%;max-height:450px;background:#101514;border-radius:12px}
.tp-page .ai-gallery :is(button,summary,a):focus-visible,.tp-page .ai-gallery-image-experiments button:focus-visible{outline:2px solid var(--gv-blue);outline-offset:3px}
.tp-page .ai-gallery [hidden]{display:none!important}
@media(max-width:650px){
.tp-page .ai-gallery{border-radius:14px}
.tp-page .ai-gallery-cases{gap:0}
.tp-page .ai-gallery-case-tab{min-width:145px;max-width:80%;min-height:80px;padding:12px 15px;flex:0 0 66%}
.tp-page .ai-gallery-case-tab strong{font-size:12px}
.tp-page .ai-gallery-case{padding:17px 15px 20px}
.tp-page .ai-gallery-head{margin-bottom:19px}
.tp-page .ai-gallery-identity h3{font-size:18px}
.tp-page .ai-gallery-date{font-size:10px}
.tp-page .ai-gallery-tool-tabs{width:100%;display:flex;overflow:auto;flex-wrap:nowrap}
.tp-page .ai-gallery-tool-tab{flex:1 0 auto;min-width:74px;padding:8px}
.tp-page .ai-gallery-output{padding:14px}
.tp-page .ai-gallery-document pre{font-size:12px;line-height:2.05;max-height:295px}
.tp-page .ai-gallery-observation{display:block}
.tp-page .ai-gallery-observation>span{display:block;margin-bottom:7px}
.tp-page .ai-gallery-conclusion{display:block}
.tp-page .ai-gallery-conclusion>span{display:block;margin-bottom:8px}
.tp-page .ai-gallery-slide-thumb{flex-basis:62px}
}
@media(prefers-reduced-motion:reduce){.tp-page .ai-gallery *{transition:none!important}}

/* The navigation identifies tasks; the visible stage owns the full title. */
.tp-page .ai-gallery-case-tab{align-items:center;text-align:center;min-height:64px;padding:13px 15px}
.tp-page .ai-gallery-tab-kind{font-size:12px;font-weight:650;color:var(--gv-muted)}
.tp-page .ai-gallery-case-tab[aria-selected=true] .ai-gallery-tab-kind{color:var(--gv-ink)}
@media(max-width:650px){.tp-page .ai-gallery-case-tab{flex:1 0 48%;max-width:none;min-width:0;min-height:60px;padding:10px 9px}.tp-page .ai-gallery-tab-kind{font-size:11px}}