@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

.esh-lexicon,.esh-lexicon *{box-sizing:border-box}
.esh-lexicon{max-width:920px;margin:0 auto;padding:20px 0;font-family:"Lora",Georgia,serif;color:#2c2c2c;line-height:1.6}

/* HEADER */
.esh-header{text-align:center;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid #e0d8cf}
.esh-title{font-size:2.2rem;font-weight:700;color:#1a1a1a;margin:0 0 6px}
.esh-subtitle{font-size:.95rem;color:#7a7060;margin:0;font-style:italic}

/* TABS */
.esh-tabs{display:flex;gap:0;margin-bottom:24px;border-bottom:2px solid #e0d8cf}
.esh-tab{flex:1;padding:12px 20px;font-family:"Lora",Georgia,serif;font-size:1rem;font-weight:600;border:none;background:0;color:#7a7060;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .2s;text-align:center}
.esh-tab:hover{color:#3d3428;background:#faf8f4}
.esh-tab.active{color:#3d3428;border-bottom-color:#8b7355}
.esh-tab-ct{font-size:.78rem;font-weight:400;color:#a09888;margin-left:4px}

/* SEARCH */
.esh-search-wrap{position:relative;margin-bottom:20px;display:flex;align-items:center}
.esh-search-input{flex:1;padding:14px 20px 14px 48px;font-size:1.05rem;font-family:"Lora",Georgia,serif;border:2px solid #d4cec4;border-radius:8px;background:#faf8f5;color:#2c2c2c;outline:0;transition:border-color .2s,box-shadow .2s}
.esh-search-input:focus{border-color:#8b7355;box-shadow:0 0 0 3px rgba(139,115,85,.12)}
.esh-search-input::placeholder{color:#a09888}
.esh-search-icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:#a09888;pointer-events:none;z-index:1}
.esh-single-search-bar{margin-bottom:20px}
.esh-mini-search-wrap .esh-search-input{border-right:none;border-radius:8px 0 0 8px}
.esh-mini-search-btn{flex-shrink:0;padding:0 22px;height:50px;font-family:"Lora",Georgia,serif;font-size:.9rem;font-weight:600;border:2px solid #8b7355;border-left:none;border-radius:0 8px 8px 0;background:#8b7355;color:#fff;cursor:pointer;transition:background .15s}
.esh-mini-search-btn:hover{background:#3d3428;border-color:#3d3428}

/* FILTERS */
.esh-filters{margin-bottom:24px}
.esh-categories{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.esh-cat-btn,.esh-letter-btn{display:inline-block;padding:5px 14px;font-size:.82rem;font-family:"Lora",Georgia,serif;border:1px solid #d4cec4;border-radius:20px;background:#fff;color:#5c5040;cursor:pointer;transition:all .15s;line-height:1.4}
.esh-cat-btn:hover,.esh-letter-btn:hover{background:#f0ece5;border-color:#b0a590}
.esh-cat-btn.active,.esh-letter-btn.active{background:#3d3428;color:#fff;border-color:#3d3428}
.esh-letters{display:flex;flex-wrap:wrap;gap:4px}
.esh-letter-btn{padding:4px 10px;font-size:.8rem;min-width:32px;text-align:center;border-radius:4px}

/* RESULTS */
.esh-results{min-height:200px}
.esh-loading{text-align:center;padding:48px 0;color:#a09888;font-style:italic}
.esh-no-results{text-align:center;padding:48px 0;color:#7a7060}
.esh-not-found{color:#7a7060;padding:24px 0}

/* LIST ROWS */
a.esh-row{display:flex;align-items:center;gap:16px;padding:14px 20px;text-decoration:none;color:#2c2c2c;border-bottom:1px solid #ebe7e0;background:#fff;transition:all .15s}
a.esh-row:hover{background:#fdfcfa;border-left:3px solid #8b7355;padding-left:17px}
.esh-row-left{flex:0 0 260px}
.esh-row-script{font-family:'EsharicScript',serif;font-size:1.3rem;color:#3d3428}
.esh-row-word{font-size:1.1rem;color:#1a1a1a}
.esh-row-pron{font-size:.82rem;color:#7a7060;font-style:italic}
.esh-row-pos{font-size:.72rem;color:#a09888;background:#f5f2ed;padding:1px 6px;border-radius:3px;font-family:monospace;margin-left:2px}
.esh-row-def{flex:1;font-size:.92rem;color:#5c5040;line-height:1.5}
.esh-row-eng-lbl{font-weight:600;color:#8b7355;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em}
.esh-row-right{flex:0 0 auto;display:flex;align-items:center;gap:8px}
.esh-row-cat{font-size:.68rem;background:#ece8e0;color:#5c5040;padding:2px 8px;border-radius:10px;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.esh-row-arrow{color:#b0a590;flex-shrink:0}

/* SINGLE PAGE */
.esh-single{max-width:780px}
.esh-back{margin-bottom:16px}
.esh-back a{font-size:.9rem;color:#8b7355;text-decoration:none}
.esh-back a:hover{color:#3d3428}
.esh-s-head{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #e0d8cf}
.esh-s-script{font-family:'EsharicScript',serif;font-size:3rem;color:#3d3428;line-height:1.2;margin-bottom:8px}
.esh-s-term{font-size:2rem;font-weight:700;color:#1a1a1a;margin:0 0 6px;display:inline}
.esh-s-pron{font-size:1.1rem;color:#7a7060;font-style:italic;margin-left:10px}
.esh-s-pos{font-size:.9rem;color:#a09888;background:#f5f2ed;padding:2px 10px;border-radius:4px;font-family:monospace;margin-left:8px}

/* AUDIO ROW — Esharic only, never rendered for glossary */
.esh-audio-row{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}
.esh-audio-btn,.esh-llm-btn{display:inline-flex;align-items:center;gap:6px;padding:10px 18px;font-family:"Lora",Georgia,serif;font-size:.88rem;border:1px solid #c8b898;border-radius:6px;cursor:pointer;transition:all .15s}
.esh-audio-btn{background:#faf8f4;color:#3d3428}
.esh-audio-btn:hover{background:#f0ece5;border-color:#8b7355}
.esh-audio-btn.loading{opacity:.6;pointer-events:none}
/* LLM button — slightly different colour to distinguish from audio */
.esh-llm-btn{background:#f4f0fa;color:#3d2860;border-color:#c4b4e0}
.esh-llm-btn:hover{background:#ede5f8;border-color:#8b6fc8}

/* LLM PANEL — Esharic only */
.esh-llm-panel{margin-bottom:24px;border:1px solid #c4b4e0;border-radius:10px;background:#faf7ff;overflow:hidden}
.esh-llm-header{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;background:#ede5f8;border-bottom:1px solid #c4b4e0}
.esh-llm-title{font-size:.92rem;font-weight:700;color:#3d2860}
.esh-llm-close{background:none;border:none;font-size:1rem;color:#7a6890;cursor:pointer;padding:2px 6px;border-radius:4px}
.esh-llm-close:hover{background:#c4b4e0;color:#3d2860}
.esh-llm-question-row{display:flex;gap:0;padding:14px 18px;border-bottom:1px solid #e8e0f4}
.esh-llm-input{flex:1;padding:10px 14px;font-family:"Lora",Georgia,serif;font-size:.92rem;border:1px solid #c4b4e0;border-radius:6px 0 0 6px;outline:0;background:#fff;color:#2c2c2c}
.esh-llm-input:focus{border-color:#8b6fc8;box-shadow:0 0 0 2px rgba(139,111,200,.15)}
.esh-llm-ask{padding:10px 20px;font-family:"Lora",Georgia,serif;font-size:.88rem;font-weight:600;border:1px solid #8b6fc8;border-left:none;border-radius:0 6px 6px 0;background:#8b6fc8;color:#fff;cursor:pointer;white-space:nowrap;transition:background .15s}
.esh-llm-ask:hover{background:#6b4faa}
.esh-llm-response{padding:18px 20px;font-size:.95rem;color:#3d3428;line-height:1.7;min-height:60px}
.esh-llm-response p{margin:0 0 12px}
.esh-llm-response p:last-child{margin-bottom:0}
.esh-llm-loading{color:#7a6890;font-style:italic;text-align:center;padding:20px 0}
.esh-llm-error{color:#b32d2e;font-size:.88rem}
/* Animated dots */
.esh-llm-dots::after{content:'...';animation:esh-dots 1.2s steps(3,end) infinite}
@keyframes esh-dots{0%,20%{color:transparent;text-shadow:.25em 0 0 transparent,.5em 0 0 transparent}40%{color:#7a6890;text-shadow:.25em 0 0 transparent,.5em 0 0 transparent}60%{text-shadow:.25em 0 0 #7a6890,.5em 0 0 transparent}80%,100%{text-shadow:.25em 0 0 #7a6890,.5em 0 0 #7a6890}}

.esh-s-def{font-size:1.15rem;color:#3d3428;line-height:1.65;margin-bottom:24px}
.esh-s-section{margin-bottom:24px;padding:18px 22px;background:#faf8f4;border-radius:8px;border:1px solid #ece8e0}
.esh-s-section h3{font-size:.85rem;font-weight:700;color:#3d3428;margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid #e0d8cf;text-transform:uppercase;letter-spacing:.04em}
.esh-s-section p{margin:0 0 8px;font-size:.95rem;color:#4a4030;line-height:1.6}
.esh-s-section p:last-child{margin-bottom:0}
.esh-s-row{font-size:.95rem;color:#4a4030;margin-bottom:8px;line-height:1.55}
.esh-s-row:last-child{margin-bottom:0}
.esh-s-label{font-weight:600;color:#3d3428}
.esh-s-example{padding:12px 16px;background:#fff;border-radius:5px;border-left:3px solid #c8b898;margin-bottom:10px}
.esh-s-esh{display:block;font-style:italic;color:#3d3428;font-weight:600;font-size:1rem}
.esh-s-eng{display:block;color:#7a7060;font-size:.92rem;margin-top:3px}
.esh-s-engex{font-size:.92rem;color:#5c5040;font-style:italic;margin:0}
.esh-s-vib{display:flex;gap:16px}
.esh-s-vib-card{flex:1;padding:16px;background:#fff;border:1px solid #e0d8cf;border-radius:8px;text-align:center}
.esh-s-vib-val{display:block;font-size:1.4rem;font-weight:700;color:#3d3428;margin-bottom:4px}
.esh-s-vib-lbl{font-size:.78rem;color:#7a7060;text-transform:uppercase;letter-spacing:.05em}

/* SEE ALSO links */
.esh-s-related{display:flex;flex-wrap:wrap;gap:6px}
.esh-s-rtag{padding:4px 12px;font-size:.82rem;background:#eae4d8;color:#3d3428;border-radius:14px;display:inline-block}
a.esh-s-rtag-link{text-decoration:none;transition:all .15s;border:1px solid transparent}
a.esh-s-rtag-link:hover{background:#3d3428;color:#fff;border-color:#3d3428}
.esh-tag{display:inline-block;margin:8px 4px 0;padding:2px 10px;font-size:.72rem;background:#ece8e0;color:#5c5040;border-radius:12px;text-transform:uppercase;letter-spacing:.06em}

/* PAGINATION */
.esh-pagination{display:flex;justify-content:center;gap:4px;padding:24px 0}
.esh-pagination button{padding:6px 14px;font-size:.88rem;font-family:"Lora",Georgia,serif;border:1px solid #d4cec4;border-radius:4px;background:#fff;color:#5c5040;cursor:pointer;transition:all .15s}
.esh-pagination button:hover{background:#f0ece5}
.esh-pagination button.active{background:#3d3428;color:#fff;border-color:#3d3428}
.esh-pagination button:disabled{opacity:.4;cursor:default}

@media(max-width:768px){
    .esh-lexicon{padding:12px}
    .esh-title{font-size:1.7rem}
    a.esh-row{flex-direction:column;gap:6px;align-items:flex-start}
    .esh-row-left{flex:none;width:100%}
    .esh-row-right{width:100%;justify-content:space-between}
    .esh-row-arrow{display:none}
    .esh-s-term{font-size:1.5rem;display:block}
    .esh-s-pron{margin-left:0;display:block;margin-top:4px}
    .esh-s-vib{flex-direction:column}
    .esh-audio-row{flex-direction:column}
    .esh-tabs{flex-direction:column}
    .esh-llm-question-row{flex-direction:column;gap:8px}
    .esh-llm-input{border-radius:6px;border-right:1px solid #c4b4e0}
    .esh-llm-ask{border-radius:6px;border-left:1px solid #8b6fc8}
}
