/* Heslal Dictionary — public page. Uses the Heslal theme colours when present. */
.hd-dict { --hd-accent: var(--accent, #c8102e); --hd-brand: var(--brand, #0f2147); --hd-line: var(--line, #e3e1da); --hd-muted: var(--muted, #5d6470); --hd-wash: var(--wash, #f6f4ef); }
.hd-dict { margin: 8px 0 24px; }
.hd-search { display: flex; gap: 8px; margin-bottom: 14px; }
.hd-search input { flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 10px 16px; border: 2px solid var(--hd-line); border-radius: 999px; }
.hd-search input:focus { outline: none; border-color: var(--hd-brand); }
.hd-search button { font: inherit; font-weight: 700; background: var(--hd-brand); color: #fff; border: 0; border-radius: 999px; padding: 0 22px; cursor: pointer; }
.hd-search button:hover { background: var(--hd-accent); }

.hd-letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; direction: rtl; }
.hd-letters a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 6px; background: var(--hd-wash); border: 1px solid var(--hd-line); font-size: 18px; font-weight: 600; text-decoration: none; color: inherit; }
.hd-letters a:hover { border-color: var(--hd-accent); color: var(--hd-accent); }
.hd-letters a.is-current { background: var(--hd-accent); border-color: var(--hd-accent); color: #fff; }

.hd-head, .hd-entry { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px 20px; direction: rtl; }
.hd-head { font-weight: 700; font-size: 14px; color: var(--hd-muted); border-bottom: 2px solid currentColor; padding: 0 4px 6px; }
.hd-head span[dir="ltr"] { text-align: left; }
.hd-entry { padding: 14px 4px; border-bottom: 1px solid var(--hd-line); align-items: baseline; }
.hd-entry:target { background: #fff8e1; }
.hd-entry__word { font-size: 22px; font-weight: 700; }
.hd-entry__forms { color: var(--hd-muted); margin-inline-start: 6px; }
.hd-entry__pos { display: inline-block; font-size: 13px; color: var(--hd-accent); font-style: italic; margin-inline-start: 8px; }
.hd-entry__fr, .hd-entry__en { text-align: left; font-size: 17px; }
.hd-entry__lang { display: none; }
.hd-entry__more { grid-column: 1 / -1; }
.hd-entry__example { margin: 6px 0 0; padding: 2px 12px; color: var(--hd-muted); border-inline-start: 3px solid var(--hd-line); }
.hd-entry__example p { margin: 0; }
.hd-entry__ex-ff { text-align: right; }
.hd-entry__ex-tr { text-align: left; font-size: 15px; font-style: italic; margin-top: 2px !important; }
.hd-entry__example a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.hd-entry__example a:hover { color: var(--hd-accent); }
.hd-entry__notes { margin: 4px 0 0; font-size: 15px; color: var(--hd-muted); }
.hd-empty { padding: 24px 4px; color: var(--hd-muted); }
.hd-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; direction: rtl; }
.hd-pager a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--hd-line); border-radius: 6px; text-decoration: none; color: inherit; }
.hd-pager a.is-current { background: var(--hd-brand); color: #fff; border-color: var(--hd-brand); }
.hd-dict.is-loading .hd-results { opacity: .55; transition: opacity .15s; }

@media (max-width: 640px) {
	.hd-head { display: none; }
	.hd-entry { grid-template-columns: minmax(0, 1fr); }
	.hd-entry__fr, .hd-entry__en { display: flex; gap: 10px; align-items: baseline; }
	.hd-entry__cell.is-empty { display: none; }
	.hd-entry__lang { display: inline-block; flex: none; min-width: 64px; font-size: 13px; font-weight: 700; color: var(--hd-muted); }
	.hd-letters a { min-width: 36px; height: 36px; }
}

.hd-entry__variant { display: block; font-size: 15px; color: var(--hd-muted); margin-top: 2px; }
.hd-entry__rel { font-style: italic; color: var(--hd-accent); margin-inline-end: 4px; }
.hd-entry__variant a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }

.hd-entry__fl { font-size: 13px; font-style: italic; color: var(--hd-accent, #c8102e); }

/* Look-up bar on the homepage */
.hd-bar { --hd-brand: var(--brand, #0f2147); --hd-accent: var(--accent, #c8102e); background: var(--hd-brand); color: #fff; padding: 14px 0; border-bottom: 3px solid var(--hd-accent); margin-bottom: var(--gap, 20px); }
.hd-bar__inner { display: flex; align-items: center; gap: 14px; direction: rtl; }
.hd-bar__icon { flex: none; display: inline-flex; color: #fff; opacity: .9; }
.hd-bar__icon:hover { color: var(--gold, #c99a2e); }
.hd-bar .hd-search { flex: 1; min-width: 0; margin: 0; max-width: 720px; }
.hd-bar .hd-search input { border-color: transparent; background: #fff; color: var(--ink, #16181d); font-size: 19px; }
.hd-bar .hd-search input:focus { border-color: var(--gold, #c99a2e); }
.hd-bar .hd-search input::placeholder { color: var(--muted, #5d6470); opacity: 1; }
.hd-bar .hd-search button { background: var(--hd-accent); }
.hd-bar .hd-search button:hover { background: var(--gold, #c99a2e); }
.hd-bar__langs { flex: none; font-size: 13px; opacity: .8; }
@media (max-width: 640px) {
	.hd-bar { padding: 10px 0; }
	.hd-bar__inner { gap: 10px; }
	.hd-bar__langs { display: none; }
	.hd-bar .hd-search input { font-size: 17px; padding: 9px 14px; }
	.hd-bar .hd-search button { padding: 0 16px; }
}
