/* 2027 palette only. Layout, typography sizes, spacing and breakpoints come from upstream styles.css. */
.ihbit-template {
  --bs-primary-rgb: 50,45,38;
  --bs-secondary-rgb: 233,221,200;
  --bs-header-rgb: 248,243,233;
  --bs-header_self_define-rgb: 248,243,233;
  --bs-footer-rgb: 50,45,38;
  --bs-body-bg: #f8f3e9;
  --bs-body-color: #29251f;
  --bs-link-color: #873e2f;
  --bs-link-hover-color: #6c3025;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}
.ihbit-template #mainNav .navbar-brand,
.ihbit-template #mainNav .navbar-nav li.nav-item a.nav-link { color: #29251f; }
.ihbit-template #mainNav .navbar-nav li.nav-item a.nav-link:hover { color: #873e2f; }
.ihbit-template #mainNav .navbar-nav > li.nav-item > a.nav-link.active,
.ihbit-template #mainNav .navbar-nav > li.nav-item > a.nav-link.active:is(:active,:focus,:hover) { background: #873e2f; color: #f8f3e9; }
.ihbit-template .black_text { color: #29251f; }
.ihbit-template .white_text { color: #f8f3e9; }
.ihbit-template .divider-custom .divider-custom-line { background-color: #98743b; border-color: #98743b; }
.ihbit-template .divider-custom .divider-custom-icon { color: #98743b; }
.ihbit-template .divider-custom.divider-light .divider-custom-line { background-color: #c7aa72; }
.ihbit-template .divider-custom.divider-light .divider-custom-icon { color: #c7aa72; }
.ihbit-template .btn-primary { --bs-btn-bg:#873e2f; --bs-btn-border-color:#873e2f; --bs-btn-hover-bg:#6c3025; --bs-btn-hover-border-color:#6c3025; --bs-btn-active-bg:#6c3025; --bs-btn-disabled-bg:#873e2f; --bs-btn-disabled-border-color:#873e2f; }
.ihbit-template .btn-secondary { --bs-btn-color:#29251f; --bs-btn-bg:#e9ddc8; --bs-btn-border-color:#e9ddc8; --bs-btn-hover-bg:#d4c3a5; --bs-btn-hover-border-color:#d4c3a5; --bs-btn-hover-color:#29251f; }
.ihbit-template .btn-outline-secondary { --bs-btn-color:#c7aa72; --bs-btn-border-color:#c7aa72; --bs-btn-hover-bg:#c7aa72; --bs-btn-hover-border-color:#c7aa72; --bs-btn-hover-color:#29251f; }
.ihbit-template .copyright { background:#211e1a; }
.ihbit-template .copyright a, .ihbit-template #yellow_href a { color:#c7aa72; }
.ihbit-template #dark_yellow_href a { color:#873e2f; }
/* Integration/accessibility only; no replacement layout. */
.ihbit-template .collapse { visibility:visible; } /* Neutralize Tailwind's unrelated collapse utility. */
.ihbit-template .bg-header_self_define { background-color:#f8f3e9; }
.ihbit-template :is(section,header,main)[id] { scroll-margin-top: calc(4.5rem - 1px); }
.ihbit-template .template-skip { position:fixed; top:-6rem; left:1rem; z-index:1100; padding:1rem; background:#f8f3e9; color:#29251f; }
.ihbit-template .template-skip:focus { top:1rem; }
.ihbit-template a:focus-visible, .ihbit-template button:focus-visible { outline:3px solid #98743b; outline-offset:3px; }
.ihbit-template .navbar-collapse { max-height:calc(100dvh - 6rem); overflow-y:auto; }
@media (prefers-reduced-motion:reduce) { .ihbit-template *, .ihbit-template *::before, .ihbit-template *::after { scroll-behavior:auto !important; transition:none !important; } }
/* Reset app-only .btn decorations that do not exist in the original template. */
.ihbit-template .btn { min-height:0; letter-spacing:normal; gap:normal; box-shadow:none; }
.ihbit-template .btn:hover:not(:disabled) { box-shadow:none; }
/* Navbar: each label breaks only at its own <br> (Chinese / English), never mid-word.
   The menu collapses below 1200px (navbar-expand-xl) because the seven bilingual items
   need ~780px, more than the 960px container leaves beside the brand. */
.ihbit-template #mainNav .navbar-nav .nav-link,
.ihbit-template #mainNav .navbar-nav .btn { white-space:nowrap; }

/* Keep the current registration entry visible outside the collapsed menu.
   With an entry, expand at 1400px so the bilingual links still fit beside it. */
.ihbit-template #mainNav .header-registration-entry {
  flex:0 0 auto;
  min-height:44px;
  margin-right:1rem;
  padding:.65rem 1rem;
  font-size:.875rem;
  font-weight:700;
  line-height:1.25;
  text-transform:none;
  white-space:nowrap;
}
@media (max-width:575.98px) {
  .ihbit-template #mainNav .header-registration-entry {
    order:3;
    flex-basis:100%;
    margin: .75rem 0 0;
  }
  .ihbit-template #mainNav .navbar-collapse { order:4; }
  .ihbit-template #mainNav:has(.header-registration-entry) .navbar-collapse {
    max-height:calc(100dvh - 10rem);
  }
}
