/* Main page: module cards with their levels. Uses the colour tokens and rem scaling from styles.css. */
.homepage .top{padding-top:.6rem;align-items:center}
.homepage .brand{font-size:1.5rem}
.homepage .brand>span{font-size:1.9rem}
.legend{display:flex;gap:.5rem;align-items:center}

.home-wrap{width:100%;max-width:78.7rem;margin:0 auto;padding:0 1.25rem 1.25rem}
.intro{color:var(--muted);margin:0 0 .5rem;font-size:1rem}
.modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;align-items:start}

.module{background:var(--surface);border-radius:.95rem;padding:1.1rem 1.1rem .9rem;display:flex;flex-direction:column}
.module.dim{opacity:.6}
.mhead{display:flex;gap:.8rem;align-items:flex-start;margin-bottom:.7rem}
.mnum{flex:none;width:2.2rem;height:2.2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--ink);color:var(--bg);font-weight:600}
.module h2{font-family:"MuseJazz Text","Comic Sans MS",cursive;font-weight:400;color:var(--brass);font-size:1.65rem;line-height:1.1;margin:.05rem 0 .25rem}
.mdesc{margin:0;color:var(--muted);font-size:.9rem;line-height:1.4}

.levels{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.3rem}
.level{display:flex;align-items:center;gap:.7rem;padding:.32rem .65rem;border:1px solid var(--line);border-radius:.6rem;
  background:var(--bg);color:inherit;text-decoration:none}
a.level{cursor:pointer;transition:border-color .15s,transform .15s}
a.level:hover{border-color:var(--brass);transform:translateX(2px)}
.level.soon{color:var(--muted);border-style:dashed;background:transparent}
.lnum{flex:none;font-size:.75rem;font-weight:600;color:var(--muted);width:1.5rem}
.ltext{flex:1;display:flex;flex-direction:column;min-width:0}
.ltext b{font-weight:600;font-size:.92rem}
.ltext small{font-size:.78rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.level.soon .ltext b{font-weight:500}

/* Free / Premium badges: not shown during development. To label a level, add inside it
   <span class="badge free">Free</span>  or  <span class="badge pro">Premium</span> */
.badge{flex:none;display:inline-flex;align-items:center;gap:.25rem;font-size:.7rem;font-weight:600;letter-spacing:.02em;
  padding:.12rem .5rem;border-radius:999px;border:1px solid currentColor;white-space:nowrap}
.badge.free{color:var(--good)}
.badge.pro{color:var(--brass)}
.badge svg{width:.75rem;height:.75rem;fill:currentColor}

.mfoot{margin:.8rem 0 0;font-size:.82rem;color:var(--muted);text-align:center}
.mfoot.go{display:block;color:var(--brass);font-weight:600;text-decoration:none}
.mfoot.go:hover{text-decoration:underline}

@media (max-width:820px){
  .modules{grid-template-columns:1fr}
}

/* the three sections: Theory · Practising · Ear Training, chosen like tabs */
.sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:.7rem}
.section{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;text-align:start;cursor:pointer;
  background:var(--surface);border:1.5px solid var(--line);border-radius:.95rem;padding:.45rem 1.1rem .5rem;transition:border-color .15s}
