/* Електронна библиотека „Луи Брайл 1928“
   Теми: светла, тъмна, висок контраст. Размери на текста: m, l, xl.
   Палитра около логото: дълбоко синьо за текст, връзки и бутони; слънчево златисто само за акценти
   (подчертаване, рамки, сияние) — никога за текст. Всички двойки цвят/фон са поне WCAG AA (проверено 2026-10-17).
   Шрифт: Sofia Sans (Lettersoup, България; SIL Open Font License — assets/fonts/OFL.txt), вариативен, на нашия сървър
   (без външни заявки). Основните му форми са българските; при грешка в зареждането — системният шрифт.
   Шрифтът не влияе на екранните четци: те четат текста, не рисунката на буквите.
   Без text-transform: uppercase — четците получават текста с главни букви и може да го четат по различен начин.
   Движението (повдигане, преходи) се изключва при „намалено движение“ в системата. */

@font-face {
  font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-sans-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-sans-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f6f7fb;
  --bg-tint: #eef2fb;
  --surface: #ffffff;
  --text: #141a2b;
  --muted: #4a5468;
  --border: #8a93a6;
  --hairline: #e1e5ee;
  --accent: #1c45b8;
  --accent-hover: #14317f;
  --on-accent: #ffffff;
  --accent-soft: #e8eefc;
  --sun: #f5b301;
  --sun-soft: #fff4d6;
  --header-from: #0e1f4d;
  --header-to: #1d3d8f;
  --header-text: #ffffff;
  --header-sub: #d7def0;
  --error: #a61b1b;
  --error-soft: #fdecec;
  --success: #166534;
  --success-soft: #e9f7ee;
  --focus: #b45309;
  --shadow-sm: 0 1px 2px rgba(14, 31, 77, .06), 0 1px 3px rgba(14, 31, 77, .08);
  --shadow: 0 2px 4px rgba(14, 31, 77, .05), 0 8px 24px rgba(14, 31, 77, .08);
  --shadow-lift: 0 4px 8px rgba(14, 31, 77, .06), 0 16px 36px rgba(14, 31, 77, .12);
  --radius: 16px;
  --radius-sm: 10px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1220;
  --bg-tint: #111a2e;
  --surface: #161d2e;
  --text: #e7ecf3;
  --muted: #a3afc2;
  --border: #7c879b;
  --hairline: #263049;
  --accent: #86b4ff;
  --accent-hover: #b8d3ff;
  --on-accent: #0b1530;
  --accent-soft: #1b2a4a;
  --sun: #ffc94a;
  --sun-soft: #2e2716;
  --header-from: #080d1a;
  --header-to: #14254a;
  --header-text: #f2f5fa;
  --header-sub: #c3cde0;
  --error: #ff9c9c;
  --error-soft: #3a1c1c;
  --success: #8fe0ad;
  --success-soft: #16301f;
  --focus: #ffc94a;
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03);
  --shadow-lift: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0d1220;
    --bg-tint: #111a2e;
    --surface: #161d2e;
    --text: #e7ecf3;
    --muted: #a3afc2;
    --border: #7c879b;
    --hairline: #263049;
    --accent: #86b4ff;
    --accent-hover: #b8d3ff;
    --on-accent: #0b1530;
    --accent-soft: #1b2a4a;
    --sun: #ffc94a;
    --sun-soft: #2e2716;
    --header-from: #080d1a;
    --header-to: #14254a;
    --header-text: #f2f5fa;
    --header-sub: #c3cde0;
    --error: #ff9c9c;
    --error-soft: #3a1c1c;
    --success: #8fe0ad;
    --success-soft: #16301f;
    --focus: #ffc94a;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03);
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

:root[data-theme="contrast"] {
  --bg: #000000;
  --bg-tint: #000000;
  --surface: #000000;
  --text: #ffffff;
  --muted: #ffffff;
  --border: #ffffff;
  --hairline: #ffffff;
  --accent: #ffe600;
  --accent-hover: #ffffff;
  --on-accent: #000000;
  --accent-soft: #000000;
  --sun: #ffe600;
  --sun-soft: #000000;
  --header-from: #000000;
  --header-to: #000000;
  --header-text: #ffffff;
  --header-sub: #ffffff;
  --error: #ff8a8a;
  --error-soft: #000000;
  --success: #7dffb0;
  --success-soft: #000000;
  --focus: #00e5ff;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lift: none;
  color-scheme: dark;
}

