@charset "UTF-8";
/* ===========================================================
   proa.cedulari.cat — estils globals
   Extret dels estils inline del mockup (Proa.dc.html) per evitar
   repetició. El resultat visual ha de ser idèntic al mockup.
   Paleta: fons #f5f0e6, tinta #201b13, accent #7a3b2e,
           secundaris #6a5f4c / #4a4131.
   =========================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* El header sticky canvia d'alçada en plegar-se/desplegar-se (.compact). Sense
   això, l'"scroll anchoring" natiu del navegador compensa el canvi ajustant
   scrollY per mantenir el mateix contingut fixat en pantalla — cosa que (a)
   anul·la l'espai que es vol guanyar en plegar el header i (b) pot arrossegar
   scrollY d'una banda a l'altra del llindar d'histèresi i fer-lo vibrar
   indefinidament. El desactivem a tot el document. */
html { overflow-anchor: none; }
body {
  background: #f5f0e6;
  color: #201b13;
  font-family: 'EB Garamond', serif;
}
a { color: inherit; }
a:hover { color: #7a3b2e; }
::selection { background: rgba(122, 59, 46, .15); }
input::placeholder { color: #a89a80; }

.site {
  min-height: 100vh;
  background: #f5f0e6;
  color: #201b13;
  font-family: 'EB Garamond', serif;
}

/* ===================== HEADER ===================== */
/* Estat ".compact": s'afegeix/treu via JS (base.html) en fer scroll, amb
   histèresi (es plega passats ~120px, es desplega per sota de ~60px). Es
   plega el rètol de dalt i el lema; el logotip es queda gran. Tot animat amb
   transicions, mai amb un salt sec. */
.site-header {
  border-bottom: 1px solid rgba(32, 27, 19, .2);
  background: #f5f0e6;
  position: sticky;
  top: 0;
  z-index: 20;
  transition: box-shadow .25s ease;
}
.site-header.compact {
  box-shadow: 0 2px 6px rgba(32, 27, 19, .08);
}
.site-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  transition: padding .28s ease;
}
.site-header.compact .header-inner {
  padding: 10px 40px;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  max-height: 40px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .28s ease, opacity .18s ease, margin-bottom .28s ease;
}
.site-header.compact .header-top {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}
.header-eyebrow {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.header-brand-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #7a6a4c;
  text-decoration: none;
}
.header-brand-link:hover { color: #7a3b2e; }
.header-lloc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #8a7a5c;
  margin-bottom: 6px;
}
.header-brand-link {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.header-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #7a3b2e;
}
/* Capçalera global (AUTORS/EDITORIALS/IMPREMTES): SEMPRE present, amb
   editorial o sense — és el primer nivell de la nav de dos nivells. */
.header-nav-global {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.header-nav-global a {
  cursor: pointer;
  text-decoration: none;
  position: relative;
  padding-bottom: 5px;
}
.header-nav-global a.active {
  color: #7a3b2e;
}
.header-nav-global a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: #7a3b2e;
}
.header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}
.header-title-link {
  cursor: pointer;
  text-decoration: none;
}
.header-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 46px;
  letter-spacing: .26em;
  text-indent: .26em;
  line-height: 1;
  transition: font-size .28s ease;
}
/* Noms d'editorial llargs (p.ex. Avel·lí Artís Balaguer): menys mida i menys
   espaiat perquè no ocupin tota l'amplada ni empenyin el menú a sota. */
.header-title.long {
  font-size: 34px;
  letter-spacing: .1em;
  text-indent: .1em;
}
.site-header.compact .header-title.long { font-size: 26px; }
/* En plegar-se, el logotip es queda gran: és la marca, i el gruix de l'espai
   ja el recuperem traient el rètol i el lema. */
.header-tagline {
  font-style: italic;
  font-size: 15px;
  color: #4a4131;
  margin-top: 4px;
  max-height: 30px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .28s ease, opacity .18s ease, margin-top .28s ease;
}
.site-header.compact .header-tagline {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
/* Capçalera de la portada (sense `editorial`): sòbria, sense rètol ni lema
   ni nav. Mateix llenguatge visual que la marca del peu (.footer-brand),
   però a la mida del logotip de capçalera. */
.header-brand-home {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 46px;
  line-height: 1;
  color: #201b13;
}
.header-brand-home-accent { color: #7a3b2e; }
/* Nav en dos nivells: primer (Catàleg, Col·leccions + cerca) destacat, segon
   (Autors, Traductors, Pròlegs, Adaptacions, Il·lustradors, Impremtes) més
   petit i apagat — són els llistats de persones/entitats, secundaris. En
   compactar el header es mantenen totes dues línies (per no perdre
   navegabilitat a mig scroll) però s'ajusten més juntes. */
.header-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;   /* es manté a la dreta encara que el títol llarg el faci baixar de línia */
  transition: gap .28s ease;
}
.site-header.compact .header-nav {
  gap: 6px;
}
.header-nav-primary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 17px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #201b13;
  padding-bottom: 4px;
  transition: font-size .28s ease;
}
.site-header.compact .header-nav-primary {
  font-size: 15px;
}
.header-nav a {
  cursor: pointer;
  text-decoration: none;
  position: relative;
  padding-bottom: 5px;
}
.header-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: #7a3b2e;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(32, 27, 19, .3);
  border-radius: 999px;
  padding: 7px 15px;
}
.header-search-icon { color: #7a3b2e; font-size: 14px; }
.header-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  color: #201b13;
  width: 150px;
  text-transform: none;
  letter-spacing: 0;
}

