/* Shared navigation refinement; retain section palettes. */
a:is(.directory-card,.hub-item,.hub-feature,.hub-quick-card,.level-card,.wide-collection,.up-subject-card,.up-unit-card,.up-exam-card,.up-note-row),.category-grid>a,.gate-xl-section-nav a,.gate-xl-mode-nav a{position:relative;overflow:hidden;min-width:0;overflow-wrap:anywhere;isolation:isolate}
a:is(.directory-card,.hub-item,.hub-feature,.hub-quick-card,.level-card,.wide-collection,.up-subject-card,.up-unit-card,.up-exam-card,.up-note-row)::after,.category-grid>a::after,.gate-xl-section-nav a::after,.gate-xl-mode-nav a::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;background:linear-gradient(110deg,transparent 25%,#ffffff35 48%,transparent 72%);transform:translateX(120%);opacity:0}
@media(prefers-reduced-motion:no-preference){a:is(.directory-card,.hub-item,.hub-feature,.hub-quick-card,.level-card,.wide-collection,.up-subject-card,.up-unit-card,.up-exam-card,.up-note-row):is(:hover,:active,:focus-visible)::after,.category-grid>a:is(:hover,:active,:focus-visible)::after,.gate-xl-section-nav a:is(:hover,:active,:focus-visible)::after,.gate-xl-mode-nav a:is(:hover,:active,:focus-visible)::after{animation:nav-glare .62s ease-out both}}
@keyframes nav-glare{0%{transform:translateX(120%);opacity:0}20%{opacity:1}100%{transform:translateX(-120%);opacity:0}}
a:is(.directory-card,.hub-item,.hub-feature,.hub-quick-card,.level-card,.wide-collection,.up-subject-card,.up-unit-card,.up-exam-card,.up-note-row):focus-visible,.study-pager a:focus-visible{outline:3px solid #718e53;outline-offset:3px}
.study-pager{display:flex;flex-wrap:wrap;gap:12px;margin:32px 0;justify-content:space-between}.study-pager a{max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(max-width:600px){.study-pager{display:grid;grid-template-columns:minmax(0,1fr)}.study-pager a{width:100%}}

/* Fluid desktop canvas. Keep prose comfortably readable, not the whole workspace narrow. */
@media screen and (min-width:901px){
:root{--workspace-gutter:clamp(24px,2vw,40px)}
.container,.header-inner,.footer-top,.footer-bottom,.hy-library-page .exam-directory{width:calc(100% - 2 * var(--workspace-gutter));max-width:none}
.container.narrow{max-width:none!important}
.paper-app,.gate-xl,.csir-pace,.biology-practice,.up-exam-card,.search-page{width:100%;max-width:none}
.page-intro{max-width:none;padding-block:28px 30px}
.page-intro .lede{max-width:75ch}
.directory-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
.directory-actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
}
@media screen and (max-width:900px){
.page-intro{padding-block:20px 26px}
body:not(.note-page) .page-intro h1{font-size:clamp(27px,5.2vw,42px);overflow-wrap:anywhere}
.breadcrumbs{flex-wrap:wrap;gap:5px;overflow-wrap:anywhere}
}
@media screen and (max-width:520px){
.general-exams-page .ge-portal,.ka-editorial,.ka-editorial .ge-lesson,.ka-editorial .ge-study-section,.ka-editorial .ge-table,.ka-editorial .ka-chart,.ka-editorial .ka-row,.ka-editorial .ka-tiles,.ka-editorial .ka-letter,.ka-editorial .ka-pair,.ka-editorial .ka-duration{min-width:0;max-width:100%}
.ka-editorial .ge-table{display:block;overflow-x:auto}
.ka-editorial .ge-study-section h2,.ka-editorial .ge-toc a,.ka-editorial .ge-option,.ka-editorial .ge-lesson p{overflow-wrap:anywhere}
.ka-editorial .ka-row{grid-template-columns:minmax(0,54px) minmax(0,1fr)}
.ka-editorial .ka-row .ka-letter{min-width:0;overflow-wrap:anywhere}
.ka-editorial .ka-row .ka-letter small{font-size:10px;overflow-wrap:anywhere}
.ka-editorial .ka-duration>div{grid-template-columns:minmax(0,58px) minmax(0,1fr) minmax(0,68px)}
.ka-editorial .ge-interact{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.ka-editorial select,.ka-editorial input{min-width:0;max-width:100%}
.ka-editorial .ka-language-control{max-width:calc(100% - 20px)}
.study-pager a{min-width:0}
}
.preparation-banner{display:grid;grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:clamp(18px,4vw,48px);align-items:center;background:var(--surface,#fffefa);border:1px solid var(--line,#d6dfce);border-radius:22px;padding:clamp(18px,4vw,40px);margin:18px 0 30px;max-width:100%;min-width:0}
.preparation-banner img{display:block;width:100%;height:auto;max-width:280px;margin-inline:auto}
.preparation-banner h2{font:650 clamp(26px,3vw,40px)/1.2 var(--sans);color:var(--ink);margin:0 0 10px}
.preparation-banner p{font-size:16px;line-height:1.6;color:var(--body);margin:0 0 16px}
.preparation-banner .button{white-space:normal;max-width:100%}
@media(max-width:640px){.preparation-banner{grid-template-columns:minmax(0,1fr);text-align:center;gap:12px}.preparation-banner img{max-width:210px}.preparation-banner h2{font-size:26px}}
@media print{.preparation-banner{break-inside:avoid}.preparation-banner .button{display:none}}
html[data-reading-motion=true] a::after{animation:none!important}

.mobile-quick-nav{display:none}
@media(max-width:680px){.mobile-quick-nav{display:flex;position:sticky;bottom:0;z-index:30;justify-content:space-around;align-items:center;padding:5px 8px max(5px,env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -3px 18px #163d3210}.mobile-quick-nav a{display:grid;place-items:center;gap:2px;font-size:11px;min-height:48px;min-width:48px}.mobile-quick-nav .icon{width:20px;height:20px}.general-exams-page:has(.ka-editorial) .mobile-quick-nav,.exam-directory-page:has([data-paper-exam]) .mobile-quick-nav,.exam-directory-page:has([data-csir-pace]) .mobile-quick-nav{display:none}.home-page .hub-home-intro{padding-block:22px}.home-page .hub-home-heading h1{font-size:clamp(31px,8vw,45px)}}
.workspace-reader,.workspace-dashboard,.workspace-home{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-block:16px 24px;min-width:0}
.workspace-reader{margin-inline:auto;width:calc(100% - 32px)}
.workspace-reader progress{width:100%;height:8px;accent-color:#527a51;display:block;margin-top:12px}
.workspace-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.workspace-actions button,.workspace-actions a,.workspace-actions label,.workspace-links a{border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:var(--surface);min-height:44px;color:var(--ink);font-size:14px;overflow-wrap:anywhere}
.workspace-actions button[aria-pressed=true]{background:#d8e9cd;color:#163d32}
.workspace-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:10px;margin:10px 0 18px}
.workspace-dashboard h2,.workspace-home h2{font-size:21px;margin:8px 0}.workspace-actions input{max-width:100%}
@media print{.workspace-reader,.mobile-quick-nav,.workspace-actions,.site-header,.site-footer{display:none!important}}

/* Keep oversized Kannada tables scrollable inside their own wrappers. */
@media(max-width:520px){.ka-editorial .ge-table{width:100%;contain:inline-size}.ka-editorial .ge-table table{min-width:0;width:100%;table-layout:fixed}.ka-editorial .ge-table :is(th,td){overflow-wrap:anywhere;word-break:normal;padding:8px 5px}.ka-editorial .ge-table th{font-size:12px}.ka-editorial .ge-table td{font-size:14px}.ka-editorial .ge-study-section{min-width:0}.workspace-actions>*{min-width:0;max-width:100%}}

.workspace-prefs{margin-top:10px}.workspace-prefs summary{font-size:14px;cursor:pointer}.workspace-prefs:not([open]){display:none}.workspace-prefs .reading-controls{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}

/* 320px: allow long Kannada glyph groups to wrap inside diagram labels. */
@media(max-width:520px){.ka-editorial .ka-equations{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ka-editorial .ka-equations>*{min-width:0;overflow-wrap:anywhere}.ka-editorial .ka-stat>*{min-width:0;max-width:100%;overflow-wrap:anywhere}.ka-editorial .ge-study-section h2>*{min-width:0;overflow-wrap:anywhere}.ka-editorial .ka-position-row span{min-width:0;padding:4px 0;font-size:clamp(18px,6vw,25px)!important}.ka-editorial .ka-row>strong,.ka-editorial .ka-duration small,.ka-editorial .ka-duration strong{min-width:0;overflow-wrap:anywhere}.ka-editorial .ge-option>span,.ka-editorial .ge-toc a>span{min-width:0;overflow-wrap:anywhere}.ka-editorial .ge-lesson :is(.ka-branches,.ka-subbranches,.ka-stat,.ka-chart,.ka-positions,.ka-pair,.ka-tree,.ka-equations){max-width:100%;min-width:0}.ka-editorial .ge-lesson [lang=kn]{overflow-wrap:anywhere}}

/* Prevent long award records and other Kannada lesson tables from widening the page. */
@media(max-width:680px){.ge-portal .ge-study,.ge-portal .ge-lesson,.ge-portal .ge-study-section{min-width:0;max-width:100%;overflow-wrap:anywhere}.ge-portal .ge-table{display:block;width:100%;max-width:100%;min-width:0;contain:inline-size;overflow-x:auto}.ge-portal .ge-table table{min-width:0;table-layout:fixed;width:100%}.ge-portal .ge-table :is(th,td){overflow-wrap:anywhere;word-break:normal;padding:8px 6px}.ge-portal .ge-lesson :is(figure,svg,.kg-visual,.kg-adjacent){max-width:100%;min-width:0}.ge-portal .kg-adjacent a{min-width:0;max-width:100%;overflow-wrap:anywhere}.ge-portal .ge-lesson :is(button,select,input,fieldset){min-width:0;max-width:100%}}

.quick-presets{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.quick-presets span{font-size:13px;color:var(--muted)}.quick-presets button{min-width:44px}.quick-presets button[aria-pressed=true]{border-color:#527a51;box-shadow:inset 0 0 0 1px #527a51}.practice-topic-summary{margin:18px 0;overflow-wrap:anywhere}.practice-topic-summary p{padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}.workspace-favourite{min-height:44px;border:1px solid var(--line);border-radius:9px;padding:8px 14px;background:var(--surface);color:var(--ink);margin:0 0 18px}.workspace-favourite[aria-pressed=true]{border-color:#91ae7d}.diagram-zoom-button{min-height:44px;margin:8px 0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);padding:8px 12px}.diagram-dialog{width:min(96vw,1600px);height:min(94vh,1000px);max-width:96vw;max-height:94vh;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:12px;overflow:auto}.diagram-dialog::backdrop{background:#07140ed9}.diagram-dialog img{display:block;max-width:100%;max-height:80vh;margin:auto;object-fit:contain}.diagram-dialog button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);margin-bottom:10px}.diagram-dialog[data-zoom=true] img{max-width:none;max-height:none;width:150%;height:auto}.directory-grid[data-view=list]{grid-template-columns:minmax(0,1fr)}.directory-grid[data-view=list] .directory-card{min-height:0;display:grid;grid-template-columns:48px minmax(0,1fr);gap:5px 16px;padding:14px}.directory-grid[data-view=list] .directory-card>:is(.science-icon,.directory-icon,.ge-mark){grid-column:1;grid-row:1/5;align-self:center}.directory-grid[data-view=list] .directory-card>:not(.science-icon):not(.directory-icon):not(.ge-mark){grid-column:2}.directory-grid[data-view=list] .directory-card h3{font-size:18px}.directory-grid[data-view=list] .directory-card p{margin:0}.directory-view-control{display:flex;gap:8px;align-items:center;margin:10px 0}.directory-view-control button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}.directory-view-control button[aria-pressed=true]{border-color:#739965;box-shadow:inset 0 0 0 1px #739965}

.library-suggestions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}.library-suggestions p{width:100%;font-size:13px;color:var(--muted)}.library-suggestions a{display:inline-flex;align-items:center;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:var(--surface);color:var(--ink);overflow-wrap:anywhere;max-width:100%;display:inline-block}.open-library mark{background:#e7d89a;color:#233927;border-radius:2px}.open-library [data-library-results]{content-visibility:auto;contain-intrinsic-size:auto 500px}

/* Illustrated whole-card navigation. The original routes and accessible names remain intact. */
.card-illustration{display:block;width:108px;height:76px;max-width:100%;flex:none;pointer-events:none;margin-top:auto;margin-left:auto;align-self:flex-end}
.card-illustration svg{display:block;width:100%;height:100%;overflow:visible}
:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.up-exam-card,.gate-xl-card,.level-card,.ecology-section-card,.article-card)>.card-illustration{margin-top:2px;margin-bottom:-5px}
:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.gate-xl-card)>.card-illustration{position:absolute;top:12px;right:14px;margin:0;width:100px;height:70px}
:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.gate-xl-card):has(>.card-illustration){position:relative;isolation:isolate}
:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.gate-xl-card):has(>.card-illustration)>.eyebrow{padding-right:0}
:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.gate-xl-card):has(>.card-illustration)>:is(.directory-icon,.ge-mark,.hub-letter,.gate-xl-card-icon,.biology-pathway-symbol,svg.icon){margin-bottom:10px;min-height:44px}
:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.gate-xl-card):has(>.card-illustration)>h3:first-child{padding-top:67px}
.hub-quick-card:has(>.card-illustration),.hub-quick-card.home-practice-card:has(>.card-illustration){grid-template-columns:42px minmax(0,1fr) 72px;gap:10px}
.hub-quick-card>.card-illustration{width:72px;height:51px;margin:0}
.directory-grid[data-view=list] .directory-card>.card-illustration{position:static;grid-column:3;grid-row:1/span 3;width:76px;height:54px;margin:auto 0}
.directory-grid[data-view=list] .directory-card:has(>.card-illustration){grid-template-columns:48px minmax(0,1fr) 76px}
.directory-grid[data-view=list] .directory-card:has(>.card-illustration)>:is(.directory-icon,.ge-mark){margin-bottom:0}
.ge-focus-card{position:relative}
.ge-focus-main{display:flex;flex:1;flex-direction:column;gap:8px;min-width:0;color:inherit;text-decoration:none}
.ge-focus-main>.card-illustration{position:absolute;top:11px;right:12px;width:84px;height:60px;margin:0}
.ge-focus-main>.directory-icon{margin-bottom:9px}
.ge-focus-main::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit}
.ge-schedule-source{position:relative;z-index:3;display:grid;place-items:center;width:44px;height:44px;border-radius:12px;border:1px solid var(--line);color:var(--ink);background:var(--surface);align-self:flex-end}
.ge-schedule-source:focus-visible,.ge-focus-main:focus-visible{outline:3px solid #a0ae62;outline-offset:3px}
.ge-schedule-footnote{font-size:13px;color:var(--muted);margin:0 0 18px}
.directory-card:has(>.card-illustration)>.eyebrow:empty{display:none}
html[data-reading-dark=true] .card-illustration{filter:saturate(.85);opacity:.94}
@media(max-width:520px){:is(.directory-card,.hub-item,.up-subject-card,.up-unit-card,.gate-xl-card)>.card-illustration{width:84px;height:60px;right:10px;top:10px}.directory-grid[data-view=list] .directory-card:has(>.card-illustration){grid-template-columns:44px minmax(0,1fr) 55px;gap:5px 10px}.directory-grid[data-view=list] .directory-card>.card-illustration{width:55px;height:40px}.hub-quick-card:has(>.card-illustration),.hub-quick-card.home-practice-card:has(>.card-illustration){grid-template-columns:42px minmax(0,1fr) 58px}.hub-quick-card>.card-illustration{width:58px;height:42px}}
@media print{.card-illustration{display:none!important}}

/* Keep artwork clear of headings and preserve compact list columns. */
.directory-grid[data-view=list] .directory-card:has(>.card-illustration)>.card-illustration{grid-column:3!important;grid-row:1/span 4;align-self:center}
:is(.hub-item,.gate-xl-card):has(>.card-illustration)>:is(svg.icon,.gate-xl-card-icon){margin-bottom:20px}
.ge-category-card:has(>.card-illustration)>.ge-category-medallion{margin-bottom:8px}
.ge-focus-main>.directory-icon{width:52px;height:52px}
@media(max-width:420px){.directory-grid[data-view=list] .directory-card:has(>.card-illustration){grid-template-columns:44px minmax(0,1fr) 50px}.directory-grid[data-view=list] .directory-card>.card-illustration{width:50px;height:36px}}