html { font-size: 118.75%; -webkit-text-size-adjust: 100%; }   /* Sofia Sans е с по-ниски малки букви — основата е 19 px */
html[data-size="l"] { font-size: 137.5%; }
html[data-size="xl"] { font-size: 168.75%; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Sofia Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
  line-height: 1.6;
  font-weight: 430;   /* малко по-плътно от обичайното за по-добра четливост */
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: 44rem; margin-inline: auto; }
main { flex: 1; padding-block: 2.25rem 3.5rem; }
main:focus { outline: none; }

/* ------------------------------------------------------------ текст */

h1, h2, h3 {
  font-family: "Sofia Sans", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
  color: var(--text);
}
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.15; margin: 0 0 1.35rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
h2 { font-size: 1.4rem; font-weight: 700; line-height: 1.25; margin: 2.5rem 0 .9rem; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 650; line-height: 1.35; margin: 0; }
p, ul, ol, dl { margin: 0 0 1rem; }
.prose { max-width: 46rem; }
.prose li { margin-bottom: .5rem; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .9rem; margin: .35rem 0 0; }

a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: .14em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -6rem; z-index: 10;
  background: var(--accent); color: var(--on-accent);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 0; color: var(--on-accent); }

/* ------------------------------------------------------------ глава */

/* Тъмносиня лента със слабо слънчево сияние зад логото */
.site-header {
  color: var(--header-text);
  background:
    radial-gradient(28rem 12rem at 6% 50%, rgba(245, 179, 1, .22), transparent 70%),
    linear-gradient(120deg, var(--header-from), var(--header-to));
  border-bottom: 3px solid var(--sun);
}
:root[data-theme="contrast"] .site-header { background: #000; border-bottom-color: #fff; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .85rem; }
.brand { display: inline-flex; align-items: center; gap: .9rem; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-logo {
  flex: none; width: 3.4rem; height: 3.4rem; border-radius: 14px; background: #ffffff; object-fit: contain; padding: .15rem;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 6px 18px rgba(0, 0, 0, .25);
}
.brand-text { line-height: 1.25; }
.brand-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: .85rem; color: var(--header-sub); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.site-nav form { margin: 0; }
.site-nav a, .link-button {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1rem;
  color: var(--header-text); text-decoration: none; font: inherit; font-weight: 600;
  background: transparent; border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
}
.site-nav a:hover, .link-button:hover { color: var(--header-text); background: rgba(255, 255, 255, .12); }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); box-shadow: inset 0 -3px 0 var(--sun); }
:root[data-theme="contrast"] .site-nav a[aria-current="page"] { color: var(--accent); background: none; box-shadow: inset 0 -3px 0 var(--accent); }

.site-footer { background: var(--surface); border-top: 1px solid var(--hairline); padding-block: 1.75rem 2.25rem; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 3rem; align-items: flex-start; }
.footer-nav, .contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-nav a, .contact a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer-nav a[aria-current="page"] { font-weight: 700; text-decoration-thickness: .14em; }
.footer-heading { font-size: .92rem; font-weight: 700; margin: 0; color: var(--muted); }
.copyright { flex-basis: 100%; margin: 0; padding-top: 1rem; border-top: 1px solid var(--hairline); color: var(--muted); }
.prose .contact { margin-bottom: 1rem; }

/* ------------------------------------------------------- компоненти */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.25rem;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  color: var(--accent); background: var(--surface);
  border: 2px solid var(--accent); border-radius: 999px;
}
.btn:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(14, 31, 77, .15), 0 6px 16px -4px rgba(28, 69, 184, .45);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
:root[data-theme="dark"] .btn-primary, :root[data-theme="contrast"] .btn-primary { box-shadow: none; }
.btn-block { width: 100%; }
.btn-large { font-size: 1.15rem; padding: .85rem 1.9rem; }

.notice {
  border: 1px solid var(--hairline); border-inline-start: 6px solid var(--sun);
  background: var(--sun-soft); border-radius: var(--radius);
  padding: 1.1rem 1.35rem; margin-bottom: 1.5rem;
}
.notice h2 { margin-top: 0; }
.notice-error { border-color: var(--error); border-inline-start-color: var(--error); background: var(--error-soft); color: var(--error); font-weight: 600; }
.notice-success { border-color: var(--success); border-inline-start-color: var(--success); background: var(--success-soft); }

