/* v29 Library of Kink — shared UI for library, curriculum, and chapter pages. */
:root{--lib-bg:#050405;--lib-panel:#0d090b;--lib-panel2:#120c0f;--lib-line:#3b2630;--lib-line2:#5a3645;--lib-text:#f4edef;--lib-muted:#bcaeb4;--lib-rose:#d28ca6;--lib-gold:#d7ad70;--lib-shadow:0 22px 60px rgba(0,0,0,.3)}
html{background:var(--lib-bg);scroll-padding-top:80px}
body{background:var(--lib-bg)!important;color:var(--lib-text)!important;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
body::selection{background:#74304a;color:#fff}
body:not(.se-education)>header,body:not(.se-education)>main,body:not(.se-education)>footer{max-width:1120px!important}
body:not(.se-education)>header{position:relative;border-bottom-color:var(--lib-line)!important;padding-top:28px!important;padding-bottom:22px!important;color:#cdbdc4}
body:not(.se-education)>header a{text-underline-offset:4px}
body:not(.se-education)>main{padding-top:38px!important;padding-bottom:72px!important}
body:not(.se-education)>footer{border-top-color:var(--lib-line)!important;padding-top:26px!important;padding-bottom:48px!important;color:#9f9298!important}
body:not(.se-education) h1{font-size:clamp(2.8rem,7vw,5rem)!important;letter-spacing:-.04em!important;text-wrap:balance}
body:not(.se-education) h2{font-size:clamp(1.65rem,3.5vw,2.35rem);margin-top:38px!important;color:#eadce2}
body:not(.se-education) h3{font-family:Georgia,"Times New Roman",serif;color:#e8d7de}
body:not(.se-education) p,body:not(.se-education) li{color:#cbbfc4}
body:not(.se-education) .eyebrow{color:var(--lib-rose)!important}
body:not(.se-education) .notice{border-left-color:var(--lib-gold)!important;background:linear-gradient(110deg,#130e0a,#0c080a)!important;border-radius:5px!important}
body:not(.se-education) .controls{align-items:stretch;gap:10px!important}
body:not(.se-education) input,body:not(.se-education) select,body:not(.se-education) button{border-radius:4px!important;min-height:46px}
body:not(.se-education) input,body:not(.se-education) select{background:#0e090c!important;border-color:#583743!important}
body:not(.se-education) .chapters{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
body:not(.se-education) .chapter{position:relative;overflow:hidden;border-radius:5px!important;background:linear-gradient(145deg,#0f0a0d,#090607)!important;border-color:var(--lib-line)!important;padding:22px!important;transition:transform .16s ease,border-color .16s ease,background-color .16s ease}
body:not(.se-education) .chapter::before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:#6f3249;opacity:.7}
body:not(.se-education) .chapter:hover,body:not(.se-education) .chapter:focus-visible{transform:translateY(-2px);border-color:#714355!important;background:#120b0f!important;text-decoration:none}
body:not(.se-education) .chapter strong{line-height:1.25;margin:8px 0 12px}
body:not(.se-education) .chapter small{color:#bba9b1!important}
body:not(.se-education) .back{display:inline-flex;align-items:center;min-height:40px;padding:6px 0;color:#e5b5c6}
body:not(.se-education) .prose{max-width:76ch!important;font-size:1.01rem}
body:not(.se-education) .prose>p{line-height:1.8}
body:not(.se-education) .prose h2{padding-top:8px;border-top:1px solid #271a20}
body:not(.se-education) .prose ul{padding-left:1.2rem}
body:not(.se-education) .prose li{margin:.55em 0}
body:not(.se-education) .chapter-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:36px 0 8px}
body:not(.se-education) .chapter-nav a{display:flex;flex-direction:column;justify-content:center;min-height:84px;padding:15px 17px;border:1px solid var(--lib-line);border-radius:5px;background:#0b0709;text-decoration:none}
body:not(.se-education) .chapter-nav a:hover{border-color:var(--lib-line2);background:#120b0f}
body:not(.se-education) .chapter-nav a:last-child{text-align:right;align-items:flex-end}
body:not(.se-education) .chapter-nav small{color:#9f9197}
body:not(.se-education) .read-progress{position:fixed;left:0;top:0;height:3px;width:0;background:linear-gradient(90deg,#a95775,#e0b177);z-index:200;pointer-events:none}
/* Main interactive library */
.se-education .hero{border-radius:0;background:linear-gradient(180deg,rgba(19,7,12,.78),#050405),url('sanctum-eros-library-cover.jpg') center/cover no-repeat!important}
.se-education .hero .wrap{max-width:1160px}
.se-education .nav{top:64px;background:rgba(7,5,6,.95)!important;border-color:#34222a!important;backdrop-filter:blur(14px)}
.se-education .navin{max-width:1160px;padding:10px 16px}
.se-education .nav button,.se-education .nav .btn{border-radius:4px!important;background:#0e090c!important;border-color:#49303a!important;min-height:42px}
.se-education .nav button:hover,.se-education .nav .btn:hover{background:#1b0e14!important;border-color:#674052!important}
.se-education main.wrap{width:min(100% - 36px,1160px)!important;max-width:1160px!important}
.se-education .card,.se-education .tile{border-radius:5px!important;background:linear-gradient(145deg,#0f0a0d,#090607)!important;border-color:#38252d!important}
.se-education .tile{position:relative;overflow:hidden;min-height:116px;transition:transform .16s ease,border-color .16s ease,background-color .16s ease}
.se-education .tile::after{content:"→";position:absolute;right:16px;bottom:12px;color:#8f6676;opacity:.8}
.se-education .tile:hover,.se-education .tile:focus-within{transform:translateY(-1px);border-color:#634052!important;background:#120b0f!important}
.se-education .search{border-radius:4px!important;background:#0c080a!important;border-color:#543540!important;min-height:50px}
.se-education .filters button,.se-education .libraryTools button,.se-education .related button{border-radius:4px!important;background:#0d090b!important;border-color:#432c35!important}
.se-education .filters button.on{background:#421525!important;border-color:#8b3c59!important}
.se-education .articleHead{border-bottom-color:#3a252e!important}
.se-education .articleBody{font-size:1.015rem}
.se-education .articleBody p,.se-education .articleBody ul{max-width:78ch!important}
.se-education .fieldnote{border-radius:5px!important;background:linear-gradient(135deg,#151009,#0d0908)!important;border-color:#4f3b25!important}
.se-education .related{gap:10px!important}
.se-education .encLesson{border-radius:5px!important}
.se-education .library-upgrade{margin:22px 0 38px}
.se-education .library-upgrade-head{max-width:760px;margin-bottom:20px}
.se-education .library-upgrade-head p{color:#bcaeb4;line-height:1.7}
.se-education .learning-paths{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.se-education .learning-path{display:flex;flex-direction:column;gap:10px;min-height:235px;padding:23px;border:1px solid #3e2932;background:linear-gradient(145deg,#100a0e,#090607);border-radius:5px}
.se-education .learning-path h3{font:500 1.45rem/1.2 Georgia,"Times New Roman",serif;margin:0;color:#f0e4e8}
.se-education .learning-path p{margin:0;color:#baaeb3;line-height:1.62}
.se-education .learning-path ol{margin:4px 0 0;padding-left:1.25rem;color:#d2c4ca;flex:1}
.se-education .learning-path li{margin:.34rem 0}
.se-education .learning-path a{margin-top:auto;color:#e4aec2;text-decoration:none;font-weight:700}
.se-education .learning-path a:hover{text-decoration:underline;text-underline-offset:4px}
.se-education .library-map{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:#39262f;border:1px solid #39262f;margin-top:18px}
.se-education .library-map>div{background:#090607;padding:17px;min-width:0}
.se-education .library-map strong{display:block;color:#ecdde3;margin-bottom:6px}
.se-education .library-map span{font-size:.86rem;color:#ad9fa5;line-height:1.55}
.se-education .risk-boundary{margin-top:18px;padding:22px;border:1px solid #5b3b2c;border-left:3px solid #d0a166;background:linear-gradient(100deg,#130d09,#0a0708);border-radius:5px}
.se-education .risk-boundary h3{margin-top:0;color:#efd5ad}
.se-education .risk-boundary p{margin-bottom:0;color:#c8b9b8}
@media(max-width:900px){
 body:not(.se-education) .chapters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .se-education .library-map{grid-template-columns:repeat(2,minmax(0,1fr))}
 .se-education .library-map>div:last-child{grid-column:1/-1}
}
@media(max-width:700px){
 body:not(.se-education)>header,body:not(.se-education)>main,body:not(.se-education)>footer{padding-left:16px!important;padding-right:16px!important}
 body:not(.se-education)>main{padding-top:26px!important;padding-bottom:52px!important}
 body:not(.se-education) .chapters{grid-template-columns:1fr!important}
 body:not(.se-education) .chapter{padding:19px!important}
 body:not(.se-education) .chapter-nav{grid-template-columns:1fr}
 body:not(.se-education) .chapter-nav a:last-child{text-align:left;align-items:flex-start}
 .se-education .nav{top:60px}
 .se-education main.wrap{width:min(100% - 28px,1160px)!important}
 .se-education .learning-paths{grid-template-columns:1fr}
 .se-education .learning-path{min-height:0;padding:20px}
 .se-education .library-map{grid-template-columns:1fr}
 .se-education .library-map>div:last-child{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){body:not(.se-education) .chapter,.se-education .tile{transform:none!important}}

/* Curriculum guide added in v29. */
body:not(.se-education) .curriculum-guide{margin:30px 0 26px;padding:24px;border:1px solid var(--lib-line);background:linear-gradient(145deg,#0e090c,#080607);border-radius:5px}
body:not(.se-education) .curriculum-guide h2{margin:0 0 10px!important;font-size:1.65rem}
body:not(.se-education) .curriculum-guide>p{max-width:76ch;margin:0 0 18px;color:#bfb1b7}
body:not(.se-education) .curriculum-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body:not(.se-education) .curriculum-guide-grid a{display:block;padding:14px 15px;border:1px solid #38252d;background:#0a0709;text-decoration:none;border-radius:4px}
body:not(.se-education) .curriculum-guide-grid a:hover{border-color:#654052;background:#120b0f}
body:not(.se-education) .curriculum-guide-grid strong{display:block;color:#eadde2;margin-bottom:3px}
body:not(.se-education) .curriculum-guide-grid span{display:block;color:#aa9da3;font-size:.87rem}
body:not(.se-education) main:has(.chapter-nav)>.controls{display:none}
@media(max-width:650px){body:not(.se-education) .curriculum-guide{padding:19px}body:not(.se-education) .curriculum-guide-grid{grid-template-columns:1fr}}

/* Long-form educational expansion */
body:not(.se-education) .deep-dive{margin-top:42px;padding-top:8px;border-top:2px solid #4a2b37}
body:not(.se-education) .deep-dive>h2:first-child{border-top:0!important;margin-top:0!important}
body:not(.se-education) .deep-dive h3{margin-top:1.7rem;font-size:1.18rem}
body:not(.se-education) .deep-dive .concept-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}
body:not(.se-education) .deep-dive .concept-card{padding:15px 16px;border:1px solid #38252d;background:#0b0709;border-radius:4px}
body:not(.se-education) .deep-dive .concept-card strong{display:block;color:#eadce2;margin-bottom:6px}
body:not(.se-education) .deep-dive .case-study{margin:22px 0;padding:18px;border-left:3px solid #a95a77;background:#120a0e;border-radius:4px}
body:not(.se-education) .deep-dive .case-study strong{display:block;color:#e9c8d4;margin-bottom:6px}
body:not(.se-education) .deep-dive .evidence-note{margin:22px 0;padding:18px;border:1px solid #594128;background:#120f09;border-radius:4px}
body:not(.se-education) .deep-dive .evidence-note strong{color:#e0b177}
body:not(.se-education) .deep-dive .source-list{font-size:.93rem;color:#b9adb2}
body:not(.se-education) .deep-dive .source-list li{margin:.7em 0}
body:not(.se-education) .deep-dive .source-list a{overflow-wrap:anywhere}
body:not(.se-education) .deep-dive table{width:100%;border-collapse:collapse;margin:20px 0;font-size:.94rem}
body:not(.se-education) .deep-dive th,body:not(.se-education) .deep-dive td{text-align:left;vertical-align:top;padding:11px 12px;border:1px solid #3b2931}
body:not(.se-education) .deep-dive th{background:#140b0f;color:#eadce2}
@media(max-width:700px){body:not(.se-education) .deep-dive .concept-grid{grid-template-columns:1fr}body:not(.se-education) .deep-dive table{display:block;overflow-x:auto}}
