/* Shared page measurements and components for the homepage and both article pages. */
:root{
  --site-width:1200px;
  --site-gutter:clamp(18px,4vw,56px);
  --site-side:max(var(--site-gutter),calc(50vw - 600px));
}

.site-header.site-header{
  width:100%;
  max-width:1440px;
  margin-inline:auto;
  box-sizing:border-box;
  height:64px;
  padding-inline:var(--site-side);
  gap:16px;
}
.site-header.site-header .brand img{width:90px;height:auto}
.site-header.site-header .brand-note{font-size:10px}
.site-header.site-header .main-nav{gap:clamp(10px,1.3vw,20px)}
.site-header.site-header .main-nav a{font-size:13px;font-weight:400}
.site-header.site-header .header-actions{width:160px;gap:12px;justify-content:flex-end}
.site-header.site-header .header-pill{display:inline-flex;align-items:center;justify-content:center;width:100px;height:29px;min-width:100px;min-height:29px;padding:0 12px;border:0;line-height:1;font-size:10px;font-weight:700;text-align:center;appearance:none}

@media(min-width:901px){
  .site-header.site-header{padding-inline:clamp(20px,2.5vw,36px)}
  .site-header.site-header .main-nav{justify-content:space-between;gap:clamp(8px,1vw,16px)}
}
@media(min-width:1200px){
  .site-header.site-header .main-nav a{font-size:14px}
}
@media(min-width:901px) and (max-width:1199px){
  .site-header.site-header .main-nav a{font-size:12px}
}

body .section-wrap,
body .articles-shell,
body .detail-shell{
  width:min(var(--site-width),calc(100% - var(--site-gutter) - var(--site-gutter)));
  max-width:var(--site-width);
  margin-left:auto;
  margin-right:auto;
}
body .section-wrap{padding-left:0;padding-right:0}

/* This single image contains the landscape and both lines of lettering. */
body .farewell{
  display:block;
  height:208px;
  background:#dce9f8 url('farewell-hd.jpg') center 40% / cover no-repeat;
}

