:root{
  --wex-bg:#f7f7f8;
  --wex-panel:#ffffff;
  --wex-text:#111827;
  --wex-muted:#6b7280;
  --wex-border:#e5e7eb;
  --wex-brand:#30534F;
}

body{
  margin:0;
  background:var(--wex-bg);
  color:var(--wex-text);
  font-family:Avenir, "Avenir Next", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Header */

.wex-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--wex-border);
  height: 64px;
  display: flex;
  align-items: center;
}

.wex-header-inner{
  width: 100%;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wex-brand{
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--wex-brand);
  text-decoration: none;
}

.wex-nav{
  display: flex;
  gap: 20px;
  font-size: 18px;
}

.wex-nav a{
  color: var(--wex-muted);
  text-decoration: none;
}

.wex-nav a:hover{
  color: var(--wex-text);
}

.wex-nav a.active{
  color: var(--wex-text);
  font-weight: 700;
}

/* Utility container */

.wex-page{
  min-height:100vh;
}

@media (max-width:720px){

  .wex-header-inner{
    padding:10px 14px;
  }

  .wex-nav{
    gap:10px;
    font-size:13px;
  }

}

.wex-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wex-dropdown {
  position: relative;
}

.wex-dropdown-trigger,
.wex-nav-placeholder {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}

.wex-nav-placeholder {
  cursor: default;
  color: rgba(24, 32, 30, 0.62);
}

.wex-dropdown-menu {
  position: absolute;
  top: 34px;
  left: 0;
  min-width: 230px;
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid #dbe4e0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  padding: 6px;
  z-index: 1000;
}

.wex-dropdown:hover .wex-dropdown-menu,
.wex-dropdown:focus-within .wex-dropdown-menu {
  display: flex;
}

.wex-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 9px;
  color: #18201e;
  text-decoration: none;
  font-size: 14px;
}

.wex-dropdown-menu a:hover,
.wex-dropdown-menu a.active {
  background: #f5f7f6;
  color: #30534f;
}

@media (max-width: 760px) {
  .wex-header-inner {
    align-items: flex-start;
    gap: 10px;
  }

  .wex-nav {
    width: 100%;
    gap: 8px;
  }

  .wex-dropdown {
    position: static;
  }

  .wex-dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 4px;
    box-shadow: none;
  }

  .wex-nav-placeholder {
    display: none;
  }
}

/* ===== MOBILE DROPDOWN FINAL FIX ===== */
@media (max-width: 760px) {

  .wex-dropdown {
    position: static;
  }

  .wex-dropdown-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 64px;

    width: auto;
    max-width: none;

    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);

    z-index: 2000;
  }

  /* Add slight spacing from header */
  .wex-header {
    position: relative;
    z-index: 3000;
  }

}

.wex-dropdown.open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.05);
}
/* Ensure full Wexagrams dropdown menu is visible */
.wex-header {
  position: relative;
  z-index: 1000;
}

.wex-dropdown {
  position: relative;
}

.wex-dropdown-menu {
  height: auto;
  max-height: none;
  overflow: visible;
  z-index: 9999;
}
