/* GM-LIB-001 Stage 1: Learning Library entry pages. Existing design tokens only:
   cream (--gm-ivory), lilac (--gm-lavender), plum, restrained gold, line, paper.
   No new colours, fonts, images or scripts. */

/* Opening: a warm cream band, as on the home page hero */
.ll-band{background:var(--gm-ivory);border-bottom:1px solid var(--gm-line);padding:1.75rem 0 2rem}
.ll-opening{max-width:62rem;border-bottom:0;margin-bottom:0;padding-bottom:0}
.ll-opening h1{margin-bottom:.5rem}
.ll-standfirst{font-size:clamp(1.15rem,1.6vw,1.4rem);color:var(--gm-plum);font-style:italic;max-width:46rem;margin-top:0}
.ll-hero{margin:1.25rem 0 0}
.ll-hero img{display:block;width:100%;height:auto;aspect-ratio:2048/768;border-radius:var(--gm-radius);border:var(--gm-border);background:var(--gm-paper)}

/* Reading column */
.ll-article{padding-bottom:2rem}
.ll-prose{max-width:70ch}
.ll-prose p{line-height:1.65}
.ll-intro{padding-top:1.5rem;margin-bottom:.5rem}
.ll-section h2{margin-top:0}
.ll-section h2::after{content:"";display:block;width:3rem;height:3px;margin-top:.6rem;background:var(--gm-gold);border-radius:2px}

/* Takeaways: plum words, restrained gold rule */
.ll-emphasis{padding-left:.9rem;border-left:3px solid var(--gm-gold)}
.ll-emphasis strong{color:var(--gm-plum)}
.ll-callout{margin:1.25rem 0;padding:1rem 1.25rem;background:var(--gm-ivory);border-left:3px solid var(--gm-gold);border-radius:0 var(--gm-radius) var(--gm-radius) 0;font-size:clamp(1.15rem,1.6vw,1.35rem);color:var(--gm-plum);font-weight:bold}

/* Lilac: explanatory material, provider guidance and terminology */
.ll-section--lilac{background:var(--gm-lavender);border:var(--gm-border);border-radius:var(--gm-radius);padding:1.5rem;margin-block:1.5rem}
.gm-section.ll-section--lilac + .gm-section{border-top:0}
.ll-section--lilac .ll-prose{max-width:none}
.ll-section--lilac .ll-prose > p{max-width:70ch}
.ll-table-wrap{max-width:100%;margin:1.25rem 0}
.ll-providers{table-layout:auto;background:var(--gm-paper)}
.ll-providers th{white-space:nowrap;background:var(--gm-ivory);color:var(--gm-plum)}
.ll-providers th,.ll-providers td{overflow-wrap:normal;word-break:normal}
.ll-providers td:first-child,.ll-providers td:nth-child(2){font-weight:bold;color:var(--gm-plum);white-space:nowrap}
.ll-terms .ll-prose{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1rem}
.ll-terms .ll-prose > :not(.ll-term){grid-column:1/-1}
.ll-term{margin:0;padding:.9rem 1rem;background:var(--gm-paper);border:var(--gm-border);border-top:3px solid var(--gm-plum);border-radius:var(--gm-radius)}
.ll-term strong{color:var(--gm-plum)}
.ll-quotes{margin:1rem 0 1.25rem;display:grid;gap:.5rem;max-width:70ch}
.ll-quote{margin:0;padding:.6rem 1rem;border-left:3px solid var(--gm-gold);background:var(--gm-lavender);border-radius:0 var(--gm-radius) var(--gm-radius) 0}
.ll-quote p{margin:0;font-style:italic;color:var(--gm-plum)}

/* The practical prompt: established lilac prompt card, with a gold accent */
.ll-prompt{max-width:70ch;margin:1.25rem 0;border-left:3px solid var(--gm-gold)}
.ll-prompt textarea{width:100%;box-sizing:border-box;line-height:1.5;min-height:11rem;field-sizing:content}

/* Ways to use the website: cream cards */
.ll-route{margin:.6rem 0;padding:.75rem 1rem;background:var(--gm-ivory);border-left:3px solid var(--gm-gold);border-radius:0 var(--gm-radius) var(--gm-radius) 0}
.ll-route a{color:var(--gm-plum)}

/* Closing: cream finale leads into the plum navigation band */
.ll-finale{background:var(--gm-ivory);border:var(--gm-border);border-radius:var(--gm-radius);padding:1.5rem;margin-top:1.5rem}
.gm-section + .gm-section.ll-finale{border-top:var(--gm-border)}
.ll-finale .ll-callout{background:var(--gm-paper)}

