/* Site shell: header, footer, mobile booking bar, primary button. Loaded last on every page.
   Uses its own sh- class names so the legacy page styles do not reach it. See DESIGN.md. */

/* Inner pages keep their legacy layout for now; they take the new fonts, text size and blue. */
body.reference-design {
  --font-sans: var(--sans);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
}
.reference-design .page-banner h1,
.reference-design h2 { font-family: var(--serif); font-weight: 700; letter-spacing: 0; }
.reference-design :is(.topic-copy, .article-body) h2 { font-family: var(--sans); }

html { scroll-padding-top: calc(var(--site-header-height, 92px) + 16px); }
main:focus { outline: none; }

.sh-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sh-skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: 600 18px/1.3 var(--sans); text-decoration: none; }
.sh-skip:focus { top: 12px; outline: 3px solid var(--blue); outline-offset: 2px; }

/* Primary button: one colour across the site */
.sh-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 28px;
  font: 600 19px/1.3 var(--sans);
  color: #ffffff; background: var(--blue);
  border: 1px solid var(--blue); border-radius: var(--radius-control);
  text-decoration: none; cursor: pointer;
}
body a.sh-button:not(.sh-button--outline), body a.sh-button:not(.sh-button--outline):hover { color: #ffffff; text-decoration: none; }
body .sh-button:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #ffffff; }
body .sh-button--outline { background: var(--surface); color: var(--blue); }
body .sh-button--outline:hover { background: #eef3fa; color: var(--blue-hover); border-color: var(--blue-hover); }
body .sh-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: var(--radius-control); }

/* Header */
.sh-header { position: sticky; top: 0; z-index: 90; background: var(--navy); color: var(--on-navy); font-family: var(--sans); }
.sh-header-inner { display: flex; align-items: center; gap: 24px; min-height: 92px; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
body .sh-brand { display: flex; align-items: center; gap: 16px; min-height: 44px; color: var(--on-navy); text-decoration: none; }
.sh-brand img { width: 76px; height: 57px; flex: none; }
.sh-brand-name { display: block; font: 700 21px/1.3 var(--serif); white-space: nowrap; }
.sh-brand-name b { font-weight: inherit; }
.sh-brand-sub { display: block; font-size: 15px; line-height: 1.4; color: var(--on-navy-soft); white-space: nowrap; }
.sh-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
body .sh-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 8px; border-radius: 6px; color: var(--on-navy); font-size: 17px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
body .sh-nav a:hover, body .sh-nav a[aria-current="page"] { color: var(--on-navy); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
body .sh-header .sh-button { min-height: 48px; padding: 10px 22px; font-size: 17px; border-color: #9db9e4; white-space: nowrap; }
body .sh-header a:focus-visible, body .sh-header summary:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; border-radius: 4px; }
.sh-menu { display: none; }

/* Footer */
.sh-footer { background: var(--navy); color: var(--on-navy-soft); padding: 56px 0 32px; font: 400 18px/1.6 var(--sans); }
body .sh-footer a { color: var(--on-navy); text-underline-offset: 3px; }
body .sh-footer a:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; border-radius: 4px; }
.sh-footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr); gap: 48px; }
.sh-footer p { margin: 0; color: var(--on-navy-soft); }
.sh-footer p + p { margin-top: 8px; }
.sh-footer ul { margin: 0; padding: 0; list-style: none; }
.sh-footer li { margin: 0; }
.sh-footer p.sh-footer-name { font: 700 24px/1.3 var(--serif); color: var(--on-navy); }
.sh-footer p.sh-footer-title { font-weight: 600; color: var(--on-navy); margin-bottom: 4px; }
.sh-footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; }
.sh-footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--navy-line); font-size: 16px; }
.sh-footer-legal p + p, .sh-footer-legal ul { margin-top: 10px; }
.sh-footer-legal li + li { margin-top: 8px; }
.sh-footer p.sh-footer-warning { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--navy-line); color: var(--on-navy); font-weight: 600; }

/* Mobile booking bar */
.sh-bar { display: none; }

@media (max-width: 1420px) {
  .sh-brand-sub { display: none; }
}

@media (max-width: 1360px) {
  .sh-nav, .sh-header .sh-button { display: none; }
  .sh-menu { display: block; margin-left: auto; }
  .sh-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-weight: 500; font-size: 17px; color: var(--on-navy); }
  .sh-menu summary::-webkit-details-marker { display: none; }
  .sh-menu summary::before { content: ""; width: 22px; height: 14px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
  .sh-menu nav { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: var(--navy); padding: 4px var(--gutter) 16px; border-top: 1px solid var(--navy-line); }
  body .sh-menu nav a { display: flex; align-items: center; min-height: 52px; color: var(--on-navy); text-decoration: none; font-size: 19px; line-height: 1.3; border-bottom: 1px solid var(--navy-line); }
  body .sh-menu nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
}

@media (max-width: 860px) {
  body.reference-design, body.home-v2 { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: calc(var(--site-header-height, 64px) + 16px); }

  .sh-header-inner { min-height: 64px; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  body .sh-brand { gap: 8px; }
  .sh-brand img { width: 44px; height: 33px; }
  .sh-brand-name { font-size: 15px; white-space: normal; }
  .sh-brand-name b { display: block; white-space: nowrap; }

  .sh-footer { padding: 40px 0 28px; }
  .sh-footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .sh-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line-strong);
    font-family: var(--sans);
  }
  .sh-bar .sh-button { width: 100%; min-height: 52px; padding: 10px 12px; font-size: 18px; }
  .sh-bar details { position: relative; }
  .sh-bar summary { list-style: none; }
  .sh-bar summary::-webkit-details-marker { display: none; }
  .sh-bar ul { position: absolute; left: 0; bottom: calc(100% + 12px); width: calc(200% + 12px); margin: 0; padding: 6px 16px; list-style: none; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
  .sh-bar li { margin: 0; }
  .sh-bar li + li { border-top: 1px solid var(--line); }
  body .sh-bar li a { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 8px 0; font-size: 18px; line-height: 1.4; text-decoration: none; color: var(--ink); }
  .sh-bar li a strong { color: var(--blue); font-weight: 600; }
}
body .sh-nav a.sh-nav-secondary { color: var(--on-navy-soft); margin-left: 8px; }
body .sh-menu a.sh-nav-secondary { color: var(--on-navy-soft); }
