/* =========================================================================
   Features ported from hawza.net — styled with this theme's palette.
   Colors only come from --wp--preset--color--* so night mode is a variable swap.
   ========================================================================= */

:root {
	--hk-radius: 13px;
	--hk-card: var(--wp--preset--color--base);
	--hk-head: var(--wp--preset--color--card-head);
	--hk-line: var(--wp--preset--color--line);
	--hk-text: var(--wp--preset--color--contrast);
	--hk-strong: var(--wp--preset--color--text-dark);
	--hk-muted: var(--wp--preset--color--muted);
	--hk-accent: var(--wp--preset--color--bronze);
	--hk-link: var(--wp--preset--color--ink);
	--hk-zebra: color-mix(in srgb, var(--wp--preset--color--card-head) 45%, var(--wp--preset--color--base));
}

/* ---------- Night mode ---------- */
html[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--surface: #1C1A17;
	--wp--preset--color--sidebar: #23201C;
	--wp--preset--color--base: #22201C;
	--wp--preset--color--card-head: #2A2621;
	--wp--preset--color--sage: #36312A;
	--wp--preset--color--line: #36312A;
	--wp--preset--color--beige: #302B25;
	--wp--preset--color--bronze: #B89A7C;
	--wp--preset--color--contrast: #E9E3DA;
	--wp--preset--color--text-dark: #F5F1EA;
	--wp--preset--color--ink: #CDB497;
	--wp--preset--color--muted: #A39A8E;
	--hp-bg: #23201C;
	--hp-text: #E9E3DA;
	--hp-track: #36312A;
	--hp-border: var(--hp-track); --hp-icons: var(--hp-text); --hp-time: var(--hp-text); --hp-play-icon: var(--hp-text); --hp-progress: var(--hp-accent);
	--hp-accent: #B89A7C;
}
html[data-theme="dark"] img.custom-logo,
html[data-theme="dark"] .wp-block-site-logo img { filter: invert(.88) sepia(.2); }

/* ---------- Header icons (in the sidebar) ---------- */
.hk-hicons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	color: var(--hk-link);
}
.hk-hicon {
	all: unset;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	color: inherit;
	cursor: pointer;
	transition: opacity .15s;
}
.hk-hicon:hover { opacity: .7; }
.hk-hicon:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: 3px; border-radius: 4px; }
.hk-hicon svg { width: 18px !important; height: 18px !important; flex-shrink: 0; display: block; }
.hk-theme-toggle[aria-pressed="true"] svg { transform: scale(.9) rotate(180deg); }
@media (max-width: 781px) {
	.hk-sidebar .hk-hicons { order: 4; width: 100% !important; justify-content: space-between; padding: 2px 4px 0; }
}

/* ---------- Wide page template ---------- */
.hk-page-wide { max-width: 1044px; margin-inline: auto; padding: 14px 20px; box-sizing: border-box; }
.hk-page-wide .wp-block-post-title { font-size: 24px; margin: 0 0 14px; }
@media (max-width: 600px) { .hk-page-wide { padding: 0 8px; } }

/* ---------- Tables (hwza-table) ---------- */
.hwza-table-container {
	background: var(--hk-card);
	border-radius: var(--hk-radius);
	box-shadow: 0 1px 2px rgba(58, 47, 37, .05);
	overflow-x: auto;
}
.hwza-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	background: transparent;
	margin: 0;
	color: var(--hk-strong);
}
.hwza-table, .hwza-table * { font-family: "Scheherazade New", serif !important; font-weight: 400 !important; }
.hwza-table thead th {
	background: var(--hk-head);
	color: var(--hk-strong);
	font-size: 13px !important;
	font-weight: 600 !important;
	padding: 8px 12px;
	text-align: right;
	border: 0;
}
.hwza-table thead th svg { vertical-align: middle; }
.hwza-table td {
	padding: 8px 12px;
	border: 0;
	border-top: 1px solid color-mix(in srgb, var(--hk-line) 55%, transparent);
	vertical-align: middle;
	overflow-wrap: anywhere;
}
.hwza-table tbody tr:nth-child(even) { background: var(--hk-zebra); }
.hwza-table tbody tr:hover { background: color-mix(in srgb, var(--hk-head) 70%, var(--hk-card)); }
.hwza-table a { color: inherit; text-decoration: none; }
.hwza-table a:hover { color: var(--hk-link); }
.hwza-table .hwza-col-title { width: 50%; font-size: 15px; }
.hwza-table .hwza-col-title a { font-weight: 700 !important; }
.hwza-table .hwza-col-speaker { width: 21%; font-size: 15px; }
.hwza-table .hwza-log-col-topic { width: 16%; font-size: 12px; color: var(--hk-muted); }
.hwza-table .hwza-log-col-date { width: 13%; font-size: 12px; color: var(--hk-muted); white-space: nowrap; }
.hwza-log-table .hwza-log-col-datetime { width: 13%; direction: ltr; text-align: left; white-space: nowrap; font-size: 12px; color: var(--hk-muted); }
.hwza-log-table thead th.hwza-log-col-datetime { text-align: center !important; }
.hwza-table .hwza-empty { text-align: center; padding: 28px; color: var(--hk-muted); }

/* ---------- Toolbar ---------- */
.hwza-log-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 12px;
	color: var(--hk-muted);
	font-size: 14px;
}
.hwza-log-count, .hwza-log-updated { display: inline-flex; align-items: center; gap: 6px; }
.hwza-log-count { color: var(--hk-text); font-weight: 700; }
.hwza-log-refresh {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 50%;
	background: var(--hk-accent); color: var(--hk-strong);
	transition: transform .3s;
}
.hwza-log-refresh:hover { transform: rotate(90deg); color: var(--hk-strong); }

/* ---------- Pagination ---------- */
.hwza-pagination { margin: 18px 0; }
.hwza-page-list { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.hwza-page-list a, .hwza-page-list span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 34px; height: 34px; padding: 0 8px; box-sizing: border-box;
	border-radius: 10px; text-decoration: none; font-size: 15px;
	background: var(--hk-card); color: var(--hk-text);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.hwza-page-list a:hover { background: var(--hk-head); }
.hwza-page-list .is-current { background: var(--hk-accent); color: var(--hk-strong); font-weight: 700; }
.hwza-page-list .dots { background: transparent; box-shadow: none; }

/* ---------- /courses/ ---------- */
.hwza-courses-toolbar { justify-content: space-between; }
.hwza-courses-toolbar > .hwza-log-count { margin-inline-start: 10px; }
.hwza-courses-toolbar .hwza-log-toolbar-actions { margin-left: 10px; display: flex; gap: 8px; align-items: center; }
.hwza-log-table.hwza-courses-table .hwza-col-number { width: 5%; text-align: center; color: var(--hk-muted); }
.hwza-log-table.hwza-courses-table .hwza-col-title { width: 29%; }
.hwza-log-table.hwza-courses-table .hwza-col-speaker { width: 19%; }
.hwza-log-table.hwza-courses-table .hwza-courses-col-cat { width: 17%; text-align: center; font-size: 12px; color: var(--hk-muted); }
.hwza-log-table.hwza-courses-table .hwza-courses-col-updated { width: 12%; white-space: nowrap; text-align: center; font-size: 12px; color: var(--hk-muted); }
.hwza-log-table.hwza-courses-table .hwza-courses-col-dl { width: 18%; min-width: 136px; text-align: center; }
.hwza-log-table.hwza-courses-table thead th:not(.hwza-col-title) { text-align: center !important; }
@media (min-width: 601px) { .hwza-log-table.hwza-courses-table tbody td.hwza-col-speaker { text-align: center !important; } }
.hwza-courses-table .hwza-cat-line { font-size: 12px !important; line-height: 1.6 !important; }
.hwza-courses-table .hwza-cat-line * { font-size: 12px !important; }
.hwza-courses-table .hwza-cat-date-m,
.hwza-courses-table .hwza-cat-line svg { display: none; }
.hwza-courses-dl { display: inline-flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hwza-dl-btn { display: inline-flex; line-height: 0; transition: transform .15s; }
.hwza-dl-btn:hover { transform: translateY(-2px); }

/* ---------- Custom dropdown ---------- */
.hwza-dd { position: relative; display: inline-block; }
.hwza-dd.is-enhanced select { display: none; }
.hwza-dd-btn {
	all: unset;
	box-sizing: border-box;
	display: inline-flex; align-items: center; gap: 8px;
	height: 32px; padding: 0 14px;
	border-radius: 999px;
	background: var(--hk-card);
	color: var(--hk-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	font: 600 13px/1 "Scheherazade New", serif;
	cursor: pointer;
	white-space: nowrap;
}
.hwza-dd-btn:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: 2px; }
.hwza-dd-btn svg { transition: transform .2s; opacity: .7; }
.hwza-dd.is-open .hwza-dd-btn svg { transform: rotate(180deg); }
.hwza-dd-btn:disabled { opacity: .5; cursor: default; }
.hwza-dd-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 60;
	min-width: 100%;
	max-height: 260px;
	overflow: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--hk-card);
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06);
	box-sizing: border-box;
}
.hwza-dd-menu li {
	padding: 7px 12px 7px 28px;
	border-radius: 10px;
	font-size: 14px;
	white-space: nowrap;
	cursor: pointer;
	color: var(--hk-text);
	position: relative;
}
.hwza-dd-menu li:hover, .hwza-dd-menu li:focus { background: var(--hk-head); outline: none; }
.hwza-dd-menu li[aria-selected]::after { content: "✓"; position: absolute; left: 10px; color: var(--hk-link); }

/* ---------- Lists: /history/ /fav/ search ---------- */
.hwza-section-title { font-size: 17px !important; color: var(--hk-muted); margin: 22px 0 10px !important; font-weight: 700; }
.hwza-section-title:first-child { margin-top: 0 !important; }
.hwza-guest-note {
	background: var(--hk-head); border-radius: 10px; padding: 10px 14px;
	font-size: 14px; color: var(--hk-text); margin: 0 0 16px;
}
.hwza-empty { color: var(--hk-muted); font-size: 15px; }
.hwza-fav-list {
	list-style: none; margin: 0 0 20px; padding: 0;
	background: var(--hk-card);
	border-radius: var(--hk-radius);
	box-shadow: 0 1px 2px rgba(58, 47, 37, .05);
	overflow: hidden;
}
.hwza-fav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid color-mix(in srgb, var(--hk-line) 55%, transparent); }
.hwza-fav-item:first-child { border-top: 0; }
.hwza-fav-item[hidden] { display: none; }
.hwza-fav-num { flex-shrink: 0; width: 24px; text-align: center; color: var(--hk-muted); font-size: 14px; }
.hwza-fav-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hwza-fav-title { font-weight: 700; font-size: 16px; text-decoration: none; color: var(--hk-strong); }
.hwza-fav-title:hover { color: var(--hk-link); }
.hwza-fav-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--hk-muted); }
.hwza-fav-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.hwza-fav-meta a { color: inherit; text-decoration: none; }
.hwza-fav-meta a:hover { color: var(--hk-link); }
.hwza-fav-remove { flex-shrink: 0; }
.hwza-fav-list:has(+ .hwza-loadmore-btn) { border-radius: var(--hk-radius) var(--hk-radius) 0 0; margin-bottom: 0; }
.hwza-loadmore-btn {
	display: block; width: 100%; margin: 0 0 20px; padding: 10px;
	background: var(--hk-head); border: 0; border-top: 1px solid var(--hk-line);
	border-radius: 0 0 var(--hk-radius) var(--hk-radius);
	color: var(--hk-text); font: 600 14px "Scheherazade New", serif; cursor: pointer;
}
.hwza-loadmore-btn:hover { background: color-mix(in srgb, var(--hk-head) 70%, var(--hk-line)); }
.hwza-resume-remove-btn {
	all: unset; cursor: pointer; display: inline-flex; padding: 6px; border-radius: 50%; color: var(--hk-muted);
}
.hwza-resume-remove-btn:hover { background: var(--hk-head); color: var(--hk-strong); }

/* Progress */
.hwza-progress-wrap { display: inline-flex; align-items: center; gap: 6px; }
.hwza-progress-bar { width: 90px; height: 5px; border-radius: 5px; background: var(--hk-line); overflow: hidden; display: inline-block; }
.hwza-progress-bar-fill { display: block; height: 100%; background: var(--hk-accent); border-radius: 5px; }
.hwza-progress-percent { font-size: 12px; }

/* ---------- Toggle buttons (listened / favourite) ---------- */
.hwza-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 4px;
	min-width: 32px; height: 32px; padding: 0 8px; box-sizing: border-box;
	border: 1px solid var(--hk-line); border-radius: 10px;
	background: var(--hk-card); color: var(--hk-text);
	font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.hwza-btn:hover { background: var(--hk-head); color: var(--hk-strong); }
.hwza-btn svg { width: 16px; height: 16px; }
.hwza-btn.is-on { background: var(--hk-accent); border-color: var(--hk-accent); color: var(--hk-strong); }
.hwza-fav-btn.is-on svg path { fill: currentColor; }
.hwza-btn.is-copied { border-color: var(--hk-accent); }