/* Learning Library introduction */
.ll-library-prose{padding-top:1.5rem}
.ll-callout-soft{background:var(--gm-ivory);padding:.9rem 1rem;border-radius:0 var(--gm-radius) var(--gm-radius) 0}
.ll-closing-line{font-size:clamp(1.1rem,1.4vw,1.25rem);margin-top:1.25rem}

/* GM-LIB-002: resource pairs. A lilac panel holds two equal cream cards; extensible to further pairs */
.ll-resources{margin:2rem 0 .5rem;padding:1.5rem;background:var(--gm-lavender);border:var(--gm-border);border-radius:var(--gm-radius)}
.ll-resources h2{margin-top:0}
.ll-resources h2::after{content:"";display:block;width:3rem;height:3px;margin-top:.6rem;background:var(--gm-gold);border-radius:2px}
.ll-resource-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem;margin-top:1rem}
.ll-resource{display:grid;grid-template-columns:minmax(0,9rem) minmax(0,1fr);gap:1rem;align-items:start;padding:1.1rem;background:var(--gm-ivory);border:var(--gm-border);border-top:3px solid var(--gm-plum);border-radius:var(--gm-radius)}
.ll-resource__cover{display:block}
.ll-resource__cover img{display:block;width:100%;height:auto;aspect-ratio:320/452;border:1px solid var(--gm-line);border-radius:4px;background:var(--gm-paper);box-shadow:0 2px 6px rgba(0,0,0,.08)}
.ll-resource__body{display:flex;flex-direction:column;height:100%;min-width:0}
.ll-resource__kind{margin:0 0 .3rem;font-size:var(--gm-size-small);letter-spacing:.06em;text-transform:uppercase;color:var(--gm-plum)}
.ll-resource__title{margin:0 0 .5rem;font-size:clamp(1.1rem,1.5vw,1.3rem);line-height:1.3;color:var(--gm-plum)}
.ll-resource__desc{margin:0 0 .6rem;line-height:1.55}
.ll-resource__meta{margin:0 0 .9rem;padding-top:.5rem;border-top:1px solid var(--gm-gold);font-size:var(--gm-size-small)}
.ll-resource__actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:auto}
.ll-resource__actions .gm-button{margin:0}

/* GM-LIB-002: invitation to Interact with us, following the resource pairs */
.ll-invite{margin:1.5rem 0 .5rem;padding:1.25rem 1.5rem;max-width:70ch;background:var(--gm-ivory);border:var(--gm-border);border-left:3px solid var(--gm-gold);border-radius:0 var(--gm-radius) var(--gm-radius) 0}
.ll-invite h2{margin:0 0 .5rem;font-size:clamp(1.2rem,1.8vw,1.45rem);color:var(--gm-plum)}
.ll-invite p{line-height:1.6}
.ll-invite__action{margin:.9rem 0 0}

.b2-start{margin-top:1rem}
.home-v1-start{margin-top:1.25rem}

@media (max-width:64rem){
  .ll-resource{grid-template-columns:1fr}
  .ll-resource__cover{max-width:9rem}
}

@media (max-width:40rem){
  .ll-band{padding:1.25rem 0 1.25rem}
  .ll-hero{margin-inline:calc(-1 * var(--gm-gutter))}
  .ll-hero img{border-radius:0;border-inline:0}
  .ll-section--lilac,.ll-finale{padding:1.1rem}
  .ll-terms .ll-prose{grid-template-columns:1fr}
  .ll-resources{padding:1.1rem}
  .ll-invite{padding:1.1rem}
  .ll-resource-pair{grid-template-columns:1fr}
  .ll-providers,.ll-providers thead,.ll-providers tbody,.ll-providers tr,.ll-providers th,.ll-providers td{display:block;width:auto}
  .ll-providers{background:transparent}
  .ll-providers thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .ll-providers tr{display:grid;grid-template-columns:1fr 1fr;border:var(--gm-border);border-radius:var(--gm-radius);margin-bottom:.75rem;background:var(--gm-paper)}
  .ll-providers td:last-child{grid-column:1/-1}
  .ll-providers td:first-child{border-right:1px solid var(--gm-line)}
  .ll-providers td,.ll-providers td:first-child,.ll-providers td:nth-child(2){white-space:normal}
  .ll-providers td{border:0;border-bottom:1px solid var(--gm-line);padding:.5rem .75rem}
  .ll-providers td:last-child{border-bottom:0}
  .ll-providers td::before{content:attr(data-label);display:block;font-size:var(--gm-size-small);font-weight:normal;color:var(--gm-body);letter-spacing:.04em;text-transform:uppercase}
}
