.knowledgeNav{max-width:1180px;margin:20px auto 0;padding:0 24px;display:flex;gap:12px;flex-wrap:wrap}.knowledgeNav button{min-height:48px}.knowledgeNav [aria-pressed=true]{background:var(--ink);color:white}.knowledgeShell[hidden],#app[hidden]{display:none!important}.knowledgeShell{max-width:1180px;margin:24px auto;padding:0 24px 40px}.knowledgeIntro{border-left:4px solid var(--gold);padding:0 0 0 20px;max-width:850px}.knowledgeIntro h1{font-size:clamp(32px,4vw,48px);margin:0 0 12px}.knowledgeTools{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;margin:26px 0 12px}.knowledgeTools label{font-size:14px;font-weight:600}.knowledgeTools input,.knowledgeTools select{display:block;width:100%;margin-top:8px;min-height:48px;padding:12px;border:1px solid #a9bcbd;border-radius:9px;background:white;font:inherit;color:var(--ink)}.knowledgeLayout{display:grid;grid-template-columns:minmax(250px,.8fr) minmax(0,1.7fr);gap:24px;align-items:start}.knowledgeList{display:grid;gap:8px;max-height:75vh;overflow:auto;padding:3px}.knowledgeItem{display:block;text-align:left;border:1px solid var(--line);border-radius:10px;padding:16px;background:white;color:var(--ink);width:100%;font:inherit;line-height:1.4}.knowledgeItem strong{display:block;font-size:18px}.knowledgeItem small{display:block;font-size:14px;margin-top:5px}.knowledgeItem[aria-pressed=true]{border:2px solid var(--ink);background:#e6efec}.knowledgeDetail{min-width:0;border-top:5px solid var(--gold);background:white;padding:28px;border-radius:12px}.knowledgeDetail h2{font-size:36px;overflow-wrap:anywhere}.knowledgeDetail h3{font-size:23px;margin:24px 0 10px}.knowledgeDetail p,.knowledgeDetail li{line-height:1.7}.knowledgeDetail ul{padding-left:22px}.knowledgeTag{font-size:14px;display:inline-block;padding:4px 10px;background:#eaf0ee;border-radius:20px;margin-bottom:14px}.knowledgeLinks{display:flex;flex-wrap:wrap;gap:8px}.knowledgeLinks button{font:inherit;font-size:14px;min-height:42px;border:1px solid var(--line);border-radius:8px;background:white;padding:8px 12px;color:var(--ink)}.knowledgeSources{border-top:1px solid var(--line);margin-top:24px;padding-top:16px;font-size:14px}.knowledgeSources a{color:var(--ink);overflow-wrap:anywhere}.knowledgeEmpty{padding:24px;background:white}.knowledgeFooter{font-size:14px;margin-top:24px}.knowledgeCoverage{margin:20px 0;background:#eaf0ee;border-radius:10px;padding:16px;font-size:14px}.knowledgeCoverage summary{cursor:pointer;font-weight:600}.knowledgeDetail .notice{font-size:15px}.knowledgeCount{font-size:14px;min-height:25px}.knowledgeDetail:focus{outline:none}@media(max-width:720px){.knowledgeTools{grid-template-columns:1fr}.knowledgeLayout{grid-template-columns:1fr}.knowledgeList{max-height:300px}.knowledgeDetail{padding:22px}.knowledgeNav{padding:0 16px}.knowledgeShell{padding:0 16px 28px}.knowledgeNav button{flex:1}.knowledgeTools{gap:10px}}@media print{.knowledgeNav,.knowledgeTools,.knowledgeList,.knowledgeCount{display:none!important}.knowledgeLayout{display:block}.knowledgeShell{padding:0;margin:0}.knowledgeDetail{border:0;padding:0}.knowledgeDetail h3{break-after:avoid}.knowledgeDetail p,.knowledgeDetail li{orphans:3;widows:3}.knowledgeShell:not([hidden])~footer{display:none}}
/* v7: eight learning areas and the embedded conversation */
.knowledgeNav{flex-wrap:wrap;gap:10px}.knowledgeNav button{white-space:normal}.knowledgeAreas{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:28px 0}.knowledgeArea{text-align:left;background:#fffaf3;border:1px solid #d8cbb7;border-radius:14px;min-height:105px;padding:18px;color:#0f4c5c;cursor:pointer;font:inherit;display:flex;flex-direction:column;gap:9px}.knowledgeArea span{font-size:13px;color:#84694b;letter-spacing:.1em}.knowledgeArea:hover,.knowledgeArea:focus-visible{border-color:#0f4c5c;background:#edf2eb}.catalogFilter{display:block;margin:16px 0;font-size:15px}.catalogFilter small{display:block;padding-left:25px}.libraryProduct{border-top:1px solid #ddd5c8;padding:16px 0}.learningCards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.learningCard{display:flex;flex-direction:column;gap:9px;text-align:left;font:inherit;line-height:1.5;color:#0f4c5c;border:1px solid #d7ddd5;background:#f8faf5;border-radius:12px;padding:20px;cursor:pointer}.learningCard span{font-size:15px}.learningCard small{font-weight:bold}.agentShell{max-width:780px;margin:30px auto;padding:28px;background:#fffaf3;border:1px solid #ded3c0;border-radius:20px}.agentShell[hidden]{display:none}.agentShell header{display:flex;align-items:center;gap:20px}.agentShell header img{width:88px;height:88px;object-fit:cover;border-radius:50%}.agentShell header h1{font:36px Georgia;margin:0}.agentShell button,.agentShell textarea{font:inherit}.agentShell button{padding:12px 18px;border:1px solid #0f4c5c;border-radius:10px;background:#0f4c5c;color:#fff;cursor:pointer}.agentShell button.secondary{background:transparent;color:#0f4c5c}.agentShell button:disabled{opacity:.5;cursor:not-allowed}.agentShell textarea{width:100%;box-sizing:border-box;min-height:120px;padding:14px;border:1px solid #aabbb4;border-radius:12px}.agentShell label{display:block;margin:16px 0}.agentShell small{display:block;line-height:1.5}.agentShell .row{display:flex;gap:10px;flex-wrap:wrap}.agentShell article{white-space:pre-wrap;overflow-wrap:anywhere;background:#edf3ed;padding:18px;border-radius:12px;margin:18px 0}.agentShell .product{white-space:normal;display:flex;gap:12px}.agentShell .product img{width:80px;height:80px;object-fit:contain}.agentShell .sources{font-size:14px}#agent-status{min-height:24px}.agentShell [role=status]{margin-bottom:24px}.agentShell .user{background:#f2e6d3}
@media(max-width:760px){.knowledgeAreas{grid-template-columns:repeat(2,minmax(0,1fr))}.learningCards{grid-template-columns:1fr}.agentShell{padding:20px 16px}.agentShell header{align-items:flex-start}.agentShell header img{width:62px;height:62px}.agentShell header h1{font-size:28px}.knowledgeNav button{flex:1 1 140px}}
@media print{.agentShell,.knowledgeAreas{display:none!important}}

.sourceFilter{display:block;margin:18px 0}.sourceFilter select{display:block;width:100%;max-width:760px;padding:12px;font:inherit;color:#0f4c5c;border:1px solid #bcc9c1;border-radius:8px;background:#fff}.bookCoverage{padding:12px 0;border-top:1px solid #ddd}.sourceNote{margin-top:16px;padding-top:12px;border-top:1px solid #ddd}.sourceNote p{font-size:15px;line-height:1.6}

/* v9 connected consultation */
.knowledgeAreas{grid-template-columns:repeat(3,minmax(0,1fr))}.knowledgeArea{min-height:82px;display:flex;gap:12px;align-items:center;text-align:left}.knowledgeArea span{position:static;flex:0 0 26px;font-size:14px}.knowledgeArea strong{line-height:1.4}.linkedResources{border-top:1px solid #d8e1d8;padding-top:16px}.knowledgeLinks{display:flex;flex-wrap:wrap;gap:8px}.knowledgeLinks button{white-space:normal;text-align:left}.agentLauncher{position:fixed;bottom:22px;right:22px;z-index:30;border:0;border-radius:30px;padding:16px 22px;background:#0f4c5c;color:white;box-shadow:0 5px 24px #0003;font:inherit;cursor:pointer}#agent.agentShell{position:fixed;right:18px;bottom:82px;z-index:40;background:#fffdf8;width:min(460px,calc(100vw - 24px));max-height:80vh;overflow:auto;margin:0;padding:22px;border:1px solid #bccfc9;border-radius:20px;box-shadow:0 12px 50px #0003}.agentClose{display:block;margin-left:auto;margin-bottom:12px}#agent header img{width:64px;height:64px}#agent h1{font-size:26px}#agent label{font-size:14px}#agent textarea{min-height:90px;width:100%}.knowledgeShell{padding-bottom:90px}.knowledgeDetail{overflow-wrap:anywhere}
@media(max-width:650px){.knowledgeAreas{grid-template-columns:repeat(2,minmax(0,1fr))}.knowledgeArea{padding:12px;gap:8px;min-height:88px}.knowledgeArea strong{font-size:14px}.knowledgeArea span{flex-basis:20px}#agent.agentShell{right:12px;bottom:76px;max-height:calc(100dvh - 100px)}.agentLauncher{right:12px;bottom:14px}.knowledgeTools{grid-template-columns:1fr}}

/* Biblioteca */
.knowledgeShell {
    position: relative;
    z-index: 2;
    margin-block: 12px 20px;
}

.knowledgeIntro {
    border-inline-start: 3px solid var(--mt-gold);
    padding-inline-start: 12px;
}

.knowledgeIntro h1 {
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.08;
    margin-bottom: 10px;
}

.knowledgeIntro p {
    max-width: 95ch;
    font-size: 15px;
    margin-bottom: 12px;
}

.knowledgeShell .knowledgeAreas {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 14px;
}

.knowledgeShell .knowledgeArea,
.knowledgeShell .knowledgeItem {
    display: block;
    min-height: 0;
    padding: 8px 12px;
    border: 1px solid var(--mt-border);
    border-radius: 10px;
    background: var(--mt-surface-warm);
    color: var(--mt-text);
}

.knowledgeShell .knowledgeArea[aria-pressed="true"] {
    background: var(--mt-primary);
    color: #fff;
    border-color: var(--mt-primary);
}

.knowledgeShell .knowledgeTools {
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr);
    align-items: end;
    gap: 12px;
    margin: 0 0 18px;
}

.knowledgeShell .knowledgeTools select {
    min-height: 42px;
    margin-top: 4px;
    padding: 8px 10px;
}

.knowledgeTools .catalogFilter {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    font-weight: 400;
}

.knowledgeTools .catalogFilter input {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--mt-primary);
}

.knowledgeShell .knowledgeLayout {
    grid-template-columns: minmax(235px, 1fr) minmax(0, 2.25fr);
    gap: 16px;
}

.knowledgeSidebar,
.knowledgeShell .knowledgeDetail {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--mt-border);
    border-radius: 16px;
    background: var(--mt-surface-warm);
}

.knowledgeSidebar > label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.knowledgeSearchBox {
    position: relative;
}

.knowledgeSearchBox svg,
.knowledgeSearchBox button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.knowledgeSearchBox svg {
    left: 9px;
    width: 20px;
    height: 20px;
    color: var(--mt-text-muted);
    pointer-events: none;
}

.knowledgeSearchBox #knowledgeSearch {
    appearance: none;
    padding: 8px 36px;
}

