/* Final editorial polish: quieter navigation, cleaner chapters, and a more deliberate poem index. */

/* The wordmark is now the home link. */
nav::before{display:none!important}
nav .jodo-brand{
  margin-right:auto;
  padding:.12rem 0!important;
  color:var(--ink)!important;
  font-family:var(--serif)!important;
  font-size:.7rem!important;
  font-weight:400!important;
  letter-spacing:.18em!important;
  text-transform:none!important;
}
nav .jodo-brand::after{display:none!important}
nav .jodo-brand:hover{color:var(--warm)!important}

/* Chapter context belongs to a collection reading session, never a standalone poem. */
body[data-jodo-view="single"] .literary-current-chapter,
body.jodo-standalone-poem .literary-current-chapter{
  display:none!important;
}

/* Poem titles stay centered in every reading context. */
.poem.literary-poem .head{
  text-align:center!important;
}
.poem.literary-poem h1,
.poem.literary-poem h2{
  width:100%!important;
  text-align:center!important;
}

/* Keep chapter names intact in the table of contents. */
.contents .literary-chapter-toc-copy{
  min-width:0!important;
}
.contents .literary-chapter-toc-copy strong{
  display:block!important;
  width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
}

/* Poem archive — more like an editorial index, less like a bulletin board. */
body[data-jodo-view="feed"] main{
  max-width:70rem!important;
  padding-left:clamp(1.25rem,4vw,3rem)!important;
  padding-right:clamp(1.25rem,4vw,3rem)!important;
}
body[data-jodo-view="feed"] .jodo-poem-index-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end!important;
  gap:2rem;
  max-width:none!important;
  margin:5.4rem 0 2.6rem!important;
  padding:0 0 1.25rem!important;
  border-bottom:1px solid var(--ink)!important;
}
body[data-jodo-view="feed"] .jodo-poem-index-head h1,
body[data-jodo-view="feed"] .jodo-poem-index-head h2{
  margin:0!important;
  font-size:clamp(2.3rem,4.6vw,4.8rem)!important;
  font-weight:400!important;
  line-height:1!important;
  letter-spacing:-.025em!important;
}
.jodo-poem-index-meta{
  display:flex;
  gap:1.4rem;
  align-items:center;
  padding-bottom:.15rem;
  color:var(--faint);
  font-family:var(--sans);
  font-size:.5rem;
  letter-spacing:.15em;
  white-space:nowrap;
}
.jodo-poem-index-meta span:first-child{color:var(--warm)}

.board.literary-poem-index.jodo-poem-ledger{
  max-width:none!important;
  margin:0!important;
  border:0!important;
}
.board.literary-poem-index.jodo-poem-ledger .bh{display:none!important}
.board.literary-poem-index.jodo-poem-ledger .bitem{
  position:relative;
  padding:0!important;
  border-bottom:1px solid rgba(23,22,18,.105)!important;
}
.board.literary-poem-index.jodo-poem-ledger .bitem:first-child{
  border-top:0!important;
}
.board.literary-poem-index.jodo-poem-ledger .brow{
  display:grid!important;
  grid-template-columns:4.3rem minmax(0,1fr) 8rem!important;
  gap:0!important;
  align-items:start!important;
  padding:2.15rem 0 2.35rem!important;
}
.board.literary-poem-index.jodo-poem-ledger .bnum{
  display:block!important;
  grid-column:1;
  padding-top:.3rem;
  color:var(--faint)!important;
  font-family:var(--sans)!important;
  font-size:.52rem!important;
  letter-spacing:.13em!important;
}
.board.literary-poem-index.jodo-poem-ledger .btitle{
  grid-column:2;
  min-width:0;
  padding-right:clamp(1rem,4vw,4rem);
}
.board.literary-poem-index.jodo-poem-ledger .btl{
  position:relative;
  display:inline-block;
  font-size:clamp(1.18rem,1.7vw,1.48rem)!important;
  font-weight:400!important;
  line-height:1.55!important;
  letter-spacing:.065em!important;
  transition:color .18s ease,transform .18s ease;
}
.board.literary-poem-index.jodo-poem-ledger .bitem:hover .btl{
  color:var(--warm)!important;
  transform:translateX(.18rem);
}
.board.literary-poem-index.jodo-poem-ledger .literary-excerpt{
  max-width:41rem!important;
  margin:.82rem 0 0!important;
  color:var(--soft)!important;
  font-size:.82rem!important;
  line-height:1.95!important;
  letter-spacing:.015em;
}
.board.literary-poem-index.jodo-poem-ledger .literary-book-badge{
  width:auto!important;
  margin:.92rem 0 0!important;
  color:var(--faint)!important;
  font-size:.5rem!important;
  line-height:1.6;
  letter-spacing:.075em!important;
}
.board.literary-poem-index.jodo-poem-ledger .bdate{
  grid-column:3;
  justify-self:end;
  padding-top:.32rem!important;
  color:var(--faint)!important;
  font-size:.51rem!important;
  letter-spacing:.11em!important;
  white-space:nowrap;
}
.board.literary-poem-index.jodo-poem-ledger .literary-owner-actions{
  margin-top:.72rem!important;
}

