/* Layout shared by the gallery, news, archives, information and request forms. */
body:is(.public-page,.form-page) {
  --picture-height:65.5dvh;
  --frame:min(88vw,calc(var(--picture-height) * 1.5));
  --logo-width:calc(var(--frame) * .3245);
  /* Preserve the logo's SVG proportions when calculating the shared offset. */
  --masthead-rise:calc(var(--logo-width) * 13.667 / 257.25 * 1.5);
  --menu-scale:.68;
  width:100%;
  margin:0;
  display:grid;
  grid-template-rows:17.5% minmax(0,1fr) 10%;
  height:100dvh;
  overflow:hidden;
}
body:is(.public-page,.form-page) > .archTitle {
  box-sizing:border-box;
  width:var(--frame);
  height:100%;
  margin:0 auto;
  padding:0 0 calc(3.8dvh + var(--masthead-rise));
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
}
body:is(.public-page,.form-page) > .archTitle :is(a,img) {display:block}
body:is(.public-page,.form-page) > .archTitle img {width:var(--logo-width);height:auto}
body:is(.public-page,.form-page) > footer {
  position:relative;
  width:var(--frame);
  margin:0 auto;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
body:is(.public-page,.form-page) > footer nav {
  position:absolute;
  top:50%;
  right:0;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0;
  width:max-content;
  height:auto;
  min-height:0;
  transform:translateY(-50%) scale(var(--menu-scale));
  transform-origin:right center;
  text-transform:lowercase;
}
body:is(.public-page,.form-page) > footer nav a {
  font:400 var(--menu-font,1rem)/normal Bahnschrift,Arial,sans-serif;
  padding:0 1.875em;
  border:0;
}
body:is(.public-page,.form-page) > footer nav a+a {border-left:2px solid #999}
body:is(.public-page,.form-page) > footer nav a:last-child {padding-right:0}
body:is(.public-page,.form-page) > footer .language {
  position:fixed;
  top:calc(13.7dvh - .72em - var(--masthead-rise));
  right:calc((100vw - var(--frame)) / 2);
  bottom:auto;
  width:auto;
  margin:0;
  padding:0;
  transform:translateY(-50%);
  font:400 .675rem/normal Bahnschrift,Arial,sans-serif;
  color:var(--bt-text,#999);
  border:0;
  background:transparent;
  cursor:pointer;
  z-index:10;
}
body.form-page > main {width:var(--frame);min-height:0;margin:0 auto}
.form-page footer small,.public-page footer .quote-menu {margin-right:auto}
@media(max-width:650px) {
  body:is(.public-page,.form-page){--menu-font:.86rem}
  body:is(.public-page,.form-page) > footer nav a {padding:0 10px}
  .form-page footer small {max-width:32%;font-size:.68rem}
}
@media(max-width:650px) and (orientation:portrait) {
  body:is(.public-page,.form-page){--logo-width:min(45.1vw,191.4px)}
}

.form-page footer nav a {color:var(--bt-text,#999)}

.public-page .archive-grid,.edit-grid .archive-grid{
 grid-template-columns:repeat(var(--cols,5),minmax(0,1fr));
 justify-items:center;align-items:center;
}
.public-page .archive-grid .archive-tile,.edit-grid .archive-tile{width:67%;min-width:0}
.edit-grid .archive-tile img{width:100%;height:100%;object-fit:contain}
.public-page .news-page{border-top:0}
.public-page address img{width:min(18.7vh,157.25px)}
.public-page footer .zoom{
 margin-right:auto;flex-direction:row;align-items:center;gap:clamp(0px,1vw,16px);
}
.public-page footer .zoom button{
 padding:0;text-align:left;min-width:clamp(30px,3vw,44px);min-height:44px;
}
@media(max-width:600px){
 .public-page .archive-grid .archive-tile{width:72%}
}
@media(max-width:650px), (pointer:coarse) and (max-height:550px){
 .public-page .archive-page .scroll-track{display:none}
 .public-page .archive-scroll{scrollbar-width:none}
 .public-page .archive-scroll::-webkit-scrollbar{display:none}
}
@media(prefers-reduced-motion:no-preference){
 @keyframes page-enter{from{opacity:0}to{opacity:1}}
 body{animation:page-enter 150ms ease-out}
}
/* Archives use native scrolling and pinch gestures; rapid taps activate the controls. */
html:has(body > .archive-page),
.public-page:has(> .archive-page),
.public-page .archive-scroll,
.public-page .archive-tile,
.public-page footer .zoom button {
  touch-action: manipulation;
}

@media (max-width:650px), (pointer:coarse) and (max-height:550px) {
  body:is(.public-page,.form-page) > footer .language {
    appearance:none;
    -webkit-appearance:none;
    -webkit-text-fill-color:currentColor;
    font-size:.57375rem;
    top:calc(13.7dvh - .486rem - var(--masthead-rise));
    min-height:36px;
    padding-inline:8px 1.2em;
    background-image:linear-gradient(45deg,transparent 43%,currentColor 45% 57%,transparent 59%),
                     linear-gradient(-45deg,transparent 43%,currentColor 45% 57%,transparent 59%);
    background-size:.34em .34em;
    background-position:right .32em center,right center;
    background-repeat:no-repeat;
  }
}