body .site-footer{
  min-height:94px;
  padding:0;
  background:#0e1d2a;
  color:#8c9bae;
}
body .footer-inner{
  width:min(var(--site-width),calc(100% - var(--site-gutter) - var(--site-gutter)));
  max-width:var(--site-width);
  margin:0 auto;
}
body .footer-top{
  display:flex;
  align-items:center;
  gap:16px;
  height:54px;
  min-height:54px;
  padding:0;
  border-bottom:1px solid #344250;
}
body .footer-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:40px;
  gap:16px;
  padding:0;
  font-size:10px;
  letter-spacing:.4px;
}
body .footer-brand{display:flex;align-items:center;flex:none;color:#fff}
body .footer-brand img{display:block;width:90px;height:auto;filter:brightness(0) invert(1)}
body .footer-motto{font-size:12px;white-space:nowrap}
body .footer-top nav{display:flex;flex:1;justify-content:center;gap:15px}
body .footer-top nav a{font-size:12px;font-weight:400;white-space:nowrap}
body .footer-bottom{font-size:12px}
body .site-footer .back-top{
  display:grid;
  place-items:center;
  flex:none;
  width:28px;
  height:28px;
  border:1px solid #8190a4;
  border-radius:50%;
  font-size:17px;
}

@media(min-width:901px){
  body .site-footer{padding-inline:0}
  body .footer-top{max-width:1440px;margin-inline:auto}
  body .footer-bottom{max-width:none}
}

@media(max-width:900px){
  .site-header.site-header{height:54px;padding-inline:var(--site-gutter)}
  .site-header.site-header .brand img{width:78px}
  .site-header.site-header .header-actions{width:auto;flex:none;margin-left:auto;justify-content:flex-end}
  .site-header.site-header .main-nav{
    display:grid;
    position:absolute;
    top:54px;
    left:0;
    right:0;
    z-index:11;
    padding:16px var(--site-gutter);
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    background:#fff;
    box-shadow:0 10px 18px #1c376625;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(-9px);
    transition:opacity .22s ease,transform .22s ease,visibility .22s;
  }
  .site-header.site-header .main-nav.open{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
  .site-header.site-header .menu-button{display:block}
  body .site-footer{padding:12px 0}
  body .footer-top{height:auto;flex-wrap:wrap;padding-bottom:12px}
  body .footer-top nav{order:3;flex-basis:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
  body .footer-bottom{align-items:flex-start;font-size:11px;line-height:1.6}
}

/* Shared interaction feedback across the three pages. */
.site-header .main-nav a,.site-footer a,.more-link,.breadcrumb a{
  transition:color .2s ease,opacity .2s ease;
}
.site-header .main-nav a{position:relative}
.site-header .main-nav a::after{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;
  background:#0644c8;transform:scaleX(0);transform-origin:left;
  transition:transform .22s ease;
}
.site-header .main-nav a:hover::after,.site-header .main-nav a:focus-visible::after,
.site-header .main-nav a.active::after{transform:scaleX(1)}
.site-footer a:hover,.more-link:hover,.breadcrumb a:hover{color:#5d88f5}
.site-header .header-pill,.blue-button,.search-button,.back-top{
  transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease,color .2s ease;
}
.site-header .header-pill:hover,.blue-button:hover{transform:translateY(-2px);box-shadow:0 6px 15px #0644c82b}
.search-button:hover{transform:scale(1.12)}
.menu-button span{transition:transform .2s ease,opacity .2s ease}
.menu-button[aria-expanded="true"] span:first-child{transform:translateY(5px) rotate(45deg)}
.menu-button[aria-expanded="true"] span:nth-child(2){opacity:0}
.menu-button[aria-expanded="true"] span:last-child{transform:translateY(-5px) rotate(-45deg)}
.back-top:hover{transform:translateY(-3px);background:#fff1}
button:active,.header-pill:active,.blue-button:active{transform:scale(.97)}
button:focus-visible,a:focus-visible,img[data-zoom]:focus-visible{outline:2px solid #4779ed;outline-offset:3px}
img[data-zoom]{cursor:zoom-in}
.image-viewer{
  position:fixed;max-width:min(1100px,94vw);max-height:90vh;
  padding:0;border:0;border-radius:9px;background:transparent;overflow:visible;
  box-shadow:0 24px 80px #091e3b77;color:#173252;
}
.image-viewer[open]{animation:viewer-enter .25s ease-out both}
.image-viewer::backdrop{background:#081b33c9;backdrop-filter:blur(4px)}
.image-viewer img{display:block;width:100%;height:auto;max-height:90vh;object-fit:contain;border-radius:9px}
.image-viewer-close{position:absolute;top:19px;right:19px;display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:#ffffffeb;color:#10294f;font-size:0;line-height:0;box-shadow:0 2px 12px #0003;transition:transform .2s,background .2s}
.image-viewer-close::before,.image-viewer-close::after{content:"";position:absolute;top:50%;left:50%;width:16px;height:2px;border-radius:1px;background:currentColor;transform:translate(-50%,-50%) rotate(45deg)}
.image-viewer-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
.image-viewer-close:hover{transform:rotate(90deg);background:#fff}
.content-dialog[open],.auth-dialog[open]{animation:viewer-enter .25s ease-out both}
@keyframes viewer-enter{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

@media(max-width:700px){
  .site-header.site-header .brand-note{display:none}
  body .farewell{height:170px;background-position:center 40%}
}

/* Phone layout shared by the homepage, list and detail pages. */
@media(max-width:600px){
  :root{--site-gutter:16px}
  .site-header.site-header{gap:8px}
  .site-header.site-header .header-actions{gap:8px}
  .site-header.site-header .search-button{width:34px;height:34px;flex-basis:34px}
  .site-header.site-header .header-pill{height:34px;min-height:34px}
  .site-header.site-header .menu-button{display:grid;place-content:center;width:34px;height:34px;flex:none}
  .site-header.site-header .menu-button span{width:20px}
  .site-header.site-header .main-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;padding-block:10px}
  .site-header.site-header .main-nav a{display:flex;align-items:center;min-height:42px;padding:6px 8px;font-size:15px}
  .site-header.site-header .main-nav a::after{bottom:3px;left:8px;right:8px}
  body .site-footer{padding:16px 0}
  body .footer-top{gap:8px 12px}
  body .footer-top nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
  body .footer-top nav a{display:flex;align-items:center;min-height:38px;font-size:13px}
  body .footer-bottom{display:block;padding-top:10px}
  body .footer-bottom>*{display:block;overflow-wrap:anywhere}
  body .footer-bottom>*+*{margin-top:6px}
  body .farewell{height:170px;background-size:auto 235px;background-position:center top}
  .image-viewer{max-width:calc(100vw - 20px)}
  .image-viewer img{max-width:calc(100vw - 20px)}
}
