/* Humanity Islam Digital Library — components (works with any theme; matches the Humanity Islam theme). */
:root {
	--hi-forest: #103C32;
	--hi-emerald: #017358;
	--hi-emerald-dk: #17493F;
	--hi-ivory: #FCFBF7;
	--hi-sage: #EFF5EF;
	--hi-sage-2: #E3EEE6;
	--hi-gold: #C5A56A;
	--hi-gold-dk: #8C6D2F;
	--hi-text: #21332D;
	--hi-muted: #5E6E66;
	--hi-line: #E3E8E3;
	--hi-white: #FFFFFF;
	--hi-danger: #B42318;
	--hi-radius: 6px;
	--hi-radius-lg: 10px;
	--hi-shadow: 0 1px 2px rgba(16,60,50,.05), 0 10px 30px -14px rgba(16,60,50,.22);
	--hi-shadow-lg: 0 18px 44px -12px rgba(16,60,50,.22);
	--hi-serif: "EB Garamond", "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--hi-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--hi-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif;
	--hi-container: 1280px;
}

.hi-ico { flex: none; vertical-align: middle; }
.hi-form[hidden], .hi-auth [hidden], .hi-card [hidden], .hi-stats [hidden] { display: none !important; }
.hi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hi-container { width: 100%; max-width: var(--hi-container); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .hi-container { padding-inline: 16px; } }

/* ---------- typography helpers ---------- */
.hi-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 700 12px/1.3 var(--hi-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--hi-emerald); }
.hi-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--hi-gold); }
.hi-eyebrow--light { color: var(--hi-gold); }
.hi-h1 { font-family: var(--hi-serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -.01em; color: var(--hi-forest); margin: 0 0 14px; }
.hi-h2 { font-family: var(--hi-serif); font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; color: var(--hi-forest); margin: 0 0 12px; }
.hi-h3 { font-family: var(--hi-serif); font-weight: 600; font-size: 22px; line-height: 1.3; color: var(--hi-forest); margin: 0 0 12px; }
.hi-lead { font-size: 17px; line-height: 1.7; color: var(--hi-muted); max-width: 720px; margin: 0 0 20px; }
.hi-muted { color: var(--hi-muted); }
.hi-prose { font-size: 17px; line-height: 1.8; color: var(--hi-text); }
.hi-prose p { margin: 0 0 1em; }
.hi-prose [dir="rtl"], .hi-prose:lang(ur) { font-family: var(--hi-urdu); line-height: 2.3; }
.hi-link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--hi-emerald); text-decoration: none; white-space: nowrap; }
.hi-link-arrow:hover { color: var(--hi-forest); text-decoration: underline; text-decoration-color: var(--hi-gold); text-underline-offset: 4px; }

/* ---------- buttons ---------- */
.hi-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--hi-radius);
	font: 600 15px/1.2 var(--hi-sans); text-decoration: none !important; cursor: pointer; white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.hi-btn:focus-visible, .hi-icon-btn:focus-visible { outline: 2px solid var(--hi-emerald); outline-offset: 2px; }
