:root {
  --cf-header-h: 72px;
  --cf-header-h-mobile: 60px;
  --cf-brand: #ff4040;
  --cf-text: #111111;
  --cf-muted: #6b7280;
  --cf-bg: rgba(255,255,255,0.94);
  --cf-stroke: rgba(0,0,0,0.08);
  --cf-shadow: 0 10px 30px rgba(0,0,0,0.08);
  --cf-radius: 18px;
  --cf-radius-sm: 14px;
  --cf-max: 1280px;
}

.cf-header,
.cf-header * {
  box-sizing: border-box;
}

.cf-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--cf-bg);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--cf-stroke);
}

.cf-header__inner {
  max-width: var(--cf-max);
  min-height: var(--cf-header-h);
  margin: 0 auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.cf-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cf-text);
}

.cf-brand__mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff4040 0%, #ff6868 100%);
  box-shadow: 0 8px 20px rgba(255, 64, 64, 0.25);
}

.cf-brand__mark svg {
  width: 24px;
  height: 24px;
  display: block;
}

.cf-brand__text-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cf-brand__text {
  font-size: 1.18rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--cf-brand);
}

.cf-brand__sub {
  margin-top: 4px;
  font-size: 0.76rem;
  line-height: 1.2;
  color: var(--cf-muted);
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-nav {
  min-width: 0;
}

.cf-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cf-nav__link {
  text-decoration: none;
  color: var(--cf-text);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cf-nav__link:hover {
  background: rgba(0,0,0,.045);
  color: var(--cf-brand);
}

.cf-nav__link--ghost {
  background: #fff;
  border: 1px solid var(--cf-stroke);
}

.cf-nav__link--cta {
  color: #fff;
  background: linear-gradient(135deg, #ff4040 0%, #ff6868 100%);
  box-shadow: 0 10px 20px rgba(255,64,64,.2);
}

.cf-nav__link--cta:hover {
  color: linear-gradient(135deg, #ff4040 0%, #ff6868 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255,64,64,.26);
}

.cf-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cf-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--cf-stroke);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.cf-mobile-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111;
}

.cf-mobile-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 3000;
  background: #fff;
  overflow: hidden;
}

.cf-mobile-panel[hidden] {
  display: none !important;
}

.cf-mobile-panel__inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding:
    calc(env(safe-area-inset-top, 0px) + 14px)
    18px
    calc(env(safe-area-inset-bottom, 0px) + 18px)
    18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.cf-mobile-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.cf-mobile-panel__title {
  font-size: 1rem;
  font-weight: 900;
}

.cf-mobile-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--cf-stroke);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.cf-mobile-panel__brand {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fff3f3 100%);
  border: 1px solid rgba(255,64,64,.12);
}

.cf-mobile-panel__brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--cf-brand);
}

.cf-mobile-panel__brand-copy {
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #555;
}

.cf-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-mobile-nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--cf-text);
  font-weight: 800;
  border-radius: 14px;
  background: #f8f8f9;
}

.cf-mobile-nav__link--cta {
  background: linear-gradient(135deg, #ff4040 0%, #ff6868 100%);
  color: #fff;
}

.cf-mobile-panel__footer {
  margin-top: auto;
  padding-top: 16px;
}

.cf-mobile-panel__meta-link {
  display: inline-flex;
  text-decoration: none;
  font-weight: 800;
  color: var(--cf-brand);
}

body.cf-mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .cf-header__inner {
    grid-template-columns: 1fr auto;
  }

  .cf-nav--desktop {
    display: none;
  }

  .cf-mobile-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .cf-header__inner {
    min-height: var(--cf-header-h-mobile);
    padding: 0 12px;
    gap: 10px;
  }

  .cf-brand {
    gap: 10px;
    min-width: 0;
  }

  .cf-brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .cf-brand__mark svg {
    width: 20px;
    height: 20px;
  }

  .cf-brand__text {
    font-size: 1rem;
  }

  .cf-brand__sub {
    display: none;
  }

  .cf-mobile-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}
.cf-nav__dropdown {
  position: relative;
}

.cf-nav__link--dropdown {
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cf-nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  display: none;
  z-index: 1005;
}

.cf-nav__dropdown.is-open .cf-nav__dropdown-menu {
  display: block;
}

.cf-nav__dropdown-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 14px;
}

