/* Shared brand, navigation and footer. Native details also work without JS. */
html { scroll-padding-top: 128px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f8f7f3f5;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; color: #092344; font-size: 1.5rem; font-weight: 750; letter-spacing: -.04em; line-height: 1.1; white-space: nowrap; }
.brand picture, .brand img { display: block; width: 48px; height: 48px; }
.brand small { display: block; color: var(--muted); font-size: .65rem; font-weight: 500; letter-spacing: .025em; margin-top: 6px; }
.desktop-nav { display: flex; align-items: center; gap: 18px; font-size: .84rem; font-weight: 600; }
.desktop-nav a { display: flex; align-items: center; min-height: 44px; padding-block: 12px; text-underline-offset: 6px; }
.desktop-nav a:hover, .desktop-nav a[aria-current] { color: #075a93; text-decoration: underline; text-decoration-thickness: 2px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions > .country-control { font-size: .8rem; gap: 6px; }
.header-actions > .country-control select { min-height: 44px; max-width: 160px; }
.preferences-menu { font-size: .8rem; }
.preferences-menu > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; padding: 10px 6px; list-style: none; }
.preferences-menu > summary::after { content: '+'; font-size: 1.1rem; line-height: 1; }
.preferences-menu[open] > summary::after { content: '−'; }
.preferences-menu > summary::-webkit-details-marker, .mobile-nav > summary::-webkit-details-marker { display: none; }
.preferences-popover { position: absolute; right: 0; top: 100%; z-index: 25; width: min(360px, 100%); max-height: calc(100dvh - var(--header-bottom, 180px) - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 10px 25px #24312c12; }
.preferences-popover p { font-size: .82rem; margin-bottom: 14px; }
.preferences-popover > a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; margin-top: 8px; }
.preferences-popover select { font-size: 1rem; }
.preferences-popover button { width: 100%; }
.mobile-nav { display: none; }
.site-footer { background: #eeeee7; padding-top: 36px; }
.footer-top { display: grid; grid-template-columns: 1.2fr .8fr 1fr 1fr; gap: 32px; align-items: start; padding-bottom: 36px; }
.footer-brand-link { display: block; width: 224px; max-width: 100%; }
.footer-brand-link img { display: block; width: 100%; height: auto; }
.footer-brand p { font-size: .85rem; line-height: 1.7; margin: 4px 0 0; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; padding-top: 20px; }
.footer-links h2, .footer-disclosure h2 { font-size: .8rem; margin: 0 0 12px; letter-spacing: .05em; text-transform: uppercase; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 10px; font-size: .86rem; line-height: 1.5; }
.footer-links a:hover { color: #075a93; text-decoration: underline; text-underline-offset: 4px; }
.footer-disclosure { padding-top: 20px; }
.footer-disclosure p { font-size: .85rem; line-height: 1.7; margin: 0; }
.footer-bottom { border-top: 1px solid #d8ddcf; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: .78rem; color: var(--muted); padding-block: 22px; }

@media (max-width: 1200px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; font-weight: 600; list-style: none; cursor: pointer; }
  .mobile-nav[open] > summary { background: #e9f3fb; color: #075a93; border-color: #a9cfe9; }
  .menu-label-open, .mobile-nav[open] .menu-label-closed { display: none; }
  .mobile-nav[open] .menu-label-open { display: inline; }
  .mobile-nav nav { position: absolute; top: 100%; right: 0; width: min(360px, 100%); max-height: calc(100dvh - var(--header-bottom, 180px) - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 10px 25px #24312c12; }
  .mobile-nav nav a { display: flex; align-items: center; min-height: 48px; padding: 12px 16px; font-size: .95rem; border-radius: 6px; }
  .mobile-nav nav a:hover, .mobile-nav nav a[aria-current] { background: #e9f3fb; color: #075a93; }
  .mobile-nav nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; font-weight: 650; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 148px; }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 10px; }
  .header-inner > .brand { grid-area: 1 / 1; font-size: 1.4rem; gap: 10px; }
  .brand picture, .brand img { width: 40px; height: 40px; }
  .brand small { font-size: .6rem; }
  .header-actions { display: contents; }
  .header-actions > .country-control { grid-area: 2 / 1; font-size: .75rem; }
  .header-actions > .country-control select { max-width: 100%; width: 150px; min-width: 0; font-size: 1rem; }
  .header-actions .country-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .header-actions > .preferences-menu { grid-area: 2 / 2; justify-self: end; font-size: .75rem; }
  .header-actions > .mobile-nav { grid-area: 1 / 2; justify-self: end; }
  .preferences-popover, .mobile-nav nav { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-brand, .footer-disclosure { grid-column: 1 / -1; }
  .footer-brand-link { margin-inline: auto; }
  .footer-brand p { text-align: center; }
  .footer-links, .footer-disclosure { padding-top: 0; }
}
@media (max-height: 480px) {
  /* Keep room for content and keyboard focus on short/landscape viewports. */
  .site-header { position: relative; }
}

/* Optional installation lives in the footer; no overlay or automatic prompt. */
.install-help { margin-top: 20px; border-top: 1px solid #cbd4c5; padding-top: 10px; }
.install-help > summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-size: .9rem; font-weight: 600; }
.install-help-content { display: grid; gap: 14px; padding-block: 10px; }
.install-help-content .button { min-height: 44px; white-space: normal; text-align: center; }
.install-help-content [hidden] { display: none !important; }
.install-help .install-status:empty { display: none; }
.pwa-tools { display: grid; gap: 14px; border-top: 1px solid #cbd4c5; padding-top: 16px; }
.pwa-tools h3 { margin: 0; font-size: 1rem; }
.pwa-tools button:disabled { opacity: .65; cursor: wait; }
.pwa-tools [data-pwa-status]:empty { display: none; }
.install-help summary:focus-visible, .install-help button:focus-visible { outline: 3px solid #075a93; outline-offset: 4px; }
@media (display-mode: standalone) {
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .site-header { padding-top: env(safe-area-inset-top, 0px); }
}
