:root{--gp-blue:#75b7f5;--gp-ink:#123f70;--gp-purple:#6335df;--gp-cyan:#18a8c4;--gp-card:#f8fcff;--gp-yellow:#ffd858}
html{min-height:100%;background:var(--gp-blue)}
body{min-height:100vh;margin:0!important;background:linear-gradient(145deg,#78b9f4 0%,#88cdf5 48%,#8cc3fa 100%)!important;color:var(--gp-ink)!important;overflow-x:hidden}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(rgba(255,255,255,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.09) 1px,transparent 1px);background-size:40px 40px}
body>.topbar,body>.site-header,body>.floating-balloons{display:none!important}
main{width:100%!important;min-height:100vh;padding:6.7rem 0 3rem!important}
.container{width:min(1180px,calc(100% - 32px))!important;margin-inline:auto!important}
.grammar-portal-nav{position:fixed;inset-block-start:16px;inset-inline:0;z-index:1000;width:min(1180px,calc(100% - 24px));margin:auto;display:flex;align-items:center;justify-content:space-between;pointer-events:none}
.grammar-portal-nav a{pointer-events:auto;width:68px;height:68px;border-radius:22px;background:linear-gradient(145deg,#ffe470,#ffb974);display:grid;place-items:center;box-shadow:0 8px 0 rgba(37,92,167,.2),0 16px 30px rgba(18,63,112,.18);border:2px solid rgba(255,255,255,.65);transition:transform .18s ease,box-shadow .18s ease}
.grammar-portal-nav a:hover,.grammar-portal-nav a:focus-visible{transform:translateY(-3px) scale(1.05);box-shadow:0 11px 0 rgba(37,92,167,.2),0 20px 34px rgba(18,63,112,.24)}
.grammar-portal-nav a:active{transform:translateY(3px) scale(.96)}
.grammar-portal-nav img{width:54px;height:54px;object-fit:contain;filter:drop-shadow(0 5px 5px rgba(20,55,105,.2))}
.grammar-progress{pointer-events:auto;background:linear-gradient(135deg,#bdf3ff,#dac9ff);border:2px solid rgba(255,255,255,.7);border-radius:999px;padding:.62rem 1rem;min-width:170px;box-shadow:0 7px 0 rgba(37,92,167,.17);text-align:center;font-weight:900;color:var(--gp-ink)}
.grammar-progress span{display:block;font-size:.8rem;margin-bottom:.35rem}
.grammar-progress i{display:block;height:8px;background:#dbeeff;border-radius:9px;overflow:hidden}
.grammar-progress i::after{content:"";display:block;width:var(--grammar-progress,8%);height:100%;background:linear-gradient(90deg,#7144ee,#27c7ca,#ffd858);border-radius:inherit;transition:width .35s ease}
.hero,.section{background:transparent!important;padding-block:1.15rem!important}
.parts-shell,.daily-life-shell,.article-shell,.sentence-stage-card,.parts-order-board,.daily-side-card,.article-side-card,.parts-cover-card,.section>.container,.parts-result-card{border:2px solid rgba(255,255,255,.72)!important;border-radius:30px!important;background:linear-gradient(135deg,rgba(202,244,255,.96),rgba(219,207,255,.94) 52%,rgba(255,232,189,.94))!important;box-shadow:0 11px 0 rgba(35,94,164,.16),0 22px 48px rgba(18,63,112,.14)!important}
.parts-shell,.daily-life-shell,.article-shell,.sentence-stage-card{padding:clamp(1.1rem,3vw,2.2rem)!important;gap:clamp(1rem,3vw,2.3rem)!important}
.section>.container{padding:clamp(1rem,2.5vw,2rem)!important}
h1{font-size:clamp(2rem,5vw,4.2rem)!important;line-height:1.08!important;color:#123f70!important}
h2{font-size:clamp(1.65rem,3vw,2.6rem)!important;color:#123f70!important}
p{line-height:1.8}
.btn,.mini-btn,.parts-tabs button,button{min-height:48px;border-radius:16px!important;font-weight:900!important;transition:transform .18s ease,box-shadow .18s ease!important}
.btn-primary,.mini-btn:not(.mini-btn-light){background:linear-gradient(135deg,#7144ee,#368df6)!important;color:#fff!important;border:0!important;box-shadow:0 7px 0 #3c2aaa!important}
.btn:hover,.mini-btn:hover,.parts-tabs button:hover{transform:translateY(-3px) scale(1.02)!important}
.parts-tabs{display:flex!important;gap:.65rem!important;flex-wrap:wrap!important;justify-content:center!important;margin-block:1.25rem!important}
.parts-grid,.daily-words-grid,.article-stage-strip,.article-examples-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr))!important;gap:1.15rem!important}
.parts-card,.parts-example-card,.parts-intro-card,.daily-word-card,.wh-question-example,.article-stage-card,.article-example-card,.article-helper-card,.parts-order-step,.grammar-learning-card{background:linear-gradient(145deg,#c9f3ff,#bfe5ff 48%,#d9ccff)!important;border:2px solid rgba(255,255,255,.72)!important;border-radius:24px!important;box-shadow:0 8px 0 rgba(37,92,167,.16),0 14px 28px rgba(18,63,112,.12)!important;overflow:hidden!important;transition:transform .2s ease,box-shadow .2s ease!important}
.parts-card:nth-child(3n+2),.parts-example-card:nth-child(3n+2),.daily-word-card:nth-child(3n+2),.wh-question-example:nth-child(3n+2),.article-example-card:nth-child(3n+2){background:linear-gradient(145deg,#ffd8ef,#e7cfff 52%,#c9e7ff)!important}
.parts-card:nth-child(3n),.parts-example-card:nth-child(3n),.daily-word-card:nth-child(3n),.wh-question-example:nth-child(3n),.article-example-card:nth-child(3n){background:linear-gradient(145deg,#fff1b8,#ffd5ad 50%,#c8f5df)!important}
.parts-card-copy,.parts-card-meta,.parts-sentence-box,.daily-word-body,.daily-word-meta,.daily-word-usage,.wh-answer-model,.article-example-copy,.article-helper-card,.parts-intro-copy{background:transparent!important}
.parts-card-paired-panel,.parts-card-example-item,.parts-card-adjective-shell,.parts-card-paired-shell,.parts-intro-media,.parts-card-media,.parts-example-media,.daily-word-media,.wh-question-example,.article-example-media,.article-helper-grid{background:linear-gradient(145deg,rgba(255,232,164,.72),rgba(194,241,255,.78),rgba(218,200,255,.75))!important;border-color:rgba(255,255,255,.62)!important}
input,textarea,select{background:rgba(232,248,255,.9)!important;border-color:rgba(74,125,199,.32)!important}
.parts-card:hover,.parts-example-card:hover,.parts-intro-card:hover,.daily-word-card:hover,.wh-question-example:hover,.article-stage-card:hover,.article-example-card:hover,.article-helper-card:hover,.parts-order-step:hover,.grammar-learning-card:hover{transform:translateY(-6px) rotate(-.45deg)!important;box-shadow:0 13px 0 rgba(37,92,167,.16),0 22px 34px rgba(18,63,112,.2)!important}
.grammar-card-tap{animation:grammarCardTap .44s ease}
@keyframes grammarCardTap{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-7px) rotate(-1.3deg)}55%{transform:translateY(-2px) rotate(1deg)}75%{transform:translateY(-5px) rotate(-.5deg)}}
.parts-card img,.daily-word-card img,.article-example-card img{max-width:100%;object-fit:contain!important}
@media(max-width:760px){main{padding-top:5.9rem!important}.grammar-portal-nav a{width:56px;height:56px;border-radius:18px}.grammar-portal-nav img{width:44px;height:44px}.grammar-progress{min-width:130px;padding:.48rem .72rem}.grammar-progress span{font-size:.72rem}.parts-shell,.daily-life-shell,.article-shell,.sentence-stage-card{grid-template-columns:1fr!important}.parts-cover-card,.daily-side-card,.article-side-card{order:-1}.parts-grid,.daily-words-grid,.article-stage-strip,.article-examples-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.75rem!important}.parts-card,.daily-word-card,.article-stage-card,.article-example-card{min-width:0!important}.parts-card:hover,.daily-word-card:hover,.article-stage-card:hover,.article-example-card:hover{transform:none!important}}
@media(max-width:410px){.container{width:min(100% - 18px,1180px)!important}.parts-grid,.daily-words-grid,.article-stage-strip,.article-examples-grid{grid-template-columns:1fr!important}.grammar-progress{min-width:112px}.grammar-progress span{max-width:95px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* New learning-portal lesson flow: one clear card at a time. */
body[data-grammar-page="parts-of-speech"] .parts-tabs{display:none!important}
body[data-grammar-page="parts-of-speech"] #parts-groups .section-heading{text-align:center;justify-content:center!important}
body[data-grammar-page="parts-of-speech"] .parts-grid{display:block!important;max-width:920px;margin-inline:auto}
body[data-grammar-page="parts-of-speech"] .parts-intro-card,
body[data-grammar-page="parts-of-speech"] .parts-card,
body[data-grammar-page="parts-of-speech"] .parts-example-card{min-height:min(610px,72vh);padding:clamp(1rem,3vw,2.2rem)!important;align-items:center!important}
body[data-grammar-page="parts-of-speech"] .parts-card-media img,
body[data-grammar-page="parts-of-speech"] .parts-intro-media img{max-height:300px!important;width:100%!important;object-fit:contain!important}
body[data-grammar-page="parts-of-speech"] .parts-card-nav-actions{position:sticky;bottom:12px;z-index:4;display:flex!important;gap:.8rem!important;justify-content:center!important;margin-top:1rem;padding:.65rem;border-radius:20px;background:rgba(238,248,255,.88);backdrop-filter:blur(10px)}

.lesson-flow-grid{display:block!important;max-width:900px;margin-inline:auto!important;position:relative}
.lesson-flow-grid>.lesson-flow-card{display:none!important}
.lesson-flow-grid>.lesson-flow-card.is-lesson-active{display:grid!important;animation:lessonCardEnter .34s ease both}
.lesson-flow-grid>.lesson-flow-card.is-lesson-leaving{animation:lessonCardLeave .2s ease both}
@keyframes lessonCardEnter{from{opacity:0;transform:translateX(28px) scale(.97)}to{opacity:1;transform:none}}
@keyframes lessonCardLeave{from{opacity:1;transform:none}to{opacity:0;transform:translateX(-20px) scale(.98)}}
.lesson-flow-controls{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;margin:1.25rem auto 0;padding:.8rem;background:linear-gradient(135deg,rgba(178,236,255,.96),rgba(210,190,255,.96),rgba(255,221,162,.95));border:2px solid rgba(255,255,255,.72);border-radius:24px;box-shadow:0 8px 0 rgba(37,92,167,.16)}
.lesson-flow-button{min-height:54px!important;border:0!important;border-radius:17px!important;background:linear-gradient(135deg,#7144ee,#368df6)!important;color:#fff!important;font:900 1rem/1.2 "Noto Sans Arabic",sans-serif!important;box-shadow:0 6px 0 #382796!important;cursor:pointer;padding:.7rem 1.1rem!important}
.lesson-flow-button.is-previous{background:linear-gradient(135deg,#22b7bd,#2488de)!important;box-shadow:0 6px 0 #176d9b!important}
.lesson-flow-button:disabled{opacity:.38;filter:grayscale(.5);cursor:not-allowed;box-shadow:0 3px 0 #789!important}
.lesson-flow-count{min-width:92px;text-align:center;font-weight:950;color:var(--gp-ink);background:linear-gradient(135deg,#ffe36f,#ffbd73);border-radius:999px;padding:.65rem .85rem;box-shadow:inset 0 0 0 2px rgba(255,255,255,.5)}
.lesson-flow-dots{display:flex;justify-content:center;gap:.42rem;margin:.85rem 0 0;flex-wrap:wrap}
.lesson-flow-dot{width:11px;height:11px;border-radius:50%;background:#d3e6f7;border:0;padding:0;min-height:0!important}
.lesson-flow-dot.is-active{width:28px;border-radius:9px;background:linear-gradient(90deg,#7144ee,#27c7ca)}
.lesson-flow-card.daily-word-card,.lesson-flow-card.wh-question-card,.lesson-flow-card.article-example-card{min-height:min(610px,72vh)!important;padding:clamp(.9rem,2.5vw,1.8rem)!important;align-content:center}
.lesson-flow-card img{max-height:300px!important;object-fit:contain!important}
body[data-grammar-page="simple-commands"] .command-section.is-flow-source{display:none!important}
.lesson-flow-master{margin-top:1rem!important}
@media(max-width:760px){body[data-grammar-page="parts-of-speech"] .parts-intro-card,body[data-grammar-page="parts-of-speech"] .parts-card,body[data-grammar-page="parts-of-speech"] .parts-example-card,.lesson-flow-card.daily-word-card,.lesson-flow-card.wh-question-card,.lesson-flow-card.article-example-card{min-height:auto!important}.lesson-flow-grid>.lesson-flow-card.is-lesson-active{display:block!important}.lesson-flow-controls{grid-template-columns:1fr 1fr}.lesson-flow-count{grid-column:1/-1;grid-row:1}.lesson-flow-button{font-size:.9rem!important;padding:.65rem!important}.lesson-flow-dots{display:none}}

/* English examples always read in their natural left-to-right order. */
body[data-grammar-page="article-pattern"] .article-sentence-text,
body[data-grammar-page="article-pattern"] .article-sentence-parts,
body[data-grammar-page="article-pattern"] .article-part,
body[data-grammar-page="article-pattern"] .article-example-chip strong,
body[data-grammar-page="article-pattern"] .article-sentence-piece{direction:ltr!important;unicode-bidi:isolate!important;text-align:left!important}
body[data-grammar-page="article-pattern"] .article-sentence-text,
body[data-grammar-page="article-pattern"] .article-sentence-parts{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:.55rem!important;flex-wrap:wrap!important}
body[data-grammar-page="article-pattern"] .article-part{display:grid!important;text-align:center!important;justify-items:center!important}