.tag {
  display: inline-block; padding: .05rem .65rem; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface);
}
.tag-category { border-color: transparent; color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------ форми */

.form > * + * { margin-top: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
label, legend { font-weight: 600; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"], select {
  width: 100%; min-height: 3rem; padding: .55rem .9rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 2px solid var(--border); border-radius: 12px;
}
input:hover, select:hover { border-color: var(--accent); }
input:focus-visible, select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { padding: 0; margin-bottom: .5rem; font-size: 1.1rem; }

.check { display: flex; align-items: flex-start; gap: .7rem; padding: .45rem 0; }
.check input { flex: none; width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; accent-color: var(--accent); }
.check label { font-weight: 400; }

/* ---------------------------------------------------------- каталог */

.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filters .field { flex: 1 1 12rem; }
.filters .field-grow { flex: 3 1 18rem; }

/* Търсачката на началната страница — по-голяма, с мек син фон */
.search-hero {
  background:
    radial-gradient(40rem 14rem at 100% 0%, var(--sun-soft), transparent 70%),
    linear-gradient(135deg, var(--surface), var(--bg-tint));
  padding: 1.8rem 1.8rem 1.6rem;
}
.search-hero h2 { margin-top: 0; }
.search-hero input[type="search"] { min-height: 3.4rem; font-size: 1.1rem; }
.search-hero .btn { min-height: 3.4rem; padding-inline: 1.75rem; }
.search-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.search-row .field { flex: 1 1 16rem; }

.stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.stats li { flex: 1 1 14rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); }
.stats strong { display: block; font-size: 1.6rem; line-height: 1.2; color: var(--accent); }

.letters { margin-bottom: 1.5rem; }
.letters summary {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.1rem;
  font-weight: 600; color: var(--accent); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.letters summary:hover { background: var(--accent-soft); }
.letters ul { list-style: none; margin: .85rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.letters a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; min-height: 2.75rem; padding: .25rem .6rem;
  font-weight: 700; text-decoration: none;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--shadow-sm);
}
.letters a:hover { background: var(--accent-soft); border-color: var(--accent); }
.letters a[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.results-heading { margin-top: 0; }

/* Книга: карта, която се повдига при посочване и се откроява, когато фокусът е в нея */
.book-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.book {
  position: relative;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 1.1rem 1.35rem 1.1rem 1.6rem; margin-bottom: .8rem; box-shadow: var(--shadow-sm);
}
.book::before {
  content: ""; position: absolute; inset-block: .9rem; inset-inline-start: 0;
  width: 4px; border-radius: 0 4px 4px 0; background: var(--sun); opacity: .55;
}
.book:hover, .book:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.book:hover::before, .book:focus-within::before { opacity: 1; background: var(--accent); }
.book-main { flex: 1 1 18rem; min-width: 0; }
.book-title a { text-decoration: none; overflow-wrap: anywhere; }
.book-title a:hover { text-decoration: underline; }
.book-author { margin: .15rem 0 .4rem; font-weight: 600; color: var(--muted); }
.book-meta { margin: 0; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .3rem .75rem; align-items: center; }
.btn-download { flex: none; }

/* Таблица със заглавия (по избор на читателя): четецът я обхожда по колони със заглавията на колоните */
.view-switch { margin: 0 0 1rem; }
.book-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.5rem;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.book-table th, .book-table td { padding: .9rem 1.1rem; text-align: start; vertical-align: top; border-top: 1px solid var(--hairline); }
.book-table thead th { background: var(--accent-soft); border-top: 0; font-weight: 700; }
.book-table tbody th { font-weight: 400; }
.book-table tbody tr:first-child > * { border-top: 0; }
.book-table tbody tr:hover > *, .book-table tbody tr:focus-within > * { background: var(--bg-tint); }
.book-table .bt-title { width: 52%; overflow-wrap: break-word; }
.book-table .bt-title > a { font-weight: 650; text-decoration: none; }
.book-table .bt-title > a:hover { text-decoration: underline; }
.book-table .bt-author { overflow-wrap: break-word; }
.book-table .bt-get { width: 1%; white-space: nowrap; }
.book-table .book-meta { margin-top: .35rem; }

.pagination { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; padding-top: 1.25rem; border-top: 1px solid var(--hairline); }
.pagination p { margin: 0; font-weight: 600; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.goto { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-inline-start: auto; }
.goto input { width: 6rem; }

/* ----------------------------------------------------------- детайли */

.details { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0; }
.details dt, .details dd { padding: .7rem 0; border-top: 1px solid var(--hairline); }
.details dt:first-of-type, .details dd:first-of-type { border-top: 0; }
.details dt { font-weight: 600; color: var(--muted); padding-inline-end: 1.5rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }

.plain-list { list-style: none; padding: 0; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; margin-bottom: .75rem; }
.row form { margin: 0; }

.history li { padding: .7rem 0; border-bottom: 1px solid var(--hairline); }
.sub-heading { margin: 1.75rem 0 .75rem; }
.stats-line {
  display: inline-block; font-size: 1.05rem;
  padding: .55rem 1.1rem; margin-bottom: 1.25rem;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.stats-line strong { color: var(--accent); font-size: 1.35rem; white-space: nowrap; margin-inline-end: .35rem; }
.footer-account { margin: .5rem 0 0; color: var(--muted); }

/* Приложенията за изтегляне в долната част: плочки с икона (само картинка), име и подробности. */
.app-list { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.app-card { display: flex; align-items: center; gap: .85rem; min-height: 3.25rem; padding: .7rem 1.1rem .7rem .9rem; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.app-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.app-icon { flex: none; width: 2rem; height: 2rem; padding: .35rem; border-radius: 10px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-text { display: flex; flex-direction: column; }
.app-name { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
.app-meta { color: var(--muted); font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .app-card, .app-card:hover { transition: none; transform: none; } }
@media (forced-colors: active) { .app-icon { stroke: CanvasText; background: Canvas; } .app-card { border-color: CanvasText; } }
.tag { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.plain-list.tight { margin: 0; }
.plain-list.tight li + li { margin-top: .25rem; }
select { text-overflow: ellipsis; }

/* --------------------------------------------------------- адаптация */

@media (max-width: 34rem) {
  h1 { font-size: 1.65rem; }
  .card, .search-hero { padding: 1.2rem; }
  .details { grid-template-columns: 1fr; }
  .details dt { padding-bottom: 0; }
  .details dd { border-top: 0; padding-top: .1rem; }
  .btn-download { width: 100%; }
  .book-table .btn-download { width: auto; }
  .book-table { table-layout: fixed; }
  .book-table th, .book-table td { padding: .6rem .4rem; font-size: .88rem; }
  .book-table thead th { font-size: .85rem; }
  .book-table .bt-title { width: 40%; overflow-wrap: break-word; }
  .book-table .bt-author { width: 26%; overflow-wrap: break-word; }
  /* „Изтегли“ е една дума и не се пренася — колоната е достатъчно широка за бутона */
  .book-table .bt-get { width: 34%; white-space: normal; }
  .book-table .btn-download { padding: .35rem .4rem; font-size: .85rem; }
  .book-table .tag { font-size: .75rem; padding: .1rem .4rem; }
  .goto { margin-inline-start: 0; }
}

/* Най-тесните телефони (320 точки): по-плътна таблица, за да се събира бутонът „Изтегли“ */
@media (max-width: 22.5rem) {
  .book-table th, .book-table td { padding: .5rem .25rem; }
  .book-table .bt-author { width: 24%; }
  .book-table .bt-get { width: 36%; }
  .book-table .btn-download { padding: .3rem .3rem; font-size: .78rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .letters a, .letters summary, input, select, .site-nav a, .link-button {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
  }
  .book { transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
  .book:hover { transform: translateY(-2px); }
  .book::before { transition: opacity .2s ease, background-color .2s ease; }
}

@media (forced-colors: active) {
  .btn, .card, .book, .notice, .letters a, .book-table, .stats-line { border: 1px solid CanvasText; }
  .book::before { display: none; }
  .site-nav a[aria-current="page"], .letters a[aria-current] { outline: 2px solid Highlight; }
}

@media print {
  .site-nav, .skip-link, .filters, .letters, .pagination, .btn, .footer-nav { display: none; }
  .site-header { background: none; color: #000; border: 0; }
  .book, .card { box-shadow: none; }
}