/* ---------- Single audio item ---------- */
.page-single-audio { display: flex; flex-direction: column; gap: 14px; }
.page-single-audio > * { margin: 0 !important; }
.hwza-player .row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hwza-player .hk-audio { margin: 0; }
.hwza-audio-size { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--hk-muted); margin-inline-end: auto; }
.hwza-audio-size svg { width: 14px; height: 14px; }
.hwza-fav-wrap { display: inline-flex; }

.hwza-summary-head {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	min-height: 0;
}
.hwza-summary-head:empty { display: none; }
.hwza-dl-wrap { display: flex; gap: 6px; margin-inline-start: auto; }
.hwza-dl-empty { display: none; }

.hwza-meta-bar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.hwza-block .hwza-meta-bar-below { margin-bottom: 10px; }
.hwza-block .hwza-meta-bar-below ul { gap: 2px; }
.hwza-block .hwza-meta-bar-below li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px !important; font-size: 14px; font-weight: 400; color: var(--hk-muted); }
.hwza-meta-bar a { color: inherit; text-decoration: none; }
.hwza-meta-bar a:hover { color: var(--hk-link); }
.hwza-meta-bar .k { display: inline-flex; opacity: .8; }

.hwza-block-inner { display: block; }
.hwza-text-card {
	--hk-text-size: 17px;
	background: var(--hk-card);
	border-radius: var(--hk-radius);
	box-shadow: 0 1px 2px rgba(58, 47, 37, .05);
	padding: 0 0 18px;
	overflow: hidden;
}
.hwza-tabs {
	display: flex; flex-wrap: wrap; gap: 2px;
	background: var(--hk-head);
	padding: 6px 8px 0;
}
.hwza-tab {
	all: unset;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 14px;
	border-radius: 10px 10px 0 0;
	font: 700 15px "Scheherazade New", serif;
	color: var(--hk-muted);
	cursor: pointer;
}
.hwza-tab svg { width: 15px; height: 15px; }
.hwza-tab:hover { color: var(--hk-strong); }
.hwza-tab.active { background: var(--hk-card); color: var(--hk-strong); }
.hwza-tab:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: -2px; }
.hwza-tab-panel { display: none; padding: 4px 22px 0; }
.hwza-tab-panel.active { display: block; }

.hwza-font-controls {
	display: flex; align-items: center; gap: 6px;
	padding: 10px 22px 6px;
	color: var(--hk-muted);
	font-size: 13px;
}
.hwza-fc-spacer { flex: 1; }
.hwza-font-btn, .hwza-copy-inline, .hwza-sync-toggle {
	all: unset; box-sizing: border-box; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 30px; height: 30px; padding: 0 6px;
	border-radius: 8px; color: var(--hk-text);
	font: 700 13px system-ui, sans-serif;
}
.hwza-font-btn:hover, .hwza-copy-inline:hover, .hwza-sync-toggle:hover { background: var(--hk-head); }
.hwza-copy-inline svg { overflow: visible; }
.hwza-copy-inline.hwza-copy-done { color: #4C8A3F; }
.hwza-sync-toggle.is-on { color: #e37070; }
.hwza-font-size-label { min-width: 22px; text-align: center; }
.hwza-read-time { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 10px; }
/* Copy + highlight only make sense on the transcript tab */
.hwza-text-card[data-active-tab]:not([data-active-tab="transcript"]) .hwza-copy-inline,
.hwza-text-card[data-active-tab]:not([data-active-tab="transcript"]) .hwza-sync-toggle { display: none !important; }

.hwza-summary-top { margin: 6px 0 12px; }
.hwza-hl-top, .hwza-hl-idx, .hwza-hl-sum, .hwza-hl-tr {
	display: inline-block;
	background: var(--hk-head);
	border-radius: 8px;
	padding: 2px 10px;
	font-weight: 700;
	color: var(--hk-strong);
	font-size: 15px;
}
.hwza-subtitle { margin: 14px 0 8px; }
.hwza-section-label { display: block; font-weight: 700; color: var(--hk-link); margin: 12px 0 4px; }

.hwza-transcript, .hwza-summary, .idx-line, .hwza-gloss-term, .hwza-gloss-def { font-size: var(--hk-text-size) !important; }
.hwza-transcript { line-height: 2; color: var(--hk-strong); font-weight: 400; }
.hwza-transcript p { margin: 0 0 .9em 0 !important; padding: 0 !important; background: transparent !important; border-radius: 0 !important; line-height: 2; }
.hwza-transcript p:last-child { margin-bottom: 0 !important; }
.hwza-summary { line-height: 2; font-weight: 400; color: var(--hk-strong); }
.hwza-summary p { margin: 0 !important; padding: 0 !important; background: transparent !important; line-height: 2; }
.hwza-box-idx .hwza-summary { display: flex; flex-direction: column; }
.idx-line { display: block; line-height: 1.9; }
.idx-line[data-level="1"] { font-weight: 700; margin-top: 6px; }
.idx-line[data-level="2"] { padding-inline-start: 1.4em; color: var(--hk-muted); }

.hwza-glossary { display: flex; flex-direction: column; gap: 8px; }
.hwza-gloss-item { padding: 8px 12px; background: var(--hk-zebra); border-radius: 10px; line-height: 1.9; }
.hwza-gloss-term { font-weight: 700; color: var(--hk-link); }
.hwza-gloss-sep { margin-inline-end: 6px; }
.hwza-gloss-def { font-weight: 400; }

.hwza-keypoint-item { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.hwza-copy-btn { flex-shrink: 0; border: 1px solid currentColor; background: transparent; color: inherit; opacity: .55; border-radius: 6px; padding: 4px; cursor: pointer; line-height: 0; }
.hwza-copy-btn:hover { opacity: 1; }
.hwza-copy-btn.copied { opacity: 1; color: #4C8A3F; border-color: #4C8A3F; }

.hwza-sync-segment { cursor: pointer; border-radius: 4px; transition: background .2s; }
.hwza-sync-segment:hover { background: color-mix(in srgb, var(--hk-accent) 18%, transparent); }
.hwza-sync-active { background: color-mix(in srgb, var(--hk-accent) 38%, transparent); }
.hwza-sync-disabled .hwza-sync-segment { cursor: text; }
.hwza-sync-disabled .hwza-sync-segment:hover { background: none; }

/* Series navigation */
.hwza-series-nav { margin-top: 18px; }
.hwza-series-nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.hwza-snav-btn, .hwza-snav-series {
	display: flex; align-items: center; gap: 8px;
	padding: 10px 14px; border-radius: var(--hk-radius);
	background: var(--hk-card); color: var(--hk-text);
	text-decoration: none; min-width: 0;
	box-shadow: 0 1px 2px rgba(58, 47, 37, .05);
}
.hwza-snav-next { justify-content: flex-end; text-align: left; }
a.hwza-snav-btn:hover, .hwza-snav-series:hover { background: var(--hk-head); color: var(--hk-strong); }
.hwza-snav-disabled { opacity: .45; }
.hwza-snav-label { display: flex; flex-direction: column; min-width: 0; }
.hwza-snav-tag { font-size: 12px; color: var(--hk-muted); }
.hwza-snav-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hwza-snav-series { flex-direction: column; justify-content: center; gap: 0; text-align: center; }
.hwza-snav-pos { font-size: 13px; color: var(--hk-muted); }
.hwza-snav-series-name { font-size: 14px; font-weight: 700; }
@media (max-width: 600px) {
	.hwza-series-nav-inner { grid-template-columns: 1fr 1fr; }
	.hwza-snav-series { grid-column: 1 / -1; order: -1; }
	.hwza-tab-panel { padding: 4px 14px 0; }
	.hwza-font-controls { padding: 10px 14px 6px; flex-wrap: wrap; }
}

/* ---------- Home tabs ---------- */
.hk-home-tabs { display: flex; gap: 2px; }
.hk-home-tab {
	all: unset; cursor: pointer;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 16px; border-radius: 12px 12px 0 0;
	font: 700 16px "Scheherazade New", serif; color: var(--hk-muted);
}
.hk-home-tab:hover { color: var(--hk-strong); }
.hk-home-tab.is-active { background: var(--hk-head); color: var(--hk-strong); }
.hk-home-tab:focus-visible { outline: 2px solid var(--hk-accent); }
.hk-home-panel { display: none; }
.hk-home-panel.is-active { display: block; }
.hk-home-panel .hwza-table-container { border-start-start-radius: 0; }
.hk-more { display: inline-block; margin: 10px 4px 0; font-size: 15px; color: var(--hk-link); text-decoration: none; }

/* ---------- Archive rows ---------- */
.hk-list .wp-block-post-template > li .wp-block-shortcode { display: contents; }
.hk-row-speaker, .hk-row-series { font-size: 14px; color: var(--hk-muted); }
.hk-row-speaker a, .hk-row-series a { color: inherit; text-decoration: none; }
.hk-row-speaker a:hover, .hk-row-series a:hover { color: var(--hk-link); }

/* ---------- Speakers grid ---------- */
.hk-speakers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hk-speakers a {
	display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
	padding: 16px 12px; border-radius: var(--hk-radius);
	background: var(--hk-card); color: var(--hk-strong); text-decoration: none;
	box-shadow: 0 1px 2px rgba(58, 47, 37, .05);
	transition: transform .15s;
}
.hk-speakers a:hover { transform: translateY(-2px); color: var(--hk-link); }
.hk-sp-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--hk-head); display: flex; align-items: center; justify-content: center; color: var(--hk-muted); }
.hk-sp-name { font-weight: 700; font-size: 15px; }
.hk-sp-count { font-size: 13px; color: var(--hk-muted); }

/* ---------- Advanced search ---------- */
.hk-adv-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.hk-adv-search input[type=search] {
	flex: 1 1 260px; height: 40px; padding: 0 14px; box-sizing: border-box;
	border: 1px solid var(--hk-line); border-radius: 999px;
	background: var(--hk-card); color: var(--hk-strong); font: inherit; font-size: 16px;
}
.hk-adv-search input[type=search]:focus { outline: 2px solid var(--hk-accent); border-color: transparent; }
.hk-adv-search button[type=submit] {
	display: inline-flex; align-items: center; gap: 6px;
	height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
	background: var(--hk-accent); color: var(--hk-strong); font: 700 15px "Scheherazade New", serif; cursor: pointer;
}

/* ---------- Mobile: tables become cards (≤600px) ---------- */
@media (max-width: 600px) {
	.hwza-table-container { background: transparent; box-shadow: none; overflow: visible; }
	.hwza-table thead { display: none; }
	.hwza-table, .hwza-table tbody { display: block; }
	.hwza-table tbody tr {
		display: flex; flex-direction: column; position: relative;
		background: var(--hk-card) !important;
		border-radius: var(--hk-radius);
		box-shadow: 0 1px 2px rgba(58, 47, 37, .05);
		padding: 10px 14px !important;
		margin-bottom: 10px;
	}
	.hwza-table td { display: block; width: 100% !important; border: 0 !important; padding: 0 !important; text-align: right; box-sizing: border-box; }
	.hwza-table td.hwza-col-title { order: 2; padding-bottom: 4px !important; font-size: 16px; }
	.hwza-table td.hwza-col-speaker { order: 3; font-size: 14px; color: var(--hk-muted); }
	.hwza-table td.hwza-log-col-topic { order: 4; font-size: 13px; padding-top: 4px !important; }
	.hwza-table td.hwza-log-col-date,
	.hwza-log-table td.hwza-log-col-datetime { order: 5; text-align: left !important; direction: ltr; font-size: 12px; padding-top: 6px !important; }
	.hwza-table td.hwza-empty { order: 1; text-align: center; }

	.hwza-log-table.hwza-courses-table tbody tr { padding-top: 12px !important; }
	.hwza-log-table.hwza-courses-table td.hwza-col-number { order: 1; position: absolute; top: 12px; right: 12px; width: auto !important; font-size: 13px; }
	.hwza-log-table.hwza-courses-table td.hwza-col-title { padding: 0 28px 4px 0 !important; }
	.hwza-log-table.hwza-courses-table td.hwza-courses-col-cat { order: 4; text-align: right !important; direction: rtl; padding-top: 4px !important; }
	.hwza-log-table.hwza-courses-table td.hwza-courses-col-updated { display: none !important; }
	.hwza-log-table.hwza-courses-table td.hwza-courses-col-dl { order: 6; padding-top: 8px !important; }
	.hwza-courses-dl { justify-content: flex-start; }
	.hwza-courses-table .hwza-cat-line { display: flex; flex-wrap: wrap; gap: 4px 12px; }
	.hwza-courses-table .hwza-cat-date-m, .hwza-courses-table .hwza-cat-main, .hwza-courses-table .hwza-cat-sub { display: inline-flex; align-items: center; gap: 4px; }
	.hwza-courses-table .hwza-cat-sep { display: none; }
	.hwza-courses-table .hwza-cat-line svg { display: inline-block; }

	.hwza-log-toolbar { justify-content: center; }
	.hwza-courses-toolbar { justify-content: space-between; }
	.hwza-fav-item { align-items: flex-start; }
}

/* ---------- Section / course / speaker pages ---------- */
.hk-tax-header { margin: 0 0 16px; }
.hk-tax-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hk-tax-title { font-size: 26px !important; margin: 0 !important; color: var(--hk-strong); }
.hk-tax-desc { color: var(--hk-muted); font-size: 15px; margin-top: 6px; }
.hk-tax-desc p { margin: 0 0 .5em; }
.hwza-series-meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--hk-muted); font-size: 15px; }
.hwza-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.hwza-meta-item a { color: inherit; text-decoration: none; }
.hwza-meta-item a:hover { color: var(--hk-link); }
.hwza-series-combined-doc { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 8px 12px; background: var(--hk-head); border-radius: 10px; width: fit-content; }
.hwza-series-combined-label { font-size: 14px; color: var(--hk-text); margin-inline-end: 4px; }
.hwza-stat-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 12px; border-radius: 999px;
	background: var(--hk-card); color: var(--hk-text); font-size: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.hk-topic-toolbar { justify-content: space-between; }
