/* LA24AI editorial reading hierarchy V2. Scoped, zero external dependencies. */
:root{--cl2-accent:#89b1ff;--cl2-ink:#f0f6ff;--cl2-muted:#b7c8de;--cl2-line:#30415a;--cl2-surface:#111f32;--cl2-help:#152a3d;--cl2-soft:#cfe1ff}
html[data-theme="light"]{--cl2-accent:#164fb5;--cl2-ink:#15283b;--cl2-muted:#3c536b;--cl2-line:#ccd8e5;--cl2-surface:#eef4fb;--cl2-help:#e5f2fc;--cl2-soft:#174979}
:where(.article,.news-detail,.policy,.ac-shell,.ux-directory,.ux-home,.np3-news) :is(h1,h2,h3){text-wrap:pretty;overflow-wrap:break-word}
/* Unified reading ladder: titles are visibly separate from explanations. */
.article-heading h1,.news-detail h1,.page-head h1{font-size:clamp(1.8rem,3.8vw,2.65rem);font-weight:850;line-height:1.3;letter-spacing:-.018em}
.article .dek,.news-detail .dek,.page-head>p{font-size:clamp(1rem,1.5vw,1.09rem);line-height:1.8;max-width:72ch}
.article>section:not(.sources){margin-block:clamp(1.6rem,3vw,2.6rem);padding-block-start:.5rem}
.article>section>h2,.policy h2,.news-detail h2{font-size:clamp(1.2rem,2.1vw,1.55rem);line-height:1.4;font-weight:820;letter-spacing:-.012em;margin:0 0 1rem;border-inline-start:4px solid var(--cl2-accent);padding-inline-start:.85rem;color:var(--cl2-ink)}
.article>section>p,.news-detail p,.policy>p{font-size:1rem;line-height:1.9;max-width:75ch;overflow-wrap:break-word}
.article .toc,.article .sources,.news-detail .news-reference{border:1px solid var(--cl2-line);border-radius:12px;background:var(--cl2-surface);padding:clamp(.8rem,2vw,1.3rem)}
.article .toc strong{display:block;color:var(--cl2-accent);margin-bottom:.6rem}
.article :is(blockquote,pre,.example-block),.news-detail blockquote{border-inline-start:3px solid var(--cl2-accent);background:var(--cl2-help);padding:1rem;border-radius:8px}
.article :is(table,pre),.news-detail :is(table,pre){max-width:100%;overflow-x:auto}
/* News V1: clean briefing typography and one lead item, not giant poster tiles. */
.np3-news{--np3-ink:var(--cl2-ink);--np3-muted:var(--cl2-muted);--np3-accent:var(--cl2-accent);--np3-line:var(--cl2-line);--np3-card:var(--cl2-surface)}
.np3-news .np3-head{padding-block:clamp(1.2rem,2.6vw,2rem) 1.25rem}
.np3-news .np3-kicker{font-size:.8rem;font-weight:800}
.np3-news h1{font-size:clamp(1.85rem,3vw,2.3rem);line-height:1.32;margin-bottom:.7rem}
.np3-news .np3-intro{font-size:.99rem;line-height:1.75}
.np3-news .np3-ticker{direction:inherit;grid-template-columns:auto minmax(0,1fr) auto;border:1px solid var(--cl2-line);border-radius:12px;background:var(--cl2-surface);box-shadow:0 4px 22px rgba(0,0,0,.08);min-height:60px;overflow:hidden;margin-bottom:1.5rem}
.np3-news .np3-ticker-key{background:transparent;color:var(--cl2-accent);border-inline-end:1px solid var(--cl2-line);font-size:.83rem;letter-spacing:0;padding-inline:1rem}
.np3-news .np3-ticker-text{min-width:0;padding:.85rem 1rem;text-align:start}
.np3-news .np3-ticker-text a{direction:inherit;font-size:.97rem;font-weight:800;line-height:1.5;color:var(--cl2-ink)}
.np3-news .np3-ticker-actions{display:flex;flex-direction:row;gap:.3rem;padding-inline:.65rem}
.np3-news .np3-ticker-actions button{border:1px solid transparent;min-width:38px;min-height:38px;line-height:1;font-size:1.15rem}
.np3-news .np3-ticker-actions button:focus-visible,.np3-news .np3-ticker-actions button:hover{border-color:var(--cl2-accent);background:var(--cl2-help)}
html[dir="rtl"] .np3-news [data-np3-prev],html[dir="rtl"] .np3-news [data-np3-next]{transform:scaleX(-1)}
.np3-news .np3-section-head{align-items:center;margin-bottom:.75rem}
.np3-news .np3-section-head h2{font-size:clamp(1.35rem,2.2vw,1.6rem)}
.np3-news .np3-story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}
.np3-news .np3-story{border-radius:12px;position:relative;flex-direction:column}
.np3-news .np3-feature{grid-column:1/-1;grid-row:auto;min-height:0}
.np3-news .np3-story .np3-story-link,.np3-news .np3-feature .np3-story-link{display:flex;flex-direction:column}
/* Thumbnails generated as text posters compete with the article title; hide them in the feed, not article pages. */
.np3-news .np3-story .np3-photo{display:none!important}
.np3-news .np3-story-body,.np3-news .np3-feature .np3-story-body{padding:clamp(.95rem,1.8vw,1.25rem);gap:.5rem}
.np3-news .np3-feature{background:linear-gradient(125deg,var(--cl2-surface),var(--cl2-help))}
.np3-news .np3-feature .np3-story-body{padding:clamp(1.2rem,2.7vw,1.8rem)}
.np3-news .np3-byline{font-size:.77rem;line-height:1.5;gap:.5rem;color:var(--cl2-muted)}
.np3-news h3,.np3-news .np3-feature h3{font-size:clamp(1.04rem,1.6vw,1.22rem);line-height:1.45;font-weight:830;color:var(--cl2-ink);margin:.15rem 0 .2rem}
.np3-news .np3-feature h3{font-size:clamp(1.22rem,2vw,1.6rem);max-width:44ch}
.np3-news .np3-story p,.np3-news .np3-feature .np3-story p{font-size:.91rem;line-height:1.75;color:var(--cl2-muted);-webkit-line-clamp:3;max-width:78ch}
.np3-news .np3-read{font-weight:750;margin-top:auto;display:inline-block;padding-top:.65rem}
.np3-news .np3-story::before{display:block;align-self:flex-start;content:'AI';margin:.8rem 1rem 0;padding:.15rem .55rem;background:var(--cl2-help);border:1px solid var(--cl2-line);color:var(--cl2-accent);font-size:.71rem;font-weight:800;letter-spacing:.02em;border-radius:6px}
html[lang="ar"] .np3-news .np3-story[data-np3-lane="models"]::before{content:'النماذج'}
html[lang="ar"] .np3-news .np3-story[data-np3-lane="media"]::before{content:'الصور والصوت'}
html[lang="ar"] .np3-news .np3-story[data-np3-lane="dev"]::before{content:'البرمجة'}
html[lang="ar"] .np3-news .np3-story[data-np3-lane="research"]::before{content:'الأبحاث'}
html[lang="en"] .np3-news .np3-story[data-np3-lane="models"]::before{content:'Models'}
html[lang="en"] .np3-news .np3-story[data-np3-lane="media"]::before{content:'Media'}
html[lang="en"] .np3-news .np3-story[data-np3-lane="dev"]::before{content:'Development'}
html[lang="en"] .np3-news .np3-story[data-np3-lane="research"]::before{content:'Research'}
/* Academy: one visible task per lesson, distinct labels, and advanced material behind disclosure. */
.ac-shell{--ac-ink:var(--cl2-ink);--ac-muted:var(--cl2-muted);--ac-accent:var(--cl2-accent);--ac-line:var(--cl2-line)}
.ac-shell .ac-hero h1{font-size:clamp(1.75rem,3.2vw,2.35rem);line-height:1.35}
.ac-shell :is(.ac-hero>p,.ac-case-intro p,.ac-lesson>p,.ac-finish>p){font-size:.98rem;line-height:1.75}
.ac-shell .ac-lesson{border:1px solid var(--cl2-line);scroll-margin-top:24px;position:relative}
.ac-shell .ac-lesson h2{font-size:clamp(1.22rem,2vw,1.5rem);line-height:1.45;color:var(--cl2-ink);margin:.65rem 0 1rem}
.ac-shell .ac-lesson-num{display:inline-flex;border-radius:8px;padding:.25rem .65rem;color:var(--cl2-accent);background:var(--cl2-help);font-weight:800;font-size:.82rem}
.ac-shell .cl2-example{padding:1rem 1.15rem;border:1px solid var(--cl2-line);background:var(--cl2-help);border-radius:10px;margin:1rem 0 1.25rem}
.ac-shell .cl2-example .cl2-label{font-size:.79rem;letter-spacing:.01em;font-weight:850;color:var(--cl2-accent);margin:0 0 .4rem}
.ac-shell .cl2-example p{color:var(--cl2-ink);line-height:1.7;font-size:.98rem;margin:.15rem 0 .75rem}
.ac-shell .cl2-goal{padding:.75rem .9rem;background:var(--cl2-surface);border-inline-start:3px solid var(--cl2-accent);border-radius:6px;line-height:1.7}
.ac-shell .cl2-goal strong{display:block;font-size:.82rem;color:var(--cl2-accent);margin-bottom:.2rem}
.ac-shell .ac-deeper{padding:.75rem 1rem;border:1px solid var(--cl2-line);border-radius:10px;margin-block:1rem}
.ac-shell .ac-deeper>summary{font-weight:770;color:var(--cl2-accent);cursor:pointer;line-height:1.5}
.ac-shell .ac-deeper .ac-case{margin-bottom:0}
.ac-shell .ac-action,.ac-shell .ac-v3-quiz,.ac-shell .ac-case-intro,.ac-shell .ac-v3-capstone,.ac-shell .ac-project{border-radius:12px}
.ac-shell .ac-action{background:var(--cl2-help);border-inline-start:4px solid var(--cl2-accent);margin:1rem 0}
.ac-shell .ac-action h3{font-size:1.05rem;font-weight:800;color:var(--cl2-ink)}
.ac-shell .ac-action p{line-height:1.75;font-size:.95rem}
.ac-shell .ac-v3-quiz h3,.ac-shell .ac-v3-capstone h2,.ac-shell .ac-finish h2{font-size:1.18rem;line-height:1.4;font-weight:820;color:var(--cl2-ink)}
.ac-shell :is(.ac-v3-quiz label,.ac-v3-quiz button,.ac-actions button,.ac-start){min-height:42px}
.ac-shell :is(.ac-v3-quiz input,.ac-v3-quiz label){cursor:pointer}
.ac-shell .cl2-where{background:var(--cl2-help);border:1px solid var(--cl2-line);padding:.55rem .8rem;border-radius:8px;font-size:.84rem;font-weight:800;color:var(--cl2-accent);margin:.75rem 0}
.ac-shell .ac-outline [data-lesson-nav][aria-current="step"]{color:var(--cl2-accent);font-weight:850;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
/* Homepage: single, compact optional action switcher; keep 3 primary cards intact. */
.ux-home .cl2-quick{border:1px solid var(--cl2-line);background:var(--cl2-surface);border-radius:12px;padding:clamp(.9rem,2vw,1.2rem);margin:1rem 0;display:grid;gap:.7rem}
.ux-home .cl2-quick h3{font-size:1rem;line-height:1.4;font-weight:840;margin:0;color:var(--cl2-ink)}
.ux-home .cl2-quick-buttons{display:flex;gap:.5rem;flex-wrap:wrap}
.ux-home .cl2-quick-buttons button{font:inherit;font-size:.87rem;color:var(--cl2-ink);background:transparent;border:1px solid var(--cl2-line);border-radius:8px;min-height:42px;padding:.45rem .75rem;cursor:pointer}
.ux-home .cl2-quick-buttons button[aria-pressed="true"]{background:var(--cl2-help);border-color:var(--cl2-accent);color:var(--cl2-accent);font-weight:800}
.ux-home .cl2-quick-result{display:flex;align-items:center;gap:1rem;justify-content:space-between;flex-wrap:wrap}
.ux-home .cl2-quick-result p{margin:0;line-height:1.65;font-size:.9rem;color:var(--cl2-muted);flex:1 1 240px}
.ux-home .cl2-quick-result a{display:inline-block;background:var(--cl2-accent);color:#0a1728;border-radius:8px;font-weight:850;padding:.6rem .85rem;text-decoration:none}
html[data-theme="light"] .ux-home .cl2-quick-result a{color:#fff}
:where(.np3-news,.ac-shell,.ux-home,.article) :is(a,button,input,summary):focus-visible{outline:3px solid var(--cl2-accent);outline-offset:3px}
@media(max-width:750px){.np3-news .np3-story-grid{grid-template-columns:minmax(0,1fr)}.np3-news .np3-feature{grid-column:auto}.np3-news .np3-ticker{grid-template-columns:minmax(0,1fr)}.np3-news .np3-ticker-key{border-inline-end:0;border-bottom:1px solid var(--cl2-line);padding:.65rem .85rem}.np3-news .np3-ticker-actions{grid-column:auto;border-top:1px solid var(--cl2-line);justify-content:flex-end;padding:.15rem .5rem}.np3-news .np3-ticker-text a{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.ac-shell .cl2-example{padding:.9rem}.ac-shell .ac-hero h1{font-size:1.75rem}}
@media(prefers-reduced-motion:reduce){.np3-news *,.ac-shell *,.ux-home *{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

.ac-shell .cl2-hero-example{border:1px solid var(--cl2-line);border-inline-start:4px solid var(--cl2-accent);background:var(--cl2-help);border-radius:10px;padding:.8rem 1rem;margin:1rem 0;max-width:800px}
.ac-shell .cl2-hero-example strong{display:block;color:var(--cl2-accent);font-size:.84rem;margin-bottom:.3rem}
.ac-shell .cl2-hero-example p{color:var(--cl2-ink);font-size:.97rem;line-height:1.7;margin:0}
/* Shared content cards / topic collections; keep technical tool controls untouched. */
:where(.story-card,.topic-tile,.card-content,.section-head,.ux-service-card) :is(h2,h3){font-weight:820;line-height:1.4;letter-spacing:-.01em;color:var(--cl2-ink);text-wrap:pretty}
:where(.story-card,.topic-tile,.card-content,.ux-service-card) :is(p,.meta,small){line-height:1.75;color:var(--cl2-muted)}
:where(.story-card,.topic-tile,.card-content,.ux-service-card) :is(a,.text-link){text-underline-offset:3px}
