/* Shared A1–B2 route shell: readable desktop header and compact mobile version. */
:root{--shell-blue:#1769ff;--shell-ink:#102a4c;--shell-muted:#61738d;--shell-line:#d9e4f3;--shell-bg:#f6f8fc}
body{background:var(--shell-bg);color:var(--shell-ink)}
.header{position:sticky;top:0;z-index:80;display:grid;grid-template-columns:auto minmax(260px,620px) auto;gap:24px;align-items:center;min-height:82px;padding:14px clamp(18px,4vw,58px);background:#fff!important;color:var(--shell-ink)!important;border-bottom:1px solid var(--shell-line);box-shadow:0 1px 12px rgb(21 47 87 / 5%)}
.logo{display:inline-flex;align-items:center;gap:11px;color:var(--shell-ink)!important;text-decoration:none;font-weight:800;line-height:1}
.logo-image{display:block;width:46px;height:46px;object-fit:contain;border-radius:10px;filter:drop-shadow(0 4px 7px rgb(18 38 70 / 16%))}
.logo-word{font-size:26px;line-height:1;color:var(--shell-ink);white-space:nowrap}
.site-search{position:relative;width:100%}.site-search input{width:100%;min-height:48px;padding:0 17px 0 44px;border:1px solid var(--shell-line);border-radius:14px;background:#f7faff;color:var(--shell-ink);font:inherit;font-size:16px;outline:none}.site-search::before{content:"⌕";position:absolute;z-index:1;left:15px;top:7px;color:#647793;font-size:28px;line-height:1}.site-search input:focus{border-color:var(--shell-blue);box-shadow:0 0 0 3px rgb(23 105 255 / 12%)}.site-search-results{position:absolute;top:calc(100% + 8px);left:0;right:0;padding:7px;border:1px solid var(--shell-line);border-radius:14px;background:#fff;box-shadow:0 14px 34px rgb(20 48 92 / 15%)}.site-search-result{display:block;width:100%;padding:11px 12px;border:0;border-radius:10px;background:transparent;color:var(--shell-ink);text-align:left;font:inherit}.site-search-result:hover{background:#f0f6ff}.site-search-result small{display:block;margin-top:3px;color:var(--shell-muted)}.site-search-empty{padding:12px;color:var(--shell-muted);font-size:.92rem}.header-actions{display:flex;align-items:center;gap:14px}.language-selector select{border:0;background:transparent;color:var(--shell-ink);font:inherit;font-weight:650;padding:8px}.header-login{min-height:46px;padding:10px 18px;border:1px solid var(--shell-blue);border-radius:12px;background:#fff;color:var(--shell-blue);font-weight:750}.header-login:hover{background:#eff6ff}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.platform-main{padding-top:30px}.platform-sidebar{background:#fff}.platform-home,.legacy-workspace{max-width:1120px}.home-welcome{border-radius:22px}.home-path-card{border-radius:16px}.home-path-card:first-child{border-color:#bfd4f3;background:#f7fbff}.home-path-card:last-child{border-color:#d5e5fa;background:#fff}.a1-route{max-width:1100px}.grammar-header{padding:4px 0 18px;border-bottom:1px solid var(--shell-line)}.grammar-kicker{font-weight:800;color:var(--shell-blue)}.a1-route-summary,.a1-flow{display:none}.a1-module{background:#fff}.a1-module-head>span{background:#edf5ff;color:#1656aa}.a1-topic-card{min-height:138px}.a1-topic-card small{color:var(--shell-blue);font-weight:700}
@media(max-width:850px){.header{grid-template-columns:auto 1fr auto;gap:12px;min-height:70px;padding:10px 16px}.logo-image{width:40px;height:40px;border-radius:9px}.logo-word{display:none}.header-login{display:none}.site-search input{min-height:42px;font-size:15px;padding-left:39px}.site-search::before{left:13px;top:7px;font-size:24px}.platform-main{padding-top:20px}.platform-sidebar{padding-top:8px}.platform-nav-button{font-size:13px}}
@media(max-width:560px){.header{grid-template-columns:auto minmax(0,1fr) auto;gap:8px;padding:9px 10px}.language-selector select{max-width:94px;padding:7px 2px;font-size:13px}.site-search-results{position:fixed;top:64px;left:10px;right:10px}.logo-image{width:36px;height:36px}.platform-main{padding:14px 10px 26px}.grammar-header{display:block}.grammar-header>#a1RouteBack{margin-top:12px}.a1-module{padding:14px}.a1-topic-card{min-height:120px}}

/* Keep global navigation focused: detailed subject entry stays in the route, not duplicated in the sidebar. */
.platform-nav-group,.platform-sidebar-foot{display:none}.platform-nav>.platform-nav-button:nth-child(4){display:none}.platform-sidebar{width:220px;padding:18px 12px}.platform-shell{grid-template-columns:220px minmax(0,1fr)}footer{margin-left:220px}.platform-nav{gap:7px}.platform-nav-button{min-height:44px;border-radius:12px;padding:10px 12px}.platform-nav-button.active{background:#eaf2ff;color:var(--shell-blue)}
@media(max-width:850px){.platform-shell{grid-template-columns:1fr}.platform-sidebar{width:auto;padding:8px 12px}.platform-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.platform-nav-button{justify-content:center;min-height:40px;padding:8px;font-size:0}.platform-nav-button span:first-child{font-size:17px}.platform-nav-button span:last-child{display:none}footer{margin-left:0}}

/* Compact home: keep the complete introduction and all entry points visible.
   Content remains in normal flow so small screens and text zoom can still scroll. */
html[data-learning-mode="home"] body{display:flex;flex-direction:column;min-height:100dvh}
html[data-learning-mode="home"] main{padding:0;flex:1}
html[data-learning-mode="home"] .header{min-height:64px;padding-block:8px;gap:18px}
html[data-learning-mode="home"] .logo-image{width:38px;height:38px}
html[data-learning-mode="home"] .logo-word{font-size:22px}
html[data-learning-mode="home"] .site-search input{min-height:40px;font-size:14px}
html[data-learning-mode="home"] .site-search::before{top:5px;font-size:26px}
html[data-learning-mode="home"] .header-login{min-height:38px;padding:8px 12px;font-size:14px}
html[data-learning-mode="home"] .language-selector select{font-size:14px}
html[data-learning-mode="home"] .platform-shell{min-height:calc(100dvh - 92px)}
html[data-learning-mode="home"] .platform-sidebar{position:relative;top:auto;height:auto;padding:12px}
html[data-learning-mode="home"] .platform-main{padding:14px 20px}
html[data-learning-mode="home"] .platform-home{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px 18px;max-width:1200px}
html[data-learning-mode="home"] .home-welcome{grid-column:1/-1;padding:16px 20px;border-radius:16px}
html[data-learning-mode="home"] .home-eyebrow{font-size:10px}
html[data-learning-mode="home"] .home-welcome h1{font-size:clamp(22px,2vw,28px);line-height:1.15;margin:6px 0 8px}
html[data-learning-mode="home"] .home-lead{max-width:none;font-size:13px;line-height:1.4;margin:0}
html[data-learning-mode="home"] .home-paths{gap:12px;margin-top:12px}
html[data-learning-mode="home"] .home-path-card{display:flex;flex-direction:column;align-items:flex-start;padding:12px 14px;border-radius:12px}
html[data-learning-mode="home"] .home-path-card h2{font-size:16px;line-height:1.2;margin:0 0 5px}
html[data-learning-mode="home"] .home-path-card p{font-size:12px;line-height:1.4;min-height:0;margin:0 0 8px}
html[data-learning-mode="home"] .home-path-card button{margin-top:auto;padding:8px 12px;font-size:12px;min-height:34px}
html[data-learning-mode="home"] .home-section{margin-top:0;min-width:0}
html[data-learning-mode="home"] .home-section-head{margin-bottom:8px}
html[data-learning-mode="home"] .home-section-head h2{font-size:16px;line-height:1.2;margin:0 0 4px}
html[data-learning-mode="home"] .home-section-head p{font-size:12px;line-height:1.3;margin:0}
html[data-learning-mode="home"] .home-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
html[data-learning-mode="home"] .home-quick-card{min-height:74px;padding:9px 10px;border-radius:10px}
html[data-learning-mode="home"] .home-quick-card span{font-size:18px;margin-bottom:4px}
html[data-learning-mode="home"] .home-quick-card strong{font-size:12px;line-height:1.25;overflow-wrap:anywhere}
html[data-learning-mode="home"] .home-quick-card small{font-size:10px;line-height:1.25;margin-top:3px}
html[data-learning-mode="home"] .home-method{justify-content:flex-start;gap:6px;padding:12px;font-size:11px;line-height:1.5;border-radius:10px}
html[data-learning-mode="home"] footer{padding:7px 12px;font-size:11px;line-height:14px}
@media(max-width:1100px){
  html[data-learning-mode="home"] .platform-shell{grid-template-columns:180px minmax(0,1fr)}
  html[data-learning-mode="home"] .platform-sidebar{width:180px}
  html[data-learning-mode="home"] .platform-home{grid-template-columns:1fr}
  html[data-learning-mode="home"] footer{margin-left:180px}
}
@media(max-width:850px){
  html[data-learning-mode="home"] .header{gap:10px}
  html[data-learning-mode="home"] .platform-shell{grid-template-columns:1fr;min-height:0}
  html[data-learning-mode="home"] .platform-sidebar{width:auto;padding:6px 10px}
  html[data-learning-mode="home"] .platform-main{padding:10px 12px}
  html[data-learning-mode="home"] .home-welcome{padding:14px}
  html[data-learning-mode="home"] footer{margin-left:0}
}
@media(max-width:560px){
  html[data-learning-mode="home"] .header{gap:8px}
  html[data-learning-mode="home"] .language-selector select{font-size:13px}
  html[data-learning-mode="home"] .site-search input{font-size:14px}
  html[data-learning-mode="home"] .home-welcome h1{font-size:22px}
  html[data-learning-mode="home"] .home-paths{grid-template-columns:1fr;gap:8px}
  html[data-learning-mode="home"] .home-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-learning-mode="home"] .home-path-card p{font-size:13px}
  html[data-learning-mode="home"] .home-quick-card small{font-size:11px}
}

/* Spanish home palettes. These tokens never recolor lesson feedback. */
html[data-home-palette="sol"]{--home-accent:#b82430;--home-hover:#951b27;--home-gold:#f4c34b;--home-soft:#fff4df;--home-line:#ead6bd;--home-bg:#fcf8f2;--home-ink:#35252a;--home-muted:#6f6267}
html[data-home-palette="mar"]{--home-accent:#1762ad;--home-hover:#124e8c;--home-gold:#eda743;--home-soft:#edf6fc;--home-line:#c9dfe9;--home-bg:#f5fafc;--home-ink:#16364c;--home-muted:#526c7c}
html[data-home-palette="tierra"]{--home-accent:#a3452e;--home-hover:#833623;--home-gold:#c2a34c;--home-soft:#f8eee4;--home-line:#e5d2be;--home-bg:#fbf7f1;--home-ink:#3d3029;--home-muted:#716459}
html[data-learning-mode="home"] body{background:var(--home-bg);color:var(--home-ink)}
html[data-learning-mode="home"] .home-welcome{position:relative;border-color:var(--home-line);background:radial-gradient(ellipse at 100% 0%,var(--home-soft),transparent 52%),#fff;box-shadow:0 6px 20px rgb(89 55 29 / 5%)}
html[data-learning-mode="home"] .home-welcome::before{content:"";position:absolute;inset:0 0 auto;height:4px;border-radius:16px 16px 0 0;background:linear-gradient(90deg,#b82430 0 25%,#f4c34b 25% 75%,#b82430 75%)}
html[data-learning-mode="home"] .home-eyebrow{color:var(--home-accent)}
html[data-learning-mode="home"] .home-lead,
html[data-learning-mode="home"] .home-path-card p,
html[data-learning-mode="home"] .home-section-head p,
html[data-learning-mode="home"] .home-quick-card small{color:var(--home-muted)}
html[data-learning-mode="home"] .home-path-card:first-child{background:var(--home-soft);border-color:var(--home-line)}
html[data-learning-mode="home"] .home-path-card:last-child{background:#fff;border-color:var(--home-line)}
html[data-learning-mode="home"] .home-path-card button{background:var(--home-accent);transition:background .16s ease,box-shadow .16s ease}
html[data-learning-mode="home"] .home-path-card button:hover{background:var(--home-hover);box-shadow:0 3px 8px rgb(89 55 29 / 13%)}
html[data-learning-mode="home"] .platform-nav-button.active{background:var(--home-soft);color:var(--home-accent)}
html[data-learning-mode="home"] .platform-nav-button:hover{background:var(--home-soft);color:var(--home-accent)}
html[data-learning-mode="home"] .header-login{border-color:var(--home-accent);color:var(--home-accent)}
html[data-learning-mode="home"] .header-login:hover{background:var(--home-soft)}
html[data-learning-mode="home"] .home-quick-card{border-color:var(--home-line);border-top:3px solid var(--home-gold);color:var(--home-ink);transition:background .16s ease,border-color .16s ease}
html[data-learning-mode="home"] .home-quick-card:hover{background:var(--home-soft);border-color:var(--home-accent)}
html[data-learning-mode="home"] .home-method{border-color:var(--home-line);background:var(--home-soft);color:var(--home-ink)}
html[data-learning-mode="home"] .home-method i{color:var(--home-accent)}
html[data-learning-mode="home"] .home-path-card button:focus-visible,
html[data-learning-mode="home"] .home-quick-card:focus-visible,
.home-palette-picker button:focus-visible{outline:2px solid var(--home-accent);outline-offset:3px}
.home-topline{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.home-palette-picker{display:flex;gap:4px;flex-wrap:wrap}
.home-palette-picker[hidden]{display:none}
.home-palette-picker button{display:inline-flex;align-items:center;gap:5px;padding:3px 6px;border:1px solid transparent;border-radius:6px;background:#fff;color:#514b4b;font-size:10px;line-height:14px}
.home-palette-picker button[aria-pressed="true"]{border-color:var(--home-accent);color:var(--home-accent)}
.palette-swatch{width:13px;height:13px;border-radius:50%;border:1px solid rgb(0 0 0 / 8%)}
.palette-sol{background:linear-gradient(90deg,#b82430 50%,#f4c34b 50%)}
.palette-mar{background:linear-gradient(90deg,#1762ad 50%,#eda743 50%)}
.palette-tierra{background:linear-gradient(90deg,#a3452e 50%,#c2a34c 50%)}
@media(prefers-reduced-motion:reduce){
  html[data-learning-mode="home"] button{transition:none}
}

/* Illustration fits within the existing welcome block, above the path cards. */
html[data-learning-mode="home"] .home-spanish-vignette{position:absolute;right:20px;top:18px;width:clamp(170px,19vw,240px);height:150px;object-fit:contain;pointer-events:none}
html[data-learning-mode="home"] .home-topline,
html[data-learning-mode="home"] .home-welcome h1,
html[data-learning-mode="home"] .home-lead{margin-right:260px}
html[data-learning-mode="home"] .home-topline{min-height:20px}
html[data-learning-mode="home"] .home-paths{position:relative}
@media(max-width:1100px){
  html[data-learning-mode="home"] .home-spanish-vignette{width:165px;height:125px;right:14px}
  html[data-learning-mode="home"] .home-topline,
  html[data-learning-mode="home"] .home-welcome h1,
  html[data-learning-mode="home"] .home-lead{margin-right:175px}
}
@media(max-width:650px){
  html[data-learning-mode="home"] .home-spanish-vignette{width:76px;height:45px;right:12px;top:10px}
  html[data-learning-mode="home"] .home-topline{margin-right:82px;min-height:32px}
  html[data-learning-mode="home"] .home-welcome h1,
  html[data-learning-mode="home"] .home-lead{margin-right:0}
}
