/* Reading navigation only: keep all destinations and existing alignment. */
@media screen {
  html:root body main.site-flow > nav.reading-end-nav {
    align-items:stretch;
    column-gap:clamp(.3rem, 1.5vw, .78rem);
    padding-block:.55rem .45rem;
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next):not([hidden]) {
    box-sizing:border-box;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:clamp(.22rem,1vw,.42rem);
    min-block-size:44px;
    min-inline-size:0;
    max-inline-size:100%;
    padding:.38rem clamp(.34rem,1.4vw,.72rem);
    border:1px solid var(--fz-edge-green,#658473);
    border-radius:.48rem;
    background:var(--fz-bg-surface,#fffdf5);
    color:var(--fz-fg-green,#173b2d);
    font-weight:650;
    line-height:1.2;
    text-decoration:none;
    overflow-wrap:anywhere;
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next) .reading-destination {
    min-inline-size:0;
    text-decoration:none;
    text-wrap:pretty;
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next) .match-en {
    color:inherit;
    font-size:.75rem;
    font-weight:550;
    margin:0;
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next) .reading-arrow {
    flex:none;
  }
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-next:not([hidden]) {
    background:var(--fz-bg-strong,#20543d);
    color:var(--fz-fg-on-fill,#fffdf5);
    font-weight:730;
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top):not([hidden]):hover {
    background:var(--fz-bg-hover,#e7eee4);
  }
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-next:not([hidden]):hover {
    background:var(--fz-bg-hover,#e7eee4);
    color:var(--fz-fg-green,#173b2d);
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next):focus-visible {
    outline:3px solid var(--fz-edge-focus,#9a4c12);
    outline-offset:2px;
  }
}
/* Consistent three-position reading row, including pages with an empty slot. */
@media screen {
  html:root body main.site-flow > nav.reading-end-nav,
  html:root body main.site-flow > nav.reading-end-nav:not(:has(.reading-end-top)) {
    grid-template-columns:repeat(3,minmax(0,1fr));
    column-gap:clamp(.32rem,1.5vw,.85rem);
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next):not([hidden]) {
    display:grid;
    grid-template-columns:.60em minmax(0,1fr) .60em;
    grid-template-rows:minmax(0,1fr);
    align-items:center;
    justify-self:center;
    column-gap:.10rem;
    inline-size:min(100%,10.5rem);
    min-block-size:46px;
    padding:.35rem .19rem;
    text-align:center;
  }
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-prev {grid-column:1;}
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-top {grid-column:2;}
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-next {grid-column:3;}
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next) > .reading-destination {
    grid-area:1/2;
    align-self:start;
    text-wrap:pretty;
  }
  html:root body main.site-flow > nav.reading-end-nav > a:is(.reading-end-prev,.reading-end-top,.reading-end-next) > .reading-arrow {
    grid-area:1/1;
    justify-self:center;
    line-height:1;
    font-size:.88em;
  }
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-next > .reading-arrow {grid-column:3;}
}
/* The bilingual Back to top label is the complete cue. */
@media screen {
  html:root body main.site-flow > nav.reading-end-nav > a.reading-end-top > .reading-arrow[aria-hidden="true"] {
    display:none;
  }
}
