/* The learning home and subject pages (home.html). Laid out for school laptops first (a 1366 x 768 Chromebook, a MacBook),
   fine on a phone. Colours come from college.css, so the light and dark themes both work. A tile's picture always sits on the
   dark stage its frames were rendered against. */
.lh{--wrap:1240px;--stage:#0b0d10;background:var(--bg)}
.lh main,.lh-foot{width:100%;box-sizing:border-box;max-width:var(--wrap);margin:0 auto;padding:0 clamp(16px,3vw,40px)}   /* width: body is a flex column in college.css, so auto margins would shrink it */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.lh-logo{font-weight:800;font-size:20px;letter-spacing:-.01em;color:var(--ink);text-decoration:none;padding:6px 4px}.lh-logo span{color:var(--accent)}
.lh-continue{display:inline-flex;align-items:center;gap:8px;max-width:min(46vw,420px);font-weight:650}
.lh-continue b{font-weight:750;color:var(--link);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lh .topbar{grid-template-columns:auto minmax(0,1fr) auto}
@media (max-width:640px){.lh-continue .lab{display:none}.lh-continue::before{content:'Continue:';font-weight:650}.lh-continue{max-width:52vw}}
@media (max-width:420px){.lh-continue b{display:none}.lh-continue::before{content:'Continue'}.lh-logo{font-size:18px}}

/* 3D Featured Showcase on Home & 3D Spinning Models */
.lh-featured{padding:clamp(18px,3.5vh,36px) 0 clamp(24px,4vh,44px)}
.lh-feat-head{margin-bottom:clamp(16px,2.2vh,24px)}
.lh-feat-badge{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);padding:4px 11px;border-radius:999px;margin-bottom:8px}
.lh-feat-badge i{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
.lh-feat-head h2{font-size:clamp(28px,3.4vw,42px);font-weight:850;margin:0 0 8px;letter-spacing:-.025em;color:var(--ink);line-height:1.1}
.lh-feat-lead{font-size:clamp(15px,1.2vw,17.5px);color:var(--soft);margin:0;line-height:1.45;max-width:720px}

.lh-feat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(16px,1.8vw,26px)}
.lh-feat-card{display:flex;flex-direction:column;background:var(--bg-2);border:1px solid var(--line);border-radius:22px;overflow:hidden;color:var(--ink);text-decoration:none;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;position:relative}
.lh-feat-card:hover,.lh-feat-card:focus-visible{transform:translateY(-4px);border-color:var(--accent);box-shadow:0 18px 40px rgba(0,0,0,.28)}

/* 3D Stage (used in featured cards and subject cards) */
.lh-3d-stage{position:relative;width:100%;aspect-ratio:4/3;background:var(--stage,#0b0d10);overflow:hidden;border-bottom:1px solid var(--line);touch-action:pan-y}
.lh-3d-stage .lh-3d-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:var(--stage,#0b0d10);display:block;opacity:1;transition:opacity .45s ease;z-index:1;pointer-events:none}
.lh-3d-stage.ready .lh-3d-poster{opacity:0}
.lh-3d-stage .lh-3d-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;z-index:2;pointer-events:none}
.lh-3d-stage .lh-3d-touch{position:absolute;inset:0;z-index:3;cursor:grab;touch-action:pan-y}
.lh-3d-stage .lh-3d-touch:active{cursor:grabbing}
.lh-3d-badge{position:absolute;top:10px;left:10px;z-index:4;pointer-events:none;padding:3px 9px;border-radius:7px;background:rgba(11,13,16,.85);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.14);color:var(--accent);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.lh-3d-hint{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);z-index:4;pointer-events:none;display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:rgba(11,13,16,.82);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.12);color:#e2e2e6;font-size:11px;font-weight:650;letter-spacing:.02em;white-space:nowrap;transition:opacity .25s ease}
.lh-3d-stage:hover .lh-3d-hint{background:rgba(11,13,16,.92);color:#fff;border-color:color-mix(in srgb,var(--accent) 45%,transparent)}

.lh-feat-body{padding:18px 20px 22px;display:flex;flex-direction:column;flex:1}
.lh-feat-body h3{font-size:21px;font-weight:800;margin:0 0 6px;letter-spacing:-.015em;color:var(--ink)}
.lh-feat-body p{font-size:14px;color:var(--soft);line-height:1.45;margin:0 0 14px}
.lh-feat-specs{margin:0 0 16px;padding:0;list-style:none;display:flex;flex-direction:column;gap:5px;font-size:12.5px;color:var(--muted)}
.lh-feat-specs li{display:flex;align-items:center;gap:6px}
.lh-feat-specs li::before{content:"";width:4px;height:4px;border-radius:50%;background:var(--accent);flex:none}
.lh-feat-btn{margin-top:auto;display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:750;color:var(--link);text-decoration:none}
.lh-feat-card:hover .lh-feat-btn{color:var(--accent)}

@media (max-width:960px){
  .lh-feat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .lh-feat-grid{grid-template-columns:1fr;gap:16px}
  .lh-feat-body{padding:14px 16px 18px}
  .lh-feat-body h3{font-size:19px}
}

/* hero and search */
.lh-hero{text-align:center;padding:clamp(28px,5vh,56px) 0 clamp(18px,3vh,30px)}
.lh h1{font-size:clamp(34px,4.6vw,58px);line-height:1.04;letter-spacing:-.03em;margin:0 0 12px;font-weight:800;color:var(--ink)}
.lh h1 span{color:var(--accent)}
.lh-lead{font-size:clamp(16px,1.35vw,19px);color:var(--soft);margin:0 auto 22px;max-width:640px;line-height:1.45}
.lh-search{position:relative;max-width:720px;margin:0 auto;display:flex;align-items:center}
.lh-search svg{position:absolute;left:20px;color:var(--muted);pointer-events:none}
.lh-search input{width:100%;height:62px;border-radius:999px;border:1px solid var(--line);background:var(--bg-2);color:var(--ink);font:inherit;font-size:19px;padding:0 24px 0 56px;box-shadow:0 10px 30px rgba(0,0,0,.18);-webkit-appearance:none;appearance:none}
.lh-search input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 35%,transparent),0 10px 30px rgba(0,0,0,.18)}
.lh-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.lh-results{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:30;text-align:left;background:var(--bg-2);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow,0 20px 50px rgba(0,0,0,.4));padding:6px;max-height:min(62vh,520px);overflow:auto}
.lh-results a{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:12px;color:var(--ink);text-decoration:none}
.lh-results a[aria-selected=true],.lh-results a:hover{background:color-mix(in srgb,var(--accent) 14%,transparent)}
.lh-results img{width:56px;height:42px;object-fit:cover;border-radius:8px;background:var(--stage);flex:0 0 auto}
.lh-results b{display:block;font-weight:700}.lh-results small{display:block;color:var(--muted);font-size:13px}
.lh-results .sub{width:56px;height:42px;border-radius:8px;background:color-mix(in srgb,var(--accent) 22%,var(--stage));display:grid;place-items:center;font-weight:800;color:#fff;font-size:12px;flex:0 0 auto}
.lh-results p{margin:10px 12px;color:var(--muted)}
.lh-try{margin:14px 0 0;color:var(--muted);font-size:15px;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 10px}
.lh-try a{color:var(--link);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--link) 40%,transparent)}

