/* BLOG — "The Index" (unique skeleton: a literary table of contents) */

/* push content below the absolute masthead */
main { padding-top: clamp(5.5rem, 14vw, 7rem); }

/* ---------- Masthead strip: The Journal ---------- */
.idxhead { position: relative; padding-bottom: clamp(1.4rem, 4vw, 2rem); }
.idxhead__gutter { display: none; }
.idxhead__inner { position: relative; z-index: 1; display: grid; gap: 1.6rem; }
.idxhead__lede .plaque { color: var(--mauve); }
.idxhead__lede .plaque .dot { background: var(--mauve); }
.idxhead__title { font-size: clamp(3rem, 15vw, 6rem); font-weight: 400; line-height: .98; margin-top: .9rem; }
.idxhead__sub { margin-top: 1rem; max-width: 38ch; }

.idxhead__issue {
  display: grid; gap: .25rem; align-content: start;
  padding-top: 1.1rem; border-top: 1px solid var(--hair);
}
.idxhead__issuelabel { font-family: var(--ui); font-size: var(--t-micro); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pencil); }
.idxhead__issuemo { font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 440; color: var(--plum); line-height: 1; }
.idxhead__issuesub { font-family: var(--display); font-style: italic; font-size: .95rem; color: var(--pencil); line-height: 1.35; }

@media (min-width: 760px) {
  .idxhead__inner { grid-template-columns: 1fr auto; align-items: end; gap: 2.5rem; }
  .idxhead__issue { text-align: right; justify-items: end; border-top: 0; padding-top: 0; }
}

/* ---------- Sticky filter bar: color dots ---------- */
/* unified find toolbar: search + category dots together */
.filterbar {
  position: sticky; top: 0; z-index: 30;
  margin: clamp(1.4rem,4vw,2.2rem) calc(-1 * clamp(1.15rem,4vw,2.5rem)) 0;
  padding: .8rem clamp(1.15rem,4vw,2.5rem);
  background: rgba(245,239,234,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: .7rem;
}
.filterbar__inner {
  display: flex; align-items: center; gap: .9rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
@media (min-width: 800px) {
  .filterbar { flex-direction: row; align-items: center; gap: 1.4rem; }
  .idxsearch { flex: none; width: 19rem; }
  .filterbar__inner { flex: 1; min-width: 0; }
}
.filterbar__inner::-webkit-scrollbar { display: none; }
.filterbar__label { flex: none; color: var(--pencil); }
.dots { display: flex; align-items: center; gap: .2rem; flex: none; }
.dotbtn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .7rem; min-height: 44px; border-radius: var(--r-pill);
  flex: none; transition: background .25s var(--ease);
}
.dotbtn__pip { width: 11px; height: 11px; border-radius: 50%; background: var(--mauve); flex: none; box-shadow: 0 0 0 0 transparent; transition: box-shadow .25s var(--ease); }
.dotbtn__pip--all { background: conic-gradient(var(--mauve), var(--clay), var(--euc), #6E7B8A, var(--gold), var(--mauve)); }
.dotbtn__txt { font-family: var(--ui); font-size: var(--t-micro); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pencil); white-space: nowrap; transition: color .25s var(--ease); }
.dotbtn:hover .dotbtn__txt { color: var(--plum); }
.dotbtn.is-on { background: var(--linen); }
.dotbtn.is-on .dotbtn__txt { color: var(--plum); }
.dotbtn.is-on .dotbtn__pip { box-shadow: 0 0 0 3px rgba(123,94,122,.16); }

.viewtoggle { flex: none; display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; padding-left: .8rem; }
.viewtoggle__opt { font-family: var(--ui); font-size: var(--t-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pencil); white-space: nowrap; }
.viewtoggle__opt.is-on { color: var(--plum); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.viewtoggle__sep { color: var(--pencil-soft); }

/* ---------- Search the index ---------- */
.idxsearch {
  display: flex; align-items: center; gap: .65rem;
  margin: 0;
  padding: .7rem 1.1rem;
  background: var(--linen); border: 1px solid var(--hair); border-radius: var(--r-pill);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.idxsearch:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,107,.16); }
.idxsearch__icon { width: 18px; height: 18px; color: var(--pencil); flex: none; }
.idxsearch input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--plum); }
.idxsearch input::placeholder { color: var(--pencil); }
.idxsearch input:focus { outline: none; }
.idx-empty { padding: 2.2rem 0; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--pencil); }

/* ---------- The ledger: expandable numbered rows ---------- */
.ledger { margin-top: clamp(1.4rem, 4vw, 2.2rem); display: grid; }
.entry { border-top: 1px solid var(--hair); transition: opacity .4s var(--ease); }
.entry:last-of-type { border-bottom: 1px solid var(--hair); }

.entry__sum {
  list-style: none; cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "body chev";
  align-items: start; gap: .5rem .9rem;
  padding: 1.15rem 0; min-height: 56px;
}
.entry__sum::-webkit-details-marker { display: none; }
.entry__num { display: none; }
.entry__body { grid-area: body; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.entry__title { font-family: var(--display); font-size: clamp(1.25rem, 5.2vw, 1.7rem); line-height: 1.14; color: var(--plum); font-weight: 440; }
.entry__sum:hover .entry__title { color: var(--mauve); }
.entry__sum:hover .entry__num { color: var(--mauve); }
.entry__meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.entry__cdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.entry__date {
  grid-area: chev; justify-self: end; align-self: start;
  font-family: var(--ui); font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--pencil);
  white-space: nowrap; padding-top: .35rem;
}
.entry__chev {
  grid-area: chev; justify-self: end; align-self: center;
  display: none;
  font-family: var(--display); font-size: 1.5rem; color: var(--gold); line-height: 1;
}

