/* Belenga platform components. Works with the Belenga theme or any theme. */
:root {
	--bl-orange: #DE6117;
	--bl-orange-deep: #B54A0F;
	--bl-orange-soft: #FBE3D2;
	--bl-ink: #2A2420;
	--bl-ink-2: #4B4038;
	--bl-muted: #7A6B5F;
	--bl-cream: #FBF1E4;
	--bl-sand: #F4E5D1;
	--bl-paper: #FFFDF9;
	--bl-white: #FFFFFF;
	--bl-line: #EADCC8;
	--bl-ochre: #E3A33A;
	--bl-green: #2F7A4F;
	--bl-red: #B3361E;
	--bl-radius: 16px;
	--bl-radius-sm: 10px;
	--bl-shadow: 0 1px 2px rgba(42, 36, 32, .06), 0 8px 24px -12px rgba(42, 36, 32, .18);
	--bl-shadow-lg: 0 24px 60px -24px rgba(42, 36, 32, .35);
	--bl-serif: "Fraunces", Georgia, "Times New Roman", serif;
	--bl-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	/* Ankara motifs — original geometric tiles drawn for Belenga */
	--bl-ankara: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23DE6117'/%3E%3Cpath d='M32 4 60 32 32 60 4 32Z' fill='%232A2420'/%3E%3Cpath d='M32 14 50 32 32 50 14 32Z' fill='%23E3A33A'/%3E%3Ccircle cx='32' cy='32' r='8' fill='%23FBF1E4'/%3E%3Ccircle cx='32' cy='32' r='3.5' fill='%23DE6117'/%3E%3Cpath d='M0 0h10L0 10zM64 0H54l10 10zM0 64h10L0 54zM64 64H54l10-10z' fill='%23FBF1E4'/%3E%3C/svg%3E");
	--bl-ankara-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23DE6117' stroke-opacity='.12' stroke-width='2'%3E%3Cpath d='M36 6 66 36 36 66 6 36Z'/%3E%3Ccircle cx='36' cy='36' r='10'/%3E%3Cpath d='M0 0l12 12M72 0 60 12M0 72l12-12M72 72 60 60'/%3E%3C/g%3E%3Ccircle cx='36' cy='36' r='3' fill='%23DE6117' fill-opacity='.18'/%3E%3C/svg%3E");
	--bl-zigzag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='12' viewBox='0 0 32 12'%3E%3Crect width='32' height='12' fill='%232A2420'/%3E%3Cpath d='M0 12 8 2l8 10 8-10 8 10' fill='none' stroke='%23DE6117' stroke-width='3'/%3E%3Ccircle cx='8' cy='9' r='1.6' fill='%23E3A33A'/%3E%3Ccircle cx='24' cy='9' r='1.6' fill='%23E3A33A'/%3E%3C/svg%3E");
}

/* Components set display on labels and grids, so make sure the hidden attribute always wins. */
.bl-form [hidden], .bl-card [hidden], .bl-reader [hidden], [data-show][hidden], [data-method][hidden], .bl-yn__detail[hidden] { display: none !important; }

