:root {
  --site-shell-max: 1320px;
}

/* Shared site width — mirrors the current index.html container exactly. */
.container {
  width: min(var(--site-shell-max), calc(100% - 96px));
  margin: 0 auto;
}

/* Header — mirrors the current index.html shell. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(62,107,137,.12);
}

.header-inner {
  height: 82px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 270px;
  color: var(--brand-charcoal, #404040);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 54px;
  height: auto;
  object-fit: contain;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 14px;
  padding-left: 16px;
  border-left: 1px solid rgba(39,52,60,.42);
  line-height: 1;
}

.brand-name {
  color: var(--brand-charcoal, #404040);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: .08em;
  white-space: nowrap;
}

.brand-english {
  margin-top: 7px;
  color: var(--brand-charcoal, #404040);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .2em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-left: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: .32px;
  color: #44525A;
  white-space: nowrap;
}

.nav a {
  position: relative;
  padding: 10px 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.nav a::after {
  content: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--brand-blue, #466C8A);
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 18px;
  height: 3px;
  border-radius: 4px;
  background: var(--brand-blue, #466C8A);
  transform: translateX(-50%);
}

.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--success, #69A978);
  color: #fff;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .02em;
  line-height: 1.7;
  box-shadow: 0 12px 26px rgba(62,107,137,.22);
}

.header-cta:hover,
.header-cta:focus-visible,
.header-cta:active {
  background: #5C976A;
  color: #fff;
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border, #DDE6EB);
  border-radius: 14px;
  background: #fff;
  color: var(--brand-blue, #466C8A);
  cursor: pointer;
}

/* Sticky sub-navigation follows the shared header height. */
.anchor-bar,
.legal-page .legal-nav {
  top: 82px;
}

/* Keep plan-card anchors clear of the sticky Header and in-page navigation. */
.plans-page .plan-card[id] {
  scroll-margin-top: 160px;
}

/* Footer — mirrors the current index.html shell. */
.footer {
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.12);
  background: var(--brand-charcoal, #404040);
  color: #fff;
}

.footer .footer-main {
  display: block;
  padding: 54px 0 26px;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.4fr .75fr .82fr 1.15fr;
  gap: 52px;
  align-items: start;
}

.footer-brand-col .brand {
  min-width: 0;
  margin-bottom: 20px;
}

.footer-brand-col .brand-mark {
  width: 54px;
  filter: brightness(0) invert(1);
  opacity: .94;
}

.footer-brand-col .brand-wordmark {
  margin-left: 13px;
  padding-left: 14px;
  border-left-color: rgba(255,255,255,.42);
}

.footer-brand-col .brand-name {
  color: #fff;
  font-size: 20px;
  letter-spacing: .05em;
}

.footer-brand-col .brand-english {
  color: #D8E0E4;
  font-size: 7px;
  letter-spacing: .14em;
}

.footer-brand-copy {
  max-width: 360px;
  margin: 0;
  color: #D8E0E4;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.9;
}

.footer-brand-card {
  width: 100%;
  max-width: 380px;
  min-height: 0;
  aspect-ratio: 1.36 / 1;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, #404040 0%, rgba(64,64,64,.92) 24%, rgba(64,64,64,.56) 52%, rgba(64,64,64,.18) 100%),
    linear-gradient(180deg, rgba(23,31,37,.46) 0%, rgba(23,31,37,.64) 100%),
    url("../images/jingbao-capital-planning-consultation-team.jpg") center 42% / cover no-repeat;
  box-shadow: none;
}

.footer-brand-points {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-brand-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0,0,0,.28);
}

.footer-brand-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: .53em;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #9CC6DC;
  box-shadow: 0 0 0 4px rgba(156,198,220,.12);
}

.footer-brand-slogan {
  margin: auto 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: .01em;
  text-shadow: 0 1px 8px rgba(0,0,0,.36);
}

.footer-column h3 {
  margin: 4px 0 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}

.footer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-nav a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  color: #D8E0E4;
  font-size: 14px;
  font-weight: 680;
}

.footer-nav a:hover {
  color: #9CC6DC;
}

.footer-contact {
  margin: 0;
  color: #D8E0E4;
  font-size: 14px;
  font-style: normal;
  line-height: 1.8;
}

.footer-contact p {
  margin: 0 0 8px;
}

.footer-contact strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.footer .footer-statement {
  margin: 42px 0 0;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  color: #E3E8EA;
  background: rgba(255,255,255,.06);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.85;
}

.footer .footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #C8D0D4;
  font-size: 13px;
}

.footer-legal-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 680;
}

.footer-legal-links a:hover {
  color: #9CC6DC;
}

@media (max-width: 1180px) {
  .container {
    width: min(var(--site-shell-max), calc(100% - 44px));
  }

  .header-inner {
    position: relative;
    height: 74px;
  }

  .brand {
    min-width: auto;
  }

  .nav {
    display: none;
  }

  .nav.is-open {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--border, #DDE6EB);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(46,72,88,.12);
  }

  .nav.is-open a {
    padding: 11px 12px;
    border: 0;
    border-radius: 12px;
  }

  .nav.is-open a::after {
    content: none;
  }

  .nav.is-open a:hover {
    background: #F1F6F8;
  }

  .hamburger {
    display: block;
  }

  .anchor-bar,
  .legal-page .legal-nav {
    top: 74px;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 28px);
  }

  .header-cta {
    display: none;
  }

  .brand-mark {
    width: 46px;
  }

  .brand-wordmark {
    margin-left: 11px;
    padding-left: 12px;
  }

  .brand-name {
    font-size: 20px;
  }

  .brand-english {
    font-size: 7px;
    letter-spacing: .15em;
  }

  .footer .footer-main {
    padding-top: 44px;
  }

  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-brand-card {
    max-width: none;
    min-height: 0;
    padding: 20px;
  }

  .footer-column h3 {
    margin-bottom: 12px;
  }

  .footer-nav {
    gap: 5px;
  }

  .footer-nav a {
    min-height: 40px;
  }

  .footer .footer-statement {
    margin-top: 34px;
    padding: 18px 20px;
  }

  .footer .footer-bottom {
    margin-top: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal-links {
    justify-content: flex-start;
    gap: 10px 18px;
  }
}