.section:hover{border-color:var(--brass)}
.section[aria-selected="true"]{border-color:var(--brass)}   /* no thick bottom line: all five boxes look the same size (teacher) */
.sname{font-family:"MuseJazz Text","Comic Sans MS",cursive;color:var(--brass);font-size:1.6rem;line-height:1.1;-webkit-text-stroke:.03em var(--brass)}
.section[aria-selected="false"] .sname{color:var(--muted);-webkit-text-stroke:.03em var(--muted)}
.sdesc{font-size:.92rem}
.scount{font-size:.78rem;color:var(--muted)}
.module.dim h2{color:var(--muted)}
.mfoot a{color:var(--brass);font-weight:600;text-decoration:none}
.mfoot a:hover{text-decoration:underline}
@media (max-width:820px){.sections{grid-template-columns:1fr}}
/* the Theory section has four modules side by side */
.modules.four{grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem}
.modules.four .module{padding:1rem .9rem .8rem}
.modules.four .module h2{font-size:1.45rem}
@media (max-width:820px){.modules.four{grid-template-columns:1fr}}
.modules.four .module h2{font-size:1.3rem;white-space:nowrap}
.modules.four .mdesc{font-size:.8rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.modules.four .ltext b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.86rem}
.modules.four .level{padding:.26rem .5rem;gap:.5rem}
.modules.four .mhead{gap:.6rem;margin-bottom:.55rem}
.modules.four .mnum{width:1.9rem;height:1.9rem}
/* five theory modules side by side: the same compact cards as .four, five columns */
.modules.five{grid-template-columns:repeat(5,minmax(0,1fr));gap:.6rem}
.modules.five .module{padding:.9rem .7rem .7rem}
.modules.five .module h2{font-size:1.15rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modules.five .mdesc{font-size:.76rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.modules.five .ltext b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.8rem}
.modules.five .ltext small{font-size:.68rem}
.modules.five .level{padding:.24rem .4rem;gap:.4rem}
.modules.five .lnum{width:1.25rem;font-size:.7rem}
.modules.five .mhead{gap:.5rem;margin-bottom:.5rem}
.modules.five .mnum{width:1.7rem;height:1.7rem;font-size:.85rem}
.modules.five .mfoot{font-size:.74rem}
@media (max-width:820px){.modules.five{grid-template-columns:1fr}}
/* four sections in a row; a section with two modules keeps the same card size, centred */
.sections{grid-template-columns:repeat(4,minmax(0,1fr))}
.modules.two{grid-template-columns:repeat(2,minmax(0,1fr));width:calc((200% - 1rem) / 3);margin:0 auto}
@media (max-width:820px){.sections,.modules.two{grid-template-columns:1fr}.modules.two{width:auto}}
/* five sections in a row (Lines & Phrasing added between Practising and Ear Training) */
.sections{grid-template-columns:repeat(5,minmax(0,1fr));gap:.7rem}
@media (max-width:820px){.sections{grid-template-columns:1fr}}
/* a section with a single module: one card, centred, the same width as in a three-module section */
.modules.one{grid-template-columns:minmax(0,1fr);width:calc((100% - 2rem) / 3);margin:0 auto}
@media (max-width:820px){.modules.one{width:auto}}

/* header (2026-10-04): the logo on the left, JazzSync with "Think. Hear. Play." under it, the intro line on the right */
.homepage .top{align-items:center;padding-bottom:.6rem}
.homepage .brand{display:flex;align-items:center;gap:.6rem;line-height:1.05}
.homepage .brand .logo{height:3.1rem;margin:0;vertical-align:0}
.homepage .bname{display:flex;flex-direction:column}
.homepage .brand .tagline{margin:.2rem 0 0;font-size:.62em}
.homepage .top .intro{margin:0 0 0 1rem;text-align:right;max-width:34rem;line-height:1.4}

/* ---- Library (2026-10-05): the JazzSync Piano Method, six covers on one shelf ---- */
.librarypage .brand{color:inherit;text-decoration:none}
.lib{display:flex;flex-direction:column}
.libhead{text-align:center;position:relative;margin:.2rem 0 1rem}
.libhead h1{font-family:"MuseJazz Text","Comic Sans MS",cursive;font-weight:400;color:var(--brass);font-size:2.1rem;margin:0;-webkit-text-stroke:.03em var(--brass)}
.libsub{margin:.1rem 0 0;color:var(--muted);font-style:italic}
.libback{position:absolute;left:0;top:.6rem;color:var(--muted);text-decoration:none;font-size:.9rem}
.libback:hover{color:var(--ink)}
.shelf{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1.1rem}
.book{display:flex;flex-direction:column;gap:.55rem}
.book .cover{display:block;aspect-ratio:210/297;border-radius:.35rem;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.18);border:1px solid var(--line);transition:transform .15s,box-shadow .15s;background:#fff}
.book .cover:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(0,0,0,.25)}
.book .cover img{width:100%;height:100%;object-fit:cover;display:block}
.bmeta{display:flex;flex-direction:column;gap:.1rem;font-size:.85rem;line-height:1.3}
.bsec{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.bmeta b{font-size:.95rem}
.bmeta small{color:var(--muted);font-size:.75rem}
.bact{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:.3rem;font-size:.8rem}
.bact a{color:var(--brass);text-decoration:none;font-weight:600}
.bact a:hover{text-decoration:underline}
.libfoot{margin-top:auto;padding-top:1rem;text-align:center;color:var(--muted);font-size:.75rem}
@media (max-width:1100px){.shelf{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:620px){.shelf{grid-template-columns:repeat(2,minmax(0,1fr))}.libback{position:static;display:block;margin-bottom:.4rem}}
/* the small links to the Library: main page header and module cards */
.homepage .headright{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem}
.homepage .headright .intro{margin:0;max-width:none}
.liblink{font-size:.85rem;font-weight:600;color:var(--brass);text-decoration:none;white-space:nowrap}
.liblink:hover{text-decoration:underline}
.mfoot .readlink{color:var(--brass);text-decoration:none;white-space:nowrap}
.mfoot .readlink:hover{text-decoration:underline}

/* footer (2026-10-05): the Library link moved from the header to a quiet line at the bottom */
.homepage .home-wrap{padding-bottom:.35rem}
.sitefoot{display:flex;justify-content:center;align-items:baseline;flex-wrap:wrap;gap:.35rem 1.2rem;margin:.55rem 0 0;padding:.4rem 0 0;border-top:1px solid var(--line);font-size:.8rem;color:var(--muted)}
.sitefoot .liblink{font-size:.85rem}
.sitefoot small{font-size:.72rem;opacity:.8}
.homepage .top{padding-bottom:.45rem}
.homepage .sections{margin-bottom:.55rem}
.sitefoot{margin-top:.4rem;padding-top:.3rem}