.hwza-sort-btn {
	display: inline-flex; align-items: center; gap: 6px;
	height: 32px; padding: 0 12px; border-radius: 999px;
	background: var(--hk-card); color: var(--hk-text); text-decoration: none; font-size: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.hwza-sort-btn:hover, .hwza-sort-btn.active { background: var(--hk-accent); color: var(--hk-strong); }

.hwza-table .hwza-col-number { width: 48px; text-align: center; color: var(--hk-muted); font-size: 13px; }
.hwza-table .hwza-col-count { width: 110px; text-align: center; font-size: 14px; color: var(--hk-muted); }
.hwza-table thead th.hwza-col-count, .hwza-table thead th.hwza-col-date { text-align: center; }
.hwza-table .hwza-col-date { width: 110px; text-align: center; font-size: 12px; color: var(--hk-muted); white-space: nowrap; }
.hwza-sections-table .hwza-col-title, .hwza-topic-series-table .hwza-col-title, .hwza-speaker-series-table .hwza-col-title, .hwza-posts-table .hwza-col-title { width: auto; }
.hwza-topic-series-table .hwza-col-speaker { width: 26%; }
.hwza-series-title a, .hwza-lesson-title { font-weight: 700 !important; font-size: 15px; }
.hwza-series-meta { margin-top: 2px; }
.hwza-meta-count { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--hk-muted); }
.hwza-speaker-series-path { font-size: 12px; color: var(--hk-muted); margin-top: 2px; }
.hwza-path-sep { margin: 0 3px; }
.hwza-lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.hwza-lesson-meta .hwza-btn { min-width: 28px; height: 28px; padding: 0 6px; }
.hwza-lesson-meta .hwza-btn svg { width: 14px; height: 14px; }
.hwza-lesson-meta .hwza-file-ico { width: 22px; height: 22px; }
.hwza-audio-dur { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--hk-muted); direction: ltr; }
.hwza-lesson-meta .hwza-audio-size { margin: 0; font-size: 12px; direction: ltr; }
.hwza-date-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; background: var(--hk-head); font-size: 12px; }

.hk-speaker-header { display: flex; align-items: center; gap: 16px; }
.hk-speaker-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--hk-head); }
.hk-no-photo { display: flex; align-items: center; justify-content: center; color: var(--hk-muted); }
.hk-speaker-tabs { margin-top: 4px; }
.hk-speaker-bio { padding: 22px 26px; line-height: 2; font-weight: 400; }
.hwza-section-title svg { vertical-align: -2px; }

@media (max-width: 600px) {
	.hwza-table td.hwza-col-number { position: absolute; top: 10px; right: 12px; width: auto !important; font-size: 12px; }
	.hwza-table tbody tr:has(td.hwza-col-number) td.hwza-col-title { padding-right: 26px !important; }
	.hwza-table td.hwza-col-count { order: 4; text-align: right !important; font-size: 13px; }
	.hwza-table td.hwza-col-count::before { content: attr(data-label) ": "; }
	.hwza-table td.hwza-col-date { order: 5; text-align: left !important; padding-top: 4px !important; }
	.hwza-topic-series-table td.hwza-col-speaker { order: 3; }
	.hk-tax-title { font-size: 22px !important; }
}

/* ---------- Breadcrumbs ---------- */
.hk-breadcrumbs { margin: 0 0 14px !important; font-size: 14px; font-weight: 400; color: var(--hk-muted); }
.hk-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.hk-breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.hk-breadcrumbs li + li::before { content: "›"; margin: 0 8px; opacity: .55; } /* mirrors to ‹ in RTL */
.hk-breadcrumbs a { color: inherit; text-decoration: none; }
.hk-breadcrumbs a:hover { color: var(--hk-link); text-decoration: underline; text-underline-offset: 3px; }
.hk-breadcrumbs [aria-current] { color: var(--hk-text); max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .hk-breadcrumbs { font-size: 13px; } .hk-breadcrumbs [aria-current] { max-width: 28ch; } }

/* Slate blue only for small details */
.hwza-meta-bar .k, .hwza-fav-meta svg, .hwza-meta-item svg, .hwza-log-count svg, .hwza-stat-chip svg, .hwza-cat-line svg { color: var(--hk-link); }
.hwza-table .hwza-col-number { color: var(--hk-link); opacity: .75; }
.hk-breadcrumbs [aria-current] { color: var(--hk-link); }
.hwza-tab.active, .hk-home-tab.is-active { box-shadow: inset 0 -2px 0 var(--hk-link); }

/* ---------- Content boxes from the publishing app ---------- */
.hwza-section-label { display: block; }
.hwza-section-label[data-label]:empty::before { content: attr(data-label); }
.hwza-summary-box { border-radius: 10px; padding: 12px 16px; margin: 8px 0 14px; border-inline-start: 3px solid transparent; }
.hwza-box-sum { background: color-mix(in srgb, var(--hk-head) 70%, var(--hk-card)); border-inline-start-color: var(--hk-accent); }
.hwza-box-idx { background: color-mix(in srgb, var(--hk-line) 30%, var(--hk-card)); border-inline-start-color: var(--hk-link); }
.hwza-box-gloss { background: transparent; padding: 0; }
.hwza-keypoint-text { font-weight: 400; line-height: 1.9; font-size: var(--hk-text-size); }
.hwza-tab[hidden] { display: none; }

/* Source attachments */
.hwza-summary-head { flex-wrap: wrap; }
.hwza-source-files { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hwza-source-files-label { font-size: 13px; color: var(--hk-muted); }
.hwza-source-file-badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px;
	border: 1px solid var(--hk-line); border-radius: 999px; background: var(--hk-card);
	font-size: 13px; color: var(--hk-text); text-decoration: none; max-width: 100%;
}
.hwza-source-file-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hwza-source-file-badge:hover { border-color: var(--hk-accent); color: var(--hk-strong); }
.hwza-source-file-badge .hwza-file-ico { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Speaker books ---------- */
.hk-books { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.hk-book { all: unset; cursor: pointer; flex: 0 0 130px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.hk-book img, .hk-book-nocover {
	width: 130px; height: 180px; object-fit: cover; border-radius: 8px;
	background: var(--hk-head); box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
	display: flex; align-items: center; justify-content: center; color: var(--hk-muted);
	transition: transform .15s;
}
.hk-book:hover img, .hk-book:hover .hk-book-nocover { transform: translateY(-3px); }
.hk-book:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: 3px; border-radius: 8px; }
.hk-book-title { font-size: 14px; font-weight: 700; color: var(--hk-strong); line-height: 1.4; }
.hk-book-dialog { border: 0; border-radius: 16px; padding: 0; max-width: min(560px, calc(100vw - 32px)); background: var(--hk-card); color: var(--hk-text); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.hk-book-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.hk-book-dialog-inner { position: relative; padding: 22px; }
.hk-book-close { all: unset; cursor: pointer; position: absolute; top: 10px; left: 14px; font-size: 26px; line-height: 1; color: var(--hk-muted); }
.hk-book-body { display: flex; gap: 18px; align-items: flex-start; }
.hk-book-cover { width: 140px; border-radius: 8px; flex-shrink: 0; }
.hk-book-body h3 { margin: 0 0 6px; font-size: 20px; color: var(--hk-strong); }
.hk-book-facts { color: var(--hk-muted); font-size: 14px; margin: 0 0 8px; }
.hk-book-desc { font-weight: 400; line-height: 1.9; margin: 0 0 12px; }
.hk-book-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.hk-book-dl { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 10px; background: var(--hk-accent); color: var(--hk-strong); text-decoration: none; font-weight: 700; font-size: 14px; }
.hk-book-dl small { font-weight: 400; font-size: 11px; opacity: .8; }
@media (max-width: 600px) { .hk-book-body { flex-direction: column; align-items: center; text-align: center; } .hk-book-parts { justify-content: center; } }

/* ---------- Speakers table ---------- */
.hwza-speakers-toolbar { justify-content: space-between; }
.hwza-sort-buttons, .hwza-speakers-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.hwza-sort-buttons .hwza-sort-btn { width: 34px; padding: 0; justify-content: center; }
.hwza-speakers-table .hwza-col-title { width: auto; }
.hwza-speaker-row { display: flex; align-items: center; gap: 12px; }
.hwza-speaker-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; background: var(--hk-head); }
.hwza-speaker-img.no-photo { display: flex; align-items: center; justify-content: center; color: var(--hk-muted); }
.hwza-speaker-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hwza-speaker-name { font-weight: 700 !important; font-size: 16px; }
.hwza-speaker-stats { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hk-muted); }
.hwza-stat-item { display: inline-flex; align-items: center; gap: 4px; }
.hwza-stat-item svg { color: var(--hk-link); }
.hwza-stat-sep { opacity: .4; }

/* ---------- Home ---------- */
.hk-home-tabs-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hk-home-updates-title { margin: 0 0 6px !important; font-size: 20px !important; color: var(--hk-strong); }
.hk-home .hwza-section { margin-bottom: 22px; }
.hk-home .hwza-section .hwza-section-title { margin-top: 6px !important; }
.hwza-home-table .hwza-col-image { width: 52px; text-align: center; padding-inline: 8px; }
.hwza-home-table .hwza-col-image .hwza-speaker-img { width: 34px; height: 34px; margin: 0 auto; }
.hwza-home-table .hwza-col-title { width: auto; }
.hwza-home-table .hwza-col-speaker { width: 20%; }
.hwza-home-table .hwza-log-col-topic { width: 18%; }
.hwza-count { color: var(--hk-muted); font-size: 12px; }
.hwza-lesson-icon { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--hk-head); color: var(--hk-link); }
@media (max-width: 600px) {
	.hwza-home-table td.hwza-col-image { display: none !important; }
	.hk-home-tabs-row { align-items: center; }
}

/* Home: "جديد" sits right beside the tabs, small and quiet */
.hk-home-tabs-row { justify-content: flex-start; align-items: center; gap: 4px 14px; }
.hk-home-updates-title {
	margin: 0 !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: var(--hk-link);
	letter-spacing: .2px;
	padding-inline-end: 14px;
	border-inline-end: 1px solid var(--hk-line);
	line-height: 1.6;
}

/* ---------- Glossary ---------- */
.hk-glossary .hwza-stat-chip b { color: var(--hk-link); font-weight: 700; }
.hk-gloss-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 14px; }
.hk-gloss-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--hk-card); border: 1px solid var(--hk-line); color: var(--hk-muted); }
.hk-gloss-search:focus-within { border-color: var(--hk-accent); }
.hk-gloss-search input { all: unset; flex: 1; font: inherit; font-size: 16px; color: var(--hk-strong); }
.hk-gloss-defs { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--hk-text); cursor: pointer; }
.hk-gloss-defs input { accent-color: var(--hk-accent); width: 16px; height: 16px; }
.hk-gloss-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.hk-gloss-filter { all: unset; cursor: pointer; padding: 5px 14px; border-radius: 999px; font-size: 14px; color: var(--hk-text); background: var(--hk-card); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.hk-gloss-filter:hover { background: var(--hk-head); }
.hk-gloss-filter.is-active { background: var(--hk-accent); color: var(--hk-strong); font-weight: 700; }
.hk-gloss-filter:focus-visible, .hk-alpha-btn:focus-visible { outline: 2px solid var(--hk-link); outline-offset: 2px; }

.hk-alpha { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; }
.hk-alpha-btn { all: unset; cursor: pointer; min-width: 34px; height: 38px; padding: 2px 4px; box-sizing: border-box; border-radius: 9px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-size: 16px; font-weight: 700; color: var(--hk-strong); background: var(--hk-card); }
.hk-alpha-btn small { font-size: 9px; font-weight: 400; color: var(--hk-muted); }
.hk-alpha-btn:hover { background: var(--hk-head); }
.hk-alpha-btn.is-active { background: var(--hk-link); color: var(--hk-card); }
.hk-alpha-btn.is-active small { color: inherit; opacity: .75; }
.hk-alpha-btn:disabled { opacity: .3; cursor: default; background: transparent; }
.hk-gloss-main { transition: opacity .15s; }

.hk-gloss-letter { margin-bottom: 26px; }
.hk-gloss-letter-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hk-gloss-badge { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--hk-head); color: var(--hk-link); font-size: 18px; font-weight: 700; }
.hk-gloss-line { flex: 1; height: 1px; background: linear-gradient(to left, var(--hk-line), transparent); }
.hk-gloss-count { font-size: 12px; color: var(--hk-muted); }
.hk-gloss-list { display: flex; flex-direction: column; gap: 6px; }
.hk-gloss-card { background: var(--hk-card); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.hk-gloss-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.hk-gloss-card > summary::-webkit-details-marker { display: none; }
.hk-gloss-term { font-weight: 700; font-size: 16px; color: var(--hk-strong); }
.hk-gloss-side { display: inline-flex; align-items: center; gap: 6px; color: var(--hk-muted); }
.hk-gloss-side > svg { transition: transform .2s; }
.hk-gloss-card[open] .hk-gloss-side > svg { transform: rotate(180deg); }
.hk-gloss-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--hk-head); color: var(--hk-text); }
.hk-gloss-tag-lecture { background: color-mix(in srgb, var(--hk-link) 15%, var(--hk-card)); }
.hk-gloss-tag-farsi { background: color-mix(in srgb, var(--hk-accent) 30%, var(--hk-card)); }
.hk-gloss-n { min-width: 20px; height: 20px; border-radius: 999px; background: var(--hk-link); color: var(--hk-card); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.hk-gloss-copy { border: 0 !important; padding: 4px !important; }
.hk-gloss-body { padding: 0 14px 12px; border-top: 1px solid color-mix(in srgb, var(--hk-line) 60%, transparent); }
.hk-gloss-entry { padding-top: 10px; }
.hk-gloss-entry + .hk-gloss-entry { border-top: 1px dashed color-mix(in srgb, var(--hk-line) 60%, transparent); margin-top: 10px; }
.hk-gloss-def { margin: 0 0 6px; font-weight: 400; line-height: 1.9; color: var(--hk-strong); }
.hk-gloss-def b { color: var(--hk-muted); }
.hk-gloss-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--hk-muted); }
.hk-gloss-meta > * { display: inline-flex; align-items: center; gap: 4px; }
.hk-gloss-meta a { color: var(--hk-link); text-decoration: none; }
.hk-gloss-meta a:hover { text-decoration: underline; }
@media (max-width: 600px) { .hk-alpha-btn { min-width: 30px; height: 34px; font-size: 15px; } .hk-gloss-tag { display: none; } }