.bl-small { font-size: .875rem; }
.bl-muted { color: var(--bl-muted); }
.bl-center { text-align: center; }
.bl-eyebrow { font: 600 .75rem/1.2 var(--bl-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--bl-orange); margin: 0 0 .5rem; }
.bl-lead { font-size: 1.15rem; color: var(--bl-ink-2); max-width: 60ch; }
.bl-num { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--bl-ink); color: var(--bl-cream); font-size: .75rem; font-weight: 700; margin-right: .25rem; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.bl-btn { --b: var(--bl-ink); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.35rem; border-radius: 999px; border: 2px solid transparent; font: 600 .975rem/1.1 var(--bl-sans); text-decoration: none !important; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s; white-space: nowrap; }
.bl-btn:hover { transform: translateY(-1px); }
.bl-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.bl-btn--primary { background: var(--bl-orange); color: #fff !important; box-shadow: 0 6px 18px -8px rgba(222, 97, 23, .7); }
.bl-btn--primary:hover { background: var(--bl-orange-deep); }
.bl-btn--ghost { background: transparent; color: var(--bl-ink) !important; border-color: var(--bl-ink); }
.bl-btn--ghost:hover { background: var(--bl-ink); color: var(--bl-cream) !important; }
.bl-btn--dark { background: var(--bl-ink); color: var(--bl-cream) !important; }
.bl-btn--text { background: none; color: var(--bl-red) !important; padding-left: .25rem; padding-right: .25rem; }
.bl-btn--danger { background: var(--bl-red); color: #fff !important; }
.bl-btn--sm { padding: .5rem .95rem; font-size: .875rem; }
.bl-btn--block { display: flex; width: 100%; }
.bl-btn--block + .bl-btn--block { margin-top: .6rem; }
.bl-link-arrow { color: var(--bl-ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--bl-orange); padding-bottom: 2px; }
.bl-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.bl-actions form { margin: 0; }

/* ---------- Cards, notices, pills ---------- */
.bl-card { background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: var(--bl-radius); padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: var(--bl-shadow); margin-bottom: 1.25rem; }
.bl-card h2, .bl-card h3 { margin-top: 0; }
.bl-notice { border-radius: var(--bl-radius-sm); padding: .9rem 1.1rem; margin: 0 0 1.25rem; border: 1px solid; font-size: .95rem; }
.bl-notice--info { background: #FFF8EF; border-color: var(--bl-line); }
.bl-notice--success { background: #EAF5EE; border-color: #BFDFCB; color: #1F5A39; }
.bl-notice--warn { background: #FFF4E0; border-color: #F2D29C; color: #6E4A0E; }
.bl-notice--error { background: #FCEBE6; border-color: #F0C1B4; color: #7E2512; }
.bl-notice a { color: inherit; font-weight: 700; }
.bl-pill { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--bl-sand); color: var(--bl-ink-2); }
.bl-pill--approved, .bl-pill--verified { background: #DDF0E4; color: #1F5A39; }
.bl-pill--pending { background: #FFF0D6; color: #7A4F06; }
.bl-pill--rejected, .bl-pill--removed { background: #FADBD2; color: #7E2512; }
.bl-pill--withdrawn, .bl-pill--delisted { background: #ECE6DF; color: var(--bl-ink-2); }
.bl-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bl-orange); }
.bl-empty { text-align: center; padding: 2.5rem 1.5rem; }
.bl-empty h3 { font-family: var(--bl-serif); }

/* ---------- Forms ---------- */
.bl-form label { display: block; font-weight: 600; font-size: .9rem; color: var(--bl-ink); margin-bottom: 1rem; }
.bl-form input[type=text], .bl-form input[type=email], .bl-form input[type=tel], .bl-form input[type=password], .bl-form input[type=number], .bl-form input[type=date], .bl-form input[type=url], .bl-form select, .bl-form textarea,
.bl-filters input, .bl-filters select, #loginform input[type=text], #loginform input[type=password] {
	display: block; width: 100%; margin-top: .4rem; padding: .75rem .9rem; border: 1.5px solid var(--bl-line); border-radius: var(--bl-radius-sm); background: var(--bl-paper); font: 400 1rem var(--bl-sans); color: var(--bl-ink); transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
}
.bl-form input:focus, .bl-form select:focus, .bl-form textarea:focus, .bl-filters input:focus, .bl-filters select:focus, #loginform input:focus { outline: none; border-color: var(--bl-orange); box-shadow: 0 0 0 4px var(--bl-orange-soft); }
.bl-form input:disabled { background: var(--bl-sand); color: var(--bl-muted); }
.bl-form small { display: block; font-weight: 400; color: var(--bl-muted); margin-top: .35rem; font-size: .8rem; }
.bl-form__title { font-family: var(--bl-serif); font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 .5rem; }
.bl-form__section { font-family: var(--bl-serif); font-size: 1.25rem; margin: 1.75rem 0 1rem; padding-top: 1.25rem; border-top: 1px dashed var(--bl-line); }
.bl-form--narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.bl-form.bl-card { max-width: 820px; margin-left: auto; margin-right: auto; }
.bl-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1.25rem; }
.bl-file input[type=file] { display: block; margin-top: .45rem; font-size: .9rem; width: 100%; padding: .65rem; border: 1.5px dashed var(--bl-line); border-radius: var(--bl-radius-sm); background: var(--bl-paper); box-sizing: border-box; }
.bl-check { display: flex !important; gap: .65rem; align-items: flex-start; font-weight: 400 !important; }
.bl-check input { margin-top: .25rem; accent-color: var(--bl-orange); width: 1.1rem; height: 1.1rem; flex: none; }
.bl-choice { border: 0; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.bl-choice legend { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.bl-choice__opt { margin: 0 !important; position: relative; cursor: pointer; }
.bl-choice__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bl-choice__opt span { display: block; padding: 1rem 1.1rem; border: 2px solid var(--bl-line); border-radius: var(--bl-radius-sm); background: var(--bl-paper); transition: border-color .15s, background .15s; }
.bl-choice__opt strong { display: block; }
.bl-choice__opt small { margin: .15rem 0 0 !important; }
.bl-choice__opt input:checked + span { border-color: var(--bl-orange); background: #FFF6EE; box-shadow: inset 0 0 0 1px var(--bl-orange); }
.bl-choice__opt input:focus-visible + span { box-shadow: 0 0 0 4px var(--bl-orange-soft); }
.bl-choice__opt input:disabled + span { opacity: .6; }
.bl-choice--sm span { padding: .65rem .9rem; }
.bl-seg { display: inline-flex; background: var(--bl-sand); border-radius: 999px; padding: 4px; gap: 2px; }
.bl-seg label { margin: 0 !important; cursor: pointer; }
.bl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bl-seg span { display: block; padding: .45rem 1rem; border-radius: 999px; font-weight: 600; font-size: .875rem; color: var(--bl-ink-2); }
.bl-seg input:checked + span { background: var(--bl-ink); color: var(--bl-cream); }
.bl-seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--bl-orange-soft); }
.bl-yn { padding: 1rem 0; border-bottom: 1px solid var(--bl-line); }
.bl-yn__q { font-weight: 600; margin: 0 0 .6rem; }
.bl-yn__n { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--bl-ink); color: var(--bl-cream); font-size: .75rem; margin-right: .35rem; }
.bl-yn__detail { margin: .75rem 0 0 !important; }
.bl-submit > label:last-of-type { margin-top: 1rem; }
#loginform p { margin: 0 0 1rem; }
#loginform label { font-weight: 600; font-size: .9rem; }
#loginform .login-remember label { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
#loginform #wp-submit { width: 100%; background: var(--bl-orange); color: #fff; border: 0; border-radius: 999px; padding: .9rem; font: 600 1rem var(--bl-sans); cursor: pointer; }
#loginform #wp-submit:hover { background: var(--bl-orange-deep); }

/* ---------- Book covers & cards ---------- */
.bl-cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px 10px 10px 6px; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, -3px 0 0 rgba(0,0,0,.08) inset, 0 12px 28px -12px rgba(42, 36, 32, .45); background: var(--bl-sand); }
.bl-cover--gen { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; box-sizing: border-box; color: var(--bl-cream); overflow: hidden; }
.bl-cover--gen::before { content: ""; position: absolute; inset: 0 0 auto; height: 38%; background: var(--bl-ankara) 0 0 / 40px 40px; opacity: .95; }
.bl-cover--v0 { background: var(--bl-ink); }
.bl-cover--v1 { background: var(--bl-orange-deep); }
.bl-cover--v2 { background: #3B2C22; }
.bl-cover__title { position: relative; font: italic 800 clamp(1rem, 2.4vw, 1.35rem)/1.1 var(--bl-serif); }
.bl-cover__author { position: relative; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-top: .4rem; }
.bl-grid-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2rem 1.25rem; }
.bl-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 1.25rem; overflow-x: auto; padding: .5rem .25rem 1.25rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.bl-shelf > * { scroll-snap-align: start; }
.bl-bookcard__link { display: block; text-decoration: none !important; color: inherit; }
.bl-bookcard__cover { position: relative; transition: transform .25s ease; }
.bl-bookcard__link:hover .bl-bookcard__cover { transform: translateY(-4px) rotate(-.6deg); }
.bl-bookcard__badge { position: absolute; top: .5rem; left: .5rem; background: var(--bl-ink); color: var(--bl-cream); font-size: .7rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; }
.bl-bookcard__meta { padding-top: .75rem; }
.bl-bookcard__meta h3 { font: 700 1rem/1.25 var(--bl-serif); margin: 0 0 .2rem; color: var(--bl-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-bookcard__meta p { margin: 0; font-size: .85rem; color: var(--bl-muted); }
.bl-bookcard__foot { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; }
.bl-price { font-weight: 700; color: var(--bl-orange-deep); }

/* ---------- Catalogue ---------- */
.bl-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 2rem; padding: 1rem; background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: var(--bl-radius); box-shadow: var(--bl-shadow); }
.bl-filters input, .bl-filters select { margin: 0; width: auto; }
.bl-filters__search { flex: 1 1 240px; }
.bl-filters__search input { width: 100%; }
.bl-pager { display: flex; gap: .4rem; justify-content: center; margin: 2.5rem 0 0; }
.bl-pager a { display: grid; place-items: center; min-width: 2.4rem; height: 2.4rem; border-radius: 50%; text-decoration: none; color: var(--bl-ink); border: 1px solid var(--bl-line); }
.bl-pager a.is-current { background: var(--bl-ink); color: var(--bl-cream); border-color: var(--bl-ink); }
.bl-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.bl-section-head h2 { font-family: var(--bl-serif); font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0; line-height: 1.1; }
.bl-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.bl-cat { position: relative; display: flex; align-items: flex-end; min-height: 92px; padding: 1rem; border-radius: var(--bl-radius-sm); text-decoration: none !important; overflow: hidden; color: var(--bl-ink); background: var(--bl-white); border: 1px solid var(--bl-line); font: 700 1rem/1.2 var(--bl-serif); transition: transform .15s, box-shadow .15s; }
.bl-cat::after { content: ""; position: absolute; top: -18px; right: -18px; width: 64px; height: 64px; background: var(--bl-ankara) 0 0 / 32px 32px; border-radius: 50%; opacity: .9; transition: transform .3s; }
.bl-cat:hover { transform: translateY(-2px); box-shadow: var(--bl-shadow); }
.bl-cat:hover::after { transform: rotate(45deg) scale(1.1); }
.bl-cat--1 { background: var(--bl-ink); color: var(--bl-cream); border-color: var(--bl-ink); }
.bl-cat--2 { background: var(--bl-orange); color: #fff; border-color: var(--bl-orange); }
.bl-cat--3 { background: var(--bl-sand); }
.bl-cat span { position: relative; z-index: 1; }

/* ---------- Book page ---------- */
.bl-book { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; margin-bottom: 3rem; }
.bl-book__cover { position: sticky; top: 100px; }
.bl-book__cover::after { content: ""; display: block; height: 14px; margin: 1.25rem 10% 0; background: var(--bl-zigzag) 0 0 / 32px 12px; border-radius: 3px; opacity: .9; }
.bl-cover--lg { box-shadow: 0 30px 60px -24px rgba(42, 36, 32, .55); }
.bl-book__title { font: italic 800 clamp(2rem, 5vw, 3.25rem)/1.02 var(--bl-serif); margin: 0 0 .5rem; letter-spacing: -.01em; color: var(--bl-ink); }
.bl-book__author { font-size: 1.1rem; color: var(--bl-ink-2); margin: 0 0 .75rem; }
.bl-book__rating { display: inline-flex; gap: .4rem; align-items: center; text-decoration: none; color: var(--bl-ink); font-weight: 700; margin-bottom: 1.25rem; }
.bl-buybox { max-width: 420px; margin: 1.25rem 0; border-top: 4px solid var(--bl-orange); }
.bl-buybox__price { font: 800 2.25rem/1 var(--bl-serif); margin-bottom: 1rem; color: var(--bl-ink); }
.bl-buybox__owned { font-weight: 700; color: var(--bl-green); margin: 0 0 1rem; }
.bl-paylogos { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 1rem 0 .5rem; padding: 0; }
.bl-paylogos li { font-size: .7rem; font-weight: 700; padding: .25rem .55rem; border: 1px solid var(--bl-line); border-radius: 6px; color: var(--bl-ink-2); background: var(--bl-paper); }
.bl-specs { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 1.5rem 0 0; font-size: .95rem; }
.bl-specs dt { color: var(--bl-muted); }
.bl-specs dd { margin: 0; font-weight: 600; }
.bl-book__desc { max-width: 72ch; margin: 0 0 3rem; font-size: 1.075rem; line-height: 1.75; }
.bl-book__desc h2, .bl-reviews h2, .bl-more h2 { font-family: var(--bl-serif); }

/* ---------- Reviews ---------- */
.bl-stars { color: #D9CBB8; letter-spacing: 2px; }
.bl-stars .on { color: var(--bl-ochre); }
.bl-stars .half { background: linear-gradient(90deg, var(--bl-ochre) 50%, #D9CBB8 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bl-reviews { margin-bottom: 3rem; }
.bl-reviews__avg { font-size: 1.5rem; }
.bl-reviews__list { display: grid; gap: 1rem; }
.bl-review { background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: var(--bl-radius-sm); padding: 1.1rem 1.25rem; }
.bl-review header { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.bl-review p { margin: .6rem 0; }
.bl-verified { color: var(--bl-green); font-weight: 600; }
.bl-rate { border: 0; padding: 0; margin: 0 0 1rem; display: inline-flex; flex-direction: row-reverse; gap: .1rem; }
.bl-rate input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bl-rate label { font-size: 2rem; color: #D9CBB8; cursor: pointer; margin: 0 !important; line-height: 1; }
.bl-rate input:checked ~ label, .bl-rate label:hover, .bl-rate label:hover ~ label { color: var(--bl-ochre); }
.bl-rate input:focus-visible + label { outline: 2px solid var(--bl-orange); border-radius: 4px; }

/* ---------- Library & dashboard ---------- */
.bl-library, .bl-titles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.bl-libitem { display: grid; grid-template-columns: 96px 1fr; gap: 1.1rem; margin: 0; }
.bl-libitem__cover { display: block; }
.bl-libitem__body h3 { font: 700 1.1rem/1.25 var(--bl-serif); margin: .25rem 0; }
.bl-libitem__body p { margin: 0 0 .4rem; }
.bl-progress { height: 6px; background: var(--bl-sand); border-radius: 999px; overflow: hidden; margin: .75rem 0 .25rem; }
.bl-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--bl-orange), var(--bl-ochre)); border-radius: 999px; }
.bl-dash { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.bl-dash__nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: .25rem; background: var(--bl-ink); padding: .75rem; border-radius: var(--bl-radius); overflow: hidden; }
.bl-dash__nav::after { content: ""; display: block; height: 10px; margin: .75rem -.75rem -.75rem; background: var(--bl-zigzag) 0 0 / 32px 12px; }
.bl-dash__nav a { color: #E9DCCB; text-decoration: none; padding: .7rem .9rem; border-radius: var(--bl-radius-sm); font-weight: 600; font-size: .95rem; }
.bl-dash__nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.bl-dash__nav a.is-active { background: var(--bl-orange); color: #fff; }
.bl-dash__main { min-width: 0; }
.bl-dash__sep { display: block; height: 1px; background: rgba(255,255,255,.12); margin: .5rem .5rem; }
.bl-dash__nav a.bl-dash__signout { color: #F2B48E; }
.bl-dash__nav a.bl-dash__signout:hover { background: rgba(222,97,23,.18); color: #fff; }
.bl-actions--tight { margin-top: 0; }
.bl-idcard { border-top: 4px solid var(--bl-orange); }
.bl-form--auth { max-width: 640px !important; }
.bl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.bl-stat { background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: var(--bl-radius); padding: 1.1rem 1.2rem; box-shadow: var(--bl-shadow); display: flex; flex-direction: column; gap: .3rem; }
.bl-stat__label { font-size: .78rem; font-weight: 600; color: var(--bl-muted); text-transform: uppercase; letter-spacing: .06em; }
.bl-stat__value { font: 800 1.6rem/1.1 var(--bl-serif); color: var(--bl-ink); }
.bl-stat__hint { font-size: .8rem; color: var(--bl-muted); }
.bl-stat--accent { background: var(--bl-ink) var(--bl-ankara-soft); border-color: var(--bl-ink); }
.bl-stat--accent .bl-stat__label, .bl-stat--accent .bl-stat__hint { color: #D8C7B3; }
.bl-stat--accent .bl-stat__value { color: var(--bl-orange); }
.bl-table-wrap { overflow-x: auto; margin: 0 -.25rem; }
.bl-table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.bl-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bl-muted); padding: .6rem .5rem; border-bottom: 2px solid var(--bl-line); white-space: nowrap; }
.bl-table td { padding: .75rem .5rem; border-bottom: 1px solid var(--bl-line); vertical-align: top; }
.bl-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-table tr.is-refund td { color: var(--bl-muted); }
.bl-table--compact td { padding: .55rem .25rem; }
.bl-table tr.is-total td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--bl-ink); color: var(--bl-orange-deep); }
.bl-dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 1rem 0; }
.bl-dl dt { color: var(--bl-muted); }
.bl-dl dd { margin: 0; font-weight: 600; }
.bl-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; align-items: start; }
.bl-ticks { list-style: none; padding: 0; margin: 1rem 0; }
.bl-ticks li { padding: .4rem 0 .4rem 1.75rem; position: relative; font-weight: 600; }
.bl-ticks li::before { content: ""; position: absolute; left: 0; top: .6rem; width: 1rem; height: 1rem; background: var(--bl-ankara) center / 16px 16px; border-radius: 3px; transform: rotate(45deg) scale(.8); }
.bl-list { padding-left: 1.1rem; }
.bl-list li { margin: .4rem 0; }
.bl-agreement__text { max-height: 420px; overflow-y: auto; border: 1px solid var(--bl-line); border-radius: var(--bl-radius-sm); padding: 1.25rem 1.5rem; margin: 1rem 0 1.5rem; background: var(--bl-paper); font-size: .925rem; }
.bl-danger summary { cursor: pointer; font-weight: 700; color: var(--bl-red); }
.bl-account { max-width: 760px; margin: 0 auto; }

/* ---------- Legal ---------- */
.bl-legal-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; max-width: 1100px; margin: 0 auto; }
.bl-legal-side { position: sticky; top: calc(var(--bl-header-h, 77px) + 1.25rem); display: flex; flex-direction: column; gap: 1rem; max-height: calc(100vh - var(--bl-header-h, 77px) - 2.5rem); overflow-y: auto; }
.bl-legal-docs { display: flex; flex-direction: column; background: var(--bl-ink); border-radius: var(--bl-radius); padding: .5rem; }
.bl-legal-docs a { color: #E9DCCB; text-decoration: none; padding: .6rem .8rem; border-radius: var(--bl-radius-sm); font-weight: 600; font-size: .9rem; }
.bl-legal-docs a:hover { color: #fff; background: rgba(255,255,255,.07); }
.bl-legal-docs a.is-current { background: var(--bl-orange); color: #fff; }
.bl-legal-toc { background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: var(--bl-radius); padding: .9rem 1rem; font-size: .85rem; }
.bl-legal-toc summary { cursor: pointer; font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bl-muted); }
.bl-legal-toc ol { list-style: none; margin: .6rem 0 0; padding: 0; }
.bl-legal-toc li { margin: 0; }
.bl-legal-toc a { display: block; padding: .3rem 0; color: var(--bl-ink-2); text-decoration: none; line-height: 1.35; }
.bl-legal-toc a:hover { color: var(--bl-orange-deep); }
.bl-legal-print { align-self: flex-start; }

.bl-legal { background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: var(--bl-radius); box-shadow: var(--bl-shadow); padding: clamp(1.5rem, 5vw, 3.5rem); color: var(--bl-ink); font-size: 1rem; line-height: 1.75; min-width: 0; }
.bl-legal__head { text-align: center; padding-bottom: 1.75rem; margin-bottom: 2rem; position: relative; }
.bl-legal__head::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 120px; height: 10px; transform: translateX(-50%); background: var(--bl-zigzag) 0 0 / 24px 10px; border-radius: 2px; }
.bl-legal__head h2 { font: 700 clamp(1.9rem, 5vw, 2.6rem)/1.1 var(--bl-serif); color: var(--bl-ink); margin: 0 0 .5rem; letter-spacing: -.01em; }
.bl-legal__head p { margin: 0; }
.bl-legal h3 { scroll-margin-top: calc(var(--bl-header-h, 77px) + 1rem); color: var(--bl-ink); font: 700 1.2rem/1.3 var(--bl-serif); margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--bl-line); }
.bl-legal h3:first-of-type { border-top: 0; padding-top: 0; }
.bl-legal h4 { font: 700 1rem/1.4 var(--bl-sans); margin: 1.5rem 0 .6rem; color: var(--bl-ink-2); }
/* Clause numbers hang in the margin so each clause reads as one unbroken paragraph. */
.bl-legal p { position: relative; margin: 0 0 .85rem; padding-left: 3rem; text-align: left; hyphens: manual; overflow-wrap: break-word; }
.bl-legal p.sub { padding-left: 5.5rem; }
.bl-legal .n { position: absolute; left: 0; top: 0; width: 2.75rem; font-weight: 700; color: var(--bl-orange-deep); font-variant-numeric: tabular-nums; }
.bl-legal p.sub .n { left: 3rem; color: var(--bl-muted); font-weight: 600; }
.bl-legal p:not(:has(.n)) { padding-left: 0; }
.bl-legal p.sub:not(:has(.n)) { padding-left: 3rem; }
.bl-legal strong { font-weight: 700; color: var(--bl-ink); }
.bl-legal a { color: var(--bl-orange-deep); }
.bl-agreement__text.bl-legal { box-shadow: none; padding: 1.5rem; }

@media (max-width: 900px) {
	.bl-legal-wrap { grid-template-columns: 1fr; }
	.bl-legal-side { position: static; max-height: none; }
	.bl-legal-docs { flex-direction: row; overflow-x: auto; }
	.bl-legal-docs a { white-space: nowrap; }
	.bl-legal-toc { display: none; }
	.bl-legal-print { display: none; }
}
@media (max-width: 560px) {
	.bl-legal { padding: 1.25rem; font-size: .975rem; }
	.bl-legal p { padding-left: 2.4rem; }
	.bl-legal p.sub { padding-left: 4.4rem; }
	.bl-legal p.sub .n { left: 2.4rem; }
	.bl-legal .n { width: 2.3rem; }
}
@media print {
	.site-header, .site-footer, .bl-legal-side { display: none !important; }
	.bl-legal-wrap { display: block; }
	.bl-legal { border: 0; box-shadow: none; padding: 0; }
	body { background: #fff !important; }
}

/* ---------- Landing pieces ---------- */
.bl-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 2rem 0; }
.bl-step { margin: 0; }
.bl-step span { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--bl-orange); color: #fff; font: 800 1.1rem var(--bl-serif); margin-bottom: .75rem; }
.bl-step h3 { font-family: var(--bl-serif); margin: 0 0 .4rem; }
.bl-step p { margin: 0; color: var(--bl-ink-2); }
.bl-hero-mini { padding: 1rem 0 1.5rem; }
.bl-hero-mini h2 { font: italic 800 clamp(2rem, 5vw, 3rem)/1.05 var(--bl-serif); margin: 0 0 1rem; }

/* ---------- Modal ---------- */
.bl-modal { position: fixed; inset: 0; background: rgba(30, 24, 20, .55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 99999; padding: 16px; animation: bl-fade .2s ease; }
.bl-modal__box { background: var(--bl-white); border-radius: var(--bl-radius); padding: 2rem; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--bl-shadow-lg); border-top: 6px solid var(--bl-orange); }
.bl-modal__box h3 { font-family: var(--bl-serif); font-size: 1.4rem; margin: .5rem 0; }
.bl-modal__ok { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: #DDF0E4; color: var(--bl-green); display: grid; place-items: center; font-size: 1.75rem; font-weight: 800; }
.bl-spinner { width: 44px; height: 44px; margin: 0 auto 1rem; border-radius: 50%; border: 4px solid var(--bl-sand); border-top-color: var(--bl-orange); animation: bl-spin .9s linear infinite; }
@keyframes bl-spin { to { transform: rotate(360deg); } }
@keyframes bl-fade { from { opacity: 0; } }

/* ---------- Reader ---------- */
.bl-reader { position: relative; background: #EFE5D8; border-radius: var(--bl-radius); overflow: hidden; overflow: clip; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; min-height: 70vh; }
.bl-reader--audio { min-height: 0; }
.bl-reader__bar { position: sticky; top: var(--bl-header-h, 77px); z-index: 5; display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: var(--bl-ink); color: var(--bl-cream); }
.bl-reader__back { color: var(--bl-cream) !important; text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.bl-reader__title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bl-reader__title strong { font-family: var(--bl-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-reader__title span { font-size: .8rem; opacity: .75; }
.bl-reader__tools { display: flex; align-items: center; gap: .35rem; }
.bl-reader__tools button { background: rgba(255,255,255,.1); color: var(--bl-cream); border: 0; border-radius: 8px; padding: .4rem .6rem; font-weight: 700; cursor: pointer; }
.bl-reader__tools button:hover { background: var(--bl-orange); }
.bl-reader__page { font-size: .85rem; min-width: 5rem; text-align: right; font-variant-numeric: tabular-nums; }
.bl-reader__stage { padding: 1.5rem .5rem 3rem; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.bl-reader__loading { padding: 4rem 1rem; color: var(--bl-muted); }
.bl-page { position: relative; background: #fff; box-shadow: 0 6px 24px -10px rgba(42,36,32,.35); max-width: 100%; overflow: hidden; }
.bl-page canvas { display: block; pointer-events: none; }
.bl-page__wm { position: absolute; inset: auto 0 10px 0; text-align: center; font-size: 10px; letter-spacing: .08em; color: rgba(42, 36, 32, .28); pointer-events: none; }
.bl-reader__cta { text-align: center; background: var(--bl-white); border-radius: var(--bl-radius); padding: 2rem 1.5rem; max-width: 520px; width: calc(100% - 2rem); margin: 1rem auto 2rem; box-shadow: var(--bl-shadow); border-top: 6px solid var(--bl-orange); }
.bl-reader__cta h3 { font-family: var(--bl-serif); font-size: 1.5rem; margin: 0 0 1rem; }
.bl-player { display: grid; grid-template-columns: minmax(160px, 280px) 1fr; gap: 2rem; padding: clamp(1.25rem, 4vw, 2.5rem); align-items: center; background: var(--bl-cream) var(--bl-ankara-soft); }
.bl-player__cover img { width: 100%; border-radius: 10px; box-shadow: var(--bl-shadow-lg); }
.bl-player__body h2 { font: italic 800 clamp(1.5rem, 4vw, 2.25rem)/1.1 var(--bl-serif); margin: 0 0 .25rem; }
.bl-player__seek { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.bl-player__seek input { flex: 1; accent-color: var(--bl-orange); }
.bl-player__controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.bl-player__controls button, .bl-player__controls select { background: var(--bl-white); border: 1px solid var(--bl-line); border-radius: 999px; padding: .55rem .9rem; font-weight: 700; cursor: pointer; color: var(--bl-ink); font-family: var(--bl-sans); }
.bl-player__play { width: 64px; height: 64px; padding: 0 !important; background: var(--bl-orange) !important; color: #fff !important; border: 0 !important; font-size: 1.35rem; box-shadow: 0 10px 24px -10px rgba(222,97,23,.8); }
.bl-player__play.is-playing { background: var(--bl-ink) !important; }
@media print { .bl-reader { display: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.bl-book { grid-template-columns: 1fr; }
	.bl-book__cover { position: static; max-width: 260px; margin: 0 auto; }
	.bl-dash { grid-template-columns: 1fr; }
	.bl-dash__nav { position: static; flex-direction: row; overflow-x: auto; }
	.bl-dash__nav::after { display: none; }
	.bl-dash__nav a { white-space: nowrap; }
	.bl-dash__sep { width: 1px; height: auto; margin: .4rem .25rem; }
	.bl-player { grid-template-columns: 1fr; text-align: center; }
	.bl-player__cover { max-width: 220px; margin: 0 auto; }
	.bl-player__controls { justify-content: center; }
}
@media (max-width: 560px) {
	.bl-libitem { grid-template-columns: 76px 1fr; }
	.bl-library, .bl-titles { grid-template-columns: 1fr; }
	.bl-grid-books { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
	.bl-reader__tools button { padding: .35rem .45rem; }
	.bl-reader__back { font-size: 0; }
	.bl-reader__back::before { content: "←"; font-size: 1.1rem; }
	.bl-filters { padding: .75rem; }
}
