/* EmbeddexAI design standards (see DESIGN_STANDARDS.md). Loaded LAST on every page to normalise all page types. */
:root{--r-sm:10px;--r-md:16px;--r-lg:20px}

/* ---------- Hero ---------- */
:is(.ph-band,.hero-band,.ls-hero,.md-hero,.lv-hero,.ab-hero) h1{font-size:clamp(2.3rem,3.6vw,3.25rem)!important;line-height:1.12!important;letter-spacing:-.03em!important;font-weight:700!important;max-width:20ch}
:is(.ph-band,.ls-hero,.md-hero,.lv-hero,.ab-hero){padding-top:28px!important;padding-bottom:56px!important}
:is(.ph-band,.ls-hero,.md-hero,.lv-hero,.ab-hero) .lead,.ls-lead,.md-lead,.lv-lead{font-size:1.08rem!important;line-height:1.6!important;max-width:60ch}
:is(.ph-band,.hero-band,.ls-hero,.md-hero,.lv-hero,.ab-hero) .label,:is(.ls-kicker,.md-layer,.ph-band .status){font-size:.85rem!important;font-weight:700!important;color:#B49CFF!important;margin-bottom:10px;display:inline-block}
.ph-band img,.ph-band .ph-img{max-height:360px;border-radius:var(--r-lg)!important}
.ph-band .ph-split{gap:48px!important}

/* ---------- Section headings ---------- */
main h2:not(:is(.ph-band,.hero-band,.ls-hero,.md-hero,.lv-hero,.ab-hero,aside,.rm-drawer,.lv-tabs,.ls-check,.ls-goals,.ls-sec-head,.tt-empty,.bootseq-card,.newsletter,.ls-end,.ab-mission,.rm-phase-head,.mp-phase,dialog) h2){font-size:2rem!important;line-height:1.2!important;letter-spacing:-.025em}
.ls-sec-head h2{font-size:1.7rem!important}
main .label{font-size:.85rem!important;font-weight:700!important;color:var(--violet)!important}
main h3{letter-spacing:-.015em}
:is(.track-card,.career-card,.lab-card,.lv-track,.lv-mod,.module-tile,.md-sess,.tt-ch,.project-card,.book-card,.exercise-card) h3{font-size:1.15rem!important}

/* ---------- Shape ---------- */
.button,.small-button,input[type=search],input[type=text],input[type=email],select,textarea{border-radius:var(--r-sm)!important}
:is(.track-card,.career-card,.lab-card,.lv-track,.lv-mod,.lv-tut,.module-tile,.md-sess,.md-panel,.md-outcomes li,.tt-ch,.tt-progress,.exercise-card,.empty-state,.task,.setup,.progress-card,.callout,.diagram,.panel,.ab-skill,.ab-contact a,.rm-card,.ls-check,.ls-outline,.ls-next-card,.code-block,.lesson-video,.continue-panel,.path-panel,.filters,.lv-filters,.community-note,.contributor,.review-note,.lab-card--hub,article[class*=project],article[class*=book],[class*=book-tile],[class*=project-card]){border-radius:var(--r-md)!important}
:is(.newsletter,.ls-end,.ab-mission>div,.rm-phase-head,.bootseq-console,.board .board-svg,.stats-v2 .stats-inner){border-radius:var(--r-lg)!important}
:is(.chip,.lv-chips button,.rm-chip,.mp-topic,.md-tag,.tt-meta li,.ls-meta li,.md-chips li,.status-pill){border-radius:999px}

/* ---------- Depth: border at rest, shadow on hover ---------- */
:is(.track-card,.career-card,.lab-card,.lv-track,.lv-mod,.lv-tut,.module-tile,.md-sess,.tt-ch,.exercise-card,.ab-skill,.rm-card,[class*=project-card],article[class*=project]){box-shadow:none;transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
:is(.track-card,.career-card,.lab-card,.lv-track,.lv-mod,.lv-tut,.module-tile,.md-sess,.tt-ch,.exercise-card,.ab-skill,.rm-card,[class*=project-card],article[class*=project]):hover{transform:translateY(-3px);box-shadow:0 14px 32px rgb(0 40 120 / 12%);border-color:var(--primary)}

/* ---------- Filters: one style (rounded pills) ---------- */
.filters,.lv-filters{background:var(--surface)!important;border:1px solid var(--border)}
.filters select{border-radius:999px!important;padding-inline:16px!important;background-color:var(--bg)!important}
.filters label{font-weight:700;font-size:.82rem}

/* ---------- Spacing ---------- */
main>section:not(:is(.ph-band,.hero-band,.ls-hero,.md-hero,.lv-hero,.ab-hero,.bootseq)),main>.wrap>section{margin-block:72px}
@media(max-width:700px){
  main>section:not(:is(.ph-band,.hero-band,.ls-hero,.md-hero,.lv-hero,.ab-hero,.bootseq)),main>.wrap>section{margin-block:48px}
  main h2:not(:is(.ph-band,.hero-band,.ls-hero,.md-hero,.lv-hero,.ab-hero,aside,.rm-drawer,.ls-check,.ls-goals,.ls-sec-head,.bootseq-card) h2){font-size:1.6rem!important}
}

/* ---------- Links: underline only inside running text ---------- */
:is(nav,.card,.button,.text-link,.track-card,.career-card,.lab-card,.module-tile,.md-sess,.tt-ch,.lv-mod,.lv-track,.lv-tut,.breadcrumbs) a,.text-link,.breadcrumbs a{text-decoration:none!important}
:is(.reading,.prose) p a{text-decoration:underline;text-underline-offset:3px}
.bootseq-card,.tr-node{border-radius:var(--r-md)!important}
.tr-col{border-radius:var(--r-lg)!important}
.track-hero img,.ph-band .track-hero img{max-height:360px!important;aspect-ratio:3/2;object-fit:cover}
.ph-band .track-hero{align-items:center}

/* Projects: card grid like module/track cards (16:9 cover, body below) */
#project-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
.project-card{display:flex;flex-direction:column;overflow:hidden;background:var(--surface);border:1px solid var(--border)}
.project-card .project-cover{width:100%;aspect-ratio:16/9;height:auto;object-fit:cover;border-radius:0!important;max-height:none}
.project-card .project-body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
.project-card h3{margin:0}

/* Books: compact brand cover instead of tall empty tiles */
.book-tile{aspect-ratio:16/10!important;border-radius:0!important;border:0!important;background:radial-gradient(260px 160px at 85% 0%,rgb(47 123 255 / 40%),transparent 60%),linear-gradient(150deg,#071430,#0F2A6B)!important;color:#fff;padding:20px!important}
.book-tile .book-title{color:#fff;font-size:1.05rem;font-weight:800;line-height:1.25}
.book-tile .book-author{color:#C7D3E8;font-size:.8rem;margin-top:6px;display:block}
.book-card{overflow:hidden}
/* track pilot progress readout sits in the hero: dark-surface version */
.ph-band .pilot-progress{margin-top:28px;padding:16px 20px;border-radius:var(--r-md);background:rgb(255 255 255 / 6%)!important;border:1px solid rgb(125 178 255 / 25%)!important;color:#C7D3E8}
.ph-band .pilot-progress h2{font-size:1rem!important;color:#fff!important;margin:0 0 4px}
.ph-band .pilot-progress p{color:#C7D3E8!important;margin:0 0 10px;font-size:.88rem}
.ph-band .pilot-progress progress{accent-color:#7DB2FF}
.task h2,.task-heading+h2,.lab-content .task h2{font-size:1.22rem!important;line-height:1.5!important;letter-spacing:-.01em!important}.progress-card h2,.completion h2{font-size:1.2rem!important}
/* home: nine equal tutorial cards, 3 per row */
#tutorial-rest{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
#tutorial-rest .track-card img{aspect-ratio:16/9!important}
@media(max-width:900px){#tutorial-rest{grid-template-columns:1fr 1fr}}
@media(max-width:560px){#tutorial-rest{grid-template-columns:1fr}}

/* Final, scoped lesson UX rules: do not let generic page/card rules flatten hierarchy. */
.ls-hero h1{max-width:28ch!important}
.ls-sec-head h2{font-size:1.7rem!important;line-height:1.25!important}
.ls-reading :is(.ls-end,.ls-glossary) h2{font-size:1.5rem!important;line-height:1.3!important}
.md-sess:hover{transform:none;box-shadow:none}
@media(max-width:700px){.ls-sec-head h2{font-size:1.35rem!important}.ls-hero{padding-bottom:32px!important}}
@media(prefers-reduced-motion:reduce){.md-sess,.ls-next-card{transition:none!important}}

/* Shared header controls. The field and its neighbours share height and corners. */
.header-tools{flex-shrink:0}
.header-tools :is(.search-trigger,.icon-button){box-sizing:border-box;height:40px;min-height:40px;border-radius:var(--r-sm)!important;background:transparent!important;white-space:nowrap;flex-shrink:0}
.header-tools .search-trigger{display:inline-flex;align-items:center;gap:10px;padding:0 12px;min-width:0;border:1px solid var(--border)!important;font-size:.8rem;line-height:1}
.header-tools .search-trigger>span{display:inline}
.header-tools .search-trigger kbd{display:inline-block;flex:none;font-size:11px;line-height:18px;padding:0 5px;white-space:nowrap}
.header-tools .icon-button{min-width:40px;padding:0 8px;border:1px solid transparent}
.header-tools .anim-toggle span{display:none}
.header-tools .theme-label{display:none}
.header-tools :is(.search-trigger,.icon-button):hover{background:var(--raised)!important;border-color:var(--primary)!important}
.header-tools :is(.search-trigger,.icon-button):focus-visible{outline:3px solid var(--primary);outline-offset:3px}
.search-dialog{box-sizing:border-box;width:min(680px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto}
.search-dialog input{box-sizing:border-box;min-width:0}
.search-dialog .utility{font-size:.8rem;line-height:1.6}
.search-result small{font-size:.78rem}
@media(max-width:1250px){
  .header-tools .search-trigger{width:40px;min-width:40px;padding:0;justify-content:center;border:1px solid transparent!important}
  .header-tools .search-trigger>span,.header-tools .search-trigger kbd{display:none}
  .header-tools .theme-label{display:none}
}
/* Owner decision 2026-11-15: search is icon only at every width, styled exactly like the neighbouring icon buttons.
   Ctrl+K / Cmd+K / "/" still open it; the accessible name stays on the button. */
.header-tools .search-trigger{width:40px;min-width:40px;padding:0;justify-content:center;gap:0;border:1px solid transparent!important;background:transparent!important}
.header-tools .search-trigger>span,.header-tools .search-trigger kbd{display:none!important}
.header-tools .search-trigger .icon{width:20px;height:20px;color:var(--text)}
.header-tools .search-trigger:hover .icon{color:var(--primary)}

/* Books: cover images, scoped to books.html. */
body[data-page="books"] .book-cover{display:block;box-sizing:border-box;width:140px;height:210px;aspect-ratio:2/3;max-width:100%;object-fit:cover;border:1px solid var(--border);border-radius:3px;box-shadow:0 4px 10px rgb(0 0 0 / 14%);background:var(--surface)}
body[data-page="books"] .book-cover[src$=".svg"]{object-fit:contain}
body[data-page="books"] .book-card>.book-cover{margin:24px auto 6px;flex:none}
body[data-page="books"] .recommendation{grid-template-columns:140px minmax(0,1fr)}
body[data-page="books"] .recommendation>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){
  body[data-page="books"] .recommendation{grid-template-columns:minmax(0,1fr);gap:18px}
  body[data-page="books"] .recommendation>.book-cover{justify-self:start}
}