/* =====================================================================
   Minimal look: fewer fills, no stripes, no shadows — thin lines instead.
   ===================================================================== */
.hwza-table-container, .hwza-fav-list, .hwza-text-card, .hk-article, .hk-gloss-card,
.hwza-snav-btn, .hwza-snav-series, .hk-speakers a, .hwza-page-list a, .hwza-page-list span,
.hwza-stat-chip, .hwza-sort-btn, .hwza-dd-btn, .hk-gloss-filter, .hk-alpha-btn, .hk-card, .hk-list .wp-block-post-template > li {
	box-shadow: none !important;
}
.hwza-table-container, .hwza-fav-list, .hwza-text-card, .hk-article, .hk-gloss-card,
.hwza-snav-btn, .hwza-snav-series, .hk-speakers a { border: 1px solid var(--hk-line); }
.hwza-page-list a, .hwza-page-list span:not(.dots), .hwza-stat-chip, .hwza-sort-btn, .hwza-dd-btn,
.hk-gloss-filter, .hk-alpha-btn:not(:disabled) { border: 1px solid var(--hk-line); }

/* tables: no stripes, quiet header */
.hwza-table tbody tr:nth-child(even) { background: transparent; }
.hwza-table tbody tr:hover { background: color-mix(in srgb, var(--hk-line) 25%, transparent); }
.hwza-table thead th { background: transparent; color: var(--hk-muted); font-size: 12px !important; border-bottom: 1px solid var(--hk-line); }
.hwza-table td { border-top-color: color-mix(in srgb, var(--hk-line) 70%, transparent); }

/* tabs: underline instead of fill */
.hwza-tabs { background: transparent; border-bottom: 1px solid var(--hk-line); padding: 4px 8px 0; }
.hwza-tab, .hk-home-tab { border-radius: 0 !important; background: transparent !important; }
.hwza-tab.active, .hk-home-tab.is-active { color: var(--hk-strong); box-shadow: inset 0 -2px 0 var(--hk-accent) !important; }
.hk-home-panel .hwza-table-container { border-start-start-radius: var(--hk-radius); }

/* sidebar: separated by a hairline, active item quiet */
.hk-sidebar { border-left: 1px solid var(--hk-line) !important; }
.hk-sidebar__nav .is-active > .wp-block-navigation-item__content { background: transparent !important; box-shadow: inset -2px 0 0 var(--hk-accent) !important; }
.hp { box-shadow: none !important; }

