:root{--ink:#111113;--muted:#545454;--teal:#171717;--line:#222;--wash:#f2e76b;--paper:#fff;--gold:#ffe555;accent-color:#c4ef18}
body[data-course="advanced-native"]{background:linear-gradient(140deg,#f7edaa 0%,#fbf4c7 52%,#f8f8f1 100%);color:var(--ink);min-height:100vh}
body[data-course="advanced-native"] button{border-color:#222;box-shadow:0 3px 0 #161616;background:#fff;color:#111;font-weight:800}
body[data-course="advanced-native"] button:hover:not(:disabled){background:#eaff87;border-color:#111}
body[data-course="advanced-native"] button.primary{background:#151515;color:#fff;border-color:#151515;box-shadow:0 4px 0 #899f13}
body[data-course="advanced-native"] button.primary:hover:not(:disabled){background:#303030;color:#fff}
body[data-course="advanced-native"] :is(button,a,input,textarea,summary):focus-visible{outline:3px solid #e95b28;outline-offset:3px}
body[data-course="advanced-native"] .edmund-system-header{background:#fff;border-bottom:3px solid #111}
body[data-course="advanced-native"] main{max-width:1260px;padding-top:24px}
body[data-course="advanced-native"] .panel{border:2px solid #171717;box-shadow:7px 8px 0 #111}
body[data-course="advanced-native"] .eyebrow{color:#515e04;font-weight:900}
body[data-course="advanced-native"] .login-layout{gap:26px;min-height:75vh}
body[data-course="advanced-native"] .welcome{position:relative;isolation:isolate;overflow:hidden;background:#101010;color:#fff;border-radius:28px;padding:clamp(30px,5vw,62px);min-height:460px;display:flex;flex-direction:column;justify-content:center}
body[data-course="advanced-native"] .welcome::before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(148deg,transparent 0 37%,#ffdf00 37% 55%,transparent 55%),linear-gradient(31deg,transparent 0 52%,#b2e516 52% 67%,transparent 67%),linear-gradient(120deg,transparent 0 75%,#ff6131 75% 88%,transparent 88%);opacity:.94}
body[data-course="advanced-native"] .welcome h1{font-family:Inter,Arial,"PingFang TC",sans-serif;font-size:clamp(2.45rem,4.2vw,4rem);font-weight:950;line-height:1.08;letter-spacing:-.045em;max-width:670px;text-shadow:0 2px 4px #1118}
body[data-course="advanced-native"] .welcome h1 em{color:#eaff77;text-shadow:0 2px 4px #1118}
body[data-course="advanced-native"] .welcome .eyebrow,body[data-course="advanced-native"] .welcome>p:not(.eyebrow){color:#fff;text-shadow:0 1px 3px #111}
body[data-course="advanced-native"] .pill-row span{background:#d3fa26;border:1px solid #111;color:#111;font-weight:850}
body[data-course="advanced-native"] .login-form{background:#fff;border-radius:24px}
body[data-course="advanced-native"] .login-form input,body[data-course="advanced-native"] .library-search input,body[data-course="advanced-native"] textarea{border:2px solid #222;background:#fff;color:#111}
body[data-course="advanced-native"] .dashboard-panel{background:#fff;border-radius:22px}
body[data-course="advanced-native"] .library-heading{position:relative;max-width:none;overflow:hidden;background:#121212;color:#fff;border-radius:27px;padding:clamp(24px,4vw,47px);margin:22px 0 30px}
body[data-course="advanced-native"] .library-heading::after{content:"";pointer-events:none;position:absolute;inset:0 0 0 64%;background:linear-gradient(146deg,transparent 0 26%,#ffde00 26% 52%,transparent 52%),linear-gradient(31deg,transparent 0 34%,#b6ec18 34% 63%,transparent 63%),linear-gradient(121deg,transparent 0 72%,#ff652c 72% 88%,transparent 88%)}
body[data-course="advanced-native"] .library-heading>*{position:relative;z-index:1;max-width:720px}
body[data-course="advanced-native"] .library-heading .eyebrow{color:#d2fa36}
body[data-course="advanced-native"] .library-heading h1{font-size:clamp(2.2rem,4.5vw,4.2rem);line-height:1.06;font-weight:950;letter-spacing:-.055em}
body[data-course="advanced-native"] .library-search input{background:#fff}
body[data-course="advanced-native"] .module-card-grid{gap:19px}
body[data-course="advanced-native"] .module-card{min-height:225px;border:2px solid #111;border-radius:22px;background:#fff;box-shadow:5px 6px 0 #111;padding:25px}
body[data-course="advanced-native"] .module-card:nth-child(2n){background:#e7f994}
body[data-course="advanced-native"] .module-card:nth-child(3n){background:#fff1a4}
body[data-course="advanced-native"] .module-card:hover{box-shadow:7px 8px 0 #111;transform:translateY(-3px)}
body[data-course="advanced-native"] .module-card-number{font:950 5.7rem/1 Inter,Arial,sans-serif;color:#1110;-webkit-text-stroke:2px #1114;bottom:-14px}
body[data-course="advanced-native"] .module-card-copy strong{font-size:clamp(1.3rem,2vw,1.8rem);font-weight:900;letter-spacing:-.03em}
body[data-course="advanced-native"] .module-card-copy>span:last-child{background:#111;color:#fff;border-radius:9px;font-weight:900}
body[data-course="advanced-native"] .lesson-heading h1{font-weight:950;letter-spacing:-.04em}
body[data-course="advanced-native"] .lesson-heading [data-lesson-title] em{color:#111;background:#dbf953;padding:0 .12em}
body[data-course="advanced-native"] .journey{background:#fffdf2f5;border:2px solid #111;border-radius:17px;padding:13px;margin-bottom:25px;box-shadow:4px 5px 0 #111}
body[data-course="advanced-native"] .journey nav [aria-current]{background:#111;color:#fff;border-color:#111}
body[data-course="advanced-native"] .journey nav [aria-current] span{color:#dcfb4a}
body[data-course="advanced-native"] progress::-webkit-progress-value{background:#bbec18}body[data-course="advanced-native"] progress::-moz-progress-bar{background:#bbec18}
body[data-course="advanced-native"] .stage{background:#fff;border-radius:22px}
body[data-course="advanced-native"] .stage-heading h2{font-weight:950;letter-spacing:-.03em}
body[data-course="advanced-native"] .question h3{font-size:clamp(1.1rem,1.65vw,1.35rem);font-weight:850}
body[data-course="advanced-native"] .choices button{border:2px solid #222;border-radius:14px;box-shadow:3px 4px 0 #111;font-size:1.03rem}
body[data-course="advanced-native"] .choices button>span:not(.choice-copy){background:#111;color:#fff}
body[data-course="advanced-native"] .choices .correct{background:#e0fb93;color:#111;border-color:#111;opacity:1}
body[data-course="advanced-native"] .choices .golden{background:#ffe466;color:#111;border:3px solid #111;box-shadow:4px 5px 0 #cf9622}
body[data-course="advanced-native"] .feedback.good{background:#e9fba9;border-left:6px solid #111;color:#171717}
body[data-course="advanced-native"] .feedback.golden{background:#ffeb9a;border-left-color:#c48716}
body[data-course="advanced-native"] .model{background:#fff4bc;border:2px solid #111;border-radius:18px}
body[data-course="advanced-native"] .speaking-cloze{font-size:clamp(1.45rem,2.7vw,2.15rem);font-weight:800;overflow-wrap:anywhere;color:#111}
body[data-course="advanced-native"] .open-question{background:#fffbe5;border:2px solid #111}
body[data-course="advanced-native"] .open-question form label{color:#222}
body[data-course="advanced-native"] .open-review{background:#edffb1;border:2px solid #111;border-left:8px solid #111;color:#111}
body[data-course="advanced-native"] .open-review>strong,body[data-course="advanced-native"] .open-review p{color:#111}
body[data-course="advanced-native"] .open-review li{font-size:clamp(1.23rem,2.15vw,1.55rem);line-height:1.55;font-weight:700;letter-spacing:-.015em}
body[data-course="advanced-native"] .open-review li+li{margin-top:15px}
body[data-course="advanced-native"] footer{border-top:2px solid #111;color:#222}
@media(max-width:800px){body[data-course="advanced-native"] .login-layout{grid-template-columns:1fr}body[data-course="advanced-native"] .welcome{min-height:320px}body[data-course="advanced-native"] .library-heading::after{inset:0 0 0 73%;opacity:.65}}
@media(max-width:600px){body[data-course="advanced-native"] main{padding:16px 14px 55px}body[data-course="advanced-native"] .welcome{padding:28px;min-height:300px}body[data-course="advanced-native"] .welcome h1{font-size:2.45rem}body[data-course="advanced-native"] .library-heading{padding:25px 20px}body[data-course="advanced-native"] .library-heading::after{inset:0 0 0 68%;opacity:.4}body[data-course="advanced-native"] .module-card{min-height:185px}body[data-course="advanced-native"] .journey{top:0}}

/* The reference's composition: one feature tile, two stacked tiles, two tall tiles. */
body[data-course="advanced-native"] .library-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:3px 24px;align-items:end;background:transparent;color:#111;border-radius:0;border-bottom:2px solid #111;overflow:visible;padding:14px 2px 20px;margin:0 0 20px}
body[data-course="advanced-native"] .library-heading::after{display:none}
body[data-course="advanced-native"] .library-heading>*{max-width:none}
body[data-course="advanced-native"] .library-heading .eyebrow{grid-column:1;color:#111;margin:0}
body[data-course="advanced-native"] .library-heading h1{grid-column:1;grid-row:2/4;max-width:640px;margin:5px 0 0;font-size:clamp(1.8rem,3.1vw,2.9rem);line-height:1.1}
body[data-course="advanced-native"] .library-search{grid-column:2;grid-row:2;align-self:end;font-size:.82rem;font-weight:800}
body[data-course="advanced-native"] .library-search input{margin-top:5px;border-radius:12px}
body[data-course="advanced-native"] [data-library-count]{grid-column:2;grid-row:3;margin:0;font-weight:800;color:#333}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"]{display:grid;grid-template-columns:1.18fr .78fr .82fr .82fr;grid-template-rows:repeat(2,minmax(224px,1fr));gap:7px;min-height:520px;background:#101010;padding:7px;border-radius:29px}
body[data-course="advanced-native"] .module-card-grid[data-layout="results"]{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:12px;background:#101010;padding:10px;border-radius:27px}
body[data-course="advanced-native"] .module-card-grid[data-layout="sections"]{display:block;padding:0;background:none}
body[data-course="advanced-native"] .advanced-library-section{margin:34px 3px 16px;font-size:1.15rem;line-height:1.4}
body[data-course="advanced-native"] .advanced-module-card,body[data-course="advanced-native"] .advanced-module-card:nth-child(2n),body[data-course="advanced-native"] .advanced-module-card:nth-child(3n){position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-width:0;min-height:0;overflow:hidden;text-align:left;padding:23px;border:0;border-radius:22px;background:#fff;color:#111;box-shadow:none;transition:transform .18s ease,background .18s ease}
body[data-course="advanced-native"] .advanced-module-card:hover,body[data-course="advanced-native"] .advanced-module-card:focus-visible{box-shadow:none;transform:translateY(-2px);background:#fffef1}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(1){grid-column:1;grid-row:1/3;padding:28px}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(2){grid-column:2;grid-row:1}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(3){grid-column:2;grid-row:2}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(4){grid-column:3;grid-row:1/3}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(5){grid-column:4;grid-row:1/3}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(n+4){background:#171717;color:#fff}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(n+4):hover{background:#242424}
body[data-course="advanced-native"] .advanced-card-top{position:relative;z-index:2;display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:.62rem;letter-spacing:.1em;font-weight:900;text-transform:uppercase;opacity:.74}
body[data-course="advanced-native"] .advanced-card-top span:last-child{text-align:right;letter-spacing:0;text-transform:none;font-weight:700}
body[data-course="advanced-native"] .advanced-module-card .module-card-copy{position:relative;z-index:2;display:block;height:auto;margin-top:29px;max-width:100%}
body[data-course="advanced-native"] .advanced-module-card .module-card-copy strong{display:block;margin:0 0 12px;font-size:clamp(1.45rem,2vw,2rem);font-weight:950;line-height:1.13;letter-spacing:-.05em;overflow-wrap:anywhere}
body[data-course="advanced-native"] .advanced-module-card .module-card-copy strong{line-break:strict;text-wrap:balance}
body[data-course="advanced-native"] .advanced-module-card .module-card-copy strong.advanced-card-title-lines{overflow-wrap:normal}
body[data-course="advanced-native"] .advanced-card-title-lines span{display:block;white-space:nowrap}
body[data-course="advanced-native"] .advanced-module-card .module-card-copy em{display:block;font:800 clamp(1rem,1.35vw,1.3rem)/1.22 Inter,Arial,sans-serif;letter-spacing:-.025em;color:#494949;overflow-wrap:anywhere}
body[data-course="advanced-native"] .advanced-module-card:nth-child(n+4) .module-card-copy em{color:#d8d8d8}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:first-child .module-card-copy{margin-top:53px;max-width:90%}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:first-child .module-card-copy strong{font-size:clamp(1.4rem,2.4vw,2.3rem)}
body[data-course="advanced-native"] .advanced-module-card .module-card-copy strong.advanced-card-title-lines{font-size:clamp(1.35rem,1.8vw,1.9rem)}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:first-child .module-card-copy em{font-size:clamp(1.3rem,1.8vw,1.75rem);max-width:300px}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(2) .module-card-copy,body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(3) .module-card-copy{margin-top:18px;max-width:83%}
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(2) .module-card-copy strong,body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(3) .module-card-copy strong{font-size:clamp(1.24rem,1.48vw,1.55rem)}
body[data-course="advanced-native"] .advanced-card-bottom{position:relative;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;font-size:.75rem;font-weight:900}
body[data-course="advanced-native"] .advanced-card-bottom>span:first-child{max-width:calc(100% - 42px);padding:7px 10px;border-radius:50px;background:#111;color:#fff}
body[data-course="advanced-native"] .advanced-module-card:nth-child(n+4) .advanced-card-bottom>span:first-child{background:#d7fb4d;color:#111}
body[data-course="advanced-native"] .advanced-card-arrow{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border:1.5px solid currentColor;border-radius:50%;font-size:1.2rem}
body[data-course="advanced-native"] .module-card-grid[data-layout="results"] .advanced-module-card{min-height:270px}
body[data-course="advanced-native"] .module-card-grid[data-layout="results"] .advanced-module-card .module-card-copy strong.advanced-card-title-lines{font-size:clamp(1rem,1.4vw,1.4rem)}
body[data-course="advanced-native"] .module-card-grid[data-layout="results"] .advanced-module-card:nth-child(n+4){background:#171717;color:#fff}

/* Alternate colour placement by group, keeping every lesson in source order. */
body[data-course="advanced-native"] .module-card-grid[data-layout="sections"]>.module-card-grid+.module-card-grid{margin-top:28px}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+2){background:#171717;color:#fff}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+2):hover{background:#242424}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+2) .module-card-copy em{color:#d8d8d8}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+2) .advanced-card-bottom>span:first-child{background:#d7fb4d;color:#111}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(n+3){background:#fff;color:#111}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(n+3):hover{background:#fffef1}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(n+3) .module-card-copy em{color:#494949}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(n+3) .advanced-card-bottom>span:first-child{background:#111;color:#fff}

/* Lessons use separate tiles rather than one large sheet. */
body[data-course="advanced-native"] .stage{display:flex;flex-direction:column;gap:9px;padding:9px;background:#111;border-color:#111;border-radius:28px}
body[data-course="advanced-native"] .stage-heading{padding:25px 29px;background:#fff;border-radius:20px}
body[data-course="advanced-native"] .stage-heading :is(h2,p){line-break:strict;text-wrap:balance}
body[data-course="advanced-native"] .stage-heading .zh-phrase{display:inline-block;max-width:100%;text-wrap:balance}
body[data-course="advanced-native"] .stage-heading>p:last-child{margin-bottom:0}
body[data-course="advanced-native"] .stage .question{margin:0;border:0;border-radius:20px;padding:25px 29px;background:#fff}
body[data-course="advanced-native"] .stage .model{margin:0;border-radius:20px}
body[data-course="advanced-native"] .stage .recorder{margin:0;background:#fff;border:0;border-radius:20px}
body[data-course="advanced-native"] .stage .record-badge{margin:0;padding:0 12px;color:#fff}
body[data-course="advanced-native"] .stage-nav{margin:0;padding:17px 20px;border:0;border-radius:20px;background:#f5ed8a}
body[data-course="advanced-native"] .stage-nav span{color:#252525;font-weight:700}
body[data-course="advanced-native"] .stage:has(.reply-question){display:grid;grid-template-columns:minmax(240px,.55fr) minmax(0,1.45fr);align-items:stretch}
body[data-course="advanced-native"] .stage:has(.reply-question) .stage-heading{background:#d9f46c}
body[data-course="advanced-native"] .stage .reply-question{background:#181818;color:#fff}
body[data-course="advanced-native"] .stage .reply-question h3{color:#fff}
body[data-course="advanced-native"] .stage .reply-question .choices button{background:#fff;color:#111}
body[data-course="advanced-native"] .stage .reply-question .choices button.correct{background:#dfff98}
body[data-course="advanced-native"] .stage .reply-question .choices button.golden{background:#ffe66b}
body[data-course="advanced-native"] .negative-cue{color:#c21f27;font-weight:950;background:#fff0ef;border-radius:4px;padding:0 .12em}
body[data-course="advanced-native"] .sentence-translation{display:block;margin-top:8px;color:#444;font-size:.95rem;line-height:1.65;font-weight:500;letter-spacing:0;line-break:strict;text-wrap:balance}
body[data-course="advanced-native"] .sentence-translation .zh-phrase{display:inline-block;max-width:100%;text-wrap:balance}
body[data-course="advanced-native"] .text-tail{display:inline-block;max-width:100%;white-space:nowrap}
/* Cards are image-free: give their text the full available content width. */
body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(n) .module-card-copy{max-width:100%}
body[data-course="advanced-native"] .zh-phrase{display:inline-block;max-width:100%;line-break:strict;text-wrap:balance}
body[data-course="advanced-native"] .choices{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
body[data-course="advanced-native"] .stage .question{min-width:0}
body[data-course="advanced-native"] :is(.choice-original,.model-sentence,.open-review li>span:first-child){word-break:normal;overflow-wrap:normal;text-wrap:pretty}
body[data-course="advanced-native"] .choices .choice-copy{overflow-wrap:normal;word-break:normal}
body[data-course="advanced-native"] .question h3{line-break:strict;word-break:normal;text-wrap:pretty}
body[data-course="advanced-native"] .question h3 .zh-phrase{display:inline-block;max-width:100%;text-wrap:balance}
body[data-course="advanced-native"] .question-ask{display:block;margin-top:8px}
body[data-course="advanced-native"] .target-highlight{color:#111;border-radius:4px;padding:0 .06em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
body[data-course="advanced-native"] .target-yellow{background:#ffe65b;box-shadow:0 0 9px #ffd83b88}
body[data-course="advanced-native"] .target-green{background:#b8ed80;box-shadow:0 0 9px #7acb5c66}
body[data-course="advanced-native"] .reply-question h3 .sentence-translation{color:#ededed;font-size:1rem}
body[data-course="advanced-native"] .choices .sentence-translation{color:#414141}
body[data-course="advanced-native"] .open-review li .sentence-translation{font-size:1.05rem;color:#343b25}
body[data-course="advanced-native"] .model-sentence:has(+.sentence-translation){margin-bottom:0}
body[data-course="advanced-native"] .stage:has(>.finish){display:block;background:#fff;padding:9px}
body[data-course="advanced-native"] .finish{padding:clamp(24px,4vw,48px);border-radius:20px;background:#fff;color:#111}
body[data-course="advanced-native"] .finish h2{color:#111;font-size:clamp(1.5rem,3vw,2.1rem);line-height:1.4;text-wrap:balance}
body[data-course="advanced-native"] .finish p{color:#333}
body[data-course="advanced-native"] .finish .eyebrow{color:#515e04}
body[data-course="advanced-native"] .finish-icon{background:#e4f6a1;color:#263600}
body[data-course="advanced-native"] .finish .takeaway{max-width:760px;background:#fff9d9;color:#111;border:2px solid #222;padding:17px 20px;border-radius:14px}
body[data-course="advanced-native"] .finish .finish-actions{margin-top:28px}
body[data-course="advanced-native"] .writing-glossary{margin:17px 0 22px;padding:18px 20px;border:2px solid #141414;border-radius:17px;background:#f1f8d8}
body[data-course="advanced-native"] .writing-glossary>strong{display:block;font-size:1.07rem;font-weight:900}
body[data-course="advanced-native"] .writing-glossary>p{margin:5px 0 14px;font-size:.91rem;color:#3b3b30}
body[data-course="advanced-native"] .writing-glossary table{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden}
body[data-course="advanced-native"] .writing-glossary th,body[data-course="advanced-native"] .writing-glossary td{padding:9px 13px;border-bottom:1px solid #dce2cb;text-align:left}
body[data-course="advanced-native"] .writing-glossary th{background:#172016;color:#fff;font-size:.8rem;letter-spacing:.03em}
body[data-course="advanced-native"] .writing-glossary td:first-child{font-weight:750}
body[data-course="advanced-native"] .writing-glossary tbody tr:last-child td{border-bottom:0}
body[data-course="advanced-native"] .stage:has(.reply-question) .stage-nav{grid-column:1/-1}
@media(max-width:1050px){body[data-course="advanced-native"] .module-card-grid[data-layout="featured"]{grid-template-columns:1.15fr .85fr .9fr;grid-template-rows:repeat(2,minmax(205px,1fr)) 235px}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(4){grid-column:3;grid-row:1/3}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(5){grid-column:1/-1;grid-row:3}}
@media(max-width:700px){body[data-course="advanced-native"] .library-heading{grid-template-columns:1fr;padding-bottom:17px}body[data-course="advanced-native"] .library-heading .eyebrow,body[data-course="advanced-native"] .library-heading h1,body[data-course="advanced-native"] .library-search,body[data-course="advanced-native"] [data-library-count]{grid-column:1;grid-row:auto}body[data-course="advanced-native"] .library-search{margin-top:16px}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"]{grid-template-columns:1fr 1fr;grid-template-rows:310px 200px 310px}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:first-child{grid-column:1/-1;grid-row:1}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(2){grid-column:1;grid-row:2}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(3){grid-column:2;grid-row:2}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(4){grid-column:1;grid-row:3}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(5){grid-column:2;grid-row:3}body[data-course="advanced-native"] .stage:has(.reply-question){grid-template-columns:1fr}body[data-course="advanced-native"] .stage:has(.reply-question) .stage-nav{grid-column:1}}
@media(max-width:460px){body[data-course="advanced-native"] .module-card-grid[data-layout="featured"]{grid-template-columns:1fr;grid-template-rows:320px 195px 195px 285px 285px}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(n){grid-column:1;grid-row:auto}body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:first-child .module-card-copy{margin-top:25px}body[data-course="advanced-native"] .advanced-module-card{padding:20px}body[data-course="advanced-native"] .stage-heading,body[data-course="advanced-native"] .stage .question{padding:20px}}
@media(max-width:700px){body[data-course="advanced-native"] .module-card-grid[data-layout="featured"] .advanced-module-card:nth-child(n+4) .module-card-copy{position:relative;z-index:2}}

/* Even groups keep two black lessons first, then the three white lessons. */
@media(min-width:1051px){
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"][data-layout="featured"]{grid-template-columns:.82fr .82fr 1.18fr .78fr}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(1){grid-column:1;grid-row:1/3}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(2){grid-column:2;grid-row:1/3}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(3){grid-column:3;grid-row:1/3}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(4){grid-column:4;grid-row:1}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(5){grid-column:4;grid-row:2}
}
@media(min-width:701px) and (max-width:1050px){
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"][data-layout="featured"]{grid-template-columns:1.15fr .85fr;grid-template-rows:285px 205px 205px}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(1){grid-column:1;grid-row:1}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(2){grid-column:2;grid-row:1}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(3){grid-column:1;grid-row:2/4}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(4){grid-column:2;grid-row:2}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(5){grid-column:2;grid-row:3}
}
@media(min-width:461px) and (max-width:700px){
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"][data-layout="featured"]{grid-template-rows:285px 310px 200px}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(1){grid-column:1;grid-row:1}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(2){grid-column:2;grid-row:1}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(3){grid-column:1/-1;grid-row:2}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(4){grid-column:1;grid-row:3}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(5){grid-column:2;grid-row:3}
}
@media(max-width:460px){body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"][data-layout="featured"]{grid-template-rows:285px 285px 320px 195px 195px}}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+3) .module-card-copy{margin-top:29px;max-width:100%}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+3) .module-card-copy strong{font-size:clamp(1.45rem,2vw,2rem)}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(-n+2) .module-card-copy em{font-size:clamp(1rem,1.35vw,1.3rem)}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(n+4) .module-card-copy{margin-top:18px}
body[data-course="advanced-native"] .module-card-grid[data-palette="reversed"] .advanced-module-card:nth-child(n+4) .module-card-copy strong{font-size:clamp(1.24rem,1.48vw,1.55rem)}
@media(max-width:460px){
body[data-course="advanced-native"] .stage .question{padding:18px 12px}
body[data-course="advanced-native"] .open-review{padding:14px 10px}
body[data-course="advanced-native"] .open-review ul{padding-left:1em}
body[data-course="advanced-native"] .writing-glossary{padding:14px 10px}
body[data-course="advanced-native"] .writing-glossary :is(th,td){padding:9px 7px}
}
@media(max-width:460px){
/* Full-width text keeps long glossary pairs legible on narrow phones. */
body[data-course="advanced-native"] .writing-glossary :is(table,tbody){display:block;width:100%}
body[data-course="advanced-native"] .writing-glossary td{display:block;min-width:0}
body[data-course="advanced-native"] .open-review ul{padding-left:0;list-style:none}
}
@media(max-width:380px){
/* Move the answer badge above its copy instead of squeezing the sentence. */
body[data-course="advanced-native"] .choices button{flex-direction:column;gap:8px}
body[data-course="advanced-native"] .choices button>.choice-copy{width:100%}
body[data-course="advanced-native"] .dashboard-panel>summary{flex-wrap:wrap;gap:10px}
body[data-course="advanced-native"] .dashboard-panel>summary>span:first-child{flex:1 1 100%;min-width:0}
body[data-course="advanced-native"] .dashboard-panel>summary>span:last-child{margin-left:auto;white-space:nowrap}
}
@media(max-width:460px){
/* Give each bilingual glossary pair a full line without reducing its font. */
body[data-course="advanced-native"] .writing-glossary thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body[data-course="advanced-native"] .writing-glossary tr{display:grid;grid-template-columns:minmax(0,1fr)}
body[data-course="advanced-native"] .writing-glossary td:first-child{border-bottom:0;padding-bottom:3px}
body[data-course="advanced-native"] .writing-glossary td:last-child{padding-top:0;color:#42483a}
}

/* Keep Advanced Native controls usable by touch without changing other systems. */
body[data-course="advanced-native"] :is(button,input,select,summary){min-width:44px;min-height:44px}
body[data-course="advanced-native"] .edmund-system-header a{min-width:44px;min-height:44px}
body[data-course="advanced-native"] .header-actions>a{display:inline-flex;align-items:center;justify-content:center}