/* desktop: date in its own column, chevron at far right */
@media (min-width: 680px) {
  .entry__sum {
    grid-template-columns: 1fr auto 1.6rem;
    grid-template-areas: "body date chev";
    align-items: center; gap: .9rem 1.2rem;
  }
  .entry__date { grid-area: date; justify-self: end; padding-top: 0; align-self: center; }
  .entry__chev { grid-area: chev; display: block; align-self: center; transition: transform .3s var(--ease); }
  .entry[open] .entry__chev { transform: rotate(45deg); }
}

/* ---------- The expanded panel ---------- */
.entry__panel {
  display: grid; gap: clamp(1rem, 4vw, 1.6rem);
  padding: 0 0 1.6rem 0;
  animation: entryreveal .45s var(--ease);
}
@keyframes entryreveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.entry__art { width: 100%; }
.entry__art .mat__img { aspect-ratio: 3/2; }
.entry__note { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.entry__curate { font-family: var(--display); font-size: clamp(1.05rem, 4vw, 1.25rem); font-style: italic; line-height: 1.45; color: var(--plum); max-width: 46ch; font-weight: 400; }
.entry__tag { display: none; }
.entry__read { align-self: flex-start; }

@media (min-width: 680px) {
  .entry__panel { grid-template-columns: minmax(0, 18rem) 1fr; align-items: center; padding-left: 0; padding-bottom: 2rem; }
  .entry__art { max-width: 22rem; }
}

/* ---------- Pagination ---------- */
.pager {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .55rem;
  margin-top: clamp(2rem, 6vw, 3.2rem); padding-block: clamp(1.5rem, 5vw, 2.4rem);
  border-top: 1px solid var(--hair);
}
.pager__lead { flex: none; margin-right: .5rem; color: var(--pencil); }
.pager__pg {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 .5rem;
  font-family: var(--display); font-size: 1.1rem; color: var(--plum);
  text-decoration: none; border-radius: 50%;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.pager__pg:hover { background: var(--linen); color: var(--mauve); }
.pager__pg.is-on { background: var(--mauve); color: #fff; }
.pager__gap { color: var(--pencil); padding: 0 .2rem; align-self: center; }
.pager__next {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: 0 .4rem;
  font-family: var(--ui); font-weight: 700; font-size: .9rem; letter-spacing: .04em;
  color: var(--plum); text-decoration: none;
}
.pager__next:hover { color: var(--mauve); }
.pager__next .arrow { font-size: 1.2rem; }

/* ---------- Salon (gallery) view ---------- */
.salon { display: none; }
.salon.is-on { display: block; columns: 2; column-gap: clamp(.8rem,3vw,1.4rem); margin-top: clamp(1.4rem,4vw,2.2rem); }
.ledger.is-off, .pager.is-off { display: none; }
.salon__item { display: inline-block; width: 100%; break-inside: avoid; margin-bottom: clamp(1rem,3vw,1.6rem); text-decoration: none; color: var(--plum); }
.salon__item .mat { margin: 0; }
.salon__cap { display: block; padding: .7rem .2rem 0; }
.salon__title { font-family: var(--display); font-size: 1.05rem; line-height: 1.2; display: block; }
.salon__item:hover .salon__title { color: var(--mauve); }
.salon__cap .plaque { margin-top: .35rem; }
.viewtoggle__opt { cursor: pointer; background: none; border: 0; }
@media (min-width: 700px){ .salon.is-on { columns: 3; } }
@media (min-width: 1040px){ .salon.is-on { columns: 4; } }

/* ---------- Real search form + archive title + results ---------- */
.idxsearch { gap: .5rem; }
.idxsearch input[type="search"], .idxsearch input#search { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--plum); }
.idxsearch input:focus { outline: none; }
.idxsearch__go { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--mauve); color: #fff; cursor: pointer; font-size: 1.05rem; line-height: 1; display: grid; place-items: center; border: 0; transition: background .2s var(--ease); }
.idxsearch__go:hover { background: var(--mauve-deep); }
.dotbtn { text-decoration: none; cursor: pointer; }

.archive-title { text-align: center; margin-bottom: .5rem; }
.archive-desc { text-align: center; margin: 0 auto 1rem; max-width: 42rem; }

/* search results */
.wp-block-query-title { text-align: center; font-family: var(--display); font-weight: 440; }
.wp-block-post-template { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.wp-block-post-template > li { border-top: 1px solid var(--hair); padding: 1.15rem 0; }
.wp-block-post-template > li:last-child { border-bottom: 1px solid var(--hair); }
.wp-block-post-template .wp-block-post-title, .wp-block-post-template .idx__title { font-family: var(--display); font-size: var(--t-h3); line-height: 1.16; margin: 0; }
.wp-block-post-template .wp-block-post-title a { text-decoration: none; color: var(--plum); }
.wp-block-post-template .wp-block-post-title a:hover { color: var(--mauve); }
.wp-block-post-template .wp-block-post-excerpt { color: var(--pencil); margin-top: .4rem; font-size: .98rem; }
.wp-block-query-pagination { margin-top: 2rem; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { text-decoration: none; color: var(--mauve); font-weight: 700; }