/* Avoid the hard “button/card” feel in owner controls inside the archive. */
.board.literary-poem-index.jodo-poem-ledger .bmore.literary-manage-button{
  width:auto!important;
  height:auto!important;
  padding:.1rem .2rem!important;
  color:var(--faint)!important;
}

/* Chapter rows inherit the same calm editorial rhythm. */
.contents .literary-chapter-toc{
  margin-top:2.8rem!important;
  padding:1.15rem 0 .9rem!important;
}
.contents .literary-chapter-toc-button{
  grid-template-columns:3.2rem minmax(0,1fr)!important;
}
.contents .literary-chapter-toc-copy small{
  max-width:30rem;
  margin-top:.18rem;
}

/* Mobile keeps the hierarchy but drops the wide ledger. */
@media(max-width:760px){
  nav{
    gap:1.15rem!important;
    padding-left:1rem!important;
    padding-right:1rem!important;
  }
  nav .jodo-brand{
    font-size:.64rem!important;
    letter-spacing:.14em!important;
  }

  body[data-jodo-view="feed"] .jodo-poem-index-head{
    margin:3.5rem 0 1.8rem!important;
    grid-template-columns:1fr;
    gap:1.2rem;
  }
  body[data-jodo-view="feed"] .jodo-poem-index-head h1,
  body[data-jodo-view="feed"] .jodo-poem-index-head h2{
    font-size:2.7rem!important;
  }
  .jodo-poem-index-meta{
    justify-content:space-between;
    width:100%;
  }

  .board.literary-poem-index.jodo-poem-ledger .brow{
    grid-template-columns:2.35rem minmax(0,1fr)!important;
    padding:1.7rem 0 1.85rem!important;
  }
  .board.literary-poem-index.jodo-poem-ledger .bnum{
    grid-column:1;
    grid-row:1;
  }
  .board.literary-poem-index.jodo-poem-ledger .btitle{
    grid-column:2;
    grid-row:1;
    padding-right:0;
  }
  .board.literary-poem-index.jodo-poem-ledger .bdate{
    grid-column:2;
    grid-row:2;
    justify-self:start;
    margin-top:.85rem;
    padding-top:0!important;
  }
  .board.literary-poem-index.jodo-poem-ledger .btl{
    font-size:1.12rem!important;
  }
  .board.literary-poem-index.jodo-poem-ledger .literary-excerpt{
    font-size:.8rem!important;
    line-height:1.9!important;
  }

  .contents .literary-chapter-toc-copy strong{
    font-size:.8rem!important;
    letter-spacing:.08em!important;
  }

  /* Mobile reader: closer to a printed-book scale. */
  body[data-jodo-view="single"] .poem.literary-poem,
  body[data-jodo-view="reader"] .poem.literary-poem,
  body[data-jodo-view="colreader"] .poem.literary-poem{
    width:min(31rem,calc(100vw - 3.25rem))!important;
    max-width:31rem!important;
    margin:3.2rem auto 6rem!important;
  }
  .poem.literary-poem .head{
    margin-bottom:2.55rem!important;
    text-align:center!important;
  }
  .poem.literary-poem h1,
  .poem.literary-poem h2{
    font-size:1.02rem!important;
    line-height:1.5!important;
    letter-spacing:.085em!important;
    text-align:center!important;
  }
  .poem.literary-poem .bd{
    font-size:.88rem!important;
    line-height:2.12!important;
    letter-spacing:0!important;
  }
  .poem.literary-poem .pw{
    font-size:.5rem!important;
  }

  /* Override the older 3-column grid completely; four controls need intrinsic widths. */
  .rnav.literary-reader-nav{
    display:flex!important;
    left:.6rem!important;
    right:.6rem!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    gap:.35rem!important;
    padding:.75rem .7rem calc(.78rem + env(safe-area-inset-bottom))!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex-wrap:nowrap!important;
  }
  .rnav.literary-reader-nav > *{
    flex:0 0 auto!important;
    min-width:max-content!important;
    max-width:none!important;
    white-space:nowrap!important;
  }
  .rnav.literary-reader-nav button{
    width:auto!important;
    max-width:none!important;
    padding:.28rem .12rem!important;
    font-size:.62rem!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .rnav.literary-reader-nav span{
    font-size:.61rem!important;
    white-space:nowrap!important;
  }
}

@media(max-width:520px){
  nav{gap:.9rem!important}
  nav a,nav button{font-size:.58rem!important}
  nav .jodo-brand{font-size:.59rem!important}

  .poem.literary-poem .bd{
    font-size:.86rem!important;
    line-height:2.08!important;
  }
  .poem.literary-poem h1,
  .poem.literary-poem h2{
    font-size:1rem!important;
    text-align:center!important;
  }
  .rnav.literary-reader-nav{
    gap:.22rem!important;
    padding-left:.5rem!important;
    padding-right:.5rem!important;
  }
  .rnav.literary-reader-nav button{
    font-size:.59rem!important;
  }
  .rnav.literary-reader-nav span{
    font-size:.59rem!important;
  }
}