/* JulyLearn V13.03 RC35 — Course Library Unified Header
   Approved direction: compact functional library header, no split hero / black card. */

.library-v08{background:#fbfaf8;padding-bottom:90px}
.library-v08-hero{padding:28px 0 0;background:transparent}
.library-v08-frame{
  position:relative;overflow:hidden;display:block;border:1px solid #e8e2da;border-radius:26px;
  background:linear-gradient(135deg,#fbf8f3 0%,#f7f3ed 100%);padding:46px 52px 30px;
  box-shadow:0 12px 34px rgba(42,34,26,.025)
}
.library-v08-frame:before{content:none}
.library-v08-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:34px;margin-bottom:26px}
.library-v08-heading-copy{min-width:0}
.library-v08-heading h1{margin:0;font-size:52px;line-height:1.02;letter-spacing:-.055em;color:#171923;font-weight:860}
.library-v08-heading h2{margin:18px 0 0;font-size:24px;line-height:1.35;letter-spacing:-.025em;color:#171923;font-weight:790}
.library-v08-heading p{margin:10px 0 0;font-size:14px;line-height:1.7;color:#686c75}
.library-v08-status{flex:0 0 auto;display:inline-flex;align-items:center;gap:9px;margin-top:4px;padding:8px 12px;border:1px solid #e4ddd4;border-radius:999px;background:rgba(255,255,255,.54);color:#4e4a45;font-size:11px;font-weight:760;white-space:nowrap}
.library-v08-status>span{width:6px;height:6px;border-radius:50%;background:#9a7b4a;box-shadow:0 0 0 3px rgba(154,123,74,.09)}

.library-v08 .library-v08-tools{position:static;z-index:auto;display:block;padding:0;background:transparent;border:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.library-v08 .knowledge-search-box{width:100%;min-width:0;height:56px;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;border:1px solid #ddd7cf;background:#fff;border-radius:15px;overflow:hidden;box-shadow:0 7px 20px rgba(34,31,28,.035)}
.library-v08 .library-v08-tools .knowledge-search-box .search{display:block!important;order:2;width:100%;min-width:0;height:54px;margin:0;padding:0 18px 0 2px;border:0!important;background:transparent!important;box-shadow:none!important;color:#20232a;font-size:14px;outline:0}
.library-v08 .library-v08-tools .knowledge-search-box .search::placeholder{color:#aaa6a1}
.library-v08 .knowledge-search-submit{order:1;width:48px;height:54px;border:0;border-left:0;background:transparent;color:#222630;display:grid;place-items:center;cursor:pointer}
.library-v08 .knowledge-search-submit:hover{background:transparent;color:#6758dc}
.library-v08 .knowledge-search-submit svg{width:19px;height:19px;stroke-width:1.8}

.library-v08-filter-row{display:flex;align-items:center;gap:12px;margin-top:17px;min-width:0}
.library-v08-filter-group{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.library-v08 .library-v08-tools .filter{border:1px solid #ded8d0;background:rgba(255,255,255,.58);color:#3f4249;border-radius:999px;padding:8px 17px;font-size:12px;font-weight:720;line-height:1.15;box-shadow:none}
.library-v08 .library-v08-tools .filter.active,.library-v08 .library-v08-tools .filter:hover{background:#171923;color:#fff;border-color:#171923}
.library-v08 .library-mode-row{display:flex;align-items:center;gap:6px;flex:0 0 auto;margin:0;padding:0 0 0 12px;border:0;border-left:1px solid #ded8d0;border-radius:0;background:transparent}
.library-v08 .library-mode-row strong{margin:0 3px 0 0;color:#858079;font-size:10px;font-weight:700}
.library-v08 .library-mode-row .mode-filter{appearance:none;border:0;background:transparent;border-radius:999px;padding:8px 10px;cursor:pointer;color:#6b6863;font:inherit;font-size:11px;font-weight:700}
.library-v08 .library-mode-row .mode-filter:hover{background:#f0ece6;color:#2f3137}
.library-v08 .library-mode-row .mode-filter.active{background:#ebe7e1;color:#292b31;border:0}
.library-v08-tip{margin-left:auto;display:flex;align-items:center;min-width:0;color:#8d8983;font-size:11px;white-space:nowrap}
.library-v08-tip:before{content:"";width:22px;height:1px;background:#d8d2ca;margin-right:12px}

.library-v08-content{padding-top:28px}
.library-v08-count{margin:0 0 17px;display:flex;align-items:baseline;justify-content:space-between;gap:20px}
.library-v08-count h2{font-size:21px;letter-spacing:-.025em;margin:0;color:#171923}
.library-v08-count span{font-size:10px;color:#8b8781}
.library-v08 .course-all{gap:20px;padding:0 0 80px;align-items:stretch}
.library-v08 .course-all .course-card{height:100%;display:flex;flex-direction:column;background:#fff;border:1px solid #e6e1da;border-radius:16px;padding:7px;overflow:hidden;box-shadow:0 3px 12px rgba(35,31,27,.018);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.library-v08 .course-all .course-card:hover{transform:translateY(-2px);border-color:#d8d1c8;box-shadow:0 12px 26px rgba(35,31,27,.055)}
.library-v08 .course-card .course-body{padding:12px 10px 11px;display:flex;flex:1;flex-direction:column}
.library-v08 .course-card .course-meta{font-size:10px;margin-bottom:6px;color:#7566d8}
.library-v08 .course-card .course-title{font-size:15px;line-height:1.4;color:#171923;margin-bottom:5px}
.library-v08 .course-card .course-desc{font-size:11px;line-height:1.65;color:#7b7b7d}
.library-v08 .course-card .course-foot{margin-top:auto;padding-top:12px;color:#7d7b78;font-size:10px}
.library-v08 .course-card .pill{font-size:9px;padding:4px 7px}
.library-v08 .course-card .thumb,.library-v08 .course-card .course-cover-image{box-shadow:none!important}
.library-v08 .course-card:hover .thumb,.library-v08 .course-card:hover .course-cover-image{transform:none!important;box-shadow:none!important}

/* Search result mode keeps the compact page rhythm while hiding the header by existing search logic. */
body.is-knowledge-search .library-v08-content{padding-top:24px}

/* Dark theme — keep the same unified hierarchy rather than restoring the old split hero. */
html[data-theme="dark"] .library-v08{background:transparent!important}
html[data-theme="dark"] .library-v08-frame{background:linear-gradient(145deg,#101a2d,#0d1728)!important;border-color:rgba(151,171,217,.17)!important;box-shadow:0 20px 52px rgba(0,5,16,.18)!important}
html[data-theme="dark"] .library-v08-heading h1,html[data-theme="dark"] .library-v08-heading h2{color:#f3f6fb!important}
html[data-theme="dark"] .library-v08-heading p{color:#9facbf!important}
html[data-theme="dark"] .library-v08-status{background:rgba(17,28,47,.78)!important;border-color:rgba(151,171,217,.17)!important;color:#bac5d5!important}
html[data-theme="dark"] .library-v08-status>span{background:#bc9256!important}
html[data-theme="dark"] .library-v08 .library-v08-tools{background:transparent!important;border:0!important}
html[data-theme="dark"] .library-v08 .knowledge-search-box{grid-template-columns:48px minmax(0,1fr)!important;background:#0f1a2d!important;border-color:rgba(154,174,219,.22)!important;box-shadow:none!important}
html[data-theme="dark"] .library-v08 .library-v08-tools .knowledge-search-box .search{height:54px!important;padding:0 18px 0 2px!important;color:#e9eef6!important;font-size:14px!important}
html[data-theme="dark"] .library-v08 .knowledge-search-submit{order:1!important;width:48px!important;height:54px!important;background:transparent!important;color:#b8c3d5!important;border:0!important;font-size:0!important}
html[data-theme="dark"] .library-v08 .knowledge-search-submit svg{display:block!important}
html[data-theme="dark"] .library-v08 .knowledge-search-submit::after{content:none!important}
html[data-theme="dark"] .library-v08 .library-v08-tools .filter{background:#0f1a2d!important;color:#b5c0d0!important;border-color:rgba(154,174,219,.20)!important}
html[data-theme="dark"] .library-v08 .library-v08-tools .filter.active,html[data-theme="dark"] .library-v08 .library-v08-tools .filter:hover{background:#765cf2!important;color:#fff!important;border-color:#765cf2!important}
html[data-theme="dark"] .library-v08 .library-mode-row{background:transparent!important;border-color:rgba(151,171,217,.18)!important;color:#aab6c8!important}
html[data-theme="dark"] .library-v08 .library-mode-row .mode-filter{background:transparent!important;color:#9eabc0!important;border:0!important}
html[data-theme="dark"] .library-v08 .library-mode-row .mode-filter.active{background:#1b2940!important;color:#e7edf6!important}
html[data-theme="dark"] .library-v08-tip{color:#8998ae!important}
html[data-theme="dark"] .library-v08-tip:before{background:rgba(151,171,217,.22)!important}
html[data-theme="dark"] .library-v08-count h2{color:#eef2f8!important}
html[data-theme="dark"] .library-v08 .course-all .course-card{background:#0f192b!important;border-color:rgba(151,171,217,.14)!important;box-shadow:none!important}
html[data-theme="dark"] .library-v08 .course-all .course-card:hover{border-color:rgba(151,171,217,.26)!important;box-shadow:0 14px 34px rgba(0,5,16,.22)!important}

@media(max-width:1120px){
  .library-v08-filter-row{flex-wrap:wrap}
  .library-v08-tip{width:100%;margin-left:0}
  .library-v08-tip:before{width:16px}
}
@media(max-width:820px){
  .library-v08-hero{padding-top:18px}
  .library-v08-frame{padding:34px 30px 25px;border-radius:22px}
  .library-v08-heading{gap:22px}
  .library-v08-heading h1{font-size:46px}
  .library-v08-heading h2{font-size:22px}
  .library-v08 .library-v08-tools{overflow:visible!important}
  .library-v08 .library-v08-tools .search{display:block!important}
  .library-v08-filter-group{max-width:100%;overflow:auto;padding-bottom:2px}
  .library-v08 .library-mode-row{padding-left:0;border-left:0;width:100%}
}
@media(max-width:560px){
  .library-v08-frame{padding:28px 20px 22px;border-radius:20px}
  .library-v08-heading{display:block;margin-bottom:20px}
  .library-v08-heading h1{font-size:40px}
  .library-v08-heading h2{font-size:19px;margin-top:14px}
  .library-v08-heading p{font-size:12px}
  .library-v08-status{margin-top:17px}
  .library-v08 .knowledge-search-box{height:52px;grid-template-columns:44px minmax(0,1fr)}
  .library-v08 .knowledge-search-submit{width:44px;height:50px}
  .library-v08 .library-v08-tools .knowledge-search-box .search{height:50px;font-size:13px}
  .library-v08-filter-row{gap:10px;margin-top:14px}
  .library-v08 .library-v08-tools .filter{padding:8px 14px}
  .library-v08 .library-mode-row{overflow:auto;flex-wrap:nowrap}
  .library-v08-tip{font-size:10px}
  .library-v08-content{padding-top:24px}
  .library-v08 .course-all .course-card{padding:6px}
}
.library-v08 .course-all .course-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:3.3em;min-height:3.3em}
.library-v08 .course-all .course-foot{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;min-height:0}
.library-v08 .course-all .course-card-badges{flex-wrap:wrap;justify-content:flex-end;gap:4px}
@media(max-width:560px){.library-v08 .course-all .course-desc{height:auto;min-height:0;-webkit-line-clamp:3}}
