/* Ink stays on the boundary even when the tab interior reverses. */
@layer blue18{
 body.blocks .tab-stack>:is(a,button) .tab-joint{fill:var(--print-blue)!important}
 body.blocks .tab-stack>[aria-current=page]:has(+[aria-expanded=true]){border-bottom-color:var(--print-blue)!important}
}
body.info-shell.print-page main{flex:0 0 auto}
#about-sheet.print-sheet .about-band>:is(h2,p,ol){max-width:66ch;margin-inline:auto}
#about-sheet.print-sheet .about-band h2{font-size:clamp(1.2rem,2vw,1.65rem);line-height:1.2;margin-block:0 .65em}
#about-sheet.print-sheet .about-band h1{margin-block:0 .35em}
#about-sheet.print-sheet .about-band p+p{margin-top:.8em}
#about-sheet.print-sheet .about-band a{text-decoration:underline;text-underline-offset:.14em;overflow-wrap:anywhere}
#about-sheet.print-sheet .about-band .terms-brand{font-size:.9rem;margin-bottom:.45em}
#about-sheet.print-sheet .about-band .terms-date{margin-bottom:1em}
#about-sheet.print-sheet .legal-text{max-width:68ch;margin-inline:auto;text-align:left;overflow-wrap:break-word}
#about-sheet.print-sheet .legal-text h2{max-width:none;margin-inline:0}
#about-sheet.print-sheet .legal-text p{max-width:none}
#about-sheet.print-sheet li{font:inherit;line-height:1.5;margin:.5em 0;padding-left:2.4em;text-indent:-2.4em}
#about-sheet.print-sheet ol{list-style:none;padding:0}
@media(max-width:500px){
 #about-sheet.print-sheet .about-band h1{font-size:clamp(2rem,10vw,3.125rem)!important}
}

#detail .pass-number .listing-issue {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #174874;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: .16em;
}
#detail .listing-issue:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Keep footer actions inside the printed frame as links wrap. */
@media screen {
  body.blocks #find .finder-actions,
  body.blocks #site-footer .foot-row {
    box-sizing: border-box;
    min-width: 0;
    padding-inline: clamp(12px, 1.5vw, 24px);
    padding-bottom: 16px;
  }

  body.blocks #find .finder-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
  }

  body.blocks #find .finder-actions .foot-links,
  body.blocks #site-footer .foot-links {
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding-inline: 0;
    gap: 4px 16px;
  }

  body.blocks #find .finder-actions .foot-links {
    flex: 1 1 26rem;
    justify-content: flex-end;
  }

  body.blocks .foot-links a {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.blocks #find .finder-actions .foot-links a {
    font-size: 1rem;
  }

  body.blocks #site-footer .landscape .wordmark-credit {
    padding-inline: max(12px, var(--word-right, 1.17%));
    padding-bottom: 12px;
  }
}

@media screen and (max-width: 800px) {
  body.blocks #find .finder-actions .foot-links {
    flex: none;
    justify-content: center;
  }
}


/* On phones the index starts below the clock, then sticks within the existing
   rail, whose lower edge stops at the footer illustration. */
@media screen and (max-width: 800px), screen and (pointer: coarse) and (max-height: 500px) {
  body.blocks {
    --rail-safe-top: env(safe-area-inset-top, 0px);
    --rail-safe-bottom: env(safe-area-inset-bottom, 0px);
    --clock-top: max(12px, calc(var(--rail-safe-top) + 6px));
    --clock-size: clamp(18px, 4svh, 29px);
    --rail-floor: max(24px, calc(var(--rail-safe-bottom) + 16px));
  }

  body.blocks header .nc-masthead .tab-stack {
    --rail-start: max(var(--clock-clearance), var(--rail-logo-seam, 0px));
    --rail-room: calc(100svh - var(--rail-floor) - 12px);
    --rail-tile: clamp(88px, calc((var(--rail-room) - var(--rail-start)) / 4), 112px);
    margin-top: clamp(var(--clock-clearance), var(--rail-start), calc(var(--rail-room) - 4 * var(--rail-tile)));
    top: max(8px, calc(var(--rail-safe-top) + 4px));
    max-height: none;
    overflow: visible;
  }

  body.blocks header .nc-masthead .tab-stack > :is(a, .state-tab) {
    min-width: 0;
    height: var(--rail-tile);
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A short landscape viewport has room for horizontal words, two lines of
   time, and four full touch targets. Keep the same tab elements and curves. */
@media screen and (max-width: 800px) and (max-height: 480px),
       screen and (pointer: coarse) and (max-height: 480px) {
  body.blocks {
    --clock-size: 14px;
    --clock-clearance: calc(var(--clock-top) + 44px);
  }
  body.blocks header .nc-masthead .tab-stack {
    --rail-tile: clamp(44px, calc((100svh - max(94px, 19vw) - var(--rail-floor)) / 4), 70px);
  }
  body.blocks .state-clock {
    writing-mode: horizontal-tb;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
  body.blocks header .nc-masthead .tab-stack > a {
    padding: 2px;
    font: 700 14px/1.1 "Liberation Sans", Arial, sans-serif;
    white-space: normal;
  }
  body.blocks .tab-stack a .tab-lettering { display: none; }
  body.blocks .tab-stack a[aria-label]::before {
    content: attr(aria-label);
    max-width: 100%;
    font: 700 14px/1.1 "Liberation Sans", Arial, sans-serif;
    white-space: normal;
    text-align: center;
    letter-spacing: normal;
  }
  @layer blue18 {
    body.blocks .tab-stack a[aria-label]::before { color: inherit !important; }
  }
}