.cf-nav__dropdown-item:hover {
  background: #f6f6f7;
  color: #ff4040;
}

.cf-mobile-back {
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #111;
  padding: 0;
  opacity: 0.8;
}

.cf-mobile-back:hover {
  opacity: 1;
}

.cf-mobile-nav__link--button {
  width: 100%;
  border: none;
  cursor: pointer;
  justify-content: space-between;
  text-align: left;
}

.cf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}

.cf-header.hidden-scroll,
.cf-header.is-hidden,
.cf-header.hide,
.cf-header.header-hidden {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.cf-nav__dropdown {
  position: relative;
}

.cf-nav__link--dropdown {
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cf-nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 1005;
}

.cf-nav__dropdown.is-open .cf-nav__dropdown-menu {
  display: block;
}

.cf-nav__dropdown-divider {
  height: 1px;
  margin: 8px 6px;
  background: rgba(0, 0, 0, 0.08);
}

.cf-nav__dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
}

.cf-nav__dropdown-item:hover {
  background: #f6f6f7;
  color: #ff4040;
}

.cf-nav__dropdown-item--submenu {
  position: relative;
}

.cf-nav__dropdown-submenu {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  min-width: 240px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 1006;
}

.cf-nav__dropdown-submenu.is-open {
  display: block;
}

.cf-mobile-nav__link--button {
  width: 100%;
  border: none;
  cursor: pointer;
  justify-content: space-between;
  text-align: left;
}

/* =========================
   MOBILE PANEL - HARDENED
   ========================= */

.cf-mobile-panel,
.cf-mobile-panel *,
.cf-mobile-panel *::before,
.cf-mobile-panel *::after {
  box-sizing: border-box;
}

.cf-mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.cf-mobile-panel[hidden] {
  display: none !important;
}

.cf-mobile-panel__inner {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding:
    calc(env(safe-area-inset-top, 0px) + 14px)
    16px
    calc(env(safe-area-inset-bottom, 0px) + 16px)
    16px;
}

/* top row */
.cf-mobile-panel__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;

  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.cf-mobile-panel__title {
  min-width: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.cf-mobile-back,
.cf-mobile-close {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #111;
  min-height: 44px;
  height: 44px;
  border-radius: 14px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  max-width: 100%;
}

.cf-mobile-back[hidden] {
  display: none !important;
}

.cf-mobile-close {
  width: 44px;
  padding: 0;
}

/* brand card */
.cf-mobile-panel__brand {
  width: 100%;
  min-width: 0;
  margin: 0 0 16px 0;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
  border: 1px solid rgba(255, 64, 64, 0.14);
  overflow: hidden;
}

.cf-mobile-panel__brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ff4040;
  line-height: 1.2;
}

.cf-mobile-panel__brand-copy {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #555;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* nav column */
.cf-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

/* link/button cards */
.cf-mobile-nav__link,
.cf-mobile-nav__link:link,
.cf-mobile-nav__link:visited {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 18px;
  background: #f7f7f8;
  color: #111;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cf-mobile-nav__link--button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.cf-mobile-nav__link--cta,
.cf-mobile-nav__link--cta:link,
.cf-mobile-nav__link--cta:visited {
  background: linear-gradient(135deg, #ff4040 0%, #ff6868 100%);
  color: #fff;
}

/* when menu open, lock page */
html.cf-mobile-menu-open,
body.cf-mobile-menu-open {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
}

/* prevent header blur issues while menu is open */
html.cf-mobile-menu-open .cf-header,
body.cf-mobile-menu-open .cf-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* slightly tighter on very small screens */
@media (max-width: 420px) {
  .cf-mobile-panel__inner {
    padding:
      calc(env(safe-area-inset-top, 0px) + 12px)
      12px
      calc(env(safe-area-inset-bottom, 0px) + 14px)
      12px;
  }

  .cf-mobile-nav__link,
  .cf-mobile-nav__link:link,
  .cf-mobile-nav__link:visited {
    padding: 13px 16px;
    border-radius: 16px;
  }

  .cf-mobile-panel__brand {
    padding: 13px;
  }
}
.cf-mobile-panel__title {
  text-align: center;
  justify-self: center;
}
.cf-mobile-close {
  justify-self: end;
}

.cf-mobile-back {
  justify-self: start;
}
html.cf-mobile-menu-open,
body.cf-mobile-menu-open {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
}