/* small boxes */
.hwza-box-sum, .hwza-box-idx { background: transparent; }
.hwza-gloss-item { background: transparent; border-bottom: 1px solid color-mix(in srgb, var(--hk-line) 70%, transparent); border-radius: 0; }
.hwza-date-badge, .hk-gloss-tag { background: transparent; border: 1px solid var(--hk-line); }
.hwza-lesson-icon, .hk-gloss-badge, .hwza-speaker-img.no-photo, .hk-sp-avatar { background: transparent; border: 1px solid var(--hk-line); }
.hwza-page-list .is-current, .hwza-sort-btn.active, .hk-gloss-filter.is-active { background: var(--hk-accent); border-color: var(--hk-accent); color: #fff; }
.hk-alpha-btn.is-active { background: var(--hk-strong); color: var(--hk-card); }

/* ---------- Accounts ---------- */
.hk-auth { max-width: 460px; margin: 0 auto; }
.hk-auth .hk-home-tabs { margin-bottom: 0; }
.hk-form { display: flex; flex-direction: column; gap: 12px; background: var(--hk-card); border: 1px solid var(--hk-line); border-radius: var(--hk-radius); padding: 20px; }
.hk-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--hk-muted); }
.hk-field input { height: 42px; padding: 0 12px; border: 1px solid var(--hk-line); border-radius: 10px; background: var(--wp--preset--color--surface); color: var(--hk-strong); font: inherit; font-size: 16px; }
.hk-field input:focus { outline: 2px solid var(--hk-accent); border-color: transparent; }
.hk-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--hk-text); }
.hk-check input { accent-color: var(--hk-accent); }
.hk-btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--hk-accent); color: #fff; font: 700 16px "Scheherazade New", serif; cursor: pointer; text-decoration: none; }
.hk-btn:hover { filter: brightness(1.08); color: #fff; }
.hk-btn:disabled { opacity: .6; cursor: default; }
.hk-btn:focus-visible { outline: 2px solid var(--hk-link); outline-offset: 2px; }
.hk-trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.hk-notice { padding: 10px 14px; border-radius: 10px; font-size: 15px; margin: 0 0 14px; border: 1px solid; }
.hk-notice-err { color: #8A2E1F; border-color: #E2B8AE; background: #F6E3DD; }
.hk-notice-ok { color: #2F5B2A; border-color: #BCD3B2; background: #E6EFDF; }
html[data-theme="dark"] .hk-notice-err { color: #F2C3B8; background: #3A2420; border-color: #5C3A33; }
html[data-theme="dark"] .hk-notice-ok { color: #C9E3BF; background: #24331F; border-color: #3C5233; }
.hk-account-box { margin: 18px 0; }
.hk-account-box h3 { font-size: 17px !important; margin: 0 0 8px !important; color: var(--hk-muted); }
.hk-logout { color: var(--hk-link); font-size: 15px; }
a.hwza-stat-chip { text-decoration: none; }

/* ---------- Error report ---------- */
.hk-report { margin-top: 14px; }
.hk-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hk-report-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--hk-link); }
.hk-report-toggle:disabled { cursor: default; opacity: .6; }
.hk-report-toggle:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: 3px; border-radius: 4px; }
.hk-report-note { font-size: 14px; color: var(--hk-muted); }
.hk-report-form { margin-top: 10px; padding: 16px; border: 1px solid var(--hk-line); border-radius: var(--hk-radius); background: var(--hk-card); display: flex; flex-direction: column; gap: 10px; }
.hk-report-form[hidden] { display: none; }
.hk-report-pairs { display: flex; flex-direction: column; gap: 8px; }
.hk-report-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hk-report-pair label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--hk-muted); }
.hk-report-pair input { height: 38px; padding: 0 10px; border: 1px solid var(--hk-line); border-radius: 8px; background: var(--wp--preset--color--surface); color: var(--hk-strong); font: inherit; font-size: 15px; }
.hk-report-add { all: unset; cursor: pointer; font-size: 14px; color: var(--hk-link); width: fit-content; }
.hk-report-actions { display: flex; align-items: center; gap: 12px; }
.hk-report-msg { font-size: 14px; }
.hk-report-msg.is-ok { color: #2F5B2A; }
.hk-report-msg.is-err { color: #8A2E1F; }
@media (max-width: 600px) { .hk-report-pair { grid-template-columns: 1fr; } }

/* ---------- Colour tuner ---------- */
.hk-tuner { position: fixed; z-index: 120; left: 16px; bottom: calc(var(--hp-space, 100px) + 4px); font-family: system-ui, sans-serif; direction: rtl; }
.hk-tuner-fab { all: unset; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--hk-accent); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.hk-tuner-fab:focus-visible { outline: 2px solid var(--hk-link); outline-offset: 3px; }
.hk-tuner-body { position: fixed; left: 16px; bottom: calc(var(--hp-space, 100px) + 58px); width: min(300px, calc(100vw - 32px)); box-sizing: border-box; max-height: min(70vh, 620px); overflow: auto; padding: 14px; border-radius: 14px; background: #fffdf9; color: #2b2620; box-shadow: 0 12px 40px rgba(0,0,0,.22); font-size: 13px; }
.hk-tuner-body[hidden] { display: none; }
.hk-tuner-top { display: flex; flex-direction: column; margin-bottom: 10px; }
.hk-tuner-top b { font-size: 15px; }
.hk-tuner-sub { color: #7a7065; font-size: 12px; }
.hk-tuner-preset { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.hk-tuner-preset select { height: 32px; border: 1px solid #ddd3c4; border-radius: 8px; background: #fff; font: inherit; }
.hk-tuner-rows { display: flex; flex-direction: column; gap: 6px; }
.hk-tuner-row { display: grid; grid-template-columns: 1fr 34px 78px; align-items: center; gap: 6px; }
.hk-tuner-row input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid #ddd3c4; border-radius: 6px; background: none; cursor: pointer; }
.hk-tuner-row input[type=text] { height: 28px; border: 1px solid #ddd3c4; border-radius: 6px; padding: 0 6px; font: 12px ui-monospace, monospace; text-transform: uppercase; }
.hk-tuner-checks { display: flex; flex-direction: column; gap: 2px; margin: 10px 0; font-size: 12px; }
.hk-tuner-checks .ok { color: #2f6a2a; }
.hk-tuner-checks .bad { color: #a23a1e; font-weight: 700; }
.hk-tuner-checks small { color: #8a8076; font-weight: 400; }
.hk-tuner-actions { display: flex; gap: 6px; }
.hk-tuner-actions button { flex: 1; height: 34px; border: 0; border-radius: 8px; cursor: pointer; font: 700 13px system-ui, sans-serif; background: #efe7da; color: #2b2620; }
.hk-tuner-actions button[data-act="copy"] { background: #6b5440; color: #fff; }
.hk-tuner-msg { margin: 8px 0 0; color: #6b5440; min-height: 1em; }
@media (max-width: 600px) { .hk-tuner { left: 10px; } .hk-tuner-body { left: 10px; width: calc(100vw - 20px); } }

/* tuner: mouse picker */
.hk-tuner-row { cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.hk-tuner-row.is-active { background: #efe7da; outline: 1px solid #c9b79e; }
.hk-pick { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.hk-pick-label { margin: 0; font-size: 12px; color: #6b5440; direction: rtl; text-align: right; }
.hk-pick-sv { position: relative; height: 150px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.hk-pick-sv:focus-visible { outline: 2px solid #6b5440; outline-offset: 2px; }
.hk-pick-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 1px 4px rgba(0,0,0,.4); pointer-events: none; }
.hk-pick-hue { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 7px; margin: 0; cursor: pointer;
	background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }
.hk-pick-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #6b5440; }
.hk-pick-hue::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #6b5440; }
.hk-pick-drop { height: 32px; border: 1px dashed #b7a68e; border-radius: 8px; background: #fff; cursor: pointer; font: 600 12px system-ui, sans-serif; color: #6b5440; direction: rtl; }
.hk-pick-drop:hover { background: #f6f0e6; }

.hk-comment-note { font-size: 14px; color: var(--hk-muted); }
.cf-turnstile { min-height: 65px; }

/* =====================================================================
   Sidebar only — «مِحراب المعرفة» (Golden Summer Fields): colours + IBM Plex Sans Arabic
   ===================================================================== */
.hk-sidebar {
	--gs-sidebar: var(--wp--preset--color--sidebar); --gs-surface: #FFFEF9; --gs-border: #E3DEC4; --gs-border-strong: #CFC8A6;
	--gs-text: #1E1C15; --gs-text-2: #3A372B; --gs-muted: #6E6A57; --gs-faint: #9A957E;
	--gs-sage: #CCD5AE; --gs-accent: #B98146; --gs-bronze: #D4A373;
	--gs-shadow: 0 1px 2px rgba(60,50,20,.05), 0 4px 16px rgba(60,50,20,.06);
	background: var(--gs-sidebar) !important;
	border-left: 1px solid var(--gs-border) !important;
	color: var(--gs-text-2);
	font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
	font-size: 15px;
}
html[data-theme="dark"] .hk-sidebar {
	--gs-sidebar: #1C1C15; --gs-surface: #201F18; --gs-border: #39372B; --gs-border-strong: #4C4938;
	--gs-text: #F1EDDD; --gs-text-2: #DDD8C3; --gs-muted: #ABA58C; --gs-faint: #7F7A64;
	--gs-sage: #4A5233; --gs-accent: #E0AE7C; --gs-bronze: #C99360;
	--gs-shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}
.hk-sidebar * { font-family: inherit; }
.hk-sidebar .wp-block-site-title { font-family: 'IBM Plex Sans Arabic', sans-serif; font-weight: 700 !important; font-size: 22px !important; color: var(--gs-text); }
.hk-sidebar .wp-block-site-title a { color: inherit; }

/* navigation items */
.hk-sidebar .hk-sidebar__nav .wp-block-navigation-item__content {
	padding: 9px 12px !important; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--gs-text-2);
	transition: background .12s, color .12s;
}
.hk-sidebar .hk-sidebar__nav .wp-block-navigation-item__content:hover { background: color-mix(in srgb, var(--gs-sage) 45%, transparent) !important; color: var(--gs-text); }
.hk-sidebar .hk-sidebar__nav .is-active > .wp-block-navigation-item__content {
	background: var(--gs-surface) !important; box-shadow: var(--gs-shadow) !important; color: var(--gs-accent) !important; font-weight: 700;
}

/* quick icons */
.hk-sidebar .hk-hicons { color: var(--gs-muted); }
.hk-sidebar .hk-hicon:hover { opacity: 1; color: var(--gs-accent); }

/* search field: soft 1px border, no shadow, bronze halo on focus */
.hk-sidebar .hk-sidebar__search .wp-block-search__inside-wrapper {
	height: 42px; box-sizing: border-box; padding: 0 4px; border-radius: 11px;
	background: var(--gs-surface); border: 1px solid var(--gs-border); box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.hk-sidebar .hk-sidebar__search .wp-block-search__inside-wrapper:focus-within {
	border-color: color-mix(in srgb, var(--gs-bronze) 70%, var(--gs-border));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gs-bronze) 14%, transparent);
}
.hk-sidebar .hk-sidebar__search input { font-size: 15px; color: var(--gs-text); }
.hk-sidebar .hk-sidebar__search input::placeholder { color: var(--gs-faint); }
.hk-sidebar .hk-sidebar__search button { color: var(--gs-muted); }

/* footer of the sidebar */
.hk-sidebar .hk-sidebar__foot { border-top-color: var(--gs-border) !important; font-size: 14px; }
.hk-sidebar .hk-sidebar__foot a { color: var(--gs-muted); }
.hk-sidebar .hk-sidebar__foot a:hover { color: var(--gs-accent); }
@media (max-width: 781px) { .hk-sidebar { border-left: 0 !important; border-bottom: 1px solid var(--gs-border) !important; } }

/* =====================================================================
   Sidebar menu icons — copied from the old theme (global.css «أيقونات أقسام المنيو»).
   Matched by link (the old theme matched menu-item IDs from its own database).
   ===================================================================== */
.hk-sidebar__nav .wp-block-navigation-item__content { display: flex !important; align-items: center; gap: 8px; }
.hk-sidebar__nav .wp-block-navigation-item__content::before {
	content: none; flex-shrink: 0; width: 16px; height: 16px;
	background-color: var(--hk-nav-icon); opacity: 1;
	-webkit-mask: var(--hk-nav-ico) center / contain no-repeat; mask: var(--hk-nav-ico) center / contain no-repeat;
}

.hk-sidebar__nav .wp-block-navigation-item:first-child > a::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 11 12 4l8.5 7v8.5a1.5 1.5 0 0 1-1.5 1.5h-4.5v-6h-5v6H5a1.5 1.5 0 0 1-1.5-1.5V11z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/lesson/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5c2.5-1 5.5-1 8 1c2.5-2 5.5-2 8-1v13c-2.5-1-5.5-1-8 1c-2.5-2-5.5-2-8-1v-13z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M12 6.5v13' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/lecture/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='9' y='2.5' width='6' height='11' rx='3' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M12 17.5v4M9 21.5h6' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/farsi/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.2,18.1v-1.8h3.7c0.7,0,1.3-0.1,1.7-0.2c0.4-0.1,0.8-0.2,1-0.4c0.2-0.2,0.4-0.3,0.5-0.5s0.1-0.4,0.2-0.5h-1.5c-0.2,0-0.4,0-0.6,0c-0.2,0-0.4,0-0.6-0.1s-0.4-0.1-0.7-0.2c-0.2-0.1-0.4-0.2-0.7-0.3c-0.2-0.1-0.3-0.2-0.5-0.4c-0.2-0.2-0.3-0.3-0.5-0.6C7.1,13,7,12.8,6.9,12.4c-0.1-0.3-0.1-0.7-0.1-1.1c0-0.5,0.1-1,0.3-1.5C7.2,9.4,7.5,9,7.8,8.7C8.2,8.4,8.5,8.1,9,7.9s0.9-0.3,1.4-0.3c0.6,0,1.1,0.1,1.5,0.4s0.9,0.6,1.2,1c0.3,0.5,0.6,1,0.8,1.7c0.2,0.7,0.2,1.5,0.2,2.3v1.3c0,0.6-0.1,1.2-0.4,1.7c-0.3,0.5-0.6,0.9-1.1,1.2c-0.9,0.5-2.1,0.8-3.7,0.8H5.2z M10.3,9.5c-0.2,0-0.4,0-0.6,0.1C9.5,9.7,9.3,9.8,9.1,9.9c-0.2,0.2-0.3,0.3-0.4,0.6c-0.1,0.2-0.2,0.5-0.2,0.8c0,0.2,0,0.4,0.1,0.5c0,0.1,0.1,0.3,0.2,0.4c0.1,0.1,0.1,0.2,0.2,0.2c0.1,0.1,0.2,0.1,0.2,0.1c0.2,0.1,0.4,0.2,0.7,0.2s0.6,0.1,1,0.1h1.5c0-0.6-0.1-1.2-0.2-1.7c-0.1-0.5-0.3-0.9-0.5-1.2C11.3,9.7,10.9,9.5,10.3,9.5z M8.2,4.1l2.2-2.2l2.3,2.3l-2.2,2.2L8.2,4.1z'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/speakers/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='8' r='3' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M3.5 20c0-3.3 2.5-5 5.5-5s5.5 1.7 5.5 5' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='17' cy='9' r='2.2' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M15.8 14.3c2.6.3 4.2 1.9 4.2 4.7' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/glossary/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3.5h11.5A2.5 2.5 0 0 1 19 6v14.5H7.5A2.5 2.5 0 0 1 5 18V3.5z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M8 8h7M8 11.3h4.5' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/courses/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v12M7 11l5 5 5-5M5 21h14' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.hk-sidebar__nav a[href$="/logs/"]::before { content: ""; --hk-nav-ico: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='5' cy='19' r='1.6' fill='%23000'/%3E%3C/svg%3E"); }

/* Menu icon colour — its own setting (change it here or from the colour panel) */
:root { --hk-nav-icon: #B98146; }
html[data-theme="dark"] { --hk-nav-icon: #E0AE7C; }

/* =====================================================================
   Home tabs — the old theme's look: "tongues" fused to the top of the first table
   ===================================================================== */
.hk-home-tabs-row { gap: 12px !important; align-items: center; }
.hk-home-updates-title { flex: 0 0 auto; border: 0 !important; padding: 0 4px !important; font-size: 15px !important; font-weight: 600 !important; color: var(--hk-muted) !important; opacity: .8; }
.hk-home-tabs-row .hk-home-tabs {
	flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; margin: 0; padding: 8px 8px 0;
	background: transparent; border-radius: 14px 14px 0 0; overflow-x: auto;
}
.hk-home-tabs-row .hk-home-tab {
	display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
	padding: 10px 20px !important; border-radius: 10px 10px 0 0 !important;
	background: transparent !important; box-shadow: none !important;
	font: 600 16px "Scheherazade New", serif; color: var(--hk-muted) !important; white-space: nowrap;
	transition: background .15s, color .15s;
}
.hk-home-tabs-row .hk-home-tab:hover { color: var(--hk-strong) !important; }
.hk-home-tabs-row .hk-home-tab.is-active {
	background: var(--wp--preset--color--base) !important; /* same as the table card: a light, subtle difference */
	color: var(--hk-strong) !important; box-shadow: 0 -1px 2px rgba(0, 0, 0, .03) !important;
}
.hk-home-tabs-row .hk-home-tab:not(.is-active):hover { background: color-mix(in srgb, var(--wp--preset--color--base) 50%, transparent) !important; }
.hk-home-tab-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--hk-strong); }
/* first table of each tab sits right under the tabs, as one card */
.hk-home-panel > .hwza-section:first-child .hwza-table-container { border-radius: 0 0 14px 14px !important; border-top: 0 !important; }

@media (max-width: 600px) {
	.hk-home-tabs-row { gap: 6px !important; }
	.hk-home-tabs-row .hk-home-tabs { gap: 2px; padding: 6px 6px 0; }
	.hk-home-tabs-row .hk-home-tab { font-size: 14px; padding: 9px 10px !important; }
}

/* Top-bar mode (≤781px): keep the menu behind its button between 600 and 781px too
   (the navigation block only collapses below 600px on its own). */
@media (min-width: 600px) and (max-width: 781px) {
	.hk-sidebar__nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.hk-sidebar__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
	.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex !important; }
}

/* Home tabs — tweaks: shorter tabs, rounded table top, "جديد" nudged left */
.hk-home-tabs-row .hk-home-tabs { padding: 4px 8px 0 !important; }
.hk-home-tabs-row .hk-home-tab { padding: 5px 16px !important; font-size: 15px; }
.hk-home-panel > .hwza-section:first-child .hwza-table-container { border-radius: 14px !important; border-top: 1px solid var(--hk-line) !important; }
.hk-home-updates-title { margin-inline-start: 12px !important; }
@media (max-width: 600px) { .hk-home-tabs-row .hk-home-tab { padding: 5px 10px !important; } .hk-home-updates-title { margin-inline-start: 6px !important; } }

/* Home: section headings ("جديد الدروس"…) match the "جديد" label next to the tabs */
.hk-home .hwza-section .hwza-section-title { font-size: 15px !important; font-weight: 600 !important; color: var(--hk-muted) !important; opacity: .8; margin-inline-start: 12px !important; }
@media (max-width: 600px) { .hk-home .hwza-section .hwza-section-title { margin-inline-start: 6px !important; } }

.hk-tuner-group { margin: 10px 0 2px; padding-top: 8px; border-top: 1px solid #e6dccb; font-weight: 700; font-size: 13px; color: #6b5440; }

/* Site title font — same as the old theme (Husrev Hatti Osmanlica, file copied from astra-child/fonts) */
@font-face {
	font-family: 'Husrev Hatti Osmanlica';
	src: url('fonts/husrev-hatti-osmanlica.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}
.hk-sidebar .wp-block-site-title,
.hk-sidebar .wp-block-site-title a {
	font-family: 'Husrev Hatti Osmanlica', 'Scheherazade New', serif !important;
	font-weight: normal !important;
	font-size: 33px !important;
	line-height: 1.3 !important;
	letter-spacing: 0;
}
@media (max-width: 781px) { .hk-sidebar .wp-block-site-title, .hk-sidebar .wp-block-site-title a { font-size: 33px !important; line-height: 1.1 !important; } }

/* hk-no-focus-ring: after in-place navigation the page heading receives focus (for screen readers);
   don't draw a frame around it — keyboard focus on links/buttons is unaffected. */
main [tabindex="-1"]:focus, main [tabindex="-1"]:focus-visible { outline: none !important; box-shadow: none !important; }

/* Sign in with Google */
.hk-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; margin-bottom: 14px;
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); border: 1px solid var(--wp--preset--color--beige);
	border-radius: 12px; text-decoration: none; font-weight: 600; transition: border-color .15s, background .15s; }
.hk-google-btn:hover { border-color: var(--wp--preset--color--bronze); background: var(--wp--preset--color--card-head); }
.hk-or { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--wp--preset--color--muted); font-size: 14px; }
.hk-or::before, .hk-or::after { content: ""; flex: 1; height: 1px; background: var(--wp--preset--color--beige); }

/* Phones: no search box in the top bar (the search icon in the icon row stays). */
@media (max-width: 781px) {
	.hk-sidebar .wp-block-search { display: none !important; }
}

/* Phone menu (opened from ☰): same look as the desktop sidebar — sidebar colour, font, icons. */
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--gs-sidebar, var(--wp--preset--color--sidebar)) !important;
	color: var(--wp--preset--color--contrast) !important;
	font-family: "IBM Plex Sans Arabic", sans-serif;
	padding: 18px 16px !important;
}
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 44px !important; align-items: stretch !important;
}
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch !important; gap: 2px !important; width: 100%;
}
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	width: 100%; justify-content: flex-start; font-size: 17px;
}
.hk-sidebar__nav .wp-block-navigation__responsive-container-close,
.hk-sidebar__nav .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--contrast); }
html[data-theme="dark"] .hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--sidebar) !important; }

/* Phones: the top bar (logo, ☰ and the icon row) stays fixed while scrolling.
   The sticky element must be the <header> itself: the aside inside it can't stick beyond its parent. */
@media (max-width: 781px) {
	.wp-site-blocks > header.wp-block-template-part {
		position: sticky; top: var(--hk-top, 0px); z-index: 60;
		box-shadow: 0 2px 10px rgba(58, 47, 37, .06);
	}
	.wp-site-blocks > header.wp-block-template-part .hk-sidebar { position: static !important; }
	main { scroll-margin-top: 120px; }
}

/* ---------- Advanced search (same layout as the previous theme, site colours) ---------- */
.hwza-adv { --adv-card: var(--wp--preset--color--base); --adv-line: var(--wp--preset--color--beige); }
.hwza-adv-search-box { background: var(--wp--preset--color--card-head); border: 1px solid var(--adv-line); border-radius: 12px; padding: 20px 24px; margin-bottom: 24px; }
.hwza-adv-input-wrap { display: flex; align-items: center; gap: 10px; background: var(--adv-card); border: 1px solid var(--adv-line); border-radius: 10px; padding: 0 14px; margin-bottom: 14px; }
.hwza-adv-input { flex: 1; min-width: 0; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent; font: inherit; font-size: 15px; padding: 12px 0; color: var(--wp--preset--color--contrast); }
.hwza-adv-input::placeholder { color: var(--wp--preset--color--muted); opacity: .7; }
.hwza-adv-search-icon-btn { all: unset; display: inline-flex; cursor: pointer; color: var(--wp--preset--color--muted); transition: opacity .15s; }
.hwza-adv-search-icon-btn:hover { opacity: .6; }
.hwza-adv-search-icon-btn:focus-visible { outline: 2px solid var(--wp--preset--color--bronze); outline-offset: 3px; border-radius: 4px; }
.hwza-adv-options { display: flex; flex-wrap: wrap; gap: 8px; }
.hwza-adv-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 6px 14px; border: 1px solid var(--adv-line); border-radius: 20px; background: var(--adv-card); color: var(--wp--preset--color--muted); cursor: pointer; user-select: none; transition: all .15s; }
.hwza-adv-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hwza-adv-opt:hover { border-color: var(--wp--preset--color--bronze); }
.hwza-adv-opt:has(input:focus-visible) { outline: 2px solid var(--wp--preset--color--bronze); outline-offset: 2px; }
.hwza-adv-opt.is-active { background: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.hwza-adv-results-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--adv-line); }
.hwza-adv-results-count { font-size: 15px; color: var(--wp--preset--color--muted); margin: 0; }
.hwza-adv-results-count strong { color: var(--wp--preset--color--contrast); }
.hwza-adv-results-count em { font-style: normal; color: var(--wp--preset--color--ink); }
.hwza-adv-result-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: var(--adv-card); border: 1px solid var(--adv-line); border-radius: 10px; margin-bottom: 10px; }
.hwza-adv-result-num { min-width: 28px; height: 28px; border-radius: 50%; background: var(--wp--preset--color--card-head); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--wp--preset--color--muted); flex-shrink: 0; margin-top: 2px; }
.hwza-adv-result-body { flex: 1; min-width: 0; }
.hwza-adv-result-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.hwza-adv-result-title { font-size: 16px; font-weight: 600; color: var(--wp--preset--color--contrast); text-decoration: none; }
.hwza-adv-result-title:hover { color: var(--wp--preset--color--bronze); }
.hwza-adv-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.hwza-adv-badge svg { width: 12px; height: 12px; }
.hwza-adv-badge-speaker { background: #e8eef4; color: #4a6a8a; }
.hwza-adv-badge-series  { background: #f6ead8; color: #9a6a2a; }
.hwza-adv-badge-post    { background: #e6efe0; color: #4f7a45; }
.hwza-adv-result-speaker { font-size: 14px; color: var(--wp--preset--color--muted); margin-bottom: 6px; }
.hwza-adv-result-excerpt { font-size: 15px; color: var(--wp--preset--color--muted); line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
mark.hwza-highlight { background: #f3dd8a; color: var(--wp--preset--color--text-dark); padding: 0 2px; border-radius: 2px; }
html[data-theme="dark"] .hwza-adv-badge-speaker { background: #2e3540; color: #a9bdd3; }
html[data-theme="dark"] .hwza-adv-badge-series  { background: #3d3326; color: #d9b98a; }
html[data-theme="dark"] .hwza-adv-badge-post    { background: #2f3a2b; color: #a9c79d; }
html[data-theme="dark"] mark.hwza-highlight { background: #5c5230; color: #fff; }
@media (max-width: 600px) {
	.hwza-adv-search-box { padding: 14px; }
	.hwza-adv-result-item { padding: 12px; gap: 10px; }
	.hwza-adv-opt { font-size: 14px; padding: 5px 12px; }
}

/* ---------- Phone cards: icons as in the previous theme ----------
   round speaker photo / lesson icon beside the title, and an icon before speaker, section and date. */
@media (max-width: 600px) {
	.hwza-table td.hwza-col-speaker::before,
	.hwza-table td.hwza-log-col-topic::before,
	.hwza-table td.hwza-col-topic::before,
	.hwza-table td.hwza-col-series::before,
	.hwza-table td.hwza-log-col-date::before,
	.hwza-log-table td.hwza-log-col-datetime::before {
		content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 6px; vertical-align: -2px;
		background: currentColor; opacity: .75;
		-webkit-mask: var(--hk-cell-ico) center / contain no-repeat; mask: var(--hk-cell-ico) center / contain no-repeat;
	}
	.hwza-table td.hwza-col-speaker { --hk-cell-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='10' r='3.2'/%3E%3Cpath d='M6.2 18.6c1.2-2.3 3.3-3.4 5.8-3.4s4.6 1.1 5.8 3.4'/%3E%3C/svg%3E"); }
	.hwza-table td.hwza-log-col-topic,
	.hwza-table td.hwza-col-topic,
	.hwza-table td.hwza-col-series { --hk-cell-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2Z'/%3E%3C/svg%3E"); }
	.hwza-table td.hwza-log-col-date,
	.hwza-log-table td.hwza-log-col-datetime { --hk-cell-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
	/* date is left-aligned (ltr): keep the icon on its right side like the old theme */
	.hwza-table td.hwza-log-col-date, .hwza-log-table td.hwza-log-col-datetime { display: flex !important; justify-content: flex-start; align-items: center; flex-direction: row-reverse; gap: 6px; }
	.hwza-table td.hwza-log-col-date::before, .hwza-log-table td.hwza-log-col-datetime::before { margin: 0; }
	.hwza-table td.hwza-log-col-date { border-top: 1px solid var(--hk-line) !important; margin-top: 6px; }

	/* round photo / lesson icon beside the title (home tables) */
	.hwza-home-table td.hwza-col-image { display: block !important; position: absolute; top: 10px; right: 14px; width: 40px !important; }
	.hwza-home-table td.hwza-col-image .hwza-speaker-img,
	.hwza-home-table td.hwza-col-image .hwza-lesson-icon { width: 40px; height: 40px; margin: 0; }
	.hwza-home-table tbody tr { min-height: 64px; }
	.hwza-home-table td.hwza-col-title,
	.hwza-home-table td.hwza-col-speaker { padding-right: 52px !important; }
	.hwza-home-table td.hwza-col-title { min-height: 22px; }
}

/* Phone cards: title, speaker and section in one column beside the photo; date alone on the left. */
@media (max-width: 600px) {
	.hwza-home-table td.hwza-col-title,
	.hwza-home-table td.hwza-col-speaker,
	.hwza-home-table td.hwza-log-col-topic { padding-right: 54px !important; }
	.hwza-table td.hwza-col-speaker, .hwza-table td.hwza-log-col-topic { padding-top: 3px !important; }
	.hwza-table td.hwza-log-col-date,
	.hwza-log-table td.hwza-log-col-datetime {
		display: block !important; direction: ltr; text-align: left !important;
		margin-top: 8px; padding-top: 6px !important;
	}
	.hwza-table td.hwza-log-col-date::before,
	.hwza-log-table td.hwza-log-col-datetime::before { margin: 0 6px 0 0 !important; }
}

/* Phone cards (home): photo + title on the first line; speaker, section and date full width under them. */
@media (max-width: 600px) {
	.hwza-home-table tbody tr {
		display: grid !important; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center;
		min-height: 0;
	}
	.hwza-home-table td.hwza-col-image { position: static !important; grid-row: 1; grid-column: 1; width: 40px !important; }
	.hwza-home-table td.hwza-col-title { grid-row: 1; grid-column: 2; padding: 0 !important; }
	.hwza-home-table td.hwza-col-speaker,
	.hwza-home-table td.hwza-log-col-topic,
	.hwza-home-table td.hwza-log-col-date { grid-column: 1 / -1; padding-right: 0 !important; }
	.hwza-home-table td.hwza-col-speaker { margin-top: 8px; }
	.hwza-home-table td.hwza-col-speaker::before,
	.hwza-home-table td.hwza-log-col-topic::before { width: 15px; height: 15px; margin-inline-end: 8px; }
}

/* Phone cards: speaker / section icons centred under the 40px photo. */
@media (max-width: 600px) {
	.hwza-home-table td.hwza-col-speaker,
	.hwza-home-table td.hwza-log-col-topic { padding-right: 12px !important; }
}

/* Pages without a heading: in-place navigation focuses <main> itself — no frame there either. */
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible,
.wp-site-blocks [tabindex="-1"]:focus:not(a):not(button):not(input):not(select):not(textarea) { outline: none !important; box-shadow: none !important; }

/* Phones: one compact header row — logo + title, icons (close together), menu button. */
@media (max-width: 781px) {
	.hk-sidebar { flex-wrap: nowrap !important; gap: 8px !important; padding: 6px 12px !important; }
	.hk-sidebar__brand { order: 1; flex-shrink: 0; gap: 6px !important; }
	.hk-sidebar__brand .wp-block-site-logo img { width: 32px !important; }
	.hk-sidebar .wp-block-site-title, .hk-sidebar .wp-block-site-title a { font-size: 24px !important; white-space: nowrap; }
	.hk-sidebar .hk-hicons {
		order: 2; flex: 1 1 auto; width: auto !important; min-width: 0;
		justify-content: flex-end !important; gap: 0 !important; padding: 0 !important;
	}
	.hk-sidebar .hk-hicons .hk-hicon { padding: 5px !important; }
	.hk-sidebar .hk-hicons svg { width: 17px; height: 17px; }
	.hk-sidebar__nav { order: 3; margin-inline-start: 2px !important; flex-shrink: 0; }
}
/* very narrow phones: keep the logo, drop the written title so everything fits on one line */
@media (max-width: 430px) {
	.hk-sidebar .wp-block-site-title { display: none !important; }
	.hk-sidebar .hk-hicons .hk-hicon { padding: 4px !important; }
}

/* Phone header: icons behind the "more" (grid) button. */
.hk-hicons-toggle { display: none; }
@media (max-width: 781px) {
	.hk-sidebar { position: relative; }
	.hk-hicons-toggle {
		all: unset; box-sizing: border-box; order: 2; margin-inline-start: auto;
		display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
		color: var(--wp--preset--color--contrast); cursor: pointer; transition: background .15s;
	}
	.hk-hicons-toggle:hover, .hk-icons-open .hk-hicons-toggle { background: color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent); }
	.hk-hicons-toggle:focus-visible { outline: 2px solid var(--wp--preset--color--bronze); outline-offset: 2px; }
	.hk-sidebar__nav { margin-inline-start: 0 !important; }
	/* the icons: hidden until opened, then a row under the header */
	.hk-sidebar .hk-hicons {
		display: none !important;
		position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
		justify-content: space-around !important; padding: 8px 12px !important; gap: 4px !important;
		background: var(--gs-sidebar, var(--wp--preset--color--sidebar));
		border-bottom: 1px solid var(--wp--preset--color--line);
		box-shadow: 0 6px 14px rgba(58, 47, 37, .08);
	}
	.hk-sidebar.hk-icons-open .hk-hicons { display: flex !important; }
	.hk-sidebar .hk-hicons .hk-hicon { padding: 7px !important; }
	.hk-sidebar .hk-hicons svg { width: 19px; height: 19px; }
	/* room again for the site name */
	.hk-sidebar .wp-block-site-title { display: block !important; }
}
@media (max-width: 781px) { .hk-sidebar > .hk-hicons-toggle { margin-inline-start: auto !important; } }

/* Phone header: account icon stays outside, beside the grid button; Telegram + mail beside the site name. */
.hk-account-out { display: none !important; }
@media (max-width: 781px) {
	.hk-sidebar > .hk-account-out {
		display: inline-flex !important; order: 2; margin-inline-start: auto !important;
		align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
		color: var(--wp--preset--color--contrast);
	}
	.hk-sidebar > .hk-account-out svg { width: 19px; height: 19px; }
	.hk-sidebar > .hk-hicons-toggle { margin-inline-start: 0 !important; }
	.hk-sidebar .hk-hicons .hk-hicon-account { display: none !important; }

	.hk-sidebar .hk-sidebar__foot {
		display: flex !important; order: 1; margin: 0 !important; padding: 0 !important; border: 0 !important;
		width: auto !important; flex: 0 0 auto;
	}
	.hk-sidebar .hk-sidebar__foot .wp-block-loginout { display: none !important; }
	.hk-sidebar .hk-sidebar__foot .wp-block-social-links { gap: 4px !important; margin: 0 !important; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link a { padding: 4px !important; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link svg { width: 18px; height: 18px; }
}

/* No footer: drop the empty template-part wrapper and the gap above it. */
.wp-site-blocks > footer.wp-block-template-part { display: none; }
.wp-site-blocks > main { margin-bottom: 0 !important; padding-bottom: 12px; }

/* Phones: tables are separate cards — no outer frame around the whole table. */
@media (max-width: 600px) {
	.hwza-table-container, .hk-home-panel > .hwza-section:first-child .hwza-table-container { border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; }
}

/* Phone header: Telegram + mail the same size as the other header icons. */
@media (max-width: 781px) {
	.hk-sidebar .hk-sidebar__foot .wp-block-social-links { gap: 2px !important; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link a { padding: 3px !important; display: inline-flex; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link-telegram svg { width: 28px !important; height: 28px !important; margin: -3px; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link-mail svg { width: 21px !important; height: 21px !important; }
}

/* Single item: the title already shows beside the play button — keep the page <h1> for screen readers only. */
.single-audio_lesson main > .wp-block-post-title,
.single-audio_lecture main > .wp-block-post-title,
.single-audio_farsi main > .wp-block-post-title {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important;
}

/* Audio download button with the file size inside it */
.hwza-player .hwza-btn-dl { width: auto !important; gap: 6px; padding: 0 10px !important; }
.hwza-dl-size { font: 600 12px/1 system-ui, sans-serif; direction: ltr; white-space: nowrap; }

/* Breadcrumbs: house icon before "الرئيسية" (as in the previous theme) */
.hk-crumb-home a { display: inline-flex; align-items: center; gap: 5px; }
.hk-crumb-home a::before {
	content: ""; width: 16px; height: 16px; flex-shrink: 0; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V19a2 2 0 0 0 2 2h3.5v-6h3v6H17a2 2 0 0 0 2-2V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V19a2 2 0 0 0 2 2h3.5v-6h3v6H17a2 2 0 0 0 2-2V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Transcript and text tabs: justified (both edges aligned), Arabic-friendly. */
.hwza-transcript, .hwza-transcript p,
.hwza-block-inner .hwza-summary, .hwza-block-inner .hwza-summary p {
	text-align: justify; text-justify: inter-word; text-align-last: right;
}

/* Play card on the item page: no frame. */
.hk-audio, .hk-audio:hover, .hk-audio.is-current { border: 0 !important; }

/* Item meta (speaker, date, time): nudged a little in from the right edge. */
.hwza-meta-bar ul { padding-inline-start: 10px !important; }

/* File icons on the player's button line: icons on the right, buttons on the left. */
.hwza-player .row .hwza-dl-inrow { margin-inline-start: 0; margin-inline-end: auto; display: flex; gap: 6px; align-items: center; }

/* Player line: file downloads as buttons like the others. */
.hwza-player .row .hwza-dl-inrow .hwza-btn { padding: 0 5px; }
.hwza-player .row .hwza-dl-inrow .hwza-file-ico { width: 20px; height: 20px; }
.hk-src-open { gap: 3px; }
.hk-src-count { font: 600 12px/1 system-ui, sans-serif; }

/* Source attachments window */
.hk-src-dialog { width: min(480px, calc(100vw - 32px)); }
.hk-src-title { margin: 0 0 4px; font-size: 18px; }
.hk-src-note { margin: 0 0 14px; font-size: 13px; color: var(--hk-muted); }
.hk-src-dialog .hwza-source-files { display: flex; flex-direction: column; gap: 8px; }
.hk-src-dialog .hwza-source-file-badge { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--hk-line); border-radius: 10px; background: var(--hk-head); color: var(--hk-text); text-decoration: none; overflow-wrap: anywhere; }
.hk-src-dialog .hwza-source-file-badge:hover { border-color: var(--hk-accent); }
.hk-dialog-close { all: unset; position: absolute; top: 12px; left: 12px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; color: var(--hk-muted); }
.hk-dialog-close:hover { background: var(--hk-head); }
.hk-dialog-close:focus-visible { outline: 2px solid var(--hk-accent); }
.page-single-audio > dialog.hk-src-dialog { margin: auto !important; }
.hk-src-dialog .hwza-source-files { align-items: stretch !important; }
.hk-src-dialog .hwza-source-file-badge { width: 100%; box-sizing: border-box; justify-content: flex-start !important; }

/* Currently spoken sentence: a light beige highlight. */
.hwza-sync-active { background: #F1E4C3 !important; box-shadow: 0 0 0 2px #F1E4C3; }
html[data-theme="dark"] .hwza-sync-active { background: #4A4232 !important; box-shadow: 0 0 0 2px #4A4232; }

/* Desktop sidebar footer: Telegram + mail at a comfortable size, matching the icon row. */
@media (min-width: 782px) {
	.hk-sidebar .hk-sidebar__foot .wp-block-social-links { gap: 6px !important; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link a { padding: 4px !important; display: inline-flex; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link-telegram svg { width: 30px !important; height: 30px !important; margin: -4px; }
	.hk-sidebar .hk-sidebar__foot .wp-social-link-mail svg { width: 22px !important; height: 22px !important; }
	.hk-sidebar .hk-sidebar__foot .wp-block-loginout { font-size: 16px !important; }
}

/* Desktop sidebar: never wrap into a second column when the screen is short
   (e.g. with the admin bar after signing in) — scroll vertically instead, with a slim scrollbar. */
@media (min-width: 782px) {
	.hk-sidebar { flex-wrap: nowrap !important; overflow-x: hidden !important; overflow-y: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent) transparent; }
	.hk-sidebar > * { flex-shrink: 0; }
	.hk-sidebar::-webkit-scrollbar { width: 6px; }
	.hk-sidebar::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent); border-radius: 6px; }
}

/* Speaker / date / time now under the play card; the buttons line sits right above the text. */
.hwza-player .hwza-meta-bar-below { margin: 8px 0 0; }
.hwza-player .hwza-meta-bar-below ul { gap: 2px; }
.hwza-player .hwza-meta-bar-below li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px !important; font-size: 14px; font-weight: 400; color: var(--hk-muted); }
.hwza-player .row { margin-top: 10px; }

/* Buttons line sits close to the text box: hide the (now empty) summary head, small gap. */
.page-single-audio > .hwza-summary-head:not(:has(*)) { display: none !important; }
.page-single-audio > .hwza-player + .hwza-summary-head:not(:has(*)) + .hwza-block,
.page-single-audio > .hwza-player + .hwza-block { margin-top: -6px !important; }

/* Course page item line: file downloads and action buttons share one size and look. */
.hwza-lesson-meta { gap: 6px; }
.hwza-lesson-meta .hwza-btn { min-width: 30px; height: 30px; padding: 0 5px; }
.hwza-lesson-meta .hwza-btn svg { width: 17px; height: 17px; }
.hwza-lesson-meta .hwza-dl-btn .hwza-file-ico { width: 20px; height: 20px; }
.hwza-lesson-meta .hwza-btn.hwza-btn-icon { width: 30px; padding: 0; }

/* Course (series) page header — same layout as the previous theme. */
.tax-series .hk-tax-header, .tax-lec_series .hk-tax-header, .tax-fa_series .hk-tax-header { text-align: center; padding: 14px 0 10px; }
.hk-tax-header:has(.hk-share-bare) .hk-tax-title-row { justify-content: center; gap: 8px; }
.hk-tax-header:has(.hk-share-bare) .hk-tax-title { font-size: 1.35rem !important; line-height: 1.4; }
.hk-share-bare { all: unset; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; cursor: pointer; color: var(--hk-muted); flex-shrink: 0; }
.hk-share-bare svg { width: 20px; height: 20px; }
.hk-share-bare:hover { color: var(--hk-link); }
.hk-share-bare:focus-visible { outline: 2px solid var(--hk-accent); border-radius: 6px; }
.hk-tax-header:has(.hk-share-bare) .hwza-series-meta-row { justify-content: center; gap: 20px; margin: 8px 0 6px; font-size: 14px; }
.hk-tax-header:has(.hk-share-bare) .hwza-meta-item svg { width: 16px; height: 16px; color: var(--hk-muted); }
.hk-tax-header:has(.hk-share-bare) .hwza-series-combined-doc { justify-content: center; }

/* Glossary letters: letter and its count stacked without overlapping. */
.hk-alpha { gap: 6px !important; }
.hk-alpha-btn { min-width: 38px !important; height: auto !important; min-height: 46px; padding: 5px 4px 4px !important; gap: 3px; line-height: 1 !important; }
.hk-alpha-btn small { display: block; font-size: 10px; line-height: 1; }
@media (max-width: 600px) { .hk-alpha-btn { min-width: 34px !important; min-height: 42px; } }

/* Glossary downloads (TXT / Excel) */
.hgp-export-bar { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.hgp-export-date { font-size: 13px; color: var(--hk-muted); margin-inline-end: 4px; }
.hgp-export-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 9px; border: 1px solid var(--hk-line); background: var(--hk-card); color: var(--hk-text); text-decoration: none !important; transition: background .15s; }
.hgp-export-btn:hover { background: var(--hk-head); }
.hk-gexp-ico { width: 18px; height: 18px; flex-shrink: 0; }

/* Glossary header — same look as the previous theme. */
.hk-glossary > .hk-tax-header { text-align: center; padding: 22px 0 20px; border-bottom: 2px solid var(--hk-line); margin-bottom: 22px; }
.hk-glossary > .hk-tax-header .hk-tax-title { font-size: 1.4rem !important; margin: 0 0 6px !important; }
.hk-glossary > .hk-tax-header .hk-tax-desc p { font-size: 14px; color: var(--hk-muted); margin: 0; font-weight: 400; }
.hk-glossary > .hk-tax-header .hwza-series-meta-row { justify-content: center; gap: 16px; margin-top: 16px; }
.hk-glossary > .hk-tax-header .hwza-stat-chip { display: block; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 400; color: var(--hk-muted); background: var(--hk-head); border: 0; line-height: 1.4; }
.hk-glossary > .hk-tax-header .hwza-stat-chip b { display: block; font-size: 15px; color: var(--hk-strong); }
.hk-glossary .hgp-export-bar { justify-content: center; margin-top: 14px; gap: 6px; }
.hk-glossary .hgp-export-date { font-size: 12px; font-weight: 400; color: var(--hk-muted); }
.hk-glossary .hgp-export-btn { border: 0; background: transparent; font-size: 12px; padding: 4px 8px; border-radius: 8px; color: var(--hk-text); }
.hk-glossary .hgp-export-btn:hover { background: var(--hk-head); }

/* Speaker page card — same as the previous theme. */
.hk-speaker-card { display: block !important; text-align: center; padding: 24px 16px 16px; }
.hk-speaker-card .hk-speaker-photo { display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; width: 110px; height: 110px; border-radius: 50%; overflow: hidden; border: 3px solid var(--hk-line); background: var(--hk-head); box-sizing: border-box; }
.hk-speaker-card .hk-speaker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hk-speaker-card .hk-no-photo svg { width: 100%; height: 100%; }
.hk-np-bg { fill: var(--hk-head); }
.hk-np-fg { fill: color-mix(in srgb, var(--hk-muted) 55%, transparent); }
.hk-speaker-card .hk-tax-title { font-size: 1.4rem !important; margin: 0 0 12px !important; }
@media (max-width: 600px) { .hk-speaker-card .hk-speaker-photo { width: 80px; height: 80px; } .hk-speaker-card .hk-tax-title { font-size: 1.2rem !important; } }

/* Akismet privacy line: small and quiet */
.akismet_comment_form_privacy_notice { font-size: 12px !important; font-weight: 400 !important; color: var(--hk-muted) !important; margin: 10px 0 0 !important; }
.akismet_comment_form_privacy_notice a { color: inherit !important; }

/* Section labels inside the summary tab (title marker, "[الملخص]") are hidden, as on the previous theme. */
.hwza-section-label { display: none !important; }

/* Site title: 33px everywhere (desktop and phones). */
.hk-sidebar .wp-block-site-title, .hk-sidebar .wp-block-site-title a { font-size: 33px !important; }


/* Phone quick-icons bar: no line under it. */
@media (max-width: 781px) { .hk-sidebar .hk-hicons { border-bottom: 0 !important; } }

/* Phones in landscape: stop the browser from enlarging the text on its own (iPhone Safari does this). */
html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ---------- Comments ---------- */
.hk-cmt-title { font-size: 20px !important; margin: 0 0 14px !important; color: var(--hk-strong); }
.hk-cmt-title span { color: var(--hk-muted); font-weight: 400; font-size: 16px; }
.hk-cmt-empty { color: var(--hk-muted); font-size: 14px; margin: 0 0 8px; }
.hk-cmt-list, .hk-cmt-list .children { list-style: none; margin: 0; padding: 0; }
.hk-cmt { margin: 0 0 10px; }
.hk-cmt-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--hk-head); }
.hk-cmt-avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--hk-card); color: var(--hk-muted); }
.hk-cmt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hk-cmt-body { flex: 1; min-width: 0; }
.hk-cmt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px; }
.hk-cmt-name { font-size: 15px; color: var(--hk-strong); }
.hk-cmt-badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--wp--preset--color--bronze); color: #fff; }
.hk-cmt-date { font-size: 12px; color: var(--hk-muted); margin-inline-start: auto; }
.hk-cmt-text { font-size: 15px; line-height: 1.8; color: var(--hk-text); overflow-wrap: anywhere; }
.hk-cmt-text p { margin: 0 0 6px; }
.hk-cmt-text p:last-child { margin-bottom: 0; }
.hk-cmt-pending { margin: 0 0 4px; font-size: 12px; color: #9a6a2a; }
.hk-cmt-actions { margin-top: 6px; }
.hk-cmt-actions a { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--hk-link); text-decoration: none; }
.hk-cmt-actions a svg { transform: rotate(90deg); }
.hk-cmt-list .children { margin: 10px 0 0; padding-inline-start: 22px; border-inline-start: 2px solid var(--hk-accent); }
.hk-cmt-list .children .hk-cmt-card { background: var(--hk-card); border: 1px solid var(--hk-line); }
.wp-block-comments .comment-respond { margin-top: 18px; }
.wp-block-comments .comment-reply-title { font-size: 18px !important; }
@media (max-width: 600px) { .hk-cmt-card { padding: 12px; gap: 10px; } .hk-cmt-list .children { padding-inline-start: 12px; } }
.hk-cmt-list .children { border-inline-start: 0 !important; }

/* Comments collapsed by default */
.hk-cmt-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; }
.hk-cmt-toggle:focus-visible { outline: 2px solid var(--hk-accent); outline-offset: 4px; border-radius: 6px; }
.hk-cmt-chev { transition: transform .2s; color: var(--hk-muted); }
.hk-cmt-open .hk-cmt-chev { transform: rotate(180deg); }
.wp-block-comments:not(.hk-cmt-open) > *:not(.hk-cmt-title) { display: none !important; }
.wp-block-comments:not(.hk-cmt-open) .hk-cmt-title { margin: 0 !important; }
.wp-block-comments:not(.hk-cmt-open) { padding-top: 16px !important; padding-bottom: 16px !important; }
.hk-cmt-title { font-size: 17px !important; }
.hk-cmt-title span { font-size: 14px; }
.hk-cmt-chev { width: 16px; height: 16px; }

/* Phones: the dedicated mobile logo from the previous theme (faces only), title sized to sit beside it. */
@media (max-width: 781px) {
	.hk-sidebar .hk-sidebar__brand { align-items: center !important; gap: 4px !important; }
	.hk-sidebar .hk-sidebar__brand .wp-block-site-logo { width: 53px !important; height: 40px; flex-shrink: 0; }
	.hk-sidebar .hk-sidebar__brand .wp-block-site-logo a {
		display: block; width: 53px; height: 40px;
		background: url("images/mobile-logo.png") center / contain no-repeat;
	}
	.hk-sidebar .hk-sidebar__brand .wp-block-site-logo img { display: none !important; }
	html[data-theme="dark"] .hk-sidebar .hk-sidebar__brand .wp-block-site-logo a { background-image: url("images/mobile-dark-logo.png"); }
	.hk-sidebar .wp-block-site-title, .hk-sidebar .wp-block-site-title a { font-size: 30px !important; line-height: 40px !important; margin: 0 !important; }
}
/* The calligraphic font draws its letters high in the line: nudge the title down to the logo's middle. */
@media (max-width: 781px) { .hk-sidebar .wp-block-site-title { position: relative; top: 5px; } }

/* Phones: slimmer top bar. */
@media (max-width: 781px) {
	.hk-sidebar { padding-top: 3px !important; padding-bottom: 3px !important; }
	.hk-sidebar .hk-sidebar__brand .wp-block-site-logo,
	.hk-sidebar .hk-sidebar__brand .wp-block-site-logo a { width: 46px !important; height: 34px !important; }
	.hk-sidebar .wp-block-site-title, .hk-sidebar .wp-block-site-title a { font-size: 27px !important; line-height: 34px !important; }
	.hk-sidebar .wp-block-site-title { top: 4px; }
	.hk-sidebar > .hk-account-out, .hk-hicons-toggle { width: 32px !important; height: 32px !important; }
}

/* ---------- Sidebar sub-menus (sections under الدروس / المحاضرات / الفارسي) ----------
   Desktop: open in place under the item on hover, keyboard focus, or the arrow; never fly out of the sidebar. */
.hk-sidebar__nav li.has-child { flex-wrap: wrap; width: 100%; }
.hk-sidebar__nav li.has-child > .wp-block-navigation-item__content { flex: 1; }
.hk-sidebar__nav .wp-block-navigation__submenu-icon { margin-inline-start: auto; color: var(--hk-muted); transition: transform .2s; }
.hk-sidebar__nav .wp-block-navigation__submenu-icon svg { width: 12px; height: 12px; }
.hk-sidebar__nav .wp-block-navigation__submenu-container {
	position: static !important; display: none !important; width: 100% !important; min-width: 0 !important; height: auto !important;
	opacity: 1 !important; visibility: visible !important; overflow: visible !important;
	background: transparent !important; border: 0 !important; box-shadow: none !important;
	padding: 2px 0 6px !important; margin: 0 !important; padding-inline-start: 30px !important;
	flex-direction: column; gap: 0;
}
.hk-sidebar__nav .wp-block-navigation-submenu:hover > .wp-block-navigation__submenu-container,
.hk-sidebar__nav .wp-block-navigation-submenu:focus-within > .wp-block-navigation__submenu-container,
.hk-sidebar__nav .wp-block-navigation-submenu:has(> .wp-block-navigation__submenu-icon[aria-expanded="true"]) > .wp-block-navigation__submenu-container,
.hk-sidebar__nav .wp-block-navigation-submenu.is-current-section > .wp-block-navigation__submenu-container { display: flex !important; }
.hk-sidebar__nav .wp-block-navigation-submenu:hover > .wp-block-navigation__submenu-icon,
.hk-sidebar__nav .wp-block-navigation-submenu:focus-within > .wp-block-navigation__submenu-icon { transform: rotate(180deg); }
.hk-sidebar__nav .hk-nav-sub > a { font-size: 14px !important; padding: 4px 8px !important; color: var(--hk-muted) !important; }
.hk-sidebar__nav .hk-nav-sub > a:hover { color: var(--hk-strong) !important; }
.hk-sidebar__nav .hk-nav-sub > a::before { content: none !important; display: none !important; }
/* Phone overlay menu: sections listed under their item (core shows them open there). */
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { display: flex !important; padding-inline-start: 30px !important; }

/* Sub-menu sections: a small folder icon before each, in the menu-icon colour. */
.hk-sidebar__nav .wp-block-navigation-submenu .hk-nav-sub > a.wp-block-navigation-item__content { display: flex !important; align-items: center; gap: 6px; }
.hk-sidebar__nav .wp-block-navigation-submenu .hk-nav-sub > a.wp-block-navigation-item__content::before {
	content: "" !important; display: inline-block !important; flex-shrink: 0; width: 14px; height: 14px;
	background: var(--hk-nav-icon, currentColor) !important; opacity: .8;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat !important;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

/* Sub-menu items closer together */
.hk-sidebar__nav .wp-block-navigation__submenu-container { padding-top: 0 !important; padding-bottom: 4px !important; gap: 0 !important; }
.hk-sidebar__nav .wp-block-navigation__submenu-container > li { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
.hk-sidebar__nav .wp-block-navigation-submenu .hk-nav-sub > a.wp-block-navigation-item__content { padding: 2px 8px !important; line-height: 1.5 !important; min-height: 0 !important; }

/* Phone menu: sections stay closed until their item is tapped. */
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > .wp-block-navigation__submenu-container { display: none !important; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child.hk-sub-open > .wp-block-navigation__submenu-container { display: flex !important; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon { display: inline-flex !important; transition: transform .2s; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .hk-sub-open > .wp-block-navigation__submenu-icon { transform: rotate(180deg); }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child { display: flex !important; flex-wrap: wrap; align-items: center; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > a { width: auto !important; flex: 1 1 0; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > .wp-block-navigation__submenu-container { flex-basis: 100%; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon { padding: 6px !important; margin: 0 !important; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > a { flex: 1 1 auto !important; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > .wp-block-navigation__submenu-icon { width: 28px !important; height: 28px !important; align-items: center; justify-content: center; color: var(--hk-muted); }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > .wp-block-navigation__submenu-icon svg { width: 14px; height: 14px; }
/* arrow: down when closed, up when open */
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child > .wp-block-navigation__submenu-icon { transform: rotate(180deg) !important; }
.hk-sidebar__nav .wp-block-navigation__responsive-container.is-menu-open li.has-child.hk-sub-open > .wp-block-navigation__submenu-icon { transform: rotate(0deg) !important; }

/* Menu items: no focus frame after a tap or click (keyboard focus still shows one). */
.hk-sidebar__nav a:focus:not(:focus-visible),
.hk-sidebar__nav button:focus:not(:focus-visible),
.hk-sidebar__nav li:focus-within:not(:has(:focus-visible)) { outline: none !important; box-shadow: none !important; }
.hk-sidebar__nav .wp-block-navigation-item__content:focus { outline: none; }
.hk-sidebar__nav .wp-block-navigation-item__content:focus-visible { outline: 2px solid var(--wp--preset--color--bronze); outline-offset: 2px; border-radius: 10px; }

/* Highlight of the current menu item */
.hk-sidebar .hk-sidebar__nav .is-active > .wp-block-navigation-item__content,
.hk-sidebar .hk-sidebar__nav .current-menu-item > .wp-block-navigation-item__content { background: #F3EEDC !important; }

/* Desktop sidebar: a section with sub-sections also opens on click (the click no longer leaves the page). */
.hk-sidebar__nav li.has-child.hk-sub-open > .wp-block-navigation__submenu-container { display: flex !important; }
.hk-sidebar__nav li.has-child > .wp-block-navigation-item__content { cursor: pointer; }

/* Listening progress bar (history, favourites, course pages): filled part */
.hwza-progress-bar-fill { background: #A2B6BB !important; }

/* Home: "جديد" closer to the tabs */
.hk-home-tabs-row { column-gap: 2px !important; }
.hk-home-tabs-row .hk-home-tabs { padding-inline-start: 0 !important; }

/* Search fields: no browser "clear" (×) button floating in the middle */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
input[type="search"]::-ms-clear { display: none; }

/* Sidebar search: card background, icon button snug at the end without extra space. */
.hk-sidebar .hk-sidebar__search .wp-block-search__inside-wrapper { background: var(--wp--preset--color--base) !important; padding: 0 4px 0 2px !important; }
.hk-sidebar .hk-sidebar__search .wp-block-search__button { margin: 0 !important; padding: 0 !important; width: 36px; min-width: 36px; height: 100%; display: inline-flex !important; align-items: center; justify-content: center; }
.hk-sidebar .hk-sidebar__search .wp-block-search__button svg { width: 22px; height: 22px; }
.hk-sidebar .hk-sidebar__search .wp-block-search__input { padding-inline: 10px 4px !important; }
.hwza-sort-btn.hwza-sort-icon { width: 34px; padding: 0 !important; justify-content: center; }

/* Section (topic) pages — same header as the previous theme: centred title over a thin line,
   sort button alone at the table's far side, no course-count chip. */
.tax-topic main > .hk-tax-header, .tax-lecture_season main > .hk-tax-header, .tax-fa_topic main > .hk-tax-header {
	text-align: center; padding: 10px 0 18px; margin-bottom: 14px !important; border-bottom: 1px solid var(--hk-line);
}
.tax-topic .hk-tax-header .hk-tax-title-row, .tax-lecture_season .hk-tax-header .hk-tax-title-row, .tax-fa_topic .hk-tax-header .hk-tax-title-row { justify-content: center; }
.tax-topic .hk-tax-header .hk-tax-title, .tax-lecture_season .hk-tax-header .hk-tax-title, .tax-fa_topic .hk-tax-header .hk-tax-title { font-size: 1.3rem !important; }
.tax-topic .hk-tax-desc, .tax-lecture_season .hk-tax-desc, .tax-fa_topic .hk-tax-desc { color: var(--hk-muted); font-size: 15px; margin-top: 8px; }
.hk-topic-toolbar { justify-content: flex-end !important; margin-bottom: 8px !important; }
.hk-topic-toolbar .hwza-stat-chip { display: none !important; }
/* course count back: on the right, sort button on the left */
.hk-topic-toolbar { justify-content: space-between !important; }
.hk-topic-toolbar .hwza-stat-chip { display: inline-flex !important; }
.tax-topic main > .hk-tax-header, .tax-lecture_season main > .hk-tax-header, .tax-fa_topic main > .hk-tax-header { border-bottom: 0 !important; padding-bottom: 6px !important; }

/* Transcript sentence colours — adjustable from the colour panel */
:root { --hk-sync-active: #F1E4C3; --hk-sync-hover: #E3E5C8; }
html[data-theme="dark"] { --hk-sync-active: #4A4232; --hk-sync-hover: #3A3528; }
.hwza-sync-segment:hover { background: var(--hk-sync-hover) !important; }
.hwza-sync-active, .hwza-sync-active:hover { background: var(--hk-sync-active) !important; box-shadow: 0 0 0 2px var(--hk-sync-active) !important; }