/* ===================== MENÚ MÒBIL (burger + calaix) ===================== */
.burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.burger span { display: block; width: 22px; height: 1.5px; background: #201b13; }
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(20, 16, 10, .4); z-index: 49;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
body.menu-open .drawer-scrim { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(84vw, 340px);
  background: #f5f0e6; z-index: 50; transform: translateX(100%);
  transition: transform .28s ease; box-shadow: -20px 0 40px -24px rgba(0, 0, 0, .5);
  overflow-y: auto;
}
body.menu-open .drawer { transform: translateX(0); }
.drawer-inner { padding: 24px 26px; display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.drawer-label { font-family: 'Space Grotesk', sans-serif; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7a6a4c; }
.drawer-close { background: none; border: none; cursor: pointer; font-size: 26px; line-height: 1; color: #6a5f4c; }
.drawer-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(32, 27, 19, .3); border-radius: 999px; padding: 10px 15px; margin-bottom: 26px;
}
.drawer-search input { border: none; background: transparent; outline: none; font-family: 'EB Garamond', serif; font-size: 15px; color: #201b13; width: 100%; }
.drawer-group { font-family: 'Space Grotesk', sans-serif; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8a7a5c; margin: 22px 0 10px; }
.drawer-group:first-of-type { margin-top: 0; }
.drawer-link { display: block; padding: 12px 0; font-family: 'Cormorant Garamond', serif; font-size: 24px; text-decoration: none; border-bottom: 1px solid rgba(32, 27, 19, .1); }
.drawer-link:last-child { border-bottom: none; }

/* ===================== FOOTER ===================== */
.site-footer {
  border-top: 1px solid rgba(32, 27, 19, .22);
  background: #f0eadd;
}
.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand {
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 40px;
  color: #201b13;
}
.footer-brand span { color: #7a3b2e; }
.footer-claim {
  max-width: 480px;
  font-size: 17px;
  line-height: 1.6;
  color: #4a4131;
  font-style: italic;
}
.footer-rule { height: 1px; background: rgba(32, 27, 19, .18); }
.footer-links {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  font-size: 15px;
  color: #6a5f4c;
}
.footer-links a {
  color: #201b13;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 59, 46, .5);
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
}

/* ===================== MAIN CONTAINERS ===================== */
.main-wide   { max-width: 1200px; margin: 0 auto; padding: 56px 40px 90px; }
.main-medium { max-width: 1100px; margin: 0 auto; padding: 60px 40px 90px; }
.main-medium-tight { max-width: 1100px; margin: 0 auto; padding: 44px 40px 90px; }
.main-narrow { max-width: 1000px; margin: 0 auto; padding: 44px 40px 90px; }
.main-narrow-loose { max-width: 1000px; margin: 0 auto; padding: 60px 40px 90px; }

.eyebrow {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 16px;
}
.back-link {
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6a5f4c;
}

/* ===================== HOME / CATÀLEG ===================== */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(32, 27, 19, .2);
}
.hero h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 58px;
  line-height: 1.04;
}
/* El nom de l'editorial, en cursiva, com a la seva pàgina (.editorial-hero). */
.hero h1 .italic { font-style: italic; }
.hero p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: #4a4131;
}
.catalog-bar {
  padding: 22px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid rgba(32, 27, 19, .2);
  flex-wrap: wrap;
}
.catalog-bar .title { font-family: 'Cormorant Garamond', serif; font-size: 26px; }
.catalog-bar .count { font-size: 14px; color: #6a5f4c; }

/* Control d'ordenació del catàleg: etiqueta + píndoles segmentades + direcció */
.catalog-sort { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.catalog-sort-label {
  font-family: 'Space Grotesk', sans-serif; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: #8a7a5c;
}
.sort-pills { display: flex; border: 1px solid rgba(32, 27, 19, .25); border-radius: 999px; overflow: hidden; }
.sort-pills .pill {
  padding: 7px 15px; font-family: 'Space Grotesk', sans-serif; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: #6a5f4c;
  text-decoration: none; white-space: nowrap;
}
.sort-pills .pill:hover { color: #7a3b2e; }
.sort-pills .pill.on { background: #7a3b2e; color: #f5f0e6; }
.sort-dir {
  width: 34px; height: 34px; border: 1px solid rgba(32, 27, 19, .25); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #7a3b2e;
  font-size: 15px; text-decoration: none; flex: none;
}
.sort-dir:hover { border-color: #7a3b2e; }

/* ===================== PÀGINA D'EDITORIAL (context + col·leccions) ===================== */
.editorial-hero {
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(32, 27, 19, .2);
}
.editorial-hero h1 {
  margin: 0 0 26px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 58px;
  line-height: 1.04;
}
.editorial-hero .italic { font-style: italic; }
.editorial-context {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
  color: #4a4131;
}
.editorial-context p { margin: 0 0 16px; }
.editorial-context p:last-child { margin-bottom: 0; }
.editorial-context a { color: #7a3b2e; }

.editorial-cronologia { margin-top: 54px; }
.editorial-cronologia .timeline-row:last-child .timeline-body { padding-bottom: 0; }
.editorial-colleccions { margin-top: 54px; }
.seccio-eyebrow {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 18px;
}
.colleccio-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-top: 1px solid rgba(32, 27, 19, .16);
  text-decoration: none;
  color: inherit;
  transition: padding-left .15s ease, background-color .15s ease;
}
.colleccio-row:last-child { border-bottom: 1px solid rgba(32, 27, 19, .16); }
.colleccio-row:hover {
  padding-left: 12px;
  background-color: rgba(122, 59, 46, .05);
}
.colleccio-row .nom {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  line-height: 1.15;
}
.colleccio-row:hover .nom { color: #7a3b2e; }
.colleccio-row .compte {
  flex: none;
  font-size: 14px;
  letter-spacing: .04em;
  color: #6a5f4c;
}

/* ===================== ORDENA (catàleg i llistes de persones) ===================== */
.sort-controls {
  display: flex;
  align-items: baseline;
  gap: 13px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.catalog-bar .sort-controls { margin-left: auto; }
.people-sort { margin: 0 0 30px; }
.sort-controls .sep { opacity: .4; }
.sort-controls a {
  cursor: pointer;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  color: inherit;
}
.sort-controls a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: #7a3b2e;
}

/* ===================== BOOK GRID / CARD ===================== */
.book-grid {
  padding-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 44px 40px;
}
.book-card {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .18), 0 22px 34px -22px rgba(0, 0, 0, .5);
  display: block;
}
/* Sense coberta: rètol groc, explícit. Val més dir-ho que dissimular-ho. */
.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #e9c948;
  border: 1px solid rgba(32, 27, 19, .28);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 22px 34px -22px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
}
.book-cover-placeholder .ph-avis {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b5410;
}
.book-cover-placeholder .ph-autor,
.book-cover-placeholder .ph-any {
  font-size: 13px;
  font-style: italic;
  color: #6a5f4c;
}
.book-cover-placeholder .ph-titol {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 19px;
  line-height: 1.25;
  color: #201b13;
}

/* Les tres plantilles de fons per a les fitxes sense coberta: orles
   modernistes escanejades del fons. La classe la tria la plantilla a partir
   de l'id del llibre, de manera que una fitxa surt sempre amb la mateixa.
   Doble classe a posta, per guanyar sobre .book-detail-cover-placeholder,
   que declara el seu propi fons més avall. */
.book-cover-placeholder.ph-fons-1,
.book-cover-placeholder.ph-fons-2,
.book-cover-placeholder.ph-fons-3 {
  background-color: #b8341d;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-color: rgba(32, 27, 19, .45);
  /* En percentatges perquè el text caigui dins del requadre buit de l'orla
     tant a la miniatura del llistat com a la coberta gran de la fitxa. */
  padding: 15% 14%;
  gap: 10px;
}
.book-cover-placeholder.ph-fons-1 { background-image: url('/static/plantilla-1.jpg'); }
.book-cover-placeholder.ph-fons-2 { background-image: url('/static/plantilla-2.jpg'); }
.book-cover-placeholder.ph-fons-3 { background-image: url('/static/plantilla-3.jpg'); }
/* Sobre el vermell de l'orla el text ha d'anar en clar. */
.book-cover-placeholder.ph-fons-1 .ph-avis,
.book-cover-placeholder.ph-fons-2 .ph-avis,
.book-cover-placeholder.ph-fons-3 .ph-avis {
  color: rgba(247, 239, 224, .78);
}
.book-cover-placeholder.ph-fons-1 .ph-titol,
.book-cover-placeholder.ph-fons-2 .ph-titol,
.book-cover-placeholder.ph-fons-3 .ph-titol {
  color: #f7efe0;
  text-shadow: 0 1px 3px rgba(60, 12, 4, .55);
}
.book-cover-placeholder.ph-fons-1 .ph-autor,
.book-cover-placeholder.ph-fons-2 .ph-autor,
.book-cover-placeholder.ph-fons-3 .ph-autor,
.book-cover-placeholder.ph-fons-1 .ph-any,
.book-cover-placeholder.ph-fons-2 .ph-any,
.book-cover-placeholder.ph-fons-3 .ph-any {
  color: rgba(247, 239, 224, .82);
  text-shadow: 0 1px 3px rgba(60, 12, 4, .5);
}
.book-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2px 8px;
  font-size: 13px;
  line-height: 1.35;
  color: #6a5f4c;
}
/* El número de col·lecció fa de guia a l'esquerra; el títol ocupa la seva
   línia sencera perquè no competeixi amb l'autor. */
.book-meta .num {
  grid-row: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: #7a3b2e;
}
.book-meta .author { grid-row: 1; font-style: italic; }
.book-meta .any { grid-row: 1; text-align: right; white-space: nowrap; }
.book-meta .titol {
  grid-row: 2;
  grid-column: 1 / -1;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: #201b13;
}
/* A la cerca global, cada targeta diu de quina editorial és. */
.book-editorial-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a3b2e;
}

.no-results {
  padding: 60px 0;
  text-align: center;
  font-style: italic;
  font-size: 20px;
  color: #6a5f4c;
}

/* ===================== PORTADA (tria d'editorial) ===================== */
.home-hero {
  padding: 44px 0 34px;
  border-bottom: 1px solid rgba(32, 27, 19, .14);
  margin-bottom: 48px;
}
.home-display {
  margin: 0 0 18px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 64px;
  line-height: 1.02;
  max-width: 820px;
  color: #201b13;
}
.home-display .italic { font-style: italic; }
.home-hero p {
  margin: 0;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.55;
  color: #4a4131;
}
.home-tria {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #8a7a5c;
  margin-bottom: 20px;
}
.home-editorials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid rgba(32, 27, 19, .2);
  border-bottom: 1px solid rgba(32, 27, 19, .2);
}
.home-stats .n {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
}
.home-stats .l {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #6a5f4c;
  margin-top: 4px;
}
.home-editorial {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 30px;
  border: 1px solid rgba(32, 27, 19, .22);
  background: rgba(255, 255, 255, .35);
  transition: border-color .18s ease, transform .18s ease;
}
.home-editorial:hover {
  border-color: #7a3b2e;
  transform: translateY(-2px);
}
.home-editorial .nom {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: #201b13;
}
.home-editorial:hover .nom { color: #7a3b2e; }
.home-editorial .compte {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
}

/* ===================== TIMELINE (col·leccions / cronologia) ===================== */
.timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 34px;
}
.timeline-year {
  text-align: right;
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  color: #7a3b2e;
  line-height: 1.2;
}
.timeline-body {
  position: relative;
  border-left: 1px solid rgba(32, 27, 19, .22);
  padding: 0 0 46px 36px;
}
.timeline-dot {
  position: absolute;
  left: -6px;
  top: 9px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #7a3b2e;
  border: 2px solid #f5f0e6;
}
.timeline-card {
  cursor: pointer;
  text-decoration: none;
  display: block;
  background: rgba(255, 252, 244, .6);
  border: 1px solid rgba(32, 27, 19, .18);
  padding: 24px 26px;
}
.timeline-card.is-static { cursor: default; }
.timeline-card-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.timeline-card-head h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 30px;
}
.timeline-card-tag {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.timeline-card p {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: #4a4131;
  max-width: 620px;
}
.timeline-card-foot {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.timeline-card-foot .count { font-size: 13px; color: #6a5f4c; }
.timeline-card-foot .explore {
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7a3b2e;
}
.timeline-card-foot .soon {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a89a80;
}
.timeline-event h3 {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 24px;
}
.timeline-event p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: #4a4131;
  max-width: 620px;
}
.timeline-strip {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.timeline-strip img {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .55);
  display: block;
}

/* ===================== COL·LECCIÓ (interior) ===================== */
.collection-header {
  padding: 40px 0 30px;
  margin-top: 20px;
  border-bottom: 1px solid rgba(32, 27, 19, .2);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: end;
}
.collection-header h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 72px;
  line-height: .98;
}
.collection-header p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #4a4131;
}
.section-chrono {
  padding: 56px 0;
}
.section-chrono-title {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 40px;
}
.section-titles {
  border-top: 1px solid rgba(32, 27, 19, .2);
  padding-top: 44px;
}
.section-titles-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
}
.section-titles-head h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 34px;
}
.section-titles-head .count { font-size: 14px; color: #6a5f4c; }

/* ===================== FITXA DE LLIBRE ===================== */
.book-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  margin-top: 30px;
  align-items: start;
}
.book-detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18), 0 30px 50px -26px rgba(0, 0, 0, .55);
  display: block;
}
.book-detail-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #efe6d3;
  border: 1px solid rgba(32, 27, 19, .18);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12), 0 30px 50px -26px rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}
