/* Content library page */
.view-library .library-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 32px 86px;
}
.view-library .side-nav a em,
.view-library .mobile-bottom-nav a em {
  font-style: normal;
}
.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: end;
  padding: 28px 30px;
  border: 1px solid var(--nf-line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 10%, rgba(47, 127, 106, 0.14), transparent 16rem),
    linear-gradient(120deg, #ffffff 0%, #f5fbf8 48%, #eef8f3 100%);
  box-shadow: 0 18px 44px rgba(31, 91, 80, 0.08);
}
.library-eyebrow {
  margin: 0 0 10px;
  color: var(--nf-green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.library-hero h1 {
  margin: 0;
  color: var(--t-title, var(--nf-text));
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.library-hero-copy > p:not(.library-eyebrow) {
  margin: 12px 0 0;
  color: var(--t-body, var(--nf-text-soft));
  font-size: 13px;
  line-height: 1.7;
}
.library-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.library-stats > span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 12px;
  border: 1px solid var(--nf-green-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}
.library-stats strong {
  color: var(--nf-green);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.library-stats small {
  color: var(--nf-text-soft);
  font-size: 11px;
}
.library-hero-mark {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: var(--nf-green-soft);
  box-shadow: 0 14px 30px rgba(31, 91, 80, 0.16);
}
.library-hero-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.library-resume {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--nf-line);
  border-radius: 18px;
  background: var(--nf-card);
}
.lib-resume-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}
.lib-resume-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lib-resume-cover > i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 16, 28, 0.24);
}
.lib-resume-cover svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
.lib-resume-copy {
  min-width: 0;
}
.lib-resume-copy small {
  display: block;
  color: var(--nf-green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.lib-resume-copy strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--nf-text);
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-resume-copy span {
  display: block;
  margin-top: 5px;
  color: var(--nf-text-soft);
  font-size: 11px;
}
.lib-resume-bar {
  overflow: hidden;
  height: 4px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--nf-line);
}
.lib-resume-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nf-green), var(--nf-green-2));
}
.lib-resume-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--nf-green);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 0;
}
.lib-search {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nf-line);
  border-radius: 12px;
  background: var(--nf-card);
}
.lib-search:focus-within {
  border-color: var(--nf-green-2);
  box-shadow: 0 0 0 3px rgba(47, 127, 106, 0.12);
}
.lib-search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--nf-text-dim);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lib-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--nf-text);
  font: inherit;
  font-size: 13px;
}
.lib-search input::placeholder {
  color: var(--nf-text-dim);
}
.library-toolbar .list-filter {
  padding-top: 0;
}
.library-toolbar .lib-reset {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--nf-line);
  border-radius: 999px;
  background: transparent;
  color: var(--nf-text-soft);
  font-size: 12px;
  cursor: pointer;
}
.library-toolbar .lib-reset:hover {
  border-color: var(--nf-line-strong);
  color: var(--nf-text);
}
.lib-sort {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--nf-line);
  border-radius: 10px;
  background: var(--nf-card);
  color: var(--nf-text);
  font: inherit;
  font-size: 12px;
}
.library-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 14px;
  color: var(--nf-text-dim);
  font-size: 11px;
}
.library-meta span:last-child {
  text-align: right;
}
.view-library .library-tabs {
  margin: 18px 0 0;
}
.lib-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 26px 18px;
}
.lib-card {
  cursor: pointer;
}
.lib-card .minimal-course-cover {
  background: #e8f3ee;
}
.lib-card .minimal-course-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lib-card-state {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(17, 16, 28, 0.7);
  color: #fff;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.lib-card-state.is-on {
  background: rgba(31, 91, 80, 0.9);
}
.lib-card-progress {
  display: block;
  overflow: hidden;
  height: 4px;
  margin-top: 9px;
  border-radius: 99px;
  background: var(--nf-line);
}
.lib-card-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nf-green), var(--nf-green-2));
}
.lib-card .card-date {
  display: block;
  margin-top: 7px;
}
.lib-card .minimal-course-copy > span > i {
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.view-library .empty-library {
  min-height: 220px;
  place-items: center;
  text-align: center;
}
.view-library .empty-library strong {
  display: block;
  color: var(--nf-text);
  font-size: 18px;
}
.view-library .empty-library span {
  display: block;
  margin: 8px 0 16px;
  color: var(--nf-text-soft);
  font-size: 12px;
}
.view-library .empty-library button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--nf-green);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.library-page .nf-toast {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 1100px) {
  .lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .view-library .library-page {
    padding: 14px 16px 92px;
  }
  .library-hero {
    grid-template-columns: minmax(0, 1fr) 180px;
    padding: 22px;
  }
  .lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 12px;
  }
}
@media (max-width: 720px) {
  .lib-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .library-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px;
    border-radius: 20px;
  }
  .library-hero h1 {
    font-size: 28px;
  }
  .library-hero-mark {
    display: none;
  }
  .library-stats {
    gap: 8px;
    margin-top: 16px;
  }
  .library-stats > span {
    padding: 7px 10px;
  }
  .library-resume {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }
  .lib-resume-go {
    grid-column: 2;
    justify-self: start;
    min-height: 38px;
    padding: 0 14px;
  }
  .library-toolbar {
    gap: 8px;
  }
  .lib-search {
    flex-basis: 100%;
  }
  .library-toolbar .list-filter {
    width: 100%;
  }
  .lib-sort {
    flex: 1;
    min-width: 0;
  }
  .library-toolbar .lib-reset {
    min-height: 40px;
  }
  .lib-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }
  .lib-card .minimal-course-copy h3 {
    font-size: 13px;
  }
  .lib-card .minimal-course-copy > span > i {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lib-resume-bar b,
  .lib-card-progress b {
    transition: none;
  }
}
