:root {
    color: #201c22;
    background: #fbf7ee;
    font: 16px/1.5 'DM Sans', sans-serif;
    --ink: #201c22;
    --muted: #5e555d;
    --paper: #fffdf7;
    --line: #e0d7ca;
    --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #8b4cbd;
    outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1152px, calc(100% - 56px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand-mark {
    width: 30px; height: 31px; border-radius: 7px 10px 9px 7px;
    background: linear-gradient(90deg,#a64427 0 7px,#ee834e 7px);
    border: 1px solid #562c24; box-shadow: inset 0 -4px #f8ecd9;
}
.header-inner nav { display: flex; gap: clamp(12px, 3vw, 34px); align-items: center; }
.header-inner nav a { padding-block: 12px; font-size: .95rem; font-weight: 600; text-decoration: none; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { text-decoration: underline; }
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, .9fr); gap: clamp(20px, 3.8vw, 48px); align-items: start; padding-top: clamp(18px, 3vw, 35px); }
.catalog { scroll-margin-top: 20px; }
.section-heading h1, .ranking h2, .curiosity h2 { font: 400 2.65rem/1 var(--serif); letter-spacing: -.015em; }
.section-heading h1 { font-size: clamp(2.15rem, 4.2vw, 3rem); }
.section-heading p { margin-top: .35rem; color: var(--muted); font-size: .9rem; }
.approval-note { margin-top: .55rem; max-width: 67ch; color: var(--muted); font-size: .86rem; }
.catalog-filters { margin-top: 13px; padding: 0 0 19px; border-bottom: 1px solid var(--line); }
.type-filter, .search-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.type-filter button {
    color: var(--ink); border: 1px solid #bfb3ae; border-radius: 6px; background: transparent;
    min-height: 40px; padding: .35rem .8rem; font-weight: 700; font-size: .9rem;
}
.type-filter button[aria-pressed="true"] { color: #fff; background: #413147; border-color: #413147; }
.type-filter button:hover:not([aria-pressed="true"]) { background: #eee6de; }
.search-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr); gap: .7rem; margin-top: 13px; }
.search-filters label { display: grid; gap: .3rem; font-size: .83rem; font-weight: 700; }
.search-filters input, .search-filters select {
    width: 100%; min-height: 42px; color: var(--ink); background: var(--paper);
    border: 1px solid #c9bdb2; border-radius: 7px; padding: .35rem .65rem;
}
.book { display: grid; grid-template-columns: minmax(3.3rem,auto) minmax(0,1fr) fit-content(38%); gap: .35rem .6rem; align-items: start;
    border-bottom: 1px solid var(--line); padding: 14px 0; overflow-wrap: anywhere; }
.book h2 { margin: 0; font-size: 1rem; }
.book .suggestion-number { color: #61456b; padding-top: .12rem; }
.book .author, .book .book-meta { color: var(--muted); font-size: .84rem; }
.book .book-note, .book .book-meta, .book .book-stock { grid-column: 2/-1; white-space: pre-wrap; }
.book .book-stock { color: var(--muted); font-size: .83rem; }
.book .book-stock.in-stock { color: #295735; font-weight: 700; }
.book-correction, .book-copies { grid-column: 2/-1; font-size: .85rem; overflow-wrap: anywhere; }
.book-correction {
    background: #f9eddd; border-inline-start: 3px solid #b6673c;
    border-radius: 0 8px 8px 0; padding: .45rem .65rem;
}
.book-correction strong { font-size: .76rem; color: #734929; }
.book-copies { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.book-copies summary { cursor: pointer; padding: .4rem .65rem; font-weight: 700; color: #413147; }
.book-copies summary:focus-visible { outline: 3px solid #8b4cbd; outline-offset: 2px; }
.book-copies ul { list-style: none; padding: 0 .65rem; margin: 0; }
.book-copies li {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .6rem;
    border-top: 1px solid var(--line); padding-block: .45rem;
}
.copy-status { color: #5e555d; }
.copy-status[data-availability="Disponível"] { color: #295735; }
.copy-status[data-availability="Emprestado"] { color: #754209; }
.book .book-note { margin-top: 2px; font-size: .91rem; }
.empty { border: 1px dashed #c7b7ad; border-radius: 12px; padding: 24px; color: var(--muted); margin-top: 20px; background: var(--paper); }
.empty button { display: block; margin-top: .65rem; padding: .4rem .7rem; font-weight: 600; color: var(--ink); background: #f8e7dd; border: 1px solid #a68a7f; border-radius: 6px; }
.sidebar { display: grid; gap: 16px; }
.ranking { background: #eee6f4; border: 1px solid #d6c8df; border-radius: 15px; padding: 22px; }
.ranking p { margin-top: 12px; color: #4c3d56; font-size: .9rem; }
.ranking ol { margin: 0; padding-inline-start: 1.35rem; overflow-wrap: anywhere; }
.ranking li { padding-top: 11px; }
.ranking li:not(:last-child) { border-bottom: 1px solid #d6c8df; padding-bottom: 9px; }
.ranking li::marker { font-weight: 700; color: #664577; }
.ranking li span { display: block; color: #594863; font-size: .82rem; }
.curiosity { border-radius: 15px; overflow: hidden; background: #f7e5bb; border: 1px solid #dbcc9e; }
.curiosity img { display: block; width: 100%; height: auto; aspect-ratio: 2/1; object-fit: cover; object-position: center 42%; }
.curiosity > div { padding: 18px 22px 21px; }
.curiosity h2 { font-size: 2.15rem; }
.curiosity p { margin-top: .5rem; font-size: .9rem; }
.site-footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 20px 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 780px) {
    .wrap { width: calc(100% - 32px); }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
    .header-inner { flex-wrap: wrap; min-height: 0; gap: 2px 16px; padding-block: 12px 6px; }
    .header-inner nav { column-gap: 20px; }
    .header-inner nav a { padding-block: 8px; }
    .sidebar { grid-template-columns: 1fr; }
    .book { grid-template-columns: minmax(2.6rem,auto) minmax(0,1fr); }
    .book .suggestion-badge { grid-column: 2; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