/* the subject tiles: four across on a laptop */
.lh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:clamp(14px,1.6vw,22px);padding:6px 0 10px}
.lh-tile{display:flex;flex-direction:column;background:var(--bg-2);border:1px solid var(--line);border-radius:20px;overflow:hidden;color:var(--ink);text-decoration:none;transition:transform .15s,border-color .15s,box-shadow .15s}
.lh-tile:hover,.lh-tile:focus-visible{transform:translateY(-3px);border-color:var(--accent);box-shadow:0 14px 34px rgba(0,0,0,.25)}
.lh-stage{position:relative;aspect-ratio:4/3;background:var(--stage) center/auto 100% no-repeat;overflow:hidden}
.lh-stage img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:opacity .25s;z-index:1}
.lh-stage i.sp{position:absolute;inset:0;z-index:0;pointer-events:none;background:var(--stage) 0 0/auto 100% no-repeat}
.lh-stage.turning>img{opacity:0}
.lh-stage.turning i.sp.top{will-change:opacity,transform;transform:translateZ(0)}
.lh-tile .txt{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.lh-tile h3{margin:0;font-size:20px;letter-spacing:-.01em}
.lh-tile p{margin:0;color:var(--soft);font-size:14.5px;line-height:1.4}
.lh-tile .n{margin-top:auto;padding-top:6px;color:var(--link);font-weight:700;font-size:14px}

/* a subject page */
.lh-subjecthead{padding:clamp(22px,4vh,40px) 0 18px}
.lh-crumbs{display:flex;gap:8px;font-size:15px;color:var(--muted);margin-bottom:12px}.lh-crumbs a{color:var(--link);text-decoration:none}
.lh-subjecthead h1{text-align:left}.lh-subjecthead .lh-lead{margin:0 0 6px}
.lh-count{color:var(--muted);margin:0;font-weight:600}
.lh-models{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;padding:6px 0 10px}
.lh-card{display:flex;flex-direction:column;background:var(--bg-2);border:1px solid var(--line);border-radius:16px;overflow:hidden;color:var(--ink);text-decoration:none;transition:transform .15s,border-color .15s}
.lh-card:hover,.lh-card:focus-visible{transform:translateY(-2px);border-color:var(--accent)}
.lh-card img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;background:var(--stage);display:block}   /* height:auto, or its height="360" would win over the 4:3 */
.lh-card b{padding:11px 13px 2px;font-size:16.5px}
.lh-card span{padding:0 13px 13px;color:var(--muted);font-size:13.5px;line-height:1.35}
.lh-card em{margin:0 13px 12px;align-self:flex-start;font-style:normal;font-size:12px;font-weight:700;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 8px}
.lh-others{padding:26px 0 4px}.lh-others h2,.lh-ways h2{font-size:22px;margin:0 0 12px;letter-spacing:-.01em}
.lh-chips{display:flex;flex-wrap:wrap;gap:8px}
.lh-chips a{border:1px solid var(--line);border-radius:999px;padding:8px 14px;color:var(--ink);text-decoration:none;font-weight:600;background:var(--bg-2)}
.lh-chips a:hover{border-color:var(--accent)}

