:root {
  --global-header-height: 96px;
  --shell-max-width: 1160px;
  --shell-gutter: 20px;
}

body {
  padding-top: var(--global-header-height);
}

.global-site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1150;
  border-bottom: 1px solid #d6e1eb;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}

.global-site-header-inner {
  width: min(var(--shell-max-width), calc(100% - var(--shell-gutter)));
  margin: 0 auto;
  padding: 8px 0;
}

.global-header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 38px;
}

.global-header-left-links {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.global-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #c7d8e8;
  border-radius: 999px;
  background: #f8fbff;
  color: #1f527f;
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Noto Emoji", "Segoe UI Symbol", sans-serif;
}

.global-icon-link:hover {
  border-color: #9fb6cb;
  box-shadow: 0 3px 8px rgba(16, 44, 72, 0.14);
}

.global-icon-cafe {
  background: linear-gradient(180deg, #45b05d 0%, #2f8b46 100%);
  color: #fff;
  border-color: #2f8b46;
}

.global-icon-alert {
  background: linear-gradient(180deg, #2aabee 0%, #229ed9 100%);
  color: #fff;
  border-color: #229ed9;
}

.global-brand {
  grid-column: 2;
  justify-self: center;
  display: inline-grid;
  grid-template-columns: 32px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  color: #113c69;
  text-decoration: none;
  white-space: nowrap;
}

.global-brand-logo {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.global-brand-text {
  grid-column: 2;
  grid-row: 1 / 3;
  display: inline-grid;
  grid-template-rows: auto auto;
  align-content: center;
  line-height: 1.04;
}

.global-brand-main {
  font-size: 0.9rem;
  font-weight: 800;
}

.global-brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2e669b;
}

.global-menu-toggle {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #c8d8e8;
  border-radius: 999px;
  background: #f8fbff;
  color: #1f527f;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.global-menu-toggle-icon {
  font-size: 0.92rem;
}

.global-header-nav-row {
  display: flex;
  justify-content: center;
  padding-top: 9px;
}

.global-main-nav {
  display: flex;
  width: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.global-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cad8e5;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fc 100%);
  color: #1c4f7c;
  text-decoration: none;
  font-size: 0.81rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(16, 44, 72, 0.07);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.global-nav-link:hover {
  border-color: #9fb6cb;
  box-shadow: 0 3px 8px rgba(16, 44, 72, 0.14);
  transform: translateY(-1px);
}

.global-nav-link.active {
  border-color: #1b67b5;
  background: linear-gradient(180deg, #2f83ff 0%, #1b67b5 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(27, 103, 181, 0.32);
}

.global-site-header.menu-collapsed .global-header-nav-row {
  display: none;
}

.site-footer {
  margin-top: 18px;
  padding: 16px 0;
}

.site-footer-inner {
  width: min(var(--shell-max-width), calc(100% - var(--shell-gutter)));
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.site-footer .affiliate-disclosure {
  margin: 0;
  color: #778999;
  font-size: 0.8rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  text-align: center;
  color: #5f7487;
  font-size: 0.82rem;
}

.site-footer .footer-links-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer .footer-links-row a {
  color: #547395;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
}

.site-footer .footer-links-row a:hover {
  color: #2b5f96;
  text-decoration: underline;
}

@media (max-width: 1024px) {
  :root {
    --shell-gutter: 12px;
    --global-header-height: 58px;
  }

  .global-site-header-inner {
    padding: 7px 0;
  }

  .global-header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 34px;
  }

  .global-header-left-links {
    gap: 4px;
  }

  .global-icon-link {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  .global-brand {
    grid-column: 2;
    justify-self: center;
    grid-template-columns: 28px auto;
    column-gap: 6px;
  }

  .global-brand-logo {
    grid-row: 1 / 3;
    width: 28px;
    height: 28px;
  }

  .global-brand-main {
    font-size: 0.8rem;
  }

  .global-brand-sub {
    font-size: 0.62rem;
  }

  .global-menu-toggle {
    grid-column: 3;
    justify-self: end;
    height: 28px;
    font-size: 0.76rem;
    padding: 0 9px;
  }

  .global-header-nav-row {
    display: none;
    justify-content: center;
    padding-top: 8px;
  }

  .global-site-header.menu-open .global-header-nav-row {
    display: flex;
  }

  .global-main-nav {
    justify-content: center;
    gap: 6px;
  }

  .global-nav-link {
    min-height: 30px;
    font-size: 0.73rem;
    padding: 0 9px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 44, 72, 0.08);
  }
}

@media (max-width: 740px) {
  :root {
    --shell-gutter: 10px;
  }

  .global-brand-main {
    font-size: 0.78rem;
  }

  .global-brand-sub {
    font-size: 0.6rem;
  }

  .global-menu-toggle-text {
    font-size: 0.72rem;
  }

  .site-footer {
    padding: 14px 0;
  }

  .site-footer .affiliate-disclosure {
    font-size: 0.74rem;
  }

  .site-footer .footer-links-row a {
    font-size: 0.71rem;
  }
}
