.card-library { --card: #17655f; }
.library { padding-top: 12px; }
.library-back, .library-source-link { color: var(--ink-2); font-size: 13px; font-weight: 800; text-underline-offset: 4px; }
.library-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 30px 0; }
.library-heading h1 { max-width: 720px; margin: 8px 0 12px; font-size: clamp(32px, 5.5vw, 54px); line-height: 1.06; letter-spacing: -.045em; }
.library-heading p { margin: 0; color: #526c80; line-height: 1.6; }
.library-area { padding: 10px 18px; background: var(--aqua); color: var(--aqua-ink); border: 1px solid #b8dcd6; border-radius: 999px; font-size: 13px; font-weight: 900; }
.library-course { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px; border: 1px solid #bdd9d5; border-radius: 18px; background: linear-gradient(110deg, #f6fffc, #e4f3ef); }
.library-course h2 { margin: 8px 0; font-size: 22px; }
.library-course h2 span { display: block; margin-top: 3px; color: #526c80; font-size: 13px; font-weight: 600; }
.library-course p { margin: 0; color: #526c80; font-size: 12px; line-height: 1.6; }
.library-course-link { flex-shrink: 0; display: inline-block; padding: 14px 18px; border-radius: 12px; color: white; background: var(--aqua-ink); font-size: 13px; font-weight: 900; text-decoration: none; text-align: center; }
.library-course-link:hover { background: #104f49; }
.library-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; margin-top: 32px; }
.library-sidebar h2 { margin: 5px 0 16px; color: #526c80; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.library-categories { display: grid; gap: 6px; }
.library-category { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 48px; padding: 11px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink-2); font-weight: 800; text-align: left; }
.library-category:hover { background: #e0ecee; }
.library-category[aria-pressed="true"] { border-color: #a7d1c9; background: #dff3ed; color: #135a50; }
.library-category span:last-child { display: grid; place-items: center; min-width: 25px; min-height: 25px; padding: 0 6px; border-radius: 7px; background: rgba(255,255,255,.8); font-size: 11px; }
.library-search { display: grid; gap: 8px; font-size: 13px; font-weight: 800; }
.library-filters { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.library-need-filter { grid-column: 1 / -1; padding: 16px; border: 1px solid #bdd9d5; border-radius: 14px; background: #f4fbf8; }
.library-need-note { margin: 9px 0 0; color: #526c80; font-size: 12px; line-height: 1.6; }
.library-search input, .library-search select { width: 100%; min-width: 0; min-height: 52px; padding: 12px 16px; border: 1px solid #bacdd7; border-radius: 12px; background: white; color: var(--ink); font-family: inherit; font-size: 14px; }
.library-results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; }
.library-results-bar p { margin: 0; color: #526c80; font-size: 12px; font-weight: 800; }
.library-reset { min-height: 40px; padding: 5px 0 5px 14px; border: 0; background: transparent; color: #17655f; font-size: 12px; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.library-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.library-topic { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 4px 15px rgba(23,49,74,.035); }
.library-topic-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; width: 100%; color: #526c80; font-size: 11px; font-weight: 800; }
.library-topic-top .badge { font-size: 9px; }
.library-topic h2 { margin: 18px 0 10px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.library-topic > p { margin: 0 0 16px; color: #526c80; font-size: 13px; line-height: 1.65; }
.library-topic > .library-topic-module { margin: 14px 0 0; font-size: 11px; font-weight: 700; }
.library-level { margin: 0 0 15px; padding: 5px 8px; background: #f0f4f7; border-radius: 6px; color: #526c80; font-size: 11px; font-weight: 800; }
.library-module-reference { width: 100%; margin-top: auto; padding-top: 15px; border-top: 1px solid #e6eef2; }
.library-module-reference summary { color: #526c80; font-size: 11px; font-weight: 800; cursor: pointer; }
.library-module-reference p { margin: 10px 0 0; font-size: 12px; line-height: 1.6; }
.library-topic-link { display: inline-block; margin-top: 14px; padding: 10px 0; color: #17655f; font-size: 13px; font-weight: 900; text-underline-offset: 4px; }
.library-more { display: block; min-height: 48px; margin: 20px auto 0; padding: 12px 20px; border: 1px solid #a7d1c9; border-radius: 12px; color: #135a50; background: #dff3ed; font-weight: 900; }
.library-empty { padding: 35px 24px; border: 1px dashed #adc5d0; border-radius: 16px; background: rgba(255,255,255,.65); text-align: center; }
.library-empty h2 { margin-top: 0; font-size: 20px; }
.library-empty p { color: #526c80; font-size: 14px; line-height: 1.6; }
.library-source { margin: 26px 0 10px; color: #526c80; font-size: 12px; line-height: 1.7; }
.library-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.library-section-heading h2 { margin: 7px 0 0; font-size: 27px; letter-spacing: -.025em; }
.library-section-heading > p { margin: 0; color: #526c80; font-size: 13px; line-height: 1.6; }
.library-app-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.library-section-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.library-section-categories button { min-height: 43px; padding: 10px 15px; border: 1px solid #bacdd7; border-radius: 999px; color: var(--ink-2); background: rgba(255,255,255,.7); font-size: 12px; font-weight: 800; }
.library-section-categories button:hover { background: #e0ecee; }
.library-section-categories button[aria-pressed="true"] { border-color: #17655f; background: #17655f; color: white; }
.library-app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.library-app-card { min-width: 0; padding: 24px; border: 1px solid #bdd9d5; border-radius: 18px; background: white; }
.library-app-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.library-app-header h3 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.library-app-home { flex-shrink: 0; color: #17655f; font-size: 12px; font-weight: 800; text-underline-offset: 4px; }
.library-app-card > p { margin: 10px 0 20px; color: #526c80; font-size: 13px; line-height: 1.6; }
.library-section-list { margin: 0; padding: 0; list-style: none; }
.library-section-list li + li { border-top: 1px solid #e6eef2; }
.library-section-list a { display: block; padding: 16px 4px; border-radius: 8px; text-decoration: none; }
.library-section-list a:hover { background: #f0f8f5; }
.library-section-label { display: flex; justify-content: space-between; gap: 14px; color: #17655f; font-size: 14px; font-weight: 850; line-height: 1.45; }
.library-section-label > span { flex-shrink: 0; }
.library-section-description { display: block; margin-top: 5px; color: #526c80; font-size: 12px; line-height: 1.6; }
.library-course-panel { margin: 32px 0 12px; border: 1px solid #bdd9d5; border-radius: 18px; background: rgba(255,255,255,.6); }
.library-course-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px; list-style: none; cursor: pointer; }
.library-course-panel > summary::-webkit-details-marker { display: none; }
.library-course-panel > summary strong { display: block; margin: 8px 0; font-size: 24px; letter-spacing: -.025em; }
.library-course-meta { display: block; color: #526c80; font-size: 13px; line-height: 1.6; }
.library-course-action { flex-shrink: 0; color: #17655f; font-size: 13px; font-weight: 850; }
.library-course-action::after { content: "Esplora le lezioni ↓"; }
.library-course-panel[open] .library-course-action::after { content: "Nascondi le lezioni ↑"; }
.library-course-body { padding: 0 25px 25px; }
.library a:focus-visible, .library button:focus-visible, .library input:focus-visible, .library select:focus-visible, .library summary:focus-visible, .card-library:focus-visible { outline: 3px solid #17655f; outline-offset: 4px; }
@media (max-width: 900px) {
  .library-course { align-items: flex-start; flex-direction: column; }
  .library-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
  .library-results { grid-template-columns: 1fr; }
  .library-filters { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .library-section-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
  .library-app-filters, .library-app-grid { grid-template-columns: 1fr; }
  .library-app-card { padding: 20px; }
  .library-course-panel > summary { align-items: flex-start; flex-direction: column; padding: 20px; }
  .library-course-body { padding: 0 15px 20px; }
  .library-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .library-heading h1 { font-size: 36px; }
  .library-layout { grid-template-columns: 1fr; gap: 20px; }
  .library-categories { display: flex; flex-wrap: wrap; gap: 6px; }
  .library-category { gap: 8px; padding: 8px 11px; font-size: 12px; background: rgba(255,255,255,.55); }
  .library-course { padding: 20px; }
  .library-course-link { width: 100%; }
  .library-topic { padding: 20px; }
}
.content-library { margin-top: 34px; }
.session-guide { margin: 32px 0 42px; padding: 26px; border: 1px solid #bdd9d5; border-radius: 20px; background: #f4fbf8; }
.session-guide h2 { margin: 10px 0; font-size: 28px; letter-spacing: -.03em; }
.session-guide > p { color: #526c80; line-height: 1.65; font-size: 14px; }
.session-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
.session-actions button { padding: 15px; text-align: left; border: 1px solid #bdd9d5; border-radius: 12px; background: white; color: #17364a; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.session-actions button[aria-pressed="true"] { background: #2c655e; color: white; border-color: #2c655e; }
.session-actions button small { display: block; margin-top: 6px; font-size: 10px; font-weight: 500; }
.session-actions button:focus-visible, .session-guide a:focus-visible { outline: 3px solid #3e7caa; outline-offset: 3px; }
.session-movement { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 14px 0; border-block: 1px solid #d8e6e2; color: #17364a; font-size: 14px; }
.session-movement span { color: #526c80; font-size: 12px; }
.session-movements { margin: 16px 0 8px; }
.session-browse { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.session-browse-label { margin-bottom: 4px; }
#session-equipment-label { margin-top: 16px; max-width: 350px; }
.session-card > .content-provider { align-self: flex-start; }
.session-card > .session-original { font-size: 11px; }
.session-card > a { margin-top: auto; }
.session-guide > .session-evidence { font-size: 12px; margin-top: 22px; }
@media (max-width: 700px) { .session-guide { padding: 18px; } .session-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .session-guide h2 { font-size: 24px; } }
.content-needs { margin-top: 0; }
.content-need-note { margin: 13px 0 22px; min-height: 22px; color: #526c80; font-size: 13px; line-height: 1.65; }
.content-filters { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px; border: 1px solid #bdd9d5; border-radius: 16px; background: #f4fbf8; }
.content-search { grid-column: 1 / -1; }
.content-filters > label:nth-child(2) { grid-column: span 2; }
.content-results-bar { min-height: 78px; }
.content-results-bar #content-count { font-size: 14px; color: var(--ink); }
.content-results-bar #content-provider-counts { margin-top: 6px; font-weight: 600; }
.content-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.content-card { display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.content-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: #526c80; font-size: 10px; font-weight: 800; }
.content-provider { padding: 5px 8px; border-radius: 6px; background: #e7f4ee; color: #17655f; }
.content-provider-posture { background: #edf0fa; color: #454c81; }
.content-card h3 { margin: 18px 0 10px; font-size: 19px; line-height: 1.35; letter-spacing: -.02em; overflow-wrap: anywhere; }
.content-card > p { margin: 0 0 15px; color: #526c80; font-size: 13px; line-height: 1.65; }
.content-card > .content-areas { color: #17655f; font-size: 11px; font-weight: 750; margin-top: auto; }
.content-card > a { align-self: flex-start; margin: 0; padding: 12px 0; }
.content-link-details { margin-top: 10px; border-top: 1px solid #e6eef2; padding-top: 12px; }
.content-link-details summary, .content-check-note summary { color: #526c80; font-size: 11px; font-weight: 750; cursor: pointer; }
.content-link-details p, .content-check-note p { color: #526c80; font-size: 12px; line-height: 1.7; }
.content-check-note { margin: 15px 0 28px; }
.content-directory-panel > summary strong { font-size: 21px; }
.content-directory-arrow { font-size: 23px; color: #17655f; }
@media (max-width: 1050px) { .content-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .content-filters { grid-template-columns: 1fr; padding: 16px; }
  .content-search, .content-filters > label:nth-child(2) { grid-column: auto; }
  .content-results { grid-template-columns: 1fr; }
  .content-card { padding: 20px; }
  .content-needs { gap: 6px; }
  .content-needs button { padding: 9px 12px; }
  .content-results-bar { align-items: flex-start; padding: 18px 0; }
}