.lh-ways{padding:30px 0 10px}
.lh-waygrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.lh-waygrid a{display:block;padding:16px 18px;border:1px solid var(--line);border-radius:16px;color:var(--ink);text-decoration:none;background:var(--bg-2)}
.lh-waygrid a:hover{border-color:var(--accent)}.lh-waygrid b{display:block;font-size:17px;margin-bottom:4px}.lh-waygrid span{color:var(--soft);font-size:14.5px}
.lh-foot{padding:34px clamp(16px,3vw,40px) 40px;color:var(--muted);font-size:14px}
.lh-foot nav{display:flex;flex-wrap:wrap;gap:8px 18px;margin-bottom:10px}.lh-foot a{color:var(--soft);text-decoration:none}.lh-foot a:hover{color:var(--ink)}

@media (max-width:640px){
  .lh-sema{font-size:14px;gap:6px 10px}.lh-sema-text{text-align:center}
  .lh-search input{height:54px;font-size:17px}
  .lh-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .lh-tile h3{font-size:17px}.lh-tile p{display:none}.lh-tile .txt{padding:10px 12px 12px}
  .lh-models{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lh-card span{display:none}
}
@media (max-width:360px){.lh-grid,.lh-models{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.lh-tile,.lh-card,.lh-stage img,.lh-stage i.sp{transition:none}.lh-tile:hover,.lh-card:hover{transform:none}.lh-stage.turning i.sp.top{will-change:auto;transform:none}}
