/* Nav bar type: one scale for the header instead of 11, 12 and 13px in three weights.
   Links and the theme switch read as quiet UI text (14px / 13px, medium weight); the button
   carries the emphasis (14px, semibold). In the phone menu the links grow to a tappable 17px. */
.nav a{font-size:14px;font-weight:500;letter-spacing:0;color:var(--muted)}
.nav a:hover{color:var(--text)}
html[data-theme=dark] .nav a:hover{color:#fff}
.nav a.active{font-weight:600;color:var(--text)}
.nav-cta{font-size:14px}
@media(max-width:1150px){.nav{gap:22px}}
@media(max-width:850px){.nav a{font-size:17px;font-weight:600;color:var(--text)}}

/* Hover: every link gets the same underline as the current page's, drawn in from the left on
   hover or keyboard focus at a lighter gold; the current page keeps its full underline */
.nav a{position:relative}
.nav a::after{content:'';position:absolute;left:0;right:0;bottom:-10px;height:2px;border-radius:1px;background:var(--gold);
  transform:scaleX(0);transform-origin:left;opacity:.55;transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .2s}
.nav a:is(:hover,:focus-visible)::after{transform:scaleX(1)}
.nav a.active::after{transform:scaleX(1);opacity:1}
.nav a:focus-visible{outline:none;color:var(--text)}
@media(max-width:850px){.nav a::after{bottom:-5px}}
@media(prefers-reduced-motion:reduce){.nav a::after{transition:opacity .2s}}

/* Theme switch: a round icon button the height of the header button. The sun turns away as the
   moon turns in; #theme-label stays for screen readers (script.js writes the current aura into it) */
.theme-toggle{position:relative;display:flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;padding:0;
  border:1px solid var(--line);border-radius:50%;background:var(--surface);color:#1b4585;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:background .3s,border-color .3s,color .3s,transform .22s cubic-bezier(.2,.8,.2,1)}
html[data-theme=dark] .theme-toggle{color:#faa61a}
.theme-toggle:hover{border-color:var(--blue2)}
.theme-toggle:active{transform:scale(.92);transition-duration:.3s,.3s,.3s,.06s}
.theme-toggle:focus-visible{outline:2px solid var(--blue2);outline-offset:3px}
.theme-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.theme-ico{position:absolute;left:50%;top:50%;width:19px;height:19px;margin:-9.5px 0 0 -9.5px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .5s cubic-bezier(.2,.8,.2,1),opacity .25s}
.theme-moon{opacity:0;transform:rotate(-90deg) scale(.4)}
html[data-theme=dark] .theme-sun{opacity:0;transform:rotate(90deg) scale(.4)}
html[data-theme=dark] .theme-moon{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.theme-toggle,.theme-ico{transition:opacity .2s,color .2s,background .2s,border-color .2s}.theme-toggle:active{transform:none}}
