/* Biographies: the two pages, built on glaze-brick.css (load that first).
   Page 1 reuses .gb-tile. Page 2 adds a compact header, a search well and small "person" tiles.
   A person tile takes the glaze colour of its book: add .cobalt for al-Ṣaymarī, nothing for al-Zaranjarī. */

/* page 2 header: a short brick drum with the search inside */
.gb-drum.compact .in { grid-template-columns: minmax(0, 1fr); gap: .9rem; padding: 1.5rem 2rem 1.7rem; }
.gb-drum.compact h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.gb-crumbs { font-size: .94rem; margin: 0 0 .2rem; color: #5a4a30; }
.gb-crumbs a { color: #0a6070; }
.gb-search { display: flex; align-items: center; gap: .7rem; padding: .55rem .9rem; border-radius: 999px; background: #fffaf0; box-shadow: inset 0 2px 5px rgba(80, 55, 15, .28), inset 0 0 0 1px rgba(150, 115, 60, .35), 0 1px 0 rgba(255, 255, 255, .7); }
.gb-search::before { content: ""; flex: none; width: 1.1rem; height: 1.1rem; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2020%2020%22%3E%3Ccircle%20cx%3D%228.5%22%20cy%3D%228.5%22%20r%3D%226%22%20fill%3D%22none%22%20stroke%3D%22%238a7550%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M13%2013l5%205%22%20stroke%3D%22%238a7550%22%20stroke-width%3D%222.4%22%20stroke-linecap%3D%22round%22/%3E%3C/svg%3E") center / contain no-repeat; }
.gb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.05rem; color: #221a10; }
.gb-search input::placeholder { color: #8a7a60; }
.gb-search:focus-within { box-shadow: inset 0 2px 5px rgba(80, 55, 15, .28), 0 0 0 3px var(--turq); }
.gb-count { margin: 1.4rem 0 0; color: var(--ink2); font-style: italic; }

/* person tiles */
.gb-people { display: grid; gap: 1.2rem; margin: 1rem 0 0; padding: 0; list-style: none; perspective: 1100px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.gb-people > li { display: flex; min-width: 0; }
.gb-people > li[hidden] { display: none; }
.gb-person { flex: 1; }
.gb-person .gb-cap { height: 1.6rem; }
.gb-person .gb-cap::after { height: 10px; }
.gb-person .gb-body { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: .25rem .85rem; align-items: start; padding: 1rem 1.1rem 1.1rem; }
.gb-seal { grid-row: span 3; width: 3.1rem; height: 3.1rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--arabic, "Noto Nastaliq Urdu", "Amiri", serif); font-size: 1.35rem; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #7fe8e0, #12a1aa 55%, #08606b); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 0 0 2px #fff8e6, 0 0 0 3px #e6b74a, 0 4px 8px -3px rgba(60, 40, 10, .6); }
.gb-seal span { padding-top: .5rem; }
.gb-person.cobalt .gb-seal { background: radial-gradient(circle at 35% 30%, #9db3ff, #2c50bf 55%, #122a70); }
.gb-person h3 { font-size: 1.12rem; line-height: 1.25; text-wrap: balance; }
.gb-person .ar { font-size: 1.1rem; margin: 0; }
.gb-person .n { margin: .1rem 0 0; color: #4f4330; font-size: .96rem; }
.gb-person .n b { color: #1d1a14; font-variant-numeric: tabular-nums; }
.gb-person .gb-go { grid-column: 2; margin-top: .4rem; }
.gb-empty { padding: 1.5rem 0; color: var(--ink2); font-style: italic; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gb-people>li:has(>a[hidden]){display:none}.gb-person .gb-name-ar{font-family:var(--arabic);line-height:2.8;padding-bottom:.5rem;overflow-wrap:anywhere}.gb-search label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.gb-drum.compact .in>.note{color:#4f4330}.gb-search input{width:100%;padding:.3rem!important}.gb-drum.compact .in>p{color:#4f4330}.gb-drum.compact .in>.ar{color:#0d4f8a}.gb-seal{align-self:start}.gb-person .gb-body .gb-go{grid-column:2}.gb-people a[hidden]{display:none}

/* Slim directory headers: one title, compact links and a restrained search well. */
.gb-drum.compact{border-radius:16px}.gb-drum.compact::before,.gb-drum.compact::after{height:8px}
.gb-drum.compact .in{gap:.4rem;padding:1rem 1.4rem 1.1rem}
.gb-drum.compact .in>p{margin:0;line-height:1.5;font-size:.95rem}
.gb-drum.compact h1{margin:.2rem 0 .35rem;font-size:clamp(1.55rem,3vw,2.05rem);line-height:1.2}
.gb-drum.compact .reading-info{width:1.65rem;height:1.65rem;font-size:1rem;padding:0;vertical-align:middle}
.gb-search{margin-top:.35rem;padding:.35rem .8rem;min-height:2.7rem;box-sizing:border-box}
.gb-search input{font-size:1rem;line-height:1.4;margin:0}
@media(max-width:700px){.gb-drum.compact .in{padding:.85rem 1rem .95rem;gap:.35rem}}
/* Glazed headers retain a light brick surface in night mode. */
:root[data-theme="dark"] .gb-drum.compact a{color:#08707f}
