/* fskids.org - curriculum downloads.
   Matched to the portal's own look: Fredoka One headings, Nunito body,
   chunky ink borders and hard offset shadows, teal for the Downloads tab.
   Uses the site's real variables (--ink, --teal, --cream, --orange,
   --sun, --green) with fallbacks so the file also works standalone. */

#fsk-downloads { margin-bottom: 1.1rem; }

.fsk-dl-intro,
.fsk-dl-loading,
.fsk-dl-error {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink, #1A0A2E);
  opacity: .75;
  margin: 0 0 1.2rem;
}
.fsk-dl-error { color: var(--red, #E8365D); opacity: 1; font-weight: 800; }

/* grade tabs ------------------------------------------------------------ */
.fsk-grade-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .6rem;
  margin-bottom: 1.6rem;
}
.fsk-grade-tab {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .8rem 1rem;
  border: 2.5px solid var(--ink, #1A0A2E);
  border-radius: 16px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink, #1A0A2E);
  cursor: pointer;
  text-align: left;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
}
.fsk-grade-tab:hover { transform: translate(-1px,-2px); box-shadow: 4px 4px 0 var(--ink, #1A0A2E); }
.fsk-grade-tab.is-active {
  background: var(--teal, #00C49A);
  box-shadow: 4px 4px 0 var(--ink, #1A0A2E);
}
.fsk-grade-name {
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  color: var(--ink, #1A0A2E);
}
.fsk-grade-tab.is-active .fsk-grade-name { color: #fff; }
.fsk-grade-size {
  font-family: 'Nunito', sans-serif;
  font-size: .74rem; font-weight: 800;
  color: rgba(0,0,0,.45);
}
.fsk-grade-tab.is-active .fsk-grade-size { color: rgba(255,255,255,.85); }

/* take the whole grade ---------------------------------------------------
   Sits above the individual files. Sun yellow so it reads as the easy
   option without shouting over the rest of the page. */
.fsk-bundle {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--sun, #FFD23F);
  border: 3px solid var(--ink, #1A0A2E);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink, #1A0A2E);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.2rem;
}
.fsk-bundle-text { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 220px; min-width: 0; }
.fsk-bundle-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem; color: var(--ink, #1A0A2E);
}
.fsk-bundle-desc {
  font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: .8rem; line-height: 1.45;
  color: rgba(0,0,0,.62);
}
.fsk-bundle-size {
  font-family: 'Nunito', sans-serif;
  font-weight: 900; font-size: .76rem;
  color: rgba(0,0,0,.5); white-space: nowrap;
}
.fsk-dl-big { font-size: .95rem; padding: .7rem 1.4rem; }
.fsk-or {
  font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: .84rem;
  color: rgba(0,0,0,.5);
  margin: 0 0 1.4rem;
}

/* category blocks ------------------------------------------------------- */
.fsk-cat { margin-bottom: 1.8rem; }
.fsk-cat-title {
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
  font-family: 'Fredoka One', cursive;
  font-size: 1.05rem;
  color: var(--ink, #1A0A2E);
  margin: 0 0 .2rem;
}
.fsk-cat-count {
  font-family: 'Nunito', sans-serif;
  font-size: .72rem; font-weight: 800;
  color: #fff;
  background: var(--teal, #00C49A);
  border: 2px solid var(--ink, #1A0A2E);
  border-radius: 50px;
  padding: .05rem .55rem;
}
.fsk-cat-blurb {
  font-family: 'Nunito', sans-serif;
  font-size: .82rem; font-weight: 600; line-height: 1.5;
  color: rgba(0,0,0,.55);
  margin: 0 0 .85rem;
}

/* one row per file ------------------------------------------------------ */
.fsk-files { list-style: none; margin: 0; padding: 0; }
.fsk-file {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .8rem 1rem;
  background: var(--cream, #FFFBF0);
  border: 2px solid var(--ink, #1A0A2E);
  border-radius: 14px;
  margin-bottom: .55rem;
}
.fsk-file-text { display: flex; flex-direction: column; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.fsk-file-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900; font-size: .88rem;
  color: var(--ink, #1A0A2E);
}
.fsk-file-desc {
  font-family: 'Nunito', sans-serif;
  font-weight: 600; font-size: .75rem; line-height: 1.45;
  color: rgba(0,0,0,.5);
}
.fsk-file-size {
  font-family: 'Nunito', sans-serif;
  font-size: .72rem; font-weight: 800;
  color: rgba(0,0,0,.4);
  white-space: nowrap;
}
.fsk-dl {
  flex: 0 0 auto;
  padding: .5rem 1.1rem;
  border: 2.5px solid var(--ink, #1A0A2E);
  border-radius: 50px;
  background: var(--teal, #00C49A);
  color: #fff;
  font-family: 'Fredoka One', cursive;
  font-size: .82rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink, #1A0A2E);
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
}
.fsk-dl:hover { transform: translate(-1px,-2px); box-shadow: 3px 3px 0 var(--ink, #1A0A2E); }
.fsk-dl:disabled {
  background: #b8c4bd; cursor: default;
  transform: none; box-shadow: 2px 2px 0 var(--ink, #1A0A2E);
}
/* not signed in, or signed in without a grade yet */
.fsk-dl-locked { background: var(--orange, #FF6B35); }

@media (max-width: 560px) {
  .fsk-file-size { order: 3; }
  .fsk-dl { order: 4; margin-left: auto; }
}

/* Grades 3 to 5, not out yet. Quiet but clear, sitting under the grade
   buttons where a parent with an older child is deciding what to do. */
.fsk-grades-soon {
  font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: .84rem; line-height: 1.5;
  color: var(--ink, #1A0A2E);
  background: #fff;
  border: 2px dashed var(--ink, #1A0A2E);
  border-radius: 12px;
  padding: .6rem .9rem;
  margin: -.6rem 0 1.4rem;
}
