/* Header for the letters archive and individual letters only.
   The existing main header uses 56px side padding, then 7% from 1600px;
   at a 1685px document width its wordmark starts at 117.95px.
   Sticky positioning keeps this header in flow without changing reading margins. */
.site-header.casto-public-header{
  --public-header-height:96px;--public-header-padding:56px;
  position:sticky;top:0;left:auto;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  width:100%;max-width:none;height:var(--public-header-height);
  margin:0;padding:0 var(--public-header-padding);box-sizing:border-box;
  background:#111f35;color:#fff;border:0;border-bottom:1px solid #ffffff24;
  font:400 12px/1.65 Arial,Helvetica,sans-serif;letter-spacing:normal;
}
.site-header.casto-public-header *{box-sizing:border-box}
.site-header.casto-public-header a{color:#fff;text-decoration:none;letter-spacing:normal}
.site-header.casto-public-header a:focus-visible,
.site-header.casto-public-header button:focus-visible,
.site-header.casto-public-header summary:focus-visible{outline:3px solid #ffba48;outline-offset:5px}

.site-header.casto-public-header .personal-wordmark{
  position:relative;display:inline-flex;align-items:baseline;gap:7px;
  flex:0 0 auto;width:auto;min-height:58px;margin:0;padding:8px 0 16px;
  color:#fff;white-space:nowrap;letter-spacing:-.055em;
}
.site-header.casto-public-header .personal-wordmark .brand-first,
.site-header.casto-public-header .personal-wordmark .brand-last{
  display:inline;margin:0;font:400 29px/1.15 Georgia,'Times New Roman',serif;
  letter-spacing:-.055em;
}
.site-header.casto-public-header .personal-wordmark .brand-first{font-style:italic}
.site-header.casto-public-header .personal-wordmark .brand-rule{
  position:absolute;left:1px;bottom:8px;width:100%;height:1px;margin:0;
  background:linear-gradient(90deg,#8ebaff 0 22%,#ffffff24 22% 100%);
}
.site-header.casto-public-header .personal-wordmark:hover .brand-rule{background:linear-gradient(90deg,#c8ddff 0 35%,#ffffff40 35% 100%)}

.site-header.casto-public-header #navigation{
  position:static;display:flex;flex-direction:row;align-items:center;
  gap:clamp(10px,1.6vw,23px);margin:0;padding:0;
  max-height:none;overflow:visible;border:0;background:transparent;color:#fff;
  font:400 12px/1.65 Arial,Helvetica,sans-serif;letter-spacing:normal;
}
.site-header.casto-public-header #navigation>a:not(.nav-contact){display:flex;align-items:center;min-height:44px;padding:12px 0;border:0}
.site-header.casto-public-header #navigation>a:hover,
.site-header.casto-public-header #navigation>a[aria-current="page"]{color:#bcd7ff}
.site-header.casto-public-header #navigation>a[aria-current="page"]::after{content:"";flex:none;width:5px;height:5px;margin-left:7px;border-radius:50%;background:#79abff}
.site-header.casto-public-header #navigation>.nav-contact{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 22px;margin:0;border:1px solid #a2b8d6;border-radius:0;color:#fff;
}
.site-header.casto-public-header #navigation>.nav-contact:hover{background:#ffffff12;color:#fff;border-color:#fff}
.site-header.casto-public-header #navigation>.nav-private{flex:none}
.site-header.casto-public-header #navigation>.nav-private svg{display:block;width:22px;height:22px;flex:none}
.site-header.casto-public-header .menu-toggle{
  display:none;align-items:center;gap:12px;min-height:44px;margin:0;padding:8px 13px;
  border:1px solid #ffffff50;border-radius:0;background:#10243b50;color:#fff;
  font:400 14px/1.65 Arial,Helvetica,sans-serif;letter-spacing:normal;cursor:pointer;
}

/* Geometry from signature.css; font sizes and gaps from cartas-ui.css. */
@media(min-width:1600px){.site-header.casto-public-header{--public-header-padding:7%}}
@media(max-width:1200px){
  .site-header.casto-public-header{--public-header-padding:32px}
  .site-header.casto-public-header .personal-wordmark .brand-first,
  .site-header.casto-public-header .personal-wordmark .brand-last{font-size:27px}
}
@media(max-width:1100px){
  .site-header.casto-public-header .menu-toggle{display:flex}
  .site-header.casto-public-header #navigation{
    display:none;position:absolute;top:calc(var(--public-header-height) - 1px);left:0;right:0;
    flex-direction:column;align-items:stretch;
    padding:20px var(--public-header-padding) 25px;
    max-height:calc(100dvh - var(--public-header-height));overflow-y:auto;
    background:#111f35;border-bottom:1px solid #ffffff25;
  }
  .site-header.casto-public-header #navigation.is-open{display:flex}
  .site-header.casto-public-header #navigation>a:not(.nav-contact){display:block;min-height:48px;padding:13px 10px}
  .site-header.casto-public-header #navigation>.nav-contact{margin-top:10px;padding:13px;text-align:center}
}
@media(max-width:1050px){.site-header.casto-public-header #navigation{gap:12px;font-size:11px}}
@media(max-width:960px){
  .site-header.casto-public-header{--public-header-height:82px;--public-header-padding:25px}
  .site-header.casto-public-header .personal-wordmark{min-height:48px;padding-top:6px;padding-bottom:13px;gap:6px}
  .site-header.casto-public-header .personal-wordmark .brand-first,
  .site-header.casto-public-header .personal-wordmark .brand-last{font-size:26px}
}
@media(max-width:900px) and (min-width:721px){
  .site-header.casto-public-header{gap:20px}
  .site-header.casto-public-header #navigation{gap:10px;font-size:10px}
}
@media(max-width:720px){
  .site-header.casto-public-header{--public-header-height:80px;--public-header-padding:20px}
  .site-header.casto-public-header #navigation{font-size:14px}
  .site-header.casto-public-header .personal-wordmark .brand-first,
  .site-header.casto-public-header .personal-wordmark .brand-last{font-size:25px}
}
@media(max-width:360px){
  .site-header.casto-public-header{--public-header-padding:16px;gap:12px}
  .site-header.casto-public-header .personal-wordmark{gap:5px}
  .site-header.casto-public-header .personal-wordmark .brand-first,
  .site-header.casto-public-header .personal-wordmark .brand-last{font-size:22px}
  .site-header.casto-public-header .menu-toggle{padding-inline:10px}
}