.book-detail-cover-placeholder span {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: #6a5f4c;
}
/* Embolcall de la columna esquerra: coberta + tira de miniatures juntes,
   perquè la graella .book-detail les tracti com un sol item (columna
   coberta) i el contingut ocupi tota la columna dreta. Sense estils propis:
   com a bloc normal ja apila coberta i tira; la coberta manté el seu
   position: sticky, que segueix funcionant dins d'aquest contenidor. */
/* La columna sencera és la que s'enganxa, no la coberta tota sola: amb el
   sticky a la imatge, en fer scroll la coberta es quedava fixa i la tira de
   miniatures li passava per sota, de manera que al navegador d'ordinador no
   s'hi podia accedir (al mòbil no passava perquè la columna no és lateral). */
.book-detail-cover-col {
  position: sticky;
  top: 200px;
  align-self: start;
}

/* Visor multi-foto: la tira de miniatures viu sota la coberta principal,
   dins de .book-detail-cover-col; el visor és un overlay a pantalla
   completa que s'omple en clicar-hi. */
.foto-tira {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 14px;
  padding-bottom: 4px;
}
.foto-mini {
  flex: 0 0 auto;
  width: 56px;
  height: 84px;
  padding: 0;
  border: 1px solid rgba(32, 27, 19, .2);
  background: #efe6d3;
  cursor: pointer;
  overflow: hidden;
}
.foto-mini:hover, .foto-mini:focus-visible {
  border-color: #7a3b2e;
  outline: none;
}
.foto-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.foto-visor {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(20, 16, 10, .88);
  padding: 40px;
}
.foto-visor[hidden] { display: none; }
.foto-visor-img {
  max-width: min(88vw, 900px);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
.foto-visor-tanca, .foto-visor-prev, .foto-visor-seg {
  position: absolute;
  border: none;
  background: transparent;
  color: #f5f0e6;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
}
.foto-visor-tanca {
  top: 24px;
  right: 32px;
  font-size: 26px;
}
.foto-visor-prev, .foto-visor-seg {
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  padding: 8px 16px;
}
.foto-visor-prev { left: 8px; }
.foto-visor-seg { right: 8px; }
.foto-visor-tanca:hover, .foto-visor-prev:hover, .foto-visor-seg:hover {
  color: #d7a08c;
}

.book-collection-link {
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7a3b2e;
}
.book-title {
  margin: 14px 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 56px;
  line-height: 1.02;
}
.book-author {
  cursor: pointer;
  text-decoration: none;
  font-size: 22px;
  font-style: italic;
  color: #4a4131;
  display: inline-block;
  border-bottom: 1px solid rgba(122, 59, 46, .4);
}
.book-meta-line {
  margin-top: 16px;
  display: flex;
  gap: 22px;
  font-size: 14px;
  letter-spacing: .04em;
  color: #6a5f4c;
  flex-wrap: wrap;
}
.book-credit-line {
  margin-top: 10px;
  font-size: 15px;
  font-style: italic;
  color: #6a5f4c;
}
.book-credit-line a {
  cursor: pointer;
  text-decoration: none;
  color: #6a5f4c;
  border-bottom: 1px solid rgba(122, 59, 46, .4);
}
.book-rule { height: 1px; background: rgba(32, 27, 19, .2); margin: 32px 0; }
.book-synopsis { margin: 0; font-size: 20px; line-height: 1.65; }

.hemeroteca-box {
  margin-top: 40px;
  border: 1px solid rgba(32, 27, 19, .28);
  background: rgba(255, 252, 244, .6);
  padding: 26px 28px;
}
.hemeroteca-box .hemeroteca-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 14px;
}
/* Introducció (el preàmbul, abans del primer encapçalament): sempre
   visible, per sobre de l'acordió de seccions plegables. */