#knowledgeSearch::-webkit-search-cancel-button {
    display: none;
}

.knowledgeSearchBox button {
    right: 4px;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 20px;
}

.knowledgeShell .knowledgeCount {
    min-height: 0;
    margin: 8px 0;
    color: var(--mt-text-muted);
    font-size: 12px;
}

.knowledgeShell .knowledgeList {
    max-height: clamp(240px, 55dvh, 620px);
    padding: 3px;
    gap: 6px;
    overflow: hidden auto;
    scrollbar-width: none;
}

.knowledgeShell .knowledgeList::-webkit-scrollbar { display: none; }

.knowledgeShell .knowledgeItem strong {
    font-size: 14px;
    font-weight: 600;
}

.knowledgeShell .knowledgeItem small {
    margin-top: 2px;
    color: var(--mt-text-muted);
    font-size: 12px;
}

.knowledgeShell .knowledgeItem[aria-pressed="true"] {
    border-color: var(--mt-primary);
    background: var(--soft);
}

.knowledgeShell .knowledgeDetail {
    padding: clamp(16px, 2.3vw, 32px);
    box-shadow: 0 6px 18px rgba(80, 50, 21, .08);
}

.knowledgeShell .knowledgeDetail h2 {
    font-size: clamp(26px, 3vw, 38px);
    margin: 10px 0;
}

.knowledgeShell .knowledgeDetail h3 {
    font-size: 22px;
    margin: 16px 0 6px;
}

.knowledgeDetail > section {
    border-top: 1px solid var(--mt-border);
}

.knowledgeShell .knowledgeDetail:focus-visible,
.knowledgeList:focus-visible {
    outline: 2px solid var(--mt-primary);
    outline-offset: 2px;
}

.knowledgeDetail .knowledgeBack {
    display: block;
    padding: 0;
    margin-bottom: 8px;
}

@media (max-width: 720px) {
    .knowledgeShell .knowledgeLayout,
    .knowledgeShell .knowledgeTools { grid-template-columns: minmax(0, 1fr); }
    .knowledgeShell .knowledgeList { max-height: min(260px, 42dvh); }
}

@media print {
    .knowledgeSidebar, .knowledgeBack { display: none !important; }
    .knowledgeShell .knowledgeLayout { display: block; }
}

.mt-page-canvas:has(.knowledgeShell:not([hidden])) > .mt-decor-branch {
    opacity: .3;
}

.knowledgeShell .knowledgeArea {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 960px) {
    .knowledgeShell .knowledgeAreas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .knowledgeShell .knowledgeAreas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