.hi-btn-primary { background: var(--hi-emerald); color: #fff !important; }
.hi-btn-primary:hover { background: var(--hi-emerald-dk); color: #fff; }
.hi-btn-outline { background: #fff; color: var(--hi-forest) !important; border-color: var(--hi-line); }
.hi-btn-outline:hover { background: var(--hi-sage); border-color: var(--hi-emerald); }
.hi-btn-ghost { background: transparent; color: var(--hi-forest) !important; border-color: transparent; padding-inline: 12px; }
.hi-btn-ghost:hover { background: var(--hi-sage); }
.hi-btn-gold { background: transparent; color: var(--hi-gold) !important; border-color: var(--hi-gold); }
.hi-btn-gold:hover { background: var(--hi-gold); color: var(--hi-forest) !important; }
.hi-btn-light { background: #fff; color: var(--hi-forest) !important; }
.hi-btn-light:hover { background: var(--hi-sage); }
.hi-btn-sm { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.hi-btn-lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.hi-btn-block { width: 100%; }
.hi-btn.is-disabled, .hi-btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.hi-btn.is-loading { opacity: .8; }
.hi-btn-wa .hi-ico { color: #128C7E; }

.hi-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hi-line);
	background: rgba(255,255,255,.94); color: var(--hi-forest); cursor: pointer; text-decoration: none;
	box-shadow: 0 2px 6px rgba(16,60,50,.12); transition: background .15s, color .15s, transform .15s;
}
.hi-icon-btn:hover { background: #fff; color: var(--hi-emerald); transform: translateY(-1px); }
.hi-icon-btn.is-saved, .hi-btn.is-saved { color: var(--hi-emerald); }
.hi-wa:hover { color: #128C7E; }

/* ---------- badges & chips ---------- */
.hi-badge {
	display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 4px;
	font: 600 12px/1.3 var(--hi-sans); letter-spacing: .02em; text-decoration: none;
	background: var(--hi-sage); color: var(--hi-forest); border-left: 2px solid var(--hi-gold);
}
.hi-badge--lang { background: #E6F2EC; color: var(--hi-emerald); border-left-color: var(--hi-emerald); }
a.hi-badge:hover { background: var(--hi-sage-2); }
.hi-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.hi-chip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px;
	background: #fff; border: 1px solid var(--hi-line); color: var(--hi-forest); text-decoration: none; font-size: 14px; font-weight: 500;
}
.hi-chip:hover { border-color: var(--hi-emerald); background: var(--hi-sage); }
.hi-chip--clear { background: transparent; border-color: transparent; color: var(--hi-emerald); font-weight: 600; }
.hi-count-pill { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--hi-sage); color: var(--hi-forest); font-size: 12px; text-align: center; }

/* ---------- book grid & card ---------- */
.hi-books-grid { display: grid; gap: 24px; grid-template-columns: repeat(var(--hi-cols, 4), minmax(0, 1fr)); }
.hi-cols-2 { --hi-cols: 2; } .hi-cols-3 { --hi-cols: 3; } .hi-cols-4 { --hi-cols: 4; } .hi-cols-5 { --hi-cols: 5; }
@media (max-width: 1180px) { .hi-cols-4, .hi-cols-5 { --hi-cols: 3; } }
@media (max-width: 860px) { .hi-books-grid { --hi-cols: 2 !important; gap: 16px; } }
@media (max-width: 560px) { .hi-books-grid { --hi-cols: 1 !important; gap: 14px; } }

.hi-card {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: #fff; border: 1px solid var(--hi-line); border-radius: var(--hi-radius-lg); overflow: hidden;
	transition: box-shadow .2s, transform .2s, border-color .2s;
}
.hi-card:hover { box-shadow: var(--hi-shadow); border-color: #D5DFD7; transform: translateY(-2px); }
.hi-card__cover { position: relative; background: var(--hi-sage); padding: 18px 18px 14px; }
.hi-card__cover-link { display: block; aspect-ratio: 3 / 4; }
.hi-card__img, .hi-card__cover .hi-cover-ph { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; filter: drop-shadow(0 8px 14px rgba(16,60,50,.22)); }
.hi-card__quick { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; }
.hi-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; padding: 16px 16px 14px; }
.hi-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.hi-card__title { font: 600 20px/1.25 var(--hi-serif); margin: 2px 0 0; color: var(--hi-forest); }
.hi-card__title a { color: inherit; text-decoration: none; }
.hi-card__title a:hover { color: var(--hi-emerald); }
.hi-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.hi-card__author { margin: 0; font-size: 13px; color: var(--hi-muted); }
.hi-card__desc { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--hi-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hi-card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hi-line); position: relative; z-index: 1; }
.hi-card__quick, .hi-card .hi-actions { position: relative; z-index: 2; }
.hi-card__quick { position: absolute; }
.hi-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.hi-actions .hi-btn { padding-inline: 8px; min-width: 0; }
.hi-card .hi-actions .hi-btn { font-size: 14px; gap: 6px; padding-inline: 6px; }
.hi-actions .hi-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hi-stat[hidden] { display: none; }
.hi-card .hi-actions .hi-btn span { overflow: hidden; text-overflow: ellipsis; }
.hi-actions .hi-s { display: none; }
.hi-card .hi-actions .hi-l { display: none; }
.hi-card .hi-actions .hi-s { display: inline; }
.hi-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 0; font-size: 13px; color: var(--hi-muted); font-variant-numeric: tabular-nums; }
.hi-stat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hi-stat b { color: var(--hi-text); font-weight: 700; }
.hi-stats--big { font-size: 15px; gap: 6px 20px; margin-top: 14px; }
.hi-unavailable { margin: 8px 0 0; font-size: 13px; color: var(--hi-gold-dk); font-weight: 600; }

/* Compact card text on narrow grid cards */
/* Mobile: horizontal card — cover left, details right (both buttons + count always visible) */
@media (max-width: 560px) {
	.hi-card { flex-direction: row; }
	.hi-card__cover { flex: 0 0 112px; padding: 12px 10px; display: flex; align-items: flex-start; }
	.hi-card__cover-link { width: 100%; }
	.hi-card__quick { top: auto; bottom: 8px; right: 50%; transform: translateX(50%); flex-direction: row; gap: 6px; }
	.hi-card__quick .hi-icon-btn { width: 36px; height: 36px; }
	.hi-card__cover { padding-bottom: 54px; }
	.hi-card__body { padding: 12px 12px 12px 14px; gap: 4px; }
	.hi-card__title { font-size: 18px; }
	.hi-card__desc { display: none; }
	.hi-card__foot { padding-top: 10px; }
	.hi-actions .hi-btn { min-height: 42px; font-size: 13.5px; gap: 5px; padding-inline: 6px; }
}

/* generated cover when no image */
.hi-cover-ph { display: flex; align-items: stretch; justify-content: stretch; aspect-ratio: 3/4; padding: 10%; background: var(--hi-forest); border-radius: 2px; }
.hi-cover-ph__frame { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--hi-gold); padding: 12%; border-radius: 40% 40% 4px 4px / 22% 22% 4px 4px; }
.hi-cover-ph__title { font: 500 clamp(14px, 1.6vw, 20px)/1.3 var(--hi-serif); color: #F3E9D2; }

/* ---------- page head / breadcrumbs ---------- */
.hi-main { background: var(--hi-ivory); }
.hi-page-head { padding: 28px 0 36px; background: linear-gradient(180deg, var(--hi-sage) 0%, var(--hi-ivory) 100%); border-bottom: 1px solid var(--hi-line); }
.hi-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 13px; color: var(--hi-muted); }
.hi-breadcrumbs a { color: var(--hi-muted); text-decoration: none; }
.hi-breadcrumbs a:hover { color: var(--hi-emerald); text-decoration: underline; }
.hi-breadcrumbs [aria-current] { color: var(--hi-forest); font-weight: 600; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-breadcrumbs span[aria-hidden] { color: #B8C4BD; }

/* search */
.hi-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 760px; padding: 6px 6px 6px 16px; background: #fff; border: 1px solid var(--hi-line); border-radius: var(--hi-radius-lg); box-shadow: var(--hi-shadow); }
.hi-search:focus-within { border-color: var(--hi-emerald); box-shadow: 0 0 0 4px rgba(1,115,88,.1), var(--hi-shadow); }
.hi-search > .hi-ico { color: var(--hi-muted); }
.hi-search input { flex: 1; min-width: 0; height: 44px; border: 0 !important; outline: none; background: transparent; font: 400 16px var(--hi-sans); color: var(--hi-text); box-shadow: none !important; padding: 0 !important; }
.hi-search--lg input { height: 48px; }

/* ---------- archive layout ---------- */
.hi-archive__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; padding-top: 32px; padding-bottom: 72px; }
.hi-filters__form { position: sticky; top: 96px; background: #fff; border: 1px solid var(--hi-line); border-radius: var(--hi-radius-lg); padding: 18px; }
.hi-filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hi-filters__head h2 { margin: 0; font: 600 20px var(--hi-serif); color: var(--hi-forest); }
.hi-filters__close { display: none; box-shadow: none; }
.hi-filter-group { border: 0; padding: 14px 0 6px; margin: 0; border-top: 1px solid var(--hi-line); }
.hi-filter-group + .hi-filter-group { margin-top: 8px; }
.hi-filter-group legend { padding: 0; margin-bottom: 8px; font: 700 12px var(--hi-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--hi-muted); }
.hi-checkrow { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 15px; color: var(--hi-text); }
.hi-checkrow:hover { background: var(--hi-sage); }
.hi-checkrow input { width: 18px; height: 18px; accent-color: var(--hi-emerald); margin: 0; flex: none; }
.hi-checkrow span { flex: 1; }
.hi-checkrow em { font-style: normal; font-size: 12px; color: var(--hi-muted); background: var(--hi-sage); border-radius: 999px; padding: 1px 8px; }
.hi-filters__foot { display: grid; gap: 8px; margin-top: 14px; }
.js .hi-filters__foot .hi-btn-primary { display: none; }
.hi-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hi-results__count { margin: 0; color: var(--hi-muted); }
.hi-results__count strong { color: var(--hi-forest); font-size: 18px; }
.hi-toolbar__right { display: flex; align-items: center; gap: 10px; }
.hi-filters__open { display: none; }
.hi-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--hi-muted); }
.hi-sort select { min-height: 40px; padding: 6px 34px 6px 12px; border: 1px solid var(--hi-line); border-radius: var(--hi-radius); background: #fff; font: 500 14px var(--hi-sans); color: var(--hi-text); }
.hi-filters-backdrop { position: fixed; inset: 0; z-index: 998; background: rgba(16,60,50,.45); }
.hi-filters-backdrop[hidden] { display: none; }

@media (max-width: 1023px) {
	.hi-archive__layout { grid-template-columns: 1fr; gap: 0; padding-top: 22px; }
	.hi-filters__open { display: inline-flex; }
	.hi-filters { position: fixed; z-index: 999; left: 0; right: 0; bottom: 0; max-height: 86vh; transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
	.hi-filters.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
	.hi-filters__form { position: static; max-height: 86vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
	.hi-filters__close { display: inline-flex; }
	.js .hi-filters__foot .hi-btn-primary { display: inline-flex; }
	.hi-filters__foot { position: sticky; bottom: 0; background: #fff; padding-top: 10px; grid-template-columns: 1fr 1fr; }
}
html.hi-noscroll { overflow: hidden; }

/* pagination */
.hi-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 40px 0 0; }
.hi-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--hi-radius); border: 1px solid var(--hi-line); background: #fff; color: var(--hi-forest); text-decoration: none; font-weight: 600; }
.hi-pagination .page-numbers.current { background: var(--hi-emerald); border-color: var(--hi-emerald); color: #fff; }
.hi-pagination a.page-numbers:hover { border-color: var(--hi-emerald); background: var(--hi-sage); }
.hi-pagination .dots { border: 0; background: transparent; }
@media (max-width: 560px) { .hi-pagination .prev span, .hi-pagination .next span { display: none; } }

/* empty states & alerts */
.hi-empty { text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed #CBD7CF; border-radius: var(--hi-radius-lg); color: var(--hi-muted); }
.hi-empty .hi-ico { color: var(--hi-gold); margin-bottom: 8px; }
.hi-empty h2, .hi-empty h3 { font: 600 24px var(--hi-serif); color: var(--hi-forest); margin: 4px 0 6px; }
.hi-empty p { margin: 0 0 18px; }
.hi-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--hi-radius); margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.hi-alert p { margin: 4px 0 0; }
.hi-alert-success { background: #E7F4EC; color: #0B5A41; border: 1px solid #BFE0CD; }
.hi-alert-error { background: #FDEDEC; color: var(--hi-danger); border: 1px solid #F4C7C3; }
.hi-alert-info { background: var(--hi-sage); color: var(--hi-forest); border: 1px solid var(--hi-line); }
.hi-toast-static { display: flex; align-items: center; gap: 10px; margin-top: 16px; margin-bottom: -4px; padding: 12px 16px; background: #E7F4EC; border: 1px solid #BFE0CD; color: #0B5A41; border-radius: var(--hi-radius); font-weight: 500; }
.hi-toast-static a { color: inherit; font-weight: 700; }
.hi-toast-static--warn { background: #FFF6E5; border-color: #F1DDB2; color: #7A5410; }
.hi-toast { position: fixed; z-index: 10000; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--hi-forest); color: #fff; padding: 12px 18px; border-radius: 8px; font: 500 14px var(--hi-sans); box-shadow: var(--hi-shadow-lg); transition: opacity .2s, transform .2s; }
.hi-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- single book ---------- */
.hi-book-hero { padding: 26px 0 56px; background: linear-gradient(180deg, var(--hi-sage) 0%, var(--hi-ivory) 92%); border-bottom: 1px solid var(--hi-line); }
.hi-book-hero__grid { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 56px; align-items: start; }
.hi-cover-frame { position: relative; padding: 28px; background: #fff; border: 1px solid var(--hi-line); border-radius: 160px 160px var(--hi-radius-lg) var(--hi-radius-lg); box-shadow: var(--hi-shadow); }
.hi-cover-frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--hi-gold); border-radius: 150px 150px 6px 6px; opacity: .55; pointer-events: none; }
.hi-book-cover, .hi-cover-frame .hi-cover-ph { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; margin-top: 30px; filter: drop-shadow(0 14px 22px rgba(16,60,50,.25)); }
.hi-book-title { margin-top: 12px; }
.hi-orig-title { font-family: var(--hi-urdu); font-size: 24px; line-height: 2; color: var(--hi-emerald); margin: -6px 0 6px; }
.hi-book-by { margin: 0 0 14px; color: var(--hi-muted); font-size: 16px; }
.hi-book-by strong { color: var(--hi-text); font-weight: 600; }
.hi-book-actions { margin: 24px 0 18px; padding: 20px; background: #fff; border: 1px solid var(--hi-line); border-radius: var(--hi-radius-lg); max-width: 560px; }
.hi-book-actions .hi-actions { grid-template-columns: 1fr 1fr; }
.hi-free-note { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--hi-line); font-size: 13px; color: var(--hi-muted); }
.hi-free-note .hi-ico { color: var(--hi-emerald); }
.hi-share-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hi-share-row .hi-btn { border-color: var(--hi-line); background: #fff; }
.hi-share-row .hi-btn:hover { background: var(--hi-sage); }

.hi-book-body { padding: 56px 0; }
.hi-book-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.hi-book-info { background: #fff; border: 1px solid var(--hi-line); border-radius: var(--hi-radius-lg); padding: 22px; position: sticky; top: 96px; }
.hi-book-info dl { margin: 0; }
.hi-book-info dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--hi-line); font-size: 14px; }
.hi-book-info dt { color: var(--hi-muted); }
.hi-book-info dd { margin: 0; text-align: end; font-weight: 600; color: var(--hi-text); }
.hi-reader-teaser { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 18px 20px; background: var(--hi-forest); color: #fff !important; text-decoration: none; border-radius: var(--hi-radius-lg); transition: background .15s; }
.hi-reader-teaser:hover { background: #0B3229; }
.hi-reader-teaser .hi-muted { color: rgba(255,255,255,.75); font-size: 14px; }
.hi-reader-teaser__icon { display: flex; width: 54px; height: 54px; align-items: center; justify-content: center; border: 1px solid var(--hi-gold); border-radius: 50%; color: var(--hi-gold); flex: none; }
.hi-reader-teaser > .hi-ico:last-child { margin-left: auto; color: var(--hi-gold); }
.hi-section { padding: 64px 0; }
.hi-related { background: var(--hi-sage); border-top: 1px solid var(--hi-line); }
.hi-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.hi-section-head .hi-h2 { margin: 0; }
.hi-sticky-actions { display: none; }

@media (max-width: 960px) {
	.hi-book-hero__grid { grid-template-columns: 1fr; gap: 28px; }
	.hi-book-hero__cover { max-width: 340px; margin-inline: auto; width: 100%; }
	.hi-book-body__grid { grid-template-columns: 1fr; gap: 28px; }
	.hi-book-info { position: static; }
}
@media (max-width: 640px) {
	.hi-book-hero { padding-bottom: 32px; }
	.hi-book-hero__cover { max-width: 260px; }
	.hi-cover-frame { padding: 20px; }
	.hi-book-actions { padding: 14px; }
	.hi-book-body { padding: 36px 0 90px; }
	.hi-section { padding: 44px 0; }
	.hi-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
	.hi-sticky-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--hi-line); box-shadow: 0 -8px 24px -12px rgba(16,60,50,.25); transform: translateY(110%); transition: transform .2s; }
	.hi-sticky-actions:not(.is-on) { visibility: hidden; }
	.hi-sticky-actions.is-on { transform: none; }
	.hi-share-row .hi-btn { flex: 1 1 auto; }
}

/* ---------- forms ---------- */
.hi-form { display: grid; gap: 16px; }
.hi-form-wrap { scroll-margin-top: 110px; }
.hi-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hi-field > label { font: 600 14px var(--hi-sans); color: var(--hi-forest); }
.hi-req { color: var(--hi-danger); }
.hi-opt { font-weight: 400; color: var(--hi-muted); font-size: 13px; }
.hi-field input[type="text"], .hi-field input[type="email"], .hi-field input[type="tel"], .hi-field input[type="password"], .hi-field input[type="url"], .hi-field input[type="number"], .hi-field select, .hi-field textarea {
	width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #D3DCD5; border-radius: var(--hi-radius);
	background: #fff; font: 400 16px/1.4 var(--hi-sans); color: var(--hi-text); box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.hi-field textarea { min-height: 130px; resize: vertical; }
.hi-field input:focus, .hi-field select:focus, .hi-field textarea:focus { outline: none; border-color: var(--hi-emerald); box-shadow: 0 0 0 4px rgba(1,115,88,.12); }
.hi-field [aria-invalid="true"] { border-color: var(--hi-danger); }
.hi-field input:disabled { background: var(--hi-sage); color: var(--hi-muted); }
.hi-field-error { color: var(--hi-danger); font-size: 13px; font-weight: 500; }
.hi-check label { display: flex; align-items: flex-start; gap: 10px; font: 400 14px/1.5 var(--hi-sans); color: var(--hi-muted); cursor: pointer; }
.hi-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--hi-emerald); flex: none; }
.hi-check a { color: var(--hi-emerald); }
.hi-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hi-grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .hi-grid-2, .hi-grid-3 { grid-template-columns: 1fr; } }
.hi-pass { position: relative; }
.hi-pass input { padding-right: 52px !important; }
.hi-pass__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: transparent; color: var(--hi-muted); cursor: pointer; border-radius: 6px; }
.hi-pass__toggle:hover { color: var(--hi-emerald); }
.hi-form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.hi-form-row a { color: var(--hi-emerald); font-weight: 600; }
.hi-check-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--hi-muted); }
.hi-check-inline input { accent-color: var(--hi-emerald); width: 17px; height: 17px; }

/* ---------- account ---------- */
.hi-auth { display: grid; grid-template-columns: 1fr 1.15fr; max-width: 980px; margin: 0 auto; background: #fff; border: 1px solid var(--hi-line); border-radius: 14px; overflow: hidden; box-shadow: var(--hi-shadow); }
.hi-auth__aside { position: relative; padding: 44px 40px; background: var(--hi-forest); color: #fff; overflow: hidden; }
.hi-auth__aside::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 280px; height: 280px; border: 1px solid rgba(197,165,106,.35); border-radius: 50% 50% 0 0; }
.hi-auth__aside h2 { font: 500 32px/1.2 var(--hi-serif); margin: 0 0 22px; color: #fff; }
.hi-auth__aside ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.hi-auth__aside li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.9); }
.hi-auth__aside li .hi-ico { color: var(--hi-gold); }
.hi-auth__note { display: flex; gap: 8px; align-items: center; font-size: 14px; color: rgba(255,255,255,.75); margin: 0; }
.hi-auth__main { padding: 36px 40px 40px; }
.hi-tabs { display: flex; gap: 4px; padding: 4px; background: var(--hi-sage); border-radius: 10px; margin-bottom: 24px; }
.hi-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 14px; border-radius: 8px; color: var(--hi-muted); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.hi-tab.is-active { background: #fff; color: var(--hi-forest); box-shadow: 0 1px 3px rgba(16,60,50,.1); }
.hi-tab:hover { color: var(--hi-forest); }
.hi-tabs--scroll { overflow-x: auto; scrollbar-width: none; }
.hi-tabs--scroll .hi-tab { flex: 0 0 auto; }
@media (max-width: 820px) {
	.hi-auth { grid-template-columns: 1fr; }
	.hi-auth__aside { padding: 28px 22px; }
	.hi-auth__aside h2 { font-size: 26px; }
	.hi-auth__aside ul { margin-bottom: 16px; }
	.hi-auth__main { padding: 24px 20px 28px; }
}
.hi-mylib__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hi-mylib__head .hi-h2 { margin: 0; }
.hi-progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hi-progress-row { display: flex; align-items: center; gap: 16px; padding: 14px; background: #fff; border: 1px solid var(--hi-line); border-radius: var(--hi-radius-lg); }
.hi-progress-row__cover { flex: 0 0 64px; height: 86px; display: flex; background: var(--hi-sage); border-radius: 4px; padding: 6px; }
.hi-progress-row__cover img, .hi-progress-row__cover .hi-cover-ph { width: 100%; height: 100%; object-fit: contain; padding: 0; }
.hi-progress-row__cover .hi-cover-ph__title { font-size: 9px; }
.hi-progress-row__body { flex: 1; min-width: 0; }
.hi-progress-row__body h3 { font: 600 19px var(--hi-serif); margin: 0 0 8px; }
.hi-progress-row__body h3 a { color: var(--hi-forest); text-decoration: none; }
.hi-progress-row__body p { margin: 6px 0 0; font-size: 13px; }
.hi-progressbar { height: 6px; background: var(--hi-sage); border-radius: 999px; overflow: hidden; max-width: 420px; }
.hi-progressbar span { display: block; height: 100%; background: var(--hi-emerald); border-radius: 999px; }
.hi-page-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hi-account-form { max-width: 520px; }
.hi-small { font-size: 14px; margin: 4px 0 0; text-align: center; }
.hi-small a { color: var(--hi-emerald); font-weight: 600; }
@media (max-width: 560px) {
	.hi-progress-row { flex-wrap: wrap; }
	.hi-progress-row .hi-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.hi-card, .hi-btn, .hi-icon-btn, .hi-filters, .hi-toast, .hi-sticky-actions { transition: none !important; }
	.hi-card:hover { transform: none; }
}