.hemeroteca-intro {
  font-size: 17px;
  line-height: 1.6;
  color: #201b13;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(32, 27, 19, .14);
}
.hemeroteca-box > .hemeroteca-intro:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.hemeroteca-intro p { margin: 0 0 14px; }
.hemeroteca-intro p:last-child { margin-bottom: 0; }
.hemeroteca-intro strong { color: #7a3b2e; font-weight: 600; }
.hemeroteca-intro em { font-style: italic; }
.hemeroteca-intro a {
  color: #7a3b2e;
  text-decoration: underline;
  text-decoration-color: rgba(122, 59, 46, .4);
}
.hemeroteca-intro ul, .hemeroteca-intro ol { margin: 0 0 14px; padding-left: 22px; }
.hemeroteca-intro blockquote {
  margin: 0 0 14px;
  padding-left: 16px;
  border-left: 2px solid rgba(122, 59, 46, .4);
  font-style: italic;
  color: #4a4131;
}

/* Referències documentades (facsímils), dins del mateix requadre "De l'hemeroteca". */
.hemeroteca-refs {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(122, 59, 46, .25);
}
.hemeroteca-box > .hemeroteca-refs:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.hemeroteca-refs-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 16px;
}
.ref-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ref-item {
  padding-left: 16px;
  border-left: 2px solid rgba(122, 59, 46, .3);
}
.ref-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: .02em;
  color: #6a5f4c;
  margin-bottom: 6px;
}
.ref-meta .ref-font { color: #7a3b2e; font-weight: 600; }
.ref-meta .ref-dot { opacity: .5; }
.ref-cita {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: #4a4131;
}
.ref-link {
  cursor: pointer;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  color: #7a3b2e;
  border-bottom: 1px solid rgba(122, 59, 46, .4);
}
.ref-link:hover { border-bottom-color: #7a3b2e; }

.fitxa-tecnica {
  margin-top: 40px;
  border-top: 1px solid rgba(32, 27, 19, .2);
  padding-top: 28px;
}
.fitxa-tecnica-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 18px;
}
.fitxa-group { margin-bottom: 20px; }
.fitxa-group-label {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
  margin-bottom: 8px;
}
.fitxa-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(32, 27, 19, .12);
  font-size: 16px;
}
.fitxa-row:last-child { border-bottom: none; }
.fitxa-row .label {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.fitxa-edition-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(32, 27, 19, .12);
  font-size: 16px;
}
.fitxa-edition-row .label { color: #6a5f4c; }

/* ===================== PERSONES (autors / traductors / il·lustradors) ===================== */
.people-heading { margin: 0 0 14px; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 64px; line-height: 1; }
.people-heading.no-subtitle { margin-bottom: 50px; }
.people-subtitle { margin: 0 0 50px; font-size: 18px; color: #4a4131; font-style: italic; }
.people-list-rule { border-top: 1px solid rgba(32, 27, 19, .2); }

/* Pàgina 404 */
.error404 { text-align: center; padding-top: 80px; }
.error404 .eyebrow { color: #7a3b2e; }
.error404-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 150px;
  line-height: .9;
  color: #7a3b2e;
  margin: 10px 0 6px;
}
.error404-lead {
  margin: 0 0 20px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 40px;
  line-height: 1.05;
}
.error404-text {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 19px;
  line-height: 1.6;
  color: #4a4131;
}
.error404-links { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.error404-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f5f0e6;
  background: #7a3b2e;
  padding: 12px 22px;
  text-decoration: none;
}
.error404-btn:hover { background: #5f2d23; color: #f5f0e6; }
.error404-alt { font-size: 15px; color: #6a5f4c; font-style: italic; }

/* Índex alfabètic d'autors (A–Z) */
.az-index {
  position: sticky;
  top: 96px;
  z-index: 10;
  background: #f5f0e6;
  padding: 14px 0;
  border-top: 1px solid rgba(32, 27, 19, .2);
  border-bottom: 1px solid rgba(32, 27, 19, .2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
}
.az-index a, .az-index span {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .05em;
  text-decoration: none;
}
.az-index a.az-on { color: #7a3b2e; font-weight: 500; }
.az-index span.az-off { color: #c3b79c; }
.az-group { padding-top: 26px; }
.az-letter {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 30px;
  color: #7a3b2e;
  border-bottom: 1px solid rgba(32, 27, 19, .16);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.az-names {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px 32px;
}
.az-name {
  display: block;
  padding: 9px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  text-decoration: none;
  border-bottom: 1px solid rgba(32, 27, 19, .08);
}
.az-name:hover { color: #7a3b2e; }
/* Referència creuada de l'índex d'autors: «Quart, Pere → Oliver, Joan».
   Més discreta que una entrada de debò, perquè no és una persona més sinó un
   camí cap a una que ja hi és. */
.az-name.az-referencia { color: #6a5f4c; font-style: italic; }
.az-name.az-referencia:hover { color: #7a3b2e; }
.az-fletxa { opacity: .55; padding: 0 .15em; }
.az-cap-a { font-style: normal; }
.person-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  padding: 26px 0;
  border-top: 1px solid rgba(32, 27, 19, .2);
  align-items: baseline;
}
.person-row h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 30px;
}
.person-titles { display: flex; flex-direction: column; gap: 8px; }
.person-titles.with-author { gap: 10px; }
.person-title-link {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-size: 18px;
}
.person-title-link .work { font-style: italic; }
.person-title-link .by { color: #6a5f4c; font-size: 15px; }
.person-title-link .year { color: #6a5f4c; font-size: 15px; }

/* Llista d'autors (només noms, sense títols en línia): una sola columna. */
.person-row.person-row-name { grid-template-columns: 1fr; padding: 18px 0; }
.person-name-link { text-decoration: none; color: inherit; border-bottom: 1px solid rgba(122, 59, 46, .4); }
.person-name-link:hover { border-bottom-color: #7a3b2e; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .main-wide, .main-medium, .main-medium-tight, .main-narrow, .main-narrow-loose {
    padding-left: 24px;
    padding-right: 24px;
  }
  .site-header .header-inner { padding: 16px 24px; }
  .site-header.compact .header-inner { padding: 8px 24px; }
  .header-nav-primary { gap: 16px; }
  /* La capçalera de persona: el retrat passa a dalt, més petit, i el resum a
     sota. Sense retrat, el marc buit no ha d'ocupar mitja pantalla. */
  .persona-cap { grid-template-columns: 132px 1fr; gap: 22px; }
  .hero, .collection-header, .book-detail, .person-row {
    grid-template-columns: 1fr;
  }
  .book-detail-cover-col, .book-detail-cover, .book-detail-cover-placeholder {
    position: static;
    max-width: 320px;
  }
  .hero h1 { font-size: 44px; }
  .editorial-hero h1 { font-size: 44px; }
  .home-hero h1 { font-size: 56px; }
  .collection-header h1 { font-size: 52px; }
  .book-title { font-size: 42px; }
  .people-heading { font-size: 48px; }
  .search-heading { font-size: 42px; }
  .timeline-row { grid-template-columns: 84px 1fr; gap: 18px; }
  .timeline-year { font-size: 24px; }
  .timeline-body { padding-bottom: 36px; padding-left: 26px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Menú mòbil: s'amaga la nav d'escriptori i surt la hamburguesa + calaix */
@media (max-width: 860px) {
  .header-nav-global,
  .header-main .header-nav,
  .site-header .header-search { display: none; }
  .burger { display: flex; }
}

@media (max-width: 600px) {
  .header-top { margin-bottom: 12px; }
  .header-eyebrow { display: none; }
  .header-nav { gap: 8px; }
  .header-nav-primary { font-size: 14px; gap: 12px; }
  .header-search input { width: 100px; }
  .site-header.compact .header-nav-primary { font-size: 13px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .hero h1 { font-size: 34px; }
  .editorial-hero h1 { font-size: 34px; }
  .colleccio-row .nom { font-size: 22px; }
  .hero { padding-bottom: 28px; }
  .collection-header h1 { font-size: 40px; }
  .book-title { font-size: 32px; }
  .book-author { font-size: 18px; }
  .people-heading { font-size: 38px; }
  .fitxa-row, .fitxa-edition-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .person-row { grid-template-columns: 1fr; gap: 12px; }
  .footer-top, .footer-links, .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ============ DE L'HEMEROTECA (acordió, obert) ============
   Cada secció del context de premsa és un <details> natiu: plegat per
   defecte, s'obre en clicar el <summary>, sense JS. Accessible de sèrie.
   La caixa (.hemeroteca-box / .hemeroteca-title) ja es defineix més amunt. */
.hemeroteca-seccio {
  border-top: 1px solid rgba(32, 27, 19, .14);
}
.hemeroteca-seccio:first-of-type { border-top: none; }
.hemeroteca-seccio summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 600;
  color: #201b13;
}
.hemeroteca-seccio summary::-webkit-details-marker { display: none; }
.hemeroteca-seccio summary::before {
  content: '▸';
  display: inline-block;
  width: 1em;
  color: #7a3b2e;
}
.hemeroteca-seccio[open] summary::before { content: '▾'; }
.hemeroteca-seccio summary:hover { color: #7a3b2e; }
.hemeroteca-cos {
  padding: 0 4px 18px 1.6em;
  font-size: 17px;
  line-height: 1.6;
  color: #201b13;
}
.hemeroteca-cos p { margin: 0 0 14px; }
.hemeroteca-cos p:last-child { margin-bottom: 0; }
.hemeroteca-cos a {
  color: #7a3b2e;
  text-decoration: underline;
  text-decoration-color: rgba(122, 59, 46, .4);
}
.hemeroteca-cos .referencia {
  margin-bottom: 16px;
  font-size: 15px;
  color: #6a5f4c;
}
.hemeroteca-cos .referencia:last-child { margin-bottom: 0; }
.hemeroteca-cos .referencia .font { color: #7a3b2e; font-weight: 600; }
.hemeroteca-cos .referencia .cita {
  margin: 6px 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: #4a4131;
}

/* Botó premium: es fa servir encara a la pàgina del MCP (/mcp), funció de
   pagament. NO es fa servir a les fitxes (l'hemeroteca ja no és premium). */
.premium-btn {
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f5f0e6;
  background: #7a3b2e;
  padding: 10px 18px;
}
.premium-btn:hover { background: #5f2d23; color: #f5f0e6; }

.persona-link {
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 59, 46, .4);
}

/* El header és sticky (~135px sencer, ~50px plegat): sense això, l'àncora
   #nom-autor queda amagada sota el header en saltar-hi. Aquest valor és el
   marge natiu del navegador (fet servir abans que el JS de base.html s'executi)
   i es calcula per al header SENCER, el cas més ample; l'script de base.html
   ja recalcula l'offset exacte segons l'alçada real del header en cada moment
   (sencer o plegat), així que aquest valor només ha de cobrir el pitjor cas. */
.person-row h2[id],
[id]:target {
  scroll-margin-top: 170px;
}

/* ===================== PÀGINES LEGALS ===================== */
.legal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 28px;
  margin: 40px 0 12px;
}
.legal p { font-size: 18px; line-height: 1.7; color: #4a4131; margin: 0 0 14px; }
.legal-lead {
  font-size: 21px !important;
  line-height: 1.6 !important;
  color: #201b13 !important;
  border-left: 2px solid #7a3b2e;
  padding-left: 20px;
  margin: 0 0 10px !important;
}
.legal-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(32, 27, 19, .14);
  font-size: 17px;
  line-height: 1.6;
  color: #4a4131;
}
.legal-row .label {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.legal-updated {
  margin-top: 44px !important;
  font-size: 14px !important;
  font-style: italic;
  color: #6a5f4c !important;
}
@media (max-width: 700px) {
  .legal-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Càrrega progressiva del catàleg */
.lot-sentinella { grid-column: 1 / -1; height: 1px; }
.lot-carregant {
  padding: 30px 0 10px;
  text-align: center;
  font-style: italic;
  font-size: 16px;
  color: #6a5f4c;
}

/* Efemèrides de la cronologia: fets documentats, amb la seva font */
.timeline-event-font {
  margin-top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .04em;
  color: #6a5f4c;
}

/* ===================== CERCA (pàgina de resultats) ===================== */
.search-heading {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
}
.search-label {
  margin: 0 0 38px;
  font-size: 18px;
  color: #4a4131;
  font-style: italic;
}
.search-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(32, 27, 19, .2);
  margin-bottom: 34px;
}
.search-tab {
  padding: 10px 4px;
  margin-right: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.search-tab:hover { color: #7a3b2e; }
.search-tab.on { color: #7a3b2e; border-bottom-color: #7a3b2e; }
.search-authors { margin-bottom: 44px; }
.search-authors-title {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6a5f4c;
  margin-bottom: 12px;
}
.search-authors-list { display: flex; flex-wrap: wrap; gap: 10px; }
.search-chip {
  text-decoration: none;
  border: 1px solid rgba(32, 27, 19, .3);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 15px;
}
.search-chip:hover { border-color: #7a3b2e; }
.search-no-results {
  padding: 50px 0 20px;
  font-style: italic;
  font-size: 20px;
  color: #6a5f4c;
}

/* ===================== MCP (funció premium) ===================== */
.mcp h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 30px;
  margin: 54px 0 14px;
}
.mcp h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 21px;
  margin: 28px 0 10px;
}
.mcp p { font-size: 17px; line-height: 1.7; color: #4a4131; }
.mcp .italic { font-style: italic; }
.mcp-lead {
  font-size: 20px !important;
  line-height: 1.65 !important;
  color: #201b13 !important;
  margin: 22px 0 0;
}

/* Les xifres del fons, com un frontispici */
.mcp-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 34px 0 6px;
  padding: 24px 0;
  border-top: 1px solid rgba(32, 27, 19, .2);
  border-bottom: 1px solid rgba(32, 27, 19, .2);
}
.mcp-nums div { display: flex; flex-direction: column; gap: 2px; }
.mcp-nums .n {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
}
.mcp-nums .l {
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #6a5f4c;
}

/* L'adreça del servidor: el que la gent ve a copiar */
.mcp-endpoint {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f0eadd;
  border: 1px solid rgba(32, 27, 19, .18);
  border-radius: 4px;
  padding: 18px 22px;
  margin: 18px 0;
}
.mcp-endpoint .label {
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.mcp-endpoint code {
  font-family: 'Space Grotesk', monospace;
  font-size: 17px;
  color: #7a3b2e;
  word-break: break-all;
}

.mcp-token-avis {
  border: 1px solid rgba(122, 59, 46, .35);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 30px 0;
  background: rgba(122, 59, 46, .04);
}
.mcp-token-avis .t {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 8px;
}
.mcp-token-avis p { margin: 0 0 16px; }

/* El token personal de qui està mirant la pàgina: ben visible i fàcil de copiar. */
.mcp-token-meu {
  border: 1px solid rgba(122, 59, 46, .35);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 30px 0;
  background: #f0eadd;
}
.mcp-token-meu .t {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 10px;
}
.mcp-token-meu p { margin: 10px 0 0; font-size: 14px; color: #6a5f4c; }
.mcp-token-capsa {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #201b13;
  border-radius: 4px;
  padding: 12px 16px;
}
.mcp-token-capsa code {
  flex: 1;
  font-family: 'Space Grotesk', monospace;
  font-size: 14px;
  color: #f0eadd;
  word-break: break-all;
}
.mcp-token-capsa .copia-token {
  flex-shrink: 0;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid rgba(240, 234, 221, .4);
  border-radius: 3px;
  background: transparent;
  color: #f0eadd;
}
.mcp-token-capsa .copia-token:hover { background: rgba(240, 234, 221, .1); }

.mcp pre {
  background: #201b13;
  color: #f0eadd;
  border-radius: 4px;
  padding: 18px 22px;
  overflow-x: auto;          /* la línia llarga no ha d'eixamplar la pàgina */
  margin: 12px 0;
}
.mcp pre code {
  font-family: 'Space Grotesk', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre;
}
.mcp p code {
  font-family: 'Space Grotesk', monospace;
  font-size: 14px;
  background: #f0eadd;
  padding: 1px 5px;
  border-radius: 3px;
}
.mcp-nota { font-size: 15px !important; color: #6a5f4c !important; }

.mcp-exemples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 36px;
  margin-top: 22px;
}
.mcp-exemples .grup { display: flex; flex-direction: column; gap: 8px; }
.mcp-exemples .titol {
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #7a3b2e;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(32, 27, 19, .18);
  margin-bottom: 4px;
}
.mcp-exemples p {
  margin: 0;
  font-size: 16px !important;
  font-style: italic;
  line-height: 1.55 !important;
}

.mcp-eines { margin-top: 20px; }
.mcp-eines div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid rgba(32, 27, 19, .16);
}
.mcp-eines code {
  font-family: 'Space Grotesk', monospace;
  font-size: 14px;
  color: #7a3b2e;
}
.mcp-eines span { font-size: 16px; color: #4a4131; line-height: 1.6; }

@media (max-width: 760px) {
  .mcp-exemples { grid-template-columns: 1fr; }
  .mcp-eines div { grid-template-columns: 1fr; gap: 4px; }
  .mcp-nums { gap: 26px; }
}

/* ===================== PERSONA GLOBAL (/autor/{id}-{slug}, creua editorials) ===================== */
/* Capçalera de la fitxa de persona: retrat (esquerra) + resum (dreta). */
.persona-cap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 38px;
  align-items: start;
  margin-bottom: 40px;
}
.persona-cap-text { min-width: 0; }
.persona-retrat {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.persona-retrat > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(32, 27, 19, .22);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 18px 28px -22px rgba(0, 0, 0, .45);
}
.persona-retrat figcaption {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a7a5c;
  text-align: center;
}
.persona-nom {
  margin: 0 0 14px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 58px;
  line-height: 1.04;
}
.persona-altres {
  margin: 0 0 6px;
  font-size: 16px;
  font-style: italic;
  color: #6a5f4c;
}
.persona-altres a { color: inherit; }
.persona-dates { font-family: 'Space Grotesk', sans-serif; font-size: .82rem;
                 letter-spacing: .08em; color: #6a5f4c; margin-top: .3em; }
.persona-autoritat { font-size: .84rem; color: #6a5f4c; margin-top: 2.4em;
                     padding-top: 1em; border-top: 1px solid rgba(32, 27, 19, .12); }
.persona-sumari {
  margin: 0;
  font-size: 16px;
  color: #7a3b2e;
}
/* Sense retrat, la fitxa va a una sola columna: el sumari recupera el marge
   inferior que a la capçalera de dues columnes fa la graella. */
.persona-sumari-sol { margin-bottom: 40px; }
/* El context investigat de la persona: mateix to que el de l'editorial, però
   entre el sumari i la llista de llibres, i separat per un filet. */
.persona-context {
  max-width: 760px;
  margin: -16px 0 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(32, 27, 19, .2);
  font-size: 17px;
  line-height: 1.65;
  color: #4a4131;
}
.persona-context p { margin: 0 0 14px; }
.persona-context p:last-child { margin-bottom: 0; }
.persona-context a { color: #7a3b2e; }
.persona-editorial { padding: 30px 0; border-top: 1px solid rgba(32, 27, 19, .2); }
.persona-editorial:first-of-type { border-top: none; }
.persona-editorial-nom {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-bottom: 16px;
}
.persona-editorial-nom a { color: inherit; text-decoration: none; }
.persona-editorial-nom a:hover { text-decoration: underline; }
.persona-llibre {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid rgba(32, 27, 19, .12);
  text-decoration: none;
  color: #201b13;
  font-size: 17px;
}
.persona-llibre:first-child { border-top: none; }
.persona-llibre .titol { font-style: italic; }
.persona-llibre:hover .titol { text-decoration: underline; }
.persona-llibre .rol {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6a5f4c;
}
.persona-llibre .any { font-size: 15px; color: #6a5f4c; }

@media (max-width: 600px) {
  .persona-nom { font-size: 38px; }
  .persona-llibre { grid-template-columns: 1fr; gap: 4px; }
}

/* ===================== REVISIÓ D'IDENTITATS (intern) ===================== */
.revisio-filtres { display: flex; gap: 10px; margin: 1.5em 0 2em; }
.revisio-fila { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 18px;
                padding: 14px 0; border-top: 1px solid rgba(32, 27, 19, .12);
                align-items: start; }
.revisio-fila.fet { opacity: .45; }
.revisio-nom a { text-decoration: none; border-bottom: 1px solid rgba(32, 27, 19, .25); }
.revisio-dades { display: block; font-size: .8rem; color: #6a5f4c; }
.revisio-estat { font-family: 'Space Grotesk', sans-serif; font-size: .68rem;
                 letter-spacing: .1em; text-transform: uppercase; margin-right: .6em; }
.estat-dubte { color: #7a3b2e; }
.estat-sense_autoritat { color: #6a5f4c; }
.revisio-candidats { list-style: none; padding: 0; margin: .6em 0 0; font-size: .88rem; }
.revisio-candidats .punts { color: #6a5f4c; font-size: .8rem; }
.revisio-accions { display: flex; flex-direction: column; gap: 6px; }
.revisio-resultat { font-size: .78rem; color: #7a3b2e; }
@media (max-width: 900px) { .revisio-fila { grid-template-columns: 1fr; } }

/* ===================== ENTRADA ===================== */
.entrada { max-width: 420px; }
.entrada-titol { font-family: 'Cormorant Garamond', serif; font-size: 2.1rem;
                 font-weight: 600; margin: .2em 0 1.2em; }
.entrada-form { display: flex; flex-direction: column; gap: 1em; }
.entrada-form label { display: flex; flex-direction: column; gap: .35em;
                      font-family: 'Space Grotesk', sans-serif; font-size: .74rem;
                      letter-spacing: .1em; text-transform: uppercase; color: #6a5f4c; }
.entrada-form input { font-family: 'EB Garamond', serif; font-size: 1.05rem;
                      padding: .5em .6em; border: 1px solid rgba(32, 27, 19, .3);
                      background: #fbf8f1; color: #201b13; }
.entrada-form button { margin-top: .6em; padding: .6em; cursor: pointer;
                       font-family: 'Space Grotesk', sans-serif; font-size: .8rem;
                       letter-spacing: .1em; text-transform: uppercase;
                       background: #7a3b2e; color: #f5f0e6; border: 0; }
.entrada-error { color: #7a3b2e; font-style: italic; }
.entrada-demana { margin-top: 1.8em; font-size: .95rem; color: #6a5f4c; }

/* Demanar un compte: la mateixa caixa que l'entrada, però amb text abans. */
.demana { max-width: 520px; }
.demana-intro p { margin: 0 0 .9em; line-height: 1.55; }
.demana-intro { margin-bottom: 1.8em; }
.entrada-form textarea { font-family: 'EB Garamond', serif; font-size: 1.05rem;
                         padding: .5em .6em; border: 1px solid rgba(32, 27, 19, .3);
                         background: #fbf8f1; color: #201b13; resize: vertical; }
.demana-privacitat { margin-top: 1.6em; font-size: .86rem; color: #6a5f4c; }
.demana-fet { font-size: 1.1rem; line-height: 1.55; }
.demana-tornar { margin-top: 1.4em; }
/* L'esquer per als robots: fora de pantalla, i que cap lector no l'anunciï. */
.esquer { position: absolute; left: -9999px; width: 1px; height: 1px;
          overflow: hidden; }
.peticio-motiu { max-width: 32em; font-size: .86rem; line-height: 1.45; }

/* ===================== ADMIN ===================== */
.admin-taula { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 2.5em; }
.admin-taula th { text-align: left; font-family: 'Space Grotesk', sans-serif;
                  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
                  color: #6a5f4c; padding: .5em .6em; border-bottom: 1px solid rgba(32,27,19,.2); }
.admin-taula td { padding: .5em .6em; border-bottom: 1px solid rgba(32,27,19,.08); }
.admin-taula tr.inactiu { opacity: .45; }
.admin-taula .token { font-family: monospace; font-size: .78rem; color: #6a5f4c; }
.en-linia { display: flex; gap: .3em; }
.admin-subtitol { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; }
.admin-nou { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: .8em; align-items: end; }
.admin-nou label { display: flex; flex-direction: column; gap: .3em;
                   font-family: 'Space Grotesk', sans-serif; font-size: .7rem;
                   letter-spacing: .08em; text-transform: uppercase; color: #6a5f4c; }
@media (max-width: 900px) { .admin-nou { grid-template-columns: 1fr; } }


/* --- D'on surt el context: l'atribució dels assaigs, tesis i hemeroteques.
   Discret però llegible: no és lletra petita d'exempció, és el crèdit de qui
   ha fet la recerca de la qual vivim. --- */
.fonts-context {
  margin: 44px 0 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(32, 27, 19, .16);
}
.fonts-llista {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
.fonts-llista li {
  position: relative;
  margin-bottom: 9px;
  font-size: 15px;
  line-height: 1.55;
}
.fonts-llista li::before {
  content: "—";
  position: absolute;
  left: -20px;
  color: #7a3b2e;
}
.fonts-arxius {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(32, 27, 19, .72);
}
.hemeroteca-box .fonts-context {
  margin: 26px 0 0;
  padding-top: 16px;
}
.hemeroteca-box .fonts-llista li,
.hemeroteca-box .fonts-arxius { font-size: 14px; }

/* --- Impremtes plegables: el nom sempre visible, els títols a petició. --- */
.impremta-plegable > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}
.impremta-plegable > summary::-webkit-details-marker { display: none; }
.impremta-plegable > summary::after {
  content: "+";
  font-family: 'Space Grotesk', sans-serif;
  color: #7a3b2e;
  font-size: 18px;
  line-height: 1;
}
.impremta-plegable[open] > summary::after { content: "–"; }
.impremta-plegable > summary h2 { margin: 0; flex: 1 1 auto; }
.impremta-compte {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  color: #6a5f4c;
  margin-left: auto;
  white-space: nowrap;
}
.impremta-plegable[open] > .person-titles { padding-top: 10px; }

/* --- Índex d'èpoques d'una col·lecció --- */
.section-epoques { margin-top: 34px; }
.epoques-llista { margin-top: 6px; }
.epoca-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-top: 1px solid rgba(32, 27, 19, .16);
  text-decoration: none;
  color: inherit;
}
.epoca-row:last-child { border-bottom: 1px solid rgba(32, 27, 19, .16); }
.epoca-row .nom {
  font-family: 'Cormorant Garamond', serif;
  font-size: 25px;
  color: #201b13;
}
.epoca-row:hover .nom { color: #7a3b2e; }
.epoca-row .compte {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  color: #6a5f4c;
  white-space: nowrap;
}
.collection-epoca {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7a3b2e;
  margin-top: 6px;
}

/* --- Autors: tots els noms / només els validats contra CANTIC --- */
.autors-filtre {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.autors-filtre a { color: #6a5f4c; text-decoration: none; }
.autors-filtre a:hover { color: #7a3b2e; }
.autors-filtre a.actiu {
  color: #201b13;
  border-bottom: 1px solid #7a3b2e;
  padding-bottom: 2px;
}
.autors-filtre .sep { color: rgba(32, 27, 19, .35); }
